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
e1fa251012707660342bef6a98ba23da78c428d0
9a6ea6087367965359d644665b8d244982d1b8b6
/src/main/java/X/AnonymousClass0KC.java
6ca5efe991ef383f058a371393b67091eb369cc3
[]
no_license
technocode/com.wa_2.21.2
a3dd842758ff54f207f1640531374d3da132b1d2
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
refs/heads/master
2023-02-12T11:20:28.666116
2021-01-14T10:22:21
2021-01-14T10:22:21
329,578,591
2
1
null
null
null
null
UTF-8
Java
false
false
309
java
package X; /* renamed from: X.0KC reason: invalid class name */ public class AnonymousClass0KC { public final AnonymousClass088 A00; public final AnonymousClass00G A01; public AnonymousClass0KC(AnonymousClass00G r1, AnonymousClass088 r2) { this.A01 = r1; this.A00 = r2; } }
[ "madeinborneo@gmail.com" ]
madeinborneo@gmail.com
c9a221dd0f2c958d3a2ab3952b393f0013ee1877
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
/Corpus/eclipse.jdt.core/4650.java
032553c4142201d9c997f59cb98796d040ec9db1
[ "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
775
java
package test.tags.param; interface X03 { /** * Description on several lines formatted in only one. * * @param a * The first parameter. For an optimum result, this should be an * odd number between 0 and 100. We may also want to know if the * formatter is able to handle more than two lines in a tag * description. * @param b * The second parameter. Same test than for first parameter: we * also want to know if the formatter is able to handle more than * two lines in a tag description. But this time this description * is split on several lines which may make the work a little bit * more difficult to do... */ int foo(int a, int b); }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
303b53868892869836b5a56cac65b30c3bc616b9
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_7da38a2573bf9dae6f6adc03ab50d749425a4437/Benchmark/11_7da38a2573bf9dae6f6adc03ab50d749425a4437_Benchmark_s.java
19cbdde66d85f2f2146bfd5f7f01086a0d3dc0e5
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,120
java
package net.sourceforge.pmd.util; import net.sourceforge.pmd.PMD; import net.sourceforge.pmd.PMDException; import net.sourceforge.pmd.Rule; import net.sourceforge.pmd.RuleContext; import net.sourceforge.pmd.RuleSet; import net.sourceforge.pmd.RuleSetFactory; import net.sourceforge.pmd.RuleSetNotFoundException; import net.sourceforge.pmd.SimpleRuleSetNameMapper; import net.sourceforge.pmd.SourceFileSelector; import net.sourceforge.pmd.TargetJDK1_4; import net.sourceforge.pmd.TargetJDKVersion; import net.sourceforge.pmd.TargetJDK1_5; import net.sourceforge.pmd.ast.JavaParser; import net.sourceforge.pmd.cpd.FileFinder; import net.sourceforge.pmd.cpd.SourceFileOrDirectoryFilter; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.TreeSet; import java.util.Collection; public class Benchmark { private static class Result implements Comparable { public Rule rule; public long time; public int compareTo(Object o) { Result other = (Result) o; if (other.time < time) { return -1; } else if (other.time > time) { return 1; } return rule.getName().compareTo(((Result) o).rule.getName()); } public Result(long elapsed, Rule rule) { this.rule = rule; this.time = elapsed; } } private static boolean findBooleanSwitch(String[] args, String name) { for (int i = 0; i < args.length; i++) { if (args[i].equals(name)) { return true; } } return false; } private static String findOptionalStringValue(String[] args, String name, String defaultValue) { for (int i = 0; i < args.length; i++) { if (args[i].equals(name)) { return args[i + 1]; } } return defaultValue; } public static void main(String[] args) throws RuleSetNotFoundException, IOException, PMDException { String srcDir = findOptionalStringValue(args, "--source-directory", "/usr/local/java/src/java/lang/"); List files = new FileFinder().findFilesFrom(srcDir, new SourceFileOrDirectoryFilter(new SourceFileSelector()), true); TargetJDKVersion jdk = new TargetJDK1_4(); if (findOptionalStringValue(args, "--targetjdk", "1.4").equals("1.5")) { jdk = new TargetJDK1_5(); } boolean debug = findBooleanSwitch(args, "--debug"); boolean parseOnly = findBooleanSwitch(args, "--parse-only"); if (debug) System.out.println("Using JDK " + jdk.getVersionString()); if (parseOnly) { parseStress(jdk, files); } else { String ruleset = findOptionalStringValue(args, "--ruleset", ""); if (debug) System.out.println("Checking directory " + srcDir); Set results = new TreeSet(); RuleSetFactory factory = new RuleSetFactory(); if (ruleset.length() > 0) { SimpleRuleSetNameMapper mapper = new SimpleRuleSetNameMapper(ruleset); stress(factory.createRuleSet(mapper.getRuleSets()), files, results, debug); } else { Iterator i = factory.getRegisteredRuleSets(); while (i.hasNext()) { stress((RuleSet) i.next(), files, results, debug); } } System.out.println("========================================================="); System.out.println("Rule\t\t\t\t\t\tTime in ms"); System.out.println("========================================================="); for (Iterator j = results.iterator(); j.hasNext();) { Result result = (Result) j.next(); StringBuffer out = new StringBuffer(result.rule.getName()); while (out.length() < 48) { out.append(' '); } out.append(result.time); System.out.println(out.toString()); } } System.out.println("========================================================="); } private static void parseStress(TargetJDKVersion jdk, List files) throws FileNotFoundException { long start = System.currentTimeMillis(); for (Iterator k = files.iterator(); k.hasNext();) { File file = (File) k.next(); JavaParser parser = jdk.createParser(new FileReader(file)); parser.CompilationUnit(); } long end = System.currentTimeMillis(); long elapsed = end - start; System.out.println("That took " + elapsed + " ms"); } private static void stress(RuleSet ruleSet, List files, Set results, boolean debug) throws PMDException, IOException { Collection rules = ruleSet.getRules(); for (Iterator j = rules.iterator(); j.hasNext();) { Rule rule = (Rule) j.next(); if (debug) System.out.println("Starting " + rule.getName()); RuleSet working = new RuleSet(); working.addRule(rule); PMD p = new PMD(); RuleContext ctx = new RuleContext(); long start = System.currentTimeMillis(); for (Iterator k = files.iterator(); k.hasNext();) { File file = (File) k.next(); FileReader reader = new FileReader(file); ctx.setSourceCodeFilename(file.getName()); p.processFile(reader, working, ctx); reader.close(); } long end = System.currentTimeMillis(); long elapsed = end - start; results.add(new Result(elapsed, rule)); if (debug) System.out.println("Done timing " + rule.getName() + "; elapsed time was " + elapsed); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e568ff0de6c44a0612532c5a27fdaa2701dc3121
7c2f5bdf6199ee25afafbc8bc2eb77541976d00e
/Bukkit/src/main/java/io/riguron/bukkit/task/DelegatingTask.java
bee4dd50522484b5af58ebd3b92c60ea8e3231c1
[ "MIT" ]
permissive
Stijn-van-Nieulande/MinecraftNetwork
0995d2fad0f7e1150dff0394c2568d9e8f6d1dca
7ed43098a5ba7574e2fb19509e363c3cf124fc0b
refs/heads/master
2022-04-03T17:48:42.635003
2020-01-22T05:22:49
2020-01-22T05:22:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
495
java
package io.riguron.bukkit.task; import io.riguron.system.task.ExecutionStrategy; import io.riguron.system.task.Task; public class DelegatingTask implements Task { private Runnable job; private ExecutionStrategy executionStrategy; public DelegatingTask(Runnable job, ExecutionStrategy executionStrategy) { this.job = job; this.executionStrategy = executionStrategy; } @Override public void execute() { executionStrategy.execute(job); } }
[ "25826296+riguron@users.noreply.github.com" ]
25826296+riguron@users.noreply.github.com
a0937f22fec035604523b170ee5b5b62144c5b31
51fa3cc281eee60058563920c3c9059e8a142e66
/Java/src/testcases/CWE478_Missing_Default_Case_in_Switch/CWE478_Missing_Default_Case_in_Switch__basic_13.java
986ed456f4036a00f36a65bcf570fe3583b9d427
[]
no_license
CU-0xff/CWE-Juliet-TestSuite-Java
0b4846d6b283d91214fed2ab96dd78e0b68c945c
f616822e8cb65e4e5a321529aa28b79451702d30
refs/heads/master
2020-09-14T10:41:33.545462
2019-11-21T07:34:54
2019-11-21T07:34:54
223,105,798
1
4
null
null
null
null
UTF-8
Java
false
false
3,271
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE478_Missing_Default_Case_in_Switch__basic_13.java Label Definition File: CWE478_Missing_Default_Case_in_Switch__basic.label.xml Template File: point-flaw-13.tmpl.java */ /* * @description * CWE: 478 Missing Default Case in Switch * Sinks: * GoodSink: Use default case in switch statement * BadSink : No default case in a switch statement * Flow Variant: 13 Control flow: if(IO.STATIC_FINAL_FIVE==5) and if(IO.STATIC_FINAL_FIVE!=5) * * */ package testcases.CWE478_Missing_Default_Case_in_Switch; import testcasesupport.*; import java.io.*; import java.security.SecureRandom; public class CWE478_Missing_Default_Case_in_Switch__basic_13 extends AbstractTestCase { public void bad() throws Throwable { if (IO.STATIC_FINAL_FIVE == 5) { String stringIntValue = ""; int x = (new SecureRandom()).nextInt(3); switch (x) { case 0: stringIntValue = "0"; break; case 1: stringIntValue = "1"; break; /* FLAW: x could be 2, and there is no 'default' case for that */ } IO.writeLine(stringIntValue); } } /* good1() changes IO.STATIC_FINAL_FIVE==5 to IO.STATIC_FINAL_FIVE!=5 */ private void good1() throws Throwable { if (IO.STATIC_FINAL_FIVE != 5) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ IO.writeLine("Benign, fixed string"); } else { String stringIntValue = ""; int x = (new SecureRandom()).nextInt(3); switch (x) { case 0: stringIntValue = "0"; break; case 1: stringIntValue = "1"; break; /* FIX: Add a default case */ default: stringIntValue = "2"; } IO.writeLine(stringIntValue); } } /* good2() reverses the bodies in the if statement */ private void good2() throws Throwable { if (IO.STATIC_FINAL_FIVE == 5) { String stringIntValue = ""; int x = (new SecureRandom()).nextInt(3); switch (x) { case 0: stringIntValue = "0"; break; case 1: stringIntValue = "1"; break; /* FIX: Add a default case */ default: stringIntValue = "2"; } IO.writeLine(stringIntValue); } } public void good() throws Throwable { good1(); good2(); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "frank@fischer.com.mt" ]
frank@fischer.com.mt
ef7a13bedfa2085f9b20327b29bb3d9ecbab167c
7f20b1bddf9f48108a43a9922433b141fac66a6d
/cytoscape3/branches/abeld-gsoc/dev/refactored-viewmodel/view/src/main/java/org/cytoscape/view/Label.java
7e4e9a789b2381873741bc0775f6d18e04a86550
[]
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
2,382
java
package org.cytoscape.view; import java.awt.*; public interface Label { public static int NORTHWEST = 0; public static int NORTH = 1; public static int NORTHEAST = 2; public static int WEST = 3; public static int CENTER = 4; public static int EAST = 5; public static int SOUTHWEST = 6; public static int SOUTH = 7; public static int SOUTHEAST = 8; public static int SOURCE_BOUND = 9; public static int TARGET_BOUND = 10; public static int JUSTIFY_CENTER = 64; public static int JUSTIFY_LEFT = 65; public static int JUSTIFY_RIGHT = 66; public static int NONE = 127; /** * Give the Label a hint on where to draw itself. * <B>NOTE:</B> This should be thought of as a hint only, not * all labels will support all positions */ /** * Get the paint used to paint this nodes text. * @return Paint */ public Paint getTextPaint(); /** * Set the paint used to paint this nodes text. * @param textPaint */ public void setTextPaint(Paint textPaint) ; /** * Returns the current greek threshold. When the screen font size will be below * this threshold the text is rendered as 'greek' instead of drawing the text * glyphs. */ public double getGreekThreshold() ; /** * Sets the current greek threshold. When the screen font size will be below * this threshold the text is rendered as 'greek' instead of drawing the text * glyphs. * * @param threshold minimum screen font size. */ public void setGreekThreshold(double threshold) ; public String getText() ; /** * Set the text for this node. The text will be broken up into multiple * lines based on the size of the text and the bounds width of this node. */ public void setText(String aText) ; /** * Returns the font of this PText. * @return the font of this PText. */ public Font getFont() ; /** * Set the font of this PText. Note that in Piccolo if you want to change * the size of a text object it's often a better idea to scale the PText * node instead of changing the font size to get that same effect. Using * very large font sizes can slow performance. */ public void setFont(Font aFont) ; /** * */ public void setTextAnchor ( int position ); /** * */ public int getTextAnchor ( ); /** * */ public void setJustify ( int justify ); /** * */ public int getJustify ( ); }
[ "abeld@0ecc0d97-ab19-0410-9704-bfe1a75892f5" ]
abeld@0ecc0d97-ab19-0410-9704-bfe1a75892f5
666bbfa699244fffc0c4a8b2a130a295295fbd6c
38d8f5a661c11e8a321fe87aee35c5fc643a85b3
/app/src/main/java/org/chromium/net/TrafficStatsError.java
7ebfdf549e65d80f292e79e5a62af7f007ed0fb8
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
qixinmin/365browser
0b867042afeae239c9989df9d88a9e4c13fb17b8
23af01e3dfa6f324ee93651ee3ef7f3d4f1668fa
refs/heads/master
2021-05-01T23:48:18.766955
2020-01-01T10:45:39
2020-01-01T10:45:39
77,889,150
1
0
Apache-2.0
2020-01-01T10:45:42
2017-01-03T06:12:53
Java
UTF-8
Java
false
false
686
java
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This file is autogenerated by // java_cpp_enum.py // From // ../../net/android/traffic_stats.cc package org.chromium.net; import android.support.annotation.IntDef; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @IntDef({ TrafficStatsError.ERROR_NOT_SUPPORTED }) @Retention(RetentionPolicy.SOURCE) public @interface TrafficStatsError { /** * Value returned by AndroidTrafficStats APIs when a valid value is unavailable. */ int ERROR_NOT_SUPPORTED = 0; }
[ "alexzchen@china-liantong.com" ]
alexzchen@china-liantong.com
556c387e8be386154651a1840b68d93f01481473
63152c4f60c3be964e9f4e315ae50cb35a75c555
/sql/catalyst/target/java/org/apache/spark/sql/catalyst/expressions/aggregate/BitXorAgg.java
ebed00006c79d356cc863834bb0d9c8a894a621e
[ "EPL-1.0", "Classpath-exception-2.0", "LicenseRef-scancode-unicode", "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-free-unknown", "GCC-exception-3.1", "LGPL-2.0-or-later", "CDDL-1.0", "MIT", "CC-BY-SA-3.0", "NAIST-2003", "LGPL-2.1-only", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-other-permissive", "GPL-2.0-only", "Apache-2.0", "LicenseRef-scancode-public-domain", "CPL-1.0", "CC-PDDC", "EPL-2.0", "CDDL-1.1", "BSD-2-Clause", "CC0-1.0", "Python-2.0", "LicenseRef-scancode-unknown" ]
permissive
PowersYang/spark-cn
76c407d774e35d18feb52297c68c65889a75a002
06a0459999131ee14864a69a15746c900e815a14
refs/heads/master
2022-12-11T20:18:37.376098
2020-03-30T09:48:22
2020-03-30T09:48:22
219,248,341
0
0
Apache-2.0
2022-12-05T23:46:17
2019-11-03T03:55:17
HTML
UTF-8
Java
false
false
886
java
package org.apache.spark.sql.catalyst.expressions.aggregate; public class BitXorAgg extends org.apache.spark.sql.catalyst.expressions.aggregate.BitAggregate implements scala.Product, scala.Serializable { static public abstract R apply (T1 v1) ; static public java.lang.String toString () { throw new RuntimeException(); } public org.apache.spark.sql.catalyst.expressions.Expression child () { throw new RuntimeException(); } // not preceding public BitXorAgg (org.apache.spark.sql.catalyst.expressions.Expression child) { throw new RuntimeException(); } public java.lang.String nodeName () { throw new RuntimeException(); } public org.apache.spark.sql.catalyst.expressions.BinaryArithmetic bitOperator (org.apache.spark.sql.catalyst.expressions.Expression left, org.apache.spark.sql.catalyst.expressions.Expression right) { throw new RuntimeException(); } }
[ "577790911@qq.com" ]
577790911@qq.com
9f74e15a8403c3043a4631fb415b54b0fd6f01fc
0e4756fbda5832b02258425dd0e94382fdcb40d1
/ctoedu-dubbo-demo/ctoedu-service-demo/src/main/java/com/ctoedu/demo/core/role/repository/UmsRoleRepository.java
83699d10a8dc1db040e388626968a176ac42b494
[]
no_license
bobobokey/learndemo
d1da80636864825a8d1a6e6fe1168b599de119d9
24d6200e39d49362ce37023367627f536ecfa814
refs/heads/master
2022-04-28T14:44:17.970284
2022-04-28T04:33:01
2022-04-28T04:33:01
486,090,706
0
0
null
2022-04-28T04:33:02
2022-04-27T07:30:09
null
UTF-8
Java
false
false
522
java
package com.ctoedu.demo.core.role.repository; import java.util.List; import org.springframework.data.jpa.repository.Query; import com.ctoedu.common.repository.BaseRepository; import com.ctoedu.demo.facade.role.entity.UmsRole; /** * * Date:2016年11月23日 上午10:54:30 * Version:1.0 */ public interface UmsRoleRepository extends BaseRepository<UmsRole,String> { @Query("select o from UmsRole o where o.sn=?1") public UmsRole findByRoleSn(String roleSn); public void deleteByAppIdIn(List<String> appIds); }
[ "32060663+csy512889371@users.noreply.github.com" ]
32060663+csy512889371@users.noreply.github.com
82506fdf7863d1a14eee014d16086368c0ee2f6c
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/16/863.java
299199103d0cee463c4f3ea7d1e84bad1d9b13a0
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
698
java
package <missing>; public class GlobalMembers { public static int Main() { int a; int b; int c; int d; int e; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { a = Integer.parseInt(tempVar); } if (a < 10) { b = a; System.out.printf("%d",b); } else if (a < 100) { b = a / 10; c = a % 10; System.out.printf("%d%d",c,b); } else if (a < 1000) { b = a / 100; c = (a % 100) / 10; d = a % 10; System.out.printf("%d%d%d",d,c,b); } else if (a < 10000) { b = a / 1000; c = (a % 1000) / 100; d = (a % 100) / 10; e = a % 10; System.out.printf("%d%d%d%d",e,d,c,b); } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
c2416dbc3f0338ab32b793638598a457bb3205a5
419d8ddce5a33e2025a906638fb1ab4918464cd2
/spring-framework-5.3.2/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolver.java
0bb9dc8dcfd1beaa093d06725c0835bbc102c68e
[ "Apache-2.0" ]
permissive
ynan1213/Java-Study
43ac8ba546fc5a6188ee8872767fa316dfea4a32
1d933138e79ef2cb8ea4de57abc84ac12d883a0a
refs/heads/master
2022-06-30T11:54:23.245439
2021-12-05T01:43:03
2021-12-05T01:43:03
152,955,095
1
0
null
2022-06-21T04:21:49
2018-10-14T08:44:55
Java
UTF-8
Java
false
false
5,833
java
/* * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.method.annotation; import java.util.Collection; import java.util.LinkedHashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.Part; import org.springframework.core.MethodParameter; import org.springframework.core.ResolvableType; import org.springframework.lang.Nullable; import org.springframework.util.CollectionUtils; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.support.WebDataBinderFactory; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.method.support.ModelAndViewContainer; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartRequest; import org.springframework.web.multipart.support.MultipartResolutionDelegate; /** * Resolves {@link Map} method arguments annotated with an @{@link RequestParam} * where the annotation does not specify a request parameter name. * * <p>The created {@link Map} contains all request parameter name/value pairs, * or all multipart files for a given parameter name if specifically declared * with {@link MultipartFile} as the value type. If the method parameter type is * {@link MultiValueMap} instead, the created map contains all request parameters * and all their values for cases where request parameters have multiple values * (or multiple multipart files of the same name). * * @author Arjen Poutsma * @author Rossen Stoyanchev * @author Juergen Hoeller * @since 3.1 * @see RequestParamMethodArgumentResolver * @see HttpServletRequest#getParameterMap() * @see MultipartRequest#getMultiFileMap() * @see MultipartRequest#getFileMap() */ public class RequestParamMapMethodArgumentResolver implements HandlerMethodArgumentResolver { @Override public boolean supportsParameter(MethodParameter parameter) { RequestParam requestParam = parameter.getParameterAnnotation(RequestParam.class); return (requestParam != null && Map.class.isAssignableFrom(parameter.getParameterType()) && !StringUtils.hasText(requestParam.name())); } @Override public Object resolveArgument(MethodParameter parameter, @Nullable ModelAndViewContainer mavContainer, NativeWebRequest webRequest, @Nullable WebDataBinderFactory binderFactory) throws Exception { ResolvableType resolvableType = ResolvableType.forMethodParameter(parameter); if (MultiValueMap.class.isAssignableFrom(parameter.getParameterType())) { // MultiValueMap Class<?> valueType = resolvableType.as(MultiValueMap.class).getGeneric(1).resolve(); if (valueType == MultipartFile.class) { MultipartRequest multipartRequest = MultipartResolutionDelegate.resolveMultipartRequest(webRequest); return (multipartRequest != null ? multipartRequest.getMultiFileMap() : new LinkedMultiValueMap<>(0)); } else if (valueType == Part.class) { HttpServletRequest servletRequest = webRequest.getNativeRequest(HttpServletRequest.class); if (servletRequest != null && MultipartResolutionDelegate.isMultipartRequest(servletRequest)) { Collection<Part> parts = servletRequest.getParts(); LinkedMultiValueMap<String, Part> result = new LinkedMultiValueMap<>(parts.size()); for (Part part : parts) { result.add(part.getName(), part); } return result; } return new LinkedMultiValueMap<>(0); } else { Map<String, String[]> parameterMap = webRequest.getParameterMap(); MultiValueMap<String, String> result = new LinkedMultiValueMap<>(parameterMap.size()); parameterMap.forEach((key, values) -> { for (String value : values) { result.add(key, value); } }); return result; } } else { // Regular Map Class<?> valueType = resolvableType.asMap().getGeneric(1).resolve(); if (valueType == MultipartFile.class) { MultipartRequest multipartRequest = MultipartResolutionDelegate.resolveMultipartRequest(webRequest); return (multipartRequest != null ? multipartRequest.getFileMap() : new LinkedHashMap<>(0)); } else if (valueType == Part.class) { HttpServletRequest servletRequest = webRequest.getNativeRequest(HttpServletRequest.class); if (servletRequest != null && MultipartResolutionDelegate.isMultipartRequest(servletRequest)) { Collection<Part> parts = servletRequest.getParts(); LinkedHashMap<String, Part> result = CollectionUtils.newLinkedHashMap(parts.size()); for (Part part : parts) { if (!result.containsKey(part.getName())) { result.put(part.getName(), part); } } return result; } return new LinkedHashMap<>(0); } else { Map<String, String[]> parameterMap = webRequest.getParameterMap(); Map<String, String> result = CollectionUtils.newLinkedHashMap(parameterMap.size()); parameterMap.forEach((key, values) -> { if (values.length > 0) { result.put(key, values[0]); } }); return result; } } } }
[ "452245790@qq.com" ]
452245790@qq.com
f5861beaada9571775b2ed082e90b0bd2b6ad1a0
8ed63ef4a175fa0dac95b5196e1de72bb86b038e
/gulimall-pms/src/main/java/com/atguigu/gulimall/pms/entity/SpuInfoDescEntity.java
b35bc44d414c51fc5c1da073ec1d14be409d71d6
[ "Apache-2.0" ]
permissive
Trafalgar1Law/gulimall
1fbfb7a14fed667bbf0e14ec9f61105d5a692aa9
429c4921c1f0fbd6fe68b2113cb1a11824abf952
refs/heads/master
2022-07-23T04:18:09.353793
2019-08-11T02:17:58
2019-08-11T02:17:58
200,051,096
0
0
Apache-2.0
2022-07-06T20:39:51
2019-08-01T12:58:21
JavaScript
UTF-8
Java
false
false
793
java
package com.atguigu.gulimall.pms.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; import java.util.Date; import lombok.Data; /** * spu信息介绍 * * @author Jesse * @email Jesse@atguigu.com * @date 2019-08-01 21:54:13 */ @ApiModel @Data @TableName("pms_spu_info_desc") public class SpuInfoDescEntity implements Serializable { private static final long serialVersionUID = 1L; /** * 商品id */ @TableId @ApiModelProperty(name = "spuId",value = "商品id") private Long spuId; /** * 商品介绍 */ @ApiModelProperty(name = "decript",value = "商品介绍") private String decript; }
[ "1250503713@qq.com" ]
1250503713@qq.com
38b820c999781d0ff3f7586d6f58c16355c93f34
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_d35c9eca24daa68f1f192ab592d2becfe18e8e59/ExtendedScannerInfo/12_d35c9eca24daa68f1f192ab592d2becfe18e8e59_ExtendedScannerInfo_s.java
67df0abc86910451c9d75efe4c6c12d5dc3cca44
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,540
java
/******************************************************************************* * Copyright (c) 2005, 2009 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: * IBM Rational Software - Initial API and implementation * Markus Schorn (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.core.parser; import java.util.Map; /** * Implementation for the {@link IExtendedScannerInfo} interface. Allows to configure the preprocessor. */ public class ExtendedScannerInfo extends ScannerInfo implements IExtendedScannerInfo { private static final String[] EMPTY_STRING_ARRAY = new String[0]; private String[] macroFiles; private String[] includeFiles; private String[] localIncludePaths; public ExtendedScannerInfo() { } public ExtendedScannerInfo(Map<String, String> definedSymbols, String[] includePaths) { super(definedSymbols, includePaths); } public ExtendedScannerInfo(Map<String, String> definedSymbols, String[] includePaths, String[] macroFiles, String[] includeFiles) { super(definedSymbols, includePaths); this.macroFiles = macroFiles; this.includeFiles = includeFiles; } public ExtendedScannerInfo(IScannerInfo info) { super(info.getDefinedSymbols(), info.getIncludePaths()); if (info instanceof IExtendedScannerInfo) { IExtendedScannerInfo einfo = (IExtendedScannerInfo) info; macroFiles = einfo.getMacroFiles(); includeFiles = einfo.getIncludeFiles(); localIncludePaths = einfo.getLocalIncludePath(); } } /* (non-Javadoc) * @see org.eclipse.cdt.core.parser.IExtendedScannerInfo#getMacroFiles() */ public String[] getMacroFiles() { if (macroFiles == null) return EMPTY_STRING_ARRAY; return macroFiles; } /* (non-Javadoc) * @see org.eclipse.cdt.core.parser.IExtendedScannerInfo#getIncludeFiles() */ public String[] getIncludeFiles() { if (includeFiles == null) return EMPTY_STRING_ARRAY; return includeFiles; } /* (non-Javadoc) * @see org.eclipse.cdt.core.parser.IExtendedScannerInfo#getLocalIncludePath() */ public String[] getLocalIncludePath() { if (localIncludePaths == null) return EMPTY_STRING_ARRAY; return localIncludePaths; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
943631ca3f664b9808c5ebe09b83892dde5b63fa
2869fc39e2e63d994d5dd8876476e473cb8d3986
/pet/lvmama_common/src/main/java/com/lvmama/comm/bee/service/ebooking/EbkProdProductService.java
38e1d5579d4ceac5d7611f80078312efb75cdf7c
[]
no_license
kavt/feiniu_pet
bec739de7c4e2ee896de50962dbd5fb6f1e28fe9
82963e2e87611442d9b338d96e0343f67262f437
refs/heads/master
2020-12-25T17:45:16.166052
2016-06-13T10:02:42
2016-06-13T10:02:42
61,026,061
0
0
null
2016-06-13T10:02:01
2016-06-13T10:02:01
null
UTF-8
Java
false
false
3,432
java
package com.lvmama.comm.bee.service.ebooking; import java.util.Date; import java.util.List; import java.util.Map; import com.lvmama.comm.bee.po.ebooking.EbkProdProduct; import com.lvmama.comm.bee.po.ebooking.EbkProdRejectInfo; import com.lvmama.comm.pet.vo.Page; public interface EbkProdProductService { /** * EBK产品管理 >产品信息表 * 2013-9-25 */ /** * 保存EBK产品信息 * @param EbkProdProduct * @return */ public int saveEbkProdProduct(EbkProdProduct saveEbkProdAllMsg); /** * 根据供应商ID,产品类型对审核进行分组统计总数 * @param supplierId * @return */ public Map<String,Object> queryAllCount(Long supplierId,String[] subProductTypes); public List<Map<String,Object>> queryCountGroupByStatus(Map<String, Object> parameters); /** * 根据查询条件查询供应商产品列表 * @param parameters * @return */ public Page<EbkProdProduct> queryProduct(Map<String,Object> parameters); /** * 根据EBK产品ID提交审核 * @param ebkProdProductId * @return */ public int auditCommit(final Long ebkProdProductId,Long updateUserId); /** * 根据EBK产品ID撤销审核 * @param ebkProdProductId * @return */ public int auditRevoke(final Long ebkProdProductId); /** * 根据主键获取ebkProdProductDO * @param ebkProdProductId * @return ebkProdProductDO */ public EbkProdProduct findEbkProdProductDOByPrimaryKey(Long ebkProdProductId); /** * 根据产品Id获取产品对象和其它所有关联数据 * @author ZHANG Nan * @param ebkProdProductId * @return */ public EbkProdProduct findEbkProdProductAndBaseByPrimaryKey(Long ebkProdProductId); /** * 根据产品Id获取产品对象和行程描述页数据 * @author ZHANG Nan * @param ebkProdProductId * @return */ public EbkProdProduct findEbkProdProductAndTripByPrimaryKey(Long ebkProdProductId); /** * 根据产品Id获取产品对象和EBK_PROD_CONTENT表数据 * @author ZHANG Nan * @param ebkProdProductId * @return */ public EbkProdProduct findEbkProdProductAndContentByPrimaryKey(Long ebkProdProductId); public EbkProdProduct findEbkProdAllByPrimaryKey(Long ebkProdProductId); /** * 根据产品Id删除未提交产品的产品对象和基础信息页数据 * @author shangzhengyuan * @param ebkProdProductId * @return */ public int deleteUnCommitAudit(Long ebkProdProductId); /** * 审核通过-导入到super系统 * @author ZHANG Nan * @param ebkProdProductId EBK产品ID * @param onlineTime 上线开始时间 * @param offlineTime 上线结束时间 * @param online 是否上线 */ public void prodProductAuditPass(Long ebkProdProductId,Date onlineTime,Date offlineTime,Boolean online)throws Exception; /** * 审核不通过-记录审核不通过信息 * @author ZHANG Nan * @param ebkProdProductId EBK产品ID * @param ebkProdRejectInfoList 审核不通过信息集合 */ public void prodProductAuditNoPass(Long ebkProdProductId,List<EbkProdRejectInfo> ebkProdRejectInfoList); int auditRecover(Long ebkProdProductId); public void updateEbkProdProductDO(EbkProdProduct ebkProdProduct); public List<EbkProdProduct> findListByExample(Map<String, Object> parameters); public EbkProdProduct findEbkProdByProductId(Long prodProductId); }
[ "feiniu7903@163.com" ]
feiniu7903@163.com
c5d364a58124ceedce90083499be6859f4d2e4d6
ba48e5dc43badfa82a423a6dc4c6957faa0ceff0
/module_mine/src/main/java/com/xingshi/new_guide/NewGuideActivity.java
4a79cbb52b36178508a79394fe599ea487b7f5da
[]
no_license
sengeiou/wangyihai
048d6a880297c6605bde0bbc26857ef60463b3ac
5b21bb6b04015bfb2811b843a417d9b22fe836cb
refs/heads/master
2022-07-19T11:49:37.255494
2020-05-23T10:42:43
2020-05-23T10:42:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,365
java
package com.xingshi.new_guide; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.xingshi.module_mine.R; import com.xingshi.module_mine.R2; import com.xingshi.mvp.BaseActivity; import com.xingshi.utils.UIHelper; import butterknife.BindView; public class NewGuideActivity extends BaseActivity<NewGuideView, NewGuidePresenter> implements NewGuideView { @BindView(R2.id.include_back) ImageView includeBack; @BindView(R2.id.include_title) TextView includeTitle; @BindView(R2.id.newguide_img1) ImageView newguideImg1; @BindView(R2.id.newguide_img2) ImageView newguideImg2; @BindView(R2.id.newguide_img3) ImageView newguideImg3; @BindView(R2.id.newguide_img4) ImageView newguideImg4; @Override public int getLayoutId() { return R.layout.activity_new_guide; } @Override public void initData() { includeTitle.setText("新人指导"); } @Override public void initClick() { includeBack.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); newguideImg1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { UIHelper.seeBigImg(NewGuideActivity.this,R.drawable.newguide1); } }); newguideImg2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { UIHelper.seeBigImg(NewGuideActivity.this,R.drawable.newguide2); } }); newguideImg3.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { UIHelper.seeBigImg(NewGuideActivity.this,R.drawable.newguide3); } }); newguideImg4.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { UIHelper.seeBigImg(NewGuideActivity.this,R.drawable.newguide4); } }); } @Override public NewGuideView createView() { return this; } @Override public NewGuidePresenter createPresenter() { return new NewGuidePresenter(this); } }
[ "ellliot_zhang_z@163.com" ]
ellliot_zhang_z@163.com
60baa868b877462c462f3f399c1d978d565f4082
96a7a4a7f7fbaedbf8c3c1dfd4d359ce37c0ab65
/ExtractInfo/src/test/java/extractor/Test_ExtractorInfoWeb.java
1880fb95c470498b1a7a6551153ad4c7645a4d6d
[]
no_license
p4535992/EAT
e0ae1de068cb5d5d260d2180df2fa2f2712741d0
13bd296dce4535ec5be9c3dce845a4a6a6926ab5
refs/heads/master
2021-01-17T20:12:08.542645
2016-04-11T10:26:20
2016-04-11T10:26:20
34,076,827
0
2
null
null
null
null
UTF-8
Java
false
false
3,851
java
package extractor; import com.github.p4535992.extractor.estrattori.ExtractInfoWeb; import com.github.p4535992.extractor.object.model.GeoDocument; import com.github.p4535992.gatebasic.gate.gate8.ExtractorInfoGate81; import com.github.p4535992.gatebasic.gate.gate8.GateSupport2; import gate.CorpusController; import java.lang.reflect.InvocationTargetException; import java.net.MalformedURLException; import java.net.URL; import java.sql.SQLException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * Created by 4535992 on 25/06/2015. */ public class Test_ExtractorInfoWeb { public static void main(String[] args) throws MalformedURLException, InterruptedException, SQLException, InvocationTargetException { //Set the Driver Manager for a MySQL Database... ExtractInfoWeb web = ExtractInfoWeb.getInstance( "com.mysql.jdbc.Driver","jdbc:mysql","localhost","3306","username","password","nameDatabase"); CorpusController controller = (CorpusController) web.getController(); //Class for process a document with GATE and get a result with only the st ring value //name Document -> name AnnotationSet -> name Annotation -> string content. ExtractorInfoGate81 eig8 = ExtractorInfoGate81.getInstance(); //create a list of annotation (you know they exists on the gate document,otherwise you get null result)..... List<String> listAnn = new ArrayList<>(Arrays.asList("MyRegione","MyPhone","MyFax","MyEmail","MyPartitaIVA", "MyLocalita","MyIndirizzo","MyEdificio","MyProvincia")); //create a list of annotationSet (you know they exists on the gate document,otherwise you get null result)..... List<String> listAnnSet = new ArrayList<>(Arrays.asList("MyFOOTER","MyHEAD","MySpecialID","MyAnnSet")); //METHOD 1: extract all the information given from a URL in a specific object GeoDocument, // there are method for works with java.io.File File or Directory //Store the result on of the extraction on a GateSupport Object GateSupport2 support = GateSupport2.getInstance( eig8.extractorGATE( new URL("http://www.unifi.it"),controller,"corpus_test_1",listAnn,listAnnSet,true) ); //Now you can get the content from a specific document, specific AnnotationSet, specific Annotation. String contnet0 = support.getSingleContent("doc1", "MyAnnSet", "MyIndirizzo"); // "P.azza Guido Monaco" String content1 = support.getSingleContent(0,"MyAnnSet", "MyIndirizzo"); // "P.azza Guido Monaco" String content2 = support.getSingleContent(0,0,"MyIndirizzo"); // "P.azza Guido Monaco" String content3 = support.getSingleContent(0,0,0); // "P.azza Guido Monaco" GeoDocument geoDoc = web.convertGateSupport2ToGeoDocument(support,new URL("http://www.unifi.it"),0); //METHOD 2: and we want to save the geoDocument in a table on the database. String table_where_insert ="test_55"; String table_where_select= "test_55"; // in this case the "select" table is use for avoid the insert of duplicate GeoDocument geoDoc2 = web.ExtractGeoDocumentFromUrl(new URL("http://www.unifi.it"),table_where_select,table_where_insert,true,false); //METHOD 3: Convert a relational table in a file of triple with a Web-Karma Model: String output_format ="ttl"; String output_karma_file ="c:\\path\\fileOfTriple.n3"; //always given the input in n3 format. String karma_model ="c:\\path\\model_R2RML.ttl"; //This piece of code save a file of triple in a file... web.triplifyGeoDocumentFromDatabase(table_where_select, table_where_select, output_format, karma_model, output_karma_file, true, false); } }
[ "tentimarco0@gmail.com" ]
tentimarco0@gmail.com
84916e123956894c5b6775c4f1c2fca9e44611e3
a52d48da98425f6b4f0c47e4facdc78a067e5e35
/chao-cloud-micro-auth/src/main/java/com/chao/cloud/micro/auth/dal/mapper/OauthClientDetailsMapper.java
c25d8034d7902e568956b7abd5a29796126b80f8
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
chaojunzi/chao-cloud-micro
0740da1c30e5e414cbe8ed5712de0c41a2556d53
06b65adba1a35aa5e5b7c01e5a40a5123dbfabd2
refs/heads/master
2020-07-12T19:27:35.206454
2020-01-03T07:44:07
2020-01-03T07:44:07
204,890,898
5
6
null
null
null
null
UTF-8
Java
false
false
373
java
package com.chao.cloud.micro.auth.dal.mapper; import com.chao.cloud.micro.auth.dal.entity.OauthClientDetails; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; /** * @author 薛超 * @since 2019-09-06 * @version 1.0.7 */ @Mapper public interface OauthClientDetailsMapper extends BaseMapper<OauthClientDetails> { }
[ "1521515935@qq.com" ]
1521515935@qq.com
106ae82a139784cc151c72c7e0064d9791776642
8d1a11756ff58822d018a3141a2de1b4baee6894
/src/main/java/com/wolf/controller/Person.java
1dde353536b17a893a88b58eceddaa9a203152e3
[]
no_license
liyork/violin-springmvc
595bfc10ebd8485b0cf127aa2659ddc7bbf0d52e
6021cff5f31baf37af718e5fc6598e9dc8afa4d3
refs/heads/main
2023-04-03T02:18:45.655204
2021-04-11T12:22:17
2021-04-11T12:22:17
356,860,347
0
0
null
null
null
null
UTF-8
Java
false
false
394
java
package com.wolf.controller; /** * Description: * <br/> Created on 2016/9/11 15:32 * * @author 李超() * @since 1.0.0 */ public class Person { private String name; private int age; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } }
[ "lichao30@jd.com" ]
lichao30@jd.com
b71740e6c4e3fb2186292908b80885292ceddf26
593658fe33bdff9793b064afb04991acdef7cf18
/sdks/java/http_client/v1/src/test/java/org/openapitools/client/model/V1IoCondTest.java
ea0c2c8966cdb181668d2c5c371f9df15ceb1251
[ "Apache-2.0" ]
permissive
Altovate/polyaxon
6dc01cba2bb8c81c38a7313e0e9a070ca54906ed
255b8f0bb2db53871dff5b02a0f830a1eb8a0c79
refs/heads/master
2022-11-14T16:52:12.168141
2020-07-09T21:22:52
2020-07-09T21:22:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,016
java
// Copyright 2018-2020 Polyaxon, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /* * Polyaxon SDKs and REST API specification. * Polyaxon SDKs and REST API specification. * * The version of the OpenAPI document: 1.1.0 * Contact: contact@polyaxon.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client.model; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** * Model tests for V1IoCond */ public class V1IoCondTest { private final V1IoCond model = new V1IoCond(); /** * Model tests for V1IoCond */ @Test public void testV1IoCond() { // TODO: test V1IoCond } /** * Test the property 'kind' */ @Test public void kindTest() { // TODO: test kind } /** * Test the property 'param' */ @Test public void paramTest() { // TODO: test param } /** * Test the property 'trigger' */ @Test public void triggerTest() { // TODO: test trigger } }
[ "mouradmourafiq@gmail.com" ]
mouradmourafiq@gmail.com
3da246ed9af116bcfbb7f190dd309fb902cfeeca
37fc6588a4287932675faa6c6fa80b5230a0710d
/yeju-service-interfaces/yeju-product-service-interfaces/src/main/java/pers/lbf/yeju/service/interfaces/product/pojo/HouseSearchArgs.java
3cdf56d4bcf90117e9808c74be3b5cc1ef0e2c57
[ "Apache-2.0" ]
permissive
bingfenglai/yeju
80abf56300ddfe6c0aca510540a4a64d654e8149
56902cd26ed79eb2a79b200219b36ba4ddbf8128
refs/heads/main
2023-06-10T11:46:43.566400
2021-06-21T09:54:26
2021-06-21T09:54:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,321
java
/* * Copyright 2020 赖柄沣 bingfengdev@aliyun.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package pers.lbf.yeju.service.interfaces.product.pojo; import pers.lbf.yeju.common.core.args.BaseFindPageArgs; import pers.lbf.yeju.common.core.args.IFindPageArgs; import javax.validation.constraints.NotNull; import java.io.Serializable; /** * 房源关键词分页搜索参数 * * @author 赖柄沣 bingfengdev@aliyun.com * @version 1.0 * @date 2021/4/27 15:13 */ public class HouseSearchArgs extends BaseFindPageArgs implements IFindPageArgs, Serializable { @NotNull(message = "搜索关键词不能为空") private String keyWord; public String getKeyWord() { return keyWord; } public void setKeyWord(String keyWord) { this.keyWord = keyWord; } }
[ "bingfengdev@aliyun.com" ]
bingfengdev@aliyun.com
40b2518823f17eaa0e035d966a32484883cab6ec
47119d527d55e9adcb08a3a5834afe9a82dd2254
/apisvc/src/main/java/com/emc/storageos/api/service/impl/response/ProjOwnedResRepFilter.java
cb20a9dd87280d74f627e5455b197518121bbfec
[]
no_license
chrisdail/coprhd-controller
1c3ddf91bb840c66e4ece3d4b336a6df421b43e4
38a063c5620135a49013aae5e078aeb6534a5480
refs/heads/master
2020-12-03T10:42:22.520837
2015-06-08T15:24:36
2015-06-08T15:24:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,458
java
/** * Copyright 2015 EMC Corporation * All Rights Reserved */ /** * Copyright (c) 2008-2013 EMC Corporation * All Rights Reserved * * This software contains the intellectual property of EMC Corporation * or is licensed to EMC Corporation from third parties. Use of this * software and the intellectual property contained therein is expressly * limited to the terms and conditions of the License Agreement under which * it is provided by or on behalf of EMC. */ package com.emc.storageos.api.service.impl.response; import java.net.URI; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.emc.storageos.api.service.authorization.PermissionsHelper; import com.emc.storageos.db.client.model.DataObject; import com.emc.storageos.db.client.model.VirtualArray; import com.emc.storageos.db.client.model.VirtualPool; import com.emc.storageos.db.client.model.Project; import com.emc.storageos.db.client.model.ProjectResource; import com.emc.storageos.db.client.model.TenantOrg; import com.emc.storageos.db.client.model.Network; import com.emc.storageos.db.client.model.NamedURI; import com.emc.storageos.security.authentication.StorageOSUser; import com.emc.storageos.security.authorization.ACL; import com.emc.storageos.security.authorization.Role; import com.emc.storageos.model.RelatedResourceRep; /* * Filter for project owned resource representations * */ public class ProjOwnedResRepFilter <E extends RelatedResourceRep, K extends DataObject&ProjectResource> extends ResRepFilter<E> { Class<K> _clazz = null; public ProjOwnedResRepFilter(StorageOSUser user, PermissionsHelper permissionsHelper, Class<K> clazz) { super(user, permissionsHelper); _clazz = clazz; } @Override public boolean isAccessible(E resrep) { boolean ret = false; URI id = resrep.getId(); // bypass cache for all the project owned resources K obj = _permissionsHelper.getObjectById(id, _clazz, true); if (obj == null) return false; ret = isTenantAccessible(obj.getTenant().getURI()); if (!ret) { NamedURI proj = obj.getProject(); if (proj != null) { ret = isProjectAccessible(proj.getURI()); } } return ret; } }
[ "review-coprhd@coprhd.org" ]
review-coprhd@coprhd.org
1846004750fadfdde8dd42323837e528de0a89f7
a111e294b79abf20a9e33149d38c1e13ae20f5ab
/bank/src/main/java/bank/EntityManagerProducer.java
06e6154a9f4e2ac0d48d258b694cf4c8e81dbc3c
[]
no_license
Training360/architect-2020-mb
b95b0a983f8915d8f28552f8f91a39daa4c1b950
99b5a90e21cd5bb168347742ea06a220159f6209
refs/heads/master
2022-09-27T01:21:58.612451
2020-09-11T06:37:05
2020-09-11T06:37:05
253,431,167
0
2
null
2022-09-08T01:09:06
2020-04-06T07:52:53
Java
UTF-8
Java
false
false
545
java
package bank; import javax.enterprise.inject.Disposes; import javax.enterprise.inject.Produces; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.PersistenceUnit; public class EntityManagerProducer { @PersistenceUnit private EntityManagerFactory emf; @Produces public EntityManager create() { return emf.createEntityManager(); } public void close(@Disposes EntityManager em) { if (em.isOpen()) { em.close(); } } }
[ "viczian.istvan@gmail.com" ]
viczian.istvan@gmail.com
1b5431c8b8b5df334fc9dae04c66ec6067b19c4f
7bd781d8a6cd531b7d260c52dbc9a93b7c6eebe4
/src/main/java/org/ssssssss/magicapi/context/RequestContext.java
4a8d249d38e8a61acee03f0dfbee47889422d26a
[ "MIT" ]
permissive
chriscbz/magic-api
4755d07914abeb74c349c43f9bdc239880d66cf2
49609c0b65b8274cc711f8280ae973d05cb64663
refs/heads/master
2023-04-09T05:35:11.717723
2021-04-19T12:27:58
2021-04-19T12:27:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,251
java
package org.ssssssss.magicapi.context; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class RequestContext { private static final ThreadLocal<RequestAttribute> REQUEST_ATTRIBUTE_THREAD_LOCAL = new InheritableThreadLocal<>(); public static void setRequestAttribute(HttpServletRequest request, HttpServletResponse response) { REQUEST_ATTRIBUTE_THREAD_LOCAL.set(new RequestAttribute(request, response)); } public static HttpServletRequest getHttpServletRequest() { RequestAttribute requestAttribute = REQUEST_ATTRIBUTE_THREAD_LOCAL.get(); return requestAttribute == null ? null : requestAttribute.request; } public static HttpServletResponse getHttpServletResponse() { RequestAttribute requestAttribute = REQUEST_ATTRIBUTE_THREAD_LOCAL.get(); return requestAttribute == null ? null : requestAttribute.response; } public static void remove() { REQUEST_ATTRIBUTE_THREAD_LOCAL.remove(); } private static class RequestAttribute { private final HttpServletRequest request; private final HttpServletResponse response; public RequestAttribute(HttpServletRequest request, HttpServletResponse response) { this.request = request; this.response = response; } } }
[ "838425805@qq.com" ]
838425805@qq.com
a035c5f8cf41609a472731f2e131c914cb11cc60
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_dbfa451aab74885e035e47b800afd7cc9c65184d/AmazonCommentTestBase/9_dbfa451aab74885e035e47b800afd7cc9c65184d_AmazonCommentTestBase_s.java
f9a388b528973ee7a57e43c7482a5ab86c505bc5
[]
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,073
java
package com.thoughtworks.selenium.grid.demo; import static com.thoughtworks.selenium.grid.tools.ThreadSafeSeleniumSessionStorage.session; import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertTrue; /** * Base class for Amazon Web Acceptance tests */ public abstract class AmazonCommentTestBase { protected void runAmazonScenario() throws Exception { session().open("/"); session().type("twotabsearchtextbox", "refactoring"); session().click("navGoButtonPanel"); session().waitForPageToLoad("60000"); assertTrue(session().getLocation().startsWith("http://www.amazon.com/s/ref=")); session().click("//img[@alt='Refactoring: Improving the Design of Existing Code (The Addison-Wesley Object Technology Series)']"); session().waitForPageToLoad("60000"); assertEquals("1", session().getValue("name=quantity")); assertTrue(session().isTextPresent("excellent")); assertTrue(session().isTextPresent("Hidden Treasure")); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c8c7fb520c4a845e78c4dc90b9734e444f70d784
4f4ddc396fa1dfc874780895ca9b8ee4f7714222
/src/java/com/gensym/wksp/WkspElementMenuHandler.java
081e653abc8df256b9de6dcef92d089eac0dc719
[]
no_license
UtsavChokshiCNU/GenSym-Test2
3214145186d032a6b5a7486003cef40787786ba0
a48c806df56297019cfcb22862dd64609fdd8711
refs/heads/master
2021-01-23T23:14:03.559378
2017-09-09T14:20:09
2017-09-09T14:20:09
102,960,203
3
5
null
null
null
null
UTF-8
Java
false
false
6,540
java
package com.gensym.wksp; import com.gensym.util.*; import com.gensym.message.*; import com.gensym.jgi.*; import com.gensym.ntw.*; import com.gensym.draw.*; import java.awt.*; //Rectangle import java.awt.event.*; import java.util.Locale; import com.gensym.classes.Item; import com.gensym.classes.KbWorkspace; import com.gensym.dlgruntime.DialogManager; class WkspElementMenuHandler implements ActionListener, Runnable { private static boolean wkspElementMenuHandlerDebugP = false; private static final Resource i18n = Resource.getBundle("com.gensym.resources.MenuStrings"); private static MenuItem cutMenuItm, copyMenuItm, pasteMenuItm, enableMenuItm, disableMenuItm, describeMenuItm, createSubWkspMenuItm, editMenuItm, propMenuItm, currentItm, flipHorizontallyItm, flipVerticallyItm, changeColorItm,restoreToNormalSizeItm; private String action; private static PopupMenu thePopup; private static final Symbol ADMINISTRATOR_ = Symbol.intern ("ADMINISTRATOR"); static PopupMenu create () { thePopup = new PopupMenu (); thePopup.add (cutMenuItm = new MenuItem (i18n.getString("Edit_Cut"))); cutMenuItm.setActionCommand ("CUT"); thePopup.add (copyMenuItm = new MenuItem (i18n.getString("Edit_Copy"))); copyMenuItm.setActionCommand ("COPY"); thePopup.add (pasteMenuItm = new MenuItem (i18n.getString("Edit_Paste"))); pasteMenuItm.setActionCommand ("PASTE"); /* thePopup.addSeparator (); Menu rotateFlipMenu = new Menu(i18n.getString("Layout_RotateFlip"), false); rotateFlipMenu.add (i18n.getString("Layout_RotateFlip_RotateAroundObjectCenter")); rotateFlipMenu.add (i18n.getString("Layout_RotateFlip_SelectCenterOfRotation")); rotateFlipMenu.add (i18n.getString("Layout_RotateFlip_SpecifyRotation")); rotateFlipMenu.addSeparator(); rotateFlipMenu.add (flipHorizontallyItm = new MenuItem (i18n.getString("Layout_RotateFlip_FlipHorizontally"))); rotateFlipMenu.add (flipVerticallyItm = new MenuItem(i18n.getString("Layout_RotateFlip_FlipVertically"))); thePopup.add (rotateFlipMenu); Menu colorMenu = new Menu("Color", false); colorMenu.add(changeColorItm = new MenuItem("Change Icon Color To Red"));//hack thePopup.add (colorMenu); thePopup.add (restoreToNormalSizeItm = new MenuItem("Normalize Size")); thePopup.addSeparator (); thePopup.add (enableMenuItm = new MenuItem ("Enable"));//i18n.getString("Edit_Disable"))); thePopup.add (disableMenuItm = new MenuItem (i18n.getString("Edit_Disable"))); thePopup.add (describeMenuItm = new MenuItem (i18n.getString("Edit_Describe"))); thePopup.add (createSubWkspMenuItm = new MenuItem (i18n.getString("Edit_CreateSubworkspace"))); */ thePopup.addSeparator (); thePopup.add (editMenuItm = new MenuItem (i18n.getString("Edit"))); editMenuItm.setActionCommand ("EDIT"); thePopup.add (propMenuItm = new MenuItem (i18n.getString ("Properties"))); propMenuItm.setActionCommand ("PROPERTIES"); pasteMenuItm.setEnabled (false); WkspElementMenuHandler handler = new WkspElementMenuHandler (); cutMenuItm.addActionListener (handler); copyMenuItm.addActionListener (handler); pasteMenuItm.addActionListener (handler); //flipHorizontallyItm.addActionListener (handler); //flipVerticallyItm.addActionListener (handler); //changeColorItm.addActionListener (handler); //restoreToNormalSizeItm.addActionListener(handler); //enableMenuItm.addActionListener (handler); //disableMenuItm.addActionListener (handler); //describeMenuItm.addActionListener (handler); //createSubWkspMenuItm.addActionListener (handler); editMenuItm.addActionListener (handler); propMenuItm.addActionListener (handler); return thePopup; } @Override public void actionPerformed (ActionEvent ae) { if (wkspElementMenuHandlerDebugP) System.out.println ("Somebody selected " + ae + " from a thePopup menu!"); currentItm = (MenuItem)ae.getSource (); String x = ae.getActionCommand (); System.out.println ("Action command = " + x); action = x; new NtwNotification (NtwNotification.STATUSCHANGE, 0, "", this, NtwNotification.ACTIVITY_START).send (); new Thread (this).start (); if (wkspElementMenuHandlerDebugP) System.out.println ("PopupMenu Selection Thread : RETURNING!"); } @Override public void run () { if (wkspElementMenuHandlerDebugP) System.out.println ("Running action of choosing from popupMenu!"); MenuContainer mc = thePopup.getParent (); if (wkspElementMenuHandlerDebugP) System.out.println ("Popup Menu parent = " + mc); WorkspaceView wksp = (WorkspaceView)mc; WorkspaceElement[] selection = wksp.getSelection (); if (selection.length == 0) return; WorkspaceElement currentElement = selection[0]; try { if (action.equals ("CUT")) { //currentElement.requestDelete(); } else if (action.equals ("COPY")) { //currentElement.requestClone(wksp.getWorkspace(),,0); } else if (currentItm == flipVerticallyItm){ //currentElement.requestFlipVertically(); } else if (currentItm == flipHorizontallyItm) { //currentElement.requestFlipHorizontally(); } else if (currentItm == changeColorItm) { //currentElement.requestChangeColor(Symbol.intern("ICON-COLOR"), Symbol.intern("red")); } else if (currentItm == restoreToNormalSizeItm) { //currentElement.requestRestoreNormalSize(); } else if (currentItm == enableMenuItm) { //currentElement.requestEnable(); } else if (currentItm == disableMenuItm) { //currentElement.requestDisable(); } else if (action.equals ("EDIT")) { //This should be going through the command handler Item it = currentElement.getItem(); } else if (action.equals ("PROPERTIES")) { // do nothing - cuz this whole file is obsolete } else if (currentItm instanceof UserMenuItem) { ((UserMenuItem)currentItm).fire(); } } catch (Exception g2ae) { // fix this: there will be new notification scheme Trace.exception (g2ae); new NtwNotification (NtwNotification.EXCEPTION, 0, g2ae.toString (), this, NtwNotification.ACTIVITY_STOP).send (); } new NtwNotification (NtwNotification.STATUSCHANGE, 0, "", this, NtwNotification.ACTIVITY_STOP).send (); } public static MenuItem getPopupMenu () { return thePopup; } public static Resource getI18n() { return i18n; } }
[ "utsavchokshi@Utsavs-MacBook-Pro.local" ]
utsavchokshi@Utsavs-MacBook-Pro.local
0cbb5f50207f08247210d01d641233cc0917428e
14755b80b5860af4d46c16b851e84ccf9d12506e
/java/joa/src-gen/com/wilutions/mslib/office/IFoundFiles.java
0b4568c4ae11413b133234aac21ad1a1d0df645e
[ "MIT" ]
permissive
wolfgangimig/joa
cdabaf1386dcc40c53a0279659666e7a83af3d89
a74bbab92eab2e3a7e525728ed318537c2b6a42a
refs/heads/master
2022-04-30T09:24:25.177264
2022-04-24T09:03:42
2022-04-24T09:03:42
26,138,099
12
14
null
null
null
null
UTF-8
Java
false
false
542
java
/* ** GENEREATED FILE - DO NOT MODIFY ** */ package com.wilutions.mslib.office; import com.wilutions.com.*; /** * IFoundFiles. * */ @CoInterface(guid="{000C0338-0000-0000-C000-000000000046}") public interface IFoundFiles extends IDispatch { static boolean __typelib__loaded = __TypeLib.load(); @DeclDISPID(0) public String getItem(final Integer Index) throws ComException; @DeclDISPID(1610743809) public Integer getCount() throws ComException; @DeclDISPID(-4) public Object get_NewEnum() throws ComException; }
[ "wolfgang.imig@googlemail.com" ]
wolfgang.imig@googlemail.com
45f661c68ccf4d02300ab55dafdb6e522346f0d1
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_6217aa72a2e12c1de99fd92ed06be61f9163107a/Notifications/16_6217aa72a2e12c1de99fd92ed06be61f9163107a_Notifications_t.java
94d0cb2b47bba6e8526ba7435de03376561acea5
[]
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,792
java
package com.mojang.mojam.gui; import com.mojang.mojam.MojamComponent; import com.mojang.mojam.screen.Screen; import java.util.Iterator; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; public class Notifications { public class Note { public String message; public int life; public Note(String message, int life) { this.message = message; this.life = life; } public void tick() { if (life-- <= 0) { Notifications.getInstance().notes.remove(this); } } } private static Notifications instance = null; private List<Note> notes = new CopyOnWriteArrayList<Note>(); public void add(String message) { add(message, 150); } public void add(String message, int life) { notes.add(new Note(message, life)); System.out.println("Notes size: " + notes.size()); } public void render(Screen screen) { Iterator<Note> it = notes.iterator(); int i = 0; while (it.hasNext()) { i += 1; Note note = (Note) it.next(); Font.draw(screen, note.message, (MojamComponent.GAME_WIDTH / 2) - (Font.getStringWidth(note.message) / 2), MojamComponent.GAME_HEIGHT / 5 + (i * 8 * MojamComponent.SCALE)); } } public void tick() { for (int i = 0; i < notes.size(); i++) { } for (Note n : notes) { n.tick(); } } private Notifications() { } public static synchronized Notifications getInstance() { if (instance == null) { instance = new Notifications(); } return instance; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
729790f40a98777dda9a70ca87686aaedd4dac44
6471e8d82fdb5ebf5458bc85c85f9fbedb42218d
/src/main/java/controller/SchoolController.java
d73ee199f55f2d3efa3d831d709787619aba6bfb
[]
no_license
mankicho/split
7e2ffd3246743c808bdee6f70dd917be30d7395a
86372e6ec9da23b549d6106de41e6a11eb5b6dd3
refs/heads/master
2023-07-16T03:35:25.925976
2021-09-03T11:22:24
2021-09-03T11:22:24
307,864,886
0
0
null
null
null
null
UTF-8
Java
false
false
6,655
java
package controller; import component.school.SchoolService; import component.school.dto.*; import component.school.explorer.dto.MyExplorerDTO; import component.school.explorer.dto.SchoolExplorerDTO; import component.school.explorer.dto.SchoolExplorerRewardDTO; import component.school.explorer.vo.*; import component.school.view.ClassAuthView; import component.school.vo.ClassVO; import component.school.vo.SchoolVO; import component.zone.ZoneService; import lombok.RequiredArgsConstructor; import lombok.extern.log4j.Log4j2; import org.json.JSONArray; import org.springframework.web.bind.annotation.*; import rank.RankServerStatus; import rank.SearchKeywordBroker; import security.token.TokenGeneratorService; import view.DefaultResultView; import view.ResultView; import java.text.ParseException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @RestController @RequestMapping(value = "/school") @Log4j2 @RequiredArgsConstructor public class SchoolController { private final SchoolService schoolService; private final SearchKeywordBroker broker; // 학교 개설 @PostMapping(value = "/create.do") public SchoolDTO createSchool(@RequestBody SchoolDTO schoolDTO) { log.info(schoolDTO); int insertedRow = schoolService.registerSchool(schoolDTO); if (insertedRow == 0) { return null; } HashMap<String, Object> mapForInsert = new HashMap<>(); mapForInsert.put("schoolId", schoolDTO.getSchoolId()); mapForInsert.put("list", schoolDTO.getHashtags()); log.info(mapForInsert); int insertedRowOfSchoolHashTags = schoolService.saveHashTag(mapForInsert); log.info(insertedRowOfSchoolHashTags); if (insertedRowOfSchoolHashTags == 0) { return null; } return schoolDTO; } // 학교 정보 가져오기 @GetMapping(value = "/get.do") public List<SchoolVO> getSchools(@RequestParam("categoryId") int categoryId, @RequestParam("weekday") int weekday) { return schoolService.getSchools(categoryId, weekday); } @GetMapping(value = "/by/planet/code/get.do") public List<SchoolVO> getSchoolsByPlanetCode(@RequestParam("planetCode") String planetCode) { return schoolService.getSchoolsByPlanetCode(planetCode); } // 학교의 클래스 정보들 가져오기 @PostMapping(value = "/class/get.do") public List<ClassVO> getClasses(@RequestBody ClassDTO classDTOForSelect) { log.info(classDTOForSelect); return schoolService.getClasses(classDTOForSelect); } // 학교 검색 @GetMapping(value = "/by/search/get.do") public List<SchoolVO> getSchoolsBySearch(@RequestParam("keyword") String keyword) { RankServerStatus serverStatus = broker.sendKeywordToSearchRankServer(keyword); // 인기검색어 형태소 분석 후 랭킹서버에 저장 log.info(serverStatus); return schoolService.getSchoolsBySearch(keyword); } // 인기검색어 가져오기 @GetMapping(value = "/popular/search/terms/get.do") public List<Object> getPopularSearchKeyword() { String s = broker.getKeywordNumFromRankServer(); if (s == null || s.equals("")) { return new ArrayList<>(); } JSONArray array = new JSONArray(s); return array.toList(); } // 클래스 가입하기 @PostMapping(value = "/join/class") public ResultView joinClass(@RequestBody ClassJoinDTO classJoinDTO) throws ParseException { DefaultResultView result = new DefaultResultView(); // 클래스 신청에 대한 유저 v iew int type = classJoinDTO.getType(); int insertedRow = schoolService.joinClass(classJoinDTO, type); if (insertedRow == -1) { throw new ParseException(classJoinDTO.getStartDate() + " or " + classJoinDTO.getEndDate(), 0); } if (insertedRow == 0) { result.setStatus(500); // DB 오류 result.setMsg("join class fail"); } else { result.setStatus(202); result.setMsg("join class success"); } return result; } // 공식 갤럭시 인증하기 @GetMapping(value = "/class/auth") public ClassAuthView classAuthDo(ClassAuthDTO classAuthDTO) { return schoolService.classAuth(classAuthDTO); } // 탐험단 - 상금 탭 가져오기 @PostMapping(value = "/explorer/reward/get.do") public SchoolRewardVO getExplorerReward(@RequestBody SchoolExplorerRewardDTO schoolExplorerRewardDTO) { SchoolRewardVO schoolRewardVO = schoolService.getExplorerReward(schoolExplorerRewardDTO); log.info(schoolRewardVO); int predictReward = schoolService.getPredictReward(schoolExplorerRewardDTO); log.info(predictReward); schoolRewardVO.setPredictReward(predictReward); return schoolRewardVO; } // 탐험단 정보 가져오기 /** * 바뀐부분 테스트 끝나고 서버에 적용 * * @param schoolExplorerDTO * @return */ @PostMapping(value = "/explorer/att/list/get.do") // /explorer/get.do public SchoolExplorerVO getExplorerVO(@RequestBody SchoolExplorerDTO schoolExplorerDTO) { int schoolId = schoolExplorerDTO.getSchoolId(); int classId = schoolExplorerDTO.getClassId(); List<SchoolExplorerAttendanceListVO> schoolExplorerAttendanceListVOS = schoolService.getAttendanceList(schoolExplorerDTO); SchoolClassAvgAttendanceRateVO schoolClassAvgAttendanceRateVO = schoolService.getAttendanceRate(schoolId, classId); return new SchoolExplorerVO(schoolExplorerAttendanceListVOS, schoolClassAvgAttendanceRateVO); } @PostMapping(value = "/explorer/my/info/get.do") public SchoolExplorerMyInfo getMyInfo(@RequestParam("tid") int tid) { return schoolService.getMyInfo(tid); } @PostMapping(value = "/my/explorer/list/get.do") public List<SchoolMyExplorersVO> getMyExplorersVO(@RequestBody MyExplorerDTO myExplorerDTO) { return schoolService.getMyExplorersVO(myExplorerDTO); } @PostMapping(value = "/explorer/galaxy") public SchoolGalaxyOfExplorerVO getGalaxyOfExplorer(@RequestBody ClassDTO classDTO) { List<ClassVO> classVOList = schoolService.getClasses(classDTO); GalaxyStatisticVO galaxyOfExplorer = schoolService.getGalaxyOfExplorer(classDTO.getSchoolId()); return SchoolGalaxyOfExplorerVO.builder() .classVOS(classVOList) .galaxyStatisticVO(galaxyOfExplorer) .build(); } }
[ "skxz123@gmail.com" ]
skxz123@gmail.com
f9b0ed428a7511c44d2b3abd2452083da230e77d
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/google/android/gms/common/util/concurrent/NamedThreadFactory.java
307aad7685ae7ed0cbf5fa6c8286e4375aab3faa
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,046
java
package com.google.android.gms.common.util.concurrent; import com.google.android.gms.common.internal.Preconditions; import com.tencent.matrix.trace.core.AppMethodBeat; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; public class NamedThreadFactory implements ThreadFactory { private final String name; private final int priority; private final ThreadFactory zzaau; public NamedThreadFactory(String str) { this(str, 0); } public NamedThreadFactory(String str, int i) { AppMethodBeat.i(90301); this.zzaau = Executors.defaultThreadFactory(); this.name = (String) Preconditions.checkNotNull(str, "Name must not be null"); this.priority = i; AppMethodBeat.o(90301); } public Thread newThread(Runnable runnable) { AppMethodBeat.i(90302); Thread newThread = this.zzaau.newThread(new zza(runnable, this.priority)); newThread.setName(this.name); AppMethodBeat.o(90302); return newThread; } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
55cfa73d7b71cc703bd9f1b4f9d3497107af7e21
c6eda62e5f5a8716595794f03111aa05b0131435
/VACDS-UCS-Model/src/main/java/org/socraticgrid/hl7/services/uc/exceptions/ServiceAdapterFaultException.java
74ba1ed8267c49d29ab2dfb2a65f90b142fa1c11
[ "Apache-2.0" ]
permissive
SocraticGrid/Services-Backup
f91eaa8b8aa346309f1b83cffbc67214c9e5ea40
b916cf859c2e858fd9faabee45862a4ef1940536
refs/heads/master
2021-01-10T15:43:07.041195
2015-09-24T12:15:07
2015-09-24T12:15:07
43,052,552
0
0
null
null
null
null
UTF-8
Java
false
false
851
java
package org.socraticgrid.hl7.services.uc.exceptions; import java.io.Serializable; import org.socraticgrid.hl7.services.uc.model.Message; /** * @author Jerry Goodnough * @version 1.0 * @created 16-Dec-2013 3:54:57 PM */ public class ServiceAdapterFaultException extends DeliveryException implements Serializable { /** * */ private static final long serialVersionUID = 1L; public ServiceAdapterFaultException() { } /** * @param fault */ public ServiceAdapterFaultException(String fault) { super(fault); } /** * @param fault * @param msg */ public ServiceAdapterFaultException(String fault, Message msg) { super(fault, msg); } /** * @param fault * @param service * @param msg */ public ServiceAdapterFaultException(String fault, String service, Message msg) { super(fault, service, msg); } }
[ "esteban.aliverti@gmail.com" ]
esteban.aliverti@gmail.com
d0f7712310c9a3ac284a5cc54e2dfaa273d0fd30
a5161c5e7ceda6bb7e9ecf4252d64ca1776043c5
/java-dir-example/DirHiddenEmp.java
4f3d91bddd1f9a3ad1141d7ff4b4a032367c6009
[]
no_license
vaithwee/java-tutorial-demo
ca4a1c971eb368f7c195153f47c8d6b6a5a7783d
936be64ead9b6aa897d95da657d85a7e7be5442f
refs/heads/master
2020-03-31T17:59:00.868644
2018-11-28T15:34:33
2018-11-28T15:34:33
152,441,537
0
0
null
null
null
null
UTF-8
Java
false
false
185
java
import java.io.File; public class DirHiddenEmp { public static void main(String[] args) { File file = new File("/tmp"); System.out.println(file.isHidden()); } }
[ "vaithwee@yeah.net" ]
vaithwee@yeah.net
9dbcc2b7bbf0281678d6d9740f3aa23e738b802d
958b13739d7da564749737cb848200da5bd476eb
/src/main/java/com/alipay/api/domain/AlipayCommerceTransportEtcMediaGetModel.java
5e56d9c4f72a3eccd4f9ff4504fd7a7175492acc
[ "Apache-2.0" ]
permissive
anywhere/alipay-sdk-java-all
0a181c934ca84654d6d2f25f199bf4215c167bd2
649e6ff0633ebfca93a071ff575bacad4311cdd4
refs/heads/master
2023-02-13T02:09:28.859092
2021-01-14T03:17:27
2021-01-14T03:17:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,215
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * etc办理资料接口 * * @author auto create * @since 1.0, 2019-05-25 14:25:26 */ public class AlipayCommerceTransportEtcMediaGetModel extends AlipayObject { private static final long serialVersionUID = 2691647118437413365L; /** * 业务标识。 1:身份证正面照片; 2:身份证背面照片; 3:行驶证正页正面照片; 4:行驶证副页正面照片; 5:车头照片 */ @ApiField("biz_type") private String bizType; /** * 支付宝生成的申请单id */ @ApiField("order_id") private String orderId; /** * 外部业务订单号 */ @ApiField("out_biz_no") private String outBizNo; public String getBizType() { return this.bizType; } public void setBizType(String bizType) { this.bizType = bizType; } public String getOrderId() { return this.orderId; } public void setOrderId(String orderId) { this.orderId = orderId; } public String getOutBizNo() { return this.outBizNo; } public void setOutBizNo(String outBizNo) { this.outBizNo = outBizNo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
efcb43cc6cf2aeaa2bb320ab03dfa188354d69d9
d60e287543a95a20350c2caeabafbec517cabe75
/NLPCCd/Cloudstack/3921_1.java
1a40f92b91f6197199c034053a0250c338c3f62a
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
484
java
//,temp,sample_1608.java,2,18,temp,sample_4391.java,2,18 //,2 public class xxx { public void dummy_method(){ for (HostVO neighbor : neighbors) { if (neighbor.getId() == agent.getId() || neighbor.getHypervisorType() != Hypervisor.HypervisorType.Ovm3) { continue; } try { Answer answer = agentMgr.easySend(neighbor.getId(), cmd); if (answer != null) { return answer.getResult() ? Status.Down : Status.Up; } } catch (Exception e) { log.info("failed to send command to host"); } } } };
[ "sgholami@uwaterloo.ca" ]
sgholami@uwaterloo.ca
1b8a51d899694882145470cf3e3e0e3321b593be
e4f10e6260fc0c1facb7730abc2811dc77da2872
/spring-core/src/main/java/org/springframework/util/FileSystemUtils.java
81c299443d11b91d05f714ebb519b06cfd060050
[ "Apache-2.0" ]
permissive
aJavaBird/spring-framework
e3cc12707874628a12f475aa2e86934437910a2a
78cb31e8b495a5fc2779efa183875b55954499b6
refs/heads/master
2023-08-06T08:16:20.937745
2021-10-10T11:35:23
2021-10-10T11:35:23
397,800,769
0
0
null
null
null
null
UTF-8
Java
false
false
5,081
java
/* * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.util; import java.io.File; import java.io.IOException; import java.nio.file.FileVisitResult; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.SimpleFileVisitor; import java.nio.file.StandardCopyOption; import java.nio.file.attribute.BasicFileAttributes; import java.util.EnumSet; import org.springframework.lang.Nullable; import static java.nio.file.FileVisitOption.FOLLOW_LINKS; /** * Utility methods for working with the file system. * * @author Rob Harrop * @author Juergen Hoeller * @since 2.5.3 * @see java.io.File * @see java.nio.file.Path * @see java.nio.file.Files */ public abstract class FileSystemUtils { /** * Delete the supplied {@link File} - for directories, * recursively delete any nested directories or files as well. * <p>Note: Like {@link File#delete()}, this method does not throw any * exception but rather silently returns {@code false} in case of I/O * errors. Consider using {@link #deleteRecursively(Path)} for NIO-style * handling of I/O errors, clearly differentiating between non-existence * and failure to delete an existing file. * @param root the root {@code File} to delete * @return {@code true} if the {@code File} was successfully deleted, * otherwise {@code false} */ public static boolean deleteRecursively(@Nullable File root) { if (root == null) { return false; } try { return deleteRecursively(root.toPath()); } catch (IOException ex) { return false; } } /** * Delete the supplied {@link File} &mdash; for directories, * recursively delete any nested directories or files as well. * @param root the root {@code File} to delete * @return {@code true} if the {@code File} existed and was deleted, * or {@code false} if it did not exist * @throws IOException in the case of I/O errors * @since 5.0 */ public static boolean deleteRecursively(@Nullable Path root) throws IOException { if (root == null) { return false; } if (!Files.exists(root)) { return false; } Files.walkFileTree(root, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { Files.delete(file); return FileVisitResult.CONTINUE; } @Override public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { Files.delete(dir); return FileVisitResult.CONTINUE; } }); return true; } /** * Recursively copy the contents of the {@code src} file/directory * to the {@code dest} file/directory. * @param src the source directory * @param dest the destination directory * @throws IOException in the case of I/O errors */ public static void copyRecursively(File src, File dest) throws IOException { Assert.notNull(src, "Source File must not be null"); Assert.notNull(dest, "Destination File must not be null"); copyRecursively(src.toPath(), dest.toPath()); } /** * Recursively copy the contents of the {@code src} file/directory * to the {@code dest} file/directory. * @param src the source directory * @param dest the destination directory * @throws IOException in the case of I/O errors * @since 5.0 */ public static void copyRecursively(Path src, Path dest) throws IOException { Assert.notNull(src, "Source Path must not be null"); Assert.notNull(dest, "Destination Path must not be null"); BasicFileAttributes srcAttr = Files.readAttributes(src, BasicFileAttributes.class); if (srcAttr.isDirectory()) { Files.walkFileTree(src, EnumSet.of(FOLLOW_LINKS), Integer.MAX_VALUE, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { Files.createDirectories(dest.resolve(src.relativize(dir))); return FileVisitResult.CONTINUE; } @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { Files.copy(file, dest.resolve(src.relativize(file)), StandardCopyOption.REPLACE_EXISTING); return FileVisitResult.CONTINUE; } }); } else if (srcAttr.isRegularFile()) { Files.copy(src, dest); } else { throw new IllegalArgumentException("Source File must denote a directory or file"); } } }
[ "593642275@qq.com" ]
593642275@qq.com
737d1ee8be2e41c589327c0236df98aa3a458c4f
9eed8536bdfa52133c815831dc1b8763415e59dc
/kata/kata-parking-java-solved/src/test/java/victor/kata/parking/ParkingBuilderEnhancedTest.java
d3e543e881b6ba0811699431d2c983af982c8520
[ "MIT" ]
permissive
pgrigoro/training
e599a11324a07c0e19fcb765d4ab117a1984ee4e
eb267b9cb556497a78cf9448182f90a11a57dab4
refs/heads/master
2023-08-03T16:45:42.270781
2020-01-13T04:27:25
2020-01-13T04:27:25
234,811,856
0
0
MIT
2023-09-14T01:04:55
2020-01-18T23:28:15
null
UTF-8
Java
false
false
393
java
package victor.kata.parking; import static org.junit.Assert.assertEquals; import org.junit.Test; import victor.kata.parking.ParkingBuilder; public class ParkingBuilderEnhancedTest { @Test public void testRandomMethodOrder() { assertEquals(3 * 3 - 1, new ParkingBuilder() .withPedestrianExit(2) .withDisabledBay(3) .withSquareSize(3) .build().getAvailableBays()); } }
[ "victorrentea@gmail.com" ]
victorrentea@gmail.com
f80c13623d676a0a97003fd2efc964354e41ea37
108b4ebcd420adbf743e308fe1a792d397a5755e
/Sped/src/java/com/t2tierp/contabilidade/java/ContabilEncerramentoExeDetVO.java
0f5e6adc1c66429a102ce0b3659ee982e505bb18
[ "MIT" ]
permissive
DeveloperMobile/T2Ti-ERP-1.0-Java
19565ba429cf751a4e845f20c7809426352db655
3a91981d0a11e5ff258d09df6fee73f5b6d1cb07
refs/heads/master
2023-03-15T13:58:24.144105
2019-09-03T00:54:56
2019-09-03T00:54:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,357
java
package com.t2tierp.contabilidade.java; import java.io.Serializable; import java.math.BigDecimal; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import org.openswing.swing.message.receive.java.ValueObjectImpl; /** * <p>Title: T2Ti ERP</p> * <p>Description: VO relacionado a tabela [CONTABIL_ENCERRAMENTO_EXE_DET]</p> * * <p>The MIT License</p> * * <p>Copyright: Copyright (C) 2010 T2Ti.COM * * 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. * * The author may be contacted at: * t2ti.com@gmail.com</p> * * @author Claudio de Barros (t2ti.com@gmail.com) * @version 1.0 */ @Entity @Table(name = "CONTABIL_ENCERRAMENTO_EXE_DET") public class ContabilEncerramentoExeDetVO extends ValueObjectImpl implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Basic(optional = false) @Column(name = "ID") private Integer id; @Column(name = "SALDO_ANTERIOR") private BigDecimal saldoAnterior; @Column(name = "VALOR_DEBITO") private BigDecimal valorDebito; @Column(name = "VALOR_CREDITO") private BigDecimal valorCredito; @Column(name = "SALDO") private BigDecimal saldo; @JoinColumn(name = "ID_CONTABIL_ENCERRAMENTO_EXE", referencedColumnName = "ID") @ManyToOne(optional = false) private ContabilEncerramentoExeCabVO contabilEncerramentoExeCab; @JoinColumn(name = "ID_CONTABIL_CONTA", referencedColumnName = "ID") @ManyToOne(optional = false) private ContabilContaVO contabilConta; public ContabilEncerramentoExeDetVO() { } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public BigDecimal getSaldoAnterior() { return saldoAnterior; } public void setSaldoAnterior(BigDecimal saldoAnterior) { this.saldoAnterior = saldoAnterior; } public BigDecimal getValorDebito() { return valorDebito; } public void setValorDebito(BigDecimal valorDebito) { this.valorDebito = valorDebito; } public BigDecimal getValorCredito() { return valorCredito; } public void setValorCredito(BigDecimal valorCredito) { this.valorCredito = valorCredito; } public BigDecimal getSaldo() { return saldo; } public void setSaldo(BigDecimal saldo) { this.saldo = saldo; } public ContabilEncerramentoExeCabVO getContabilEncerramentoExeCab() { return contabilEncerramentoExeCab; } public void setContabilEncerramentoExeCab(ContabilEncerramentoExeCabVO contabilEncerramentoExeCab) { this.contabilEncerramentoExeCab = contabilEncerramentoExeCab; } public ContabilContaVO getContabilConta() { return contabilConta; } public void setContabilConta(ContabilContaVO contabilConta) { this.contabilConta = contabilConta; } @Override public String toString() { return "com.t2tierp.contabilidade.java.ContabilEncerramentoExeDetVO[id=" + id + "]"; } }
[ "claudiobsi@gmail.com" ]
claudiobsi@gmail.com
2c4d5507789a98edc664176c3f3af331f6f92575
c29612c1cfa7edfa94597545c1e1d7e99d446131
/src/main/java/mods/railcraft/common/gui/containers/ContainerItemLoader.java
bc35ffac13152d3f0c417534c35a4cd593fe3137
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
Cchenxinran/Railcraft
657af37fae5122d3c735359a7d31684c579c667b
b73597ce0fb9ad2aaa962f2e912108ef5e8689fc
refs/heads/master
2021-01-17T05:23:46.565588
2015-05-31T23:26:10
2015-05-31T23:26:10
37,012,840
1
0
null
2015-06-07T10:40:49
2015-06-07T10:40:49
null
UTF-8
Java
false
false
1,691
java
/* * Copyright (c) CovertJaguar, 2014 http://railcraft.info * * This code is the property of CovertJaguar * and may only be used with explicit written * permission unless otherwise specified on the * license page at http://railcraft.info/wiki/info:license. */ package mods.railcraft.common.gui.containers; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; import mods.railcraft.common.blocks.machine.gamma.TileLoaderItemBase; import mods.railcraft.common.gui.slots.SlotFilter; import mods.railcraft.common.gui.slots.SlotMinecartFilter; public class ContainerItemLoader extends RailcraftContainer { public TileLoaderItemBase tile; public ContainerItemLoader(InventoryPlayer inventoryplayer, TileLoaderItemBase tile) { super(tile); this.tile = tile; for (int i = 0; i < 3; i++) { for (int k = 0; k < 3; k++) { addSlot(new SlotFilter(tile.getItemFilters(), k + i * 3, 8 + k * 18, 26 + i * 18)); } } addSlot(new SlotMinecartFilter(tile.getCartFilters(), 0, 71, 26)); addSlot(new SlotMinecartFilter(tile.getCartFilters(), 1, 89, 26)); for (int i = 0; i < 3; i++) { for (int k = 0; k < 3; k++) { addSlot(tile.getBufferSlot(k + i * 3, 116 + k * 18, 26 + i * 18)); } } for (int i = 0; i < 3; i++) { for (int k = 0; k < 9; k++) { addSlot(new Slot(inventoryplayer, k + i * 9 + 9, 8 + k * 18, 84 + i * 18)); } } for (int j = 0; j < 9; j++) { addSlot(new Slot(inventoryplayer, j, 8 + j * 18, 142)); } } }
[ "covertjaguar@gmail.com" ]
covertjaguar@gmail.com
bd5fa7fea0340bba57ef85eab594f92c0dcb8238
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/tencentmap/mapsdk/maps/p667a/C16263gj.java
0cde1485e8981164c5c89d32ab1bcd8badf0a4af
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,567
java
package com.tencent.tencentmap.mapsdk.maps.p667a; import android.content.Context; import android.graphics.Bitmap; import android.util.SparseBooleanArray; import com.tencent.map.lib.basemap.data.GeoPoint; import com.tencent.map.lib.element.C45135d; import com.tencent.map.lib.p822gl.C17851b; import com.tencent.map.lib.p822gl.model.GLIcon; import com.tencent.map.lib.util.C17862b; import com.tencent.map.lib.util.StringUtil; import com.tencent.map.lib.util.SystemUtil; import com.tencent.matrix.trace.core.AppMethodBeat; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Map.Entry; import java.util.concurrent.CopyOnWriteArrayList; /* renamed from: com.tencent.tencentmap.mapsdk.maps.a.gj */ public class C16263gj { /* renamed from: a */ public HashMap<Integer, GLIcon> f3330a; /* renamed from: b */ public HashMap<Integer, GLIcon> f3331b; /* renamed from: c */ private C5876fn f3332c; /* renamed from: d */ private C16238gh f3333d; /* renamed from: e */ private CopyOnWriteArrayList<Integer> f3334e = new CopyOnWriteArrayList(); /* renamed from: f */ private SparseBooleanArray f3335f = new SparseBooleanArray(); /* renamed from: g */ private ArrayList<Integer> f3336g = new ArrayList(); C16263gj(C5876fn c5876fn, C17851b c17851b, C16238gh c16238gh) { AppMethodBeat.m2504i(99166); this.f3332c = c5876fn; this.f3333d = c16238gh; this.f3330a = new HashMap(); this.f3331b = new HashMap(); AppMethodBeat.m2505o(99166); } /* renamed from: a */ public void mo29416a(GeoPoint geoPoint, GLIcon gLIcon, boolean z, int i, boolean z2, boolean z3, int i2, int i3) { AppMethodBeat.m2504i(99167); float rotateAngle = z3 ? 360.0f - gLIcon.getRotateAngle() : gLIcon.getRotateAngle(); if (this.f3330a.containsKey(Integer.valueOf(gLIcon.mDisplayId))) { if (gLIcon.isDirty()) { this.f3333d.mo29328a(gLIcon.mDisplayId, gLIcon.getIconName(), gLIcon.mPositionX, gLIcon.mPositionY, gLIcon.getAnchroX(), gLIcon.getAnchorY(), gLIcon.getScaleX(), gLIcon.getScaleY(), gLIcon.getAlpha(), rotateAngle, z, gLIcon.isFixPos(), gLIcon.isFastLoad(), gLIcon.isAvoidAnno(), i2, i3); if (gLIcon.isIconChanged()) { C17862b.m27956a(gLIcon.getIconName(), gLIcon.getTextureBm(0)); if (!StringUtil.isEqual(gLIcon.getIconName(), gLIcon.getLastName())) { C17862b.m27957b(gLIcon.getLastName()); } gLIcon.setIconChanged(false); } } this.f3331b.put(Integer.valueOf(gLIcon.mDisplayId), gLIcon); AppMethodBeat.m2505o(99167); return; } gLIcon.mDisplayId = this.f3333d.mo29310a(gLIcon.getIconName(), gLIcon.mPositionX, gLIcon.mPositionY, gLIcon.getAnchroX(), gLIcon.getAnchorY(), gLIcon.getScaleX(), gLIcon.getScaleY(), gLIcon.getAlpha(), rotateAngle, z, gLIcon.isFixPos(), gLIcon.isFastLoad(), gLIcon.isAvoidAnno(), i2, i3); C17862b.m27956a(gLIcon.getIconName(), gLIcon.getTextureBm(0)); gLIcon.setIconChanged(false); gLIcon.setDirty(false); this.f3331b.put(Integer.valueOf(gLIcon.mDisplayId), gLIcon); AppMethodBeat.m2505o(99167); } /* renamed from: a */ public void mo29414a() { AppMethodBeat.m2504i(99168); m24921e(); m24922f(); AppMethodBeat.m2505o(99168); } /* renamed from: e */ private void m24921e() { AppMethodBeat.m2504i(99169); ArrayList arrayList = new ArrayList(); for (Entry entry : this.f3330a.entrySet()) { Object key = entry.getKey(); GLIcon gLIcon = (GLIcon) entry.getValue(); if (!this.f3331b.containsKey(key)) { arrayList.add(Integer.valueOf(((Integer) key).intValue())); C17862b.m27957b(gLIcon.getIconName()); } } int size = arrayList.size(); if (size <= 0) { AppMethodBeat.m2505o(99169); return; } int[] iArr = new int[size]; for (int i = 0; i < size; i++) { iArr[i] = ((Integer) arrayList.get(i)).intValue(); } this.f3333d.mo29346a(iArr, size); AppMethodBeat.m2505o(99169); } /* renamed from: f */ private void m24922f() { AppMethodBeat.m2504i(99170); this.f3330a.clear(); this.f3330a.putAll(this.f3331b); this.f3331b.clear(); AppMethodBeat.m2505o(99170); } /* renamed from: a */ public static Bitmap m24919a(String str) { AppMethodBeat.m2504i(99171); Bitmap a = C17862b.m27954a(str); AppMethodBeat.m2505o(99171); return a; } /* renamed from: b */ public C5876fn mo29418b() { return this.f3332c; } /* renamed from: b */ private int m24920b(C45135d c45135d) { AppMethodBeat.m2504i(99172); if (!(!(this.f3332c instanceof C46789gm) || c45135d == null || c45135d.mo72981l())) { Context k = ((C46789gm) this.f3332c).mo75458k(); c45135d.mo72965a(SystemUtil.getDensity(k) * c45135d.mo72983n()); } int a = this.f3332c.mo12445f().mo29306a(c45135d); c45135d.mo72966a(a); if (!this.f3334e.contains(Integer.valueOf(a))) { this.f3334e.add(Integer.valueOf(a)); this.f3335f.append(a, c45135d.mo72981l()); } AppMethodBeat.m2505o(99172); return a; } /* renamed from: a */ public void mo29415a(int i) { AppMethodBeat.m2504i(99173); this.f3332c.mo12445f().mo29329a(i, this.f3335f.get(i)); this.f3335f.delete(i); this.f3334e.remove(Integer.valueOf(i)); AppMethodBeat.m2505o(99173); } /* renamed from: a */ public void mo29417a(C45135d c45135d) { AppMethodBeat.m2504i(99174); if (!this.f3334e.contains(Integer.valueOf(c45135d.mo72988s()))) { c45135d.mo72966a(m24920b(c45135d)); this.f3333d.mo29365c(c45135d); } if (!this.f3336g.contains(Integer.valueOf(c45135d.mo72988s()))) { this.f3336g.add(Integer.valueOf(c45135d.mo72988s())); } this.f3333d.mo29356b(c45135d); this.f3333d.mo29374d(c45135d); if (c45135d.mo72989t()) { this.f3333d.mo29392h(c45135d); } else { this.f3333d.mo29388g(c45135d); } this.f3333d.mo29384f(c45135d); if (!StringUtil.isEmpty(c45135d.mo72992w())) { this.f3333d.mo29379e(c45135d); } this.f3333d.mo29396i(c45135d); AppMethodBeat.m2505o(99174); } /* Access modifiers changed, original: protected */ /* renamed from: c */ public void mo29419c() { AppMethodBeat.m2504i(99175); if (this.f3334e != null && this.f3334e.size() > 0) { Iterator it = this.f3334e.iterator(); while (it.hasNext()) { int intValue = ((Integer) it.next()).intValue(); if (!this.f3336g.contains(Integer.valueOf(intValue))) { mo29415a(intValue); } } this.f3336g.clear(); } AppMethodBeat.m2505o(99175); } /* renamed from: d */ public float mo29420d() { AppMethodBeat.m2504i(99176); float l = this.f3332c.mo12440a().mo58848l(); AppMethodBeat.m2505o(99176); return l; } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
5c30dc8642bbf8f7497919d9b60b2e5d357b7195
941cb164c35d531de510e4aa95872711d3405e39
/app/src/main/java/sinia/com/baihangeducation/release/info/bean/JobExpListInfo.java
e1acb7ac4be0bacd5ad9541740a36802c436cfc6
[]
no_license
lenka123123/jy
f81220d6f80cca4fde5872b4e3cb992abb5171b8
2a2fc5d675ec01fd45a3950f1adeb9bcea081c7a
refs/heads/master
2020-03-28T00:50:19.854060
2018-11-30T06:15:47
2018-11-30T06:15:47
147,453,961
1
0
null
null
null
null
UTF-8
Java
false
false
221
java
package sinia.com.baihangeducation.release.info.bean; public class JobExpListInfo { public int experience_id; //工作经验列表编号 public String experience_name; //工作经验列表名称 }
[ "13902276741@163.com" ]
13902276741@163.com
636e57bb845da991399ab3e7158c2c30dbdf1e1c
2dc6df4b755e64527a163b2980ae9b2e37350558
/src/main/java/com/mazentop/modules/emp/controller/SysPartnerController.java
abad56becc6e4968559d4b002c56f2665a1cb46d
[ "0BSD" ]
permissive
chanwaikit/fulin-test
bcc25bfb860a631666b945d191ac9d0ebc5a22eb
e31ef03596b724ba48d72ca8021492e6f251ec20
refs/heads/master
2023-06-27T12:34:51.533534
2021-07-26T03:32:37
2021-07-26T03:32:37
389,497,650
0
0
null
null
null
null
UTF-8
Java
false
false
4,828
java
package com.mazentop.modules.emp.controller; import com.mazentop.entity.ProProductMaster; import com.mazentop.entity.SysPartner; import com.mazentop.model.Status; import com.mazentop.modules.emp.commond.SysPartnerCommond; import com.mztframework.commons.Utils; import com.mztframework.dao.annotation.Order; import com.mztframework.data.R; import com.mztframework.data.Result; import com.mztframework.logging.annotation.Log; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*; import com.mztframework.dao.page.Page; import java.util.List; import java.util.Objects; @RestController @RequestMapping("/option/{api_version}/sysPartner") @Api(tags = "合作伙伴接接口") public class SysPartnerController { @Log("合作伙伴列表") @ApiOperation("合作伙伴列表") @ResponseBody @GetMapping("/list") public Result SysPartnerList(SysPartnerCommond commond) { return Result.build(() -> { List<SysPartner> sysPartnerList = SysPartner.me() .setIsEnable(Status.YES) .setOrderByFields(Order.desc(ProProductMaster.F_ADD_TIME)) .find(commond); return new Page(sysPartnerList,commond); }); } @Log("合作伙伴新增") @ApiOperation("合作伙伴新增") @ResponseBody @PostMapping(value = "/addSysPartner") public Result addSysPartner(@RequestBody SysPartner sysPartner) { if (Objects.isNull(sysPartner)) { return Result.toast("合作信息获取失败!"); } Long count = sysPartner.me().setPartnerTitle(sysPartner.getPartnerTitle()).findCount(); if (count > 0) { return Result.toast("该合作已存在!"); } sysPartner.setAddTime(Utils.currentTimeSecond()); sysPartner.setIsEnable(1); sysPartner.insert(); return Result.success(); } @Log("合作伙伴编辑") @ApiOperation("合作伙伴编辑") @ResponseBody @PostMapping(value = "/editSysPartner") public Result editSysPartner(@RequestBody SysPartner sysPartner) { if (Objects.isNull(sysPartner) || Objects.isNull(sysPartner.getId())) { return Result.success("参数不能为空!"); } SysPartner partner = SysPartner.me().setId(sysPartner.getId()).get(); if (Objects.isNull(partner)) { return Result.toast("合作信息获取失败!"); } SysPartner partnerTitle = SysPartner.me().setPartnerTitle(sysPartner.getPartnerTitle()).get(); Long count = SysPartner.me().setPartnerTitle(sysPartner.getPartnerTitle()).findCount(); if (count > 0 && !partner.getId().equals(partnerTitle.getId())) { return Result.toast("合作信息已存在!"); } sysPartner.setOperationTime(Utils.currentTimeSecond()); sysPartner.update(); return Result.success(); } @Log("编辑合作伙伴状态") @ApiOperation("编辑合作伙伴状态") @ResponseBody @GetMapping(value = "/editSysPartnerEnable/{id}") public Result editSysPartnerEnable( @PathVariable String id) { if (Objects.isNull(id)) { return Result.toast("参数不能为空!"); } SysPartner sysPartner = SysPartner.me().setId(id).get(); if (Objects.isNull(sysPartner)) { return Result.toast("友情信息获取失败!"); } if (sysPartner.getIsEnable()==1){ sysPartner.setIsEnable(0); }else { sysPartner.setIsEnable(1); } sysPartner.setOperationTime(Utils.currentTimeSecond()); sysPartner.update(); return Result.success(); } @Log("获取伙伴详情") @ApiOperation("获取伙伴详情") @ResponseBody @GetMapping(value = "/getSysPartner/{id}") public Result getSysPartner( @PathVariable String id) { if (Objects.isNull(id)) { return Result.toast("参数不能为空!"); } SysPartner sysPartner = SysPartner.me().setId(id).get(); if (Objects.isNull(sysPartner)) { return Result.toast("合作伙伴获取失败!"); } return Result.build(()->sysPartner); } @Log("删除伙伴详情") @ApiOperation("删除伙伴详情") @ResponseBody @GetMapping(value = "/delSysPartner/{id}") public Result delSysPartner( @PathVariable String id) { if (Objects.isNull(id)) { return Result.toast("参数不能为空!"); } SysPartner sysPartner = SysPartner.me().setId(id).get(); if (Objects.isNull(sysPartner)) { return Result.toast("合作伙伴获取失败!"); } sysPartner.deleteById(); return Result.success(); } }
[ "674445354@qq.com" ]
674445354@qq.com
0a1f45782fef05c910e3b26e5c0565d60324dab5
26dcf8b7189b608af966cfbc696a5b7b80f25c16
/tools/src/main/java/org/helpj/tools/TestFeeLevel.java
dddc8c8b391d034540aa6471cc7595508497ccab
[ "Apache-2.0" ]
permissive
GoHelpFund/helpj
e1d36e4cb24ae90e91b0793ba621006adb978eb3
90026e78853254b54caa3a20351939454c84bd10
refs/heads/master
2022-10-16T09:14:04.719335
2019-09-26T10:00:33
2019-09-26T10:00:33
210,832,057
0
0
Apache-2.0
2022-10-05T03:31:42
2019-09-25T11:49:33
Java
UTF-8
Java
false
false
4,493
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.helpj.tools; import org.helpj.core.*; import org.helpj.core.listeners.PeerConnectedEventListener; import org.helpj.core.listeners.PeerDisconnectedEventListener; import org.helpj.kits.WalletAppKit; import org.helpj.params.MainNetParams; import org.helpj.utils.BriefLogFormatter; import org.helpj.wallet.SendRequest; import org.helpj.wallet.Wallet; import java.io.File; /** * A program that sends a transaction with the specified fee and measures how long it takes to confirm. */ public class TestFeeLevel { private static final MainNetParams PARAMS = MainNetParams.get(); private static final int NUM_OUTPUTS = 2; private static WalletAppKit kit; public static void main(String[] args) throws Exception { BriefLogFormatter.initWithSilentBitcoinJ(); if (args.length == 0) { System.err.println("Specify the fee level to test in satoshis as the first argument."); return; } Coin feeToTest = Coin.valueOf(Long.parseLong(args[0])); System.out.println("Fee to test is " + feeToTest.toFriendlyString()); kit = new WalletAppKit(PARAMS, new File("."), "testfeelevel"); kit.startAsync(); kit.awaitRunning(); try { go(feeToTest, NUM_OUTPUTS); } finally { kit.stopAsync(); kit.awaitTerminated(); } } private static void go(Coin feeToTest, int numOutputs) throws InterruptedException, java.util.concurrent.ExecutionException, InsufficientMoneyException { kit.peerGroup().setMaxConnections(25); if (kit.wallet().getBalance().compareTo(feeToTest) < 0) { System.out.println("Send some money to " + kit.wallet().currentReceiveAddress()); System.out.println("... and wait for it to confirm"); kit.wallet().getBalanceFuture(feeToTest, Wallet.BalanceType.AVAILABLE).get(); } int heightAtStart = kit.chain().getBestChainHeight(); System.out.println("Height at start is " + heightAtStart); Coin value = kit.wallet().getBalance().subtract(feeToTest); Coin outputValue = value.divide(numOutputs); Transaction transaction = new Transaction(PARAMS); for (int i = 0; i < numOutputs - 1; i++) { transaction.addOutput(outputValue, kit.wallet().freshReceiveAddress()); value = value.subtract(outputValue); } transaction.addOutput(value, kit.wallet().freshReceiveAddress()); SendRequest request = SendRequest.forTx(transaction); request.feePerKb = feeToTest; request.ensureMinRequiredFee = false; kit.wallet().completeTx(request); System.out.println("Size in bytes is " + request.tx.unsafeBitcoinSerialize().length); System.out.println("TX is " + request.tx); System.out.println("Waiting for " + kit.peerGroup().getMaxConnections() + " connected peers"); kit.peerGroup().addDisconnectedEventListener(new PeerDisconnectedEventListener() { @Override public void onPeerDisconnected(Peer peer, int peerCount) { System.out.println(peerCount + " peers connected"); } }); kit.peerGroup().addConnectedEventListener(new PeerConnectedEventListener() { @Override public void onPeerConnected(Peer peer, int peerCount) { System.out.println(peerCount + " peers connected"); } }); kit.peerGroup().broadcastTransaction(request.tx).future().get(); System.out.println("Send complete, waiting for confirmation"); request.tx.getConfidence().getDepthFuture(1).get(); int heightNow = kit.chain().getBestChainHeight(); System.out.println("Height after confirmation is " + heightNow); System.out.println("Result: took " + (heightNow - heightAtStart) + " blocks to confirm at this fee level"); } }
[ "github@tirzuman.com" ]
github@tirzuman.com
6d1e60d7661b6c3c94af2a4c6b3e3b7aca5f8a69
5b82e2f7c720c49dff236970aacd610e7c41a077
/QueryReformulation-master 2/data/processed/TabItemTooltipTextProperty.java
b02b3b69f525d201e760a878203351246bd2dc49
[]
no_license
shy942/EGITrepoOnlineVersion
4b157da0f76dc5bbf179437242d2224d782dd267
f88fb20497dcc30ff1add5fe359cbca772142b09
refs/heads/master
2021-01-20T16:04:23.509863
2016-07-21T20:43:22
2016-07-21T20:43:22
63,737,385
0
0
null
null
null
null
UTF-8
Java
false
false
567
java
/***/ package org.eclipse.jface.internal.databinding.swt; import org.eclipse.swt.widgets.TabItem; /** * @since 3.3 * */ public class TabItemTooltipTextProperty extends WidgetStringValueProperty { @Override String doGetStringValue(Object source) { return ((TabItem) source).getToolTipText(); } @Override void doSetStringValue(Object source, String value) { ((TabItem) source).setToolTipText(value); } @Override public String toString() { //$NON-NLS-1$ return "TabItem.toolTipText <String>"; } }
[ "muktacseku@gmail.com" ]
muktacseku@gmail.com
f285927000d3b3df2053d712bfd077aa5df724ce
99f0e81e074a6cbf8d3cc090623f1126d8605899
/spring-boot-integration-tests-wiremock/src/main/java/de/rieckpil/blog/SpringBootIntegrationTestsWiremockApplication.java
0466109222698db3422ff98cb1350efb349687d8
[ "MIT" ]
permissive
dagistankaradeniz/blog-tutorials
eb511894891200ec84f1498e4c2df437b07cc45e
f6af36a6293b8ce5c902c1060358b8e7c1a04761
refs/heads/master
2021-01-08T16:59:58.443515
2020-02-17T10:42:31
2020-02-17T10:42:31
242,087,211
1
0
MIT
2020-02-21T08:11:50
2020-02-21T08:11:49
null
UTF-8
Java
false
false
377
java
package de.rieckpil.blog; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SpringBootIntegrationTestsWiremockApplication { public static void main(String[] args) { SpringApplication.run(SpringBootIntegrationTestsWiremockApplication.class, args); } }
[ "mail@philipriecks.de" ]
mail@philipriecks.de
bb33fa5de9ee5ef7aaf6e1af09b0e2ea36803027
f27f09e4b4b2302e33b84417a16fbb5c698b1cdc
/gwtent/src/main/java/com/gwtent/aop/client/advice/ArgsBinder.java
bf0a038224ca12598dacd8b80a44f37241e3c04e
[ "Apache-2.0" ]
permissive
nikelin/gwtent
f24b63fb49c698d561cca12bf83e72ee61dad7f8
e42ac106ad1b51e5d9764a86f9a9588c2a289410
refs/heads/master
2020-04-19T10:18:50.905010
2014-09-12T15:24:58
2014-09-12T15:24:59
23,965,815
2
3
null
null
null
null
UTF-8
Java
false
false
1,744
java
/******************************************************************************* * Copyright 2001, 2007 JamesLuo(JamesLuo.au@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. * * Contributors: *******************************************************************************/ package com.gwtent.aop.client.advice; import com.gwtent.aop.client.intercept.MethodInvocation; import com.gwtent.reflection.client.Method; public interface ArgsBinder { /** * Create Argument array for invoke adviced method * Using a smart way. If "args" in AspectJ expression, using this * If the parameter's type is unique, match the parameter * by this type, no matter what's the parameter name * if the parameter's type have more then one, check the * parameter's name, only match if parameter name and type is the same * * Argument values: Object[] invocation.getArguments() * Argument names and types: Parameter[] method.getParameters() * * @param invocation MethodInvocation * @param method is the advice method (which will be invoked). * @return Object[] args */ Object[] createArgs(MethodInvocation invocation, Method method, Object returnValue, Throwable throwingValue); }
[ "self@nikelin.ru" ]
self@nikelin.ru
492c21ca9b84d764f8d6626425cd0054bcd1ec85
1d7463a35762da0558448969cff3ce66e04d8cca
/modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/v201711/CustomTargetingKeyType.java
271e81f5395f9c10edbd469b45e71695a1a1f8b1
[ "Apache-2.0" ]
permissive
jcavalcante/googleads-java-lib
9694ccd19642d380731db34c63beb406ed2bc170
9cb9782edf43ae1280ababbc0f89f945a1cd677c
refs/heads/master
2020-04-01T21:53:33.161012
2018-09-27T14:56:18
2018-09-27T14:56:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,747
java
// Copyright 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // 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.google.api.ads.admanager.jaxws.v201711; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for CustomTargetingKey.Type. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="CustomTargetingKey.Type"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="PREDEFINED"/> * &lt;enumeration value="FREEFORM"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "CustomTargetingKey.Type") @XmlEnum public enum CustomTargetingKeyType { /** * * Target audiences by criteria values that are defined in advance. * * */ PREDEFINED, /** * * Target audiences by adding criteria values when creating line items. * * */ FREEFORM; public String value() { return name(); } public static CustomTargetingKeyType fromValue(String v) { return valueOf(v); } }
[ "api.cseeley@gmail.com" ]
api.cseeley@gmail.com
f89534ca6b3655a1e186e038a9989fdb005e3f02
097df92ce1bfc8a354680725c7d10f0d109b5b7d
/com/amazon/ws/emr/hadoop/fs/shaded/com/google/common/primitives/Ints$IntArrayAsList.java
318ba1ef75c0d698d0a5fcd592d0c2d301e67824
[]
no_license
cozos/emrfs-hadoop
7a1a1221ffc3aa8c25b1067cf07d3b46e39ab47f
ba5dfa631029cb5baac2f2972d2fdaca18dac422
refs/heads/master
2022-10-14T15:03:51.500050
2022-10-06T05:38:49
2022-10-06T05:38:49
233,979,996
2
2
null
2022-10-06T05:41:46
2020-01-15T02:24:16
Java
UTF-8
Java
false
false
3,602
java
package com.amazon.ws.emr.hadoop.fs.shaded.com.google.common.primitives; import com.amazon.ws.emr.hadoop.fs.shaded.com.google.common.annotations.GwtCompatible; import com.amazon.ws.emr.hadoop.fs.shaded.com.google.common.base.Preconditions; import java.io.Serializable; import java.util.AbstractList; import java.util.Collections; import java.util.List; import java.util.RandomAccess; @GwtCompatible class Ints$IntArrayAsList extends AbstractList<Integer> implements RandomAccess, Serializable { final int[] array; final int start; final int end; private static final long serialVersionUID = 0L; Ints$IntArrayAsList(int[] array) { this(array, 0, array.length); } Ints$IntArrayAsList(int[] array, int start, int end) { this.array = array; this.start = start; this.end = end; } public int size() { return end - start; } public boolean isEmpty() { return false; } public Integer get(int index) { Preconditions.checkElementIndex(index, size()); return Integer.valueOf(array[(start + index)]); } public boolean contains(Object target) { return ((target instanceof Integer)) && (Ints.access$000(array, ((Integer)target).intValue(), start, end) != -1); } public int indexOf(Object target) { if ((target instanceof Integer)) { int i = Ints.access$000(array, ((Integer)target).intValue(), start, end); if (i >= 0) { return i - start; } } return -1; } public int lastIndexOf(Object target) { if ((target instanceof Integer)) { int i = Ints.access$100(array, ((Integer)target).intValue(), start, end); if (i >= 0) { return i - start; } } return -1; } public Integer set(int index, Integer element) { Preconditions.checkElementIndex(index, size()); int oldValue = array[(start + index)]; array[(start + index)] = ((Integer)Preconditions.checkNotNull(element)).intValue(); return Integer.valueOf(oldValue); } public List<Integer> subList(int fromIndex, int toIndex) { int size = size(); Preconditions.checkPositionIndexes(fromIndex, toIndex, size); if (fromIndex == toIndex) { return Collections.emptyList(); } return new IntArrayAsList(array, start + fromIndex, start + toIndex); } public boolean equals(Object object) { if (object == this) { return true; } if ((object instanceof IntArrayAsList)) { IntArrayAsList that = (IntArrayAsList)object; int size = size(); if (that.size() != size) { return false; } for (int i = 0; i < size; i++) { if (array[(start + i)] != array[(start + i)]) { return false; } } return true; } return super.equals(object); } public int hashCode() { int result = 1; for (int i = start; i < end; i++) { result = 31 * result + Ints.hashCode(array[i]); } return result; } public String toString() { StringBuilder builder = new StringBuilder(size() * 5); builder.append('[').append(array[start]); for (int i = start + 1; i < end; i++) { builder.append(", ").append(array[i]); } return ']'; } int[] toIntArray() { int size = size(); int[] result = new int[size]; System.arraycopy(array, start, result, 0, size); return result; } } /* Location: * Qualified Name: com.amazon.ws.emr.hadoop.fs.shaded.com.google.common.primitives.Ints.IntArrayAsList * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "Arwin.tio@adroll.com" ]
Arwin.tio@adroll.com
7695abefadffe8892cc43c080d510bb7795227af
dbf9237cb5642a4293160fbba6099ffb7bc6ecdf
/test/TestJFfr00fService.java
8a2ab060d82678826305fa0c108fb9fd46968d29
[]
no_license
SystemaAS/syjservicestror
2799a788223c072d9ed48b250147703f34700c94
31a23a0be5bebec830d592f7912bff84d5999c50
refs/heads/master
2021-06-02T19:00:06.893248
2021-05-09T14:28:54
2021-05-09T14:28:54
95,448,249
0
0
null
null
null
null
UTF-8
Java
false
false
3,714
java
import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import no.systema.jservices.common.dao.Ffr00fDao; import no.systema.jservices.common.dao.Ffr03fDao; import no.systema.jservices.common.dao.facade.Ffr00fDaoFacade; import no.systema.jservices.common.dto.Ffr00fDto; import no.systema.jservices.common.dao.services.Ffr00fDaoService; import no.systema.jservices.common.dao.services.CnffDaoService; import org.modelmapper.ModelMapper; import no.systema.jservices.common.dao.modelmapper.converter.DaoConverter; import java.util.*; public class TestJFfr00fService { Ffr00fDaoService service = null; CnffDaoService cnffDaoService = null; StringBuffer errorStackTrace = new StringBuffer(); ApplicationContext context = null; String prefix = "177"; //77 - 117 String awb = "81140743"; //97957440 - 81140743 // //private ModelMapper modelMapper = new ModelMapper(); //private DaoConverter daoConverter = new DaoConverter(); @Before public void setUp() throws Exception { context = new ClassPathXmlApplicationContext("classpath:syjservicestror-data-service-mod.xml"); service = (Ffr00fDaoService) context.getBean("ffr00fDaoService"); cnffDaoService = (CnffDaoService) context.getBean("cnffDaoService"); } /*@Test public void findRecord() { int _211 = Integer.valueOf(prefix); int _213 = Integer.valueOf(awb); Ffr00fDao dao = new Ffr00fDao(); dao.setF0211(_211); dao.setF0213(_213); //List result = service.findAll(dao.getKeysAwb()); List result = service.findAll(null); //assertTrue(result!=null); assertTrue(result.size()>0); System.out.println(result.toString()); } @Test public void create() { int _211 = Integer.valueOf(prefix); int _213 = Integer.valueOf(awb); Ffr00fDto dto = new Ffr00fDto(); dto.setF0211(String.valueOf(_211)); dto.setF0213(String.valueOf(_213)); dto.setF00rec( (String.valueOf(cnffDaoService.getCnrecnAfterIncrement())) ); //List result = service.findAll(dto.getKeysAwb()); Ffr00fDao resultDao = service.create(dto, modelMapper, daoConverter); //assertTrue(result!=null); assertTrue(resultDao!=null); System.out.println(resultDao.toString()); Ffr00fDto dto = new Ffr00fDto(); dto.setF0211(prefix); dto.setF0213(awb); dto.setF00rec( (String.valueOf(cnffDaoService.getCnrecnAfterIncrement())) ); //Facade for ModelMapper Ffr00fDaoFacade facade = new Ffr00fDaoFacade(dto); facade.setFfr00fDao((Ffr00fDao)facade.getDao(Ffr00fDao.class)); facade.setFfr03fDao((Ffr03fDao)facade.getDao(Ffr03fDao.class)); // Ffr00fDao resultDao = service.create(dto, facade); assertTrue(resultDao!=null); System.out.println(resultDao.toString()); } @Test public void update() { String f00rec = "162220"; // int _f00 = Integer.valueOf(f00rec); Ffr00fDao dto = new Ffr00fDao(); dto.setF00rec(_f00); //List result = service.findAll(dto.getKeysAwb()); Ffr00fDao target = service.find(dto); target.setF0221("OSL"); //List result = service.findAll(dto.getKeysAwb()); Ffr00fDao resultDao = service.update(target, modelMapper, daoConverter); //assertTrue(result!=null); assertTrue(resultDao!=null); System.out.println(resultDao.toString()); }*/ /* @Test public void delete() { String f00rec = "TODO"; int _f00 = Integer.valueOf(f00rec); Ffr00fDto dto = new Ffr00fDto(); dto.setF00rec(f00rec); //1-delete service.delete(dto); //2-check if not-exists Ffr00fDao dao = new Ffr00fDao(); dao.setF00rec(_f00); dao = service.find(dao); assertTrue(dao==null); System.out.println("OK delete"); } */ }
[ "oscar@systema.no" ]
oscar@systema.no
80cbfbf0331ead39814a4d8600de5383acfefa24
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_c4cd39da5e294f2dc083709748c1881dcdc4861f/NavBar/3_c4cd39da5e294f2dc083709748c1881dcdc4861f_NavBar_t.java
ab8168af9717832a573bc6a493d995bd10514fbb
[]
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
3,205
java
package com.IcmcFileTracker.Components; import com.IcmcFileTracker.IcmcFileTrackerUI; import com.IcmcFileTracker.Forms.LoginForm; import com.IcmcFileTracker.Views.CreateTrackerView; import com.IcmcFileTracker.Views.DepartmentView; import com.IcmcFileTracker.Views.ErrorView; import com.IcmcFileTracker.Views.FileHistoryView; import com.IcmcFileTracker.Views.HomeView; import com.IcmcFileTracker.Views.MyView; import com.IcmcFileTracker.Views.NewUserView; import com.IcmcFileTracker.Views.UserActivityView; import com.IcmcFileTracker.model.Department; import com.IcmcFileTracker.model.User; import com.IcmcFileTracker.model.Role; import com.vaadin.annotations.AutoGenerated; import com.vaadin.navigator.Navigator; import com.vaadin.navigator.View; import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent; import com.vaadin.ui.AbsoluteLayout; import com.vaadin.ui.CustomComponent; import com.vaadin.ui.MenuBar; import com.vaadin.ui.MenuBar.MenuItem; import com.vaadin.ui.Panel; import com.vaadin.ui.VerticalLayout; public class NavBar extends CustomComponent{ private final VerticalLayout layout = new VerticalLayout(); private MenuBar navBar = new MenuBar(); private User user; private Navigator navigator; private MenuItem logout; public NavBar(final Navigator navigator, final User user) { setCompositionRoot(layout); this.navigator=navigator; this.user=user; MenuBar.Command command = new MenuBar.Command() { private static final long serialVersionUID = 1L; public void menuSelected(MenuItem selected) { if(selected.equals(logout)){ navigator.navigateTo(LoginForm.VIEW_NAME); }else{ navigator.navigateTo(selected.getText()); } } }; navigator.setErrorView(new ErrorView()); MenuItem home = navBar.addItem(HomeView.VIEW_NAME, null, command); navigator.addView(HomeView.VIEW_NAME, new HomeView()); MenuItem track = navBar.addItem(CreateTrackerView.VIEW_NAME, null, command); navigator.addView(CreateTrackerView.VIEW_NAME, new CreateTrackerView(user)); MenuItem fileView = navBar.addItem(FileHistoryView.VIEW_NAME, null, command); navigator.addView(FileHistoryView.VIEW_NAME, new FileHistoryView()); MenuItem userView = navBar.addItem(user.getUserName(), null, command); navigator.addView(user.getUserName(), new MyView(user)); if(user.getRole().isRole(Role.admin)){ MenuItem admin = navBar.addItem("Admin", null, null); MenuItem create = admin.addItem(DepartmentView.VIEW_NAME, null, command); navigator.addView(DepartmentView.VIEW_NAME, new DepartmentView()); MenuItem newUsers = admin.addItem(NewUserView.VIEW_NAME, null, command); navigator.addView(NewUserView.VIEW_NAME, new NewUserView()); MenuItem userActivity = admin.addItem(UserActivityView.VIEW_NAME, null, command); navigator.addView(UserActivityView.VIEW_NAME, new UserActivityView(user)); } logout = navBar.addItem("LogOut", null, command); navBar.setSizeFull(); layout.addComponent(navBar); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
914937bccdc5d9a431f5d53ffee94a9953cb7223
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_605fff341e1ea5d5e9a5e7afef6d847c094f6350/ExplorarImagenes/16_605fff341e1ea5d5e9a5e7afef6d847c094f6350_ExplorarImagenes_s.java
def75cfedf0bdcc9600f1efe17854e9445ec71ea
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,343
java
package com.proyectoargrado; import java.io.IOException; import java.net.URI; import java.util.ArrayList; import java.util.List; import org.apache.http.NameValuePair; import org.apache.http.client.utils.URLEncodedUtils; import org.json.JSONArray; import org.json.JSONException; import poi.PoiBean; import android.app.Activity; import android.content.Context; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.media.AudioManager; import android.os.Bundle; import android.view.View; import android.view.WindowManager; import android.widget.Toast; import com.proyectoargrado.servicios.eventos.EventosServices; import com.wikitude.architect.ArchitectView; import com.wikitude.architect.ArchitectView.ArchitectUrlListener; public class ExplorarImagenes extends Activity implements ArchitectUrlListener{ //Key de estudiante suplida por Wikitude private String apiKey = "fUOGJVNkR1hHB1zr5WD9or3BZHyhEcL4wHDfjanJoURGFkvG6oUQAO97J82A54Q2R3u2TOGA9GFvky5gVjSorxDv2h2fO+CqW/MIAPQoU8fysj5inE9aGodvTtXOmyga6D2+pPESAczB8VaZ/VmE1dF6Jo2v7M0d5LHiQQIrY8VTYWx0ZWRfX3IAg2v5ZLAx9WnxcuyKIuJ00UA+0c/0MAd/RsmzmwrHCIc/kO2OGQ5qFILjhyg24A4Gt6OMnTTciEoF3sPptcJgzLFnc1PBXsK7WrUNQCswqJFyEZt7Ftmtcjt7OjUdNI9ZnCAJOqJc8VQJobfBjU7Q+KA1ay6xqglj/lTsOIOxJrAp196qvBhwoxdLtINuATXm5sms2WdQOpCI4WvWPuB+f06QJ5tp0NH4tbxxmTDBs+bfwiTs6AvZESh92NceJxuULMmzhKfI3EQbtYncCDYX2+QC873dC4JdDGMKI1cE+KQSznxPvTTpBvuSm5xRCiNFDjxFL4QPG8rZM9ho4AQf7K4e7PvaQUFZfxff6RUltc/l+jWlApeGwrbfq+Mxt9wSwroOg9UTWRByR7mtosHJ8s6rEK0dlwMnlIb1Woqf6/Fex+bds029urrt/Y/+TtfYn60ODBHSEs+0ULDdKCiOySjJsPrgtP5e04Nia0fvCgjlNq8weoY="; //archview para cargar los POI haciendo overlaid a la camara private ArchitectView architectView; //contexto de la actividad private Context contexto = this; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //para determinar si el dispositivo cumple con los requisitos para correr la app. if(!ArchitectView.isDeviceSupported(this)) { Toast.makeText(this, "minimum requirements not fulfilled", Toast.LENGTH_LONG).show(); this.finish(); return; } //mostrar la aplicacion fullscreen cuando este en modo explorador this.getWindow().setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN ); setContentView(R.layout.main); //set the devices' volume control to music to be able to change the volume of possible soundfiles to play this.setVolumeControlStream( AudioManager.STREAM_MUSIC ); //Cargar el arcview de wikitude y aplicar la clave otorgada por wikitude this.architectView = (ArchitectView) this.findViewById(R.id.architectView); architectView.onCreate(apiKey); } @Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); //IMPORTANT: creates ARchitect core modules if(this.architectView != null) this.architectView.onPostCreate(); //register this activity as handler of "architectsdk://" urls this.architectView.registerUrlListener(this); try { loadSampleWorld(); } catch (IOException e) { e.printStackTrace(); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } @Override protected void onResume() { super.onResume(); this.architectView.onResume(); //solo los objetos que esten a 2km de distancia o menos se mostraran //this.architectView.setCullingDistance(2000); } @Override protected void onPause() { super.onPause(); if (this.architectView != null){ this.architectView.onPause(); } //locManager.removeUpdates(this); } @Override protected void onDestroy() { super.onDestroy(); if(this.architectView != null) this.architectView.onDestroy(); } @Override public void onLowMemory() { super.onLowMemory(); if(this.architectView != null) this.architectView.onLowMemory(); } @Override public boolean urlWasInvoked(String url) { //System.out.println("mi baina es "+url); //parsing the retrieved url string List<NameValuePair> queryParams = URLEncodedUtils.parse(URI.create(url), "UTF-8"); String id = ""; String name = ""; // getting the values of the contained GET-parameters for(NameValuePair pair : queryParams) { if(pair.getName().equals("id")) { id = pair.getValue(); System.out.println("mi id es: "+id); } if(pair.getName().equals("name")) { name = pair.getValue(); System.out.println("mi nombre: "+name); } } EventosServices eventosService = new EventosServices(contexto, id); eventosService.execute(); return true; } //Cargar tablones en el mapa.... private void loadSampleWorld() throws IOException, JSONException { this.architectView.load("exploimagenes.html"); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
028ec2374d718af0469dab1de2094777de8db6f1
96aab3fe160261eaf6e98f72a125e1551d737dc9
/doo/src/main/java/ticTacToe/v330/controllers/MoveController.java
baaf8e5fedaa46a7f34887979c77cce78c938c09
[]
no_license
mlires/IWVG
4050432f848b5fc3c4f764768d4a217303d7af84
2b92872e957fae47114a220ed5b1e52a7be17d3e
refs/heads/master
2020-07-02T17:30:38.650161
2020-05-29T10:01:15
2020-05-29T10:01:15
201,606,068
0
0
null
2019-08-10T09:04:05
2019-08-10T09:04:03
null
UTF-8
Java
false
false
1,292
java
package ticTacToe.v330.controllers; import ticTacToe.v330.models.Coordinate; import ticTacToe.v330.models.Game; import ticTacToe.v330.views.TicTacToeView; public class MoveController extends ColocateController { private Coordinate origin; MoveController(Game game, CoordinateController coordinateController) { super(game, coordinateController); } @Override public void remove(Coordinate origin) { assert origin != null; assert this.validateOrigin(origin) == null; this.origin = origin; super.remove(origin); } public Error validateOrigin(Coordinate origin) { assert origin != null; if (!this.full(origin)) { return Error.NOT_PROPERTY; } return null; } @Override public void put(Coordinate target) { assert target != null; assert origin != null; assert this.validateTarget(origin, target) == null; super.put(target); origin = null; } public Error validateTarget(Coordinate origin, Coordinate target) { Error error = super.validateTarget(target); if (error != null) { return error; } if (origin.equals(target)) { return Error.REPEATED_COORDINATE; } return null; } @Override public void accept(TicTacToeView ticTacToeView) { ticTacToeView.visit(this); } }
[ "setillofm@gmail.com" ]
setillofm@gmail.com
15756764e45245360d09c6819390966cca9a03fe
c19335838930f115b162b21985063bac4533f31f
/oim-server-run/single/oim-server-single-essential-running/src/test/java/task/FutureTaskTest.java
758003116cd3dd889fdb3718435405f13d825640
[ "Apache-2.0" ]
permissive
yuzhanxu/oim-server
d68704d0493dd1ad4ce22ac51253a38d0e865527
dbb087778bc28e04ffefbe39ff9e1200578c9dc8
refs/heads/master
2023-04-24T12:40:37.849011
2021-04-12T03:20:11
2021-04-12T03:20:11
357,839,783
1
0
null
null
null
null
UTF-8
Java
false
false
2,376
java
package task; import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.FutureTask; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class FutureTaskTest { @RequestMapping("/task/test1") public HashMap<String, Object> getService1() throws InterruptedException, ExecutionException { System.out.println("线程名称:" + Thread.currentThread().getName()); long start = System.currentTimeMillis(); HashMap map = new HashMap<>(); Callable<Object> callable1 = new Callable<Object>() { // 调用接口返回json @Override public Object call() throws Exception { // JSONObject json = JSONObject.parseObject(testA()); System.out.println("子线程1:"+Thread.currentThread().getName()); return testA(); // return json; } }; Callable<Object> callable2 = new Callable<Object>() { @Override public Object call() throws Exception { // JSONObject json =JSONObject.parseObject(testB()); // return json; System.out.println("子线程2:"+Thread.currentThread().getName()); return testB(); } }; FutureTask<Object> oneTask = new FutureTask<Object>(callable1); FutureTask<Object> twoTask = new FutureTask<Object>(callable2); // 多线程运行 new Thread(oneTask).start(); new Thread(twoTask).start(); // 计算 map.put("A", oneTask.get()); map.put("B", twoTask.get()); long end = System.currentTimeMillis(); System.out.println("耗时:" + (end - start)); System.out.println("主线程名称:" + Thread.currentThread().getName()+"结束!"); return map; } @RequestMapping("/task/test2") public HashMap getService2() throws InterruptedException, ExecutionException { HashMap map = new HashMap<>(); long start = System.currentTimeMillis(); String a = testA(); String b = testB(); // 计算 map.put("A", a); map.put("B", b); long end = System.currentTimeMillis(); System.out.println("耗时:" + (end - start)); return map; } public String testA() throws InterruptedException { Thread.sleep(1000); System.out.println("执行A"); return "A"; } public String testB() throws InterruptedException { Thread.sleep(1500); System.out.println("执行B"); return "B"; } }
[ "onlyxiahui@qq.com" ]
onlyxiahui@qq.com
0cfbc56c3b69997fb85f2a0603bc0e073c31f410
cff2f4931d6f0abca33d37d3d2e731908da5a150
/java-ocpjp/src/kyocoolcool/exam_v1495/exam153/Test.java
9a1749845f8c0ba264280c02743c370bd99e3f43
[]
no_license
kyocoolcool/java-tutorial
66f58d4c7d376ae9e7fa7a1b101eaa306c4eab3d
97a86477617ece81fa9e7d265b8857f7aa226416
refs/heads/master
2021-07-12T23:01:18.714658
2020-09-11T06:31:56
2020-09-11T06:31:56
204,008,117
0
0
null
null
null
null
UTF-8
Java
false
false
681
java
package kyocoolcool.exam_v1495.exam153; import java.util.Locale; import java.util.ResourceBundle; /** * @author Chris Chen https://blog.kyocoolcool.com * @version 1.0 * @since 2020/8/30 下午 04:35 **/ public class Test { public static void main(String[] args) { Locale currentLocale; // currentLocale=new Locale("de","DE"); // currentLocale=new Locale.Builder().setLanguage("de").setRegion("DE").build(); currentLocale = Locale.getDefault(); final ResourceBundle message = ResourceBundle.getBundle("message", currentLocale); final String inquiry = message.getString("inquiry"); System.out.println(inquiry); } }
[ "kyocoolcool@hotmail.com" ]
kyocoolcool@hotmail.com
2bd135c76977fe5fb3ff00755c2413ea884168eb
2b982cd6b05345f5de4336727c6b9107496ac5d5
/org.polymap.p4.atlas/src/org/polymap/p4/atlas/index/LayerIndexer.java
195bf41a19b535e3eb27e8743f645bdbf534eb2c
[]
no_license
fb71/polymap4-p4
4b6f707ab41af44abb2b01a33c5e551047ac8c9c
a73755c5ba1e586b96be55d0c9ce9b360dd49bbc
refs/heads/master
2020-05-21T05:44:59.078959
2017-04-30T23:16:26
2017-04-30T23:16:26
44,552,284
0
0
null
2015-10-19T17:41:39
2015-10-19T17:41:39
null
UTF-8
Java
false
false
2,814
java
/* * polymap.org * Copyright (C) 2017, the @authors. All rights reserved. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 3.0 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.polymap.p4.atlas.index; import org.geotools.data.FeatureSource; import org.geotools.feature.FeatureCollection; import org.geotools.feature.FeatureIterator; import org.json.JSONObject; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.eclipse.core.runtime.IProgressMonitor; import org.polymap.core.project.ILayer; import org.polymap.core.runtime.UIJob; import org.polymap.rhei.fulltext.update.UpdateableFulltextIndex.Updater; import org.polymap.p4.layer.FeatureLayer; /** * * * @author Falko Bräutigam */ class LayerIndexer extends UIJob { private static final Log log = LogFactory.getLog( LayerIndexer.class ); private ILayer layer; private Updater updater; private AtlasIndex atlasIndex; public LayerIndexer( ILayer layer, Updater updater, AtlasIndex atlasIndex ) { super( LayerIndexer.class.getSimpleName() + ": " + layer.label.get() ); this.updater = updater; this.layer = layer; this.atlasIndex = atlasIndex; } // @Override // protected IStatus run( IProgressMonitor monitor ) { // try { // runWithException( monitor ); // return monitor.isCanceled() ? Status.CANCEL_STATUS : Status.OK_STATUS; // } // catch (Exception e) { // throw new RuntimeException( e ); // } // } @Override protected void runWithException( IProgressMonitor monitor ) throws Exception { FeatureLayer featureLayer = FeatureLayer.of( layer ).get().get(); FeatureSource fs = featureLayer.featureSource(); FeatureCollection features = fs.getFeatures(); monitor.beginTask( layer.label.get(), IProgressMonitor.UNKNOWN /*features.size()*/ ); try ( FeatureIterator it = features.features(); ){ int count = 0; for (;it.hasNext(); count++) { JSONObject json = atlasIndex.transform( it.next() ); updater.store( json, true ); monitor.worked( 1 ); } log.info( "indexed: " + count ); } monitor.done(); } }
[ "falko@polymap.de" ]
falko@polymap.de
9b2122d5b168948db4cc7e814d40cf668532029a
36607e3528a47306dc81549a4ff5400999c09f83
/mybulter/src/main/java/com/example/mybulter/info/UserBean.java
8893307642f132289652ef0faa4d6de37cb0f43f
[]
no_license
foxalan/MyApplication
7dab52c1ac0a7ab5fa555da0df7cf424b314d606
67f0d21875a0fc6b38ed73a602bb700587641a76
refs/heads/master
2021-05-12T05:14:15.722429
2018-01-19T08:31:38
2018-01-19T08:31:38
117,186,134
0
0
null
null
null
null
UTF-8
Java
false
false
616
java
package com.example.mybulter.info; /** * Function : * Modify Date : 2018/1/17 * * @Author : Alan * Issue : TODO * Whether Solve : */ public class UserBean { private String item; private String content; public UserBean(String item, String content) { this.item = item; this.content = content; } public String getItem() { return item; } public void setItem(String item) { this.item = item; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } }
[ "swd-004@mail.foxconn.com" ]
swd-004@mail.foxconn.com
e40ee85dc76695da0527845a0fd867e74389dd2c
9f64d1da234cb1c0191b3540f9e309e5f43d354b
/ wai-client-v1 --username voquocduy@gmail.com/wai/src/com/x/google/masf/services/AsyncResult.java
9bf59c84b74c6c2a8e124060521820bfd3d115d1
[]
no_license
rayvo/wai-client-v1
17123d332fa9cc1878a00b144474d36b29891b3b
0ebfa81c27203253be11b4edfac8927a709e1411
refs/heads/master
2021-01-22T11:58:41.270263
2013-11-02T04:58:30
2013-11-02T04:58:30
33,710,586
0
0
null
null
null
null
UTF-8
Java
false
false
1,651
java
package com.x.google.masf.services; import com.x.google.masf.ServiceCallback; public class AsyncResult { private ServiceCallback closure; private boolean done; private Object result; public AsyncResult(ServiceCallback paramServiceCallback) { this.closure = paramServiceCallback; } public Object get() { try { while (true) { boolean bool = this.done; if (bool) break; try { wait(); } catch (InterruptedException localInterruptedException) { } } Object localObject2 = this.result; return localObject2; } finally { } } public Object get(long paramLong) throws InterruptedException { try { if (!this.done) wait(paramLong); Object localObject2 = this.result; return localObject2; } finally { } } public boolean isDone() { try { boolean bool = this.done; return bool; } finally { localObject = finally; throw localObject; } } public void setResult(Object paramObject) { try { this.result = paramObject; this.done = true; if (this.closure != null) this.closure.onRequestComplete(paramObject); notifyAll(); return; } finally { } } } /* Location: C:\apktool\SmaliToJavaTUTKit\jd-gui-0.3.5.windows\classes-dex2jar.jar * Qualified Name: com.x.google.masf.services.AsyncResult * JD-Core Version: 0.6.2 */
[ "voquocduy@gmail.com@0fd9bcd8-174d-baa1-59d5-a6b515c80f00" ]
voquocduy@gmail.com@0fd9bcd8-174d-baa1-59d5-a6b515c80f00
3b80e4cdda9c49ca09c34023801b87c87be42b65
a81c08273d36d59a5f2e313d26fee16eb7b60fc4
/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHtml.java
08dd6b1d42498896a32144ad2fb46c9b16d82794
[ "Apache-2.0" ]
permissive
edouardswiac/htmlunit
88cdc4bc2e7807627c5619be5ad721a17117dbe7
cc9f8e4b341b980ec0bac9cb8b531f4ff958c534
refs/heads/master
2016-09-14T13:53:28.461222
2016-04-29T21:32:17
2016-04-29T21:32:17
57,413,853
0
0
null
null
null
null
UTF-8
Java
false
false
1,452
java
/* * Copyright (c) 2002-2016 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.gargoylesoftware.htmlunit.html; import java.util.Map; import com.gargoylesoftware.htmlunit.SgmlPage; /** * A representation of an HTML element "html". * * @author David K. Taylor * @author Ahmed Ashour * @author Frank Danek */ public final class HtmlHtml extends HtmlElement { /** The HTML tag represented by this element. */ public static final String TAG_NAME = "html"; /** * Creates a new instance. * * @param qualifiedName the qualified name of the element type to instantiate * @param page the page that contains this element * @param attributes the initial attributes */ HtmlHtml(final String qualifiedName, final SgmlPage page, final Map<String, DomAttr> attributes) { super(qualifiedName, page, attributes); } }
[ "eswiac@twitter.com" ]
eswiac@twitter.com
c4565758c00fb7c2b8fe6c2cb1cf8de56aae0a97
a1d7232da9b90c9ca5d1e52a6efaa46810bb0c1f
/src/com/Stranded/gamble/InvClickEvent.java
cbbc63e207609c6ccc8e9d62667f0ffd2e1bb2e1
[]
no_license
JasperBouwman/Stranded
c042801ca3cec3f055ef5f1ccf69beaeba5c3c5c
bb225a6727ba86393e62899a4fac2c6be1ddd48c
refs/heads/master
2021-04-29T18:09:04.998997
2018-02-15T21:49:38
2018-02-15T21:49:38
121,687,305
0
0
null
null
null
null
UTF-8
Java
false
false
3,993
java
package com.Stranded.gamble; import com.Stranded.Main; import com.Stranded.gamble.inv.InvGamble; import com.Stranded.gamble.inv.InvItem; import com.Stranded.gamble.inv.InvSlots; import com.Stranded.gamble.inv.InvStartSlots; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; public class InvClickEvent implements Listener { private Main p; public InvClickEvent(Main main) { p = main; } @EventHandler @SuppressWarnings("unused") public void clickEvent(InventoryClickEvent e) { Inventory inv = e.getInventory(); String title = inv.getTitle(); Player player = (Player) e.getWhoClicked(); if (title.equals(InvStartSlots.title)) { if (e.getRawSlot() < inv.getSize()) { if (e.getCurrentItem() == null) { return; } if (!e.getCurrentItem().hasItemMeta()) { return; } ItemStack is = e.getCurrentItem(); if (is.equals(InvStartSlots.size33)) { InvSlots.openInv(p, player, 3, 27, false); } else if (is.equals(InvStartSlots.size34)) { InvSlots.openInv(p, player, 3, 36, false); } else if (is.equals(InvStartSlots.size35)) { InvSlots.openInv(p, player, 3, 45, false); } else if (is.equals(InvStartSlots.size36)) { InvSlots.openInv(p, player, 3, 54, false); } else if (is.equals(InvStartSlots.size53)) { InvSlots.openInv(p, player, 5, 27, false); } else if (is.equals(InvStartSlots.size54)) { InvSlots.openInv(p, player, 5, 36, false); } else if (is.equals(InvStartSlots.size55)) { InvSlots.openInv(p, player, 5, 45, false); } else if (is.equals(InvStartSlots.size56)) { InvSlots.openInv(p, player, 5, 54, false); } else if (is.equals(InvStartSlots.size73)) { InvSlots.openInv(p, player, 7, 27, false); } else if (is.equals(InvStartSlots.size74)) { InvSlots.openInv(p, player, 7, 36, false); } else if (is.equals(InvStartSlots.size75)) { InvSlots.openInv(p, player, 7, 45, false); } else if (is.equals(InvStartSlots.size76)) { InvSlots.openInv(p, player, 7, 54, false); } else if (is.equals(InvStartSlots.size93)) { InvSlots.openInv(p, player, 9, 27, false); } else if (is.equals(InvStartSlots.size94)) { InvSlots.openInv(p, player, 9, 36, false); } else if (is.equals(InvStartSlots.size95)) { InvSlots.openInv(p, player, 9, 45, false); } else if (is.equals(InvStartSlots.size96)) { InvSlots.openInv(p, player, 9, 54, false); } } } else if (title.equals(InvGamble.title)) { if (e.getRawSlot() < inv.getSize()) { if (e.getCurrentItem() == null) { return; } if (!e.getCurrentItem().hasItemMeta()) { return; } ItemStack is = e.getCurrentItem(); if (is.equals(InvGamble.random)) { InvItem.openInv(p, player); } else if (is.equals(InvGamble.slots)) { InvStartSlots.openInv(player); } } } else if (title.equals(InvSlots.title)) { e.setCancelled(true); } else if (title.equals(InvItem.title)) { e.setCancelled(true); } } }
[ "jphbouwman@gmail.com" ]
jphbouwman@gmail.com
a0d96dfbf031ac5739bd4a9add95af62861ce835
fd9da616c35dff8ed32730ef4db3e768de33cdf7
/jaxrs-cxf-server/src/gen/java/io/swagger/model/TimeUnit.java
1aa07bf779892da4ce05d0f431809bdafd21c429
[]
no_license
gythialy/sonata4j
7a92282e7e5caf7655f3785a550df83024613673
12b8e74b4dc8d1230f82122f29d8d4f9361b869b
refs/heads/master
2022-06-23T09:43:53.262799
2020-05-09T04:01:11
2020-05-09T04:01:11
262,467,256
0
0
null
null
null
null
UTF-8
Java
false
false
922
java
package io.swagger.model; import io.swagger.annotations.ApiModel; import javax.validation.constraints.*; import javax.validation.Valid; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; /** * Represents a unit of time. */ public enum TimeUnit { CALENDARDAYS("calendarDays"), CALENDARHOURS("calendarHours"), CALENDARMINUTES("calendarMinutes"), BUSINESSDAYS("businessDays"), BUSINESSHOURS("businessHours"), BUSINESSMINUTES("businessMinutes"); private String value; TimeUnit(String value) { this.value = value; } @Override @JsonValue public String toString() { return String.valueOf(value); } @JsonCreator public static TimeUnit fromValue(String text) { for (TimeUnit b : TimeUnit.values()) { if (String.valueOf(b.value).equals(text)) { return b; } } return null; } }
[ "gythialy.koo+github@gmail.com" ]
gythialy.koo+github@gmail.com
5df4c26bc588ce016f8084e53af59d3f7bb18127
b89fa67df1b6da32f45ae71fdbce1b37a3df2a8c
/Yamba-2/src/com/marakana/yamba2/StatusActivity.java
df95f1637104a324a5d5d668a2a14fa31c9cc20e
[]
no_license
twitter-university/LearningAndroidYamba
543f9f5247bb2620ab6064af41baea1569381426
32d807972e629f106fea6ece140b7fe9ec724376
refs/heads/master
2021-01-01T17:27:28.338808
2014-02-20T07:03:15
2014-02-20T07:03:15
2,751,542
35
25
null
null
null
null
UTF-8
Java
false
false
4,511
java
package com.marakana.yamba2; import winterwell.jtwitter.Twitter; import winterwell.jtwitter.TwitterException; import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; import android.graphics.Color; import android.os.AsyncTask; import android.os.Bundle; import android.preference.PreferenceManager; import android.text.Editable; import android.text.TextWatcher; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; public class StatusActivity extends Activity implements OnClickListener, TextWatcher, OnSharedPreferenceChangeListener { // <1> private static final String TAG = "StatusActivity"; EditText editText; Button updateButton; TextView textCount; Twitter twitter; SharedPreferences prefs; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.status); // Find views editText = (EditText) findViewById(R.id.editText); updateButton = (Button) findViewById(R.id.buttonUpdate); updateButton.setOnClickListener(this); textCount = (TextView) findViewById(R.id.textCount); textCount.setText(Integer.toString(140)); textCount.setTextColor(Color.GREEN); editText.addTextChangedListener(this); // Setup preferences prefs = PreferenceManager.getDefaultSharedPreferences(this); prefs.registerOnSharedPreferenceChangeListener(this); } // Called when button is clicked public void onClick(View v) { String status = editText.getText().toString(); new PostToTwitter().execute(status); Log.d(TAG, "onClicked"); } // Called first time user clicks on the menu button @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); // <1> inflater.inflate(R.menu.menu, menu); // <2> return true; // <3> } // Called when an options item is clicked @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { // <1> case R.id.itemPrefs: startActivity(new Intent(this, PrefsActivity.class)); // <2> break; } return true; // <3> } // Asynchronously posts to twitter class PostToTwitter extends AsyncTask<String, Integer, String> { // Called to initiate the background activity @Override protected String doInBackground(String... statuses) { try { Twitter.Status status = getTwitter().updateStatus(statuses[0]); return status.text; } catch (TwitterException e) { Log.e(TAG, e.toString()); e.printStackTrace(); return "Failed to post"; } } // Called when there's a status to be updated @Override protected void onProgressUpdate(Integer... values) { super.onProgressUpdate(values); // Not used in this case } // Called once the background activity has completed @Override protected void onPostExecute(String result) { Toast.makeText(StatusActivity.this, result, Toast.LENGTH_LONG).show(); } } // TextWatcher methods public void afterTextChanged(Editable statusText) { int count = 140 - statusText.length(); textCount.setText(Integer.toString(count)); textCount.setTextColor(Color.GREEN); if (count < 10) textCount.setTextColor(Color.YELLOW); if (count < 0) textCount.setTextColor(Color.RED); } public void beforeTextChanged(CharSequence s, int start, int count, int after) { } public void onTextChanged(CharSequence s, int start, int before, int count) { } private Twitter getTwitter() { if (twitter == null) { String username, password, apiRoot; username = prefs.getString("username", ""); password = prefs.getString("password", ""); apiRoot = prefs.getString("apiRoot", "http://yamba.marakana.com/api"); // Connect to twitter service twitter = new Twitter(username, password); twitter.setAPIRootUrl(apiRoot); } return twitter; } public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { // invalidate twitter object twitter = null; } }
[ "marko@marakana.com" ]
marko@marakana.com
300bcf1be0f296213c7b0a5a0293102d77f376f2
93c99ee9770362d2917c9494fd6b6036487e2ebd
/server/decompiled_apps/2b7122657dcb75ede8840eff964dd94a/com.bankeen.ui.feed.a/j.java
cb4747f9f8af81b42af67e44d93fa9e1308456a3
[]
no_license
YashJaveri/Satic-Analysis-Tool
e644328e50167af812cb2f073e34e6b32279b9ce
d6f3be7d35ded34c6eb0e38306aec0ec21434ee4
refs/heads/master
2023-05-03T14:29:23.611501
2019-06-24T09:01:23
2019-06-24T09:01:23
192,715,309
0
1
null
2023-04-21T20:52:07
2019-06-19T11:00:47
Smali
UTF-8
Java
false
false
1,281
java
package com.bankeen.ui.feed.a; import android.support.v7.widget.RecyclerView.ViewHolder; import android.text.TextUtils; import android.view.View; import android.widget.TextView; import com.bankeen.ui.feed.b.d; import com.bankeen.ui.feed.b.f; /* compiled from: CardViewHolder */ public abstract class j<E extends f> extends ViewHolder { E a; /* compiled from: CardViewHolder */ public interface a { void a(f fVar); } public abstract void a(E e); j(View view) { super(view); } public void b(E e) { this.a = e; a(e); } public f a() { return this.a; } /* Access modifiers changed, original: 0000 */ public void a(d dVar, TextView textView) { if (dVar.i()) { textView.setVisibility(0); textView.setText(dVar.d()); return; } textView.setVisibility(8); } /* Access modifiers changed, original: 0000 */ public void b(d dVar, TextView textView) { a(dVar.c(), textView); } private void a(String str, TextView textView) { if (TextUtils.isEmpty(str)) { textView.setVisibility(8); return; } textView.setText(str); textView.setVisibility(0); } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
d9648bfc9ef37c86e2cf3692d12fdcb44bd4a7ac
c67592a066fed3cd20d8a7b57b1c3d03eb806a40
/src/statistics/Collectible.java
a6db0bf87bf8e56a0779ba6ce7676b62b2a34e9a
[]
no_license
brendanofallon/TreesimJ
4f6dfa97ed60edcb9029897ea3899f7833901901
a0e77b9a0a07dc667b8a71323dc2b1b4deda990b
refs/heads/master
2021-01-23T12:05:17.945215
2012-01-19T05:09:51
2012-01-19T05:09:51
1,154,061
2
2
null
null
null
null
UTF-8
Java
false
false
779
java
package statistics; import java.util.ArrayList; import java.util.List; import population.Locus; import tree.DiscreteGenTree; /** * An interface for those items from which groups of Individuals may be sampled. These types of objects are passed * to Statistics, which generally need to sample Individuals to do their job. Populations are one type of Collectible, * but so are groups of Populations (for instance, in a multi-population model). * @author brendan * */ public interface Collectible { public Locus getInd(int which); public List<Locus> getSample(int sampleSize); public int getCurrentGenNumber(); public int size(); public List<Locus> getList(); public DiscreteGenTree getSampleTree(int sampleSize); public void releasePreservedInds(); }
[ "brendanofallon@fastmail.fm" ]
brendanofallon@fastmail.fm
4c5f3b9434c16f6aa61ab7cf9202eb95987cba9f
0b99941112b4407465c643b056e770f40ecd4cbe
/src/PersonalStuff/CityDistance/City.java
684231cab688afd400fad36cfda77bd6d74c35fe
[]
no_license
banthony79/JavaPractice
c81c9e65936af7948d32d5de9923cfd34ff41251
e3d144e5e5c6973bcc30a7c185d44c39a1cfee19
refs/heads/master
2023-01-18T14:13:21.684925
2020-11-29T18:06:41
2020-11-29T18:06:41
300,121,082
0
0
null
null
null
null
UTF-8
Java
false
false
898
java
package PersonalStuff.CityDistance; import java.util.ArrayList; public class City { private String cityName; private String country; private double latitude; private double longitude; public City(String cityName, String country, double latitute, double longitude) { this.cityName = cityName; this.country = country; this.latitude = latitute; this.longitude = longitude; } public String getCityName() { return cityName; } public String getCountry() { return country; } public double getLatitute() { return latitude; } public double getLongitude() { return longitude; } @Override public String toString() { return cityName + ", the capital of " + country + "."; } public double getLatitude() { return latitude; } }
[ "blooyeng@gmail.com" ]
blooyeng@gmail.com
48dbade9e62dddff476bbfd2a69620f2b63c49b1
0aed56d5eef24f34a91ad3c6fd99317ee69e228e
/core/src/main/java/de/bwaldvogel/mongo/backend/CursorRegistry.java
f8c7e5a9c2d26b0576c14997ff43f0645e39c011
[ "BSD-3-Clause" ]
permissive
bwaldvogel/mongo-java-server
0b508f5378f06d868ca5d663540f57d6d4336a0c
03b38aaeab892db986ef61084ada7ea581ca7300
refs/heads/main
2023-08-02T10:53:07.265007
2023-06-25T11:30:35
2023-06-25T11:30:35
2,394,379
259
98
BSD-3-Clause
2023-07-21T11:36:17
2011-09-15T18:22:58
Java
UTF-8
Java
false
false
1,134
java
package de.bwaldvogel.mongo.backend; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicLong; import de.bwaldvogel.mongo.exception.CursorNotFoundException; public class CursorRegistry { private final ConcurrentMap<Long, Cursor> cursors = new ConcurrentHashMap<>(); private final AtomicLong cursorIdCounter = new AtomicLong(); public long generateCursorId() { return cursorIdCounter.incrementAndGet(); } public Cursor getCursor(long cursorId) { Cursor cursor = cursors.get(cursorId); if (cursor == null) { throw new CursorNotFoundException(cursorId); } return cursor; } public boolean remove(Cursor cursor) { return remove(cursor.getId()); } public boolean remove(long cursorId) { return cursors.remove(cursorId) != null; } public void add(Cursor cursor) { Cursor previousValue = cursors.put(cursor.getId(), cursor); Assert.isNull(previousValue); } public int size() { return cursors.size(); } }
[ "mail@bwaldvogel.de" ]
mail@bwaldvogel.de
aa63f604c0fee637ea08d849e43ed2883470867e
0906ce9a6f899e835767bd1979f7b137a7e9025c
/Bukkit/src/me/egg82/tcpp/events/player/playerTeleport/DisplayEventCommand.java
a4fb46402255a6d8456a3a1e9fef535ff6c38b93
[ "MIT" ]
permissive
swagskeer247/TrollCommandsPlusPlus
f4d786744c12f2de830862b64cffd027a2a06442
db9b1b22da9fdbb725d805f72f5f79ec916b0fc9
refs/heads/master
2020-03-21T20:27:38.229319
2018-04-25T06:00:37
2018-04-25T06:00:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,278
java
package me.egg82.tcpp.events.player.playerTeleport; import java.util.UUID; import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerTeleportEvent; import me.egg82.tcpp.services.registries.DisplayLocationRegistry; import ninja.egg82.patterns.ServiceLocator; import ninja.egg82.patterns.registries.IVariableRegistry; import ninja.egg82.plugin.commands.events.EventCommand; public class DisplayEventCommand extends EventCommand<PlayerTeleportEvent> { //vars private IVariableRegistry<UUID> displayLocationRegistry = ServiceLocator.getService(DisplayLocationRegistry.class); //constructor public DisplayEventCommand() { super(); } //public //private protected void onExecute(long elapsedMilliseconds) { if (event.isCancelled()) { return; } Player player = event.getPlayer(); UUID uuid = player.getUniqueId(); if (displayLocationRegistry.hasRegister(uuid)) { Location loc = displayLocationRegistry.getRegister(uuid, Location.class); if (!event.getTo().getWorld().equals(event.getFrom().getWorld())) { event.setCancelled(true); player.teleport(loc); } else { if (event.getTo().distanceSquared(loc) >= 4) { event.setCancelled(true); player.teleport(loc); } } } } }
[ "phantom_zero@ymail.com" ]
phantom_zero@ymail.com
5b4ccfea9186ea11a30e08ba348a7d8713b3bf8c
3c45a5f2aaef7951be8769a28fa28e05d6d3fbb4
/subprojects/file-server-service/src/main/java/com/logica/ndk/tm/fileServer/service/pathResolver/SymbolicLinkResolver.java
f487baf6a4d826beadf353fc45884e8a2255ce59
[]
no_license
NLCR/NDK-validator-2012-legacy
99c51442655b5a9c872fc9b4cb57d98138d6c8e0
3ddcf34131f2f0e8366297c4ad7738f651d7a340
refs/heads/master
2021-05-28T17:10:32.391360
2014-11-10T10:18:47
2014-11-10T10:18:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,416
java
package com.logica.ndk.tm.fileServer.service.pathResolver; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.logica.ndk.commons.utils.cli.SysCommandExecutor; import com.logica.ndk.tm.fileServer.service.ServiceConfiguration; public class SymbolicLinkResolver { private static final Logger LOG = LoggerFactory.getLogger(ServiceConfiguration.class); public static String resolveSymbolicLink(String link) throws SymbolicLinkResolverExcetion{ String cygwinHome = ServiceConfiguration.instance().getString("cygwinHome"); String commandTemplate = ServiceConfiguration.instance().getString("readLinkCmd"); SysCommandExecutor cmdExecutor = new SysCommandExecutor(); try { int commnadStatus = cmdExecutor.runCommand(cygwinHome + commandTemplate.replace("${link}", link)); if(commnadStatus == 0){ String realLink = cmdExecutor.getCommandOutput(); realLink = realLink.replace("\r\n", ""); LOG.info("Link is symbolic! Real path: " + realLink); return realLink; }else if(commnadStatus == 1){ LOG.info("Link is not symbolic!: " + link); return link; } } catch (Exception e) { LOG.error("Error while resolving link", e); throw new SymbolicLinkResolverExcetion("Error while resolving link", e); } return link; } }
[ "rudolf@m2117.nkp.cz" ]
rudolf@m2117.nkp.cz
64bd0b1fea937e61ac016bb6eb62d8f6064e74de
47bd92b0ec19cef05398478e93f141e985cc0e05
/comparer/comparer.model/comparer.model.bet/comparer.model.bet.bean/src/main/java/com/comparadorad/bet/comparer/model/bet/bean/BetEventWilliamHill.java
87edfd02aa9236204b43a85029a8d51f5a44899b
[]
no_license
chuguet/my-comparer
f43c0c3dbf7f635864bbf346c0c11c455f3cb831
471e7d83d1c5c5400f90d901faa4f24f8e755490
refs/heads/master
2021-01-15T21:03:21.584668
2014-08-07T08:57:20
2014-08-07T08:57:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,544
java
/** * * Copyright (C) FACTORIA ETSIA S.L. * All Rights Reserved. * www.factoriaetsia.com * */ package com.comparadorad.bet.comparer.model.bet.bean; import com.comparadorad.bet.comparer.model.config.bean.CfgBetTypeEvent.CfgBetTypeEventId; /** * The Enum BetEventBetClick. */ public enum BetEventWilliamHill implements IBetEvent { /** The QUINC e_ minutos. */ QUINCE_MINUTOS(CfgBetTypeEventId.QUINCE_MINUTOS.nameId(), "15 Minutes Betting"), /** The TREINT a_ minutos. */ TREINTA_MINUTOS(CfgBetTypeEventId.TREINTA_MINUTOS.nameId(), "30 Minutes Betting"), /** The PRIMER a_ parte. */ PRIMERA_PARTE(CfgBetTypeEventId.PRIMERA_PARTE.nameId(), "1st Half Betting","1st Half Handicaps"), /** The SEGUND a_ parte. */ SEGUNDA_PARTE(CfgBetTypeEventId.SEGUNDA_PARTE.nameId(), "2nd Half Betting","2nd Half Handicaps"), /** The PARTID o_ completo. */ PARTIDO_COMPLETO(CfgBetTypeEventId.PARTIDO_COMPLETO.nameId(), "Match Betting","Total Points"), PRIMER_CUARTO(CfgBetTypeEventId.PRIMER_CUARTO.nameId()), SEGUNDO_CUARTO(CfgBetTypeEventId.SEGUNDO_CUARTO.nameId()), PRIMER_SET(CfgBetTypeEventId.PRIMER_SET.nameId()), SEGUNDO_SET(CfgBetTypeEventId.SEGUNDO_SET.nameId()), TERCER_SET(CfgBetTypeEventId.TERCER_SET.nameId()), PARTIDO_COMPLETO_PRORROGA(CfgBetTypeEventId.PARTIDO_COMPLETO_PRORROGA.nameId()), PRIMERA_ENTRADA(CfgBetTypeEventId.PRIMERA_ENTRADA.nameId()), TERCER_CUARTO(CfgBetTypeEventId.TERCER_CUARTO.nameId()), CUARTO_CUARTO(CfgBetTypeEventId.CUARTO_CUARTO.nameId()); /** The events. */ private final String[] events; /** * Instantiates a new bet event bet click. * * @param pValue * the value */ BetEventWilliamHill(String... pValue) { this.events = pValue; } /** * Gets the events. * * @return the events {@inheritDoc} */ @Override public String[] getEvents() { return events; } /** * Gets the type by value. * * @param pValue * the value * @return the type by value */ public static IBetEvent getEventByValue(String pValue) { BetEventWilliamHill[] values = BetEventWilliamHill.values(); for (int i = 0; i < values.length; i++) { String[] types = values[i].getEvents(); for (int j = 1; j < types.length; j++) { if (pValue.contains(types[j])) { return values[i]; } } } return null; } /** * Gets the id. * * @return the id {@inheritDoc} */ @Override public String getId() { return events[0]; } }
[ "huguet10@gmail.com@7daf7316-15a6-36d4-e5e8-a3ca7c335dfd" ]
huguet10@gmail.com@7daf7316-15a6-36d4-e5e8-a3ca7c335dfd
2bf522c1c7f7e93a00315a9f5b4062993d4f6b3d
23de2c10f72a30ade795ac8d4d7923036c575de5
/src/com/google/android/gms/maps/model/GroundOverlayOptionsCreator.java
f84760bf643b62cfb89048edf9957f13567dfc86
[]
no_license
PARTHIBANMS/com.divmob.doodlebubble
a2c179ad9aa762668c69c0302bb17958e895148e
4718ee64c5edc9bcfc95861754ad9b876bd7fd5d
refs/heads/master
2020-06-04T22:30:50.560385
2014-07-17T10:39:23
2014-07-17T10:39:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,564
java
package com.google.android.gms.maps.model; import android.os.IBinder; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.a; import com.google.android.gms.common.internal.safeparcel.a.a; import com.google.android.gms.common.internal.safeparcel.b; public class GroundOverlayOptionsCreator implements Parcelable.Creator<GroundOverlayOptions> { public static final int CONTENT_DESCRIPTION; static void a(GroundOverlayOptions paramGroundOverlayOptions, Parcel paramParcel, int paramInt) { int i = b.p(paramParcel); b.c(paramParcel, 1, paramGroundOverlayOptions.getVersionCode()); b.a(paramParcel, 2, paramGroundOverlayOptions.he(), false); b.a(paramParcel, 3, paramGroundOverlayOptions.getLocation(), paramInt, false); b.a(paramParcel, 4, paramGroundOverlayOptions.getWidth()); b.a(paramParcel, 5, paramGroundOverlayOptions.getHeight()); b.a(paramParcel, 6, paramGroundOverlayOptions.getBounds(), paramInt, false); b.a(paramParcel, 7, paramGroundOverlayOptions.getBearing()); b.a(paramParcel, 8, paramGroundOverlayOptions.getZIndex()); b.a(paramParcel, 9, paramGroundOverlayOptions.isVisible()); b.a(paramParcel, 10, paramGroundOverlayOptions.getTransparency()); b.a(paramParcel, 11, paramGroundOverlayOptions.getAnchorU()); b.a(paramParcel, 12, paramGroundOverlayOptions.getAnchorV()); b.D(paramParcel, i); } public GroundOverlayOptions createFromParcel(Parcel paramParcel) { int i = a.o(paramParcel); int j = 0; IBinder localIBinder = null; LatLng localLatLng = null; float f1 = 0.0F; float f2 = 0.0F; LatLngBounds localLatLngBounds = null; float f3 = 0.0F; float f4 = 0.0F; boolean bool = false; float f5 = 0.0F; float f6 = 0.0F; float f7 = 0.0F; while (paramParcel.dataPosition() < i) { int k = a.n(paramParcel); switch (a.S(k)) { default: a.b(paramParcel, k); break; case 1: j = a.g(paramParcel, k); break; case 2: localIBinder = a.n(paramParcel, k); break; case 3: localLatLng = (LatLng)a.a(paramParcel, k, LatLng.CREATOR); break; case 4: f1 = a.j(paramParcel, k); break; case 5: f2 = a.j(paramParcel, k); break; case 6: localLatLngBounds = (LatLngBounds)a.a(paramParcel, k, LatLngBounds.CREATOR); break; case 7: f3 = a.j(paramParcel, k); break; case 8: f4 = a.j(paramParcel, k); break; case 9: bool = a.c(paramParcel, k); break; case 10: f5 = a.j(paramParcel, k); break; case 11: f6 = a.j(paramParcel, k); break; case 12: f7 = a.j(paramParcel, k); } } if (paramParcel.dataPosition() != i) { throw new a.a("Overread allowed size end=" + i, paramParcel); } return new GroundOverlayOptions(j, localIBinder, localLatLng, f1, f2, localLatLngBounds, f3, f4, bool, f5, f6, f7); } public GroundOverlayOptions[] newArray(int paramInt) { return new GroundOverlayOptions[paramInt]; } } /* Location: C:\Users\PARTHIBAN\Desktop\source\dex2jar-0.0.9.15\classes_dex2jar.jar * Qualified Name: com.google.android.gms.maps.model.GroundOverlayOptionsCreator * JD-Core Version: 0.7.0.1 */
[ "bsauniv30@BSAs-iMac-93.local" ]
bsauniv30@BSAs-iMac-93.local
1321c8cafa53c8086cb7c0375ee67e0360d289fc
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app81/source/com/tencent/stat/StatReportStrategy.java
aabf0590bf8cecb9e7e6a6820a928b7e7f48991d
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
888
java
package com.tencent.stat; public enum StatReportStrategy { int a; static { BATCH = new StatReportStrategy("BATCH", 2, 3); APP_LAUNCH = new StatReportStrategy("APP_LAUNCH", 3, 4); DEVELOPER = new StatReportStrategy("DEVELOPER", 4, 5); PERIOD = new StatReportStrategy("PERIOD", 5, 6); } private StatReportStrategy(int paramInt) { this.a = paramInt; } public static StatReportStrategy getStatReportStrategy(int paramInt) { StatReportStrategy[] arrayOfStatReportStrategy = values(); int j = arrayOfStatReportStrategy.length; int i = 0; while (i < j) { StatReportStrategy localStatReportStrategy = arrayOfStatReportStrategy[i]; if (paramInt == localStatReportStrategy.a()) { return localStatReportStrategy; } i += 1; } return null; } public int a() { return this.a; } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
232777033fde558a1658045b3abe3bdaa88c5bd4
9acd0cb19c1cf4485a1516eb04b9844c3600c879
/dada/sports-admin-new/src/main/java/com/youyisi/admin/infrastructure/utils/SportUtil.java
7ded2cd026cd013c90b3afc82a70c5fc917959e0
[]
no_license
kevinkerry/dada
e8156f0dc57d2745334bb13d1b9010bf64f97a21
ff6a8d0be3dbfc61ca72a2cac22b1cb57f80bce7
refs/heads/master
2021-04-26T23:54:10.877546
2017-02-21T05:36:07
2017-02-21T05:36:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,047
java
package com.youyisi.admin.infrastructure.utils; import java.util.Random; /** * Sport工具类 * * @author hetao * @date 2015年4月24日 下午4:47:45 * @version 1.0 * @parameter * @return */ public class SportUtil { public static void main(String[] args) { System.out.println(SportUtil.numberGenerate(1)); } /** * 生成用户编码 * * @param num * 位数 * @return Integer */ public static String numberGenerate(int num) { Random random = new Random(); StringBuilder str = new StringBuilder(); for (int i = 0; i < num; i++) { if (i == 0) { str.append((int) (Math.random() * 9) + 1); } else { str.append(random.nextInt(10)); } } return str.toString(); } /** * 获取手机验证码 * * @return String */ public static String getAuthCode() { return numberGenerate(6); } /** * 获取用户编码 * * @return String */ public static String getUserCode() { return numberGenerate(8); } }
[ "804745459@qq.com" ]
804745459@qq.com
fde1502339b1781b285d52bb9af953ef57bcf3e0
882e77219bce59ae57cbad7e9606507b34eebfcf
/mi2s_10_miui12/src/main/java/android/hardware/broadcastradio/V2_0/AmFmRegionConfig.java
df0de1ef0a451254c3e7e30c24e44f0f81fd71fe
[]
no_license
CrackerCat/XiaomiFramework
17a12c1752296fa1a52f61b83ecf165f328f4523
0b7952df317dac02ebd1feea7507afb789cef2e3
refs/heads/master
2022-06-12T03:30:33.285593
2020-05-06T11:30:54
2020-05-06T11:30:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,758
java
package android.hardware.broadcastradio.V2_0; import android.os.HidlSupport; import android.os.HwBlob; import android.os.HwParcel; import java.util.ArrayList; import java.util.Objects; public final class AmFmRegionConfig { public byte fmDeemphasis; public byte fmRds; public ArrayList<AmFmBandRange> ranges = new ArrayList<>(); public final boolean equals(Object otherObject) { if (this == otherObject) { return true; } if (otherObject == null || otherObject.getClass() != AmFmRegionConfig.class) { return false; } AmFmRegionConfig other = (AmFmRegionConfig) otherObject; if (HidlSupport.deepEquals(this.ranges, other.ranges) && HidlSupport.deepEquals(Byte.valueOf(this.fmDeemphasis), Byte.valueOf(other.fmDeemphasis)) && HidlSupport.deepEquals(Byte.valueOf(this.fmRds), Byte.valueOf(other.fmRds))) { return true; } return false; } public final int hashCode() { return Objects.hash(new Object[]{Integer.valueOf(HidlSupport.deepHashCode(this.ranges)), Integer.valueOf(HidlSupport.deepHashCode(Byte.valueOf(this.fmDeemphasis))), Integer.valueOf(HidlSupport.deepHashCode(Byte.valueOf(this.fmRds)))}); } public final String toString() { return "{" + ".ranges = " + this.ranges + ", .fmDeemphasis = " + Deemphasis.dumpBitfield(this.fmDeemphasis) + ", .fmRds = " + Rds.dumpBitfield(this.fmRds) + "}"; } public final void readFromParcel(HwParcel parcel) { readEmbeddedFromParcel(parcel, parcel.readBuffer(24), 0); } public static final ArrayList<AmFmRegionConfig> readVectorFromParcel(HwParcel parcel) { ArrayList<AmFmRegionConfig> _hidl_vec = new ArrayList<>(); HwBlob _hidl_blob = parcel.readBuffer(16); int _hidl_vec_size = _hidl_blob.getInt32(8); HwBlob childBlob = parcel.readEmbeddedBuffer((long) (_hidl_vec_size * 24), _hidl_blob.handle(), 0, true); _hidl_vec.clear(); for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) { AmFmRegionConfig _hidl_vec_element = new AmFmRegionConfig(); _hidl_vec_element.readEmbeddedFromParcel(parcel, childBlob, (long) (_hidl_index_0 * 24)); _hidl_vec.add(_hidl_vec_element); } return _hidl_vec; } public final void readEmbeddedFromParcel(HwParcel parcel, HwBlob _hidl_blob, long _hidl_offset) { HwBlob hwBlob = _hidl_blob; int _hidl_vec_size = hwBlob.getInt32(_hidl_offset + 0 + 8); HwBlob childBlob = parcel.readEmbeddedBuffer((long) (_hidl_vec_size * 16), _hidl_blob.handle(), _hidl_offset + 0 + 0, true); this.ranges.clear(); for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) { AmFmBandRange _hidl_vec_element = new AmFmBandRange(); HwParcel hwParcel = parcel; _hidl_vec_element.readEmbeddedFromParcel(parcel, childBlob, (long) (_hidl_index_0 * 16)); this.ranges.add(_hidl_vec_element); } HwParcel hwParcel2 = parcel; this.fmDeemphasis = hwBlob.getInt8(_hidl_offset + 16); this.fmRds = hwBlob.getInt8(_hidl_offset + 17); } public final void writeToParcel(HwParcel parcel) { HwBlob _hidl_blob = new HwBlob(24); writeEmbeddedToBlob(_hidl_blob, 0); parcel.writeBuffer(_hidl_blob); } public static final void writeVectorToParcel(HwParcel parcel, ArrayList<AmFmRegionConfig> _hidl_vec) { HwBlob _hidl_blob = new HwBlob(16); int _hidl_vec_size = _hidl_vec.size(); _hidl_blob.putInt32(8, _hidl_vec_size); _hidl_blob.putBool(12, false); HwBlob childBlob = new HwBlob(_hidl_vec_size * 24); for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) { _hidl_vec.get(_hidl_index_0).writeEmbeddedToBlob(childBlob, (long) (_hidl_index_0 * 24)); } _hidl_blob.putBlob(0, childBlob); parcel.writeBuffer(_hidl_blob); } public final void writeEmbeddedToBlob(HwBlob _hidl_blob, long _hidl_offset) { int _hidl_vec_size = this.ranges.size(); _hidl_blob.putInt32(_hidl_offset + 0 + 8, _hidl_vec_size); _hidl_blob.putBool(_hidl_offset + 0 + 12, false); HwBlob childBlob = new HwBlob(_hidl_vec_size * 16); for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) { this.ranges.get(_hidl_index_0).writeEmbeddedToBlob(childBlob, (long) (_hidl_index_0 * 16)); } _hidl_blob.putBlob(_hidl_offset + 0 + 0, childBlob); _hidl_blob.putInt8(16 + _hidl_offset, this.fmDeemphasis); _hidl_blob.putInt8(17 + _hidl_offset, this.fmRds); } }
[ "sanbo.xyz@gmail.com" ]
sanbo.xyz@gmail.com
5cbe06ccb752098394ad59dc7897fbcaf6a37bbe
bf4122f5ae3a9f9b9c2cc94ef87cdb9dcadc9dc9
/Transfer/My Study/TYSS_JAVA/src/com/tyss/collectionframework/set/Car.java
262029a9c768d2b192603c68abd5878dcf9d7eb9
[]
no_license
haren7474/TY_ELF_JFS_HarendraKumar
7ef8b9a0bb6d6bdddb94b88ab2db4e0aef0fbc1d
f99ef30b40d0877167c8159e8b7f322af7cc87b9
refs/heads/master
2023-01-11T01:01:10.458037
2020-01-23T18:20:20
2020-01-23T18:20:20
225,845,989
0
0
null
2023-01-07T22:01:21
2019-12-04T11:00:37
HTML
UTF-8
Java
false
false
497
java
package com.tyss.collectionframework.set; public class Car implements Comparable<Car> { String brand; double price; public Car(String brand, double price) { this.brand = brand; this.price = price; } @Override public String toString() { return "Car [brand=" + brand + ", price=" + price + "]"; } @Override public int compareTo(Car c) { if(this.price > c.price) { return 1; } else if(this.price < c.price) { return -1; } else { return 0; } } }
[ "harendra10104698@gmail.com" ]
harendra10104698@gmail.com
bf2f1daf4b3a9389c7b3b2b2d9752b0213537ce5
98e654e97b71a7d937dd512073fc1d05170a1a7d
/week_06/day_3/homework/src/test/java/HandTest.java
dc8ae29eba65754109aca214252599fa212dbce4
[]
no_license
edostler/codeclan_classwork
bfd980cc32e4ab649d392d0e9dc54189b9eded1f
6486a5b981e7d8f6d45f14462dad74298ae75758
refs/heads/master
2020-03-17T19:34:17.058501
2018-05-17T21:11:11
2018-05-17T21:11:11
133,868,880
0
0
null
null
null
null
UTF-8
Java
false
false
999
java
import org.junit.Before; import org.junit.Test; import java.util.ArrayList; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; public class HandTest { private Hand hand; private Card card1; private Card card2; @Before public void before() { hand = new Hand(); card1 = new Card(SuitType.HEARTS, RankType.QUEEN); card2 = new Card(SuitType.CLUBS, RankType.SEVEN); } @Test public void canGetHandSize() { assertEquals(0, hand.getHandSize()); } @Test public void canAddCardToHand() { assertEquals(0, hand.getHandSize()); hand.addCardToHand(card1); ArrayList<Card> result = hand.getHand(); assertEquals(1, hand.getHandSize()); assertTrue(result.contains(card1)); } @Test public void canCalculateTotal() { hand.addCardToHand(card1); hand.addCardToHand(card2); assertEquals(17, hand.calculateTotal()); } }
[ "edward.o@simul8.com" ]
edward.o@simul8.com
c89ca268829a42a742dc9e8164769d2c88cf565b
801da0f540a9a2bdf74db83d42d31f74502cd898
/src/core/lombok/core/handlers/EntrypointHandler.java
d3b79e6d5517f271e37c4b5126ef1c2c0277671f
[ "MIT", "Apache-2.0" ]
permissive
aliz-ai/lombok-ds
c24efcd4222fc997c5b22e0e6015ca6ea59f2c1c
5641c052e89d061ca6b6f6dc6754c17bb50a94bd
refs/heads/master
2021-05-27T04:39:13.966548
2014-02-05T12:03:53
2014-02-05T12:03:53
9,933,410
0
0
null
null
null
null
UTF-8
Java
false
false
4,232
java
/* * Copyright © 2011-2012 Philipp Eichhorn * * 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 lombok.core.handlers; import static lombok.ast.AST.*; import java.lang.instrument.Instrumentation; import java.util.ArrayList; import java.util.List; import lombok.ast.*; public final class EntrypointHandler<TYPE_TYPE extends IType<METHOD_TYPE, ?, ?, ?, ?, ?>, METHOD_TYPE extends IMethod<TYPE_TYPE, ?, ?, ?>> { /** * Checks if there is an entry point with the provided name. * * @param methodName * the entry point name to check for. * @param node * Any node that represents the Type to look in, or any child node thereof. */ public boolean entrypointExists(final String methodName, final TYPE_TYPE type) { for (METHOD_TYPE method : type.methods()) { if (method.isStatic() && method.returns("void") && method.name().equals(methodName)) { return true; } } return false; } /** * Creates an entrypoint like this: * * <pre> * public static void &lt;NAME&gt;(&lt;PARAMETER&gt;) throws java.lang.Throwable { * new &lt;TYPENAME&gt;().&lt;METHODNAME&gt;(&lt;ARGUMENTS&gt;); * } * </pre> * * @param type * Type * @param name * name of the entrypoint ("main", "premain, "agentmain") * @param methodName * name of method that should be called in the entrypoint * @param paramProvider * parameter provider used for the entrypoint * @param argsProvider * argument provider used for the constructor */ public void createEntrypoint(final TYPE_TYPE type, final String name, final String methodName, final Parameters params, final Arguments args) { if (entrypointExists(name, type)) { return; } type.editor().injectMethod(MethodDecl(Type("void"), name).makePublic().makeStatic().withArguments(params.get(name)).withThrownException(Type("java.lang.Throwable")) // .withStatement(Call(New(Type(type.name())), methodName).withArguments(args.get(name)))); } public enum Arguments { APPLICATION { @Override public List<Expression<?>> get(final String name) { List<Expression<?>> args = new ArrayList<Expression<?>>(); args.add(Name("args")); return args; } }, JVM_AGENT { @Override public List<Expression<?>> get(final String name) { List<Expression<?>> args = new ArrayList<Expression<?>>(); args.add(("agentmain".equals(name) ? True() : False())); args.add(Name("params")); args.add(Name("instrumentation")); return args; } }; public abstract List<Expression<?>> get(String name); } public enum Parameters { APPLICATION { @Override public List<Argument> get(final String name) { List<Argument> params = new ArrayList<Argument>(); params.add(Arg(Type(String.class).withDimensions(1), "args")); return params; } }, JVM_AGENT { @Override public List<Argument> get(final String name) { List<Argument> params = new ArrayList<Argument>(); params.add(Arg(Type(String.class), "params")); params.add(Arg(Type(Instrumentation.class), "instrumentation")); return params; } }; public abstract List<Argument> get(String name); } }
[ "peichhor@web.de" ]
peichhor@web.de
daa14c8a588b2dcca83b6d305fe90450a605695d
3f1c4a0a3841dfaada1c4bc821b4b3f430d7f73b
/Melange/org.sample.melangeproject.capellawithmass/src/org/sample/melangeproject/capellawithmass/pa/LogicalInterfaceRealization.java
40edf5d59f0013d0d5edc3a40c05a5fa33de1355
[]
no_license
fcoulon/experimental
b1aaa8c9c96a151c3f8bf88fc1e1e6661f081c11
c5c40570d29d252fe8d583687afc4a9972baf3fb
refs/heads/master
2020-12-31T07:18:43.836822
2016-05-18T14:01:45
2016-05-18T14:01:45
59,024,747
0
0
null
null
null
null
UTF-8
Java
false
false
1,165
java
/** */ package org.sample.melangeproject.capellawithmass.pa; import org.sample.melangeproject.capellawithmass.cs.InterfaceAllocation; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Logical Interface Realization</b></em>'. * <!-- end-user-doc --> * * * @see org.sample.melangeproject.capellawithmass.pa.PaPackage#getLogicalInterfaceRealization() * @model annotation="http://www.polarsys.org/kitalpha/ecore/documentation description='mediator class supporting the implementation of the allocation link between a physical interface, and the logical interface(s) that it realizes\r\n[source: Capella study]' usage\040guideline='n/a' used\040in\040levels='physical' usage\040examples='n/a' constraints='none' comment/notes='none' reference\040documentation='none'" * annotation="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping UML/SysML\040semantic\040equivalences='' base\040metaclass\040in\040UML/SysML\040profile\040='uml::InterfaceRealization' explanation='none' constraints='none'" * @generated */ public interface LogicalInterfaceRealization extends InterfaceAllocation { } // LogicalInterfaceRealization
[ "fabien.coulon@inria.fr" ]
fabien.coulon@inria.fr
c50cab20377531059a1f7d22000c578de3923e85
e425c13a0e62ede731b19e432471c0821b1dd098
/ca/src/public/nc/uap/lfw/ca/jdt/internal/compiler/ast/ThisReference.java
1585c4ccdb0daf67d4e44dafe43c8a27b6801550
[]
no_license
thimda/rsd_web
42c6ee54fcdd2fc699b74a1a48af2424fb5fd751
8c32851118eb98de1df2f0889a693258f10eab11
refs/heads/master
2020-05-17T18:58:22.839246
2012-04-01T22:24:41
2012-04-01T22:24:41
3,823,167
3
1
null
null
null
null
UTF-8
Java
false
false
4,220
java
/******************************************************************************* * Copyright (c) 2000, 2006 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: * IBM Corporation - initial API and implementation *******************************************************************************/ package nc.uap.lfw.ca.jdt.internal.compiler.ast; import nc.uap.lfw.ca.jdt.internal.compiler.ASTVisitor; import nc.uap.lfw.ca.jdt.internal.compiler.ast.Assignment; import nc.uap.lfw.ca.jdt.internal.compiler.ast.CompoundAssignment; import nc.uap.lfw.ca.jdt.internal.compiler.ast.Expression; import nc.uap.lfw.ca.jdt.internal.compiler.ast.Reference; import nc.uap.lfw.ca.jdt.internal.compiler.ast.ThisReference; import nc.uap.lfw.ca.jdt.internal.compiler.codegen.*; import nc.uap.lfw.ca.jdt.internal.compiler.flow.FlowContext; import nc.uap.lfw.ca.jdt.internal.compiler.flow.FlowInfo; import nc.uap.lfw.ca.jdt.internal.compiler.impl.Constant; import nc.uap.lfw.ca.jdt.internal.compiler.lookup.*; public class ThisReference extends Reference { public static ThisReference implicitThis(){ ThisReference implicitThis = new ThisReference(0, 0); implicitThis.bits |= IsImplicitThis; return implicitThis; } public ThisReference(int sourceStart, int sourceEnd) { this.sourceStart = sourceStart; this.sourceEnd = sourceEnd; } /* * @see Reference#analyseAssignment(...) */ public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound) { return flowInfo; // this cannot be assigned } public boolean checkAccess(MethodScope methodScope) { // this/super cannot be used in constructor call if (methodScope.isConstructorCall) { methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this); return false; } // static may not refer to this/super if (methodScope.isStatic) { methodScope.problemReporter().errorThisSuperInStatic(this); return false; } return true; } /* * @see Reference#generateAssignment(...) */ public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) { // this cannot be assigned } public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) { // // int pc = codeStream.position; // if (valueRequired) // codeStream.aload_0(); // if ((this.bits & IsImplicitThis) == 0) codeStream.recordPositionsFrom(pc, this.sourceStart); } /* * @see Reference#generateCompoundAssignment(...) */ public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired) { // this cannot be assigned } /* * @see eclipse.jdt.internal.compiler.ast.Reference#generatePostIncrement() */ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired) { // this cannot be assigned } public boolean isImplicitThis() { return (this.bits & IsImplicitThis) != 0; } public boolean isThis() { return true ; } public int nullStatus(FlowInfo flowInfo) { return FlowInfo.NON_NULL; } public StringBuffer printExpression(int indent, StringBuffer output){ if (this.isImplicitThis()) return output; return output.append("this"); //$NON-NLS-1$ } public TypeBinding resolveType(BlockScope scope) { constant = Constant.NotAConstant; if (!this.isImplicitThis() &&!checkAccess(scope.methodScope())) { return null; } return this.resolvedType = scope.enclosingReceiverType(); } public void traverse(ASTVisitor visitor, BlockScope blockScope) { visitor.visit(this, blockScope); visitor.endVisit(this, blockScope); } public void traverse(ASTVisitor visitor, ClassScope blockScope) { visitor.visit(this, blockScope); visitor.endVisit(this, blockScope); } }
[ "devin_2012@163.com" ]
devin_2012@163.com
d8de3147a629c4663a7719baea8d7e2575560708
3bc62f2a6d32df436e99507fa315938bc16652b1
/struts/src/main/java/com/intellij/struts/inplace/reference/ReferenceProviderUtils.java
9efe897fab1db8c8e052996db183b3db1cc70678
[ "Apache-2.0" ]
permissive
JetBrains/intellij-obsolete-plugins
7abf3f10603e7fe42b9982b49171de839870e535
3e388a1f9ae5195dc538df0d3008841c61f11aef
refs/heads/master
2023-09-04T05:22:46.470136
2023-06-11T16:42:37
2023-06-11T16:42:37
184,035,533
19
29
Apache-2.0
2023-07-30T14:23:05
2019-04-29T08:54:54
Java
UTF-8
Java
false
false
5,707
java
/* * Copyright 2000-2019 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.struts.inplace.reference; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiReference; import com.intellij.psi.PsiReferenceProvider; import com.intellij.psi.PsiReferenceRegistrar; import com.intellij.psi.filters.*; import com.intellij.psi.filters.position.NamespaceFilter; import com.intellij.psi.filters.position.ParentElementFilter; import com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider; import com.intellij.util.ProcessingContext; import com.intellij.xml.util.XmlUtil; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; /** * Utility methods for installing ReferenceProviders in XML context. * * @author Dmitry Avdeev */ public final class ReferenceProviderUtils { public final static ElementFilter TAG_CLASS_FILTER = XmlTagFilter.INSTANCE; /** * Register the given provider on the given XmlAttribute(s)/Namespace/XmlTag combination. * * @param psiReferenceRegistrar Registrar instance. * @param provider Provider to install. * @param tagName Tag name. * @param namespaceFilter Namespace for tag. * @param attributeNames Attribute name(s). */ public static void registerAttributes(final PsiReferenceRegistrar psiReferenceRegistrar, final PsiReferenceProvider provider, final @NonNls String tagName, final NamespaceFilter namespaceFilter, final @NonNls String... attributeNames) { XmlUtil.registerXmlAttributeValueReferenceProvider(psiReferenceRegistrar, attributeNames, andTagNames(namespaceFilter, tagName), provider); } /** * Register the given provider on the given XmlAttribute/Namespace/XmlTag(s) combination. * * @param psiReferenceRegistrar Registrar instance. * @param provider Provider to install. * @param attributeName Attribute name. * @param namespaceFilter Namespace for tag(s). * @param tagNames Tag name(s). */ public static void registerTags(final PsiReferenceRegistrar psiReferenceRegistrar, final PsiReferenceProvider provider, final @NonNls String attributeName, final NamespaceFilter namespaceFilter, final @NonNls String... tagNames) { XmlUtil.registerXmlAttributeValueReferenceProvider(psiReferenceRegistrar, new String[]{attributeName}, andTagNames(namespaceFilter, tagNames), provider); } /** * Registers a class provider with no restrictions on the given XmlAttribute/Namespace/XmlTag combination. * * @param psiReferenceRegistrar Registrar instance. * @param namespaceFilter Namespace for tag. * @param tagName Tag name. * @param attributeName Attribute name. */ public static void registerSubclass(final PsiReferenceRegistrar psiReferenceRegistrar, final NamespaceFilter namespaceFilter, final @NonNls String tagName, final @NonNls String attributeName) { registerTags(psiReferenceRegistrar, new PsiReferenceProvider() { @NotNull @Override public PsiReference[] getReferencesByElement(@NotNull final PsiElement psiElement, @NotNull final ProcessingContext processingContext) { final JavaClassReferenceProvider provider = new JavaClassReferenceProvider(); return provider.getReferencesByElement(psiElement, processingContext); } }, attributeName, namespaceFilter, tagName); } /** * Registers a class provider allowing only the given subclass(es) on the given XmlAttribute/Namespace/XmlTag combination. * * @param psiReferenceRegistrar Registrar instance. * @param namespaceFilter Namespace for tag. * @param tagName Tag name. * @param attributeName Attribute name. * @param classes Sub-class(es) to allow. */ public static void registerSubclass(final PsiReferenceRegistrar psiReferenceRegistrar, final NamespaceFilter namespaceFilter, final @NonNls String tagName, final @NonNls String attributeName, final @NonNls String... classes) { registerTags(psiReferenceRegistrar, new PsiReferenceProvider() { @NotNull @Override public PsiReference[] getReferencesByElement(@NotNull final PsiElement psiElement, @NotNull final ProcessingContext processingContext) { final JavaClassReferenceProvider provider = new JavaClassReferenceProvider(); provider.setOption(JavaClassReferenceProvider.EXTEND_CLASS_NAMES, classes); provider.setOption(JavaClassReferenceProvider.INSTANTIATABLE, Boolean.TRUE); return provider.getReferencesByElement(psiElement, processingContext); } }, attributeName, namespaceFilter, tagName); } private static ScopeFilter andTagNames(final ElementFilter namespace, final String... tagNames) { return new ScopeFilter(new ParentElementFilter(new AndFilter(namespace, TAG_CLASS_FILTER, new TextFilter(tagNames)), 2)); } }
[ "yole@jetbrains.com" ]
yole@jetbrains.com
b450dad66ca5336d42256c3456608f3dfe96de9f
12be2d3e318a5a4f7cebf95a366556c434ff379e
/phoss-smp-backend/src/main/java/com/helger/phoss/smp/domain/serviceinfo/SMPEndpointMicroTypeConverter.java
5596df64faa457f63b6e1bbf65872b978f99d8b7
[]
no_license
vcgato29/phoss-smp
095e29a6d133a65bf110dd1a45bbc927053d39ed
e0684b16892825b41a1e4f28c2671131444ad6ca
refs/heads/master
2020-06-17T06:53:10.648209
2019-07-03T19:37:47
2019-07-03T19:37:47
195,836,728
1
0
null
2019-07-08T15:08:57
2019-07-08T15:08:57
null
UTF-8
Java
false
false
6,060
java
/** * Copyright (C) 2015-2019 Philip Helger and contributors * philip[at]helger[dot]com * * The Original Code is Copyright The PEPPOL project (http://www.peppol.eu) * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package com.helger.phoss.smp.domain.serviceinfo; import java.time.LocalDateTime; import javax.annotation.Nonnull; import javax.annotation.Nullable; import com.helger.commons.annotation.Nonempty; import com.helger.commons.string.StringParser; import com.helger.xml.microdom.IMicroElement; import com.helger.xml.microdom.MicroElement; import com.helger.xml.microdom.convert.IMicroTypeConverter; import com.helger.xml.microdom.util.MicroHelper; /** * This class is internally used to convert {@link SMPEndpoint} from and to XML. * * @author Philip Helger */ public final class SMPEndpointMicroTypeConverter implements IMicroTypeConverter <SMPEndpoint> { private static final String ATTR_TRANSPORT_PROFILE = "transportprofile"; private static final String ATTR_ENDPOINT_REFERENCE = "endpointref"; private static final String ATTR_REQUIRE_BUSINESS_LEVEL_SIGNATURE = "reqblsig"; private static final String ATTR_MINIMUM_AUTHENTICATION_LEVEL = "minauthlevel"; private static final String ATTR_SERVICE_ACTIVATION_DATE = "activation"; private static final String ATTR_SERVICE_EXPIRATION_DATE = "expiration"; private static final String ELEMENT_CERTIFICATE = "certificate"; private static final String ELEMENT_SERVICE_DESCRIPTION = "svcdescription"; private static final String ATTR_TECHNICAL_CONTACT_URL = "techcontacturl"; private static final String ATTR_TECHNICAL_INFORMATION_URL = "techinfourl"; private static final String ELEMENT_EXTENSION = "extension"; @Nonnull public IMicroElement convertToMicroElement (@Nonnull final SMPEndpoint aValue, @Nullable final String sNamespaceURI, @Nonnull @Nonempty final String sTagName) { final IMicroElement aElement = new MicroElement (sNamespaceURI, sTagName); aElement.setAttribute (ATTR_TRANSPORT_PROFILE, aValue.getTransportProfile ()); if (aValue.hasEndpointReference ()) aElement.setAttribute (ATTR_ENDPOINT_REFERENCE, aValue.getEndpointReference ()); aElement.setAttribute (ATTR_REQUIRE_BUSINESS_LEVEL_SIGNATURE, aValue.isRequireBusinessLevelSignature ()); if (aValue.hasMinimumAuthenticationLevel ()) aElement.setAttribute (ATTR_MINIMUM_AUTHENTICATION_LEVEL, aValue.getMinimumAuthenticationLevel ()); if (aValue.hasServiceExpirationDateTime ()) aElement.setAttributeWithConversion (ATTR_SERVICE_ACTIVATION_DATE, aValue.getServiceActivationDateTime ()); if (aValue.hasServiceExpirationDateTime ()) aElement.setAttributeWithConversion (ATTR_SERVICE_EXPIRATION_DATE, aValue.getServiceExpirationDateTime ()); if (aValue.hasCertificate ()) aElement.appendElement (sNamespaceURI, ELEMENT_CERTIFICATE).appendText (aValue.getCertificate ()); if (aValue.hasServiceDescription ()) aElement.appendElement (sNamespaceURI, ELEMENT_SERVICE_DESCRIPTION).appendText (aValue.getServiceDescription ()); if (aValue.hasTechnicalContactUrl ()) aElement.setAttribute (ATTR_TECHNICAL_CONTACT_URL, aValue.getTechnicalContactUrl ()); if (aValue.hasTechnicalInformationUrl ()) aElement.setAttribute (ATTR_TECHNICAL_INFORMATION_URL, aValue.getTechnicalInformationUrl ()); if (aValue.extensions ().isNotEmpty ()) aElement.appendElement (sNamespaceURI, ELEMENT_EXTENSION).appendText (aValue.getExtensionsAsString ()); return aElement; } @Nonnull public SMPEndpoint convertToNative (@Nonnull final IMicroElement aElement) { final String sTransportProfile = aElement.getAttributeValue (ATTR_TRANSPORT_PROFILE); final String sEndpointReference = aElement.getAttributeValue (ATTR_ENDPOINT_REFERENCE); final String sRequireBusinessLevelSignature = aElement.getAttributeValue (ATTR_REQUIRE_BUSINESS_LEVEL_SIGNATURE); final boolean bRequireBusinessLevelSignature = StringParser.parseBool (sRequireBusinessLevelSignature, SMPEndpoint.DEFAULT_REQUIRES_BUSINESS_LEVEL_SIGNATURE); final String sMinimumAuthenticationLevel = aElement.getAttributeValue (ATTR_MINIMUM_AUTHENTICATION_LEVEL); final LocalDateTime aServiceActivationDate = aElement.getAttributeValueWithConversion (ATTR_SERVICE_ACTIVATION_DATE, LocalDateTime.class); final LocalDateTime aServiceExpirationDate = aElement.getAttributeValueWithConversion (ATTR_SERVICE_EXPIRATION_DATE, LocalDateTime.class); final String sCertificate = MicroHelper.getChildTextContentTrimmed (aElement, ELEMENT_CERTIFICATE); final String sServiceDescription = MicroHelper.getChildTextContentTrimmed (aElement, ELEMENT_SERVICE_DESCRIPTION); final String sTechnicalContactUrl = aElement.getAttributeValue (ATTR_TECHNICAL_CONTACT_URL); final String sTechnicalInformationUrl = aElement.getAttributeValue (ATTR_TECHNICAL_INFORMATION_URL); final String sExtension = MicroHelper.getChildTextContentTrimmed (aElement, ELEMENT_EXTENSION); return new SMPEndpoint (sTransportProfile, sEndpointReference, bRequireBusinessLevelSignature, sMinimumAuthenticationLevel, aServiceActivationDate, aServiceExpirationDate, sCertificate, sServiceDescription, sTechnicalContactUrl, sTechnicalInformationUrl, sExtension); } }
[ "philip@helger.com" ]
philip@helger.com
dadfe21565ad53ecb6adb1d6594b6ff18903f5c0
96670d2b28a3fb75d2f8258f31fc23d370af8a03
/reverse_engineered/sources/cn/jpush/android/api/PushNotificationBuilder.java
533fa8b489b6b29aaa4b6aeccde6e00c44c7f070
[]
no_license
P79N6A/speedx
81a25b63e4f98948e7de2e4254390cab5612dcbd
800b6158c7494b03f5c477a8cf2234139889578b
refs/heads/master
2020-05-30T18:43:52.613448
2019-06-02T07:57:10
2019-06-02T08:15:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
270
java
package cn.jpush.android.api; import android.app.Notification; import java.util.Map; public interface PushNotificationBuilder { /* renamed from: a */ Notification mo2195a(String str, Map<String, String> map); /* renamed from: a */ String mo2196a(); }
[ "Gith1974" ]
Gith1974
a34aa15914270915ae1a1dbd9e795daa534fb2c6
51be682f7a57732aedc3cf3c2f3778c9bf9c6955
/smt-waiting-test/smt-waiting-aspect-compile-time/smt-waiting-aspect-compile-time-test/src/test/java/shiver/me/timbers/waiting/ITCompileTimeAspectWaiterTimeoutPropertyMethod.java
8982d0dab43054ac83e9e771352d8c66e1b38669
[ "Apache-2.0" ]
permissive
shiver-me-timbers/smt-waiting-parent
3b9537ef94722e52f711f87d46a003cbeb93aaac
91bfce941fca6ecbe44fe1da30375a4fc94403cb
refs/heads/main
2023-08-04T12:47:10.114318
2023-07-23T05:33:31
2023-07-23T05:33:31
40,812,781
1
0
null
null
null
null
UTF-8
Java
false
false
503
java
package shiver.me.timbers.waiting; import org.junit.Rule; import shiver.me.timbers.waiting.property.SystemPropertyManager; import shiver.me.timbers.waiting.test.WaitingPropertyRule; public class ITCompileTimeAspectWaiterTimeoutPropertyMethod extends AbstractITAspectWaiterTimeoutPropertyMethod { @Rule public WaitingPropertyRule properties = new WaitingPropertyRule(new SystemPropertyManager()); @Override public WaitingPropertyRule properties() { return properties; } }
[ "karl.bennett.smt@gmail.com" ]
karl.bennett.smt@gmail.com
7c7794237c0855e6611a12f8f4c6aaadfd8a6108
b25656a86ef7cff8ad668ea38430429b591cd4af
/app/src/main/java/org/chzz/demo/view/activity/AdapterActivity.java
7eab3fc47f8a77ed8aedce0affd0ca43e2fe33d5
[]
no_license
xiaoxinxing12/ChzzUI2.0-Android
4cef566dc819d19f398443481fbd32c26acd963c
05d69afe846049b48a759e03d7ef3bcda3bf5114
refs/heads/master
2021-01-11T10:11:39.343732
2016-11-19T09:35:13
2016-11-19T09:35:13
72,424,732
0
0
null
null
null
null
UTF-8
Java
false
false
3,059
java
package org.chzz.demo.view.activity; import android.os.Bundle; import android.support.design.widget.CoordinatorLayout; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.widget.Toolbar; import org.chzz.demo.R; import org.chzz.demo.view.fragment.GridViewDemoFragment; import org.chzz.demo.view.fragment.ListChatDemoFragment; import org.chzz.demo.view.fragment.ListIndexViewDemoFragment; import org.chzz.demo.view.fragment.ListViewDemoFragment; import org.chzz.demo.view.fragment.RecyclerChatDemoFragment; import org.chzz.demo.view.fragment.RecyclerIndexDemoFragment; import org.chzz.demo.view.fragment.RecyclerViewDemoFragment; import org.chzz.demo.util.SnackbarUtil; /** * 作者:copy 邮件:2499551993@qq.com * 创建时间:15/5/28 10:23 * 描述: */ public class AdapterActivity extends BaseActivity { private Class[] mFragmentClasses = new Class[]{GridViewDemoFragment.class, ListViewDemoFragment.class, RecyclerViewDemoFragment.class, ListChatDemoFragment.class, RecyclerChatDemoFragment.class, ListIndexViewDemoFragment.class, RecyclerIndexDemoFragment.class}; private CoordinatorLayout mCoordinatorLayout; @Override protected void initView(Bundle savedInstanceState) { setContentView(R.layout.activity_adapter); setSupportActionBar((Toolbar) findViewById(R.id.toolbar)); getSupportActionBar().setIcon(R.mipmap.logo); mCoordinatorLayout = (CoordinatorLayout) findViewById(R.id.coordinatorLayout); TabLayout tabLayout = (TabLayout) findViewById(R.id.tabLayout); ViewPager viewPager = (ViewPager) findViewById(R.id.viewPager); ContentPagerAdapter contentPagerAdapter = new ContentPagerAdapter(getSupportFragmentManager()); viewPager.setAdapter(contentPagerAdapter); viewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout)); tabLayout.setTabsFromPagerAdapter(contentPagerAdapter); tabLayout.setupWithViewPager(viewPager); } @Override protected void setListener() { } @Override protected void processLogic(Bundle savedInstanceState) { } public void showSnackbar(String msg) { SnackbarUtil.show(mCoordinatorLayout, msg); } private class ContentPagerAdapter extends FragmentStatePagerAdapter { public ContentPagerAdapter(FragmentManager fm) { super(fm); } @Override public Fragment getItem(int position) { return Fragment.instantiate(AdapterActivity.this, mFragmentClasses[position].getName()); } @Override public int getCount() { return mFragmentClasses.length; } @Override public CharSequence getPageTitle(int position) { return mFragmentClasses[position].getSimpleName().replace("Fragment", ""); } } }
[ "xiaoxinxing12@qq.com" ]
xiaoxinxing12@qq.com
cca7155c949314195fe6b9093bf6f5913df4a7fc
e5a2cac793f19c42e73a1a68227d960e85f35d91
/src/no/njm/example/Foo.java
8e07ec29d7d4aee7227f09ba28c68fcad80eaa77
[]
no_license
nitinkumargupta07/CoreJava8
a368bfbb155e822aea3857e0ad3bbdcc79a6c388
8234ad013c3e0abea5e58cb0c0511de2dc166b2c
refs/heads/master
2020-04-03T07:38:27.392660
2018-12-17T18:45:03
2018-12-17T18:45:03
155,108,809
0
0
null
null
null
null
UTF-8
Java
false
false
219
java
package no.njm.example; import java.util.ArrayList; import java.util.List; class Foo { String name; List<Bar> bars = new ArrayList<>(); Foo(String name) { this.name = name; } }
[ "nitinguptamca@gmail.com" ]
nitinguptamca@gmail.com
d5f9312b4d313942be6169b75acf08025e13ae89
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-61b-3-24-MOEAD-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/distribution/PoissonDistributionImpl_ESTest.java
2d42d4137b337cb2deed20a46bf3d822cf8a423e
[]
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
888
java
/* * This file was automatically generated by EvoSuite * Wed Apr 08 09:57:27 UTC 2020 */ package org.apache.commons.math.distribution; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.apache.commons.math.distribution.PoissonDistributionImpl; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class PoissonDistributionImpl_ESTest extends PoissonDistributionImpl_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { PoissonDistributionImpl poissonDistributionImpl0 = new PoissonDistributionImpl(870.33698); PoissonDistributionImpl poissonDistributionImpl1 = new PoissonDistributionImpl((-156.7127973)); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
87ad44853b31ff42e9926c9cd6d1bf89650cba11
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/a85093bed28a40f9a9769205e45a7908c8a4b519/before/TypePresentationServiceImpl.java
25a01293a483e724274a188ed87eecae5a11bb92
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
6,907
java
/* * Copyright 2000-2011 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.intellij.ide; import com.intellij.ide.presentation.*; import com.intellij.openapi.extensions.Extensions; import com.intellij.openapi.util.IconLoader; import com.intellij.openapi.util.NullableLazyValue; import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.containers.ConcurrentFactoryMap; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.containers.FactoryMap; import org.jetbrains.annotations.Nullable; import javax.swing.*; import java.util.HashMap; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; /** * @author peter */ public class TypePresentationServiceImpl extends TypePresentationService { @Override public Icon getIcon(Object o) { return getIcon(o.getClass(), o); } @Override@Nullable public Icon getTypeIcon(Class type) { return getIcon(type, null); } private Icon getIcon(Class type, Object o) { Set<PresentationTemplate> templates = mySuperClasses.get(type); for (PresentationTemplate template : templates) { Icon icon = template.getIcon(o, 0); if (icon != null) return icon; } return null; } @Override@Nullable public String getTypePresentableName(Class type) { Set<PresentationTemplate> templates = mySuperClasses.get(type); for (PresentationTemplate template : templates) { String typeName = template.getTypeName(); if (typeName != null) return typeName; } return null; } public TypePresentationServiceImpl() { for(TypeIconEP ep: Extensions.getExtensions(TypeIconEP.EP_NAME)) { myIcons.put(ep.className, ep.getIcon()); } for(TypeNameEP ep: Extensions.getExtensions(TypeNameEP.EP_NAME)) { myNames.put(ep.className, ep.getTypeName()); } } @Nullable private PresentationTemplate createPresentationTemplate(Class<?> type) { Presentation presentation = type.getAnnotation(Presentation.class); if (presentation != null) { return new PresentationTemplateImpl(presentation, type); } final NullableLazyValue<Icon> icon = myIcons.get(type.getName()); final NullableLazyValue<String> typeName = myNames.get(type.getName()); if (icon != null || typeName != null) { return new PresentationTemplate() { @Override public Icon getIcon(Object o, int flags) { return icon == null ? null : icon.getValue(); } @Override public String getName(Object o) { return null; } @Override public String getTypeName() { return typeName == null ? null : typeName.getValue(); } }; } return null; } private final Map<String, NullableLazyValue<Icon>> myIcons = new HashMap<String, NullableLazyValue<Icon>>(); private final Map<String, NullableLazyValue<String>> myNames = new HashMap<String, NullableLazyValue<String>>(); @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"}) private final FactoryMap<Class, Set<PresentationTemplate>> mySuperClasses = new ConcurrentFactoryMap<Class, Set<PresentationTemplate>>() { @Override protected Set<PresentationTemplate> create(Class key) { LinkedHashSet<PresentationTemplate> templates = new LinkedHashSet<PresentationTemplate>(); walkSupers(key, new LinkedHashSet<Class>(), templates); return templates; } private void walkSupers(Class aClass, Set<Class> classes, Set<PresentationTemplate> templates) { if (!classes.add(aClass)) { return; } ContainerUtil.addIfNotNull(createPresentationTemplate(aClass), templates); final Class superClass = aClass.getSuperclass(); if (superClass != null) { walkSupers(superClass, classes, templates); } for (Class intf : aClass.getInterfaces()) { walkSupers(intf, classes, templates); } } }; /** * @author Dmitry Avdeev */ public static class PresentationTemplateImpl implements PresentationTemplate { @Override @Nullable public Icon getIcon(Object o, int flags) { if (o == null) return myIcon.getValue(); PresentationIconProvider iconProvider = myIconProvider.getValue(); return iconProvider == null ? myIcon.getValue() : iconProvider.getIcon(o, flags); } @Override @Nullable public String getTypeName() { return StringUtil.isEmpty(myPresentation.typeName()) ? null : myPresentation.typeName(); } @Override @Nullable public String getName(Object o) { PresentationNameProvider namer = myNameProvider.getValue(); return namer == null ? null : namer.getName(o); } public PresentationTemplateImpl(Presentation presentation, Class<?> aClass) { this.myPresentation = presentation; myClass = aClass; } private final Presentation myPresentation; private final Class<?> myClass; private final NullableLazyValue<Icon> myIcon = new NullableLazyValue<Icon>() { @Override protected Icon compute() { if (StringUtil.isEmpty(myPresentation.icon())) return null; return IconLoader.getIcon(myPresentation.icon(), myClass); } }; private final NullableLazyValue<PresentationNameProvider> myNameProvider = new NullableLazyValue<PresentationNameProvider>() { @Override protected PresentationNameProvider compute() { Class<? extends PresentationNameProvider> aClass = myPresentation.nameProviderClass(); try { return aClass == PresentationNameProvider.class ? null : aClass.newInstance(); } catch (Exception e) { return null; } } }; private final NullableLazyValue<PresentationIconProvider> myIconProvider = new NullableLazyValue<PresentationIconProvider>() { @Override protected PresentationIconProvider compute() { Class<? extends PresentationIconProvider> aClass = myPresentation.iconProviderClass(); try { return aClass == PresentationIconProvider.class ? null : aClass.newInstance(); } catch (Exception e) { return null; } } }; } interface PresentationTemplate { @Nullable Icon getIcon(Object o, int flags); @Nullable String getName(Object o); @Nullable String getTypeName(); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
dec26e6d2cb13e8e0b40d9b3756ffd1b5ea6468d
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/ef900000db05ebc3b175c203e47066f9ab6db18d/after/JavadocGenerationManager.java
ed12630b81a704e281f5a651c280a96fad09c060
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
4,888
java
package com.intellij.javadoc; import com.intellij.CommonBundle; import com.intellij.execution.ExecutionException; import com.intellij.execution.RunnerRegistry; import com.intellij.execution.executors.DefaultRunExecutor; import com.intellij.execution.runners.ProgramRunner; import com.intellij.execution.runners.ExecutionEnvironment; import com.intellij.execution.util.ExecutionErrorDialog; import com.intellij.ide.DataManager; import com.intellij.openapi.actionSystem.DataConstants; import com.intellij.openapi.actionSystem.DataContext; import com.intellij.openapi.actionSystem.impl.SimpleDataContext; import com.intellij.openapi.components.ProjectComponent; import com.intellij.openapi.module.Module; import com.intellij.openapi.module.ModuleUtil; import com.intellij.openapi.project.Project; import com.intellij.openapi.roots.ContentEntry; import com.intellij.openapi.roots.ModuleRootManager; import com.intellij.openapi.roots.SourceFolder; import com.intellij.openapi.util.InvalidDataException; import com.intellij.openapi.util.JDOMExternalizable; import com.intellij.openapi.util.WriteExternalException; import com.intellij.psi.JavaDirectoryService; import com.intellij.psi.PsiDirectory; import com.intellij.psi.PsiPackage; import org.jdom.Element; import org.jetbrains.annotations.NotNull; import java.awt.*; public final class JavadocGenerationManager implements JDOMExternalizable, ProjectComponent { private final Project myProject; private final JavadocConfiguration myConfiguration; public static JavadocGenerationManager getInstance(Project project) { return project.getComponent(JavadocGenerationManager.class); } JavadocGenerationManager(Project project) { myProject = project; myConfiguration = new JavadocConfiguration(project); } public void disposeComponent() { } public void initComponent() { } public void projectClosed() { } public void projectOpened() { } public void generateJavadoc(final PsiDirectory directory, DataContext dataContext) { Component component = (Component)dataContext.getData(DataConstants.CONTEXT_COMPONENT); final PsiPackage aPackage = directory != null ? JavaDirectoryService.getInstance().getPackage(directory) : null; String packageFQName = aPackage != null ? aPackage.getQualifiedName() : null; final GenerateJavadocDialog dialog = new GenerateJavadocDialog(packageFQName, myProject, myConfiguration); dialog.reset(); dialog.show(); if (!dialog.isOK()) { return; } if (component != null) { dataContext = DataManager.getInstance().getDataContext(component); } else { dataContext = SimpleDataContext.getProjectContext(myProject); } if (dialog.isGenerationForPackage() && !dialog.isGenerationWithSubpackages()) { //remove package prefixes from javadoc.exe command final Module module = directory != null ? ModuleUtil.findModuleForPsiElement(directory) : null; if (module != null && packageFQName != null){ boolean reset = false; final ContentEntry[] contentEntries = ModuleRootManager.getInstance(module).getContentEntries(); for (ContentEntry contentEntry : contentEntries) { final SourceFolder[] sourceFolders = contentEntry.getSourceFolders(); for (SourceFolder sourceFolder : sourceFolders) { final String packagePrefix = sourceFolder.getPackagePrefix(); final int prefixLength = packagePrefix.length(); if (prefixLength > 0 && packageFQName.startsWith(packagePrefix) && packageFQName.length() > prefixLength){ packageFQName = packageFQName.substring(prefixLength + 1); reset = true; break; } if (reset) break; } } } } myConfiguration.setGenerationOptions(new JavadocConfiguration.GenerationOptions(packageFQName, directory, dialog.isGenerationForPackage(), dialog.isGenerationWithSubpackages())); try { final ProgramRunner runner = RunnerRegistry.getInstance().getRunner(DefaultRunExecutor.EXECUTOR_ID, myConfiguration); assert runner != null; runner.execute(DefaultRunExecutor.getRunExecutorInstance(), new ExecutionEnvironment(myConfiguration, dataContext)); } catch (ExecutionException e) { ExecutionErrorDialog.show(e, CommonBundle.getErrorTitle(), myProject); } } @NotNull public String getComponentName() { return "JavadocGenerationManager"; } public void readExternal(Element element) throws InvalidDataException { myConfiguration.readExternal(element); } public void writeExternal(Element element) throws WriteExternalException { myConfiguration.writeExternal(element); } public JavadocConfiguration getConfiguration() { return myConfiguration; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
48522a8c9d9689fabc9dff67df61eea45c11321a
39829feafc57f671bc9b704c47b44a823781b11d
/src/Warehouse/ArrayAdd1.java
14b5b9913ba0ce0cbaeaa2c0480c89e86041553a
[]
no_license
Borislove/Misk
7229e3fcd4613a55c7493eb7880d091e7081e5e9
41f74d4b0bb3415dcf3e884a84023ea9a045bd44
refs/heads/master
2021-05-26T10:32:20.167939
2021-05-21T11:13:11
2021-05-21T11:13:11
254,097,923
0
0
null
null
null
null
UTF-8
Java
false
false
740
java
package Warehouse; import java.util.Arrays; //меняет последний индекс в массиве на 1 public class ArrayAdd1 { private int[] array; private static int[] arrayAdd = {2, 2, 3, 4, 5, 6}; public ArrayAdd1(int[] array) { this.array = array; } public void add(int num) { int arrayNum[] = new int[array.length + 1]; System.arraycopy(array, 0, arrayAdd, 0, arrayAdd.length); for (int i = 0; i < array.length; i++) { arrayAdd[i] += num; } } public static void main(String[] args) { ArrayAdd1 arrayAdd1 = new ArrayAdd1(arrayAdd); arrayAdd1.add(1); System.out.println(Arrays.toString(arrayAdd)); } }
[ "abirme@yandex.ru" ]
abirme@yandex.ru
aaa2e659f2a85fcf1e771491121a230bb66fa5f3
b88be8fdfc3f4c83d382344e6734351dd829cbfc
/ruderalis-common-utils/src/test/java/at/ruderalis/utils/test/common/reflection/MethodUtilsTest.java
13d006b0ee0802b1f8818e6bdccc94251fbe2be5
[]
no_license
Ruderalis/ruderalis-utils
3bd4cc2c6132a05e64918dc3d6e725416aff88e9
09ae1c1a5ffaffba3d72f79d890690060d4f7de3
refs/heads/master
2021-01-01T05:42:36.809007
2014-02-13T20:56:42
2014-02-13T20:56:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,474
java
/** * */ package at.ruderalis.utils.test.common.reflection; import static org.junit.Assert.*; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import at.ruderalis.utils.common.reflection.MethodUtils; /** * @author Thomas Herzog * @date Feb 12, 2014 */ @RunWith(JUnit4.class) public class MethodUtilsTest { public abstract class AbstractSearchClass { private void privateAbstractMethod() { } public void publicAbstractMethod() { } public void overwriteAbstractMethod() { } public abstract void abstractMethod(); } public class BaseSearchClass extends AbstractSearchClass { private void privateBaseMethod() { } public void publicBaseMethod() { } @Override public void abstractMethod() { } } public class SearchInheritClass extends BaseSearchClass { @Override public void abstractMethod() { } private void privateMethod() { } public void publicMethod() { } @Override public void overwriteAbstractMethod() { } } public class SearchSingleClass { private void privateMethod() { } public void publicMethod() { } } public interface SearchInterface1 { public void interfaceMethod1(); } public interface SearchInterface2 extends SearchInterface1 { public void interfaceMethod2(); } public interface SearchInterface3 extends SearchInterface1, SearchInterface2 { public void interfaceMethod3(); } @Test public void testHasMethod_not_found() { assertFalse(MethodUtils.hasMethod(SearchSingleClass.class, "notFoundMethod")); } @Test public void testHasMethod_null_class() { assertFalse(MethodUtils.hasMethod(null, "publicMethod")); } @Test public void testHasMethod_null_name() { assertFalse(MethodUtils.hasMethod(SearchSingleClass.class, null)); } @Test public void testHasMethod_not_found_inherit_class() { assertFalse(MethodUtils.hasMethod(SearchInheritClass.class, "privateBaseMethod")); } @Test public void testHasMethod_single_class() { assertTrue(MethodUtils.hasMethod(SearchSingleClass.class, "privateMethod")); } @Test public void testGetClassImplementsMethod_not_found() { assertNull(MethodUtils.getClassImplementsMethod( SearchInheritClass.class, "doesNotExists")); } @Test public void testGetClassImplementsMethod_null_name() { assertNull(MethodUtils.getClassImplementsMethod( SearchInheritClass.class, null)); } @Test public void testGetClassImplementsMethod_null_class() { assertNull(MethodUtils.getClassImplementsMethod(null, "publicMethod")); } @Test public void testGetClassImplementsMethod_interface() { assertNull(MethodUtils.getClassImplementsMethod( SearchInterface1.class, "publicMethod")); } @Test public void testGetClassImplementsMethod_on_base_public() { assertEquals(BaseSearchClass.class, MethodUtils.getClassImplementsMethod( SearchInheritClass.class, "publicBaseMethod")); } @Test public void testGetClassImplementsMethod_on_base_private() { assertEquals(BaseSearchClass.class, MethodUtils.getClassImplementsMethod( SearchInheritClass.class, "privateBaseMethod")); } @Test public void testGetClassImplementsMethod_on_inherit_class_public() { assertEquals(SearchInheritClass.class, MethodUtils.getClassImplementsMethod( SearchInheritClass.class, "publicMethod")); } @Test public void testGetClassImplementsMethod_on_inherit_class_private() { assertEquals(SearchInheritClass.class, MethodUtils.getClassImplementsMethod( SearchInheritClass.class, "privateMethod")); } @Test public void testGetClassImplementsMethod_on_inherit_class_abstract() { assertEquals(SearchInheritClass.class, MethodUtils.getClassImplementsMethod( SearchInheritClass.class, "abstractMethod")); } @Test public void testGetClassImplementsMethod_on_single_class_public() { assertEquals(SearchSingleClass.class, MethodUtils.getClassImplementsMethod( SearchSingleClass.class, "publicMethod")); } @Test public void testGetClassImplementsMethod_on_single_class_private() { assertEquals(SearchSingleClass.class, MethodUtils.getClassImplementsMethod( SearchSingleClass.class, "privateMethod")); } @Test public void testGetInterfaceDeclaresMethod_not_found() { assertNull(MethodUtils.getInterfaceDeclaresMethod( SearchInterface1.class, "doesNotExists")); } @Test public void testGetInterfaceDeclaresMethod_null_name() { assertNull(MethodUtils.getInterfaceDeclaresMethod( SearchInterface1.class, null)); } @Test public void testGetInterfaceDeclaresMethod_null_interface() { assertNull(MethodUtils.getInterfaceDeclaresMethod(null, "interfaceMethod")); } @Test public void testGetInterfaceDeclaresMethod_class() { assertNull(MethodUtils.getInterfaceDeclaresMethod( SearchInheritClass.class, "publicMethod")); } @Test public void testGetInterfaceDeclaresMethod_single_interface() { assertNull(MethodUtils.getInterfaceDeclaresMethod( SearchInterface1.class, "interfaceMethod1")); } @Test public void testGetInterfaceDeclaresMethod_interface() { assertEquals(SearchInterface1.class, MethodUtils.getInterfaceDeclaresMethod( SearchInterface3.class, "interfaceMethod1")); } }
[ "herzog.thomas81@gmail.com" ]
herzog.thomas81@gmail.com
03f9f96ffaadaf1e6e35e5fdd298fbe9a241dbc9
ae22d53c5853c02ead424ae790f47ef130958579
/src/main/java/org/codelibs/elasticsearch/vi/nlp/graph/util/AdjacencyMatrixVertexIterator.java
cda2d0ad11ea4b28559a700bf493dfe38150f95d
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
codelibs/elasticsearch-analysis-vietnamese
09bb13c71104416fac9f49164ebb662dd01b6f54
12f7b24f56f5cead92527cf30a370e2f65d4048e
refs/heads/master
2023-04-06T02:16:47.584459
2019-10-24T06:49:30
2019-10-24T06:49:30
108,381,817
0
1
null
2017-10-29T06:28:40
2017-10-26T08:16:35
Java
UTF-8
Java
false
false
1,648
java
/** * (C) Le Hong Phuong, phuonglh@gmail.com * Vietnam National University, Hanoi, Vietnam. */ package org.codelibs.elasticsearch.vi.nlp.graph.util; import org.codelibs.elasticsearch.vi.nlp.graph.AdjacencyMatrixGraph; /** * @author Le Hong Phuong, phuonglh@gmail.com * <p> * Oct 21, 2007, 10:46:48 PM * <p> * An iterator that examines the vertices of an adjacency matrix graph. */ public class AdjacencyMatrixVertexIterator implements VertexIterator { private final AdjacencyMatrixGraph graph; private final int n; private final int u; private int v = -1; private final boolean[][] adj; /** * Constructor. * @param g * @param u */ public AdjacencyMatrixVertexIterator(final AdjacencyMatrixGraph g, final int u) { this.graph = g; this.u = u; // get the number of vertices of the graph n = graph.getNumberOfVertices(); // range checking new AssertionError(u < 0 || u >= n); adj = graph.getAdj(); } /* (non-Javadoc) * @see vn.hus.graph.util.VertexIterator#hasNext() */ @Override public boolean hasNext() { // increase the current vertex v. v++; for (int i = v; i < n; i++) { if (adj[u][i]) { return true; } } return false; } /* (non-Javadoc) * @see vn.hus.graph.util.VertexIterator#next() */ @Override public int next() { while (v < n) { if (adj[u][v]) { return v; } else { v++; } } return -1; } }
[ "shinsuke@apache.org" ]
shinsuke@apache.org
7ef9896435311b78845ed9294bc5fd1219a752b9
b26d0ac0846fc13080dbe3c65380cc7247945754
/src/main/java/imports/aws/Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementOrStatementStatementSqliMatchStatementFieldToMatchSingleQueryArgument.java
a124f6e16c86aed6a177d9221533b7615d598a0b
[]
no_license
nvkk-devops/cdktf-java-aws
1431404f53df8de517f814508fedbc5810b7bce5
429019d87fc45ab198af816d8289dfe1290cd251
refs/heads/main
2023-03-23T22:43:36.539365
2021-03-11T05:17:09
2021-03-11T05:17:09
346,586,402
0
0
null
null
null
null
UTF-8
Java
false
false
5,658
java
package imports.aws; @javax.annotation.Generated(value = "jsii-pacmak/1.24.0 (build b722f66)", date = "2021-03-10T09:47:03.079Z") @software.amazon.jsii.Jsii(module = imports.aws.$Module.class, fqn = "aws.Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementOrStatementStatementSqliMatchStatementFieldToMatchSingleQueryArgument") @software.amazon.jsii.Jsii.Proxy(Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementOrStatementStatementSqliMatchStatementFieldToMatchSingleQueryArgument.Jsii$Proxy.class) public interface Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementOrStatementStatementSqliMatchStatementFieldToMatchSingleQueryArgument extends software.amazon.jsii.JsiiSerializable { @org.jetbrains.annotations.NotNull java.lang.String getName(); /** * @return a {@link Builder} of {@link Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementOrStatementStatementSqliMatchStatementFieldToMatchSingleQueryArgument} */ static Builder builder() { return new Builder(); } /** * A builder for {@link Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementOrStatementStatementSqliMatchStatementFieldToMatchSingleQueryArgument} */ public static final class Builder implements software.amazon.jsii.Builder<Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementOrStatementStatementSqliMatchStatementFieldToMatchSingleQueryArgument> { private java.lang.String name; /** * Sets the value of {@link Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementOrStatementStatementSqliMatchStatementFieldToMatchSingleQueryArgument#getName} * @param name the value to be set. This parameter is required. * @return {@code this} */ public Builder name(java.lang.String name) { this.name = name; return this; } /** * Builds the configured instance. * @return a new instance of {@link Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementOrStatementStatementSqliMatchStatementFieldToMatchSingleQueryArgument} * @throws NullPointerException if any required attribute was not provided */ @Override public Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementOrStatementStatementSqliMatchStatementFieldToMatchSingleQueryArgument build() { return new Jsii$Proxy(name); } } /** * An implementation for {@link Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementOrStatementStatementSqliMatchStatementFieldToMatchSingleQueryArgument} */ @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementOrStatementStatementSqliMatchStatementFieldToMatchSingleQueryArgument { private final java.lang.String name; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.name = software.amazon.jsii.Kernel.get(this, "name", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final java.lang.String name) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.name = java.util.Objects.requireNonNull(name, "name is required"); } @Override public final java.lang.String getName() { return this.name; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("name", om.valueToTree(this.getName())); final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("aws.Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementOrStatementStatementSqliMatchStatementFieldToMatchSingleQueryArgument")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementOrStatementStatementSqliMatchStatementFieldToMatchSingleQueryArgument.Jsii$Proxy that = (Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementOrStatementStatementSqliMatchStatementFieldToMatchSingleQueryArgument.Jsii$Proxy) o; return this.name.equals(that.name); } @Override public final int hashCode() { int result = this.name.hashCode(); return result; } } }
[ "venkata.nidumukkala@emirates.com" ]
venkata.nidumukkala@emirates.com
1eec3e62a601281589420d13bd5eca831e8bb777
14076d999bb51bafb73222c22b190d2edb1b1f86
/merchant-credit/mc-dao/src/main/java/com/sdp/mc/dao/readonly/posmerchant/PosMerchantCond.java
4ef6f0dc9aef185cb285fba3168ddd389e783fd4
[]
no_license
kevinkerry/merchant-credit
d3a9b397ddcd79d28925fa42121264da46eb91d4
14d3ad60795dcf251bd3066de14f0a731f89b73f
refs/heads/master
2021-04-03T09:09:43.601015
2017-07-28T06:07:14
2017-07-28T06:07:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,945
java
package com.sdp.mc.dao.readonly.posmerchant; import java.util.Date; import java.util.List; /** * 商户信息查询条件 * * @author: wangyiyong * @date: 13-1-31 下午1:56 */ public class PosMerchantCond extends PosMerchantPromoterCond { /** * POS商户id */ private String posMerchantId; /** * POS商户编号 */ private String posMerchantNo; /** * POS的商户号 */ private String merchantNo; /** * 商户号 */ private List<String> merchantNoList; /** * POS商户编号 */ private List<String> posMerchantNoList; /** * POS商户名称 */ private String merchantName; /** * 商户状态 */ private String status; /** * 商户状态 */ private List<String> statusList; /** * 是否有终端 */ private Boolean hasTerminal; /** * POS商户的类型 * * @return */ private String posMerchantType; /** * POS商户的类型 * * @return */ private List<String> posMerchantTypeList; /** * pos商户创建(起始)时间 */ private Date createTimeStart; /** * pos商户创建(截止)时间 */ private Date createTimeEnd; /** * 城市省级Id */ private String provinceId; /** * 城市区域Id */ private String districtId; /** * Mcc */ private List<String> mccList; /** * 销售类型 0.分销 1直销 */ private Integer posmMposSalesType; /** * 账号 */ private String mcLoginAccount; public String getMcLoginAccount() { return mcLoginAccount; } public void setMcLoginAccount(String mcLoginAccount) { this.mcLoginAccount = mcLoginAccount; } public Integer getPosmMposSalesType() { return posmMposSalesType; } public void setPosmMposSalesType(Integer posmMposSalesType) { this.posmMposSalesType = posmMposSalesType; } public String getPosMerchantId() { return posMerchantId; } public void setPosMerchantId(String posMerchantId) { this.posMerchantId = posMerchantId; } public Boolean getHasTerminal() { return hasTerminal; } public void setHasTerminal(Boolean hasTerminal) { this.hasTerminal = hasTerminal; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getMerchantName() { return merchantName; } public void setMerchantName(String merchantName) { this.merchantName = merchantName; } public String getMerchantNo() { return merchantNo; } public void setMerchantNo(String merchantNo) { this.merchantNo = merchantNo; } public String getPosMerchantNo() { return posMerchantNo; } public void setPosMerchantNo(String posMerchantNo) { this.posMerchantNo = posMerchantNo; } public String getPosMerchantType() { return posMerchantType; } public void setPosMerchantType(String posMerchantType) { this.posMerchantType = posMerchantType; } public Date getCreateTimeStart() { return createTimeStart; } public void setCreateTimeStart(Date createTimeStart) { this.createTimeStart = createTimeStart; } public Date getCreateTimeEnd() { return createTimeEnd; } public void setCreateTimeEnd(Date createTimeEnd) { this.createTimeEnd = createTimeEnd; } public String getProvinceId() { return provinceId; } public void setProvinceId(String provinceId) { this.provinceId = provinceId; } public String getDistrictId() { return districtId; } public void setDistrictId(String districtId) { this.districtId = districtId; } public List<String> getMerchantNoList() { return merchantNoList; } public void setMerchantNoList(List<String> merchantNoList) { this.merchantNoList = merchantNoList; } public List<String> getPosMerchantNoList() { return posMerchantNoList; } public void setPosMerchantNoList(List<String> posMerchantNoList) { this.posMerchantNoList = posMerchantNoList; } public List<String> getStatusList() { return statusList; } public void setStatusList(List<String> statusList) { this.statusList = statusList; } public List<String> getPosMerchantTypeList() { return posMerchantTypeList; } public void setPosMerchantTypeList(List<String> posMerchantTypeList) { this.posMerchantTypeList = posMerchantTypeList; } public List<String> getMccList() { return mccList; } public void setMccList(List<String> mccList) { this.mccList = mccList; } }
[ "bishuai@shengpay.com" ]
bishuai@shengpay.com
264bcd3d9051ca6aaf5e2af2550a1d8768875827
d980f2efd6c487fe2e1e3302d894e986f882d6f8
/src/main/java/org/boon/cache/SortableConcurrentList.java
d7574fd36574a7f0ae6283c3a0b71ebdfd7c03ee
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
hongikeam/boon
b22fbeae68daa85df83bb3b5d7fe94d13fa0f77e
479c87d3a0243c1d2bb07ceecc78d779dff7ca31
refs/heads/master
2021-01-17T05:03:00.384003
2014-02-21T08:11:33
2014-02-21T08:11:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,963
java
package org.boon.cache; import java.util.*; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; public class SortableConcurrentList<T extends Comparable> implements List<T> { private final ReadWriteLock readWriteLock = new ReentrantReadWriteLock(); private final List<T> list; public SortableConcurrentList( List<T> list ) { this.list = list; } public SortableConcurrentList() { this.list = new ArrayList<>(); } public boolean remove( Object o ) { readWriteLock.writeLock().lock(); boolean ret; try { ret = list.remove( o ); } finally { readWriteLock.writeLock().unlock(); } return ret; } @Override public boolean containsAll( Collection<?> c ) { readWriteLock.readLock().lock(); try { return list.containsAll( c ); } finally { readWriteLock.readLock().unlock(); } } @Override public boolean addAll( Collection<? extends T> c ) { readWriteLock.writeLock().lock(); try { return list.addAll( c ); } finally { readWriteLock.writeLock().unlock(); } } @Override public boolean addAll( int index, Collection<? extends T> c ) { readWriteLock.writeLock().lock(); try { return list.addAll( index, c ); } finally { readWriteLock.writeLock().unlock(); } } @Override public boolean removeAll( Collection<?> c ) { readWriteLock.writeLock().lock(); try { return list.removeAll( c ); } finally { readWriteLock.writeLock().unlock(); } } @Override public boolean retainAll( Collection<?> c ) { readWriteLock.writeLock().lock(); try { return list.retainAll( c ); } finally { readWriteLock.writeLock().unlock(); } } public boolean add( T t ) { readWriteLock.writeLock().lock(); boolean ret; try { ret = list.add( t ); } finally { readWriteLock.writeLock().unlock(); } return ret; } public void clear() { readWriteLock.writeLock().lock(); try { list.clear(); } finally { readWriteLock.writeLock().unlock(); } } public int size() { readWriteLock.readLock().lock(); try { return list.size(); } finally { readWriteLock.readLock().unlock(); } } @Override public boolean isEmpty() { readWriteLock.readLock().lock(); try { return list.isEmpty(); } finally { readWriteLock.readLock().unlock(); } } public boolean contains( Object o ) { readWriteLock.readLock().lock(); try { return list.contains( o ); } finally { readWriteLock.readLock().unlock(); } } @Override public Iterator<T> iterator() { readWriteLock.readLock().lock(); try { return new ArrayList<>( list ).iterator(); } finally { readWriteLock.readLock().unlock(); } } @Override public Object[] toArray() { readWriteLock.readLock().lock(); try { return list.toArray(); } finally { readWriteLock.readLock().unlock(); } } @Override public <T> T[] toArray( final T[] a ) { readWriteLock.readLock().lock(); try { return list.toArray( a ); } finally { readWriteLock.readLock().unlock(); } } public T get( int index ) { readWriteLock.readLock().lock(); try { return list.get( index ); } finally { readWriteLock.readLock().unlock(); } } @Override public T set( int index, T element ) { readWriteLock.writeLock().lock(); try { return list.set( index, element ); } finally { readWriteLock.writeLock().unlock(); } } @Override public void add( int index, T element ) { readWriteLock.writeLock().lock(); try { list.add( index, element ); } finally { readWriteLock.writeLock().unlock(); } } @Override public T remove( int index ) { readWriteLock.writeLock().lock(); try { return list.remove( index ); } finally { readWriteLock.writeLock().unlock(); } } @Override public int indexOf( Object o ) { readWriteLock.readLock().lock(); try { return list.indexOf( o ); } finally { readWriteLock.readLock().unlock(); } } @Override public int lastIndexOf( Object o ) { readWriteLock.readLock().lock(); try { return list.lastIndexOf( o ); } finally { readWriteLock.readLock().unlock(); } } @Override public ListIterator<T> listIterator() { readWriteLock.readLock().lock(); try { return new ArrayList( list ).listIterator(); } finally { readWriteLock.readLock().unlock(); } } @Override public ListIterator<T> listIterator( int index ) { readWriteLock.readLock().lock(); try { return new ArrayList( list ).listIterator( index ); } finally { readWriteLock.readLock().unlock(); } } @Override public List<T> subList( int fromIndex, int toIndex ) { readWriteLock.readLock().lock(); try { return list.subList( fromIndex, toIndex ); } finally { readWriteLock.readLock().unlock(); } } @Override public String toString() { readWriteLock.readLock().lock(); try { return list.toString(); } finally { readWriteLock.readLock().unlock(); } } public void sort() { readWriteLock.writeLock().lock(); try { Collections.sort( list ); } finally { readWriteLock.writeLock().unlock(); } } public List<T> sortAndReturnPurgeList( float removePercent ) { readWriteLock.writeLock().lock(); try { int size = list.size(); int removeSize = ( int ) ( size - ( size * removePercent ) ); int start = size - removeSize; Collections.sort( list ); List<T> removeList = new ArrayList<>( list.subList( 0, start ) ); list.removeAll( removeList ); return removeList; } finally { readWriteLock.writeLock().unlock(); } } }
[ "richardhightower@gmail.com" ]
richardhightower@gmail.com
d998356f1bb51c389f7c6b58e578187e20d1d93b
04b1803adb6653ecb7cb827c4f4aa616afacf629
/chrome/android/java/src/org/chromium/chrome/browser/provider/BaseColumns.java
3ee7ae97b02355637d2303ce923be861a00e1387
[ "BSD-3-Clause" ]
permissive
Samsung/Castanets
240d9338e097b75b3f669604315b06f7cf129d64
4896f732fc747dfdcfcbac3d442f2d2d42df264a
refs/heads/castanets_76_dev
2023-08-31T09:01:04.744346
2021-07-30T04:56:25
2021-08-11T05:45:21
125,484,161
58
49
BSD-3-Clause
2022-10-16T19:31:26
2018-03-16T08:07:37
null
UTF-8
Java
false
false
556
java
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.provider; /** * Copy of android.provider.BaseColumns. */ public interface BaseColumns { /** * The unique ID for a row. * <P>Type: INTEGER (long)</P> */ public static final String ID = "_id"; /** * The count of rows in a directory. * <P>Type: INTEGER</P> */ public static final String COUNT = "_count"; }
[ "sunny.nam@samsung.com" ]
sunny.nam@samsung.com
c17cb3fc22770b4dbfec228e48fcaf6779ee6cb9
918fb777eda9957cc6deeadb938ea11c735f62bd
/main/src/com/spacegame/game/SolContactFilter.java
ccd2cd5f4972d60b8edd83d449ba2e63dabd4a4e
[ "Apache-2.0" ]
permissive
SlyFoxStudios/SpaceGame
3d1050d418b628e9838b30c1dca556908c7e66cb
25943aa4c18416cd2aa2a7886888d43addcec57c
refs/heads/master
2021-01-21T09:28:36.121370
2016-04-27T04:48:02
2016-04-27T04:48:02
45,594,198
0
1
null
null
null
null
UTF-8
Java
false
false
884
java
package com.spacegame.game; import com.badlogic.gdx.physics.box2d.ContactFilter; import com.badlogic.gdx.physics.box2d.Fixture; import com.spacegame.game.projectile.Projectile; public class SolContactFilter implements ContactFilter { private final FactionMan myFactionMan; public SolContactFilter(FactionMan factionMan) { myFactionMan = factionMan; } @Override public boolean shouldCollide(Fixture fixtureA, Fixture fixtureB) { SolObject oA = (SolObject) fixtureA.getBody().getUserData(); SolObject oB = (SolObject) fixtureB.getBody().getUserData(); boolean aIsProj = oA instanceof Projectile; if (!aIsProj && !(oB instanceof Projectile)) return true; Projectile proj = (Projectile)(aIsProj ? oA : oB); SolObject o = aIsProj ? oB : oA; Fixture f = aIsProj ? fixtureB : fixtureA; return proj.shouldCollide(o, f, myFactionMan); } }
[ "crazywolf132@gmail.com" ]
crazywolf132@gmail.com
8b8cee3d20700b046444b2173176817e1230998e
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2015/12/MultiReadableTest.java
ebd69645760baa94f592bd610b0280e000ed6af6
[]
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
5,960
java
/* * Copyright (c) 2002-2015 "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.csv.reader; import org.junit.Test; import java.io.IOException; import java.io.Reader; import java.io.StringReader; import org.neo4j.collection.RawIterator; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public class MultiReadableTest { @Test public void shouldReadFromMultipleReaders() throws Exception { // GIVEN String[][] data = new String[][] { {"this is", "the first line"}, {"where this", "is the second line"}, {"and here comes", "the third line"} }; RawIterator<Reader,IOException> readers = readerIteratorFromStrings( data, null ); CharSeeker seeker = CharSeekers.charSeeker( new MultiReadable( readers ), CONFIG, true ); // WHEN/THEN for ( String[] line : data ) { assertNextLine( line, seeker, mark, extractors ); } assertFalse( seeker.seek( mark, delimiter ) ); seeker.close(); } @Test public void shouldHandleSourcesEndingWithNewLine() throws Exception { // GIVEN String[][] data = new String[][] { {"this is", "the first line"}, {"where this", "is the second line"}, }; // WHEN RawIterator<Reader,IOException> readers = readerIteratorFromStrings( data, '\n' ); CharSeeker seeker = CharSeekers.charSeeker( Readables.sources( readers ), CONFIG, true ); // WHEN/THEN for ( String[] line : data ) { assertNextLine( line, seeker, mark, extractors ); } assertFalse( seeker.seek( mark, delimiter ) ); seeker.close(); } @Test public void shouldTrackAbsolutePosition() throws Exception { // GIVEN String[][] data = new String[][] { {"this is", "the first line"}, // 21+delimiter+newline = 23 characters {"where this", "is the second line"}, // 28+delimiter+newline = 30 characters }; RawIterator<Reader,IOException> readers = readerIteratorFromStrings( data, '\n' ); CharReadable reader = Readables.sources( readers ); assertEquals( 0L, reader.position() ); SectionedCharBuffer buffer = new SectionedCharBuffer( 15 ); // WHEN reader.read( buffer, buffer.front() ); assertEquals( 15, reader.position() ); reader.read( buffer, buffer.front() ); assertEquals( "Should not transition to a new reader in the middle of a read", 23, reader.position() ); assertEquals( "Reader1", reader.sourceDescription() ); // we will transition to the new reader in the call below reader.read( buffer, buffer.front() ); assertEquals( 23+15, reader.position() ); reader.read( buffer, buffer.front() ); assertEquals( 23+30, reader.position() ); reader.read( buffer, buffer.front() ); assertFalse( buffer.hasAvailable() ); } private static final Configuration CONFIG = new Configuration.Overridden( Configuration.DEFAULT ) { @Override public int bufferSize() { return 200; } }; private void assertNextLine( String[] line, CharSeeker seeker, Mark mark, Extractors extractors ) throws IOException { for ( String value : line ) { assertTrue( seeker.seek( mark, delimiter ) ); assertEquals( value, seeker.extract( mark, extractors.string() ).value() ); } assertTrue( mark.isEndOfLine() ); } private RawIterator<Reader,IOException> readerIteratorFromStrings( final String[][] data, final Character lineEnding ) { return new RawIterator<Reader,IOException>() { private int cursor; @Override public boolean hasNext() { return cursor < data.length; } @Override public Reader next() { return new StringReader( join( data[cursor++] ) ) { @Override public String toString() { return "Reader" + cursor; } }; } private String join( String[] strings ) { StringBuilder builder = new StringBuilder(); for ( String string : strings ) { builder.append( builder.length() > 0 ? "," : "" ).append( string ); } if ( lineEnding != null ) { builder.append( lineEnding ); } return builder.toString(); } @Override public void remove() { throw new UnsupportedOperationException(); } }; } private final Mark mark = new Mark(); private final Extractors extractors = new Extractors( ';' ); private final int delimiter = ','; }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
47bcc34d7602ce86784a34909efcd3ed9376eb09
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/airticketopen-20230117/src/main/java/com/aliyun/airticketopen20230117/models/AncillarySuggestResponse.java
52be646d00ddcad908f2f396c0283f035fa9d896
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,387
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.airticketopen20230117.models; import com.aliyun.tea.*; public class AncillarySuggestResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("statusCode") @Validation(required = true) public Integer statusCode; @NameInMap("body") @Validation(required = true) public AncillarySuggestResponseBody body; public static AncillarySuggestResponse build(java.util.Map<String, ?> map) throws Exception { AncillarySuggestResponse self = new AncillarySuggestResponse(); return TeaModel.build(map, self); } public AncillarySuggestResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public AncillarySuggestResponse setStatusCode(Integer statusCode) { this.statusCode = statusCode; return this; } public Integer getStatusCode() { return this.statusCode; } public AncillarySuggestResponse setBody(AncillarySuggestResponseBody body) { this.body = body; return this; } public AncillarySuggestResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
1bcba87307dda07473385fa550c127582b35eb79
e461611c69fe9187a8e44609df182dd00d8f5875
/algorithm/src/newcode_jianzhiOffer/Demo27.java
b15ac133dc30fffcc945f6441ecffbca910bce9a
[]
no_license
songjiawang/myCoding
a704d8b94733f3591eb4150ff8658a17e0165cc0
fa31efcba4816ca5b079a9dcff30c3f98dfad3e7
refs/heads/master
2020-03-29T01:01:05.200374
2018-09-19T00:08:47
2018-09-19T00:08:47
149,367,114
0
0
null
null
null
null
GB18030
Java
false
false
451
java
package newcode_jianzhiOffer; /** * 请实现两个函数,分别用来序列化和反序列化二叉树 * @author purple * */ public class Demo27 { String Serialize(TreeNode root) { StringBuffer str = new StringBuffer(); if(root==null)return ""; Serialize2(root,str); } String Serialize2(TreeNode root,StringBuffer str) { if(root!=null){ } } TreeNode Deserialize(String str) { } }
[ "33470505+songjiawang@users.noreply.github.com" ]
33470505+songjiawang@users.noreply.github.com
f81b74a7a1baad51f960854f918971ad203cf1f7
8a75455a56e083cc8ceb02b10cb52baa24b09ffc
/api/src/test/java/org/openmrs/module/emrapi/disposition/actions/DischargeIfAdmittedDispositionActionTest.java
fa9d9e9864b90b31db91f38a5ad071852acc3a33
[]
no_license
CI-OpenMRS/openmrs-module-emrapi
038abed89cc94346aa294f7ecffc44be0e9c3730
b5afc0229379a99dd47a2249a0167799f196c8c5
refs/heads/master
2021-01-17T21:39:33.228541
2013-05-23T21:15:16
2013-05-23T21:15:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,345
java
package org.openmrs.module.emrapi.disposition.actions; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentMatcher; import org.openmrs.Encounter; import org.openmrs.EncounterRole; import org.openmrs.EncounterType; import org.openmrs.Location; import org.openmrs.Obs; import org.openmrs.Provider; import org.openmrs.Visit; import org.openmrs.module.emrapi.EmrApiProperties; import org.openmrs.module.emrapi.TestUtils; import org.openmrs.module.emrapi.adt.AdtService; import org.openmrs.module.emrapi.adt.Discharge; import org.openmrs.module.emrapi.encounter.EncounterDomainWrapper; import org.openmrs.module.emrapi.test.AuthenticatedUserTestHelper; import java.util.Date; import java.util.HashMap; import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; import static org.mockito.Mockito.when; /** * */ public class DischargeIfAdmittedDispositionActionTest extends AuthenticatedUserTestHelper { private DischargeIfAdmittedDispositionAction action; private AdtService adtService; private EmrApiProperties emrApiProperties; private EncounterType admissionEncounterType = new EncounterType(); private EncounterType dischargeEncounterType = new EncounterType(); @Before public void setUp() throws Exception { adtService = mock(AdtService.class); emrApiProperties = mock(EmrApiProperties.class); when(emrApiProperties.getAdmissionEncounterType()).thenReturn(admissionEncounterType); when(emrApiProperties.getExitFromInpatientEncounterType()).thenReturn(dischargeEncounterType); action = new DischargeIfAdmittedDispositionAction(); action.setAdtService(adtService); action.setEmrApiProperties(emrApiProperties); } @Test public void testDoesNothingIfNotAdmitted() throws Exception { Encounter beingCreated = new Encounter(); beingCreated.setVisit(new Visit()); action.action(new EncounterDomainWrapper(beingCreated), new Obs(), new HashMap<String, String[]>()); verifyZeroInteractions(adtService); } @Test public void testDischargesIfAdmitted() throws Exception { Encounter admission = new Encounter(); admission.setEncounterDatetime(new Date()); admission.setEncounterType(admissionEncounterType); Visit visit = new Visit(); visit.addEncounter(admission); final Encounter beingCreated = new Encounter(); beingCreated.setVisit(visit); beingCreated.setLocation(new Location()); beingCreated.addProvider(new EncounterRole(), new Provider()); action.action(new EncounterDomainWrapper(beingCreated), new Obs(), new HashMap<String, String[]>()); verify(adtService).dischargePatient(argThat(new ArgumentMatcher<Discharge>() { @Override public boolean matches(Object argument) { Discharge actual = (Discharge) argument; return actual.getLocation().equals(beingCreated.getLocation()) && actual.getVisit().equals(beingCreated.getVisit()) && TestUtils.sameProviders(actual.getProviders(), beingCreated.getProvidersByRoles()); } })); } }
[ "jazayeri@alum.mit.edu" ]
jazayeri@alum.mit.edu
65f87f2639874e02c34296ec795a787c3b4594da
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/java-vertx/generated/src/main/java/org/openapitools/server/api/model/ComDayCqDamCoreImplAssetMoveListenerInfo.java
0c6d3c758e6ed54fab7a7ccfeee1c6dba1d4cded
[ "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
3,177
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.ComDayCqDamCoreImplAssetMoveListenerProperties; @JsonInclude(JsonInclude.Include.NON_NULL) public class ComDayCqDamCoreImplAssetMoveListenerInfo { private String pid = null; private String title = null; private String description = null; private ComDayCqDamCoreImplAssetMoveListenerProperties properties = null; public ComDayCqDamCoreImplAssetMoveListenerInfo () { } public ComDayCqDamCoreImplAssetMoveListenerInfo (String pid, String title, String description, ComDayCqDamCoreImplAssetMoveListenerProperties properties) { this.pid = pid; this.title = title; this.description = description; this.properties = properties; } @JsonProperty("pid") public String getPid() { return pid; } public void setPid(String pid) { this.pid = pid; } @JsonProperty("title") public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } @JsonProperty("description") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } @JsonProperty("properties") public ComDayCqDamCoreImplAssetMoveListenerProperties getProperties() { return properties; } public void setProperties(ComDayCqDamCoreImplAssetMoveListenerProperties properties) { this.properties = properties; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ComDayCqDamCoreImplAssetMoveListenerInfo comDayCqDamCoreImplAssetMoveListenerInfo = (ComDayCqDamCoreImplAssetMoveListenerInfo) o; return Objects.equals(pid, comDayCqDamCoreImplAssetMoveListenerInfo.pid) && Objects.equals(title, comDayCqDamCoreImplAssetMoveListenerInfo.title) && Objects.equals(description, comDayCqDamCoreImplAssetMoveListenerInfo.description) && Objects.equals(properties, comDayCqDamCoreImplAssetMoveListenerInfo.properties); } @Override public int hashCode() { return Objects.hash(pid, title, description, properties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ComDayCqDamCoreImplAssetMoveListenerInfo {\n"); sb.append(" pid: ").append(toIndentedString(pid)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" properties: ").append(toIndentedString(properties)).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
826e1905b5cba8f393607d7db256ec89e8a4789f
160663a72233aecbb05714b0aa7d3984e3e44c20
/L11T3_Exception_Solution/src/edu/tum/pse/account/Account.java
eed674013c68a088a644ea0f73d4ce32259b971e
[]
no_license
amitjoy/software-patterns
d92e192770d9ea914b8e382e1edb813d26f0849c
5db3ef039738295116f6c28bf14058ce594bc805
refs/heads/master
2021-01-10T13:44:31.212972
2015-11-02T06:10:05
2015-11-02T06:10:05
45,375,350
0
0
null
null
null
null
UTF-8
Java
false
false
459
java
package edu.tum.pse.account; class Account { public Account(int amount) { _balance = amount; } public Account() { _balance = 0; } public void deposit(int amount) { _balance += amount; } public boolean canWithdraw(int amount) { return _balance >= amount; } public void withdraw(int amount) throws BalanceException { if (amount > _balance) throw new BalanceException(); _balance -= amount; } private int _balance; }
[ "admin@amitinside.com" ]
admin@amitinside.com
b0d62cb4dde7b6c7b50139930d0f96d8e625c9b6
ba005c6729aed08554c70f284599360a5b3f1174
/lib/selenium-server-standalone-3.4.0/org/openqa/selenium/remote/server/handler/GetElementSelected.java
52c3b761b9afe96e37ec369771d71c0bc5262cd8
[]
no_license
Viral-patel703/Testyourbond-aut0
f6727a6da3b1fbf69cc57aeb89e15635f09e249a
784ab7a3df33d0efbd41f3adadeda22844965a56
refs/heads/master
2020-08-09T00:27:26.261661
2017-11-07T10:12:05
2017-11-07T10:12:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
533
java
package org.openqa.selenium.remote.server.handler; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.server.Session; public class GetElementSelected extends WebElementHandler<Boolean> { public GetElementSelected(Session session) { super(session); } public Boolean call() throws Exception { return Boolean.valueOf(getElement().isSelected()); } public String toString() { return String.format("[is selected: %s]", new Object[] { getElementAsString() }); } }
[ "VIRUS-inside@users.noreply.github.com" ]
VIRUS-inside@users.noreply.github.com
757e88046a83893fc7aa77768bb6d05215be9d8f
8fc6fbc0bf858fcc815007a3aa42b8a189953b9f
/src/com/raphael/lc/offer55/IsBalanced.java
66ef53e5845b438c55a5ef1df16e4d4ab77f57e2
[]
no_license
wangchao0502/lc-weekly-contest
79f01eadb118a92c79006285cb320b4bf316c1f9
0ebcd48e816d257ed454e489e9166fbd732ff528
refs/heads/main
2023-05-07T06:32:10.541215
2021-05-30T02:30:05
2021-05-30T02:30:05
327,791,058
0
0
null
null
null
null
UTF-8
Java
false
false
830
java
package com.raphael.lc.offer55; import com.raphael.lc.common.TreeNode; /** * @author Raphael * @date 2021-03-22 11:33:42 */ class IsBalanced { /** * Description for IsBalanced: * 平衡二叉树 */ private int helper(TreeNode node, int curDepth) { // 返回树深度, -1表示不平衡 if (node == null) return curDepth; curDepth++; int leftDepth = helper(node.left, curDepth); int rightDepth = helper(node.right, curDepth); if (leftDepth == -1 || rightDepth == -1) { return -1; } if (Math.abs(leftDepth - rightDepth) > 1) { return -1; } return Math.max(leftDepth, rightDepth); } public boolean isBalanced(TreeNode root) { // code return helper(root, 0) != -1; } }
[ "georgewang2007@163.com" ]
georgewang2007@163.com