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
411ca8751cdd32ac01b3fbb483b2ab27e1b9c7c5
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
/DecompiledViberSrc/app/src/main/java/com/google/android/gms/internal/ads/zzbww.java
1d3eb00c9d53d5093b18a6696fee7bbf02ad3a09
[]
no_license
cga2351/code
703f5d49dc3be45eafc4521e931f8d9d270e8a92
4e35fb567d359c252c2feca1e21b3a2a386f2bdb
refs/heads/master
2021-07-08T15:11:06.299852
2021-05-06T13:22:21
2021-05-06T13:22:21
60,314,071
1
3
null
null
null
null
UTF-8
Java
false
false
417
java
package com.google.android.gms.internal.ads; public final class zzbww implements zzdth<String> { private static final zzbww zzfls = new zzbww(); public static zzbww zzahe() { return zzfls; } } /* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_2_dex2jar.jar * Qualified Name: com.google.android.gms.internal.ads.zzbww * JD-Core Version: 0.6.2 */
[ "yu.liang@navercorp.com" ]
yu.liang@navercorp.com
a42dc0277e6d883acb06e72f5307974f703f590f
3b08c821b4e4f795d80bcd98901c618ed709780c
/yslib/src/main/java/com/yusong/yslib/view/WrapContentHeightViewPager.java
10354cedcab2a5fa668ea2c69b68f3dc32477972
[]
no_license
feisher/HDG_user
d21cb3274e9c3541126dd341da615bd7890994d5
29fe5401ebec81bfa7a06f11118a17210329a4ee
refs/heads/master
2020-03-07T20:25:24.363655
2018-08-15T13:29:20
2018-08-15T13:29:20
127,697,152
2
0
null
null
null
null
UTF-8
Java
false
false
1,045
java
package com.yusong.yslib.view; import android.content.Context; import android.support.v4.view.ViewPager; import android.util.AttributeSet; import android.view.View; public class WrapContentHeightViewPager extends ViewPager { public WrapContentHeightViewPager(Context context) { super(context); } public WrapContentHeightViewPager(Context context, AttributeSet attrs) { super(context, attrs); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int height = 0; //下面遍历所有child的高度 for (int i = 0; i < getChildCount(); i++) { View child = getChildAt(i); child.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)); int h = child.getMeasuredHeight(); if (h > height) { //采用最大的view的高度。 height = h; } } heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY); super.onMeasure(widthMeasureSpec, heightMeasureSpec); } }
[ "458079442@qq.com" ]
458079442@qq.com
91f887f1e3298744342e04da0ad939db9bf3923c
337c5331a8e525175c1ea4c84ac3c6de0f32a189
/app/src/main/java/htw/berlin/wi/prog2/parsingCopyFromHA3/CountingInputParser.java
2db7fedb0cde41bcb08d7cbd6aae1b7584fe0afa
[]
no_license
maurizWeymann/ha4-maurizWeymann
0327a75a23a996ad01f622d49b432bd8462005de
d7a73900c30261eec1f53192ddb79d5ac43ea660
refs/heads/main
2023-05-30T13:36:17.172365
2021-06-05T20:16:07
2021-06-05T20:16:07
374,216,295
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
package htw.berlin.wi.prog2.parsing; import java.util.Map; public class CountingInputParser implements ExtendableInputParser { @Override public Map<Long, Integer> idsAndCountFromInput(String inputLine, Map<String, Long> keywordsToIds) { return Map.of(); // TODO hier implementieren und die korrekte Map zurückgeben } }
[ "66690702+github-classroom[bot]@users.noreply.github.com" ]
66690702+github-classroom[bot]@users.noreply.github.com
3cffc598042ccd3a53453a774ece320b8a5626e6
1b50fe1118a908140b6ba844a876ed17ad026011
/core/src/main/java/org/narrative/network/customizations/narrative/service/api/model/NicheStatsDTO.java
71ad71ef6b399e5f1cb3bb7af2792e98234673e9
[ "MIT" ]
permissive
jimador/narrative
a6df67a502a913a78cde1f809e6eb5df700d7ee4
84829f0178a0b34d4efc5b7dfa82a8929b5b06b5
refs/heads/master
2022-04-08T13:50:30.489862
2020-03-07T15:12:30
2020-03-07T15:12:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
729
java
package org.narrative.network.customizations.narrative.service.api.model; import com.fasterxml.jackson.annotation.JsonTypeName; import org.narrative.network.customizations.narrative.serialization.jackson.annotation.JsonValueObject; import lombok.Builder; import lombok.Value; import lombok.experimental.FieldNameConstants; import java.io.Serializable; /** * Date: 2019-03-09 * Time: 14:44 * * @author brian */ @JsonValueObject @JsonTypeName("NicheStats") @Value @Builder(toBuilder = true) @FieldNameConstants public class NicheStatsDTO implements Serializable { private static final long serialVersionUID = 6080304012030421241L; private final long nichesForSale; private final long nichesAwaitingApproval; }
[ "brian@narrative.org" ]
brian@narrative.org
d4fb1daf83c0a5a2ad09bdbfb35748217d8d505a
6f5a0c8bbb5ecca911da0bb3d562e8a4c2a154f3
/src/main/java/org/crown/common/utils/TreeUtils.java
9017af000271a1ed762b3a517e4b2a9b165deb88
[ "MIT" ]
permissive
zhangmrit/Crown2
ea942faeed08f96d37fdd7a1e0612c06cf2ba46d
08980218eb23b15462842b70b37b2d7d87323386
refs/heads/master
2020-06-22T20:52:52.560850
2019-07-23T09:19:03
2019-07-23T09:19:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,451
java
package org.crown.common.utils; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.crown.project.system.menu.domain.Menu; /** * 权限数据处理 * * @author ruoyi */ public class TreeUtils { /** * 根据父节点的ID获取所有子节点 * * @param list 分类表 * @param parentId 传入的父节点ID * @return String */ public static List<Menu> getChildPerms(List<Menu> list, int parentId) { List<Menu> returnList = new ArrayList<>(); for (Menu t : list) { // 一、根据传入的某个父节点ID,遍历该父节点的所有子节点 if (t.getParentId() == parentId) { recursionFn(list, t); returnList.add(t); } } return returnList; } /** * 递归列表 * * @param list * @param t */ private static void recursionFn(List<Menu> list, Menu t) { // 得到子节点列表 List<Menu> childList = getChildList(list, t); t.setChildren(childList); for (Menu tChild : childList) { if (hasChild(list, tChild)) { // 判断是否有子节点 Iterator<Menu> it = childList.iterator(); while (it.hasNext()) { Menu n = it.next(); recursionFn(list, n); } } } } /** * 得到子节点列表 */ private static List<Menu> getChildList(List<Menu> list, Menu t) { List<Menu> tlist = new ArrayList<>(); Iterator<Menu> it = list.iterator(); while (it.hasNext()) { Menu n = it.next(); if (n.getParentId().longValue() == t.getMenuId().longValue()) { tlist.add(n); } } return tlist; } final List<Menu> returnList = new ArrayList<>(); /** * 根据父节点的ID获取所有子节点 * * @param list 分类表 * @param typeId 传入的父节点ID * @param prefix 子节点前缀 */ public List<Menu> getChildPerms(List<Menu> list, int typeId, String prefix) { if (list == null) { return null; } for (Menu node : list) { // 一、根据传入的某个父节点ID,遍历该父节点的所有子节点 if (node.getParentId() == typeId) { recursionFn(list, node, prefix); } // 二、遍历所有的父节点下的所有子节点 /* * if (node.getParentId()==0) { recursionFn(list, node); } */ } return returnList; } private void recursionFn(List<Menu> list, Menu node, String p) { // 得到子节点列表 List<Menu> childList = getChildList(list, node); if (hasChild(list, node)) { // 判断是否有子节点 returnList.add(node); Iterator<Menu> it = childList.iterator(); while (it.hasNext()) { Menu n = it.next(); n.setMenuName(p + n.getMenuName()); recursionFn(list, n, p + p); } } else { returnList.add(node); } } /** * 判断是否有子节点 */ private static boolean hasChild(List<Menu> list, Menu t) { return getChildList(list, t).size() > 0; } }
[ "330952486@qq.com" ]
330952486@qq.com
4caeae16153b187b3486722cbde84e47e6807456
7890edd6af1c0eaeb22c3f2b72d8c0277e5137fd
/src/main/java/schoolrecords/SchoolRecordsController.java
b422c2a0b549636bdf4a426ec1a077d8ad1ba74c
[]
no_license
Dini68/projects
b7865b2f9aa7d775357ad3d7ca19464a92a81fd6
7b72a96583faca274189519e2ca973218cefb3b8
refs/heads/master
2023-04-14T04:16:32.173993
2021-04-28T14:38:38
2021-04-28T14:38:38
362,500,792
0
0
null
null
null
null
UTF-8
Java
false
false
7,752
java
package schoolrecords; import java.util.*; public class SchoolRecordsController { private final ClassRecords classRecords = new ClassRecords("5.a", new Random()); private final List<Subject> subjects = new ArrayList<>(); private final List<Tutor> tutors = new ArrayList<>(); private final Scanner scanner = new Scanner(System.in); private final static List<String> MENUS = new ArrayList<>(List.of( "1. Diákok nevének listázása", "2. Diák név alapján keresése", "3. Diák létrehozása", "4. Diák név alapján törlése", "5. Diák feleltetése", "6. Osztályátlag kiszámolása", "7. Tantárgyi átlag kiszámolása", "8. Diákok átlagának megjelenítése", "9. Diák átlagának kiírása", "10. Diák tantárgyhoz tartozó átlagának kiírása", "11. Kilépés" )); public void initSchool() { subjects.add(new Subject("matematika")); subjects.add(new Subject("földrajz")); subjects.add(new Subject("biológia")); subjects.add(new Subject("zene")); subjects.add(new Subject("fizika")); subjects.add(new Subject("kémia")); subjects.add(new Subject("magyar")); subjects.add(new Subject("történelem")); subjects.add(new Subject("testnevelés")); subjects.add(new Subject("informatika")); subjects.add(new Subject("angol")); tutors.add(new Tutor("Nagy Csilla", Arrays.asList(new Subject("matematika"), new Subject("fizika")))); tutors.add(new Tutor("Kovács Rita", Arrays.asList(new Subject("földrajz"), new Subject("zene")))); tutors.add(new Tutor("Varga Márton", Arrays.asList(new Subject("biológia"), new Subject("kémia")))); tutors.add(new Tutor("Nagy Béla", Arrays.asList(new Subject("matematika"), new Subject("testnevelés")))); tutors.add(new Tutor("Jókai Ferenc", Arrays.asList(new Subject("magyar"), new Subject("történelem")))); tutors.add(new Tutor("Neumann János", Arrays.asList(new Subject("angol"), new Subject("informatika")))); } public static void main(String[] args) { SchoolRecordsController sc = new SchoolRecordsController(); sc.initSchool(); sc.printMenu(); sc.runMenu(); } private void printMenu() { System.out.println("\n\t\t>> Menü <<"); for (String s: MENUS) { System.out.println(s); } } public void runMenu() { Scanner scanner = new Scanner(System.in); String menuNumberStr; do { System.out.print("Menüpont száma: "); menuNumberStr= scanner.nextLine(); if (List.of("1","2","3","4","5","6","7","8","9","10","11").contains(menuNumberStr)) { implementMenuPoint(menuNumberStr); if (!menuNumberStr.equals("11")) { printMenu(); } } else { System.out.println("Nincs ilyen menüpont!"); } } while (!menuNumberStr.equals("11")); } private void implementMenuPoint(String menuNumberStr) { int menuNumber = Integer.parseInt(menuNumberStr) - 1; System.out.println("\t" + MENUS.get(menuNumber)); switch (menuNumberStr) { case "1" : { System.out.println(classRecords.listStudentNames()); return; } case "2" : { System.out.println(classRecords.findStudentByName(actName())); return; } case "3" : { if (classRecords.addStudent(new Student(actName()))) { System.out.println("Sikerült felvenni a nevet!"); } else { System.out.println("Hiba! Már van ilyen név a diákok között!"); } return; } case "4" : { if (classRecords.removeStudent(new Student(actName()))) { System.out.println("Sikerült törölni a nevet!"); } else { System.out.println("Hiba! Nincs ilyen név a diákok között!"); } return; } case "5" : { repetition(); return; } case "6" : { System.out.println(classRecords.calculateClassAverage()); return; } case "7" : { System.out.println(classRecords.calculateClassAverageBySubject(getSubject())); return; } case "8" : { System.out.println(classRecords.listStudyResults()); return; } case "9" : { System.out.println(classRecords.findStudentByName(actName()).calculateAverage()); return; } case "10" : { String actStudentName = actName(); Subject actSubjectName = getSubject(); System.out.println(classRecords.findStudentByName(actStudentName).calculateSubjectAverage(actSubjectName)); } } } private String actName() { System.out.print("Kérem a diák nevét: "); String name; do { name = scanner.nextLine(); } while (name.isBlank()); return name; } private void repetition() { Student student = classRecords.repetition(); System.out.println(student.getName() + " felel"); MarkType markType = getMark(); Subject subject = getSubject(); Tutor tutor = getTutor(subject); Mark mark = new Mark(markType, subject, tutor); student.grading(mark); System.out.println(student.getName() + ": " + subject.getSubjectName() + ": " + markType.getValue()); } private Tutor getTutor(Subject subject) { do { System.out.print("Kérem a tanár nevét: "); String tutorName = scanner.nextLine(); Tutor tutor = getTutorByName(tutorName); if (tutor != null) { if (tutor.tutorTeachingSubject(subject)) { return tutor; } System.out.println("Hiba! " + tutorName + " nem tanítja az adott tárgyat!"); } } while (true); } private Tutor getTutorByName(String tutorName) { for (Tutor t: tutors) { if (t.getName().equals(tutorName)) { return t; } } System.out.println("Nincs ilyen név a tanárok között: '" + tutorName + "'"); return null; } private Subject getSubject() { do { System.out.print("Kérem a tantárgyat: "); String subjectName = scanner.nextLine(); for (Subject sb : subjects) { if (sb.getSubjectName().equals(subjectName)) { return sb; } } System.out.println("Hiba! Nincs ilyen tantárgy!"); } while (true); } private MarkType getMark() { do { System.out.print("Kérem a jegyet: "); String markStr = scanner.nextLine(); if ("12345".contains(markStr) && markStr.length() == 1) { return MarkType.values()[5 - Integer.parseInt(markStr)]; } else{ System.out.println("Az érdemjegy 1..5 lehet!"); } } while (true); } }
[ "kdini68@gmail.com" ]
kdini68@gmail.com
7416cfd8c6010df7a999a3a72ac7b1673d2e0607
eb161c67a4188241edb113e37a2a6d6489f26f35
/app/src/main/java/cn/edu/gdmec/android/fragmentbestpractice/News.java
28fab11c3d734895ad7cf7f3e4101c261ed894a2
[]
no_license
huangguangda/FragmentBestPractice
78495a9d963433a03d6508dd00dd7fa2bdeb6509
a9ccb84c8299345c98e6ae2baf027859a83547ff
refs/heads/master
2021-08-24T12:11:53.179933
2017-12-09T19:01:17
2017-12-09T19:01:17
113,675,888
0
0
null
null
null
null
UTF-8
Java
false
false
447
java
package cn.edu.gdmec.android.fragmentbestpractice; /** * Created by Jack on 2017/12/9. */ public class News { private String title; private String content; public String getTitle(){ return title; } public void setTitle(String title){ this.title = title; } public String getContent(){ return content; } public void setContent(String content){ this.content = content; } }
[ "2397923107@qq.com" ]
2397923107@qq.com
48b395d880a7f97dbdff6fc772d65891c144dc71
f11e4e1538589f1f56184745e5af7f7ba06a306b
/IOC-Proj14-CyclicDependenyManagement-Solution1-POC/src/com/nt/beans/B.java
4470ccf6af4e3d7194cd1febe5de3f43dfb9f0c6
[]
no_license
varunraj2297/SpringFrameWorkWS
0473f140f7fd56a92402d69c9274a4c585ca51e8
16f54fa282710983e6714abb7dfe07c7f953d0de
refs/heads/master
2022-12-25T04:20:57.253135
2020-03-03T07:19:15
2020-03-03T07:19:15
176,875,084
0
0
null
2022-11-24T08:37:32
2019-03-21T05:19:19
Java
UTF-8
Java
false
false
172
java
package com.nt.beans; public class B { private A a; public void setA(A a) { this.a = a; } @Override public String toString() { return "B ....."; } }
[ "varunraj2297@gmail.com" ]
varunraj2297@gmail.com
3489dbde8f162d582ccbaae0b6f80059670b4bed
a770e95028afb71f3b161d43648c347642819740
/sources/org/telegram/ui/TwoStepVerificationSetupActivity$$ExternalSyntheticLambda22.java
7a764d576f6c13b15b20e7d954f01345771410e7
[]
no_license
Edicksonjga/TGDecompiledBeta
d7aa48a2b39bbaefd4752299620ff7b72b515c83
d1db6a445d5bed43c1dc8213fb8dbefd96f6c51b
refs/heads/master
2023-08-25T04:12:15.592281
2021-10-28T20:24:07
2021-10-28T20:24:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
820
java
package org.telegram.ui; import org.telegram.tgnet.TLObject; import org.telegram.tgnet.TLRPC$TL_error; public final /* synthetic */ class TwoStepVerificationSetupActivity$$ExternalSyntheticLambda22 implements Runnable { public final /* synthetic */ TwoStepVerificationSetupActivity f$0; public final /* synthetic */ TLRPC$TL_error f$1; public final /* synthetic */ TLObject f$2; public /* synthetic */ TwoStepVerificationSetupActivity$$ExternalSyntheticLambda22(TwoStepVerificationSetupActivity twoStepVerificationSetupActivity, TLRPC$TL_error tLRPC$TL_error, TLObject tLObject) { this.f$0 = twoStepVerificationSetupActivity; this.f$1 = tLRPC$TL_error; this.f$2 = tLObject; } public final void run() { this.f$0.lambda$createView$8(this.f$1, this.f$2); } }
[ "fabian_pastor@msn.com" ]
fabian_pastor@msn.com
9b804628016f65a6540431cb68ff58cb457ee193
9e97f2c9948b7f14e3f402e174adee06faea0eec
/src/main/java/br/indie/fiscal4j/nfe310/classes/cadastro/NFInfoConsultaCadastro.java
e46705ec8c342f31ffaf640372432448acaf80eb
[ "Apache-2.0" ]
permissive
andrauz/fiscal4j
1d16a4d56275c9fa50499fb9204fd60445ffd201
fe5558337a389f807040d92a6d140d4a2fa937d4
refs/heads/master
2020-04-25T01:13:47.253714
2019-02-15T19:29:18
2019-02-15T19:29:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,796
java
package br.indie.fiscal4j.nfe310.classes.cadastro; import br.indie.fiscal4j.DFBase; import br.indie.fiscal4j.validadores.StringValidador; import org.simpleframework.xml.Element; public class NFInfoConsultaCadastro extends DFBase { private static final long serialVersionUID = 2846137738770858117L; @Element(name = "xServ", required = true) private String servico; @Element(name = "UF", required = true) private String uf; @Element(name = "IE", required = false) private String inscricaoEstadual; @Element(name = "CNPJ", required = false) private String cnpj; @Element(name = "CPF", required = false) private String cpf; public String getServico() { return this.servico; } public void setServico(final String servico) { this.servico = servico; } public String getUf() { return this.uf; } public void setUf(final String uf) { this.uf = uf; } public String getInscricaoEstadual() { return this.inscricaoEstadual; } public void setInscricaoEstadual(final String inscricaoEstadual) { this.inscricaoEstadual = inscricaoEstadual; } public String getCnpj() { return this.cnpj; } public void setCnpj(final String cnpj) { if (this.cpf != null) { throw new IllegalStateException("Nao pode setar CPF pois CNPJ ja esta setado"); } StringValidador.cnpj(cnpj); this.cnpj = cnpj; } public String getCpf() { return this.cpf; } public void setCpf(final String cpf) { if (this.cnpj != null) { throw new IllegalStateException("Nao pode setar CPF pois CNPJ ja esta setado"); } StringValidador.cpf(cpf); this.cpf = cpf; } }
[ "jeferson.hck@gmail.com" ]
jeferson.hck@gmail.com
18582d11fa40c3a5cf1d708f6f3edc73e0eaf908
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/19/19_a6b5b139fdee48f333b2e9f3eb0da8e827d04d4b/GameSound/19_a6b5b139fdee48f333b2e9f3eb0da8e827d04d4b_GameSound_s.java
02eed5a7c3b57b557f8f2c28be5a84556090f49e
[]
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,850
java
/** * Routines to handle sound for Awesome Alphabet. */ package edu.bu.cs673.AwesomeAlphabet.model; import java.io.IOException; import java.io.InputStream; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.UnsupportedAudioFileException; import org.apache.log4j.Logger; import edu.bu.cs673.AwesomeAlphabet.main.AAConfig; public class GameSound { static Logger log = Logger.getLogger(GameSound.class); private String soundName; private Clip curr_clip = null; /** * Constructor. This prepends the directory to the sound's filename * @param soundName sound's filename */ public GameSound(String soundName) { // TODO: Error handling. File not being present. this.soundName = soundName; // log.info("Adding sound file " + this.soundName); } /** * Plays the sound for this object. Does not return until the sound has finished playing. * This is limited to short-duration sounds only (2 seconds or less). */ public void PlaySound() { try { InputStream is = AAConfig.getSoundResource(soundName); AudioInputStream audioIn = AudioSystem.getAudioInputStream(is); curr_clip = AudioSystem.getClip(); curr_clip.open(audioIn); curr_clip.start(); } catch (UnsupportedAudioFileException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (LineUnavailableException e) { log.error("Sound file '" + soundName + "' is too large to play."); } } public void StopSound() { if (curr_clip == null) return; curr_clip.stop(); curr_clip.close(); curr_clip = null; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d9277d85450607ccceaeb8613419486b155b3d4b
9623f83defac3911b4780bc408634c078da73387
/PC_for_1_3/src/minecraft_server/net/minecraft/src/BlockTallGrass.java
11520c224766d7689fc5a5a6fa3014ff1784b34e
[]
no_license
BlearStudio/powercraft-legacy
42b839393223494748e8b5d05acdaf59f18bd6c6
014e9d4d71bd99823cf63d4fbdb65c1b83fde1f8
refs/heads/master
2021-01-21T21:18:55.774908
2015-04-06T20:45:25
2015-04-06T20:45:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,038
java
package net.minecraft.src; import java.util.Random; public class BlockTallGrass extends BlockFlower { protected BlockTallGrass(int par1, int par2) { super(par1, par2, Material.vine); float var3 = 0.4F; this.setBlockBounds(0.5F - var3, 0.0F, 0.5F - var3, 0.5F + var3, 0.8F, 0.5F + var3); } /** * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata */ public int getBlockTextureFromSideAndMetadata(int par1, int par2) { return par2 == 1 ? this.blockIndexInTexture : (par2 == 2 ? this.blockIndexInTexture + 16 + 1 : (par2 == 0 ? this.blockIndexInTexture + 16 : this.blockIndexInTexture)); } /** * Returns the ID of the items to drop on destruction. */ public int idDropped(int par1, Random par2Random, int par3) { return par2Random.nextInt(8) == 0 ? Item.seeds.shiftedIndex : -1; } /** * Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' (inclusive). */ public int quantityDroppedWithBonus(int par1, Random par2Random) { return 1 + par2Random.nextInt(par1 * 2 + 1); } /** * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the * block and l is the block's subtype/damage. */ public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6) { if (!par1World.isRemote && par2EntityPlayer.getCurrentEquippedItem() != null && par2EntityPlayer.getCurrentEquippedItem().itemID == Item.shears.shiftedIndex) { par2EntityPlayer.addStat(StatList.mineBlockStatArray[this.blockID], 1); this.dropBlockAsItem_do(par1World, par3, par4, par5, new ItemStack(Block.tallGrass, 1, par6)); } else { super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6); } } }
[ "rapus95@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c" ]
rapus95@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c
116304661b673d0a157707ddb85cb97fb5b5ba29
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/65/org/apache/commons/lang/NotImplementedException_getMessage_163.java
eca0efade0bd4fab51832251cd80b8669757c39c
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,098
java
org apach common lang thrown block code implement except supplement code unsupport oper except unsupportedoperationexcept code provid semant rich descript problem code implement except notimplementedexcept code repres author implement logic point program act except base todo tag logic block except suport except chain pre foo except except implement except notimplementedexcept todo pre author matthew hawthorn author stephen colebourn version implement except notimplementedexcept return error messag code throwabl code chain code throwabl code index number param index index code throwabl code chain error messag code throwabl code index chain messag index bound except indexoutofboundsexcept code index code argument neg count code throwabl code chain string messag getmessag index index messag getmessag deleg messag getmessag index
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
5fca132af84581bfb946f9db0846f15253c54a15
3ed6744aa1ade57baad083f03a61109096dda7c9
/AlertManagerClient/test/test/PrintExamplePayload.java
8cc7526819bb9e6217746db5fbeb670bf7876230
[]
no_license
kambasana/ClinicalDecisionSupport
623f4101380da5629687c56bf3071a5e82d064df
b1c4377507f63421e080c174240b6e6c07828917
refs/heads/master
2021-01-20T16:35:28.418519
2012-09-28T23:37:07
2012-09-28T23:37:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,301
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package test; import com.thoughtworks.xstream.XStream; import gov.hhs.fha.nhinc.alertpayload.Action; import gov.hhs.fha.nhinc.alertpayload.ActionParam; import gov.hhs.fha.nhinc.alertpayload.PayloadMeta; import gov.hhs.fha.nhinc.alertpayload.Recommendation; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import static org.junit.Assert.*; /** * * @author cmatser */ public class PrintExamplePayload { private String payloadXML = "<Recommendation>\n" + " <body>&lt;html&gt;This is a &lt;b&gt;sample&lt;/b&gt; body for a recommendation.&lt;/html&gt;</body>\n" + " <metadata>\n" + " <type>Mail,Notification,etc</type>\n" + " </metadata>\n" + " <actions>\n" + " <Action>\n" + " <actionId>id1</actionId>\n" + " <name>action name 1</name>\n" + " <parameters>\n" + " <ActionParam>\n" + " <paramId>pid2</paramId>\n" + " <name>param2</name>\n" + " </ActionParam>\n" + " <ActionParam>\n" + " <paramId>pid1</paramId>\n" + " <name>param1</name>\n" + " </ActionParam>\n" + " </parameters>\n" + " </Action>\n" + " <Action>\n" + " <actionId>id2</actionId>\n" + " <name>action name 2</name>\n" + " <parameters>\n" + " <ActionParam>\n" + " <paramId>pid2</paramId>\n" + " <name>param2</name>\n" + " </ActionParam>\n" + " <ActionParam>\n" + " <paramId>pid1</paramId>\n" + " <name>param1</name>\n" + " </ActionParam>\n" + " </parameters>\n" + " </Action>\n" + " </actions>\n" + "</Recommendation>\n" ; public PrintExamplePayload() { } @BeforeClass public static void setUpClass() throws Exception { } @AfterClass public static void tearDownClass() throws Exception { } @Before public void setUp() { } @After public void tearDown() { } @Test public void hello() { try { //Setup XStream XStream xstream = new XStream(); xstream.alias("Recommendation", Recommendation.class); xstream.alias("Action", Action.class); xstream.alias("ActionParam", ActionParam.class); Recommendation r = new Recommendation(); r.setBody("<html>This is a <b>sample</b> body for a recommendation.</html>"); PayloadMeta m = new PayloadMeta(); m.setType("Mail,Notification,etc"); r.setMetadata(m); Action a = new Action(); a.setActionId("id1"); a.setName("action name 1"); ActionParam p = new ActionParam(); p.setParamId("pid1"); p.setName("param1"); a.getParameters().add(p); p = new ActionParam(); p.setParamId("pid2"); p.setName("param2"); a.getParameters().add(p); r.getActions().add(a); a = new Action(); a.setActionId("id2"); a.setName("action name 2"); p = new ActionParam(); p.setParamId("pid1"); p.setName("param1"); a.getParameters().add(p); p = new ActionParam(); p.setParamId("pid2"); p.setName("param2"); a.getParameters().add(p); r.getActions().add(a); System.out.println(xstream.toXML(r)); } catch (Throwable t) { t.printStackTrace(); fail(); } } @Test public void parse() { try { //Setup XStream XStream xstream = new XStream(); xstream.alias("Recommendation", Recommendation.class); xstream.alias("Action", Action.class); xstream.alias("ActionParam", ActionParam.class); Recommendation r = (Recommendation) xstream.fromXML(payloadXML); System.out.println("Action1, Param1, Value: " + ((ActionParam) ((Action) r.getActions().toArray()[0]).getParameters().toArray()[0]).getValue()); } catch (Throwable t) { t.printStackTrace(); fail(); } } }
[ "ferret@stormwoods.com" ]
ferret@stormwoods.com
e7e429267ebe6d43ae8ecd17b849862a31b2464f
3c89327b508a182a382014eb5cbaf8aa6ccfcb54
/workspace/GuestBook-v3/GuestBook-v3-portlet/src/main/java/com/liferay/docs/guestbook/model/impl/EntryImpl.java
6ee6ace492340df834a795bffee3d053b7225ff9
[]
no_license
victorherrerocazurro/CursoLiferayEuroHelpFebrero2018
1f61d84ff6d4dada3d2c08f642095a21073a8055
54c2f21a7ff01c139ae5a9a9a617f4c552545753
refs/heads/master
2021-04-30T15:46:24.709582
2018-02-15T12:46:35
2018-02-15T12:46:35
121,247,532
0
0
null
null
null
null
UTF-8
Java
false
false
800
java
package com.liferay.docs.guestbook.model.impl; /** * The extended model implementation for the Entry service. Represents a row in the &quot;GB_Entry&quot; database table, with each column mapped to a property of this class. * * <p> * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link com.liferay.docs.guestbook.model.Entry} interface. * </p> * * @author Brian Wing Shun Chan */ public class EntryImpl extends EntryBaseImpl { /* * NOTE FOR DEVELOPERS: * * Never reference this class directly. All methods that expect a entry model instance should use the {@link com.liferay.docs.guestbook.model.Entry} interface instead. */ public EntryImpl() { } }
[ "victorherrerocazurro@gmail.com" ]
victorherrerocazurro@gmail.com
b350551155e6b22b7822ef770548b3127bd95bcd
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
/Corpus/eclipse.jdt.ui/3750.java
721a9e3fc4651e26342b55dca5875b92ce4efe05
[ "MIT" ]
permissive
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
d3fd21745dfddb2979e8ac262588cfdfe471899f
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
refs/heads/master
2020-03-31T15:52:01.005505
2018-10-01T23:38:50
2018-10-01T23:38:50
152,354,327
1
0
MIT
2018-10-10T02:57:02
2018-10-10T02:57:02
null
UTF-8
Java
false
false
2,861
java
/******************************************************************************* * Copyright (c) 2000, 2011 IBM Corporation and others. * 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: * Robert M. Fuhrer (rfuhrer@watson.ibm.com), IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.internal.corext.refactoring.typeconstraints.typesets; import java.util.Iterator; import org.eclipse.jdt.internal.corext.refactoring.typeconstraints.types.TType; public class EmptyTypeSet extends TypeSet { EmptyTypeSet(TypeSetEnvironment typeSetEnvironment) { super(typeSetEnvironment); } @Override public boolean isUniverse() { return false; } @Override public TypeSet makeClone() { return this; } @Override protected TypeSet specialCasesIntersectedWith(TypeSet s2) { return this; } @Override public boolean isEmpty() { return true; } @Override public TypeSet upperBound() { return this; } @Override public TypeSet lowerBound() { return this; } @Override public boolean hasUniqueLowerBound() { return false; } @Override public boolean hasUniqueUpperBound() { return false; } @Override public TType uniqueLowerBound() { return null; } @Override public TType uniqueUpperBound() { return null; } @Override public boolean contains(TType t) { return false; } @Override public boolean containsAll(TypeSet s) { return false; } @Override public Iterator<TType> iterator() { return new Iterator<TType>() { @Override public void remove() { //do nothing } @Override public boolean hasNext() { return false; } @Override public TType next() { return null; } }; } @Override public boolean isSingleton() { return false; } @Override public TType anyMember() { return null; } @Override public String toString() { //$NON-NLS-1$ return "{ }"; } @Override public EnumeratedTypeSet enumerate() { return new EnumeratedTypeSet(getTypeSetEnvironment()); } @Override public boolean equals(Object obj) { return obj instanceof EmptyTypeSet; } @Override public int hashCode() { return 42; } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
e962bb12117585de443e9a4a450cd25df2212b89
e9466a0d2020c5293b48ca615a98d59500fca730
/generatedCode/digitalbuildings-RDF4J-java/src/main/java/www/google/com/digitalbuildings/_0_0_1/hvac/ISfvsc2x.java
a7960587941504a26e992ad2b73a42b69f2467fe
[]
no_license
charbull/OLGA-GeneratedCode-DigitalBuildingsOntology
fa9dafd4111f80b171810cebc9385d5171b3ec56
bf7018f4dd621f5463b3da67da41783caba3a4fb
refs/heads/master
2022-11-22T07:55:00.842988
2020-07-20T21:38:04
2020-07-20T21:38:04
281,220,093
1
0
null
2020-07-20T21:38:06
2020-07-20T20:33:52
Java
UTF-8
Java
false
false
4,297
java
package www.google.com.digitalbuildings._0_0_1.hvac; import org.eclipse.rdf4j.model.IRI; import java.util.Set; import www.google.com.digitalbuildings._0_0_1.IOperational; import www.google.com.digitalbuildings._0_0_1.fields.ISupply_fan_run_command_2; import www.google.com.digitalbuildings._0_0_1.fields.ISupply_fan_speed_percentage_command_1; import www.google.com.digitalbuildings._0_0_1.fields.ISupply_fan_speed_percentage_command_2; import www.google.com.digitalbuildings._0_0_1.fields.ISupply_fan_run_command_1; import www.google.com.digitalbuildings._0_0_1.fields.ISupply_fan_power_sensor_2; import www.google.com.digitalbuildings._0_0_1.fields.ISupply_fan_power_sensor_1; import www.google.com.digitalbuildings._0_0_1.fields.ISupply_fan_current_sensor_1; import www.google.com.digitalbuildings._0_0_1.fields.ISupply_fan_current_sensor_2; import www.google.com.digitalbuildings._0_0_1.fields.ISupply_fan_run_status_2; import www.google.com.digitalbuildings._0_0_1.fields.ISupply_fan_run_status_1; import www.google.com.digitalbuildings._0_0_1.fields.ISupply_fan_speed_frequency_sensor_1; import www.google.com.digitalbuildings._0_0_1.fields.ISupply_fan_speed_frequency_sensor_2; import www.google.com.digitalbuildings._0_0_1.fields.ISupply_fan_speed_percentage_sensor_2; import www.google.com.digitalbuildings._0_0_1.fields.ISupply_fan_speed_percentage_sensor_1; /** * Class Sfvsc2x * Supply fan variable speed control with feedback and sensoring with two fans. */ public interface ISfvsc2x extends IFunctionality, IOperational{ public IRI iri(); public void addUsesOptionalsSupply_fan_current_sensor_1 (ISupply_fan_current_sensor_1 parameter); public Set<ISupply_fan_current_sensor_1> getUsesOptionalsSupply_fan_current_sensor_1(); public void addUsesOptionalsSupply_fan_current_sensor_2 (ISupply_fan_current_sensor_2 parameter); public Set<ISupply_fan_current_sensor_2> getUsesOptionalsSupply_fan_current_sensor_2(); public void addUsesOptionalsSupply_fan_power_sensor_1 (ISupply_fan_power_sensor_1 parameter); public Set<ISupply_fan_power_sensor_1> getUsesOptionalsSupply_fan_power_sensor_1(); public void addUsesOptionalsSupply_fan_power_sensor_2 (ISupply_fan_power_sensor_2 parameter); public Set<ISupply_fan_power_sensor_2> getUsesOptionalsSupply_fan_power_sensor_2(); public void addUsesOptionalsSupply_fan_speed_frequency_sensor_1 (ISupply_fan_speed_frequency_sensor_1 parameter); public Set<ISupply_fan_speed_frequency_sensor_1> getUsesOptionalsSupply_fan_speed_frequency_sensor_1(); public void addUsesOptionalsSupply_fan_speed_frequency_sensor_2 (ISupply_fan_speed_frequency_sensor_2 parameter); public Set<ISupply_fan_speed_frequency_sensor_2> getUsesOptionalsSupply_fan_speed_frequency_sensor_2(); public void addUsesOptionalsSupply_fan_speed_percentage_sensor_1 (ISupply_fan_speed_percentage_sensor_1 parameter); public Set<ISupply_fan_speed_percentage_sensor_1> getUsesOptionalsSupply_fan_speed_percentage_sensor_1(); public void addUsesOptionalsSupply_fan_speed_percentage_sensor_2 (ISupply_fan_speed_percentage_sensor_2 parameter); public Set<ISupply_fan_speed_percentage_sensor_2> getUsesOptionalsSupply_fan_speed_percentage_sensor_2(); public void addUsesSupply_fan_run_command_1 (ISupply_fan_run_command_1 parameter); public Set<ISupply_fan_run_command_1> getUsesSupply_fan_run_command_1(); public void addUsesSupply_fan_run_command_2 (ISupply_fan_run_command_2 parameter); public Set<ISupply_fan_run_command_2> getUsesSupply_fan_run_command_2(); public void addUsesSupply_fan_run_status_1 (ISupply_fan_run_status_1 parameter); public Set<ISupply_fan_run_status_1> getUsesSupply_fan_run_status_1(); public void addUsesSupply_fan_run_status_2 (ISupply_fan_run_status_2 parameter); public Set<ISupply_fan_run_status_2> getUsesSupply_fan_run_status_2(); public void addUsesSupply_fan_speed_percentage_command_1 (ISupply_fan_speed_percentage_command_1 parameter); public Set<ISupply_fan_speed_percentage_command_1> getUsesSupply_fan_speed_percentage_command_1(); public void addUsesSupply_fan_speed_percentage_command_2 (ISupply_fan_speed_percentage_command_2 parameter); public Set<ISupply_fan_speed_percentage_command_2> getUsesSupply_fan_speed_percentage_command_2(); }
[ "charbel.kaed@outlook.com" ]
charbel.kaed@outlook.com
d18d6420ac3340719f705b3b8662e8e56c970a05
289635fe5bbc645dd6cbdf4d6ee1948a47f7d220
/Chapter09/microservices/product-composite-service/src/main/java/se/magnus/microservices/composite/product/ProductCompositeServiceApplication.java
05344dcabe10f11b86f24246a6c11f87582ca262
[ "MIT" ]
permissive
yyi/Microservices-with-Spring-Boot-and-Spring-Cloud-2E
8f6c787e604875a7d879c67b9a370fd7c7bceb00
7f22d63dd4676205cf0f171206b4a6140a49eb21
refs/heads/main
2023-07-04T14:38:53.731559
2021-08-10T08:42:03
2021-08-10T08:42:03
390,966,464
0
0
MIT
2021-07-30T07:05:17
2021-07-30T07:05:17
null
UTF-8
Java
false
false
4,196
java
package se.magnus.microservices.composite.product; import io.swagger.v3.oas.models.ExternalDocumentation; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Contact; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; import java.util.LinkedHashMap; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.actuate.health.CompositeReactiveHealthContributor; import org.springframework.boot.actuate.health.ReactiveHealthContributor; import org.springframework.boot.actuate.health.ReactiveHealthIndicator; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.loadbalancer.LoadBalanced; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.scheduler.Scheduler; import reactor.core.scheduler.Schedulers; import se.magnus.microservices.composite.product.services.ProductCompositeIntegration; @SpringBootApplication @ComponentScan("se.magnus") public class ProductCompositeServiceApplication { private static final Logger LOG = LoggerFactory.getLogger(ProductCompositeServiceApplication.class); @Value("${api.common.version}") String apiVersion; @Value("${api.common.title}") String apiTitle; @Value("${api.common.description}") String apiDescription; @Value("${api.common.termsOfService}") String apiTermsOfService; @Value("${api.common.license}") String apiLicense; @Value("${api.common.licenseUrl}") String apiLicenseUrl; @Value("${api.common.externalDocDesc}") String apiExternalDocDesc; @Value("${api.common.externalDocUrl}") String apiExternalDocUrl; @Value("${api.common.contact.name}") String apiContactName; @Value("${api.common.contact.url}") String apiContactUrl; @Value("${api.common.contact.email}") String apiContactEmail; /** * Will exposed on $HOST:$PORT/swagger-ui.html * * @return the common OpenAPI documentation */ @Bean public OpenAPI getOpenApiDocumentation() { return new OpenAPI() .info(new Info().title(apiTitle) .description(apiDescription) .version(apiVersion) .contact(new Contact() .name(apiContactName) .url(apiContactUrl) .email(apiContactEmail)) .termsOfService(apiTermsOfService) .license(new License() .name(apiLicense) .url(apiLicenseUrl))) .externalDocs(new ExternalDocumentation() .description(apiExternalDocDesc) .url(apiExternalDocUrl)); } private final Integer threadPoolSize; private final Integer taskQueueSize; @Autowired public ProductCompositeServiceApplication( @Value("${app.threadPoolSize:10}") Integer threadPoolSize, @Value("${app.taskQueueSize:100}") Integer taskQueueSize ) { this.threadPoolSize = threadPoolSize; this.taskQueueSize = taskQueueSize; } @Bean public Scheduler publishEventScheduler() { LOG.info("Creates a messagingScheduler with connectionPoolSize = {}", threadPoolSize); return Schedulers.newBoundedElastic(threadPoolSize, taskQueueSize, "publish-pool"); } @Autowired ProductCompositeIntegration integration; @Bean ReactiveHealthContributor coreServices() { final Map<String, ReactiveHealthIndicator> registry = new LinkedHashMap<>(); registry.put("product", () -> integration.getProductHealth()); registry.put("recommendation", () -> integration.getRecommendationHealth()); registry.put("review", () -> integration.getReviewHealth()); return CompositeReactiveHealthContributor.fromMap(registry); } @Bean @LoadBalanced public WebClient.Builder loadBalancedWebClientBuilder() { return WebClient.builder(); } public static void main(String[] args) { SpringApplication.run(ProductCompositeServiceApplication.class, args); } }
[ "magnus.larsson@callistaenterprise.se" ]
magnus.larsson@callistaenterprise.se
9d38f86b93c28f0312e85936c92efc6089a6a803
a347be60d574aa24f095b0d83c7ac8835d0271fe
/Part7LeetCode/src/main/java/C09_深度优先搜索/T366_寻找二叉树的叶子节点/Solution.java
237451fe46cc0273bb55fdfdf9a36288d9b8c0b5
[ "LicenseRef-scancode-mulanpsl-1.0-en", "MulanPSL-1.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
fanll4523/algorithms
7f2f4a2be499b13345531a700d917ec10e961ad7
2c274d785adc75c0952a79cbdd69304452e6d7c1
refs/heads/master
2023-08-15T23:40:17.832882
2021-10-24T04:42:47
2021-10-24T04:42:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,083
java
/*********************************************************** * @Description : 366. 寻找二叉树的叶子节点 * https://leetcode-cn.com/problems/find-leaves-of-binary-tree/ * @author : 梁山广(Liang Shan Guang) * @date : 2020/4/16 0:01 * @email : liangshanguang2@gmail.com ***********************************************************/ package C09_深度优先搜索.T366_寻找二叉树的叶子节点; /* ----------------------------------- * WARNING: * ----------------------------------- * Your code may fail to compile * because it contains public class * declarations. * To fix this, please remove the * "public" keyword from your class * declarations. */ import C04_二叉树.TreeNode; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ class Solution { /** * DFS回溯过程中删除节点 * * @param root 根节点 * @return 每轮删除的根节点 */ public List<List<Integer>> findLeaves(TreeNode root) { List<List<Integer>> leafsList = new ArrayList<>(); while (root != null) { // 只要root不为null,就一直往下进行 List<Integer> leafs = new ArrayList<>(); root = dfs(root, leafs); leafsList.add(leafs); } return leafsList; } private TreeNode dfs(TreeNode root, List<Integer> leafs) { if (root == null) { return null; } if (root.left == null && root.right == null) { // 到了叶子节点 leafs.add(root.val); // 相当于删除当前节点了 return null; } root.left = dfs(root.left, leafs); root.right = dfs(root.right, leafs); return root; } }
[ "1648266192@qq.com" ]
1648266192@qq.com
a5f30a563fce1ba65ecdd76984ee2da049167f1f
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/java-vertx/generated/src/main/java/org/openapitools/server/api/model/ComDayCqDamCoreImplDamEventPurgeServiceProperties.java
5ddd0d046dda5c07d38421c1310abfc29bd913ff
[ "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
4,774
java
package org.openapitools.server.api.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import org.openapitools.server.api.model.ConfigNodePropertyBoolean; import org.openapitools.server.api.model.ConfigNodePropertyDropDown; import org.openapitools.server.api.model.ConfigNodePropertyInteger; import org.openapitools.server.api.model.ConfigNodePropertyString; @JsonInclude(JsonInclude.Include.NON_NULL) public class ComDayCqDamCoreImplDamEventPurgeServiceProperties { private ConfigNodePropertyString schedulerExpression = null; private ConfigNodePropertyInteger maxSavedActivities = null; private ConfigNodePropertyInteger saveInterval = null; private ConfigNodePropertyBoolean enableActivityPurge = null; private ConfigNodePropertyDropDown eventTypes = null; public ComDayCqDamCoreImplDamEventPurgeServiceProperties () { } public ComDayCqDamCoreImplDamEventPurgeServiceProperties (ConfigNodePropertyString schedulerExpression, ConfigNodePropertyInteger maxSavedActivities, ConfigNodePropertyInteger saveInterval, ConfigNodePropertyBoolean enableActivityPurge, ConfigNodePropertyDropDown eventTypes) { this.schedulerExpression = schedulerExpression; this.maxSavedActivities = maxSavedActivities; this.saveInterval = saveInterval; this.enableActivityPurge = enableActivityPurge; this.eventTypes = eventTypes; } @JsonProperty("scheduler.expression") public ConfigNodePropertyString getSchedulerExpression() { return schedulerExpression; } public void setSchedulerExpression(ConfigNodePropertyString schedulerExpression) { this.schedulerExpression = schedulerExpression; } @JsonProperty("maxSavedActivities") public ConfigNodePropertyInteger getMaxSavedActivities() { return maxSavedActivities; } public void setMaxSavedActivities(ConfigNodePropertyInteger maxSavedActivities) { this.maxSavedActivities = maxSavedActivities; } @JsonProperty("saveInterval") public ConfigNodePropertyInteger getSaveInterval() { return saveInterval; } public void setSaveInterval(ConfigNodePropertyInteger saveInterval) { this.saveInterval = saveInterval; } @JsonProperty("enableActivityPurge") public ConfigNodePropertyBoolean getEnableActivityPurge() { return enableActivityPurge; } public void setEnableActivityPurge(ConfigNodePropertyBoolean enableActivityPurge) { this.enableActivityPurge = enableActivityPurge; } @JsonProperty("eventTypes") public ConfigNodePropertyDropDown getEventTypes() { return eventTypes; } public void setEventTypes(ConfigNodePropertyDropDown eventTypes) { this.eventTypes = eventTypes; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ComDayCqDamCoreImplDamEventPurgeServiceProperties comDayCqDamCoreImplDamEventPurgeServiceProperties = (ComDayCqDamCoreImplDamEventPurgeServiceProperties) o; return Objects.equals(schedulerExpression, comDayCqDamCoreImplDamEventPurgeServiceProperties.schedulerExpression) && Objects.equals(maxSavedActivities, comDayCqDamCoreImplDamEventPurgeServiceProperties.maxSavedActivities) && Objects.equals(saveInterval, comDayCqDamCoreImplDamEventPurgeServiceProperties.saveInterval) && Objects.equals(enableActivityPurge, comDayCqDamCoreImplDamEventPurgeServiceProperties.enableActivityPurge) && Objects.equals(eventTypes, comDayCqDamCoreImplDamEventPurgeServiceProperties.eventTypes); } @Override public int hashCode() { return Objects.hash(schedulerExpression, maxSavedActivities, saveInterval, enableActivityPurge, eventTypes); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ComDayCqDamCoreImplDamEventPurgeServiceProperties {\n"); sb.append(" schedulerExpression: ").append(toIndentedString(schedulerExpression)).append("\n"); sb.append(" maxSavedActivities: ").append(toIndentedString(maxSavedActivities)).append("\n"); sb.append(" saveInterval: ").append(toIndentedString(saveInterval)).append("\n"); sb.append(" enableActivityPurge: ").append(toIndentedString(enableActivityPurge)).append("\n"); sb.append(" eventTypes: ").append(toIndentedString(eventTypes)).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(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
50f5b53a4b63035fe232bf54057fe36d344c7182
243eaf02e124f89a21c5d5afa707db40feda5144
/src/unk/com/tencent/mm/plugin/backup/ui/br.java
49b494966f567d1bd025173ad0dcefa1f6d409c1
[]
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
871
java
package unk.com.tencent.mm.plugin.backup.ui; import android.content.Intent; import android.view.View; import android.view.View.OnClickListener; import com.tencent.mm.plugin.backup.model.d; final class br implements View.OnClickListener { br(BakchatSelcetCryptUI paramBakchatSelcetCryptUI) { } public final void onClick(View paramView) { d.F(null); Intent localIntent = new Intent(this.aoT, BakChatUploadingUI.class); localIntent.putStringArrayListExtra("bak_usernames_list", BakchatSelcetCryptUI.a(this.aoT)); localIntent.putExtra("isSelectAll", this.aoT.getIntent().getBooleanExtra("isSelectAll", false)); this.aoT.startActivity(localIntent); this.aoT.finish(); } } /* Location: /home/danghvu/0day/WeChat/WeChat_4.5_dex2jar.jar * Qualified Name: com.tencent.mm.plugin.backup.ui.br * JD-Core Version: 0.6.2 */
[ "danghvu@gmail.com" ]
danghvu@gmail.com
54e20e089f44413172d9a1de2a0e81c67db355f9
58da62dfc6e145a3c836a6be8ee11e4b69ff1878
/src/main/java/com/alipay/api/domain/KbdishGroupSimplifyInfo.java
13345fe4f8bf63530ff8d4f8e72bde04a64cb347
[ "Apache-2.0" ]
permissive
zhoujiangzi/alipay-sdk-java-all
00ef60ed9501c74d337eb582cdc9606159a49837
560d30b6817a590fd9d2c53c3cecac0dca4449b3
refs/heads/master
2022-12-26T00:27:31.553428
2020-09-07T03:39:05
2020-09-07T03:39:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,455
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 菜品简化接口套餐组信息 * * @author auto create * @since 1.0, 2020-08-21 11:43:34 */ public class KbdishGroupSimplifyInfo extends AlipayObject { private static final long serialVersionUID = 3227841291161743658L; /** * 套餐组明细 */ @ApiListField("group_detail_list") @ApiField("kbdish_group_detail_simplify_info") private List<KbdishGroupDetailSimplifyInfo> groupDetailList; /** * 套餐组规则,fix:是否固定套餐,true:是;false:不是。max_count:最大可选数量;min_count:最小可选数量。 */ @ApiField("group_rule") private String groupRule; /** * 套餐组名称,固定组可不传 */ @ApiField("name") private String name; public List<KbdishGroupDetailSimplifyInfo> getGroupDetailList() { return this.groupDetailList; } public void setGroupDetailList(List<KbdishGroupDetailSimplifyInfo> groupDetailList) { this.groupDetailList = groupDetailList; } public String getGroupRule() { return this.groupRule; } public void setGroupRule(String groupRule) { this.groupRule = groupRule; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
a3fb66d11c4cc9bb8992709db5f35ba332848a25
d2b6cb18a365c8e5ab6d15bc7640bec7f25765d1
/src/main/java/com/innee/czyhInterface/util/publicImage/happydns/util/BitSet.java
4248489f5fff9e7da251ac81dc13f8a2ea03f4fd
[]
no_license
qinkangkang/czyhInterface
4da328c307ac16b00f7e2b30ca1c520aa403241a
6098e9a518557bb9ac899dadde464aa575478786
refs/heads/master
2021-07-25T21:05:39.105492
2017-11-07T08:42:23
2017-11-07T08:42:23
109,808,532
1
1
null
null
null
null
UTF-8
Java
false
false
1,266
java
package com.innee.czyhInterface.util.publicImage.happydns.util; /** * Created by bailong on 15/6/16. */ public final class BitSet { private int set; public BitSet() { set = 0; } public BitSet set(int bitIndex) { set |= (1 << bitIndex); return this; } public boolean isSet(int index) { return (set & (1 << index)) != 0; } public boolean noneIsSet(int index) { return set == 0; } // 30 bits public boolean allIsSet(int index) { return (set + 1) == (1 << index); } public int leadingZeros() { int y; int n = 32; y = set >> 16; if (y != 0) { n = n - 16; set = y; } y = set >> 8; if (y != 0) { n = n - 8; set = y; } y = set >> 4; if (y != 0) { n = n - 4; set = y; } y = set >> 2; if (y != 0) { n = n - 2; set = y; } y = set >> 1; if (y != 0) { return n - 2; } return n - set; } public BitSet clear() { set = 0; return this; } public int value() { return set; } }
[ "shemar.qin@sdeals.me" ]
shemar.qin@sdeals.me
bc82136d3e80c2e0e7d85860e9c0817739a6fdba
c16ea32a4cddb6b63ad3bacce3c6db0259d2bacd
/google/ads/googleads/v4/googleads-java/gapic-googleads-java/src/test/java/com/google/ads/googleads/v4/services/MockAdParameterServiceImpl.java
7edf3845e71b921a827dd34ff55889cfa4059bd5
[ "Apache-2.0" ]
permissive
dizcology/googleapis-gen
74a72b655fba2565233e5a289cfaea6dc7b91e1a
478f36572d7bcf1dc66038d0e76b9b3fa2abae63
refs/heads/master
2023-06-04T15:51:18.380826
2021-06-16T20:42:38
2021-06-16T20:42:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,579
java
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.ads.googleads.v4.services; import com.google.ads.googleads.v4.resources.AdParameter; import com.google.ads.googleads.v4.services.AdParameterServiceGrpc.AdParameterServiceImplBase; import com.google.api.core.BetaApi; import com.google.protobuf.AbstractMessage; import io.grpc.stub.StreamObserver; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; import javax.annotation.Generated; @BetaApi @Generated("by gapic-generator-java") public class MockAdParameterServiceImpl extends AdParameterServiceImplBase { private List<AbstractMessage> requests; private Queue<Object> responses; public MockAdParameterServiceImpl() { requests = new ArrayList<>(); responses = new LinkedList<>(); } public List<AbstractMessage> getRequests() { return requests; } public void addResponse(AbstractMessage response) { responses.add(response); } public void setResponses(List<AbstractMessage> responses) { this.responses = new LinkedList<Object>(responses); } public void addException(Exception exception) { responses.add(exception); } public void reset() { requests = new ArrayList<>(); responses = new LinkedList<>(); } @Override public void getAdParameter( GetAdParameterRequest request, StreamObserver<AdParameter> responseObserver) { Object response = responses.poll(); if (response instanceof AdParameter) { requests.add(request); responseObserver.onNext(((AdParameter) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { responseObserver.onError( new IllegalArgumentException( String.format( "Unrecognized response type %s for method GetAdParameter, expected %s or %s", response == null ? "null" : response.getClass().getName(), AdParameter.class.getName(), Exception.class.getName()))); } } @Override public void mutateAdParameters( MutateAdParametersRequest request, StreamObserver<MutateAdParametersResponse> responseObserver) { Object response = responses.poll(); if (response instanceof MutateAdParametersResponse) { requests.add(request); responseObserver.onNext(((MutateAdParametersResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { responseObserver.onError( new IllegalArgumentException( String.format( "Unrecognized response type %s for method MutateAdParameters, expected %s or %s", response == null ? "null" : response.getClass().getName(), MutateAdParametersResponse.class.getName(), Exception.class.getName()))); } } }
[ "bazel-bot-development[bot]@users.noreply.github.com" ]
bazel-bot-development[bot]@users.noreply.github.com
9a5f18e4100766c2e24720600d866298155c101f
c81340901371a2026dc26aed82bfbd2d0a7e8485
/src/main/java/com/eu/habbo/plugin/events/roomunit/RoomUnitLookAtPointEvent.java
3fbc0e2603a68c18240cc5db05127f0d8312d915
[ "Apache-2.0" ]
permissive
Re4yz/ArcturusEmulator
f9cbe520809eb36fc370a1d285182e083dfbb4ef
a039967aa27e5340ac2997822142f4eaa9caafe4
refs/heads/master
2023-04-19T03:49:05.138800
2021-05-05T20:35:20
2021-05-05T20:35:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
662
java
package com.eu.habbo.plugin.events.roomunit; import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.rooms.RoomTile; import com.eu.habbo.habbohotel.rooms.RoomUnit; public class RoomUnitLookAtPointEvent extends RoomUnitEvent { /** * The tile to look at. */ public final RoomTile location; /** * @param room The Room this event applies to. * @param roomUnit The RoomUnit this event applies to. * @param location The tile to look at. */ public RoomUnitLookAtPointEvent(Room room, RoomUnit roomUnit, RoomTile location) { super(room, roomUnit); this.location = location; } }
[ "orracosta@icloud.com" ]
orracosta@icloud.com
7b6658479531325394227d802f8ee8eb6e7f3e1e
367f8bc0eddec958ca67b253b5b6ccde167ba980
/benchmarks/github/BluetoothController.java
4b09edecaf79cc2340506bb42872c21e52c29d71
[]
no_license
lmpick/synonym
bafc6c165a79c3fac4d8d5558a076a5b0587bdb8
44cd2270ba43f9793dd6aba6b7a602dab6230341
refs/heads/master
2020-03-20T20:15:31.458764
2018-12-15T16:31:02
2018-12-15T16:31:02
137,677,878
0
0
null
null
null
null
UTF-8
Java
false
false
2,394
java
/* ./android-platform_frameworks_base-adcb47a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothController.java */ /* * Copyright (C) 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. */ package com.android.systemui.statusbar.policy; import java.util.Set; public interface BluetoothController { void addStateChangedCallback(Callback callback); void removeStateChangedCallback(Callback callback); boolean isBluetoothSupported(); boolean isBluetoothEnabled(); boolean isBluetoothConnected(); boolean isBluetoothConnecting(); String getLastDeviceName(); void setBluetoothEnabled(boolean enabled); Set<PairedDevice> getPairedDevices(); void connect(PairedDevice device); void disconnect(PairedDevice device); public interface Callback { void onBluetoothStateChange(boolean enabled, boolean connecting); void onBluetoothPairedDevicesChanged(); } public static final class PairedDevice implements Comparable<PairedDevice> { public static int STATE_DISCONNECTED = 0; public static int STATE_CONNECTING = 1; public static int STATE_CONNECTED = 2; public static int STATE_DISCONNECTING = 3; public String id; public String name; public int state = STATE_DISCONNECTED; public Object tag; public static String stateToString(int state) { if (state == STATE_DISCONNECTED) return "STATE_DISCONNECTED"; if (state == STATE_CONNECTING) return "STATE_CONNECTING"; if (state == STATE_CONNECTED) return "STATE_CONNECTED"; if (state == STATE_DISCONNECTING) return "STATE_DISCONNECTING"; return "UNKNOWN"; } public int compareTo(PairedDevice another) { return name.compareTo(another.name); } } }
[ "mihirthegenius@gmail.com" ]
mihirthegenius@gmail.com
3cc45e579b2a16b817e902f08376d4a8f856af19
2b0694f0563192e2d148d130164e94faf3b4e12f
/Android移动开发案例详解/ch04/contact/src/com/xmobileapp/contact/DBHelper.java
acf474c9f2af5f2acd1779852af093b0fa9b0ee0
[]
no_license
bxh7425014/BookCode
4757956275cf540e9996b9064d981f6da75c9602
8996b36e689861d55662d15c5db8b0eb498c864b
refs/heads/master
2020-05-23T00:48:51.430340
2017-02-06T01:04:25
2017-02-06T01:04:25
84,735,079
9
3
null
null
null
null
GB18030
Java
false
false
1,903
java
/* * [程序名称] Android 通讯录 * [作者] xmobileapp团队 * [参考资料] Google Android Samples * [开源协议] Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) * * 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.xmobileapp.contact; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class DBHelper extends SQLiteOpenHelper { public static final String DATABASE_NAME = "gcontacts.db"; public static final int DATABASE_VERSION = 2; public static final String CONTACTS_TABLE = "contacts"; //创建数据库 private static final String DATABASE_CREATE = "CREATE TABLE " + CONTACTS_TABLE +" (" + ContactColumn._ID+" integer primary key autoincrement," + ContactColumn.NAME+" text," + ContactColumn.MOBILE+" text," + ContactColumn.EMAIL+" text," + ContactColumn.CREATED+" long," + ContactColumn.MODIFIED+" long);"; public DBHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { db.execSQL(DATABASE_CREATE); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL("DROP TABLE IF EXISTS " + CONTACTS_TABLE); onCreate(db); } }
[ "bxh7425014@163.com" ]
bxh7425014@163.com
581fbc9c2e6d3f963d054ff81378e890603ca0c3
ca00ce97779e7acac14b5bc54914014d58605ac4
/kuaihuo-parent/puhui_mobile/src/main/java/com/alqsoft/rpc/mobile/RpcIndustryAssociationService.java
f22120737a2d22d25b4f34b4f572477b7746e827
[]
no_license
sengeiou/project-3
15d384b4dee2f8c119af120e0971bc63c27208a3
4499b73e1bab58e895100ff1f53ad544a2a846a5
refs/heads/master
2023-03-15T12:39:44.199265
2017-11-16T03:41:51
2017-11-16T03:41:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
203
java
package com.alqsoft.rpc.mobile; /** * Date: 2017年3月15日 14:50:41 <br/> * @author dinglanlan * @version 行业协会 * @see */ public interface RpcIndustryAssociationService { }
[ "794020926@qq.com" ]
794020926@qq.com
9b9706a514466737dc271c1d7348c85dff175769
3fd781ff7adda1acd4eb5a7c64ffc805ddaf8853
/business/web/src/main/java/com/jlkj/web/shopnew/Application.java
99e42dc6eba70c5dfc4ba0ff2c654cad52079fd6
[]
no_license
OrmFor/springbootdemo
c597fad5c46b06f724dc9b8118aa07b26bc0e258
2f5f6d20add35dabd7a1d4ddc888c3ab986d78a7
refs/heads/master
2022-06-24T23:42:06.953174
2019-12-05T04:00:03
2019-12-05T04:00:03
226,011,492
0
1
null
2022-06-21T02:22:57
2019-12-05T03:52:17
Java
UTF-8
Java
false
false
748
java
package com.jlkj.web.shopnew; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportResource; import org.springframework.transaction.annotation.EnableTransactionManagement; @EnableAutoConfiguration @Configuration @ComponentScan(basePackages = {"com.jlkj.web.shopnew"}) @ImportResource(locations = {"classpath*:spring-common.xml"}) @EnableTransactionManagement public class Application { public static void main(String[] args) throws Exception { SpringApplication.run(Application.class, args); } }
[ "34675763+OrmFor@users.noreply.github.com" ]
34675763+OrmFor@users.noreply.github.com
c2c2d0e835b743f64240e2a483acda9fc7f9dfba
47e3740b9ec46637d820e981053a51745dc66b73
/BprsUi/BprsCommon/src/org/simbiosis/ui/bprs/common/client/handler/GetSaving.java
73ab891ae3b5d32ab387fedc53318ba54d3299bf
[]
no_license
simbiosis1/MicrobankApp
4051a30d9147085df905b9105dc6669e9aa2b365
7d9ac104893985aa0e6c39b850a51b360852ff3c
refs/heads/master
2020-06-04T22:39:58.886792
2015-07-21T00:50:01
2015-07-21T00:50:01
33,455,226
0
1
null
null
null
null
UTF-8
Java
false
false
953
java
package org.simbiosis.ui.bprs.common.client.handler; import org.simbiosis.ui.bprs.common.client.rpc.MicBankService; import org.simbiosis.ui.bprs.common.client.rpc.MicBankServiceAsync; import org.simbiosis.ui.bprs.common.shared.SavingDv; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.rpc.AsyncCallback; public class GetSaving { private final MicBankServiceAsync koperasiService = GWT .create(MicBankService.class); GetSavingHandler handler; public GetSaving(GetSavingHandler handler) { this.handler = handler; } public void go(Long id) { koperasiService.getSaving(id, new AsyncCallback<SavingDv>() { @Override public void onFailure(Throwable caught) { handler.hideLoading(); Window.alert("Error : getSaving"); } @Override public void onSuccess(SavingDv savingDv) { handler.hideLoading(); handler.showSaving(savingDv); } }); } }
[ "iwanaf@gmail.com" ]
iwanaf@gmail.com
34654103a8cb03e28b759f7f148dfe04ff32ed3a
cc42bdfc3e8e4ef5bb04910b8fa7f7cfb982c3f4
/java/tutorial/src/main/java/bridge/RedCircle.java
a6567657b22d893622c72582195fb32dcd1ac972
[]
no_license
zacscoding/design-pattern
0be90fbcba7b89cb2d28a13494a8c24d1cbb6a97
892463afd1bc989c09f889df9d232397a9cda6e1
refs/heads/master
2020-03-13T22:53:36.766773
2019-01-22T16:20:40
2019-01-22T16:20:40
131,168,406
0
0
null
null
null
null
UTF-8
Java
false
false
370
java
package bridge; /** * concrete bridge implementer classes implementing DrawAPI * * @author zaccoding * @date 2017. 8. 28. */ public class RedCircle implements DrawAPI { @Override public void drawCircle(int radius, int x, int y) { System.out.println("Drawing Circle [ color : red, radius : " + radius + ", x : " + x + ", y : " + y + " ]"); } }
[ "zaccoding725@gmail.com" ]
zaccoding725@gmail.com
e4ace89bd8c6338b9dad924624f55f10e99f04d8
7f8b19cf613c3cb2af24794a6945e4d65f6e66a5
/src/main/java/ci/dcg/visionzero/entreprise/EntrepriseRepository.java
b12798af476d435ccb7777ec7542ceb6c094bc58
[]
no_license
syliGaye/visionzero
db714bd73199d975657d4225fc4a06afca3ab92e
afbf5c1fe82d9bb914a63f0c0164b3a284ecf7cb
refs/heads/master
2021-08-07T15:55:43.827878
2021-07-01T09:11:24
2021-07-01T09:11:24
174,563,135
0
0
null
null
null
null
UTF-8
Java
false
false
2,184
java
package ci.dcg.visionzero.entreprise; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import java.util.List; public interface EntrepriseRepository extends JpaRepository<Entreprise, String> { @Query("SELECT e FROM Entreprise e WHERE e.nomEntreprise = :nomEntreprise") Entreprise findByNomEntreprise(@Param("nomEntreprise") String s); @Query("SELECT e FROM Entreprise e WHERE e.pays.idPays = :codePays") List<Entreprise> findAllByPays(@Param("codePays") String s); @Query("SELECT e FROM Entreprise e WHERE e.raisonSociale.idRaisonSociale = :codeRaisonSociale") List<Entreprise> findAllByRaisonSociale(@Param("codeRaisonSociale") String s); @Query("SELECT e FROM Entreprise e WHERE e.secteurActivite.idSecteurActivite = :codeSecteurActivite") List<Entreprise> findAllBySecteurActivite(@Param("codeSecteurActivite") String s); @Query("SELECT e FROM Entreprise e WHERE e.secteurActivite.idSecteurActivite = :codeSecteurActivite AND e.pays.idPays = :codePays") List<Entreprise> findAllBySecteurActiviteAndPays(@Param("codeSecteurActivite") String s1, @Param("codePays") String s2); @Query("SELECT e FROM Entreprise e WHERE e.secteurActivite.idSecteurActivite = :codeSecteurActivite AND e.raisonSociale.idRaisonSociale = :codeRaisonSociale") List<Entreprise> findAllBySecteurActiviteAndRaisonSociale(@Param("codeSecteurActivite") String s1, @Param("codeRaisonSociale") String s2); @Query("SELECT e FROM Entreprise e WHERE e.raisonSociale.idRaisonSociale = :codeRaisonSociale AND e.pays.idPays = :codePays") List<Entreprise> findAllByRaisonSocialeAndPays(@Param("codeRaisonSociale") String s1, @Param("codePays") String s2); @Query("SELECT e FROM Entreprise e WHERE e.secteurActivite.idSecteurActivite = :codeSecteurActivite AND e.raisonSociale.idRaisonSociale = :codeRaisonSociale AND e.pays.idPays = :codePays") List<Entreprise> findAllBySecteurActiviteAndRaisonSocialeAndPays(@Param("codeSecteurActivite") String s1, @Param("codeRaisonSociale") String s2, @Param("codePays") String s3); }
[ "sylvestregaye@gmail.com" ]
sylvestregaye@gmail.com
027195e63c9ef6ed050383dcd9b9334d28ef9de5
364c1c9102ffcbbdeb97c2c142302715d0ea5ce4
/src/concurrency/component/CarBuilder.java
cb87a9dad74cd488da7642b8914e143701fdcbfc
[]
no_license
haoziapple/java_thinking
a10d89ec1819fa1cdbb336923bc295314b85b357
e412349bf25235ef0d6ce97bde49d60f860873af
refs/heads/master
2020-12-29T02:37:37.545371
2017-01-19T15:14:10
2017-01-19T15:14:10
53,108,913
1
0
null
null
null
null
UTF-8
Java
false
false
6,835
java
/** * Copyright (C) 2016 FuZhong * * * @className:concurrency.component.CarBuilder * @description:TODO * @date:2016-4-1 上午10:13:18 * @version:v1.0.0 * @author:WangHao * * Modification History: * Date Author Version Description * ----------------------------------------------------------------- * 2016-4-1 WangHao v1.0.0 create * * */ package concurrency.component; import java.util.HashSet; import java.util.Set; import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; //A complex example of tasks working together. class Car { private final int id; private boolean engine = false, driveTrain = false, wheels = false; public Car(int idn) { id = idn; } // Empty Car object public Car() { id = -1; } public synchronized int getId() { return id; } public synchronized void addEngine() { engine = true; } public synchronized void addDriveTrain() { driveTrain = true; } public synchronized void addWheels() { wheels = true; } public synchronized String toString() { return "Car " + id + " [" + " engine: " + engine + " driveTrain: " + driveTrain + " wheels: " + wheels + " ]"; } } @SuppressWarnings("serial") class CarQueue extends LinkedBlockingQueue<Car> { } class ChassisBuilder implements Runnable { private CarQueue carQueue; private int counter = 0; public ChassisBuilder(CarQueue cq) { carQueue = cq; } @Override public void run() { try { while (!Thread.interrupted()) { TimeUnit.MILLISECONDS.sleep(500); // Make chassis: Car c = new Car(counter++); System.out.println("ChassisBuilder created " + c); // Insert into queue carQueue.put(c); } } catch (InterruptedException e) { System.out.println("Interrupted: ChassisBuilder"); } System.out.println("ChassisBuilder off"); } } class Assembler implements Runnable { private CarQueue chassisQueue, finishingQueue; private Car car; private CyclicBarrier barrier = new CyclicBarrier(4); private RobotPool robotPool; public Assembler(CarQueue cq, CarQueue fq, RobotPool rp) { chassisQueue = cq; finishingQueue = fq; robotPool = rp; } public Car car() { return car; } public CyclicBarrier barrier() { return barrier; } @Override public void run() { try { while (!Thread.interrupted()) { // Blocks until chassis is available car = chassisQueue.take(); // Hire robots to perform work: robotPool.hire(EngineRobot.class, this); robotPool.hire(DriveTrainRobot.class, this); robotPool.hire(WheelRobot.class, this); barrier.await(); // Until the robots finish // Put car into finishQueue for further work finishingQueue.put(car); } } catch (InterruptedException e) { System.out.println("Exiting Assembler via interrupt"); } catch (BrokenBarrierException e) { // This one we want to know about throw new RuntimeException(e); } System.out.println("Assembler off"); } } abstract class Robot implements Runnable { private RobotPool pool; public Robot(RobotPool p) { pool = p; } protected Assembler assembler; public Robot assignAssembler(Assembler assembler) { this.assembler = assembler; return this; } private boolean engage = false; public synchronized void engage() { engage = true; notifyAll(); } // The part of run() that's different for each robot: abstract protected void performService(); public void run() { try { powerDown();// Wait until needed while (!Thread.interrupted()) { performService(); assembler.barrier().await(); // Synchronize // We're done with that job... powerDown(); } } catch (InterruptedException e) { System.out.println("Exiting " + this + " via interrupt"); } catch (BrokenBarrierException e) { // This one we want to know about throw new RuntimeException(e); } System.out.println(this + " off"); } private synchronized void powerDown() throws InterruptedException { engage = false; assembler = null;// Disconnect from the Assembler // Put ourselves back in the available pool: pool.release(this); while (engage == false) // Power down wait(); } public String toString() { return getClass().getName(); } } class EngineRobot extends Robot { public EngineRobot(RobotPool pool) { super(pool); } @Override protected void performService() { System.out.println(this + " installing engine"); assembler.car().addEngine(); } } class DriveTrainRobot extends Robot { public DriveTrainRobot(RobotPool pool) { super(pool); } @Override protected void performService() { System.out.println(this + " installing DriveTrain"); assembler.car().addDriveTrain(); } } class WheelRobot extends Robot { public WheelRobot(RobotPool pool) { super(pool); } @Override protected void performService() { System.out.println(this + " installing Wheels"); assembler.car().addWheels(); } } class RobotPool { // Quietly prevents identical entries: private Set<Robot> pool = new HashSet<Robot>(); public synchronized void add(Robot r) { pool.add(r); notifyAll(); } public synchronized void hire(Class<? extends Robot> robotType, Assembler d) throws InterruptedException { for (Robot r : pool) if (r.getClass().equals(robotType)) { pool.remove(r); r.assignAssembler(d); r.engage(); // Power it up to do the task return; } wait(); // None available hire(robotType, d);// Try again, recursively } public synchronized void release(Robot r) { add(r); } } class Reporter implements Runnable { private CarQueue carQueue; public Reporter(CarQueue cq) { carQueue = cq; } public void run() { try { while (!Thread.interrupted()) { System.out.println(carQueue.take()); } } catch (InterruptedException e) { System.out.println("Exiting Reporter via interrupt"); } System.out.println("Reporter off"); } } public class CarBuilder { public static void main(String[] args) throws Exception { CarQueue chassisQueue = new CarQueue(), finishingQueue = new CarQueue(); ExecutorService exec = Executors.newCachedThreadPool(); RobotPool robotPool = new RobotPool(); exec.execute(new EngineRobot(robotPool)); exec.execute(new DriveTrainRobot(robotPool)); exec.execute(new WheelRobot(robotPool)); exec.execute(new Assembler(chassisQueue, finishingQueue, robotPool)); exec.execute(new Reporter(finishingQueue)); // Start everything running by producing chassis: exec.execute(new ChassisBuilder(chassisQueue)); TimeUnit.SECONDS.sleep(7); exec.shutdownNow(); } }
[ "haozixiaowang@163.com" ]
haozixiaowang@163.com
5d7f14011529e2919457e3b993b8c72553db1f89
6ef4869c6bc2ce2e77b422242e347819f6a5f665
/devices/google/Pixel 2/29/QPP6.190730.005/src/framework/android/net/ScoredNetwork.java
7faf6964f028c283e6201e0c83514457e92253ff
[]
no_license
hacking-android/frameworks
40e40396bb2edacccabf8a920fa5722b021fb060
943f0b4d46f72532a419fb6171e40d1c93984c8e
refs/heads/master
2020-07-03T19:32:28.876703
2019-08-13T03:31:06
2019-08-13T03:31:06
202,017,534
2
0
null
2019-08-13T03:33:19
2019-08-12T22:19:30
Java
UTF-8
Java
false
false
6,308
java
/* * Decompiled with CFR 0.145. */ package android.net; import android.annotation.SystemApi; import android.net.NetworkKey; import android.net.RssiCurve; import android.os.BaseBundle; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; import java.util.Objects; import java.util.Set; @SystemApi public class ScoredNetwork implements Parcelable { public static final String ATTRIBUTES_KEY_BADGING_CURVE = "android.net.attributes.key.BADGING_CURVE"; public static final String ATTRIBUTES_KEY_HAS_CAPTIVE_PORTAL = "android.net.attributes.key.HAS_CAPTIVE_PORTAL"; public static final String ATTRIBUTES_KEY_RANKING_SCORE_OFFSET = "android.net.attributes.key.RANKING_SCORE_OFFSET"; public static final Parcelable.Creator<ScoredNetwork> CREATOR = new Parcelable.Creator<ScoredNetwork>(){ @Override public ScoredNetwork createFromParcel(Parcel parcel) { return new ScoredNetwork(parcel); } public ScoredNetwork[] newArray(int n) { return new ScoredNetwork[n]; } }; public final Bundle attributes; public final boolean meteredHint; public final NetworkKey networkKey; public final RssiCurve rssiCurve; public ScoredNetwork(NetworkKey networkKey, RssiCurve rssiCurve) { this(networkKey, rssiCurve, false); } public ScoredNetwork(NetworkKey networkKey, RssiCurve rssiCurve, boolean bl) { this(networkKey, rssiCurve, bl, null); } public ScoredNetwork(NetworkKey networkKey, RssiCurve rssiCurve, boolean bl, Bundle bundle) { this.networkKey = networkKey; this.rssiCurve = rssiCurve; this.meteredHint = bl; this.attributes = bundle; } private ScoredNetwork(Parcel parcel) { this.networkKey = NetworkKey.CREATOR.createFromParcel(parcel); byte by = parcel.readByte(); boolean bl = true; this.rssiCurve = by == 1 ? RssiCurve.CREATOR.createFromParcel(parcel) : null; if (parcel.readByte() != 1) { bl = false; } this.meteredHint = bl; this.attributes = parcel.readBundle(); } private boolean bundleEquals(Bundle bundle, Bundle bundle2) { if (bundle == bundle2) { return true; } if (bundle != null && bundle2 != null) { if (bundle.size() != bundle2.size()) { return false; } for (String string2 : bundle.keySet()) { if (Objects.equals(bundle.get(string2), bundle2.get(string2))) continue; return false; } return true; } return false; } public int calculateBadge(int n) { Bundle bundle = this.attributes; if (bundle != null && bundle.containsKey(ATTRIBUTES_KEY_BADGING_CURVE)) { return ((RssiCurve)this.attributes.getParcelable(ATTRIBUTES_KEY_BADGING_CURVE)).lookupScore(n); } return 0; } public int calculateRankingScore(int n) throws UnsupportedOperationException { if (this.hasRankingScore()) { int n2 = 0; Parcelable parcelable = this.attributes; int n3 = 0; if (parcelable != null) { n2 = 0 + ((BaseBundle)((Object)parcelable)).getInt(ATTRIBUTES_KEY_RANKING_SCORE_OFFSET, 0); } n = (parcelable = this.rssiCurve) == null ? n3 : ((RssiCurve)parcelable).lookupScore(n) << 8; try { n2 = Math.addExact(n, n2); return n2; } catch (ArithmeticException arithmeticException) { n = n < 0 ? Integer.MIN_VALUE : Integer.MAX_VALUE; return n; } } throw new UnsupportedOperationException("Either rssiCurve or rankingScoreOffset is required to calculate the ranking score"); } @Override public int describeContents() { return 0; } public boolean equals(Object object) { boolean bl = true; if (this == object) { return true; } if (object != null && this.getClass() == object.getClass()) { object = (ScoredNetwork)object; if (!(Objects.equals(this.networkKey, ((ScoredNetwork)object).networkKey) && Objects.equals(this.rssiCurve, ((ScoredNetwork)object).rssiCurve) && Objects.equals(this.meteredHint, ((ScoredNetwork)object).meteredHint) && this.bundleEquals(this.attributes, ((ScoredNetwork)object).attributes))) { bl = false; } return bl; } return false; } public boolean hasRankingScore() { Bundle bundle; boolean bl = this.rssiCurve != null || (bundle = this.attributes) != null && bundle.containsKey(ATTRIBUTES_KEY_RANKING_SCORE_OFFSET); return bl; } public int hashCode() { return Objects.hash(this.networkKey, this.rssiCurve, this.meteredHint, this.attributes); } public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("ScoredNetwork{networkKey="); stringBuilder.append(this.networkKey); stringBuilder.append(", rssiCurve="); stringBuilder.append(this.rssiCurve); stringBuilder.append(", meteredHint="); stringBuilder.append(this.meteredHint); stringBuilder = new StringBuilder(stringBuilder.toString()); Object object = this.attributes; if (object != null && !((BaseBundle)object).isEmpty()) { object = new StringBuilder(); ((StringBuilder)object).append(", attributes="); ((StringBuilder)object).append(this.attributes); stringBuilder.append(((StringBuilder)object).toString()); } stringBuilder.append('}'); return stringBuilder.toString(); } @Override public void writeToParcel(Parcel parcel, int n) { this.networkKey.writeToParcel(parcel, n); if (this.rssiCurve != null) { parcel.writeByte((byte)1); this.rssiCurve.writeToParcel(parcel, n); } else { parcel.writeByte((byte)0); } parcel.writeByte((byte)(this.meteredHint ? 1 : 0)); parcel.writeBundle(this.attributes); } }
[ "me@paulo.costa.nom.br" ]
me@paulo.costa.nom.br
eecf7aa12719ee2b06fe4387eb599d5a81aa4bc1
9f08be9a6c6f51f201352efa39a267141c5a0de8
/src/test/java/org/docksidestage/mylasta/web/WxValidatorThreadSafeTest.java
7ee410e719ce3a938a850ecb26e3c35bd54fa85f
[ "Apache-2.0" ]
permissive
decoch/lastaflute-test-fortress
4599439c7183e4bc52b26a58bbf2fd4792814816
a8916aecf9d2b12e4335306c66c4f2e1e652127b
refs/heads/master
2021-09-14T18:53:45.437459
2018-05-17T15:54:34
2018-05-17T15:54:34
115,714,243
0
0
null
2017-12-29T10:45:29
2017-12-29T10:45:29
null
UTF-8
Java
false
false
3,211
java
/* * Copyright 2015-2017 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.docksidestage.mylasta.web; import java.util.Locale; import javax.annotation.Resource; import org.dbflute.utflute.core.cannonball.CannonballCar; import org.dbflute.utflute.core.cannonball.CannonballOption; import org.dbflute.utflute.core.cannonball.CannonballRun; import org.docksidestage.mylasta.action.FortressMessages; import org.docksidestage.unit.UnitFortressWebTestCase; import org.lastaflute.core.message.MessageManager; import org.lastaflute.web.servlet.request.RequestManager; import org.lastaflute.web.validation.ActionValidator; import org.lastaflute.web.validation.Required; import org.lastaflute.web.validation.VaConfigSetupper; /** * @author jflute */ public class WxValidatorThreadSafeTest extends UnitFortressWebTestCase { @Resource private MessageManager messageManager; @Resource private RequestManager requestManager; public void test_basic() { // ## Arrange ## Locale locale = requestManager.getUserLocale(); cannonball(new CannonballRun() { public void drive(CannonballCar car) { xdoPrepareWebMockContext(); // for web environment ActionValidator<FortressMessages> validator = createValidator(locale, conf -> {}); MockMaihama maihama = new MockMaihama(null); // ## Act ## assertValidationError(() -> validator.validateApi(maihama, messages -> { messages.saveSuccessAttribute("mystic", "hangar"); })).handle(data -> { // ## Assert ## log(ln() + data.getCause().getMessages().toDisp()); assertEquals("hangar", data.requiredSuccessAttribute("mystic", String.class)); assertException(AssertionError.class, () -> data.requiredSuccessAttribute("bbb", String.class)); }); } }, new CannonballOption()); } // =================================================================================== // Assist Logic // ============ private ActionValidator<FortressMessages> createValidator(Locale locale, VaConfigSetupper confLambda) { return new ActionValidator<FortressMessages>(requestManager, () -> new FortressMessages()); } public static class MockMaihama { @Required public String sea; public MockMaihama(String sea) { this.sea = sea; } } }
[ "dbflute@gmail.com" ]
dbflute@gmail.com
2793a3a730dfb5d0880da6795b2c2d57542b193f
daab099e44da619b97a7a6009e9dee0d507930f3
/rt/com/sun/xml/internal/bind/v2/runtime/unmarshaller/AttributesEx.java
b796b5b9eb992ab4c2cc778759fcafa90664cda7
[]
no_license
xknower/source-code-jdk-8u211
01c233d4f498d6a61af9b4c34dc26bb0963d6ce1
208b3b26625f62ff0d1ff6ee7c2b7ee91f6c9063
refs/heads/master
2022-12-28T17:08:25.751594
2020-10-09T03:24:14
2020-10-09T03:24:14
278,289,426
0
0
null
null
null
null
UTF-8
Java
false
false
458
java
package com.sun.xml.internal.bind.v2.runtime.unmarshaller; import org.xml.sax.Attributes; public interface AttributesEx extends Attributes { CharSequence getData(int paramInt); CharSequence getData(String paramString1, String paramString2); } /* Location: D:\tools\env\Java\jdk1.8.0_211\rt.jar!\com\sun\xml\internal\bind\v2\runtim\\unmarshaller\AttributesEx.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "xknower@126.com" ]
xknower@126.com
d9fcd5f823061438487fc84798f11768de36bdcf
fe4d3a5a8c9b7e3a952a6d0c9136813e02f757f6
/java/mods/hinasch/unsaga/core/entity/mob/EntityRuffleTree.java
ad9694e6ad024879b1f5b0c41fa4a9bbb2e05e27
[]
no_license
damofujiki/UnsagaMod
7124c96a841fbfad274878c21d81cd14625a49a5
6eec9b95f4969e4a6d14af65c3c53cd93eb139e7
refs/heads/master
2020-09-20T08:29:23.989992
2017-12-09T07:51:16
2017-12-09T07:51:16
66,636,825
0
0
null
null
null
null
UTF-8
Java
false
false
4,343
java
package mods.hinasch.unsaga.core.entity.mob; import java.util.List; import com.google.common.collect.Lists; import mods.hinasch.lib.util.VecUtil; import mods.hinasch.lib.world.WorldHelper; import mods.hinasch.unsaga.core.entity.ai.EntityAIArrowAttack; import mods.hinasch.unsaga.core.entity.ai.EntityAISpell; import mods.hinasch.unsaga.core.entity.ai.EntityAISpell.ISpellAI; import mods.hinasch.unsaga.core.entity.ai.EntityAISpell.SpellAIData; import mods.hinasch.unsaga.core.entity.projectile.EntitySolutionLiquid; import mods.hinasch.unsagamagic.spell.Spell; import mods.hinasch.unsagamagic.spell.SpellRegistry; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EnumCreatureAttribute; import net.minecraft.entity.IRangedAttackMob; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIHurtByTarget; import net.minecraft.entity.ai.EntityAILookIdle; import net.minecraft.entity.ai.EntityAINearestAttackableTarget; import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.SoundEvents; import net.minecraft.network.datasync.DataParameter; import net.minecraft.network.datasync.DataSerializers; import net.minecraft.network.datasync.EntityDataManager; import net.minecraft.world.World; public class EntityRuffleTree extends EntityMob implements IRangedAttackMob,ISpellAI{ private static final DataParameter<String> AI_SPELL = EntityDataManager.<String>createKey(EntityTreasureSlime.class, DataSerializers.STRING); private static final DataParameter<Integer> AI_TARGET = EntityDataManager.<Integer>createKey(EntityTreasureSlime.class, DataSerializers.VARINT); private static final DataParameter<Boolean> REQUIRE_SYNC = EntityDataManager.<Boolean>createKey(EntityTreasureSlime.class, DataSerializers.BOOLEAN); EntityLivingBase target; Spell spell; boolean isReadyCast = false; public static EnumCreatureAttribute PLANT; public EntityRuffleTree(World worldIn) { super(worldIn); this.experienceValue = 5; this.width = 1.0F; this.height = 3.0F; } @Override protected void initEntityAI() { SpellRegistry spells = SpellRegistry.instance(); List<SpellAIData> spellList = Lists.newArrayList(); spellList.add(new SpellAIData(spells.sleep,30.0F,0.0F,60)); spellList.add(new SpellAIData(spells.superSonic,50.0F,10.0F,30)); spellList.add(new SpellAIData(spells.spoil,50.0F,10.0F,30)); this.tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(6, new EntityAILookIdle(this)); this.targetTasks.addTask(3, new EntityAIArrowAttack(this,0.01D,60,15.0F)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(4, new EntityAISpell(this,spellList,1.0D,100,15.0F,10)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0])); } @Override public EnumCreatureAttribute getCreatureAttribute() { return PLANT; } @Override protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(70.0F); this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(5.0F); this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.01D); } @Override public void attackEntityWithRangedAttack(EntityLivingBase target, float drive) { // UnsagaMod.logger.trace(this.getClass().getName(),this.getEntityWorld()); EntitySolutionLiquid liquid = new EntitySolutionLiquid(this.getEntityWorld(), this); if(this.getEntityWorld().rand.nextInt(3)==0){ liquid.setPoison(); } liquid.setDamage((float)this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).getAttributeValue(),0.3F); VecUtil.setThrowableToTarget(this, target, liquid); this.playSound(SoundEvents.ENTITY_GENERIC_SWIM, 1.0F, 1.0F); if(WorldHelper.isServer(getEntityWorld())){ this.getEntityWorld().spawnEntityInWorld(liquid); } } @Override public void onUpdate() { // this.onUpdateSpell(worldObj, this); super.onUpdate(); } @Override public boolean canCastSpell() { return true; } }
[ "ahoahomen@gmail.com" ]
ahoahomen@gmail.com
c0ee475c5dba76cbc0a662ca1f001e2a826b0c8c
2aa9d209fb8d3d7e5028686cf7151bdec998fdf5
/app/src/main/java/com/code/albert/evilmemory/activities/SplashActivity.java
28d463c0300da6244a0b18a7a57a642fe3479d2d
[]
no_license
albertbecervas/EntregaFinalJEDI
939dcf0476d4d2d1f93d3c432bd91f10a6acc25c
0d1a4dd4ee581a3d779b97e5dcd2164c1f1f8a8f
refs/heads/master
2021-01-13T05:14:17.104839
2017-02-10T21:51:23
2017-02-10T21:51:23
81,282,231
0
0
null
null
null
null
UTF-8
Java
false
false
1,679
java
package com.code.albert.evilmemory.activities; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.code.albert.evilmemory.R; public class SplashActivity extends Activity { // Duración en milisegundos que se mostrará el splash private final int DURACION_SPLASH = 3000; // 3 segundos SharedPreferences sharedPreferences; SharedPreferences.Editor editor; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Tenemos una plantilla llamada splash.xml donde mostraremos la información que queramos (logotipo, etc.) setContentView(R.layout.activity_splash); sharedPreferences = getSharedPreferences("myApp", Context.MODE_PRIVATE); editor = sharedPreferences.edit(); if(!sharedPreferences.getBoolean("Installed",false)) { new Handler().postDelayed(new Runnable() { public void run() { // Cuando pasen los 3 segundos, pasamos a la actividad principal de la aplicación editor.putBoolean("Installed", true); editor.apply(); Intent intent = new Intent(SplashActivity.this, Login.class); startActivity(intent); finish(); } ; }, DURACION_SPLASH); }else{ startActivity(new Intent(SplashActivity.this, Login.class)); finish(); } } }
[ "albertbecerrahervas@gmail.com" ]
albertbecerrahervas@gmail.com
ef66d0320361e3b26247998a5d7a3cd9737536dd
1b1c401d5facb2839c233773fcebefe346f3c076
/P2PClient/src/main/java/chabernac/p2pclient/gui/iTitleProvider.java
92a3ac0529357f4aea9e1361cf53742e45809d9b
[]
no_license
guychauliac/p2pmessenger
a0836cc8ff9c83b5ba95879f0ebfc8d5a1eea321
1652844014ddb9de00497505ffb14f122adcf57a
refs/heads/master
2023-05-09T01:29:36.992687
2017-11-20T15:09:57
2017-11-20T15:09:57
43,264,205
0
0
null
2021-06-04T01:00:10
2015-09-27T20:43:38
Java
UTF-8
Java
false
false
306
java
/** * Copyright (c) 2010 Axa Holding Belgium, SA. All rights reserved. * This software is the confidential and proprietary information of the AXA Group. */ package chabernac.p2pclient.gui; public interface iTitleProvider { public String getTitle(); public void setTitle(String aTitle); }
[ "guy.chauliac@418331b0-0465-11df-b0f7-87f4a55fea09" ]
guy.chauliac@418331b0-0465-11df-b0f7-87f4a55fea09
613402fe38f23458abc4ad34a0cac22f08612b34
ae14b13bac3e0d83fb67afa8645f4e9b5030f8b3
/src/main/java/com/isoft/slot/managment/security/SpringSecurityAuditorAware.java
71b78ce788435e6124db1b38e9e33ffa56d70b03
[]
no_license
Karima-Ahmed/SlotManagement
8ce878f24a6b1b2f918d7a2014fca2b7255ac786
b4df5c12485a0432350605d9d2896d333835b705
refs/heads/master
2022-12-24T20:30:51.522442
2020-05-29T12:30:20
2020-05-29T12:30:20
243,258,396
0
0
null
2022-12-16T05:13:13
2020-02-26T12:34:43
Java
UTF-8
Java
false
false
558
java
package com.isoft.slot.managment.security; import com.isoft.slot.managment.config.Constants; import java.util.Optional; import org.springframework.data.domain.AuditorAware; import org.springframework.stereotype.Component; /** * Implementation of {@link AuditorAware} based on Spring Security. */ @Component public class SpringSecurityAuditorAware implements AuditorAware<String> { @Override public Optional<String> getCurrentAuditor() { return Optional.of(SecurityUtils.getCurrentUserLogin().orElse(Constants.SYSTEM_ACCOUNT)); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
1b5184d1ac48031cbafcd253951b42e39280a483
cf5e395deacc43d537f6450799c7f1be89e0bb32
/src/main/java/com/nivelle/guide/java2e/annotion/myannotion/MyAnnotation.java
eae921a0bfa857a3bc2c1395f95af0b6509d4107
[]
no_license
ganiner/javaguides
823ada3b2dc1759cc56059392181486ca23bf473
541fd862fcd9fc91c56f382011676106aa772337
refs/heads/master
2020-06-11T22:51:57.108511
2019-06-26T11:50:58
2019-06-26T11:50:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
351
java
package com.nivelle.guide.java2e.annotion.myannotion; import java.lang.annotation.*; @Documented @Target({ElementType.METHOD, ElementType.TYPE, ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface MyAnnotation { String name() default ""; String sex() default "男"; String nation() default "ChineseUserImpl"; }
[ "fuxinzhong@zhangyue.com" ]
fuxinzhong@zhangyue.com
855c058831d2b5e1e1ed041a65c15bcdd06779bd
323c723bdbdc9bdf5053dd27a11b1976603609f5
/nssicc/nssicc_service/src/main/java/biz/belcorp/ssicc/service/spisicc/impl/ProcesoPEDPedidoZonaMontoMinimoMultiHiloServiceImpl.java
4e66d381f1100d4d498678b6c2f6e01c1ed44bad
[]
no_license
cbazalar/PROYECTOS_PROPIOS
adb0d579639fb72ec7871334163d3fef00123a1c
3ba232d1f775afd07b13c8246d0a8ac892e93167
refs/heads/master
2021-01-11T03:38:06.084970
2016-10-24T01:33:00
2016-10-24T01:33:00
71,429,267
0
0
null
null
null
null
UTF-8
Java
false
false
2,705
java
package biz.belcorp.ssicc.service.spisicc.impl; import java.util.HashMap; import java.util.Map; import java.util.List; import org.apache.commons.collections.MapUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import biz.belcorp.ssicc.dao.spisicc.model.ProcesoPedidoZona; import biz.belcorp.ssicc.service.sisicc.framework.beans.InterfazParams; import biz.belcorp.ssicc.service.sisicc.framework.exception.InterfazException; import biz.belcorp.ssicc.service.spisicc.framework.BaseProcesoPEDPedidoZonaHiloAbstractService; /** * <p> * <a href="ProcesoPEDPedidoZonaMontoMinimoMultiHiloServiceImpl.java.html"> <i>View Source </i> </a> * </p> * * @author <a href="">Gonzalo Javier Huertas Agurto</a> */ @Service("spisicc.procesoPEDPedidoZonaMontoMinimoMultiHiloService") @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class) public class ProcesoPEDPedidoZonaMontoMinimoMultiHiloServiceImpl extends BaseProcesoPEDPedidoZonaHiloAbstractService { /** * Metodo ejecutado antes de 'processInterfaz'. Este mtodo no tiene * implementacin, su intencion es el de ser sobrescrito en caso se requiera * realizar una tarea adicional antes del procesamiento de la Interfaz. * * @param interfazParams * parametros de la interfaz */ protected void beforeProcessInterfaz(InterfazParams interfazParams) throws InterfazException { Map params = interfazParams.getQueryParams(); List listaZonas = procesoHiloPedidoZonaService.getListaZonasByCampanaFechaFacturacion(params); params.put("listaZonas", listaZonas); } /** * @param params */ public void executeHilo(ProcesoPedidoZona proceso){ try { Map criteria = new HashMap(); criteria.put("oidZona", proceso.getOidZona()); criteria.put("fechaFacturacion", proceso.getFechaFacturacion()); criteria.put("codigoPeriodo", proceso.getCodigoPeriodo()); List pedidos = procesoHiloPedidoZonaService.getListaPedidosByZonasCampanaFechaFacturacion(criteria); if(pedidos!=null && pedidos.size()>0){ Map criteriaProceso = new HashMap(); criteriaProceso.put("codigoUsuario", proceso.getCodigoUsuario()); for(int i=0;i<pedidos.size();i++){ criteriaProceso.put("oidPedido", MapUtils.getString((HashMap)pedidos.get(i), "oidPedido")); procesoHiloPedidoZonaService.executeMontoMinimoPedidoZonaMultihilo(criteriaProceso); } } } catch (Exception e) { proceso.setSuccess(false); proceso.setMensajeError(e.toString()); } } }
[ "cbazalarlarosa@gmail.com" ]
cbazalarlarosa@gmail.com
a01f92f4c04d4fb56efe2cf41435685b6d9050dc
c885ef92397be9d54b87741f01557f61d3f794f3
/results/Csv-13/org.apache.commons.csv.CSVFormat/BBC-F0-opt-100/tests/28/org/apache/commons/csv/CSVFormat_ESTest_scaffolding.java
80f6ee84b2a24b3ff10e4f5fc0b550ee47f7a087
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
4,575
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Oct 23 00:38:00 GMT 2021 */ package org.apache.commons.csv; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; import static org.evosuite.shaded.org.mockito.Mockito.*; @EvoSuiteClassExclude public class CSVFormat_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.csv.CSVFormat"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {} } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { /*No java.lang.System property to set*/ } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CSVFormat_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.csv.CSVFormat", "org.apache.commons.csv.Token", "org.apache.commons.csv.Lexer", "org.apache.commons.csv.Constants", "org.apache.commons.csv.CSVParser", "org.apache.commons.csv.CSVFormat$Predefined", "org.apache.commons.csv.Token$Type", "org.apache.commons.csv.Assertions", "org.apache.commons.csv.QuoteMode", "org.apache.commons.csv.CSVPrinter$1", "org.apache.commons.csv.CSVPrinter", "org.apache.commons.csv.ExtendedBufferedReader" ); } private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException { mock(Class.forName("java.sql.ResultSet", false, CSVFormat_ESTest_scaffolding.class.getClassLoader())); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CSVFormat_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.apache.commons.csv.Constants", "org.apache.commons.csv.QuoteMode", "org.apache.commons.csv.CSVFormat", "org.apache.commons.csv.CSVFormat$Predefined", "org.apache.commons.csv.CSVPrinter", "org.apache.commons.csv.Assertions", "org.apache.commons.csv.CSVParser", "org.apache.commons.csv.Token", "org.apache.commons.csv.Token$Type", "org.apache.commons.csv.Lexer", "org.apache.commons.csv.ExtendedBufferedReader", "org.apache.commons.csv.CSVPrinter$1", "org.apache.commons.csv.CSVParser$2", "org.apache.commons.csv.CSVRecord" ); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
380952ce60a370db72a24029fd0d1833f9d948d6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_1a880c702209edfd8edb2f1b252a58ca1711ee3a/RingingReceiver/14_1a880c702209edfd8edb2f1b252a58ca1711ee3a_RingingReceiver_s.java
15d93baa11a3520a7beaa27007dad881342ccfd3
[]
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,091
java
package jp.muo.smsproxy; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; public class RingingReceiver extends BroadcastReceiver { @Override public void onReceive(final Context context, Intent intent) { final TelephonyManager telephony = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); PhoneStateListener ringingListener = new PhoneStateListener() { @Override public void onCallStateChanged(int state, String number) { if (state == TelephonyManager.CALL_STATE_RINGING) { SmsProxyManager mgr = new SmsProxyManager(context); mgr.setType(SmsProxyManager.Mode.CALL); if (mgr.isEnabled()) { String msgText = "call from " + (number != null ? number : "unknown") + "\n"; mgr.send(msgText); } } telephony.listen(this, PhoneStateListener.LISTEN_NONE); } }; telephony.listen(ringingListener, PhoneStateListener.LISTEN_CALL_STATE); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e1379e0c762b3792bac754e256ee165576d8dc38
182f81f9ebc6a43ba772587c6787d6c4c0989c51
/android/app/src/main/java/com/eventssu_3095/MainActivity.java
d0704c1a7bad8cf47cc51c5d30d753fbaaeb4293
[]
no_license
crowdbotics-apps/eventssu-3095
bb5c28b99a45514dc98db5760444c31c7a3e3bd9
ecd152027cb95cf4c0700528bf885cc031f5f7b2
refs/heads/master
2020-05-20T15:44:41.919737
2019-05-08T17:31:33
2019-05-08T17:31:33
185,651,459
0
0
null
null
null
null
UTF-8
Java
false
false
371
java
package com.eventssu_3095; import com.facebook.react.ReactActivity; public class MainActivity extends ReactActivity { /** * Returns the name of the main component registered from JavaScript. * This is used to schedule rendering of the component. */ @Override protected String getMainComponentName() { return "eventssu_3095"; } }
[ "team@crowdbotics.com" ]
team@crowdbotics.com
98101005a5128b558a57774ee9a348ff99b7e3f0
e087ef4984a8658c287d955276f08f06da358397
/src/com/javarush/test/level19/lesson10/home05/Solution.java
2d5eed86bedae198d5970373b6eef8ff94fc3ce2
[]
no_license
YuriiLosinets/javacore
f08fd93623bc5c90fcb4eb13a03a3360b702a5fb
552117fd18a96ff99c6bd5455f16f4bb234d2bdc
refs/heads/master
2021-01-10T14:39:57.494858
2016-03-25T08:40:31
2016-03-25T08:40:31
53,958,241
0
1
null
null
null
null
UTF-8
Java
false
false
1,250
java
package com.javarush.test.level19.lesson10.home05; /* Слова с цифрами В метод main первым параметром приходит имя файла1, вторым - файла2. Файл1 содержит строки со слов, разделенные пробелом. Записать через пробел в Файл2 все слова, которые содержат цифры, например, а1 или abc3d Закрыть потоки. Не использовать try-with-resources */ import java.io.*; public class Solution { public static void main(String[] args) throws IOException { File file1 = new File(args[0]); File file2 = new File(args[1]); BufferedReader reader = new BufferedReader(new FileReader(file1)); FileWriter writer = new FileWriter(file2); String line; while ((line = reader.readLine())!= null) { String[] arr = line.split(" "); for (int i =0; i < arr.length; i++) { if (arr[i].matches(".*\\d+.*")) { writer.write(arr[i] + " "); } } } reader.close(); writer.close(); } }
[ "yuri.losinets@gmail.com" ]
yuri.losinets@gmail.com
13894ec8145892aac24812de6c3fffa51431a631
f08256664e46e5ac1466f5c67dadce9e19b4e173
/sources/kotlin/reflect/jvm/internal/impl/load/java/JvmAbi.java
5674430049a5f4ea8699ea56ba798e6f74af2fc8
[]
no_license
IOIIIO/DisneyPlusSource
5f981420df36bfbc3313756ffc7872d84246488d
658947960bd71c0582324f045a400ae6c3147cc3
refs/heads/master
2020-09-30T22:33:43.011489
2019-12-11T22:27:58
2019-12-11T22:27:58
227,382,471
6
3
null
null
null
null
UTF-8
Java
false
false
7,636
java
package kotlin.reflect.jvm.internal.impl.load.java; import kotlin.reflect.jvm.internal.impl.builtins.CompanionObjectMapping; import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor; import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor.Kind; import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor; import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor; import kotlin.reflect.jvm.internal.impl.descriptors.FieldDescriptor; import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor; import kotlin.reflect.jvm.internal.impl.name.ClassId; import kotlin.reflect.jvm.internal.impl.name.FqName; import kotlin.reflect.jvm.internal.impl.resolve.DescriptorUtils; import kotlin.reflect.jvm.internal.impl.util.capitalizeDecapitalize.CapitalizeDecapitalizeKt; public final class JvmAbi { public static final FqName JVM_FIELD_ANNOTATION_FQ_NAME = new FqName("kotlin.jvm.JvmField"); public static final ClassId REFLECTION_FACTORY_IMPL = ClassId.topLevel(new FqName("kotlin.reflect.jvm.internal.ReflectionFactoryImpl")); private static /* synthetic */ void $$$reportNull$$$0(int i) { String str = (i == 1 || i == 3 || i == 7 || i == 9) ? "@NotNull method %s.%s must not return null" : "Argument for @NotNull parameter '%s' of %s.%s must not be null"; Object[] objArr = new Object[((i == 1 || i == 3 || i == 7 || i == 9) ? 2 : 3)]; String str2 = "kotlin/reflect/jvm/internal/impl/load/java/JvmAbi"; switch (i) { case 1: case 3: case 7: case 9: objArr[0] = str2; break; case 2: objArr[0] = "typeAliasName"; break; case 4: case 5: objArr[0] = "name"; break; case 10: objArr[0] = "propertyDescriptor"; break; case 11: case 12: objArr[0] = "companionObject"; break; case 13: objArr[0] = "memberDescriptor"; break; default: objArr[0] = "propertyName"; break; } String str3 = "setterName"; String str4 = "getterName"; String str5 = "getSyntheticMethodNameForAnnotatedTypeAlias"; String str6 = "getSyntheticMethodNameForAnnotatedProperty"; if (i == 1) { objArr[1] = str6; } else if (i == 3) { objArr[1] = str5; } else if (i == 7) { objArr[1] = str4; } else if (i != 9) { objArr[1] = str2; } else { objArr[1] = str3; } switch (i) { case 1: case 3: case 7: case 9: break; case 2: objArr[2] = str5; break; case 4: objArr[2] = "isGetterName"; break; case 5: objArr[2] = "isSetterName"; break; case 6: objArr[2] = str4; break; case 8: objArr[2] = str3; break; case 10: objArr[2] = "isPropertyWithBackingFieldInOuterClass"; break; case 11: objArr[2] = "isClassCompanionObjectWithBackingFieldsInOuter"; break; case 12: objArr[2] = "isMappedIntrinsicCompanionObject"; break; case 13: objArr[2] = "hasJvmFieldAnnotation"; break; default: objArr[2] = str6; break; } String format = String.format(str, objArr); throw ((i == 1 || i == 3 || i == 7 || i == 9) ? new IllegalStateException(format) : new IllegalArgumentException(format)); } public static String getterName(String str) { if (str == null) { $$$reportNull$$$0(6); } if (!startsWithIsPrefix(str)) { StringBuilder sb = new StringBuilder(); sb.append("get"); sb.append(CapitalizeDecapitalizeKt.capitalizeAsciiOnly(str)); str = sb.toString(); } if (str == null) { $$$reportNull$$$0(7); } return str; } public static boolean hasJvmFieldAnnotation(CallableMemberDescriptor callableMemberDescriptor) { if (callableMemberDescriptor == null) { $$$reportNull$$$0(13); } if (callableMemberDescriptor instanceof PropertyDescriptor) { FieldDescriptor backingField = ((PropertyDescriptor) callableMemberDescriptor).getBackingField(); if (backingField != null && backingField.getAnnotations().hasAnnotation(JVM_FIELD_ANNOTATION_FQ_NAME)) { return true; } } return callableMemberDescriptor.getAnnotations().hasAnnotation(JVM_FIELD_ANNOTATION_FQ_NAME); } public static boolean isClassCompanionObjectWithBackingFieldsInOuter(DeclarationDescriptor declarationDescriptor) { if (declarationDescriptor == null) { $$$reportNull$$$0(11); } return DescriptorUtils.isCompanionObject(declarationDescriptor) && DescriptorUtils.isClassOrEnumClass(declarationDescriptor.getContainingDeclaration()) && !isMappedIntrinsicCompanionObject((ClassDescriptor) declarationDescriptor); } public static boolean isGetterName(String str) { if (str == null) { $$$reportNull$$$0(4); } return str.startsWith("get") || str.startsWith("is"); } public static boolean isMappedIntrinsicCompanionObject(ClassDescriptor classDescriptor) { if (classDescriptor == null) { $$$reportNull$$$0(12); } return CompanionObjectMapping.INSTANCE.isMappedIntrinsicCompanionObject(classDescriptor); } public static boolean isPropertyWithBackingFieldInOuterClass(PropertyDescriptor propertyDescriptor) { if (propertyDescriptor == null) { $$$reportNull$$$0(10); } if (propertyDescriptor.getKind() == Kind.FAKE_OVERRIDE) { return false; } boolean z = true; if (isClassCompanionObjectWithBackingFieldsInOuter(propertyDescriptor.getContainingDeclaration())) { return true; } if (!DescriptorUtils.isCompanionObject(propertyDescriptor.getContainingDeclaration()) || !hasJvmFieldAnnotation(propertyDescriptor)) { z = false; } return z; } public static boolean isSetterName(String str) { if (str == null) { $$$reportNull$$$0(5); } return str.startsWith("set"); } public static String setterName(String str) { if (str == null) { $$$reportNull$$$0(8); } StringBuilder sb = new StringBuilder(); sb.append("set"); sb.append(startsWithIsPrefix(str) ? str.substring(2) : CapitalizeDecapitalizeKt.capitalizeAsciiOnly(str)); String sb2 = sb.toString(); if (sb2 == null) { $$$reportNull$$$0(9); } return sb2; } public static boolean startsWithIsPrefix(String str) { boolean z = false; if (!str.startsWith("is") || str.length() == 2) { return false; } char charAt = str.charAt(2); if ('a' > charAt || charAt > 'z') { z = true; } return z; } }
[ "101110@vivaldi.net" ]
101110@vivaldi.net
4feac5ed6bc1449fd1e14de9e599e09d31de400d
5a13f24c35c34082492ef851fb91d404827b7ddb
/src/main/java3/com/alipay/api/response/AlipayEcoMycarMaintainDataUpdateResponse.java
afceb3a201e39f81bcd2107e68ad3dd887502fef
[]
no_license
featherfly/alipay-sdk
69b2f2fc89a09996004b36373bd5512664521bfd
ba2355a05de358dc15855ffaab8e19acfa24a93b
refs/heads/master
2021-01-22T11:03:20.304528
2017-09-04T09:39:42
2017-09-04T09:39:42
102,344,436
1
0
null
null
null
null
UTF-8
Java
false
false
633
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.eco.mycar.maintain.data.update response. * * @author auto create * @since 1.0, 2016-06-14 15:11:26 */ public class AlipayEcoMycarMaintainDataUpdateResponse extends AlipayResponse { private static final long serialVersionUID = 1828631662251435246L; /** * 具体返回的处理结果 */ @ApiField("info") private String info; public void setInfo(String info) { this.info = info; } public String getInfo( ) { return this.info; } }
[ "zhongj@cdmhzx.com" ]
zhongj@cdmhzx.com
8011c73b7583e1f9f12d106a0dc2b2b877ecff0d
ea1fc28686c994211171cf769d65c556e2ae80ae
/src/main/java/com/student/aspect/LogAspect.java
d77e959a9f0d3fc6a173b622972c459ba637ad36
[]
no_license
SomeDargon/springBoot-mybaties
da01357cd397d946e5aabe64db9a0e79e8eefb0a
4f194173f3a950fd7a8dd558b59821ac668c26c7
refs/heads/master
2020-03-19T09:58:37.468019
2019-05-04T23:34:53
2019-05-04T23:34:53
136,332,136
0
1
null
null
null
null
UTF-8
Java
false
false
5,186
java
package com.student.aspect; import com.alibaba.fastjson.JSONObject; import com.student.annotation.Log; import com.student.constant.BusinessStatus; import com.student.entity.OperLog; import com.student.entity.User; import com.student.service.OperLogService; import com.student.util.ServletUtils; import com.student.util.StringUtils; import com.student.util.security.ShiroUtils; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.Signature; import org.aspectj.lang.annotation.AfterReturning; import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.stereotype.Component; import java.lang.reflect.Method; import java.util.Map; /** * 操作日志记录处理 * * @author ruoyi */ @Aspect @Component @EnableAsync public class LogAspect { private static final Logger log = LoggerFactory.getLogger(LogAspect.class); @Autowired private OperLogService operLogService; // 配置织入点 @Pointcut("@annotation(com.student.annotation.Log)") public void logPointCut() { } /** * 前置通知 用于拦截操作 * * @param joinPoint 切点 */ @AfterReturning(pointcut = "logPointCut()") public void doBefore(JoinPoint joinPoint) { handleLog(joinPoint, null); } /** * 拦截异常操作 * * @param joinPoint * @param e */ @AfterThrowing(value = "logPointCut()", throwing = "e") public void doAfter(JoinPoint joinPoint, Exception e) { handleLog(joinPoint, e); } @Async protected void handleLog(final JoinPoint joinPoint, final Exception e) { try { // 获得注解 Log controllerLog = getAnnotationLog(joinPoint); if (controllerLog == null) { return; } // 获取当前的用户 User currentUser = ShiroUtils.getUser(); // *========数据库日志=========*// OperLog operLog = new OperLog(); operLog.setStatus(BusinessStatus.SUCCESS); // 请求的地址 String ip = ShiroUtils.getIp(); operLog.setOperIp(ip); // 操作地点 // operLog.setOperLocation(AddressUtils.getRealAddressByIP(ip)); operLog.setOperUrl(ServletUtils.getRequest().getRequestURI()); if (currentUser != null) { operLog.setOperName(currentUser.getLoginName()); operLog.setDeptName(currentUser.getDept().getDeptName()); } if (e != null) { operLog.setStatus(BusinessStatus.FAIL); operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000)); } // 设置方法名称 String className = joinPoint.getTarget().getClass().getName(); String methodName = joinPoint.getSignature().getName(); operLog.setMethod(className + "." + methodName + "()"); // 处理设置注解上的参数 getControllerMethodDescription(controllerLog, operLog); // 保存数据库 operLogService.insertOperlog(operLog); } catch (Exception exp) { // 记录本地异常日志 log.error("==前置通知异常=="); log.error("异常信息:{}", exp.getMessage()); exp.printStackTrace(); } } /** * 获取注解中对方法的描述信息 用于Controller层注解 * * @return 方法描述 * @throws Exception */ public void getControllerMethodDescription(Log log, OperLog operLog) throws Exception { // 设置action动作 operLog.setAction(log.action()); // 设置标题 operLog.setTitle(log.title()); // 设置channel operLog.setChannel(log.channel()); // 是否需要保存request,参数和值 if (log.isSaveRequestData()) { // 获取参数的信息,传入到数据库中。 setRequestValue(operLog); } } /** * 获取请求的参数,放到log中 * * @param operLog */ private void setRequestValue(OperLog operLog) { Map<String, String[]> map = ServletUtils.getRequest().getParameterMap(); String params = JSONObject.toJSONString(map); operLog.setOperParam(StringUtils.substring(params, 0, 255)); } /** * 是否存在注解,如果存在就获取 */ private Log getAnnotationLog(JoinPoint joinPoint) throws Exception { Signature signature = joinPoint.getSignature(); MethodSignature methodSignature = (MethodSignature) signature; Method method = methodSignature.getMethod(); if (method != null) { return method.getAnnotation(Log.class); } return null; } }
[ "296569845@qq.com" ]
296569845@qq.com
dd6f78ac823cd9d70b7215d841285d19b515ce99
774b50fe5091754f23ef556c07a4d1aab56efe27
/oag/src/main/java/org/oagis/model/v101/OaclRemitLocationMethodCodeEnumerationType.java
35c45923a90a8b0ea56e16b29f1f52221a189ccc
[]
no_license
otw1248/thirdpartiess
daa297c2f44adb1ffb6530f88eceab6b7f37b109
4cbc4501443d807121656e47014d70277ff30abc
refs/heads/master
2022-12-07T17:10:17.320160
2022-11-28T10:56:19
2022-11-28T10:56:19
33,661,485
0
0
null
null
null
null
UTF-8
Java
false
false
1,958
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2015.04.09 at 05:00:53 PM CST // package org.oagis.model.v101; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for oacl_RemitLocationMethodCodeEnumerationType. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="oacl_RemitLocationMethodCodeEnumerationType"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}token"> * &lt;enumeration value="FAX"/> * &lt;enumeration value="EDI"/> * &lt;enumeration value="URI"/> * &lt;enumeration value="EML"/> * &lt;enumeration value="PST"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "oacl_RemitLocationMethodCodeEnumerationType") @XmlEnum public enum OaclRemitLocationMethodCodeEnumerationType { /** * Remittance advice information needs to be faxed. * */ FAX, /** * Remittance advice information needs to be sent through Electronic Data Interchange. * */ EDI, /** * Remittance advice information needs to be sent to a Uniform Resource Identifier (URI). URI is a compact string of characters that uniquely identify an abstract or physical resource. URI's are the super-set of identifiers, such as URLs, email addresses, ftp sites, etc, and as such, provide the syntax for all of the identification schemes. * */ URI, EML, PST; public String value() { return name(); } public static OaclRemitLocationMethodCodeEnumerationType fromValue(String v) { return valueOf(v); } }
[ "otw1248@otw1248.com" ]
otw1248@otw1248.com
dc51e451523389c8ade1f42d24c0cc0cb2f5a759
1374237fa0c18f6896c81fb331bcc96a558c37f4
/java/com/winnertel/ems/epon/iad/bbs4000/gui/r100/action/SwitchPonProtectionAction.java
c134ec797dac42b747abae9e5a5084d876887803
[]
no_license
fangniude/lct
0ae5bc550820676f05d03f19f7570dc2f442313e
adb490fb8d0c379a8b991c1a22684e910b950796
refs/heads/master
2020-12-02T16:37:32.690589
2017-12-25T01:56:32
2017-12-25T01:56:32
96,560,039
0
0
null
null
null
null
UTF-8
Java
false
false
2,436
java
package com.winnertel.ems.epon.iad.bbs4000.gui.r100.action; /** * @author Yang Yizai , 2009-3-20 */ import com.winnertel.ems.epon.iad.bbs4000.mib.r100.PONProtectionMBean; import com.winnertel.em.framework.IApplication; import com.winnertel.em.framework.ISession; import com.winnertel.em.framework.gui.util.MessageDialog; import com.winnertel.em.framework.security.ISecurityManager; import com.winnertel.em.framework.util.OperationCanceledException; import com.winnertel.em.framework.util.OperationFailedException; import com.winnertel.em.standard.snmp.action.SnmpAction; import com.winnertel.em.standard.snmp.command.RefreshAllCommand; import com.winnertel.em.standard.snmp.gui.SnmpTableModel; import java.awt.event.ActionEvent; public class SwitchPonProtectionAction extends SnmpAction { public SwitchPonProtectionAction(IApplication anApplication) { super(anApplication); } public void executeAction(ActionEvent arg0) throws Exception { //Check the privilege. if (!fApplication.isDebug()) { final ISecurityManager securityManager = fApplication.getSecurityManager(); final ISession session = fApplication.getSession(); if (!securityManager.isAuthorized(session, "Switch_Board")) { MessageDialog.showPermissionDeniedDialog(fApplication); return; } } int selectedRowCount = fTable.getSelectedRowCount(); if (selectedRowCount == 0) { MessageDialog.showSelectRowDialog(fApplication); return; } if (!MessageDialog.showConfirmOperationDialog(fApplication)) { throw new OperationCanceledException("User cancel this operation."); } SnmpTableModel tableModel = (SnmpTableModel) fTable.getModel(); PONProtectionMBean bean = (PONProtectionMBean)tableModel.getRow(fTable.getSelectedRow()); int tries = fApplication.getSnmpProxy().getRetries(); int timeout = fApplication.getSnmpProxy().getTimeout(); try { fApplication.getSnmpProxy().setRetries(1); fApplication.getSnmpProxy().setTimeout(30); bean.switchOver(); new RefreshAllCommand(fApplication, fTable).execute(); } catch (Exception ex) { MessageDialog.showOperationFailedDialog(fApplication); throw new OperationFailedException( "Switch operation failed." ); } finally { fApplication.getSnmpProxy().setRetries(tries); fApplication.getSnmpProxy().setTimeout(timeout); } } }
[ "fangniude@gmail.com" ]
fangniude@gmail.com
2b7346323e154308651dc7310e55c2886e7c891f
b1f51f8ba05ad83ecfbd80e6e7f140e70850bf01
/ACE_ERP/src/transfer/tr00505_s1.java
19d26cbd227ef10e524a56193f857ecd978f1d75
[]
no_license
hyundaimovex-asanwas/asanwas-homepage
27e0ba1ed7b41313069e732f3dc9df20053caddd
75e30546f11258d8b70159cfbe8ee36b18371bd0
refs/heads/master
2023-06-07T03:41:10.170367
2021-07-01T10:23:54
2021-07-01T10:23:54
376,739,168
1
1
null
null
null
null
UHC
Java
false
false
3,798
java
package transfer; import com.gauce.*; import com.gauce.io.*; import com.gauce.common.*; import com.gauce.log.*; import com.gauce.db.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; // class 이름은 화일명과 항상 동일해야 함. public class tr00505_s1 extends HttpServlet { // 웹페이지의 폼의 전송방식이 Post 타입일 경우 public void doGet(HttpServletRequest req, HttpServletResponse res) { res.setContentType("text/html;charset=ksc5601"); ServiceLoader loader = new ServiceLoader(req, res); GauceService service = null; GauceContext context = null; Logger logger = null; GauceDBConnection conn = null; GauceStatement stmt =null; GauceDataSet dSet = null; try { service = loader.newService(); context = service.getContext(); logger = context.getLogger(); GauceRequest GauceReq = service.getGauceRequest(); GauceResponse GauceRes = service.getGauceResponse(); try { conn = service.getDBConnection(); dSet = new GauceDataSet(); /********************************************************************************************** 실제 업무에서 적용하실 부분 **********************************************************************************************/ // 웹페이지에서 조건값을 넘겨받음 String str1 = req.getParameter("v_str1"); String str2 = req.getParameter("v_str2"); if (str1 == null) str1 = ""; if (str2 == null) str2 = ""; GauceRes.enableFirstRow(dSet); String[] strArrCN = new String[]{ "SETTLE_CD", "SETTLE_NM", "ACC_CODE", "SELL_TYPE", "SORT_NO", "REMARK", "CREATE_USR", "UPDATE_USR" }; int[] intArrCN = new int[]{ 4, 50, 10, 4, 4, 50, 10, 10 }; int[] intArrCN2 = new int[]{ -1, -1, -1, -1, 0, -1,-1, -1 }; //logger.dbg.println(this,"test12"); for (int i=0; i<strArrCN.length; i++) { // set column column switch ( intArrCN2[i] ) { case -1 : dSet.addDataColumn(new GauceDataColumn(strArrCN[i], GauceDataColumn.TB_STRING, intArrCN[i])); break; default : dSet.addDataColumn( new GauceDataColumn( strArrCN[i], GauceDataColumn.TB_DECIMAL, intArrCN[i], intArrCN2[i] ) ); break; } } //logger.dbg.println(this,"test14"); if (!GauceReq.isBuilderRequest()) { StringBuffer sql = new StringBuffer(); //logger.dbg.println(this,"test15"); sql.append( " SELECT RTRIM(SETTLE_CD) SETTLE_CD, RTRIM(SETTLE_NM) SETTLE_NM, " ); sql.append( " ACC_CODE, SELL_TYPE, " ); sql.append( " COALESCE(SORT_NO,0) SORT_NO , RTRIM(REMARK) REMARK, " ); sql.append( " RTRIM(CREATE_USR) CREATE_USR, RTRIM(UPDATE_USR) UPDATE_USR " ); sql.append( " FROM TRANSFER.LTSTTMNTCD " ); //logger.dbg.println(this,"test 17"); sql.append( " WHERE SETTLE_CD <> '' "); if (!str1.equals("")) sql.append( " AND SETTLE_CD = '" + str1 + "'"); if (!str2.equals("")) sql.append( " AND SETTLE_NM LIKE '" + str2 + "%'" ); sql.append( " ORDER BY SETTLE_CD " ); //logger.dbg.println( this, sql.toString() ); /*********************************************************************************************/ stmt = conn.getGauceStatement(sql.toString()); stmt.executeQuery(dSet); } } catch(Exception e) { logger.err.println(this,e); } finally { if (stmt != null) try { stmt.close(); } catch (Exception e) {} if (conn != null) try {conn.close(true);} catch (Exception e) {} } dSet.flush(); GauceRes.commit(); GauceRes.close(); } catch (Exception e) { logger.err.println(this,e); logger.dbg.println(this,e.toString()); } finally { loader.restoreService(service); } } }
[ "86274611+evnmoon@users.noreply.github.com" ]
86274611+evnmoon@users.noreply.github.com
d9ae519d77ec651b9eace06ffdde5637c0598152
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_1017220.java
0b89e5302f492e54eab3c0313bbeb341898e977e
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,224
java
public void apply(final Builder builder){ final PoolingOptions pooling=new PoolingOptions(); this.maxRequestsPerConnection.ifPresent(x -> { for ( Map.Entry<HostDistance,Integer> entry : x.entrySet()) { pooling.setMaxRequestsPerConnection(entry.getKey(),entry.getValue()); } } ); this.coreConnectionsPerHost.ifPresent(x -> { for ( Map.Entry<HostDistance,Integer> entry : x.entrySet()) { pooling.setCoreConnectionsPerHost(entry.getKey(),entry.getValue()); } } ); this.maxConnectionsPerHost.ifPresent(x -> { for ( Map.Entry<HostDistance,Integer> entry : x.entrySet()) { pooling.setMaxConnectionsPerHost(entry.getKey(),entry.getValue()); } } ); this.newConnectionThreshold.ifPresent(x -> { for ( Map.Entry<HostDistance,Integer> entry : x.entrySet()) { pooling.setNewConnectionThreshold(entry.getKey(),entry.getValue()); } } ); this.maxQueueSize.ifPresent(pooling::setMaxQueueSize); this.poolTimeoutMillis.ifPresent(pooling::setPoolTimeoutMillis); this.idleTimeoutSeconds.ifPresent(pooling::setIdleTimeoutSeconds); this.heartbeatIntervalSeconds.ifPresent(pooling::setHeartbeatIntervalSeconds); builder.withPoolingOptions(pooling); }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
70884e5db1555172c512ec0298091b6bca7554fa
69040d2ad1b09341df198deb4822fde814eccd52
/src/main/java/RingOfDestiny/cards/MagicBullet/VolleyBullet.java
5dd64372fc482dd91173d11232aa7e738d2a45c9
[]
no_license
Rita-Bernstein/RingOfDestiny
69feecf461541ed2c585c181c6dde6a16d39af52
788da2b2d11c2393288506b3e04e6d5da1a16949
refs/heads/master
2023-07-16T20:56:30.160192
2021-08-31T17:16:55
2021-08-31T17:16:55
343,334,965
3
3
null
2021-05-24T08:28:52
2021-03-01T08:01:25
Java
UTF-8
Java
false
false
2,476
java
package RingOfDestiny.cards.MagicBullet; import RingOfDestiny.RingOfDestiny; import RingOfDestiny.cards.AbstractRingCard; import RingOfDestiny.patches.CardColorEnum; import RingOfDestiny.patches.CustomTagsEnum; import basemod.abstracts.CustomCard; import basemod.helpers.BaseModCardTags; import com.megacrit.cardcrawl.actions.AbstractGameAction; import com.megacrit.cardcrawl.actions.common.ApplyPowerAction; import com.megacrit.cardcrawl.actions.common.DamageAction; import com.megacrit.cardcrawl.cards.AbstractCard; import com.megacrit.cardcrawl.cards.DamageInfo; import com.megacrit.cardcrawl.characters.AbstractPlayer; import com.megacrit.cardcrawl.core.CardCrawlGame; import com.megacrit.cardcrawl.dungeons.AbstractDungeon; import com.megacrit.cardcrawl.localization.CardStrings; import com.megacrit.cardcrawl.monsters.AbstractMonster; import com.megacrit.cardcrawl.powers.DexterityPower; public class VolleyBullet extends AbstractRingCard { public static final String ID = RingOfDestiny.makeID("VolleyBullet"); private static final CardStrings cardStrings = CardCrawlGame.languagePack.getCardStrings(ID); public static final String NAME = cardStrings.NAME; public static final String IMG = RingOfDestiny.assetPath("img/cards/MagicBullet/12.png"); private static final int COST = 2; public static final String DESCRIPTION = cardStrings.DESCRIPTION; private static final CardType TYPE = CardType.ATTACK; private static final CardColor COLOR = CardColorEnum.MagicBullet_LIME; private static final CardRarity RARITY = CardRarity.RARE; private static final CardTarget TARGET = CardTarget.ENEMY; public VolleyBullet() { super(ID, NAME, IMG, COST, DESCRIPTION, TYPE, COLOR, RARITY, TARGET); this.baseDamage = 8; this.magicNumber = this.baseMagicNumber = 2; this.secondaryM = this.baseSecondaryM = 2; this.tags.add(CustomTagsEnum.MagicBullet); } public void use(AbstractPlayer p, AbstractMonster m) { int d = 0; if(AbstractDungeon.player.hasPower(DexterityPower.POWER_ID)) d += AbstractDungeon.player.getPower(DexterityPower.POWER_ID).amount / this.secondaryM; if(d < 1) d = 0; d += this.magicNumber; for(int i = 0;i < d;i++) addToBot(new DamageAction(m,new DamageInfo(p, this.damage, this.damageTypeForTurn),AbstractGameAction.AttackEffect.BLUNT_HEAVY)); } public AbstractCard makeCopy() { return new VolleyBullet(); } public void upgrade() { if (!this.upgraded) { this.upgradeName(); this.upgradeDamage(2); } } }
[ "13536709069@163.com" ]
13536709069@163.com
a66ec3550c7172eb1ab66d153ce1f149206c870b
a20eadeabb624a9a2b9a93e1d942d35e0b23e18c
/diulala/src/main/java/me/zbl/diulala/service/impl/LostAndFoundServiceImpl.java
09f2101e15106526dd33f2c0194fb1eb27229470
[]
no_license
JamesZBL/diulala-server
44a1159e9ca76a8e0cab9c18780b9172f0a8f3d5
6babc4b51400cb2c5d394a5d84be35123e02cf0b
refs/heads/master
2020-04-15T02:16:31.510062
2019-03-17T14:14:32
2019-03-17T14:14:32
164,308,533
4
0
null
null
null
null
UTF-8
Java
false
false
2,029
java
/* * Copyright 2018 JamesZBL * * 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 me.zbl.diulala.service.impl; import me.zbl.diulala.entity.persistence.AppUser; import me.zbl.diulala.entity.response.LostAndFoundResponse; import me.zbl.diulala.repository.FindCaughterRepository; import me.zbl.diulala.repository.FindLoserRepository; import me.zbl.diulala.repository.UserRepository; import me.zbl.diulala.service.LostAndFoundService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Optional; /** * 丢失查找数量统计业务实现 * * @author JamesZBL * @email 1146556298@qq.com * @date 2018-06-09 */ @Service public class LostAndFoundServiceImpl implements LostAndFoundService { @Autowired private UserRepository userRepository; @Autowired private FindCaughterRepository findCaughterRepository; @Autowired private FindLoserRepository findLoserRepository; @Override public LostAndFoundResponse getLostAndFoundCount(String userid) { AppUser user = userRepository.findAppUserByOpenId(userid); Optional.ofNullable(user).orElseThrow(() -> new IllegalArgumentException("用户不存在")); Integer gotBackCount = findCaughterRepository.countAppFindCaughtersByAppUserByLoseUserAndFinished(user, (byte) 1); Integer returnCount = findLoserRepository.countAppFindLosersByAppUserByCaughtUserAndFinished(user, (byte) 1); return new LostAndFoundResponse(returnCount, gotBackCount); } }
[ "1146556298@qq.com" ]
1146556298@qq.com
9e68158eed63fd563f5119a7a22ca732be47b6a1
beaeae0f2b9b612b353cc625a25fed94d6334236
/fastPlotViews/src/main/java/gov/nasa/arc/mct/fastplot/view/TimeDuration.java
ba3ee03a8548fce12f70366cb9049fc907b121f1
[]
no_license
HugoGuarin/mct-1.8.3
ec0ee3d4fea53f1f863eeb588ae11e2c2540e1ca
bad9b7791ac6916c18f93097df63ce0498ef0166
refs/heads/master
2021-01-21T23:24:02.941221
2017-06-23T17:58:32
2017-06-23T17:58:32
95,167,277
0
0
null
null
null
null
UTF-8
Java
false
false
2,438
java
/******************************************************************************* * Mission Control Technologies, Copyright (c) 2009-2012, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * * The MCT platform is 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. * * MCT includes source code licensed under additional open source licenses. See * the MCT Open Source Licenses file included with this distribution or the About * MCT Licenses dialog available at runtime from the MCT Help menu for additional * information. *******************************************************************************/ package gov.nasa.arc.mct.fastplot.view; public class TimeDuration { private int years; private int days; private int hours; private int minutes; private int seconds; public TimeDuration(long ms) { ms /= 1000; seconds = (int) (ms % 60); ms /= 60; minutes = (int) (ms % 60); ms /= 60; hours = (int) (ms % 24); ms /= 24; days = (int) (ms % 365); // Note: May give unexpected values during leap year ms /= 365; years = (int) (ms); } public TimeDuration(int y, int d, int h, int m, int s) { // Check for invalid values years = y; days = d; hours = h; minutes = m; seconds = s; } public int getYears() { return years; } public void setYears(int years) { // Check for invalid values this.years = years; } public int getDays() { return days; } public void setDays(int days) { // Check for invalid values this.days = days; } public int getHours() { return hours; } public void setHours(int hours) { this.hours = hours; } public int getMinutes() { return minutes; } public void setMinutes(int minutes) { this.minutes = minutes; } public int getSeconds() { return seconds; } public void setSeconds(int seconds) { this.seconds = seconds; } }
[ "ricardo910821@gmail.com" ]
ricardo910821@gmail.com
eb2d1c40309a9010e5ce3fcc8dfd06b6760a21c7
de05085d86345bd3e1dc399cefbf714cfefca971
/src/priv/wzb/design_pattern/createdpattern/builderpattern/chapter2/classic/Director.java
24c9e97272b3dea189be33ad515e96bf359db487
[]
no_license
luoziling/Design_Pattern
97e432690cb54d32bb1645a96c2c4b2c81ae2dcf
a74d46be514aafd4a1ec9308e9aec3b108f441af
refs/heads/master
2022-08-09T04:55:35.275356
2021-12-22T09:31:06
2021-12-22T09:31:06
207,322,291
3
0
null
2022-07-15T21:10:05
2019-09-09T13:58:21
Java
UTF-8
Java
false
false
557
java
package priv.wzb.design_pattern.createdpattern.builderpattern.chapter2.classic; /** * @author Satsuki * @time 2019/6/25 15:57 * @description: */ public class Director { private Builder builder; public Director(Builder builder){ this.builder = builder; } public void setBuilder(Builder builder){ this.builder = builder; } //产品构建与组装 public Product construct(){ builder.buildPartA(); builder.buildPartB(); builder.buildPartC(); return builder.getResult(); } }
[ "767218875@qq.com" ]
767218875@qq.com
391e9052159736f73b76b9f6b93f547f2b7b0762
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13303-7-23-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/display/internal/ConfiguredDocumentDisplayer_ESTest_scaffolding.java
f16a9ab62fea9f8a7188588c25cff51221c0cc85
[]
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
458
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Apr 05 20:16:06 UTC 2020 */ package org.xwiki.display.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class ConfiguredDocumentDisplayer_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
84174212f42d77f35464ae7786872969525fd233
0faab98f6e3d88004af705a76bf6913262ec6849
/kos-annotations/tests/kos/sample/validation/SyncValidator.java
586fbfa237346a8a4a4593c49fa101e88cad0430
[ "Apache-2.0" ]
permissive
Skullabs/kos
c64b577efff8f65b13307095fab19f73c172e258
c929403f6395e02fe4d63be73c995fff090fc0ab
refs/heads/master
2023-05-28T11:15:11.000013
2023-05-23T00:41:24
2023-05-23T02:25:49
192,347,667
11
3
Apache-2.0
2023-05-23T02:39:38
2019-06-17T12:59:25
Java
UTF-8
Java
false
false
276
java
package kos.sample.validation; import injector.Singleton; import kos.validation.Validates; import java.util.Objects; import java.util.UUID; @Singleton public class SyncValidator { @Validates void validate(UUID uuid) { Objects.requireNonNull(uuid); } }
[ "miere00@gmail.com" ]
miere00@gmail.com
287f9a6d26c6a7d1b931f58a894ed2b772dea738
071a9fa7cfee0d1bf784f6591cd8d07c6b2a2495
/corpus/class/sling/1255.java
464957ef13328ec7e709b0b010df3462b56b9cdf
[ "MIT" ]
permissive
masud-technope/ACER-Replication-Package-ASE2017
41a7603117f01382e7e16f2f6ae899e6ff3ad6bb
cb7318a729eb1403004d451a164c851af2d81f7a
refs/heads/master
2021-06-21T02:19:43.602864
2021-02-13T20:44:09
2021-02-13T20:44:09
187,748,164
0
0
null
null
null
null
UTF-8
Java
false
false
2,109
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.sling.discovery.base.commons; import java.util.Collection; import org.apache.sling.discovery.ClusterView; import org.apache.sling.discovery.InstanceDescription; /** * Contains some static helper methods around ClusterView */ public class ClusterViewHelper { /** checks whether the cluster view contains a particular sling id **/ public static boolean contains(ClusterView clusterView, String slingId) throws UndefinedClusterViewException { InstanceDescription found = null; for (InstanceDescription i : clusterView.getInstances()) { if (i.getSlingId().equals(slingId)) { if (found != null) { throw new IllegalStateException("multiple instances with slingId found: " + slingId); } found = i; } } return found != null; } /** checks whether the cluster contains any of the provided instances **/ public static boolean containsAny(ClusterView clusterView, Collection<InstanceDescription> listInstances) throws UndefinedClusterViewException { for (InstanceDescription i : listInstances) { if (contains(clusterView, i.getSlingId())) { return true; } } return false; } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
44de0403c4426ccff29e0feb57908c8f8d99c0e4
cb7ca5469115cab34b64a6b3c255660cf8bf6e09
/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/elements/DeliverableFigure.java
08bd5044de0374807d8eb9d79e8cfa071e1905c3
[ "MIT", "LicenseRef-scancode-free-unknown" ]
permissive
archimatetool/archi
59b0a984b3d0471643835cd8f9ff5a648bd97de7
eec0869ad2b6e9c192e127aa9bc00bdbc82b7cd0
refs/heads/master
2023-09-04T02:29:50.509293
2023-08-31T10:28:46
2023-08-31T10:28:46
1,547,663
799
274
MIT
2023-05-26T16:55:05
2011-03-30T19:18:13
Java
UTF-8
Java
false
false
4,286
java
/** * This program and the accompanying materials * are made available under the terms of the License * which accompanies this distribution in the file LICENSE.txt */ package com.archimatetool.editor.diagram.figures.elements; import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.swt.graphics.Path; import org.eclipse.swt.graphics.Pattern; import com.archimatetool.editor.diagram.figures.AbstractTextControlContainerFigure; import com.archimatetool.editor.diagram.figures.IFigureDelegate; import com.archimatetool.editor.diagram.figures.RectangleFigureDelegate; /** * Deliverable Figure * * @author Phillip Beauvoir */ public class DeliverableFigure extends AbstractTextControlContainerFigure implements IArchimateFigure { private IFigureDelegate rectangleDelegate; public DeliverableFigure() { super(TEXT_FLOW_CONTROL); rectangleDelegate = new RectangleFigureDelegate(this); } @Override protected void drawFigure(Graphics graphics) { if(getFigureDelegate() != null) { getFigureDelegate().drawFigure(graphics); drawIcon(graphics); return; } graphics.pushState(); Rectangle bounds = getBounds().getCopy(); bounds.width--; bounds.height--; // Set line width here so that the whole figure is constrained, otherwise SVG graphics will have overspill int lineWidth = 1; setLineWidth(graphics, lineWidth, bounds); graphics.setAlpha(getAlpha()); if(!isEnabled()) { setDisabledState(graphics); } Path path = getFigurePath(8, bounds, (float)lineWidth / 2); // Main Fill graphics.setBackgroundColor(getFillColor()); Pattern gradient = applyGradientPattern(graphics, bounds); graphics.fillPath(path); disposeGradientPattern(graphics, gradient); // Outline graphics.setAlpha(getLineAlpha()); graphics.setForegroundColor(getLineColor()); graphics.drawPath(path); path.dispose(); // Icon // drawIconImage(graphics, bounds); drawIconImage(graphics, bounds, 0, 0, -14, 0); graphics.popState(); } protected Path getFigurePath(float curveHeight, Rectangle rect, float lineOffset) { float curveY = rect.bottom() - curveHeight; Path path = new Path(null); path.moveTo(rect.x, rect.y); path.lineTo(rect.x, curveY - 1); path.quadTo(rect.x + (rect.width / 4), rect.bottom() + curveHeight, rect.x + (rect.width / 2) + 1, curveY); path.quadTo(rect.right() - (rect.width / 4), curveY - curveHeight - 1, rect.right(), curveY); path.lineTo(rect.x + rect.width, rect.y); path.lineTo(rect.x - lineOffset, rect.y); return path; } /** * Draw the icon */ protected void drawIcon(Graphics graphics) { if(!isIconVisible()) { return; } graphics.pushState(); graphics.setLineWidth(1); graphics.setForegroundColor(getIconColor()); Point pt = getIconOrigin(); Rectangle rect = new Rectangle(pt.x, pt.y, 14, 10); Path path = getFigurePath(1.5f, rect, 0); graphics.drawPath(path); path.dispose(); graphics.popState(); } /** * @return The icon start position */ protected Point getIconOrigin() { Rectangle bounds = getBounds(); return new Point(bounds.x + bounds.width - 19, bounds.y + 6); } @Override public int getIconOffset() { return getDiagramModelArchimateObject().getType() == 0 ? 21 : 0; } @Override public IFigureDelegate getFigureDelegate() { return getDiagramModelArchimateObject().getType() == 0 ? rectangleDelegate : null; } }
[ "p.beauvoir@dadabeatnik.com" ]
p.beauvoir@dadabeatnik.com
73115e55097f7d8ea4707d177319065985b25de7
a17dd1e9f5db1c06e960099c13a5b70474d90683
/app-back/src/main/java/jp/co/sint/webshop/web/action/back/shop/PaymentmethodPostRegisterAction.java
c2d47d269f20f85ba73842729d875f3b7be2ca62
[]
no_license
giagiigi/ec_ps
4e404afc0fc149c9614d0abf63ec2ed31d10bebb
6eb19f4d14b6f3a08bfc2c68c33392015f344cdd
refs/heads/master
2020-12-14T07:20:24.784195
2015-02-09T10:00:44
2015-02-09T10:00:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,589
java
package jp.co.sint.webshop.web.action.back.shop; import jp.co.sint.webshop.data.domain.OperatingMode; import jp.co.sint.webshop.data.dto.PostPayment; import jp.co.sint.webshop.service.Permission; import jp.co.sint.webshop.service.ServiceLocator; import jp.co.sint.webshop.service.ServiceResult; import jp.co.sint.webshop.service.ShopManagementService; import jp.co.sint.webshop.service.result.CommonServiceErrorContent; import jp.co.sint.webshop.service.result.ServiceErrorContent; import jp.co.sint.webshop.utility.NumUtil; import jp.co.sint.webshop.web.action.WebActionResult; import jp.co.sint.webshop.web.action.back.BackActionResult; import jp.co.sint.webshop.web.action.back.WebBackAction; import jp.co.sint.webshop.web.bean.back.shop.PaymentmethodPostBean; import jp.co.sint.webshop.web.bean.back.shop.PaymentmethodPostBean.PostDetail; import jp.co.sint.webshop.web.message.WebMessage; import jp.co.sint.webshop.web.message.back.ServiceErrorMessage; import jp.co.sint.webshop.web.text.back.Messages; import jp.co.sint.webshop.web.webutility.WebConstantCode; /** * U1050530:金融機関設定のアクションクラスです * * @author System Integrator Corp. */ public class PaymentmethodPostRegisterAction extends WebBackAction<PaymentmethodPostBean> { /** * ログインユーザの権限を確認し、このアクションの実行を認可するかどうかを返します。 * * @return アクションの実行を認可する場合はtrue */ @Override public boolean authorize() { boolean authorization = false; if (getConfig().getOperatingMode().equals(OperatingMode.MALL) && Permission.SHOP_MANAGEMENT_UPDATE_SITE.isGranted(getLoginInfo())) { authorization = true; } if (getConfig().getOperatingMode().equals(OperatingMode.MALL) && Permission.SHOP_MANAGEMENT_UPDATE_SHOP.isGranted(getLoginInfo()) && getLoginInfo().getShopCode().equals(getConfig().getSiteShopCode())) { authorization = true; } if (getConfig().getOperatingMode().equals(OperatingMode.SHOP) && Permission.SHOP_MANAGEMENT_UPDATE_SITE.isGranted(getLoginInfo())) { authorization = true; } if (getConfig().getOperatingMode().equals(OperatingMode.SHOP) && Permission.SHOP_MANAGEMENT_UPDATE_SHOP.isGranted(getLoginInfo())) { authorization = true; } if (getConfig().getOperatingMode().equals(OperatingMode.ONE) && Permission.SHOP_MANAGEMENT_UPDATE_SITE.isGranted(getLoginInfo())) { authorization = true; } if (getConfig().getOperatingMode().equals(OperatingMode.ONE) && Permission.SHOP_MANAGEMENT_UPDATE_SHOP.isGranted(getLoginInfo()) && getLoginInfo().getShopCode().equals(getConfig().getSiteShopCode())) { authorization = true; } return authorization; } /** * データモデルに格納された入力値の妥当性を検証します。 * * @return 入力値にエラーがなければtrue */ @Override public boolean validate() { PostDetail bean = getBean().getRegisterPost(); return validateBean(bean); } /** * アクションを実行します。 * * @return アクションの実行結果 */ @Override public WebActionResult callService() { PaymentmethodPostBean bean = getBean(); ShopManagementService service = ServiceLocator.getShopManagementService(getLoginInfo()); PostPayment registerPost = new PostPayment(); registerPost.setShopCode(bean.getShopCode()); registerPost.setPaymentMethodNo(NumUtil.toLong(bean.getPaymentMethodNo())); registerPost.setPostAccountName(bean.getRegisterPost().getPostAccountName()); registerPost.setPostAccountNo(bean.getRegisterPost().getPostAccountNo()); registerPost.setUpdatedDatetime(bean.getRegisterPost().getUpdatedDatetime()); ServiceResult result = null; if (bean.getProcessMode().equals(WebConstantCode.PROCESS_INSERT)) { result = service.insertPost(registerPost); } else { result = service.updatePost(registerPost); } if (result.hasError()) { setRequestBean(bean); setNextUrl(null); for (ServiceErrorContent error : result.getServiceErrorList()) { if (error.equals(CommonServiceErrorContent.DUPLICATED_REGISTER_ERROR)) { addErrorMessage(WebMessage.get(ServiceErrorMessage.DUPLICATED_REGISTER_ERROR, Messages.getString("web.action.back.shop.PaymentmethodPostRegisterAction.0"))); return BackActionResult.RESULT_SUCCESS; } if (error.equals(CommonServiceErrorContent.NO_DATA_ERROR)) { addErrorMessage(WebMessage.get(ServiceErrorMessage.NO_DATA_ERROR, Messages.getString("web.action.back.shop.PaymentmethodPostRegisterAction.0"))); return BackActionResult.RESULT_SUCCESS; } if (error.equals(CommonServiceErrorContent.VALIDATION_ERROR)) { return BackActionResult.SERVICE_VALIDATION_ERROR; } } return BackActionResult.SERVICE_ERROR; } setNextUrl("/app/shop/paymentmethod_post/init/" + bean.getShopCode() + "/" + bean.getPaymentMethodNo() + "/register"); return BackActionResult.RESULT_SUCCESS; } /** * Action名の取得 * * @return Action名 */ public String getActionName() { return Messages.getString("web.action.back.shop.PaymentmethodPostRegisterAction.1"); } /** * オペレーションコードの取得 * * @return オペレーションコード */ public String getOperationCode() { return "4105053007"; } }
[ "fengperfect@126.com" ]
fengperfect@126.com
6679b93827762258695a1ea46843aebd9ec82c02
bb42b353b02c8a91c3d75788b45274fd5a9f6735
/src/main/java/com/smmpay/respository/model/SCheckBankRecord.java
fe003d7172f84c172e2af551043820ed12fed819
[]
no_license
danshijin/smmpay-service
bd07cb665f39ebea537bffa3d6db5e847df72e6b
650220ac9dc7808907370bdbdac98cbc6b1b71d4
refs/heads/master
2021-01-12T15:17:52.140022
2018-10-23T03:48:52
2018-10-23T03:48:52
71,748,161
0
1
null
null
null
null
UTF-8
Java
false
false
1,779
java
package com.smmpay.respository.model; import java.math.BigDecimal; public class SCheckBankRecord { public static final int CHECK_RESULT_0 = 0; public static final int CHECK_RESULT_1 = 1; private Integer id; private Integer userId; private String bankNo; private String bankName; private Integer userBandId; private BigDecimal inputMoney; private String checkTime; private Integer checkResult; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getUserId() { return userId; } public void setUserId(Integer userId) { this.userId = userId; } public String getBankNo() { return bankNo; } public void setBankNo(String bankNo) { this.bankNo = bankNo == null ? null : bankNo.trim(); } public String getBankName() { return bankName; } public void setBankName(String bankName) { this.bankName = bankName == null ? null : bankName.trim(); } public Integer getUserBandId() { return userBandId; } public void setUserBandId(Integer userBandId) { this.userBandId = userBandId; } public BigDecimal getInputMoney() { return inputMoney; } public void setInputMoney(BigDecimal inputMoney) { this.inputMoney = inputMoney; } public String getCheckTime() { return checkTime; } public void setCheckTime(String checkTime) { this.checkTime = checkTime == null ? null : checkTime.trim(); } public Integer getCheckResult() { return checkResult; } public void setCheckResult(Integer checkResult) { this.checkResult = checkResult; } }
[ "406701239@qq.com" ]
406701239@qq.com
180f889cb01bb6d8a4777bfdf291d608cd2ef84d
ad63e7b98d35b531c2c6fff312c2e0d9ba648abc
/Rs2-Server/src/org/rs2server/rs2/model/combat/npcs/Banshee.java
f1ffb1e3262f9120d2a800e6cc93bd38b5511e09
[]
no_license
SiF2/Project_PS
16981e3442b2421e6ec8393a0a2901bf91ebc242
76b850be612437e4cbb779f6957463b8895bd4a6
refs/heads/master
2021-01-10T15:45:05.329769
2013-03-05T21:48:16
2013-03-05T21:48:16
8,542,662
0
5
null
null
null
null
UTF-8
Java
false
false
2,757
java
package org.rs2server.rs2.model.combat.npcs; import java.util.Random; import org.rs2server.rs2.model.*; import org.rs2server.rs2.model.combat.impl.AbstractCombatAction; import org.rs2server.rs2.model.container.Equipment; import org.rs2server.rs2.tickable.Tickable; /** * Banshee combat instance * * @author Shiver * */ public class Banshee extends AbstractCombatAction { private enum CombatStyle { MELEE } /** * The random number generator. */ private final Random random = new Random(); /** * Default private constructor. */ public Banshee() { } @Override public boolean canHit(Mob attacker, Mob victim, boolean messages, boolean cannon) { if (!super.canHit(attacker, victim, messages, cannon)) { return false; } /* * if (attacker.isPlayer()) { Player c = (Player) attacker; if * (c.getSkills().getLevel(18) < 15) { * * } } */ return true; } @Override public int distance(Mob victim, Mob attacker) { return 5; } @Override public void hit(final Mob attacker, final Mob victim) { super.hit(attacker, victim); if (!victim.isPlayer()) { return; } Player p = (Player) victim; NPC npc = (NPC) attacker; int maxHit; int damage; int randomHit; int hitDelay; boolean blockAnimation; final int hit; Animation anim = attacker.getAttackAnimation(); attacker.playAnimation(anim); hitDelay = 1; blockAnimation = true; maxHit = npc.getCombatDefinition().getMaxHit(); boolean earsBlocked = true; if (p.getEquipment().get(Equipment.SLOT_HELM) == null || p.getEquipment().get(Equipment.SLOT_HELM).getId() != 4166) { earsBlocked = false; } if (!earsBlocked) { maxHit = p.getSkills().getLevelForExperience(Skills.HITPOINTS) / 10; p.getActionSender().sendMessage( "The Banshee's screech hurts your ears!"); } damage = damage(maxHit, attacker, victim, attacker.getCombatState() .getAttackType(), Skills.ATTACK, Prayers.PROTECT_FROM_MELEE, false, false); randomHit = random.nextInt(damage < 1 ? 1 : damage + 1); if (!earsBlocked && randomHit < damage / 2) { randomHit = damage / 2; } if (randomHit > victim.getSkills().getLevel(Skills.HITPOINTS)) { randomHit = victim.getSkills().getLevel(Skills.HITPOINTS); } hit = randomHit; attacker.getCombatState().setAttackDelay(5); if (!earsBlocked) { attacker.getCombatState().setAttackDelay(4); } World.getWorld().submit(new Tickable(hitDelay) { @Override public void execute() { victim.inflictDamage(new Hit(hit), attacker); smite(attacker, victim, hit); recoil(attacker, victim, hit); this.stop(); } }); vengeance(attacker, victim, hit, 1); victim.getActiveCombatAction().defend(attacker, victim, blockAnimation); } }
[ "killi05@hotmail.com" ]
killi05@hotmail.com
1389934d15a0e8e98288afc331921f275fed1473
af8c0ffa4f2181708532f2b852ca4b718f84eb19
/diorite-api/src/main/java/org/diorite/material/items/ReedsMat.java
9b333e7cc6afc454b6c2722b59ce914a9fcc6855
[ "MIT" ]
permissive
Diorite/Diorite-old
1a5e91483fe6e46e305f866f10cff22846b19816
bfe35f695876f633ae970442f673188e4ff99c9b
refs/heads/master
2021-01-22T15:21:39.404346
2016-08-09T18:10:57
2016-08-09T18:10:57
65,502,014
3
6
null
null
null
null
UTF-8
Java
false
false
4,449
java
/* * The MIT License (MIT) * * Copyright (c) 2016. Diorite (by Bartłomiej Mazur (aka GotoFinal)) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.diorite.material.items; import java.util.Map; import org.diorite.material.ItemMaterialData; import org.diorite.material.PlaceableMat; import org.diorite.utils.collections.maps.CaseInsensitiveMap; import it.unimi.dsi.fastutil.shorts.Short2ObjectMap; import it.unimi.dsi.fastutil.shorts.Short2ObjectOpenHashMap; /** * Class representing 'Reeds' item material in minecraft. <br> * ID of material: 338 <br> * String ID of material: minecraft:reeds <br> * Max item stack size: 64 */ @SuppressWarnings("JavaDoc") public class ReedsMat extends ItemMaterialData implements PlaceableMat { /** * Sub-ids used by diorite/minecraft by default */ public static final int USED_DATA_VALUES = 1; public static final ReedsMat REEDS = new ReedsMat(); private static final Map<String, ReedsMat> byName = new CaseInsensitiveMap<>(USED_DATA_VALUES, SMALL_LOAD_FACTOR); private static final Short2ObjectMap<ReedsMat> byID = new Short2ObjectOpenHashMap<>(USED_DATA_VALUES, SMALL_LOAD_FACTOR); @SuppressWarnings("MagicNumber") public ReedsMat() { super("REEDS", 338, "minecraft:reeds", "REEDS", (short) 0x00); } public ReedsMat(final String enumName, final int id, final String minecraftId, final String typeName, final short type) { super(enumName, id, minecraftId, typeName, type); } public ReedsMat(final String enumName, final int id, final String minecraftId, final int maxStack, final String typeName, final short type) { super(enumName, id, minecraftId, maxStack, typeName, type); } @Override public ReedsMat getType(final int type) { return getByID(type); } @Override public ReedsMat getType(final String type) { return getByEnumName(type); } /** * Returns one of Reeds sub-type based on sub-id, may return null * * @param id sub-type id * * @return sub-type of Reeds or null */ public static ReedsMat getByID(final int id) { return byID.get((short) id); } /** * Returns one of Reeds sub-type based on name (selected by diorite team), may return null * If item contains only one type, sub-name of it will be this same as name of material. * * @param name name of sub-type * * @return sub-type of Reeds or null */ public static ReedsMat getByEnumName(final String name) { return byName.get(name); } /** * Register new sub-type, may replace existing sub-types. * Should be used only if you know what are you doing, it will not create fully usable material. * * @param element sub-type to register */ public static void register(final ReedsMat element) { allItems.incrementAndGet(); byID.put((short) element.getType(), element); byName.put(element.getTypeName(), element); } @Override public ReedsMat[] types() { return ReedsMat.reedsTypes(); } /** * @return array that contains all sub-types of this item. */ public static ReedsMat[] reedsTypes() { return byID.values().toArray(new ReedsMat[byID.size()]); } static { ReedsMat.register(REEDS); } }
[ "bartlomiejkmazur@gmail.com" ]
bartlomiejkmazur@gmail.com
eb449c62ec3311f8c6676faf36d9498901014580
fff8f77f810bbd5fb6b4e5f7a654568fd9d3098d
/src/main/java/com/google/android/gms/fitness/RecordingClient.java
1f99bd60c4cb3c8e52ae230116e409bfac1c0e4d
[]
no_license
TL148/gorkiy
b6ac8772587e9e643d939ea399bf5e7a42e89f46
da8fbd017277cf72020c8c800326954bb1a0cee3
refs/heads/master
2021-05-21T08:24:39.286900
2020-04-03T02:57:49
2020-04-03T02:57:49
252,618,229
0
0
null
2020-04-03T02:54:39
2020-04-03T02:54:39
null
UTF-8
Java
false
false
4,047
java
package com.google.android.gms.fitness; import android.app.Activity; import android.content.Context; import com.google.android.gms.common.api.Api; import com.google.android.gms.common.api.GoogleApi; import com.google.android.gms.common.internal.PendingResultUtil; import com.google.android.gms.fitness.data.DataSource; import com.google.android.gms.fitness.data.DataType; import com.google.android.gms.fitness.data.Subscription; import com.google.android.gms.internal.fitness.zzai; import com.google.android.gms.internal.fitness.zzdr; import com.google.android.gms.tasks.Task; import java.util.List; /* compiled from: com.google.android.gms:play-services-fitness@@18.0.0 */ public class RecordingClient extends GoogleApi<Api.ApiOptions.HasGoogleSignInAccountOptions> { private static final RecordingApi zzie = new zzdr(); protected RecordingClient(Context context, Api.ApiOptions.HasGoogleSignInAccountOptions hasGoogleSignInAccountOptions) { super(context, zzai.zzmx, hasGoogleSignInAccountOptions, GoogleApi.Settings.DEFAULT_SETTINGS); } /* JADX DEBUG: Failed to find minimal casts for resolve overloaded methods, cast all args instead method: com.google.android.gms.common.api.GoogleApi.<init>(android.app.Activity, com.google.android.gms.common.api.Api, com.google.android.gms.common.api.Api$ApiOptions, com.google.android.gms.common.api.GoogleApi$Settings):void arg types: [android.app.Activity, com.google.android.gms.common.api.Api<com.google.android.gms.common.api.Api$ApiOptions$HasGoogleSignInAccountOptions>, com.google.android.gms.common.api.Api$ApiOptions$HasGoogleSignInAccountOptions, com.google.android.gms.common.api.GoogleApi$Settings] candidates: com.google.android.gms.common.api.GoogleApi.<init>(android.app.Activity, com.google.android.gms.common.api.Api, com.google.android.gms.common.api.Api$ApiOptions, com.google.android.gms.common.api.internal.StatusExceptionMapper):void com.google.android.gms.common.api.GoogleApi.<init>(android.content.Context, com.google.android.gms.common.api.Api, com.google.android.gms.common.api.Api$ApiOptions, com.google.android.gms.common.api.GoogleApi$Settings):void com.google.android.gms.common.api.GoogleApi.<init>(android.content.Context, com.google.android.gms.common.api.Api, com.google.android.gms.common.api.Api$ApiOptions, com.google.android.gms.common.api.internal.StatusExceptionMapper):void com.google.android.gms.common.api.GoogleApi.<init>(android.app.Activity, com.google.android.gms.common.api.Api, com.google.android.gms.common.api.Api$ApiOptions, com.google.android.gms.common.api.GoogleApi$Settings):void */ RecordingClient(Activity activity, Api.ApiOptions.HasGoogleSignInAccountOptions hasGoogleSignInAccountOptions) { super(activity, (Api) zzai.zzmx, (Api.ApiOptions) hasGoogleSignInAccountOptions, GoogleApi.Settings.DEFAULT_SETTINGS); } public Task<Void> subscribe(DataType dataType) { return PendingResultUtil.toVoidTask(zzie.subscribe(asGoogleApiClient(), dataType)); } public Task<Void> subscribe(DataSource dataSource) { return PendingResultUtil.toVoidTask(zzie.subscribe(asGoogleApiClient(), dataSource)); } public Task<Void> unsubscribe(DataType dataType) { return PendingResultUtil.toVoidTask(zzie.unsubscribe(asGoogleApiClient(), dataType)); } public Task<Void> unsubscribe(DataSource dataSource) { return PendingResultUtil.toVoidTask(zzie.unsubscribe(asGoogleApiClient(), dataSource)); } public Task<Void> unsubscribe(Subscription subscription) { return PendingResultUtil.toVoidTask(zzie.unsubscribe(asGoogleApiClient(), subscription)); } public Task<List<Subscription>> listSubscriptions() { return PendingResultUtil.toTask(zzie.listSubscriptions(asGoogleApiClient()), zzm.zzho); } public Task<List<Subscription>> listSubscriptions(DataType dataType) { return PendingResultUtil.toTask(zzie.listSubscriptions(asGoogleApiClient(), dataType), zzl.zzho); } }
[ "itaysontesterlab@gmail.com" ]
itaysontesterlab@gmail.com
d74387351fcd8b9e1081de8e4951333cf5eaf47f
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/digits/313d572e1f050451c688b97510efa105685fa275a8442f9119ce9b3f85f46e234cdf03593568e19798aed6b79c66f45c97be937d09b6ff9544f0f59162538575/000/mutations/2231/digits_313d572e_000.java
8fc3d85b476c3929fc36fc918d453050a5d54b3a
[]
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
7,758
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class digits_313d572e_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { digits_313d572e_000 mainClass = new digits_313d572e_000 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj given = new IntObj (), digit10 = new IntObj (), digit9 = new IntObj (), digit8 = new IntObj (), digit7 = new IntObj (), digit6 = new IntObj (), digit5 = new IntObj (), digit4 = new IntObj (), digit3 = new IntObj (), digit2 = new IntObj (), digit1 = new IntObj (); output += (String.format ("\nEnter an interger > ")); given.value = scanner.nextInt (); if (given.value >= 1 && given.value < 10) { digit10.value = given.value % 10; output += (String.format ("\n%d\nThat's all, have a nice day!\n", digit10.value)); } if (given.value >= 10 && given.value < 100) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; output += (String.format ("\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value)); } if (given.value >= 100 && given.value < 1000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; output += (String.format ("\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value)); } if (given.value >= 1000 && given.value < 10000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value)); } if (given.value >= 10000 && given.value < 100000) { ((given.value) / 1000000) % 10 = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value)); } if (given.value >= 100000 && given.value < 1000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value)); } if (given.value >= 1000000 && given.value < 10000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit4.value)); } if (given.value >= 10000000 && given.value < 100000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; digit3.value = (given.value / 10000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit4.value, digit3.value)); } if (given.value >= 100000000 && given.value < 1000000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; digit3.value = (given.value / 10000000) % 10; digit2.value = (given.value / 100000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit4.value, digit3.value, digit2.value)); } if (given.value >= 1000000000 && given.value < 10000000000L) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; digit3.value = (given.value / 10000000) % 10; digit2.value = (given.value / 100000000) % 10; digit1.value = (given.value / 1000000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit4.value, digit3.value, digit2.value, digit1.value)); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
0a8addd3e05cba181637948738c850816b6aa9d0
a5d0b35b3b66a62a9e6f10ef1d91b9a19e79c6a0
/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/MapJoinSignature.java
acfa68742a0b041e1d6ad3aa06cae8d946abedff
[ "Apache-2.0" ]
permissive
DalavanCloud/systemml
f1e7e0d1ac8f9b027fe079ee76e1d4219b7979f2
881f606a89a5683e1a41a1c974fc0188d8600ade
refs/heads/master
2020-04-29T10:04:23.505553
2019-03-13T21:47:11
2019-03-13T21:47:11
176,048,248
1
0
Apache-2.0
2019-03-17T02:41:30
2019-03-17T02:41:30
null
UTF-8
Java
false
false
1,367
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.sysml.runtime.instructions.spark.functions; import org.apache.commons.lang3.ArrayUtils; import org.apache.spark.api.java.function.Function; import org.apache.sysml.runtime.matrix.data.MatrixBlock; import scala.Tuple2; public class MapJoinSignature implements Function<Tuple2<MatrixBlock[],MatrixBlock>, MatrixBlock[]> { private static final long serialVersionUID = -704403012606821854L; @Override public MatrixBlock[] call(Tuple2<MatrixBlock[], MatrixBlock> v1) throws Exception { return ArrayUtils.add(v1._1(), v1._2()); } }
[ "mboehm7@gmail.com" ]
mboehm7@gmail.com
8e9ef0a42cae65816567ee9a1dda597bc943d220
72ef5285dea14d3b93218b43dd50905ededdba9a
/app/src/main/java/com/example/bahung/vtask/ui/adapter/ProjectTabAdapter.java
a5f4dc07b3afbafdc06edad42d48605452d16288
[]
no_license
NguyenHungHust256/vtask
e1e410d4b7c606746ad605dbb2dbd60e65db427b
bbe8b468bf55ce7bdb1877540141e812ee33091a
refs/heads/master
2021-04-09T15:23:05.319285
2018-06-30T12:38:19
2018-06-30T12:38:19
125,655,351
0
0
null
null
null
null
UTF-8
Java
false
false
1,084
java
package com.example.bahung.vtask.ui.adapter; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import com.example.bahung.vtask.ui.fragment.ProjectFragment.IsDoingProjectFragment; /** * Created by bahung on 27/03/2018. **/ public class ProjectTabAdapter extends FragmentPagerAdapter { public static final int PAGE_COUNT = 2; public static final String tieuDeTabs[] = new String[]{"ĐANG LÀM", "HOÀN THÀNH"}; public ProjectTabAdapter(FragmentManager fm) { super(fm); } @Override public Fragment getItem(int position) { Fragment fragment = null; if(position == 0){ fragment = new IsDoingProjectFragment(); } else if(position == 1) { fragment = new IsDoingProjectFragment(); } return fragment; } @Override public int getCount() { return PAGE_COUNT; } @Override public CharSequence getPageTitle(int position) { return tieuDeTabs[position]; } }
[ "hungpronguyen256@gmail.com" ]
hungpronguyen256@gmail.com
570b80c64dc6340b10be9bd7d3098a84fb69d608
5537992cc28755e256e7084dfbbb04d81ee53da3
/Elderly_langlang/src/com/langlang/ble/GattServicesInfo.java
d1c1901345f3e0efaec97b375dcd6e9dd7053a18
[]
no_license
blefreedom/Android
22816b1bcb598a821eb6a01a70745ce701350d8c
f43e97ef88e5fd579af009325c7f8c5929392833
refs/heads/master
2021-01-17T21:55:38.906476
2016-07-02T01:15:39
2016-07-02T01:15:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,872
java
package com.langlang.ble; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import com.langlang.elderly_langlang.R; import android.annotation.SuppressLint; import android.bluetooth.BluetoothGattCharacteristic; import android.bluetooth.BluetoothGattService; import android.content.res.Resources; import android.content.res.Resources.NotFoundException; /** * This class saves gatt services and characteristics info. * * @author Henry * */ @SuppressLint("NewApi") public class GattServicesInfo implements Serializable { /** * serial id. */ private static final long serialVersionUID = 278970856415348306L; public static final String LIST_NAME = "NAME"; public static final String LIST_UUID = "UUID"; ArrayList<HashMap<String, String>> gattServiceData = new ArrayList<HashMap<String, String>>(); ArrayList<ArrayList<HashMap<String, String>>> gattCharacteristicData = new ArrayList<ArrayList<HashMap<String, String>>>(); ArrayList<ArrayList<BluetoothGattCharacteristic>> mGattCharacteristics = new ArrayList<ArrayList<BluetoothGattCharacteristic>>(); ArrayList<String> serviceUUIDList = new ArrayList<String>(); /** * Constructor of this class. * @param gattServices list of gatt services. * @param resources available resources object to provide resource access, allows null. */ public GattServicesInfo(List<BluetoothGattService> gattServices, Resources resources) { if (gattServices == null) return; String uuid = null; String unknownServiceString = "unknown service"; String unknownCharaString = "unknown_characteristic"; if (resources != null) { try { unknownServiceString = resources.getString( R.string.unknown_service); unknownCharaString = resources.getString( R.string.unknown_characteristic); } catch(NotFoundException e) { // Do nothing. } } // Loops through available GATT Services. for (BluetoothGattService gattService : gattServices) { HashMap<String, String> currentServiceData = new HashMap<String, String>(); uuid = gattService.getUuid().toString(); serviceUUIDList.add(uuid); currentServiceData.put(LIST_NAME, SampleGattAttributes.lookup(uuid, unknownServiceString)); currentServiceData.put(LIST_UUID, uuid); gattServiceData.add(currentServiceData); ArrayList<HashMap<String, String>> gattCharacteristicGroupData = new ArrayList<HashMap<String, String>>(); List<BluetoothGattCharacteristic> gattCharacteristics = gattService .getCharacteristics(); ArrayList<BluetoothGattCharacteristic> charas = new ArrayList<BluetoothGattCharacteristic>(); // Loops through available Characteristics. for (BluetoothGattCharacteristic gattCharacteristic : gattCharacteristics) { charas.add(gattCharacteristic); HashMap<String, String> currentCharaData = new HashMap<String, String>(); uuid = gattCharacteristic.getUuid().toString(); currentCharaData.put(LIST_NAME, SampleGattAttributes.lookup(uuid, unknownCharaString)); currentCharaData.put(LIST_UUID, uuid); gattCharacteristicGroupData.add(currentCharaData); } mGattCharacteristics.add(charas); gattCharacteristicData.add(gattCharacteristicGroupData); } } /** * Return available gatt services info list, each element of list is map object and save service Name and service UUID. * * @return */ public ArrayList<HashMap<String, String>> getServiceList() { return gattServiceData; } /** * Return list of all characteristic info, each element of top list saves * all characteristics info of relative gatt service, the index of each * element is relative to gatt service indexed and indicated in * <code>gattServiceData</code> list object.<p> * Each element of top list is a list of map to save each gatt characteristic name and UUID. * @return */ public ArrayList<ArrayList<HashMap<String, String>>> getCharacteristicList() { return gattCharacteristicData; } /** * Return all available gatt characteristic instances, the index of each * element of top list is relative to gatt service indexed and indicated in * <code>gattServiceData</code> list object. * * @return */ public ArrayList<ArrayList<BluetoothGattCharacteristic>> getHierarchicalGattCharacteristicsList() { return mGattCharacteristics; } /** * Return all gatt characteristic instances of specified service. * * @param servicePosition * @return */ public ArrayList<BluetoothGattCharacteristic> getGattCharacteristicsList(int servicePosition) { return mGattCharacteristics.get(servicePosition); } /** * Return gatt characteristic instance by specified service position and characteristic position. * * @param servicePosition * @param charaPosition * @return */ public BluetoothGattCharacteristic getGattCharacteristic(int servicePosition, int charaPosition) { return getGattCharacteristicsList(servicePosition).get(charaPosition); } /** * Return all gatt characteristic instances of specified service. * * @param serviceUUID * @param charaUUID * @return */ public ArrayList<BluetoothGattCharacteristic> getGattCharacteristicList(String serviceUUID) { int sUuid = serviceUUIDList.indexOf(serviceUUID); if (sUuid >= 0) { return mGattCharacteristics.get(sUuid); } return null; } /** * Return gatt characteristic instance by specified service UUID and characteristic UUID. * * @param serviceUUID * @param charaUUID * @return */ public BluetoothGattCharacteristic getGattCharacteristic(String serviceUUID, String charaUUID) { ArrayList<BluetoothGattCharacteristic> charaList = getGattCharacteristicList(serviceUUID); if (charaList != null ) { for (BluetoothGattCharacteristic bgc : charaList) { if (bgc.getUuid().equals(charaUUID)) { return bgc; } } } return null; } }
[ "devryan@163.com" ]
devryan@163.com
fa66da16449e044d392444c1a12078e3ee54537d
30cf12e4016cc89018b554465406e8f9fa4ec3b3
/javaEE/src/驾校考试模拟/Test.java
277b0c592ceb5d3904b77e7bc31a5e7e61bd2706
[]
no_license
guangjianwei/ssm_sum
9f9b3279ca35599a0495457ab6f9f9db3c9ad025
7545c1e7f4a8626f1a3d8f832bd73cc296523f19
refs/heads/master
2020-04-04T12:52:47.394638
2018-11-03T02:51:03
2018-11-03T02:51:03
155,940,658
1
1
null
null
null
null
UTF-8
Java
false
false
1,841
java
package 驾校考试模拟; import java.util.*; import java.util.function.Supplier; public class Test { public static void main(String[] args) { //先生成一个教练 Instructor instructor = new Instructor("教练",35); //生成一个8个学生类的list集合。(里面的姓名和年龄都是随机的)。 List<Integer> list= new ArrayList<>(); List<Student> student = getStudent(list); //定义一个Map双列集合,用来存储<评分(教练给与的),Student对象> Map<String,Student> mapScoreStudent = new HashMap<>(); //准备考试 System.out.println("前往考场..."); System.out.println("到达考场..."); System.out.println("准备考试..."); ExamHall examHall =new ExamHall(); examHall.examStart(student); examHall.examEnd(student); } private static List<Student> getStudent(List<Integer> list) { Random ran = new Random(); //获取8个1-1000以内的随机号不重复的随机号 while(true){ int temp= ran.nextInt(1000); if(!list.contains(temp)){ list.add(temp); } if(list.size()==8){ break; } } //生成8个随机姓名和年龄的学生,存入学生集合当中 List<Student> perList= new ArrayList<>(); for (int i = 0; i < 8; i++){ String name = list.get(i)+"号"; int age = ran.nextInt(17)+18; Student student = getObj(Student::new); student.setName(name); student.setAge(age); perList.add(student); } return perList; } //生产student类 public static<T> T getObj(Supplier<T> supplier){ return supplier.get(); } }
[ "admin@qq.com" ]
admin@qq.com
8e5186f3b2ac07bcce6a00fcc177d2c822e63fcb
93d56a23451663dad44a8e742f4df9d5080db868
/src/main/java/modchu/lib/modloader/mc152/Modchu_EntityAIBase.java
b68328233a5d3e11366a79ca04e3774179b17604
[]
no_license
Modchu/ModchuLib
29e77cbb6b303aa910c27da9a98bcfb5043e2b44
f32adbcad30da993ce337abeff2c135d7af1352d
refs/heads/master
2021-07-12T06:57:09.879558
2021-02-21T14:03:27
2021-02-21T14:03:27
7,611,520
5
2
null
2013-03-12T11:02:52
2013-01-14T19:57:43
Java
UTF-8
Java
false
false
2,525
java
package modchu.lib.modloader.mc152; import java.util.HashMap; import modchu.lib.Modchu_IEntityAIBase; import modchu.lib.Modchu_IEntityAIBaseMaster; import modchu.lib.Modchu_Main; import net.minecraft.src.EntityAIBase; public class Modchu_EntityAIBase extends EntityAIBase implements Modchu_IEntityAIBase { public Modchu_IEntityAIBaseMaster master; private boolean enabled; public Modchu_EntityAIBase(HashMap<String, Object> map) { map.put("base", this); Object instance = Modchu_Main.newModchuCharacteristicInstance(map); //Modchu_Debug.lDebug("Modchu_EntityAIBase init instance="+instance); master = instance != null && instance instanceof Modchu_IEntityAIBaseMaster ? (Modchu_IEntityAIBaseMaster) instance : null; setEnabled(true); } @Override public boolean isEnabled() { return enabled; } @Override public void setEnabled(boolean b) { enabled = b; } @Override public boolean shouldExecute() { return master != null ? master.shouldExecute() : false; } @Override public boolean superShouldExecute() { return false; } @Override public boolean continueExecuting() { return master != null ? master.shouldContinueExecuting() : super.continueExecuting(); } @Override public boolean superShouldContinueExecuting() { return super.continueExecuting(); } @Override public boolean isInterruptible() { return master != null ? master.isInterruptible() : super.isInterruptible(); } @Override public boolean superIsInterruptible() { return super.isInterruptible(); } @Override public void startExecuting() { if (master != null) master.startExecuting(); else superStartExecuting(); } @Override public void superStartExecuting() { if (isEnabled()) super.startExecuting(); } @Override public void resetTask() { if (master != null) master.resetTask(); else super.resetTask(); } @Override public void superResetTask() { super.resetTask(); } @Override public void updateTask() { if (master != null) master.updateTask(); else super.updateTask(); } @Override public void superUpdateTask() { super.updateTask(); } @Override public void setMutexBits(int par1) { if (master != null) master.setMutexBits(par1); else super.setMutexBits(par1); } @Override public void superSetMutexBits(int par1) { super.setMutexBits(par1); } @Override public int getMutexBits() { return master != null ? master.getMutexBits() : super.getMutexBits(); } @Override public int superGetMutexBits() { return super.getMutexBits(); } }
[ "kawd82jstskl@yahoo.co.jp" ]
kawd82jstskl@yahoo.co.jp
614c45d4dde9d11518869cff7440bcb5158b07fd
351ede50510f06a75b9d3a376f124ec99077a3c4
/mallplus-portal/src/main/java/com/zrp/mallplus/ums/service/IUmsMemberProductCategoryRelationService.java
2dfecc048003206fd3430161858dc592e33e0779
[]
no_license
zhangRuiPei/mallPlus
5ada557425d27490d49a3cebd17a4ddc5993940d
e23741c50b0f4f1d65de438f0caaddd0c7794285
refs/heads/master
2022-12-17T22:42:29.697965
2020-09-14T09:36:44
2020-09-14T09:36:44
293,774,917
0
0
null
null
null
null
UTF-8
Java
false
false
418
java
package com.zrp.mallplus.ums.service; import com.baomidou.mybatisplus.extension.service.IService; import com.zrp.mallplus.ums.entity.UmsMemberProductCategoryRelation; /** * <p> * 会员与产品分类关系表(用户喜欢的分类) 服务类 * </p> * * @author zscat * @since 2019-04-19 */ public interface IUmsMemberProductCategoryRelationService extends IService<UmsMemberProductCategoryRelation> { }
[ "695239914@qq.com" ]
695239914@qq.com
638f7067de95158936471ea4d711b97f7676d3f6
ad5b11ce6186ca76bf4098852d34b4a806906b1f
/zhao_sheng/src/main/java/com/yfy/app/net/authentication/AuthenticationLoginReq.java
9831664e3ac1aa9e37b20c880dc3972dbe570324
[]
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
876
java
package com.yfy.app.net.authentication; import com.yfy.final_tag.Base; import com.yfy.final_tag.TagFinal; import org.simpleframework.xml.Element; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.Order; import org.simpleframework.xml.Root; /** * Created by yfyandr on 2018/4/26. */ @Root(name = TagFinal.AUTHENTICATION_LOGIN, strict = false) @Namespace(reference = Base.NAMESPACE) @Order(elements = {Base.name,Base.phone}) public class AuthenticationLoginReq { @Namespace(reference = Base.NAMESPACE) @Element(name = Base.name, required = false) private String name; @Namespace(reference = Base.NAMESPACE) @Element(name = Base.phone, required = false) private String phone; public void setName(String name) { this.name = name; } public void setPhone(String phone) { this.phone = phone; } }
[ "1006584058@qq.com" ]
1006584058@qq.com
e5b989269db5a1fa101ebd611d4142a496ba6991
d5b2564069478e6387849bb04fc38d0ec56aee3d
/zuulproxyservice/src/main/java/com/imadelfetouh/zuulproxyservice/jwt/ValidateJWTToken.java
a3b13152229567ad3c2b7d07c083994ee0866b25
[]
no_license
imadfetouh/zuulproxyservice
9d139c480235a87b8a42a7fd6c42f4d445035005
2361b358097d89901c2773ebc905b0a63f9de19a
refs/heads/main
2023-04-26T20:26:38.982738
2021-05-05T16:41:40
2021-05-05T16:41:40
348,371,882
0
0
null
null
null
null
UTF-8
Java
false
false
1,104
java
package com.imadelfetouh.zuulproxyservice.jwt; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jws; import io.jsonwebtoken.JwtException; import io.jsonwebtoken.Jwts; import java.security.Key; import java.util.logging.Level; import java.util.logging.Logger; public class ValidateJWTToken { private static final Logger logger = Logger.getLogger(ValidateJWTToken.class.getName()); private static final ValidateJWTToken validateJWTToken = new ValidateJWTToken(); public static ValidateJWTToken getInstance(){ return validateJWTToken; } private Jws<Claims> getClaims(String jwtToken){ Key key = SecretKeyGenerator.getInstance().getKey(); return Jwts.parserBuilder() .setSigningKey(key) .build() .parseClaimsJws(jwtToken); } public String getUserData(String jwtToken){ try { return (String) getClaims(jwtToken).getBody().get("userdata"); } catch (JwtException e){ logger.log(Level.ALL, e.getMessage()); return null; } } }
[ "imad.elfetouh@hotmail.com" ]
imad.elfetouh@hotmail.com
c15ed813dd771dd7100b4b35f66244818d7de8c4
ece153c7951245fd47b1e7e12c33896f557e68db
/common-crawler-comb/src/main/java/com/crawler/gsxt/htmlparser/AbstractGsxtParser.java
0d7d323c5b06563bbbf9c8c42228ce2119cff5c0
[]
no_license
zhonghuayichen/crawler
05ed2a66adb1ea13ea7b43ca44ab5345c52c45ab
056f388477afa63bed5cf16e45e0ac0e95681d7d
refs/heads/master
2021-01-13T04:59:39.367625
2017-02-07T08:25:25
2017-02-07T08:25:25
81,163,841
0
0
null
2017-02-07T03:49:51
2017-02-07T03:49:51
null
UTF-8
Java
false
false
161
java
package com.crawler.gsxt.htmlparser; import com.crawler.htmlparser.AbstractParser; public abstract class AbstractGsxtParser extends AbstractParser { }
[ "gengjie@upbase.com.cn" ]
gengjie@upbase.com.cn
e35ed0649e4adbf96bbe80c182097e48b69436cf
267ee531636400c48e7a089952253aebfb96ee57
/main/java/dtx/src/main/java/io/eguan/dtx/TransactionMonitorHandler.java
e0b3e7501acc0b35966eac892ffa2e14f76b6511
[]
no_license
juanmaneo/eguan
62eb32b770d56633c3b564172c6b074d935b3be0
f36f9e464129dd459f5bfdf6c24edf9f73ef4540
refs/heads/master
2020-12-24T12:04:50.905235
2016-04-07T23:36:58
2016-04-07T23:36:58
21,627,457
0
0
null
null
null
null
UTF-8
Java
false
false
6,492
java
package io.eguan.dtx; /* * #%L * Project eguan * %% * Copyright (C) 2012 - 2016 Oodrive * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import static io.eguan.dtx.DtxResourceManagerState.UNDETERMINED; import java.io.Serializable; import java.util.Set; import java.util.UUID; import javax.transaction.xa.XAException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.hazelcast.core.AtomicNumber; import com.hazelcast.core.HazelcastInstance; import com.hazelcast.core.LifecycleEvent; import com.hazelcast.core.LifecycleListener; /** * Transaction monitor to be sent to all nodes participating in a transaction. * * @author oodrive * @author pwehrle * */ final class TransactionMonitorHandler extends AbstractDistOpHandler implements Runnable { private class ShutdownListener implements LifecycleListener, Serializable { private static final long serialVersionUID = 3075326218179487411L; @Override public void stateChanged(final LifecycleEvent event) { switch (event.getState()) { case SHUTTING_DOWN: case SHUTDOWN: shutdown = true; break; default: // nothing } } } private static final long serialVersionUID = 3261167430220912186L; private static final Logger LOGGER = LoggerFactory.getLogger(TransactionMonitorHandler.class); private static final int TX_CHECK_OCCURRENCES = 10; private final long txId; private final long timeout; private final UUID resId; private final LifecycleListener shutdownListener = new ShutdownListener(); private boolean shutdown; /** * Constructs an instance for a given transaction. * * @param txId * the transaction's ID * @param resId * the target resource manager's {@link UUID} * @param timeout * the timeout in milliseconds beyond which the transaction is to be rolled back locally * @param participants * the {@link Set} of participants to record with the transaction rollback */ TransactionMonitorHandler(final long txId, final UUID resId, final long timeout, final Set<DtxNode> participants) { super(participants); this.txId = txId; this.resId = resId; this.timeout = timeout; } @Override public final void run() { final HazelcastInstance hzInstance = getHazelcastInstance(); final AtomicNumber currCounter = hzInstance.getAtomicNumber(TransactionInitiator.TX_CURRENT_ID); final long limit = System.currentTimeMillis() + timeout; hzInstance.getLifecycleService().addLifecycleListener(shutdownListener); try { final TransactionManager txMgr = getTransactionManager(); final long txCheckInterval = timeout / TX_CHECK_OCCURRENCES; long currTxId; do { try { currTxId = currCounter.get(); Thread.sleep(txCheckInterval); } catch (IllegalStateException | InterruptedException e) { // gracefully exit if monitoring conditions are degraded return; } } while (currTxId <= txId && System.currentTimeMillis() < limit); /* * TODO: before calling any "starveable" methods (getting resource managers or last tx IDs), seek out and * destroy any previous deadlocked or starving thread still holding those locks */ final DtxResourceManager targetResMgr = txMgr.getRegisteredResourceManager(resId); if (targetResMgr == null) { // resource manager vanished, abort if (LOGGER.isTraceEnabled()) { LOGGER.trace("Resource manager gone, aborting; txId=" + txId + ", resId=" + resId + ", node=" + txMgr.getLocalNode()); } return; } final long lastTxId = txMgr.getLastCompleteTxIdForResMgr(resId); // transaction passed if (currTxId > txId) { if (lastTxId < txId && targetResMgr != null) { // transaction end phase didn't end up here -> resync if (LOGGER.isDebugEnabled()) { LOGGER.debug("Transaction not recorded locally; txId=" + txId + ", last local=" + lastTxId); } txMgr.setResManagerSyncState(resId, UNDETERMINED); } return; } // transaction monitor timed out if (LOGGER.isDebugEnabled()) { LOGGER.debug("Monitor on transaction timed out; txId=" + txId + ", nodeId=" + hzInstance.getName()); } try { try { if (lastTxId < txId && targetResMgr != null) { // roll back locally txMgr.rollback(txId, getParticipants()); } } catch (final XAException e) { LOGGER.error("Rollback after timeout failed; txId=" + txId + ", nodeId=" + hzInstance.getName() + ", errorCode=" + e.errorCode); txMgr.setResManagerSyncState(resId, UNDETERMINED); } finally { if (!shutdown) { DtxUtils.updateAtomicNumberToAtLeast(currCounter, txId); } } } catch (final IllegalStateException e) { LOGGER.error("Illegal state; txId=" + txId + ", nodeId=" + hzInstance.getName(), e); } } finally { hzInstance.getLifecycleService().removeLifecycleListener(shutdownListener); } } }
[ "p.wehrle@oodrive.com" ]
p.wehrle@oodrive.com
125f3580edfa769ee00903b9fa795ae203b19e62
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/TemperatureController3340.java
a1bb01cd134ef64f8952c0ed10a0507dd992f4a1
[]
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
371
java
package syncregions; public class TemperatureController3340 { public int execute(int temperature3340, int targetTemperature3340) { //sync _bfpnFUbFEeqXnfGWlV3340, behaviour 1-if(temperatureDifference > 0 && boilerStatus == true) { return 1; } else if (temperatureDifference < 0 && boilerStatus == false) { return 2; } else return 0; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
d1eabb9af4ef0e592c80bb2d7ccdbd643345e5cd
7f20b1bddf9f48108a43a9922433b141fac66a6d
/cytoscape3/branches/mikes_new_model_branch/network/src/main/java/org/cytoscape/model/network/internal/GraphObjImpl.java
fa85ad25292b0130d50472b22cf9f279af88faf4
[]
no_license
ahdahddl/cytoscape
bf783d44cddda313a5b3563ea746b07f38173022
a3df8f63dba4ec49942027c91ecac6efa920c195
refs/heads/master
2020-06-26T16:48:19.791722
2013-08-28T04:08:31
2013-08-28T04:08:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
924
java
package org.cytoscape.model.internal; import org.cytoscape.model.GraphObject; import org.cytoscape.model.Identifiable; import org.cytoscape.model.CyRow; import org.cytoscape.model.CyDataTable; import java.util.Map; class GraphObjImpl implements GraphObject, Identifiable { private final long suid; private final Map<String,CyAttributesManager> attrMgr; GraphObjImpl(final Map<String,CyAttributesManager> attrMgr) { suid = IdFactory.getNextSUID(); this.attrMgr = attrMgr; } public long getSUID() { return suid; } public CyAttributes getCyAttributes(String namespace) { if ( namespace == null ) throw new NullPointerException("namespace is null"); CyAttributesManager mgr = attrMgr.get(namespace); if ( mgr == null ) throw new NullPointerException("attribute manager is null for namespace: " + namespace); return mgr.getCyAttributes(suid); } }
[ "mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5" ]
mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5
d36e90642568068681cb8f696d921d9df79884b3
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.socialplatform-base/sources/X/AnonymousClass0K4.java
e5e5f2ef4aa7cca16626f3b854d1b32c885fda63
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
181
java
package X; import javax.annotation.concurrent.ThreadSafe; @ThreadSafe /* renamed from: X.0K4 reason: invalid class name */ public interface AnonymousClass0K4 { long now(); }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
a98f731d09cab390a4e23fe8b487895c082d2a21
776f7a8bbd6aac23678aa99b72c14e8dd332e146
/src/com/google/android/gms/common/stats/zzc.java
e151e6e687a83af3388f389d2e76d040d5e4b78b
[]
no_license
arvinthrak/com.nianticlabs.pokemongo
aea656acdc6aa419904f02b7331f431e9a8bba39
bcf8617bafd27e64f165e107fdc820d85bedbc3a
refs/heads/master
2020-05-17T15:14:22.431395
2016-07-21T03:36:14
2016-07-21T03:36:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,414
java
package com.google.android.gms.common.stats; import com.google.android.gms.internal.zzlr; public final class zzc { public static zzlr<Integer> zzahG = zzlr.zza("gms:common:stats:max_num_of_events", Integer.valueOf(100)); public static final class zza { public static zzlr<Integer> zzahH = zzlr.zza("gms:common:stats:connections:level", Integer.valueOf(zzd.LOG_LEVEL_OFF)); public static zzlr<String> zzahI = zzlr.zzu("gms:common:stats:connections:ignored_calling_processes", ""); public static zzlr<String> zzahJ = zzlr.zzu("gms:common:stats:connections:ignored_calling_services", ""); public static zzlr<String> zzahK = zzlr.zzu("gms:common:stats:connections:ignored_target_processes", ""); public static zzlr<String> zzahL = zzlr.zzu("gms:common:stats:connections:ignored_target_services", "com.google.android.gms.auth.GetToken"); public static zzlr<Long> zzahM = zzlr.zza("gms:common:stats:connections:time_out_duration", Long.valueOf(600000L)); } public static final class zzb { public static zzlr<Integer> zzahH = zzlr.zza("gms:common:stats:wakeLocks:level", Integer.valueOf(zzd.LOG_LEVEL_OFF)); public static zzlr<Long> zzahM = zzlr.zza("gms:common:stats:wakelocks:time_out_duration", Long.valueOf(600000L)); } } /* Location: * Qualified Name: com.google.android.gms.common.stats.zzc * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
9b71935e482a525c1b22f2beb57528fb70005baf
29d94e8d0a27ae3d46dd13046dbe91d083b290b4
/learn_mybatis/src/main/java/org/lsh/mybatis/config/Configuration.java
bcc1b44565eb84e540fad61be8038178f92c9199
[]
no_license
huaidandaidai/java_learn
18f06e59200e9ff616b25c99d3a95c88f12b15ca
ce0663d06b977f2e4029e9ec82d2a3ac22227c16
refs/heads/master
2022-06-30T04:50:18.750818
2019-10-19T14:14:57
2019-10-19T14:14:57
188,421,133
0
0
null
2022-06-21T01:10:01
2019-05-24T12:50:43
Java
UTF-8
Java
false
false
1,339
java
package org.lsh.mybatis.config; import java.util.HashMap; import java.util.Map; /** * @Title: java类的类型 * @Author: lsh * @CreateDate: 2018/8/24 10:38 */ public class Configuration { private String jdbcDriver; private String jdbcUrl; private String jdbcUserName; private String jdbcPassword; private Map<String, MappedStatement> mapperStatements = new HashMap<String, MappedStatement>(); public String getJdbcDriver() { return jdbcDriver; } public void setJdbcDriver(String jdbcDriver) { this.jdbcDriver = jdbcDriver; } public String getJdbcUrl() { return jdbcUrl; } public void setJdbcUrl(String jdbcUrl) { this.jdbcUrl = jdbcUrl; } public String getJdbcUserName() { return jdbcUserName; } public void setJdbcUserName(String jdbcUserName) { this.jdbcUserName = jdbcUserName; } public String getJdbcPassword() { return jdbcPassword; } public void setJdbcPassword(String jdbcPassword) { this.jdbcPassword = jdbcPassword; } public Map<String, MappedStatement> getMapperStatements() { return mapperStatements; } public void setMapperStatements(Map<String, MappedStatement> mapperStatements) { this.mapperStatements = mapperStatements; } }
[ "1qaz@WX" ]
1qaz@WX
68d139d4162d1def1943bba9782ba19e36513d20
13cbb329807224bd736ff0ac38fd731eb6739389
/sun/java2d/opengl/OGLUtilities.java
100fec4bb382ac93915cab1b928e195754dd2d1f
[]
no_license
ZhipingLi/rt-source
5e2537ed5f25d9ba9a0f8009ff8eeca33930564c
1a70a036a07b2c6b8a2aac6f71964192c89aae3c
refs/heads/master
2023-07-14T15:00:33.100256
2021-09-01T04:49:04
2021-09-01T04:49:04
401,933,858
0
0
null
null
null
null
UTF-8
Java
false
false
4,045
java
package sun.java2d.opengl; import java.awt.Graphics; import java.awt.GraphicsConfiguration; import java.awt.Rectangle; import sun.java2d.SunGraphics2D; import sun.java2d.SurfaceData; import sun.java2d.pipe.Region; class OGLUtilities { public static final int UNDEFINED = 0; public static final int WINDOW = 1; public static final int PBUFFER = 2; public static final int TEXTURE = 3; public static final int FLIP_BACKBUFFER = 4; public static final int FBOBJECT = 5; public static boolean isQueueFlusherThread() { return OGLRenderQueue.isQueueFlusherThread(); } public static boolean invokeWithOGLContextCurrent(Graphics paramGraphics, Runnable paramRunnable) { oGLRenderQueue = OGLRenderQueue.getInstance(); oGLRenderQueue.lock(); try { if (paramGraphics != null) { if (!(paramGraphics instanceof SunGraphics2D)) return false; SurfaceData surfaceData = ((SunGraphics2D)paramGraphics).surfaceData; if (!(surfaceData instanceof OGLSurfaceData)) return false; OGLContext.validateContext((OGLSurfaceData)surfaceData); } oGLRenderQueue.flushAndInvokeNow(paramRunnable); OGLContext.invalidateCurrentContext(); } finally { oGLRenderQueue.unlock(); } return true; } public static boolean invokeWithOGLSharedContextCurrent(GraphicsConfiguration paramGraphicsConfiguration, Runnable paramRunnable) { if (!(paramGraphicsConfiguration instanceof OGLGraphicsConfig)) return false; oGLRenderQueue = OGLRenderQueue.getInstance(); oGLRenderQueue.lock(); try { OGLContext.setScratchSurface((OGLGraphicsConfig)paramGraphicsConfiguration); oGLRenderQueue.flushAndInvokeNow(paramRunnable); OGLContext.invalidateCurrentContext(); } finally { oGLRenderQueue.unlock(); } return true; } public static Rectangle getOGLViewport(Graphics paramGraphics, int paramInt1, int paramInt2) { if (!(paramGraphics instanceof SunGraphics2D)) return null; SunGraphics2D sunGraphics2D = (SunGraphics2D)paramGraphics; SurfaceData surfaceData = sunGraphics2D.surfaceData; int i = sunGraphics2D.transX; int j = sunGraphics2D.transY; Rectangle rectangle = surfaceData.getBounds(); int k = i; int m = rectangle.height - j + paramInt2; return new Rectangle(k, m, paramInt1, paramInt2); } public static Rectangle getOGLScissorBox(Graphics paramGraphics) { if (!(paramGraphics instanceof SunGraphics2D)) return null; SunGraphics2D sunGraphics2D = (SunGraphics2D)paramGraphics; SurfaceData surfaceData = sunGraphics2D.surfaceData; Region region = sunGraphics2D.getCompClip(); if (!region.isRectangular()) return null; int i = region.getLoX(); int j = region.getLoY(); int k = region.getWidth(); int m = region.getHeight(); Rectangle rectangle = surfaceData.getBounds(); int n = i; int i1 = rectangle.height - j + m; return new Rectangle(n, i1, k, m); } public static Object getOGLSurfaceIdentifier(Graphics paramGraphics) { return !(paramGraphics instanceof SunGraphics2D) ? null : ((SunGraphics2D)paramGraphics).surfaceData; } public static int getOGLSurfaceType(Graphics paramGraphics) { if (!(paramGraphics instanceof SunGraphics2D)) return 0; SurfaceData surfaceData = ((SunGraphics2D)paramGraphics).surfaceData; return !(surfaceData instanceof OGLSurfaceData) ? 0 : ((OGLSurfaceData)surfaceData).getType(); } public static int getOGLTextureType(Graphics paramGraphics) { if (!(paramGraphics instanceof SunGraphics2D)) return 0; SurfaceData surfaceData = ((SunGraphics2D)paramGraphics).surfaceData; return !(surfaceData instanceof OGLSurfaceData) ? 0 : ((OGLSurfaceData)surfaceData).getTextureTarget(); } } /* Location: D:\software\jd-gui\jd-gui-windows-1.6.3\rt.jar!\sun\java2d\opengl\OGLUtilities.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.0.7 */
[ "michael__lee@yeah.net" ]
michael__lee@yeah.net
0667cbceb9221a8f05e86c90326a3a727094c391
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/neo4j/learning/573/CypherResultRepresentationTest.java
2e36d792f260afe6a2222d72241b4a83009d0d22
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,748
java
/* * Copyright (c) 2002-2018 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.server.rest.repr; import org.junit.Rule; import org.junit.Test; import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.neo4j.graphdb.ExecutionPlanDescription; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.Result; import org.neo4j.graphdb.Transaction; import org.neo4j.helpers.collection.MapUtil; import org.neo4j.server.rest.repr.formats.JsonFormat; import org.neo4j.test.rule.DatabaseRule; import org.neo4j.test.rule.ImpermanentDatabaseRule; import static java.util.Arrays.asList; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.neo4j.server.rest.domain.JsonHelper.jsonToMap; public class CypherResultRepresentationTest { @Rule public DatabaseRule database = new ImpermanentDatabaseRule(); @Test @SuppressWarnings( "unchecked" ) public void shouldSerializeProfilingResult() throws Exception { // Given String name = "Kalle"; ExecutionPlanDescription plan = getMockDescription( name ); ExecutionPlanDescription childPlan = getMockDescription( "child" ); when( plan.getChildren() ).thenReturn( asList( childPlan ) ); when( plan.hasProfilerStatistics() ).thenReturn( true ); ExecutionPlanDescription.ProfilerStatistics stats = mock( ExecutionPlanDescription.ProfilerStatistics.class ); when( stats.getDbHits() ).thenReturn( 13L ); when( stats.getRows() ).thenReturn( 25L ); when( plan.getProfilerStatistics() ).thenReturn( stats ); Result result = mock( Result.class ); when( result.hasNext () ).thenReturn( false ); when( result.columns() ).thenReturn( new ArrayList<>() ); when( result.getExecutionPlanDescription() ).thenReturn( plan ); // When Map<String, Object> serialized = serializeToStringThenParseAsToMap( new CypherResultRepresentation( result, /*includeStats=*/false, true ) ); // Then Map<String, Object> serializedPlan = (Map<String, Object>) serialized.get( "plan" ); assertThat( serializedPlan.get( "name" ), equalTo( name ) ); assertThat( serializedPlan.get( "rows" ), is( 25 ) ); assertThat( serializedPlan.get( "dbHits" ), is( 13 ) ); List<Map<String, Object>> children = (List<Map<String, Object>>) serializedPlan.get( "children" ); assertThat( children.size(), is( 1 ) ); Map<String, Object> args = (Map<String, Object>) serializedPlan.get( "args" ); assertThat( args.get( "argumentKey" ), is( "argumentValue" ) ); } @Test @SuppressWarnings( "unchecked" ) public void shouldNotIncludePlanUnlessAskedFor() throws Exception { // Given Result result = mock( Result.class ); when( result.hasNext() ).thenReturn( false ); when( result.columns() ).thenReturn( new ArrayList<>() ); // When Map<String, Object> serialized = serializeToStringThenParseAsToMap( new CypherResultRepresentation( result, /*includeStats=*/false, false ) ); // Then assertFalse( "Didn't expect to see a plan here", serialized.containsKey( "plan" ) ); } @Test public void shouldFormatMapsProperly() throws Exception { GraphDatabaseService graphdb = database.getGraphDatabaseAPI(); Result result = graphdb.execute( "RETURN {one:{two:['wait for it...', {three: 'GO!'}]}}" ); CypherResultRepresentation representation = new CypherResultRepresentation( result, false, false ); // When Map<String, Object> serialized = serializeToStringThenParseAsToMap( representation ); // Then Map one = (Map) ((Map) ((List) ((List) serialized.get( "data" )).get( 0 )).get( 0 )).get( "one" ); List two = (List) one.get( "two" ); assertThat( two.get( 0 ), is( "wait for it..." ) ); Map foo = (Map) two.get( 1 ); assertThat( foo.get( "three" ), is( "GO!" ) ); } @Test public void shouldRenderNestedEntities() throws Exception { try ( Transaction ignored = database.getGraphDatabaseAPI().beginTx() ) { GraphDatabaseService graphdb = database.getGraphDatabaseAPI(); graphdb.execute( "CREATE (n {name: 'Sally'}), (m {age: 42}), (n)-[r:FOO {drunk: false}]->(m)" ); Result result = graphdb.execute( "MATCH p=(n)-[r]->(m) RETURN n, r, p, {node: n, edge: r, path: p}" ); CypherResultRepresentation representation = new CypherResultRepresentation( result, false, false ); // When Map<String, Object> serialized = serializeToStringThenParseAsToMap( representation ); // Then Object firstRow = ((List) serialized.get( "data" )).get( 0 ); Map nested = (Map) ((List) firstRow).get( 3 ); assertThat( nested.get( "node" ), is( equalTo( ((List) firstRow).get( 0 ) ) ) ); assertThat( nested.get( "edge" ), is( equalTo( ((List) firstRow).get( 1 ) ) ) ); assertThat( nested.get( "path" ), is( equalTo( ((List) firstRow).get( 2 ) ) ) ); } } private ExecutionPlanDescription getMockDescription( String name ) { ExecutionPlanDescription plan = mock( ExecutionPlanDescription.class ); when( plan.getName() ).thenReturn( name ); when( plan.getArguments() ).thenReturn( MapUtil.map( "argumentKey", "argumentValue" ) ); return plan; } private Map<String, Object> serializeToStringThenParseAsToMap( CypherResultRepresentation repr ) throws Exception { OutputFormat format = new OutputFormat( new JsonFormat(), new URI( "http://localhost/" ), null ); return jsonToMap( format.assemble( repr ) ); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
7004e368b76ead72e9b7b17593feaeb3e7e9757b
8782061b1e1223488a090f9f3f3b8dfe489e054a
/storeMongoDB/projects/ABCD/alexanderjarvis_play-jongo/test/0Test.java
2cb5c9175294b010776c173ceab6a2c0317fb4f4
[]
no_license
ryosuke-ku/TCS_init
3cb79a46aa217e62d8fff13d600f2a9583df986c
e1207d68bdc9d2f1eed63ef44a672b5a37b45633
refs/heads/master
2020-08-08T18:40:17.929911
2019-10-18T01:06:32
2019-10-18T01:06:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
398
java
public void testMongoWriteConcern() throws Exception { Map<String, String> config = mapBuilder("playjongo.uri", "mongodb://localhost:27017/foo") .with("playjongo.defaultWriteConcern", "REPLICAS_SAFE").get(); final PlayJongo cut = playJongo(config, false); assertThat(cut.jongo.getDatabase().getWriteConcern()).isEqualTo(WriteConcern.SAFE); }
[ "naist1020@gmail.com" ]
naist1020@gmail.com
cc06bcecbab543a438ef60224f86309d219b2402
b4c3c34ef1c97e718c30dbda9388b00719b2e772
/src/main/java/com/zonekey/disrec/dao/AlarmLogMapper.java
9c84ad0869ac75b3860ee2d8b859477a61e396d8
[]
no_license
github188/disrec
1c7524c50b5bbcaa42ac905f77a75be23f5496fa
90f9f5e1e323510988ecd70e3f752a23f513d3c9
refs/heads/master
2021-01-15T12:54:06.667298
2015-10-21T08:18:13
2015-10-21T08:18:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
672
java
package com.zonekey.disrec.dao; import java.util.List; import com.zonekey.disrec.dao.base.BaseMapper; import com.zonekey.disrec.dao.base.MyBatisRepository; import com.zonekey.disrec.entity.AlarmLog; import com.zonekey.disrec.vo.PageBean; @MyBatisRepository public interface AlarmLogMapper extends BaseMapper<AlarmLog, String>{ public int saveAlarmLog(AlarmLog alarmLog); public int isAlarmExist(AlarmLog alarmLog); public int deleteAlarmExist(AlarmLog alarmLog); public int updateAlarmLog(AlarmLog alarmLog); public int updateAlarmExist(AlarmLog alarmLog); public long count(PageBean pageBean); public List<AlarmLog> findByPage(PageBean pageBean); }
[ "jeanwinhuang@live.com" ]
jeanwinhuang@live.com
699676701b6c670c978b77fe182a2d5004a34b55
2f19b0c8a553586874494457602c0c51ed1a9347
/src/test/java/com/alibaba/hitsdb/client/value/TestMetricPointStringValue.java
3b2a9d7521d905cd1ef3abfbe5970855fa2e6987
[ "Apache-2.0" ]
permissive
LaplaceDemon/HiTSDB-Client
97c57a3aef7005971cab10057f7647b9864a1813
975941a6e42079c1dd9ab235a9c194c0de588217
refs/heads/master
2021-07-22T02:03:16.700860
2017-11-02T02:58:53
2017-11-02T02:58:53
109,137,632
0
0
null
2017-11-01T13:53:46
2017-11-01T13:53:46
null
UTF-8
Java
false
false
1,731
java
package com.alibaba.hitsdb.client.value; import java.text.ParseException; import java.text.SimpleDateFormat; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import com.alibaba.hitsdb.client.value.request.Point; public class TestMetricPointStringValue { private String metric; private long time; @Before public void init() throws ParseException { metric = "test"; String strDate = "2017-08-01 13:14:15"; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); time = sdf.parse(strDate).getTime(); } @Test public void testPoint0() { int timestamp = (int) (time / 1000); Point point = Point .metric(metric) .tag("tagk1", "tagv1").tag("tagk2", "tagv2").tag("tagk3", "tagv3") .timestamp(timestamp) .value(12.3) .build(); String json = point.toJSON(); Assert.assertEquals(json, "{\"metric\":\"test\",\"stringValue\":\"456789\",\"tags\":{\"tagk1\":\"tagv1\",\"tagk2\":\"tagv2\",\"tagk3\":\"tagv3\"},\"timestamp\":1501564455,\"value\":12.3}"); } @Test public void testPoint1() { int timestamp = (int) (time / 1000); Point point = Point .metric(metric) .tag("tagk1", "tagv1").tag("tagk2", "tagv2").tag("tagk3", "tagv3") .timestamp(timestamp) .build(); String json = point.toJSON(); Assert.assertEquals(json, "{\"metric\":\"test\",\"stringValue\":\"456789\",\"tags\":{\"tagk1\":\"tagv1\",\"tagk2\":\"tagv2\",\"tagk3\":\"tagv3\"},\"timestamp\":1501564455}"); } }
[ "laplacedemon.sjq@gmail.com" ]
laplacedemon.sjq@gmail.com
c39ac57d45805b2d495798bf99177d815894d5f6
bddb35c6f69712cbacfc5a6700c36e125ebcdba1
/src/main/java/jsonzip/GZIP.java
7ea8060f413ce03aaf5444255c070e22873f74cf
[]
no_license
wushaohao/DailyDetails
97624dee0d731b47e1db2e7192e9f1eb2544b8c1
14abf1572351e282dad659f6e09f9c601aafc5e4
refs/heads/master
2022-10-30T15:47:27.950088
2022-10-08T06:38:15
2022-10-08T06:38:15
119,624,059
0
0
null
null
null
null
UTF-8
Java
false
false
3,071
java
package jsonzip; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; /** * @author wuhao */ public class GZIP { private static final String defaultCharset = "UTF-8"; public static void main(String[] args) throws IOException { String str = "[{\"name\":\"Andrea\",\"age\":31,\"gender\":\"Male\",\"skilled\":true},{\"name\":\"Eva\",\"age\":27,\"gender\":\"Female\",\"skilled\":true},{\"name\":\"Daniele\",\"age\":26,\"gender\":\"Male\",\"skilled\":false}]"; System.out.println(str); byte[] compress = compress(str, defaultCharset); String unCompress = unCompress(compress, defaultCharset); System.out.println(unCompress); } /** * 字符串的压缩 * * @param str 待压缩的字符串 * @return 返回压缩后的字符串 * @throws IOException */ public static byte[] compress(String str, String charset) throws IOException { if (null == str || str.length() <= 0) { return new byte[0]; } // 创建一个新的 byte 数组输出流 ByteArrayOutputStream out = new ByteArrayOutputStream(); // 使用默认缓冲区大小创建新的输出流 GZIPOutputStream gzip = null; try { gzip = new GZIPOutputStream(out); // 将 b.length 个字节写入此输出流 gzip.write(str.getBytes(charset)); } catch (IOException e) { e.printStackTrace(); } finally { if (null != gzip) { gzip.close(); } } // 使用指定的 charsetName,通过解码字节将缓冲区内容转换为字符串 return out.toByteArray(); } /** * 字符串的解压 * * @param compressedBytes 对字符串解压 * @return 返回解压缩后的字符串 * @throws IOException */ public static String unCompress(byte[] compressedBytes, String charset) throws IOException { if (null == compressedBytes || compressedBytes.length <= 0) { return ""; } // 创建一个新的 byte 数组输出流 ByteArrayOutputStream out = new ByteArrayOutputStream(); // 创建一个 ByteArrayInputStream,使用 buf 作为其缓冲区数组 byte[] bytes = compressedBytes; ByteArrayInputStream in = new ByteArrayInputStream(bytes); // 使用默认缓冲区大小创建新的输入流 GZIPInputStream gzip = new GZIPInputStream(in); byte[] buffer = new byte[256]; int n = 0; // 将未压缩数据读入字节数组 while ((n = gzip.read(buffer)) >= 0) { // 将指定 byte 数组中从偏移量 off 开始的 len 个字节写入此 byte数组输出流 out.write(buffer, 0, n); } // 使用指定的 charsetName,通过解码字节将缓冲区内容转换为字符串 return out.toString(charset); } }
[ "wuhaodeyx@163.com" ]
wuhaodeyx@163.com
d35939bb6dfec39024f3b46e3295b966e0ef62a6
387ab8043a5c38ca81ab08c806238922972dc5fd
/java/java-impl/src/com/intellij/codeInsight/daemon/problems/pass/ProjectProblemFileSelectionListener.java
6e24b15acde5b748b4ce4c282db3e326a75872ae
[ "Apache-2.0" ]
permissive
Blackdread/intellij-community
78c5d71a7db3303025247131b7929ff5a8041aba
713cd98e68644db6926bdf0a869b225d36145583
refs/heads/master
2021-05-25T15:05:21.088070
2020-04-07T09:10:11
2020-04-07T09:32:49
253,757,648
0
0
Apache-2.0
2021-02-21T08:05:20
2020-04-07T10:13:50
null
UTF-8
Java
false
false
3,371
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.codeInsight.daemon.problems.pass; import com.intellij.codeInsight.daemon.problems.FileStateUpdater; import com.intellij.codeInsight.hints.InlayHintsSettings; import com.intellij.injected.editor.VirtualFileWindow; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.fileEditor.FileEditorManager; import com.intellij.openapi.fileEditor.FileEditorManagerEvent; import com.intellij.openapi.fileEditor.FileEditorManagerListener; import com.intellij.openapi.project.Project; import com.intellij.openapi.startup.StartupActivity; import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.PsiJavaFile; import com.intellij.psi.PsiManager; import com.intellij.util.messages.MessageBusConnection; import org.jetbrains.annotations.NotNull; import static com.intellij.codeInsight.daemon.problems.pass.ProjectProblemInlaySettingsProvider.hintsEnabled; import static com.intellij.util.ObjectUtils.tryCast; class ProjectProblemFileSelectionListener implements FileEditorManagerListener, InlayHintsSettings.SettingsListener { private final Project myProject; private ProjectProblemFileSelectionListener(Project project) { myProject = project; } @Override public void selectionChanged(@NotNull FileEditorManagerEvent event) { if (!hintsEnabled()) return; VirtualFile oldFile = event.getOldFile(); VirtualFile newFile = event.getNewFile(); if (oldFile == null || oldFile instanceof VirtualFileWindow || !oldFile.isValid() || oldFile.equals(newFile)) return; PsiJavaFile psiJavaFile = tryCast(PsiManager.getInstance(myProject).findFile(oldFile), PsiJavaFile.class); if (psiJavaFile == null) return; ProjectProblemPassUtils.removeInlays(psiJavaFile); FileStateUpdater.setPreviousState(psiJavaFile); } @Override public void settingsChanged() { if (!hintsEnabled()) onHintsDisabled(); } @Override public void languageStatusChanged() { if (!hintsEnabled()) onHintsDisabled(); } @Override public void globalEnabledStatusChanged(boolean newEnabled) { if (!hintsEnabled()) onHintsDisabled(); } private void onHintsDisabled() { FileEditorManager editorManager = FileEditorManager.getInstance(myProject); for (VirtualFile selectedFile : editorManager.getSelectedFiles()) { PsiJavaFile psiJavaFile = tryCast(PsiManager.getInstance(myProject).findFile(selectedFile), PsiJavaFile.class); if (psiJavaFile == null) continue; ProjectProblemPassUtils.removeInlays(psiJavaFile); FileStateUpdater.setPreviousState(psiJavaFile); } } public static class MyStartupActivity implements StartupActivity { @Override public void runActivity(@NotNull Project project) { if (!Registry.is("project.problems.view") && !ApplicationManager.getApplication().isUnitTestMode()) return; ProjectProblemFileSelectionListener listener = new ProjectProblemFileSelectionListener(project); MessageBusConnection connection = project.getMessageBus().connect(); connection.subscribe(FILE_EDITOR_MANAGER, listener); connection.subscribe(InlayHintsSettings.getINLAY_SETTINGS_CHANGED(), listener); } } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
5ea7eda9351c756fd4f187bef285bec9035d3cd0
5440c44721728e87fb827fb130b1590b25f24989
/WPP/src/br/com/brasiltelecom/ppp/portal/entity/BloqueioServico.java
64fc7ca397db111d330a3f8432e96a9e6041ab09
[]
no_license
amigosdobart/gpp
b36a9411f39137b8378c5484c58d1023c5e40b00
b1fec4e32fa254f972a0568fb7ebfac7784ecdc2
refs/heads/master
2020-05-15T14:20:11.462484
2019-04-19T22:34:54
2019-04-19T22:34:54
182,328,708
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,185
java
package br.com.brasiltelecom.ppp.portal.entity; import java.util.Date; /** * TODO Descrição * @author Alex Pitacci Simões * @since 27/07/2004 */ public class BloqueioServico { private String msisdn; private Date dataBloqueio; private String servico; private String usuario; /** * @return Returns the dataBloqueio. */ public Date getDataBloqueio() { return dataBloqueio; } /** * @param dataBloqueio The dataBloqueio to set. */ public void setDataBloqueio(Date dataBloqueio) { this.dataBloqueio = dataBloqueio; } /** * @return Returns the msisdn. */ public String getMsisdn() { return msisdn; } /** * @param msisdn The msisdn to set. */ public void setMsisdn(String msisdn) { this.msisdn = msisdn; } /** * @return Returns the servico. */ public String getServico() { return servico; } /** * @param servico The servico to set. */ public void setServico(String servico) { this.servico = servico; } /** * @return Returns the usuario. */ public String getUsuario() { return usuario; } /** * @param usuario The usuario to set. */ public void setUsuario(String usuario) { this.usuario = usuario; } }
[ "lucianovilela@gmail.com" ]
lucianovilela@gmail.com
fa457306b51a62ffa32a59d31a4d13145fc65b79
4027a04db20258d699cccb6530f64f86a078c0e2
/app/src/main/java/com/sun/bingo/constant/ConstantParameters.java
424b2823d7474678c75664eeddb1e40f1ce1a5a1
[]
no_license
gitter-badger/Bingo
db68869026c78246e9abc313e19ceed497e636b0
dce06d3ca248d3126fa1cfbbdf73d5cec621bc96
refs/heads/master
2021-01-23T16:36:19.791988
2015-07-20T15:50:12
2015-07-20T15:50:12
39,418,259
0
0
null
2015-07-21T01:58:02
2015-07-21T01:58:02
null
UTF-8
Java
false
false
145
java
package com.sun.bingo.constant; public class ConstantParameters { public static String BMOB_APP_ID = "6c2aab3688f2fdf6f802f93f30c3bfcd"; }
[ "sfsheng0322@gmail.com" ]
sfsheng0322@gmail.com
215454ca7a39308e1fe17879a833f16274c37d1b
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2016/12/ProcedureSignature.java
06371e7dc62aee6010048a3e908e8e611c7a8490
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
6,750
java
/* * Copyright (c) 2002-2016 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.kernel.api.proc; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.Optional; import org.neo4j.helpers.collection.Iterables; import org.neo4j.kernel.api.proc.Neo4jTypes.AnyType; import static java.util.Collections.unmodifiableList; /** * This describes the signature of a procedure, made up of its namespace, name, and input/output description. * Procedure uniqueness is currently *only* on the namespace/name level - no procedure overloading allowed (yet). */ public class ProcedureSignature { public static List<FieldSignature> VOID = unmodifiableList( new ArrayList<>() ); private final QualifiedName name; private final List<FieldSignature> inputSignature; private final List<FieldSignature> outputSignature; private final Mode mode; private final Optional<String> deprecated; private final String[] allowed; private final Optional<String> description; public ProcedureSignature( QualifiedName name, List<FieldSignature> inputSignature, List<FieldSignature> outputSignature, Mode mode, Optional<String> deprecated, String[] allowed, Optional<String> description ) { this.name = name; this.inputSignature = unmodifiableList( inputSignature ); this.outputSignature = outputSignature == VOID ? outputSignature : unmodifiableList( outputSignature ); this.mode = mode; this.deprecated = deprecated; this.allowed = allowed; this.description = description; } public QualifiedName name() { return name; } public Mode mode() { return mode; } public Optional<String> deprecated() { return deprecated; } public String[] allowed() { return allowed; } public List<FieldSignature> inputSignature() { return inputSignature; } public List<FieldSignature> outputSignature() { return outputSignature; } public boolean isVoid() { return outputSignature == VOID; } public Optional<String> description() { return description; } @Override public boolean equals( Object o ) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } ProcedureSignature that = (ProcedureSignature) o; return name.equals( that.name ) && inputSignature.equals( that.inputSignature ) && outputSignature.equals( that.outputSignature ) && isVoid() == that.isVoid(); } @Override public int hashCode() { return name.hashCode(); } @Override public String toString() { String strInSig = inputSignature == null ? "..." : Iterables.toString( inputSignature, ", " ); if ( isVoid() ) { return String.format( "%s(%s) :: VOID", name, strInSig ); } else { String strOutSig = outputSignature == null ? "..." : Iterables.toString( outputSignature, ", " ); return String.format( "%s(%s) :: (%s)", name, strInSig, strOutSig ); } } public static class Builder { private final QualifiedName name; private final List<FieldSignature> inputSignature = new LinkedList<>(); private List<FieldSignature> outputSignature = new LinkedList<>(); private Mode mode = Mode.READ_ONLY; private Optional<String> deprecated = Optional.empty(); private String[] allowed = new String[0]; private Optional<String> description = Optional.empty(); public Builder( String[] namespace, String name ) { this.name = new QualifiedName( namespace, name ); } public Builder mode( Mode mode ) { this.mode = mode; return this; } public Builder description(String description) { this.description = Optional.of( description ); return this; } public Builder deprecatedBy(String deprecated) { this.deprecated = Optional.of( deprecated ); return this; } /** Define an input field */ public Builder in( String name, AnyType type ) { inputSignature.add( new FieldSignature( name, type) ); return this; } /** Define an output field */ public Builder out( String name, AnyType type ) { outputSignature.add( new FieldSignature( name, type ) ); return this; } public Builder out( List<FieldSignature> fields ) { outputSignature = fields; return this; } public Builder allowed( String[] allowed ) { this.allowed = allowed; return this; } public ProcedureSignature build() { return new ProcedureSignature(name, inputSignature, outputSignature, mode, deprecated, allowed, description ); } } public static Builder procedureSignature(String ... namespaceAndName) { String[] namespace = namespaceAndName.length > 1 ? Arrays.copyOf( namespaceAndName, namespaceAndName.length - 1 ) : new String[0]; String name = namespaceAndName[namespaceAndName.length - 1]; return procedureSignature( namespace, name ); } public static Builder procedureSignature( QualifiedName name ) { return new Builder( name.namespace(), name.name() ); } public static Builder procedureSignature(String[] namespace, String name) { return new Builder(namespace, name); } public static QualifiedName procedureName( String ... namespaceAndName) { return procedureSignature( namespaceAndName ).build().name(); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
bdf0740a7ed706fd7aff965896cab41a2ed65bf9
f0397daab2782944f01d49de38849d8ebce754cc
/kernel-tools/src/main/java/pers/acp/tools/file/pdf/fonts/FontLoader.java
d6a4b3427625b24967940ec0e9ae29342cb74414
[]
no_license
jameszgw/account-kernel
2687949a94cb1c79d62ae5fd8bbeb15dc1368ed8
ef6f7d2cfea0592abc4a8cac6ca875392fddc851
refs/heads/master
2023-05-14T12:30:07.501608
2018-05-04T03:18:40
2018-05-04T03:18:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,667
java
package pers.acp.tools.file.pdf.fonts; import pers.acp.tools.file.common.FileCommon; import com.itextpdf.text.pdf.BaseFont; import org.apache.log4j.Logger; import org.xhtmlrenderer.pdf.ITextFontResolver; import org.xhtmlrenderer.pdf.ITextRenderer; import java.awt.*; import java.io.File; import java.util.HashMap; import java.util.Map; public class FontLoader { private static Logger log = Logger.getLogger(FontLoader.class); public static Map<String, String> fontName = new HashMap<>(); /** * 字体信息装载入内存 * * @param font 字体文件 */ private static void LoadFonts(File font) throws Exception { Font dynamicFont = Font.createFont(Font.TRUETYPE_FONT, font); if (!fontName.containsKey(dynamicFont.getFamily())) { fontName.put(dynamicFont.getFamily(), dynamicFont.getPSName()); } } /** * 获取字体文件夹路径 * * @return 文件夹路径 */ private static String getFontFold() { String path = FileCommon.getAbsPath(FileCommon.getProperties("fonts.fold", "/files/resource/font")); File fold = new File(path); if (!fold.exists()) { fold.mkdirs(); } return path; } /** * 初始化字体信息 */ public static void InitFonts() { try { log.info("start load pdf fonts..."); String fontsFoldPath = getFontFold(); log.info("fonts fold path: " + fontsFoldPath); File fontsFold = new File(fontsFoldPath); File[] fonts = fontsFold.listFiles(); int filecount = 0; if (fonts != null) { for (File font : fonts) { if (font.isFile()) { if (!font.getName().toLowerCase().endsWith(".java") && !font.getName().toLowerCase().endsWith(".class")) { LoadFonts(font); filecount++; } } } } log.info("load pdf " + filecount + " fonts success"); } catch (Exception e) { log.error(e.getMessage(), e); } } /** * 生成PDF之前将字体文件引用进renderer * * @param renderer renderer对象 * @return renderer renderer对象 */ public static ITextRenderer loadFonts(ITextRenderer renderer) { try { ITextFontResolver fontResolver = renderer.getFontResolver(); File fontsFold = new File(getFontFold()); File[] fonts = fontsFold.listFiles(); if (fonts != null) { for (File font : fonts) { if (font.isFile()) { if (!font.getName().toLowerCase().endsWith(".java") && !font.getName().toLowerCase().endsWith(".class")) { fontResolver.addFont(font.getAbsolutePath(), BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); } } } } } catch (Exception e) { log.error(e.getMessage(), e); } return renderer; } /** * 获取宋体字体 * * @return 字体对象 */ public static BaseFont getSIMSUNFont() { try { File font = new File(getFontFold() + File.separator + "SIMSUN.TTC"); return BaseFont.createFont(font.getAbsolutePath() + ",1", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); } catch (Exception e) { log.error(e.getMessage(), e); return null; } } }
[ "391289241@qq.com" ]
391289241@qq.com
a3de10378bc40ee5ee82495ee65fb01f01f46344
1dfd0e45975f1cf7ff9f9561ff2cc18559e5c7df
/Projects/自建框架--含用户权限管理/代码/zzjs-frame/zzjs-base/zzjs-base-component/src/main/java/com/interapi/app/component/dao/SiteTabMapper.java
ae1304c6888325a3a337cd3c2b4beef0bd3cff7a
[]
no_license
fengmoboygithub/main_respository
20434a7a676707916a035d4f19f40dba56f26186
c17bc196ae606ce4af503b68af7a926a8e677986
refs/heads/master
2023-01-12T23:43:15.501710
2020-11-18T15:48:48
2020-11-18T15:48:48
313,973,726
0
0
null
null
null
null
UTF-8
Java
false
false
265
java
package com.interapi.app.component.dao; import com.interapi.app.base.dao.IBaseDao; import com.interapi.app.component.model.SiteTab; import com.interapi.app.component.model.SiteTabExample; public interface SiteTabMapper extends IBaseDao<SiteTab, SiteTabExample>{ }
[ "yangyanchao@otc-tech.cn" ]
yangyanchao@otc-tech.cn
7755f6138b6a60af709bf7000ca3cb3b6bfd7c44
31bd68a7b63543e75766ee9815a3f24653ad1b35
/JavaRushTasks/2.JavaCore/src/com/javarush/task/task19/task1906/Solution.java
e191f81a84fa58bc2a0c3d2304714ccfa7a4a6d7
[]
no_license
vpshulga/JavaRush
d60a889682de742ae3e0015bea6a5f3107dcc17d
d2e920a46fb6c9fd9ee2e1b3eccc41b7b4d53b5f
refs/heads/master
2021-04-26T22:54:30.725661
2018-06-14T10:36:25
2018-06-14T10:36:25
123,873,066
0
0
null
null
null
null
UTF-8
Java
false
false
821
java
package com.javarush.task.task19.task1906; /* Четные символы */ import java.io.*; public class Solution { private static int counter = 0; public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String fileOneName = reader.readLine(); String fileTwoName = reader.readLine(); reader.close(); FileReader fileReader = new FileReader(fileOneName); FileWriter fileWriter = new FileWriter(fileTwoName); while (fileReader.ready()){ int data = fileReader.read(); if (counter % 2 != 0){ fileWriter.write(data); } counter++; } fileReader.close(); fileWriter.close(); } }
[ "vpshulgaa@gmail.com" ]
vpshulgaa@gmail.com
05d26c422671ed1862a93dee57b1a721ea63999f
a47efc2425d7c650c4153c198868ae85615c3787
/TechnologySolutionModel/org.emftrace.metamodel/src/org/emftrace/metamodel/UMLModel/MessageKind.java
fb19aa33da9b723f3d9a0a4afa77c464a8341783
[]
no_license
cbiegel/TechnologySolutionModel
f3e859c8c38883e8b2b17414f8a185f1f25138cf
2acafc1055cbc3ad2815f5bc1732f5088e6668cb
refs/heads/master
2016-09-06T01:53:16.937715
2015-02-25T16:32:15
2015-02-25T16:32:15
31,322,183
0
1
null
null
null
null
UTF-8
Java
false
false
5,742
java
/** */ package org.emftrace.metamodel.UMLModel; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.eclipse.emf.common.util.Enumerator; /** * <!-- begin-user-doc --> * A representation of the literals of the enumeration '<em><b>Message Kind</b></em>', * and utility methods for working with them. * <!-- end-user-doc --> * @see org.emftrace.metamodel.UMLModel.UMLModelPackage#getMessageKind() * @model * @generated */ public enum MessageKind implements Enumerator { /** * The '<em><b>Complete</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #COMPLETE_VALUE * @generated * @ordered */ COMPLETE(0, "complete", "complete"), /** * The '<em><b>Lost</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #LOST_VALUE * @generated * @ordered */ LOST(1, "lost", "lost"), /** * The '<em><b>Found</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #FOUND_VALUE * @generated * @ordered */ FOUND(2, "found", "found"), /** * The '<em><b>Unknown</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #UNKNOWN_VALUE * @generated * @ordered */ UNKNOWN(3, "unknown", "unknown"); /** * The '<em><b>Complete</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Complete</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #COMPLETE * @model name="complete" * @generated * @ordered */ public static final int COMPLETE_VALUE = 0; /** * The '<em><b>Lost</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Lost</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #LOST * @model name="lost" * @generated * @ordered */ public static final int LOST_VALUE = 1; /** * The '<em><b>Found</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Found</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #FOUND * @model name="found" * @generated * @ordered */ public static final int FOUND_VALUE = 2; /** * The '<em><b>Unknown</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Unknown</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #UNKNOWN * @model name="unknown" * @generated * @ordered */ public static final int UNKNOWN_VALUE = 3; /** * An array of all the '<em><b>Message Kind</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private static final MessageKind[] VALUES_ARRAY = new MessageKind[] { COMPLETE, LOST, FOUND, UNKNOWN, }; /** * A public read-only list of all the '<em><b>Message Kind</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static final List<MessageKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the '<em><b>Message Kind</b></em>' literal with the specified literal value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static MessageKind get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { MessageKind result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the '<em><b>Message Kind</b></em>' literal with the specified name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static MessageKind getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { MessageKind result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the '<em><b>Message Kind</b></em>' literal with the specified integer value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static MessageKind get(int value) { switch (value) { case COMPLETE_VALUE: return COMPLETE; case LOST_VALUE: return LOST; case FOUND_VALUE: return FOUND; case UNKNOWN_VALUE: return UNKNOWN; } return null; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private final int value; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private final String name; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private final String literal; /** * Only this class can construct instances. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private MessageKind(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public int getValue() { return value; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getName() { return name; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getLiteral() { return literal; } /** * Returns the literal value of the enumerator, which is its string representation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { return literal; } } //MessageKind
[ "1biegel@informatik.uni-hamburg.de" ]
1biegel@informatik.uni-hamburg.de
890ead9e17f0075ef15692a79fd0dd6ba2e187a7
d5d9dd00387650671329d7e68227fcf3741559a7
/app/src/main/java/com/tiancaijiazu/app/activitys/activitypage/ParentingEncyclopediaactivitys/ReportPageActivity.java
508db8bcf5e8caa53726a35d47493da16abe764e
[]
no_license
ninongsha123/ggvb
6ef0f20be7e71c5b57afb449a3dfc6afcc396c65
c6315fd0acdde67f677c3c282111a45795db0cf6
refs/heads/master
2020-12-02T15:58:08.527042
2019-12-31T09:17:10
2019-12-31T09:17:10
231,054,837
1
0
null
null
null
null
UTF-8
Java
false
false
5,797
java
package com.tiancaijiazu.app.activitys.activitypage.ParentingEncyclopediaactivitys; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.util.TypedValue; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; import com.tiancaijiazu.app.R; import com.tiancaijiazu.app.activitys.views.FlowGroupView; import com.tiancaijiazu.app.base.activity.BaseActivity; import com.tiancaijiazu.app.beans.ArticleReportBeans; import com.tiancaijiazu.app.differentiateenum.DifferentiateEnum; import com.tiancaijiazu.app.mvp.Presenter; import com.tiancaijiazu.app.utils.MediumBoldTextViewTitle; import com.tiancaijiazu.app.utils.ScreenStatusUtil; import com.tiancaijiazu.app.utils.city.ToastUtils; import com.tiancaijiazu.app.mvp.IView; import java.util.Arrays; import java.util.HashMap; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; /** * * 家族圈-列表-详情-举报(关注右边的三个小点) */ public class ReportPageActivity extends BaseActivity<IView, Presenter<IView>> implements IView { @BindView(R.id.iv_finis) ImageView mIvFinis; @BindView(R.id.a) MediumBoldTextViewTitle mA; @BindView(R.id.relative) RelativeLayout mRelative; @BindView(R.id.v) View mV; @BindView(R.id.flow) FlowGroupView mFlow; @BindView(R.id.ok) TextView mOk; private String[] mTitles = new String[]{"全部", "有害信息", "污秽色情", "违法信息", "垃圾营销"}; private List<String> mDataList = Arrays.asList(mTitles); private String mXuan; @Override protected void initEventAndData() { ScreenStatusUtil.setFillDip(this); Intent intent = getIntent(); long articleId = intent.getLongExtra("articleId", 0); if (mFlow != null) { mFlow.removeAllViews(); } for (int i = 0; i < mDataList.size(); i++) { LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); layoutParams.setMargins(8, 15, 8, 0); TextView textView = new TextView(ReportPageActivity.this); textView.setLayoutParams(layoutParams); textView.setLineSpacing(1.2f, 1.2f);//设置行间距 textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); textView.setText(mDataList.get(i)); textView.setBackgroundResource(R.drawable.report_mo); textView.setTextColor(Color.parseColor("#333333")); initEvents(textView); textView.setPadding(calculateDpToPx(10), calculateDpToPx(5), calculateDpToPx(10), calculateDpToPx(5)); mFlow.addView(textView, layoutParams); } mIvFinis.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { finish(); } }); mOk.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { HashMap<String, Object> map = new HashMap<>(); map.put("articleId", articleId); if("全部".equals(mXuan)){ map.put("summary", "有害信息,污秽色情,违法信息,垃圾营销"); }else { map.put("summary", mXuan); } mPresenter.getDataP(map, DifferentiateEnum.ARYICLEREPORT); } }); } private void initEvents(TextView textView) { textView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mXuan = textView.getText().toString(); for (int i = 0; i < mDataList.size(); i++) { if (textView.getText().toString().equals(mDataList.get(i))) { TextView childAt = (TextView) mFlow.getChildAt(i); childAt.setTextColor(Color.parseColor("#FFFFFF")); childAt.setBackgroundResource(R.drawable.report_xuan); } else { TextView childAt = (TextView) mFlow.getChildAt(i); childAt.setTextColor(Color.parseColor("#333333")); childAt.setBackgroundResource(R.drawable.report_mo); } } } }); } private int calculateDpToPx(int padding_in_dp) { final float scale = getResources().getDisplayMetrics().density; return (int) (padding_in_dp * scale + 0.5f); } @Override protected int creatrLayoutId() { return R.layout.activity_report_page; } @Override protected Presenter<IView> createPresenter() { return new Presenter<>(); } @Override public void show(Object o, DifferentiateEnum differentiateEnum) { switch (differentiateEnum) { case ARYICLEREPORT: ArticleReportBeans articleReportBeans = (ArticleReportBeans) o; String result = articleReportBeans.getResult(); if (result.equalsIgnoreCase("提交成功")) { ToastUtils.showShortToast(ReportPageActivity.this, "举报成功"); finish(); } break; } } @Override public void showError(String error) { } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // TODO: add setContentView(...) invocation ButterKnife.bind(this); } }
[ "yx9521l@163.com" ]
yx9521l@163.com
64124e169c81f9707496bf4a8c6eece5f4c40e06
b77553aeaaa77853197576a0226c00ea64ca306e
/base/querydsl/java/com/cityiot/guanxin/workOrder/entity/QEWorkOrder.java
46e1272450c71174d4d7440ee03b50c1c2b16d23
[]
no_license
qingtingduizhang77/aiot
c477fc6bfaecb79b69b0c7fa659ad63a6e428458
379d63f22c3fbb6d830bcac6cd775feed2cbecb7
refs/heads/main
2023-02-01T06:44:18.976579
2020-12-14T03:37:14
2020-12-14T03:37:14
318,431,868
1
0
null
null
null
null
UTF-8
Java
false
false
2,954
java
package com.cityiot.guanxin.workOrder.entity; import static com.querydsl.core.types.PathMetadataFactory.*; import com.querydsl.core.types.dsl.*; import com.querydsl.core.types.PathMetadata; import javax.annotation.Generated; import com.querydsl.core.types.Path; /** * QEWorkOrder is a Querydsl query type for EWorkOrder */ @Generated("com.querydsl.codegen.EntitySerializer") public class QEWorkOrder extends EntityPathBase<EWorkOrder> { private static final long serialVersionUID = 598702990L; public static final QEWorkOrder eWorkOrder = new QEWorkOrder("eWorkOrder"); public final com.cityiot.guanxin.common.entity.QBaseEntity _super = new com.cityiot.guanxin.common.entity.QBaseEntity(this); public final StringPath area = createString("area"); public final StringPath code = createString("code"); //inherited public final DateTimePath<java.util.Date> created = _super.created; //inherited public final NumberPath<Long> creator = _super.creator; public final StringPath desContent = createString("desContent"); public final StringPath deviceCode = createString("deviceCode"); public final NumberPath<Long> deviceInfoId = createNumber("deviceInfoId", Long.class); public final StringPath deviceModel = createString("deviceModel"); public final StringPath deviceName = createString("deviceName"); public final StringPath deviceType = createString("deviceType"); public final StringPath distance = createString("distance"); public final NumberPath<Long> handlerId = createNumber("handlerId", Long.class); public final StringPath handlerName = createString("handlerName"); public final NumberPath<Integer> handleStatus = createNumber("handleStatus", Integer.class); public final DateTimePath<java.util.Date> handleTime = createDateTime("handleTime", java.util.Date.class); //inherited public final NumberPath<Long> id = _super.id; //inherited public final DateTimePath<java.util.Date> lastmodi = _super.lastmodi; public final StringPath latitude = createString("latitude"); public final StringPath longitude = createString("longitude"); //inherited public final NumberPath<Long> modifier = _super.modifier; public final NumberPath<Long> recordId = createNumber("recordId", Long.class); public final StringPath remark = createString("remark"); public final StringPath title = createString("title"); //inherited public final NumberPath<Long> version = _super.version; public final NumberPath<Integer> workOrderType = createNumber("workOrderType", Integer.class); public QEWorkOrder(String variable) { super(EWorkOrder.class, forVariable(variable)); } public QEWorkOrder(Path<? extends EWorkOrder> path) { super(path.getType(), path.getMetadata()); } public QEWorkOrder(PathMetadata metadata) { super(EWorkOrder.class, metadata); } }
[ "qingtingduizhang77@163.com" ]
qingtingduizhang77@163.com
34dd896a5a45c13bab37482e75a6d141b9537c71
ce526f698fb70d5e185edb96e26f149a4c628a8b
/helios-services/src/main/java/com/spotify/helios/servicescommon/PersistentAtomicReference.java
c03a437d5f4cd6d3f14eda94bfd47e6ad35c895b
[ "Apache-2.0" ]
permissive
mnikhil-git/helios
df2d82e94d45cea9f5849b7f1b4455db3db56ba2
2ee5b3b51ff59f3cc01536966354401d2803febb
refs/heads/master
2020-12-25T13:07:45.780315
2014-06-16T19:23:34
2014-06-16T19:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,781
java
/* * Copyright (c) 2014 Spotify AB. * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.spotify.helios.servicescommon; import com.google.common.base.Objects; import com.google.common.base.Supplier; import com.google.common.base.Throwables; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.JavaType; import com.spotify.helios.common.Json; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; import static com.google.common.base.Charsets.UTF_8; import static java.nio.file.StandardCopyOption.ATOMIC_MOVE; import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; public class PersistentAtomicReference<T> { private static final Logger log = LoggerFactory.getLogger(PersistentAtomicReference.class); private final Path filename; private final Path tempfilename; private final Object sync = new Object(); private volatile T value; private PersistentAtomicReference(final Path filename, final JavaType javaType, final Supplier<? extends T> initialValue) throws IOException { this.filename = filename.toAbsolutePath(); this.tempfilename = filename.getFileSystem().getPath(this.filename.toString() + ".tmp"); if (Files.exists(filename)) { final byte[] bytes = Files.readAllBytes(filename); if (bytes.length > 0) { value = Json.read(bytes, javaType); } else { value = initialValue.get(); } } else { value = initialValue.get(); } } public void set(T newValue) throws IOException { log.debug("set: ({}) {}", filename, newValue); synchronized (sync) { final String json = Json.asPrettyStringUnchecked(newValue); log.debug("write: ({}) {}", tempfilename, json); Files.write(tempfilename, json.getBytes(UTF_8)); log.debug("move: {} -> {}", tempfilename, filename); Files.move(tempfilename, filename, ATOMIC_MOVE, REPLACE_EXISTING); this.value = newValue; } } public void setUnchecked(T newValue) { try { set(newValue); } catch (IOException e) { throw Throwables.propagate(e); } } public T get() { return value; } public static <T> PersistentAtomicReference<T> create(final Path filename, final TypeReference<T> typeReference, final Supplier<? extends T> initialValue) throws IOException { return new PersistentAtomicReference<>(filename, Json.type(typeReference), initialValue); } public static <T> PersistentAtomicReference<T> create(final String filename, final TypeReference<T> typeReference, final Supplier<? extends T> initialValue) throws IOException { return create(FileSystems.getDefault().getPath(filename), typeReference, initialValue); } public static <T> PersistentAtomicReference<T> create(final Path filename, final JavaType javaType, final Supplier<? extends T> initialValue) throws IOException { return new PersistentAtomicReference<>(filename, javaType, initialValue); } public static <T> PersistentAtomicReference<T> create(final String filename, final JavaType javaType, final Supplier<? extends T> initialValue) throws IOException { return create(FileSystems.getDefault().getPath(filename), javaType, initialValue); } @Override public String toString() { return Objects.toStringHelper(this) .add("filename", filename) .toString(); } }
[ "dano@spotify.com" ]
dano@spotify.com
95233dde2084fc1abc0a5755f7f411f3d1e8958a
174831e22a20d8b2d3b25754d9be2c4d5c51fb84
/lib-tr181-entity/src/main/java/org/broadbandforum/tr181/device/dsl/bondinggroup/Ethernet.java
a848c526b3efe5ab74138a9e8fcf48f688245aea
[ "Apache-2.0", "LicenseRef-scancode-proprietary-license" ]
permissive
KeyBridge/package-cwmp
a3633eea7b9dd6a69f3adcac3772dc02c09c37f9
584fd428105347b28ea5c0834ac726acfee24038
refs/heads/master
2021-03-19T11:42:37.720399
2019-11-14T15:12:32
2019-11-14T15:12:32
119,899,441
3
2
Apache-2.0
2020-10-12T23:09:04
2018-02-01T22:06:38
Java
UTF-8
Java
false
false
5,186
java
/* * Copyright 2018 Key Bridge. * * 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.broadbandforum.tr181.device.dsl.bondinggroup; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.broadbandforum.annotation.CWMPObject; import org.broadbandforum.tr181.device.dsl.bondinggroup.ethernet.Stats; /** * Ethernet-based bonding parameters {{bibref|G.998.2}}. This object MUST be present if, and only if, {{param|#.BondScheme}} is {{enum|Ethernet|#.BondScheme}}. * * @since TR181 v2.0 */ @CWMPObject(name = "Device.DSL.BondingGroup.{i}.Ethernet.") @XmlRootElement(name = "Device.DSL.BondingGroup.Ethernet") @XmlType(name = "Device.DSL.BondingGroup.Ethernet") @XmlAccessorType(XmlAccessType.FIELD) public class Ethernet { /** * {{bibref|G.998.2}} Ethernet-based bonding statistics. These relate to the {{bibref|G.998.2}} PME (Physical Medium Entity) Aggregation Function (PAF) and to its upper layer interface. PAF lower layer interface statistics are in the {{object|##.BondedChannel.{i}.Ethernet.Stats}} objects. The CPE MUST reset the Stats parameters either when the interface becomes operationally down due to a previous administrative down (i.e. the interface's {{param|##.Status}} parameter transitions to a down state after the interface is disabled) or when the interface becomes administratively up (i.e. the interface's {{param|##.Enable}} parameter transitions from {{false}} to {{true}}). Administrative and operational interface status is discussed in {{bibref|TR-181i2|section 4.2.2}}. */ @XmlElement(name = "Stats") public Stats stats; public Ethernet() { } //<editor-fold defaultstate="collapsed" desc="Getter and Setter"> /** * Get the {{bibref|G.998.2}} Ethernet-based bonding statistics. These relate to the {{bibref|G.998.2}} PME (Physical Medium Entity) Aggregation Function (PAF) and to its upper layer interface. PAF lower layer interface statistics are in the {{object|##.BondedChannel.{i}.Ethernet.Stats}} objects. The CPE MUST reset the Stats parameters either when the interface becomes operationally down due to a previous administrative down (i.e. the interface's {{param|##.Status}} parameter transitions to a down state after the interface is disabled) or when the interface becomes administratively up (i.e. the interface's {{param|##.Enable}} parameter transitions from {{false}} to {{true}}). Administrative and operational interface status is discussed in {{bibref|TR-181i2|section 4.2.2}}. * * @return the value */ public Stats getStats() { return stats; } /** * Set the {{bibref|G.998.2}} Ethernet-based bonding statistics. These relate to the {{bibref|G.998.2}} PME (Physical Medium Entity) Aggregation Function (PAF) and to its upper layer interface. PAF lower layer interface statistics are in the {{object|##.BondedChannel.{i}.Ethernet.Stats}} objects. The CPE MUST reset the Stats parameters either when the interface becomes operationally down due to a previous administrative down (i.e. the interface's {{param|##.Status}} parameter transitions to a down state after the interface is disabled) or when the interface becomes administratively up (i.e. the interface's {{param|##.Enable}} parameter transitions from {{false}} to {{true}}). Administrative and operational interface status is discussed in {{bibref|TR-181i2|section 4.2.2}}. * * @param stats the input value */ public void setStats(Stats stats) { this.stats = stats; } /** * Set the {{bibref|G.998.2}} Ethernet-based bonding statistics. These relate to the {{bibref|G.998.2}} PME (Physical Medium Entity) Aggregation Function (PAF) and to its upper layer interface. PAF lower layer interface statistics are in the {{object|##.BondedChannel.{i}.Ethernet.Stats}} objects. The CPE MUST reset the Stats parameters either when the interface becomes operationally down due to a previous administrative down (i.e. the interface's {{param|##.Status}} parameter transitions to a down state after the interface is disabled) or when the interface becomes administratively up (i.e. the interface's {{param|##.Enable}} parameter transitions from {{false}} to {{true}}). Administrative and operational interface status is discussed in {{bibref|TR-181i2|section 4.2.2}}. * * @param stats the input value * @return this instance */ public Ethernet withStats(Stats stats) { this.stats = stats; return this; } //</editor-fold> }
[ "jesse.caulfield@keybridgeglobal.com" ]
jesse.caulfield@keybridgeglobal.com