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
a41cd1c4ff0dfbaecd8241d7259523c95cfce1c7
0c2819c05fabaecfcc3f2a99513351b2d11cc9aa
/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/disk/Configuration.java
07ba27f9eacec2bd23d04f8d8b55001c57495a63
[]
no_license
rlf/HolographicDisplays
99d8ca3c930a8cf023f5c5e60e0583b27d5945b3
f03dc8a83953df0c91a2a195a1cba84788902d08
refs/heads/master
2020-12-01T13:07:56.592196
2014-12-27T16:11:31
2014-12-27T16:11:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,088
java
package com.gmail.filoghost.holographicdisplays.disk; import java.io.File; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.List; import java.util.TimeZone; import org.bukkit.ChatColor; import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.plugin.Plugin; import com.gmail.filoghost.holographicdisplays.util.Utils; /** * Just a bunch of static varibles to hold the settings. * Useful for fast access. */ public class Configuration { public static double spaceBetweenLines; public static String imageSymbol; public static String transparencySymbol; public static boolean updateNotification; public static ChatColor transparencyColor; public static SimpleDateFormat timeFormat; public static int bungeeRefreshSeconds; public static String bungeeOnlineFormat; public static String bungeeOfflineFormat; public static boolean useRedisBungee; public static boolean debug; public static void load(Plugin plugin) { File configFile = new File(plugin.getDataFolder(), "config.yml"); if (!configFile.exists()) { plugin.getDataFolder().mkdirs(); plugin.saveResource("config.yml", true); } YamlConfiguration config = new YamlConfiguration(); try { config.load(configFile); } catch (InvalidConfigurationException e) { e.printStackTrace(); plugin.getLogger().warning("The configuration is not a valid YAML file! Please check it with a tool like http://yaml-online-parser.appspot.com/"); return; } catch (IOException e) { e.printStackTrace(); plugin.getLogger().warning("I/O error while reading the configuration. Was the file in use?"); return; } catch (Exception e) { e.printStackTrace(); plugin.getLogger().warning("Unhandled exception while reading the configuration!"); return; } boolean needsSave = false; for (ConfigNode node : ConfigNode.values()) { if (!config.isSet(node.getPath())) { needsSave = true; config.set(node.getPath(), node.getDefaultValue()); } } // Check the old values. List<String> nodesToRemove = Arrays.asList( "vertical-spacing", "time-format", "bungee-refresh-seconds", "using-RedisBungee", "bungee-online-format", "bungee-offline-format" ); for (String oldNode : nodesToRemove) { if (config.isSet(oldNode)) { config.set(oldNode, null); needsSave = true; } } if (needsSave) { config.options().header(Utils.join(new String[] { ".", ". Read the tutorial at: http://dev.bukkit.org/bukkit-plugins/holographic-displays/", ".", ". Plugin created by filoghost.", "."}, "\n")); config.options().copyHeader(true); try { config.save(configFile); } catch (IOException e) { e.printStackTrace(); plugin.getLogger().warning("I/O error while saving the configuration. Was the file in use?"); } } spaceBetweenLines = config.getDouble(ConfigNode.SPACE_BETWEEN_LINES.getPath()); updateNotification = config.getBoolean(ConfigNode.UPDATE_NOTIFICATION.getPath()); imageSymbol = StringConverter.toReadableFormat(config.getString(ConfigNode.IMAGES_SYMBOL.getPath())); transparencySymbol = StringConverter.toReadableFormat(config.getString(ConfigNode.TRANSPARENCY_SPACE.getPath())); bungeeRefreshSeconds = config.getInt(ConfigNode.BUNGEE_REFRESH_SECONDS.getPath()); useRedisBungee = config.getBoolean(ConfigNode.BUNGEE_USE_REDIS_BUNGEE.getPath()); debug = config.getBoolean(ConfigNode.DEBUG.getPath()); String tempColor = config.getString(ConfigNode.TRANSPARENCY_COLOR.getPath()).replace('&', ChatColor.COLOR_CHAR); boolean foundColor = false; for (ChatColor chatColor : ChatColor.values()) { if (chatColor.toString().equals(tempColor)) { Configuration.transparencyColor = chatColor; foundColor = true; } } if (!foundColor) { Configuration.transparencyColor = ChatColor.GRAY; plugin.getLogger().warning("You didn't set a valid chat color for transparency in the configuration, light gray (&7) will be used."); } try { timeFormat = new SimpleDateFormat(config.getString(ConfigNode.TIME_FORMAT.getPath())); timeFormat.setTimeZone(TimeZone.getTimeZone(config.getString(ConfigNode.TIME_ZONE.getPath()))); } catch (IllegalArgumentException ex) { timeFormat = new SimpleDateFormat("H:mm"); plugin.getLogger().warning("Time format not valid in the configuration, using the default."); } if (bungeeRefreshSeconds < 1) { plugin.getLogger().warning("The minimum interval for pinging BungeeCord's servers is 1 second. It has been automatically set."); bungeeRefreshSeconds = 1; } if (bungeeRefreshSeconds > 60) { plugin.getLogger().warning("The maximum interval for pinging BungeeCord's servers is 60 seconds. It has been automatically set."); bungeeRefreshSeconds = 60; } } }
[ "filoghost@gmail.com" ]
filoghost@gmail.com
f4a974a9ee74474c60e1071238ecb32fb6ee2213
ffcbd3d2d7e23bc6a811fc8f29ed65d882453c2c
/han-core/src/main/java/org/hanframework/tool/exeception/JsonConverException.java
880b0b450522efdd62e8b6e5f92e1994e0931236
[ "Apache-2.0", "ICU" ]
permissive
hanframework/han
59c78e8227638b4c82eb1202d68937d70109b78b
4043e5a450ddc6923233ee5326436bcdf5b947a3
refs/heads/master
2022-12-22T21:37:04.635758
2019-10-14T08:59:36
2019-10-14T08:59:36
185,520,022
0
1
Apache-2.0
2022-12-14T20:30:16
2019-05-08T03:19:23
Java
UTF-8
Java
false
false
400
java
package org.hanframework.tool.exeception; /** * @Package: elephant.zybank.config.exception * @Description: 当从其他服务获取订单json准换错误时候,抛出 * @author: liuxin * @date: 17/6/13 上午11:23 */ public class JsonConverException extends RuntimeException { public JsonConverException() { } public JsonConverException(String msg) { super(msg); } }
[ "lxchinesszz@163.com" ]
lxchinesszz@163.com
cd7b03f6cb3aa2459d1f551f056ae5169e67b0c5
1742b6719b988e5519373002305e31d28b8bd691
/sdk/java/src/main/java/com/pulumi/aws/transfer/inputs/WorkflowOnExceptionStepDeleteStepDetailsArgs.java
622c94441160e6f929986890a9b0d4e2f9086986
[ "BSD-3-Clause", "Apache-2.0", "MPL-2.0" ]
permissive
pulumi/pulumi-aws
4f7fdb4a816c5ea357cff2c2e3b613c006e49f1a
42b0a0abdf6c14da248da22f8c4530af06e67b98
refs/heads/master
2023-08-03T23:08:34.520280
2023-08-01T18:09:58
2023-08-01T18:09:58
97,484,940
384
171
Apache-2.0
2023-09-14T14:48:40
2017-07-17T14:20:33
Java
UTF-8
Java
false
false
4,995
java
// *** WARNING: this file was generated by pulumi-java-gen. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package com.pulumi.aws.transfer.inputs; import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import java.lang.String; import java.util.Objects; import java.util.Optional; import javax.annotation.Nullable; public final class WorkflowOnExceptionStepDeleteStepDetailsArgs extends com.pulumi.resources.ResourceArgs { public static final WorkflowOnExceptionStepDeleteStepDetailsArgs Empty = new WorkflowOnExceptionStepDeleteStepDetailsArgs(); /** * The name of the step, used as an identifier. * */ @Import(name="name") private @Nullable Output<String> name; /** * @return The name of the step, used as an identifier. * */ public Optional<Output<String>> name() { return Optional.ofNullable(this.name); } /** * Specifies which file to use as input to the workflow step: either the output from the previous step, or the originally uploaded file for the workflow. Enter ${previous.file} to use the previous file as the input. In this case, this workflow step uses the output file from the previous workflow step as input. This is the default value. Enter ${original.file} to use the originally-uploaded file location as input for this step. * */ @Import(name="sourceFileLocation") private @Nullable Output<String> sourceFileLocation; /** * @return Specifies which file to use as input to the workflow step: either the output from the previous step, or the originally uploaded file for the workflow. Enter ${previous.file} to use the previous file as the input. In this case, this workflow step uses the output file from the previous workflow step as input. This is the default value. Enter ${original.file} to use the originally-uploaded file location as input for this step. * */ public Optional<Output<String>> sourceFileLocation() { return Optional.ofNullable(this.sourceFileLocation); } private WorkflowOnExceptionStepDeleteStepDetailsArgs() {} private WorkflowOnExceptionStepDeleteStepDetailsArgs(WorkflowOnExceptionStepDeleteStepDetailsArgs $) { this.name = $.name; this.sourceFileLocation = $.sourceFileLocation; } public static Builder builder() { return new Builder(); } public static Builder builder(WorkflowOnExceptionStepDeleteStepDetailsArgs defaults) { return new Builder(defaults); } public static final class Builder { private WorkflowOnExceptionStepDeleteStepDetailsArgs $; public Builder() { $ = new WorkflowOnExceptionStepDeleteStepDetailsArgs(); } public Builder(WorkflowOnExceptionStepDeleteStepDetailsArgs defaults) { $ = new WorkflowOnExceptionStepDeleteStepDetailsArgs(Objects.requireNonNull(defaults)); } /** * @param name The name of the step, used as an identifier. * * @return builder * */ public Builder name(@Nullable Output<String> name) { $.name = name; return this; } /** * @param name The name of the step, used as an identifier. * * @return builder * */ public Builder name(String name) { return name(Output.of(name)); } /** * @param sourceFileLocation Specifies which file to use as input to the workflow step: either the output from the previous step, or the originally uploaded file for the workflow. Enter ${previous.file} to use the previous file as the input. In this case, this workflow step uses the output file from the previous workflow step as input. This is the default value. Enter ${original.file} to use the originally-uploaded file location as input for this step. * * @return builder * */ public Builder sourceFileLocation(@Nullable Output<String> sourceFileLocation) { $.sourceFileLocation = sourceFileLocation; return this; } /** * @param sourceFileLocation Specifies which file to use as input to the workflow step: either the output from the previous step, or the originally uploaded file for the workflow. Enter ${previous.file} to use the previous file as the input. In this case, this workflow step uses the output file from the previous workflow step as input. This is the default value. Enter ${original.file} to use the originally-uploaded file location as input for this step. * * @return builder * */ public Builder sourceFileLocation(String sourceFileLocation) { return sourceFileLocation(Output.of(sourceFileLocation)); } public WorkflowOnExceptionStepDeleteStepDetailsArgs build() { return $; } } }
[ "public@paulstack.co.uk" ]
public@paulstack.co.uk
499965bc37ef6dd36c6a4737becc165c6d41f235
93408941ff5990d3ae1dff2facfb7a0fa515c0e0
/service_client_common_src_business/com/path/vo/core/csmfom/FomCifCompanyDetailsSC.java
865977647c6a59fbd8a4524146d64ce81df9cdeb
[]
no_license
aleemkhowaja/imal_common_business_code
d210d4e585095d1a27ffb85912bc787eb5552a37
1b34da83d546ca1bad02788763dc927bcb3237b0
refs/heads/master
2023-02-17T09:58:24.419658
2021-01-11T07:10:34
2021-01-11T07:10:34
328,573,717
0
0
null
null
null
null
UTF-8
Java
false
false
1,575
java
package com.path.vo.core.csmfom; import java.math.BigDecimal; import com.path.struts2.lib.common.GridParamsSC; public class FomCifCompanyDetailsSC extends GridParamsSC { private BigDecimal cifNo; private BigDecimal lineNo; private String status; private BigDecimal year; private String langCode; private BigDecimal lovType; private BigDecimal compCodeCif; private BigDecimal month; public BigDecimal getCifNo() { return cifNo; } public void setCifNo(BigDecimal cifNo) { this.cifNo = cifNo; } public BigDecimal getLineNo() { return lineNo; } public void setLineNo(BigDecimal lineNo) { this.lineNo = lineNo; } public void setStatus(String status) { this.status = status; } public String getStatus() { return status; } public void setYear(BigDecimal year) { this.year = year; } public BigDecimal getYear() { return year; } public String getLangCode() { return langCode; } public void setLangCode(String langCode) { this.langCode = langCode; } public BigDecimal getLovType() { return lovType; } public void setLovType(BigDecimal lovType) { this.lovType = lovType; } public void setCompCodeCif(BigDecimal compCodeCif) { this.compCodeCif = compCodeCif; } public BigDecimal getCompCodeCif() { return compCodeCif; } public BigDecimal getMonth() { return month; } public void setMonth(BigDecimal month) { this.month = month; } }
[ "aleem2k11@gmail.com" ]
aleem2k11@gmail.com
61c2af0c0be24f53eaa5a752329dbd9c96d7a3b2
5252a00843c6082d739d7a00142525fff0a2f3e7
/zoeeasy-cloud-platform/zoeeasy-cloud-modules/zoeeasy-cloud-pay/zoeeasy-cloud-pay-api/src/main/java/com/zoeeasy/cloud/pay/wechat/params/WeChatRefundParams.java
4b0bb6f5f7ffe2859538bc4c118ee0f59bb2d55b
[]
no_license
P79N6A/parking
be8dc0ae6394096ec49faa89521d723425a5c965
6e3ea14312edc7487f725f2df315de989eaabb10
refs/heads/master
2020-05-07T22:07:03.790311
2019-04-12T03:06:26
2019-04-12T03:06:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
728
java
package com.zoeeasy.cloud.pay.wechat.params; import lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; /** * <pre> * 申请退款 * </pre> * * @author walkman * @date 2017-07-11-10:53 */ @Data @EqualsAndHashCode(callSuper = true) public class WeChatRefundParams extends WeChatPayBaseParam { /** * 微信订单号 */ private String transactionId; /** * 商户订单号 */ private String outTradeNo; /** * 商户退款单号 */ private String outRefundNo; /** * 订单金额 */ @NotNull private Integer totalFee; /** * 退款金额 */ @NotNull private Integer refundFee; }
[ "xuqinghuo@126.com" ]
xuqinghuo@126.com
9fd9863bd06b3348c0a95499a7fe6ac6f20ebcdb
e3712168b5154d456edf3512a1424b9aea290f24
/frontend/Tagline/sources/org/locationtech/jts/operation/Counter.java
07b28154c70bffc264fc5f0072db142a25e61292
[]
no_license
uandisson/Projeto-TagLine-HACK_GOV_PE
bf3c5c106191292b3692068d41bc5e6f38f07d52
5e130ff990faf5c8c5dab060398c34e53e0fd896
refs/heads/master
2023-03-12T17:36:36.792458
2021-02-11T18:17:51
2021-02-11T18:17:51
338,082,674
0
1
null
null
null
null
UTF-8
Java
false
false
129
java
package org.locationtech.jts.operation; /* compiled from: BoundaryOp */ class Counter { int count; Counter() { } }
[ "uandisson@gmail.com" ]
uandisson@gmail.com
70ee0a3968a93bcff2d3988f8ed1742cd0d87ac2
420d670ddd9af8bc9dc4a3b1e9d811ae302b06ec
/src/main/java/uk/co/cwspencer/ideagdb/run/GdbRunProfileState.java
05e8b9eac746efe9aee6545635d9df17373c0775
[ "MIT", "Apache-2.0" ]
permissive
consulo/consulo-gdb
483d9e3b5bafbddb48e4a053ed1ad21bb7ce2a93
46fe93a948cf497954181e11395681027151216b
refs/heads/master
2023-09-02T23:14:56.769398
2023-07-07T10:53:32
2023-07-07T10:53:32
20,531,482
0
0
Apache-2.0
2023-01-07T13:59:02
2014-06-05T15:55:56
Java
UTF-8
Java
false
false
1,228
java
package uk.co.cwspencer.ideagdb.run; import consulo.execution.DefaultExecutionResult; import consulo.execution.ExecutionResult; import consulo.execution.configuration.RunProfileState; import consulo.execution.debug.DefaultDebugProcessHandler; import consulo.execution.executor.Executor; import consulo.execution.runner.ProgramRunner; import consulo.execution.ui.console.TextConsoleBuilder; import consulo.execution.ui.console.TextConsoleBuilderFactory; import consulo.process.ExecutionException; import consulo.process.ProcessHandler; import consulo.project.Project; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; public class GdbRunProfileState implements RunProfileState { private Project myProject; public GdbRunProfileState(Project project) { myProject = project; } @Nullable @Override public ExecutionResult execute(Executor executor, @NotNull ProgramRunner runner) throws ExecutionException { ProcessHandler processHandler = new DefaultDebugProcessHandler(); // Create the console final TextConsoleBuilder builder = TextConsoleBuilderFactory.getInstance().createBuilder(myProject); return new DefaultExecutionResult(builder.getConsole(), processHandler); } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
5b46d89606087001cb693aae26413c2f7493bc2a
39fdbaa47bc18dd76ccc40bccf18a21e3543ab9f
/modules/activiti-engine/src/main/java/org/activiti/engine/impl/scripting/ScriptCondition.java
393e007c1f9fd6f3cae7abf406225044f1372e55
[]
no_license
jpjyxy/Activiti-activiti-5.16.4
b022494b8f40b817a54bb1cc9c7f6fa41dadb353
ff22517464d8f9d5cfb09551ad6c6cbecff93f69
refs/heads/master
2022-12-24T14:51:08.868694
2017-04-14T14:05:00
2017-04-14T14:05:00
191,682,921
0
0
null
2022-12-16T04:24:04
2019-06-13T03:15:47
Java
UTF-8
Java
false
false
1,781
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.activiti.engine.impl.scripting; import org.activiti.engine.ActivitiException; import org.activiti.engine.delegate.DelegateExecution; import org.activiti.engine.impl.Condition; import org.activiti.engine.impl.context.Context; /** * @author Tom Baeyens */ public class ScriptCondition implements Condition { private final String expression; private final String language; public ScriptCondition(String expression, String language) { this.expression = expression; this.language = language; } public boolean evaluate(DelegateExecution execution) { ScriptingEngines scriptingEngines = Context.getProcessEngineConfiguration().getScriptingEngines(); Object result = scriptingEngines.evaluate(expression, language, execution); if (result == null) { throw new ActivitiException("condition script returns null: " + expression); } if (!(result instanceof Boolean)) { throw new ActivitiException("condition script returns non-Boolean: " + result + " (" + result.getClass().getName() + ")"); } return (Boolean)result; } }
[ "905280842@qq.com" ]
905280842@qq.com
86620bb818a35210b5c7f62dcd91fcf04d683e7d
fa9dd0f223ff8285089e8d3021373e989818be05
/Solutions/src/com/rajaraghvendra/solutions/_880.java
b013ea999dadade795854cff44f32e7f824fbbb3
[]
no_license
rajaraghvendra/Leetcode
36e2c9aca3428f39e18c840c401a3cb639bc1b28
616cf3b04e961cada6a6d13788d372cea3e260d8
refs/heads/master
2021-05-02T16:25:09.761450
2020-06-11T02:47:13
2020-06-11T02:47:13
62,503,993
0
0
null
null
null
null
UTF-8
Java
false
false
1,473
java
package com.rajaraghvendra.solutions; /** * 880. Decoded String at Index * * An encoded string S is given. To find and write the decoded string to a tape, * the encoded string is read one character at a time and the following steps are taken: * If the character read is a letter, that letter is written onto the tape. * If the character read is a digit (say d), the entire current tape is repeatedly written d-1 more times in total. * Now for some encoded string S, and an index K, find and return the K-th letter (1 indexed) in the decoded string. * * Example 1: * Input: S = "leet2code3", K = 10 * Output: "o" * Explanation: * The decoded string is "leetleetcodeleetleetcodeleetleetcode". * The 10th letter in the string is "o". * * Example 2: * Input: S = "ha22", K = 5 * Output: "h" * Explanation: * The decoded string is "hahahaha". The 5th letter is "h". * * Example 3: * Input: S = "a2345678999999999999999", K = 1 * Output: "a" * Explanation: * The decoded string is "a" repeated 8301530446056247680 times. The 1st letter is "a". * * Note: * 2 <= S.length <= 100 * S will only contain lowercase letters and digits 2 through 9. * S starts with a letter. * 1 <= K <= 10^9 * The decoded string is guaranteed to have less than 2^63 letters. * */ public class _880 { public static class Solution1 { public String decodeAtIndex(String S, int K) { //TODO: implement it return ""; } } }
[ "rajaraghvendra@gmail.com" ]
rajaraghvendra@gmail.com
6e484016e0d72f5a621f8f9ef373b67bd4fb4fa4
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/fc/func/rec/FC_FUNC_1080_MDEPSCLSFLISTRecord.java
54e4fba15a9788c29c4aa62a42314b4557497897
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
1,736
java
/*************************************************************************************************** * 파일명 : .java * 기능 : 독자우대-구독신청 * 작성일자 : 2007-05-22 * 작성자 : 김대섭 ***************************************************************************************************/ /*************************************************************************************************** * 수정내역 : * 수정자 : * 수정일자 : * 백업 : ***************************************************************************************************/ package chosun.ciis.fc.func.rec; import java.sql.*; import chosun.ciis.fc.func.dm.*; import chosun.ciis.fc.func.ds.*; /** * */ public class FC_FUNC_1080_MDEPSCLSFLISTRecord extends java.lang.Object implements java.io.Serializable{ public String cd; public String cdnm; public String cd_abrv_nm; public String cdnm_cd; public String cdabrvnm_cd; public FC_FUNC_1080_MDEPSCLSFLISTRecord(){} public void setCd(String cd){ this.cd = cd; } public void setCdnm(String cdnm){ this.cdnm = cdnm; } public void setCd_abrv_nm(String cd_abrv_nm){ this.cd_abrv_nm = cd_abrv_nm; } public void setCdnm_cd(String cdnm_cd){ this.cdnm_cd = cdnm_cd; } public void setCdabrvnm_cd(String cdabrvnm_cd){ this.cdabrvnm_cd = cdabrvnm_cd; } public String getCd(){ return this.cd; } public String getCdnm(){ return this.cdnm; } public String getCd_abrv_nm(){ return this.cd_abrv_nm; } public String getCdnm_cd(){ return this.cdnm_cd; } public String getCdabrvnm_cd(){ return this.cdabrvnm_cd; } } /* 작성시간 : Fri Jul 20 10:43:34 KST 2018 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
d3e65f9f8429664cb9ab4b471eb4dc442aadd28c
774d36285e48bd429017b6901a59b8e3a51d6add
/sources/com/google/android/gms/internal/ads/zzbqr.java
afb5280137d8877863504f7beacfb22dfcc29720
[]
no_license
jorge-luque/hb
83c086851a409e7e476298ffdf6ba0c8d06911db
b467a9af24164f7561057e5bcd19cdbc8647d2e5
refs/heads/master
2023-08-25T09:32:18.793176
2020-10-02T11:02:01
2020-10-02T11:02:01
300,586,541
0
0
null
null
null
null
UTF-8
Java
false
false
609
java
package com.google.android.gms.internal.ads; /* compiled from: com.google.android.gms:play-services-ads@@19.1.0 */ public final class zzbqr implements zzegz<zzbqs> { private final zzehm<zzdgo> zzfkc; private final zzehm<String> zzfmz; private zzbqr(zzehm<zzdgo> zzehm, zzehm<String> zzehm2) { this.zzfkc = zzehm; this.zzfmz = zzehm2; } public static zzbqr zzm(zzehm<zzdgo> zzehm, zzehm<String> zzehm2) { return new zzbqr(zzehm, zzehm2); } public final /* synthetic */ Object get() { return new zzbqs(this.zzfkc.get(), this.zzfmz.get()); } }
[ "jorge.luque@taiger.com" ]
jorge.luque@taiger.com
964ed3b2cd20b70ed9099c266831b33f586fef0b
644ad0ed4887afeba93e4818f42bcfaa2f5cb155
/androidFramework/src/com/android/androidframework/net/ResponseMessage.java
8ad5cfab5f1b490e1fd884e1857e36cde2514748
[ "Apache-2.0" ]
permissive
tianduAndroidDeveloper/xuweiApp
dfa6106d25345383bd6495170f4f398c28392a97
811f1013d408656bea693ede7c94cf34cf982685
refs/heads/master
2016-08-09T02:14:46.601574
2015-12-02T02:46:25
2015-12-02T02:46:25
46,919,029
0
0
null
null
null
null
UTF-8
Java
false
false
941
java
package com.android.androidframework.net; import java.io.InputStream; import java.io.Serializable; public class ResponseMessage implements Serializable { private static final long serialVersionUID = -7060210544600464481L; private int mCode; private String mMsg; private InputStream mIs; private byte[] mReceivedData = null; final public void setCode(int code) { mCode = code; } final public void setMsg(String msg) { mMsg = msg; } final public void setData(byte[] data) { mReceivedData = data; } final public int getCode() { return mCode; } final public String getMsg() { return mMsg; } final public byte[] getData() { return mReceivedData; } final public void setInstream(InputStream is){ mIs = is; } final public InputStream getmIs(){ return mIs; } }
[ "852411097@qq.com" ]
852411097@qq.com
cc4da3ec0751932510a00a43bfc41b846fcc6565
1fee3309ce16b05bf947f43a4bf07137cbe9bede
/src/main/java/com/domin/card/hinterlands/Cartographer.java
da0fe6e4d5f854864f81e56c516c279747944a60
[]
no_license
lunias/domin
c09d04c51d23114dad3281f7c0c52bbda60d5c88
1c764d18c1d07c23b2ebb36594f45be93c83f0c7
refs/heads/master
2021-03-12T22:35:59.167123
2020-02-14T02:06:56
2020-02-14T02:06:56
37,860,148
0
0
null
2020-10-13T08:28:42
2015-06-22T14:30:58
Java
UTF-8
Java
false
false
1,226
java
package com.domin.card.hinterlands; import java.util.List; import com.domin.card.Card; import com.domin.card.CardCost; import com.domin.card.CardSet; import com.domin.card.CardType; import com.domin.net.CardEventPacket; import com.domin.net.DominClient; import com.domin.player.CardEventType; import com.domin.player.Player; import com.domin.ui.util.StageManager; public class Cartographer extends Card { private static final long serialVersionUID = 1L; public Cartographer() { super("Cartographer", CardSet.HINTERLANDS, new CardType[] {CardType.ACTION}, new CardCost(5)); } public void play(Player player, DominClient connection) { player.draw(); List<Card> popList = player.popDeck(4); List<Card> discardList = StageManager.INSTANCE.createCardChoiceView(player, "Discard", "Discard Cards", popList, -1, false); for (Card card : discardList) { popList.remove(card); connection.send(new CardEventPacket(card, CardEventType.DISCARD)); player.getDiscardPile().add(card); } List<Card> toTop = StageManager.INSTANCE.createCardChoiceView(player, "Choice", "Put Cards on top of your deck", popList, -1, false); for (Card card : toTop) { player.addToTopOfDeck(card); } } }
[ "ethanaa@gmail.com" ]
ethanaa@gmail.com
5b87ffc0577b2ffdb5b87df05d3787e437935124
682ced5ccb90386f2140b51efddd123e7ff381a3
/library/src/main/java/com/library/http/RequestLogInterceptor.java
f98d1b120ec782fb0c4b72a1dca9b26169bb14d8
[]
no_license
Just-Maybe/GraduationProject
abe017ee4bb679202b8902266c9092bf9aed93f2
771f3fc765ad62844566b2dc280a4ece3558b2b6
refs/heads/master
2021-09-06T07:58:38.035901
2018-02-04T02:52:52
2018-02-04T02:52:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,467
java
package com.library.http; import android.util.Log; import com.library.utils.LogUtil; import com.library.utils.NewLogUtils; import java.io.IOException; import java.nio.charset.Charset; import okhttp3.Interceptor; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; import okhttp3.ResponseBody; import okio.Buffer; /** * Created by zhangdeming on 16/4/25. */ public class RequestLogInterceptor implements Interceptor { private static final Charset UTF8 = Charset.forName("UTF-8"); @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); Response response = chain.proceed(request); RequestBody requestBody = request.body(); ResponseBody responseBody = response.body(); String responseBodyString = responseBody.string(); String requestMessage; requestMessage = request.method() + ' ' + request.url(); if (requestBody != null) { Buffer buffer = new Buffer(); requestBody.writeTo(buffer); requestMessage += "?\n" + buffer.readString(UTF8); } LogUtil.e("RequestLogInterceptor", requestMessage); LogUtil.e("RequestLogInterceptor", request.method() + ' ' + request.url() + ' ' + responseBodyString); return response.newBuilder().body(ResponseBody.create(responseBody.contentType(), responseBodyString.getBytes())).build(); } }
[ "122094709@qq.com" ]
122094709@qq.com
f5437ae29ffa377661385d02f10ce37f0d674206
b926f7be857732e49ce2e86f9a6196e7763200c8
/src/org/holoeverywhere/preference/PreferenceFragment.java
8d25223337db558ae1a2914a0670d8577082149d
[ "Apache-2.0" ]
permissive
fredgrott/GWSHolmesWatson
93375d85963e87cc1f882efaa03c978ca8894e03
1c235255a79dc8e762f09b6a10dce96ae984c034
refs/heads/master
2021-05-26T17:01:46.133958
2013-04-15T19:23:16
2013-04-15T19:23:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,192
java
package org.holoeverywhere.preference; import org.holoeverywhere.LayoutInflater; import org.holoeverywhere.app.Fragment; import org.holoeverywhere.widget.ListView; import com.actionbarsherlock.R; import android.annotation.SuppressLint; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.view.KeyEvent; import android.view.View; import android.view.View.OnKeyListener; import android.view.ViewGroup; @SuppressLint("HandlerLeak") public abstract class PreferenceFragment extends Fragment implements PreferenceManager.OnPreferenceTreeClickListener { public interface OnPreferenceStartFragmentCallback { boolean onPreferenceStartFragment(PreferenceFragment caller, Preference pref); } private static final int FIRST_REQUEST_CODE = 100; private static final int MSG_BIND_PREFERENCES = 1; private static final String PREFERENCES_TAG = "android:preferences"; static { PreferenceInit.init(); } private Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) { switch (msg.what) { case MSG_BIND_PREFERENCES: bindPreferences(); break; } } }; private boolean mHavePrefs, mInitDone; private ListView mList; private OnKeyListener mListOnKeyListener = new OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { Object selectedItem = mList.getSelectedItem(); if (selectedItem instanceof Preference) { View selectedView = mList.getSelectedView(); return ((Preference) selectedItem).onKey(selectedView, keyCode, event); } return false; } }; private PreferenceManager mPreferenceManager; final private Runnable mRequestFocus = new Runnable() { @Override public void run() { mList.focusableViewAvailable(mList); } }; public void addPreferencesFromIntent(Intent intent) { requirePreferenceManager(); setPreferenceScreen(mPreferenceManager.inflateFromIntent(intent, getPreferenceScreen())); } public void addPreferencesFromResource(int preferencesResId) { requirePreferenceManager(); setPreferenceScreen(mPreferenceManager.inflateFromResource( getActivity(), preferencesResId, getPreferenceScreen())); } private void bindPreferences() { final PreferenceScreen preferenceScreen = getPreferenceScreen(); if (preferenceScreen != null) { preferenceScreen.bind(getListView()); } } private void ensureList() { if (mList != null) { return; } View root = getView(); if (root == null) { throw new IllegalStateException("Content view not yet created"); } View rawListView = root.findViewById(android.R.id.list); if (!(rawListView instanceof ListView)) { throw new RuntimeException( "Content has view with id attribute 'android.R.id.list' " + "that is not a ListView class"); } mList = (ListView) rawListView; if (mList == null) { throw new RuntimeException( "Your content must have a ListView whose id attribute is " + "'android.R.id.list'"); } mList.setOnKeyListener(mListOnKeyListener); mHandler.post(mRequestFocus); } public Preference findPreference(CharSequence key) { if (mPreferenceManager == null) { return null; } return mPreferenceManager.findPreference(key); } public Preference findPreference(int id) { if (mPreferenceManager == null) { return null; } return mPreferenceManager.findPreference(id); } public ListView getListView() { ensureList(); return mList; } public PreferenceManager getPreferenceManager() { return mPreferenceManager; } public PreferenceScreen getPreferenceScreen() { return mPreferenceManager.getPreferenceScreen(); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if (mHavePrefs) { bindPreferences(); } mInitDone = true; if (savedInstanceState != null) { Bundle container = savedInstanceState .getBundle(PreferenceFragment.PREFERENCES_TAG); if (container != null) { final PreferenceScreen preferenceScreen = getPreferenceScreen(); if (preferenceScreen != null) { preferenceScreen.restoreHierarchyState(container); } } } } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); mPreferenceManager .dispatchActivityResult(requestCode, resultCode, data); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mPreferenceManager = new PreferenceManager(getSupportActivity(), PreferenceFragment.FIRST_REQUEST_CODE); mPreferenceManager.setFragment(this); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.he_prefs_preference_list_fragment, container, false); } @Override public void onDestroy() { super.onDestroy(); mPreferenceManager.dispatchActivityDestroy(); } @Override public void onDestroyView() { mList = null; mHandler.removeCallbacks(mRequestFocus); mHandler.removeMessages(PreferenceFragment.MSG_BIND_PREFERENCES); super.onDestroyView(); } @Override public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { if (preference.getFragment() != null && getActivity() instanceof OnPreferenceStartFragmentCallback) { return ((OnPreferenceStartFragmentCallback) getActivity()) .onPreferenceStartFragment(this, preference); } return false; } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); final PreferenceScreen preferenceScreen = getPreferenceScreen(); if (preferenceScreen != null) { Bundle container = new Bundle(); preferenceScreen.saveHierarchyState(container); outState.putBundle(PreferenceFragment.PREFERENCES_TAG, container); } } @Override public void onStart() { super.onStart(); mPreferenceManager.setOnPreferenceTreeClickListener(this); } @Override public void onStop() { super.onStop(); mPreferenceManager.dispatchActivityStop(); mPreferenceManager.setOnPreferenceTreeClickListener(null); } private void postBindPreferences() { if (mHandler.hasMessages(PreferenceFragment.MSG_BIND_PREFERENCES)) { return; } mHandler.obtainMessage(PreferenceFragment.MSG_BIND_PREFERENCES) .sendToTarget(); } private void requirePreferenceManager() { if (mPreferenceManager == null) { throw new RuntimeException( "This should be called after super.onCreate."); } } public void setPreferenceScreen(PreferenceScreen preferenceScreen) { if (mPreferenceManager.setPreferences(preferenceScreen) && preferenceScreen != null) { mHavePrefs = true; if (mInitDone) { postBindPreferences(); } } } }
[ "fred.grott@gmail.com" ]
fred.grott@gmail.com
1bae2cf86a2417f938f5bb70585adc8fbb99e517
150c62cf7b1c7548daf1bf14c7bc4cbfb886fd19
/demo-wx-cs/src/main/java/com/demo/wx/constant/WeixinFinalValue.java
c20e369d2dc8d9e24a04bc423e2e1e9bd295ab49
[]
no_license
xiaozichen/demo-wx
e48ea215653d4e57ce5aed98b3f84bb386d96d91
27e9dd23c16ed3d8ad4422744bb3b9d57bdab0da
refs/heads/master
2020-05-20T06:16:41.218969
2019-05-08T14:52:51
2019-05-08T14:52:51
185,425,521
0
0
null
null
null
null
UTF-8
Java
false
false
2,832
java
package com.demo.wx.constant; public class WeixinFinalValue { public final static String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET"; public final static String MENU_ADD = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=ACCESS_TOKEN"; public final static String MENU_QUERY = "https://api.weixin.qq.com/cgi-bin/menu/get?access_token=ACCESS_TOKEN"; public final static String MSG_TEXT_TYPE = "text"; public final static String MSG_IMAGE_TYPE = "image"; public final static String MSG_VOICE_TYPE = "voice"; public final static String MSG_VIDEO_TYPE = "video"; public final static String MSG_SHORTVIDEO_TYPE = "shortvideo"; public final static String MSG_LOCATION_TYPE = "location"; public final static String MSG_EVENT_TYPE = "event"; public final static String POST_MEDIA="https://api.weixin.qq.com/cgi-bin/media/upload?access_token=ACCESS_TOKEN&type=TYPE"; public final static String GET_MEDIA="https://api.weixin.qq.com/cgi-bin/media/get?access_token=ACCESS_TOKEN&media_id=MEDIA_ID"; public final static String SEND_TEMPLATE_MSG = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=ACCESS_TOKEN"; public final static String USER_QUERY = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN"; public final static String AUTH_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect"; public final static String AUTH_GET_OID = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code"; public final static String ADD_GROUP = "https://api.weixin.qq.com/cgi-bin/groups/create?access_token=ACCESS_TOKEN"; public final static String QUERY_ALL_GROUP = "https://api.weixin.qq.com/cgi-bin/groups/get?access_token=ACCESS_TOKEN"; public final static String QUERY_USER_GROUP = "https://api.weixin.qq.com/cgi-bin/groups/getid?access_token=ACCESS_TOKEN"; public final static String UPDATE_GROUP_NAME = "https://api.weixin.qq.com/cgi-bin/groups/update?access_token=ACCESS_TOKEN"; public final static String MOVE_USER_GROUP = "https://api.weixin.qq.com/cgi-bin/groups/members/update?access_token=ACCESS_TOKEN"; public final static String MOVE_USERS_GROUP = "https://api.weixin.qq.com/cgi-bin/groups/members/batchupdate?access_token=ACCESS_TOKEN"; public final static String DELETE_GROUP = "https://api.weixin.qq.com/cgi-bin/groups/delete?access_token=ACCESS_TOKEN"; public final static String QR_GET = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=ACCESS_TOKEN"; public final static String KF_ADD = "https://api.weixin.qq.com/customservice/kfaccount/add?access_token=ACCESS_TOKEN"; }
[ "11" ]
11
9db85df37775303193d32c95d38f46234ffe3df5
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_4415f45155181fddf860f2f4066f8192ed5f10c8/MapObject/7_4415f45155181fddf860f2f4066f8192ed5f10c8_MapObject_s.java
4df06d99cba3323fde4410c3f6c1aed6113a8a9f
[]
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
715
java
package net.fourbytes.shadow.map; import com.badlogic.gdx.utils.ObjectMap; import net.fourbytes.shadow.stream.Data; /** * A MapObject contains needed data to create a "fresh" object (as when loading an .tmx) and / or * additional data (f.e. fluid height, [insert example here], ...). */ public class MapObject extends Data { public float x; public float y; public String type; public String subtype; public int layer; public ObjectMap<String, Object> args; public MapObject() { } public MapObject(String type, String subtype, int layer, ObjectMap<String, Object> args) { this.type = type; this.subtype = subtype; this.layer = layer; this.args = args; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c71de67b4166c8775cd43a20767849fb73b89a49
7398714c498444374047497fe2e9c9ad51239034
/java/util/function/-$$Lambda$Function$1mm3dZ9IMG2T6zAULCCEh3eoHSY.java
7bf5b3aa8026e45605a3bfefe9b6f3c4a9ee6849
[]
no_license
CheatBoss/InnerCore-horizon-sources
b3609694df499ccac5f133d64be03962f9f767ef
84b72431e7cb702b7d929c61c340a8db07d6ece1
refs/heads/main
2023-04-07T07:30:19.725432
2021-04-10T01:23:04
2021-04-10T01:23:04
356,437,521
1
0
null
null
null
null
UTF-8
Java
false
false
6,638
java
package java.util.function; public final class -$$Lambda$Function$1mm3dZ9IMG2T6zAULCCEh3eoHSY implements Function { @Override public <V> Function<Object, V> andThen(final Function<?, ? extends V> p0) { // // This method could not be decompiled. // // Could not show original bytecode, likely due to the same error. // // The error that occurred was: // // java.lang.NullPointerException // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:25) // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:21) // at com.strobel.assembler.metadata.MetadataHelper$5.visitWildcard(MetadataHelper.java:1793) // at com.strobel.assembler.metadata.MetadataHelper$5.visitWildcard(MetadataHelper.java:1790) // at com.strobel.assembler.metadata.WildcardType.accept(WildcardType.java:83) // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:25) // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:21) // at com.strobel.assembler.metadata.MetadataHelper.getLowerBound(MetadataHelper.java:1240) // at com.strobel.assembler.metadata.MetadataHelper$Adapter.visitWildcard(MetadataHelper.java:2278) // at com.strobel.assembler.metadata.MetadataHelper$Adapter.visitWildcard(MetadataHelper.java:2222) // at com.strobel.assembler.metadata.WildcardType.accept(WildcardType.java:83) // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:25) // at com.strobel.assembler.metadata.MetadataHelper$Adapter.adaptRecursive(MetadataHelper.java:2256) // at com.strobel.assembler.metadata.MetadataHelper$Adapter.adaptRecursive(MetadataHelper.java:2233) // at com.strobel.assembler.metadata.MetadataHelper$Adapter.visitParameterizedType(MetadataHelper.java:2246) // at com.strobel.assembler.metadata.MetadataHelper$Adapter.visitParameterizedType(MetadataHelper.java:2222) // at com.strobel.assembler.metadata.CoreMetadataFactory$UnresolvedGenericType.accept(CoreMetadataFactory.java:653) // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:25) // at com.strobel.assembler.metadata.MetadataHelper.adapt(MetadataHelper.java:1312) // at com.strobel.assembler.metadata.MetadataHelper$11.visitClassType(MetadataHelper.java:2708) // at com.strobel.assembler.metadata.MetadataHelper$11.visitClassType(MetadataHelper.java:2692) // at com.strobel.assembler.metadata.DefaultTypeVisitor.visitParameterizedType(DefaultTypeVisitor.java:65) // at com.strobel.assembler.metadata.CoreMetadataFactory$UnresolvedGenericType.accept(CoreMetadataFactory.java:653) // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:25) // at com.strobel.assembler.metadata.MetadataHelper.asSubType(MetadataHelper.java:720) // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:926) // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803) // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:770) // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:766) // at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2515) // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1029) // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803) // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778) // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1656) // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803) // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:672) // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:655) // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:365) // at com.strobel.decompiler.ast.TypeAnalysis.run(TypeAnalysis.java:96) // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:109) // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:42) // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:214) // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99) // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782) // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675) // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552) // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519) // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161) // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150) // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:125) // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71) // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59) // at us.deathmarine.luyten.FileSaver.doSaveJarDecompiled(FileSaver.java:192) // at us.deathmarine.luyten.FileSaver.access$300(FileSaver.java:45) // at us.deathmarine.luyten.FileSaver$4.run(FileSaver.java:112) // at java.lang.Thread.run(Unknown Source) // throw new IllegalStateException("An error occurred while decompiling this method."); } @Override public final Object apply(final Object o) { return Function-CC.lambda$identity$2(o); } @Override public <V> Function<V, Object> compose(final Function<? super V, ?> function) { return Function-CC.$default$compose(function); } }
[ "cheat.boss1@gmail.com" ]
cheat.boss1@gmail.com
c27ca2ae721400aba334577b31be3792d9336a6f
8be486e9c51be896fb07c765c8655093e2f531f8
/src/sort/UseInsertionSort.java
da6e7af4e83ebdb1396558cf8f251d877a9e7894
[]
no_license
PeopleNTechJavaSelenium/July2016DS
1e57e537520a3aa0a8826bbddd1542537487ff3f
e02e8fea3f5cab2ad9e3c3b5c45dfbbcd5104ed8
refs/heads/master
2021-01-17T23:24:49.576131
2016-08-07T01:02:18
2016-08-07T01:02:18
64,611,661
0
1
null
null
null
null
UTF-8
Java
false
false
547
java
package sort; /** * Created by rrt on 8/6/2016. */ public class UseInsertionSort { public static void main(String[] args) { int [] list = {9,6,7,0,3,5}; for(int i=1; i<list.length; i++){ for(int j=i; j>0; j--){ if(list[j]<list[j-1]){ int temp = list[j-1]; list[j-1] = list[j]; list[j] = temp; } } } for(int n=0; n<list.length; n++){ System.out.println(list[n]); } } }
[ "rahmanww@gmail.com" ]
rahmanww@gmail.com
92eb97ab0c3591b047b75cc36a1311a9e02fd930
e27942cce249f7d62b7dc8c9b86cd40391c1ddd4
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201702/cm/LocationCriterionServiceInterfacequery.java
a7d0ddad4eeaabe97ce7ca2e0889ff6c05208cb5
[ "Apache-2.0" ]
permissive
mo4ss/googleads-java-lib
b4b6178747d25d16ae6aa0c80d80ee18a2dfe01a
efaa9c3bd8a46a3ed4b00963dc9760c6dd8bd641
refs/heads/master
2022-12-05T00:30:56.740813
2022-11-16T10:47:15
2022-11-16T10:47:15
108,132,394
0
0
Apache-2.0
2022-11-16T10:47:16
2017-10-24T13:41:43
Java
UTF-8
Java
false
false
2,432
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.adwords.jaxws.v201702.cm; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * * Returns the list of {@link LocationCriterion}s that match the query. * * @param query The SQL-like AWQL query string * @returns The list of location criteria * @throws ApiException when the query is invalid or there are errors processing the request. * * * <p>Java class for query element declaration. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;element name="query"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="query" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "query" }) @XmlRootElement(name = "query") public class LocationCriterionServiceInterfacequery { protected String query; /** * Gets the value of the query property. * * @return * possible object is * {@link String } * */ public String getQuery() { return query; } /** * Sets the value of the query property. * * @param value * allowed object is * {@link String } * */ public void setQuery(String value) { this.query = value; } }
[ "jradcliff@users.noreply.github.com" ]
jradcliff@users.noreply.github.com
2e336c19c6237c6c75a008cc2debfafe504e252d
b25bc27814268b64d937913c8286b416d78e6d37
/web/src/main/java/com/baidu/oped/apm/mvc/vo/callstack/CallTree.java
c46fb026380700de38e83ee99ff674e8bcee532c
[]
no_license
masonmei/apm
d6a276ac79a5edeb6cfcac3ff5411b9577a3627b
d95c027113f7274d275adb0b9352a16aa76043f5
refs/heads/master
2020-05-17T21:45:53.292956
2015-12-01T11:04:46
2015-12-01T11:04:46
40,586,633
1
2
null
null
null
null
UTF-8
Java
false
false
334
java
package com.baidu.oped.apm.mvc.vo.callstack; /** * Created by mason on 10/13/15. */ public interface CallTree extends Iterable<CallTreeNode> { CallTreeNode getRoot(); CallTreeIterator iterator(); boolean isEmpty(); void add(CallTree callTree); void add(int depth, CallTreeAlign align); void sort(); }
[ "dongxu.m@gmail.com" ]
dongxu.m@gmail.com
cfc4b9c9b9f532c5b2bc1ff6ff85a26390025d2f
47eb5bf54da6c19ca175fc8938ca9b6a2b545dfa
/euicc-sr-container/src/main/java/com/whty/euicc/handler/SrHandler.java
df256495fff5f08cc68147fe043d87eb9e3a6de1
[]
no_license
liszhu/whatever_ty
44ddb837f2de19cb980c28fe06e6634f9d6bd8cb
e02ef9e125cac9103848c776e420edcf0dcaed2f
refs/heads/master
2021-12-13T21:37:06.539805
2017-04-05T01:50:23
2017-04-05T01:50:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,820
java
package com.whty.euicc.handler; import java.io.UnsupportedEncodingException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import com.google.gson.Gson; import com.telecom.http.tls.test.Util; import com.whty.cache.CacheUtil; import com.whty.euicc.common.spring.SpringContextHolder; import com.whty.euicc.common.utils.TlsMessageUtils; import com.whty.euicc.data.pojo.SmsTrigger; import com.whty.euicc.handler.base.AbstractHandler; import com.whty.util.StringUtils; /** * 接收卡片请求路由处理 * @author Administrator * */ @Service("msgBusiTypeSr") public class SrHandler extends AbstractHandler{ final static Logger logger = LoggerFactory.getLogger(SrHandler.class); /** * 下发apdu或者其它形式命令给eUICC卡片 * @param requestStr * @return */ public byte[] handle(String requestStr) { logger.info("==========sr handle接收来自卡片消息=========="); String reqMsg = requestStr; logger.debug("sr请求消息明文 : {}", reqMsg); String eid = TlsMessageUtils.getEid(requestStr); String smsTrigger = CacheUtil.getString(eid);//eid if(StringUtils.isEmpty(smsTrigger)){ return null; } SmsTrigger eventTrigger = new Gson().fromJson(smsTrigger,SmsTrigger.class); String eventType = eventTrigger.getEventType(); AbstractHandler msgHandler = (AbstractHandler) SpringContextHolder.getBean(eventType); byte[] respMsg = msgHandler.handle(reqMsg); printLog(respMsg); return respMsg; } private void printLog(byte[] respMsg) { try { String message=Util.byteArrayToHexString(respMsg, ""); int endOfDbl0D0A=message.indexOf("0D0A0D0A")+"0D0A0D0A".length(); logger.debug("响应消息明文 : {}", Util.hexToASCII(message.substring(0, endOfDbl0D0A)) + message.substring(endOfDbl0D0A)); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } } /** * 检查eUICC卡片返回结果 * @param requestStr * @return */ public boolean checkProcessResp(String requestStr) { logger.info("==========sr checkProcessResp 接收来自卡片消息=========="); String reqMsg = requestStr; logger.debug("请求消息明文 : {}", reqMsg); String eid = TlsMessageUtils.getEid(requestStr); String smsTrigger = CacheUtil.getString(eid);//eid if(StringUtils.isEmpty(smsTrigger)){ return false; } SmsTrigger eventTrigger = new Gson().fromJson(smsTrigger,SmsTrigger.class); String eventType = eventTrigger.getEventType(); AbstractHandler msgHandler = (AbstractHandler) SpringContextHolder .getBean(eventType); boolean flag = msgHandler.checkProcessResp(reqMsg); logger.debug("处理返回结果 : {}", flag); return flag; } }
[ "652241956@qq.com" ]
652241956@qq.com
27fd2e42742f2a9c2ab1f0a26bcc7a08d2fd37ec
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/com/zhihu/android/videotopic/p2060ui/widget/VideoSerialVideoView.java
4530ff44834a95398bbf9c817efa58fb252d8bb3
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
851
java
package com.zhihu.android.videotopic.p2060ui.widget; import android.content.Context; import android.util.AttributeSet; import com.zhihu.android.video.player2.widget.ZHPluginVideoView; /* renamed from: com.zhihu.android.videotopic.ui.widget.VideoSerialVideoView */ public class VideoSerialVideoView extends ZHPluginVideoView { /* renamed from: a */ private int f96560a; public VideoSerialVideoView(Context context) { super(context); } public VideoSerialVideoView(Context context, AttributeSet attributeSet) { super(context, attributeSet); } public VideoSerialVideoView(Context context, AttributeSet attributeSet, int i) { super(context, attributeSet, i); } public int getIndex() { return this.f96560a; } public void setIndex(int i) { this.f96560a = i; } }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
ec23f3a673cc7fc4451d4232a75244941821da5e
8528456670f52db850b5b557cea78d550a3ee116
/src/main/java/org/eclipse/microprofile/starter/log/ErrorLogger.java
f5495d551c737d7fa65e38a38f4b4b70ba9e976d
[ "Apache-2.0" ]
permissive
seregamorph/microprofile-starter
7f163b101b2f48aedd93088172705bf29f60e294
508c9aa108c35e41a7eb7218604f36fe176346be
refs/heads/master
2023-08-16T08:28:32.884113
2021-09-20T13:13:28
2021-09-20T13:13:28
413,205,132
1
0
Apache-2.0
2021-10-03T21:51:04
2021-10-03T21:51:03
null
UTF-8
Java
false
false
1,739
java
/* * Copyright (c) 2019 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. * * 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.eclipse.microprofile.starter.log; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.eclipse.microprofile.starter.core.model.JessieModel; import javax.enterprise.context.ApplicationScoped; import java.io.PrintWriter; import java.io.StringWriter; @ApplicationScoped public class ErrorLogger { public void logError(Throwable e, JessieModel model) { ObjectMapper mapper = new ObjectMapper(); String json = null; try { json = mapper.writeValueAsString(model); } catch (JsonProcessingException ex) { ex.printStackTrace(); } System.err.println(String.format("Error during generation of project: \n Model : %s \n Stacktrace %s", json, stacktrace(e))); } private String stacktrace(Throwable e) { StringWriter sw = new StringWriter(); e.printStackTrace(new PrintWriter(sw)); return sw.toString(); } }
[ "rdebusscher@gmail.com" ]
rdebusscher@gmail.com
041053f0a600dcefdb682e24c4c8e9976a6641dd
56afb8c79e15a1a5109377a1ba0c872fda2e5005
/java/blog/src/main/java/com/snow/ly/blog/common/repository/UsRepository.java
68a9a5df9c9fe0b9d5d236544edae5f514c4ce90
[]
no_license
cqwu729/201803-ltxm
36f30877416698c49f787a686a2766b45d46db60
a3e465fab60aed924b188d4e208a74b072f89525
refs/heads/master
2020-04-11T11:45:22.167403
2018-12-14T09:02:57
2018-12-14T09:02:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
230
java
package com.snow.ly.blog.common.repository; import com.snow.ly.blog.common.pojo.Us; import org.springframework.data.mongodb.repository.MongoRepository; public interface UsRepository extends MongoRepository<Us,String> { }
[ "997342977@qq.com" ]
997342977@qq.com
3c3c8e24ee7ede6d8d611d76ef21493f53005c7b
3cd69da4d40f2d97130b5bf15045ba09c219f1fa
/sources/com/google/android/gms/measurement/internal/zzcs.java
7a0b35608760984a33e8d9619c88ebf1d9fd7563
[]
no_license
TheWizard91/Album_base_source_from_JADX
946ea3a407b4815ac855ce4313b97bd42e8cab41
e1d228fc2ee550ac19eeac700254af8b0f96080a
refs/heads/master
2023-01-09T08:37:22.062350
2020-11-11T09:52:40
2020-11-11T09:52:40
311,927,971
0
0
null
null
null
null
UTF-8
Java
false
false
399
java
package com.google.android.gms.measurement.internal; import com.google.android.gms.internal.measurement.zzol; /* compiled from: com.google.android.gms:play-services-measurement-impl@@17.4.4 */ final /* synthetic */ class zzcs implements zzem { static final zzem zza = new zzcs(); private zzcs() { } public final Object zza() { return Boolean.valueOf(zzol.zzd()); } }
[ "agiapong@gmail.com" ]
agiapong@gmail.com
375e351eea1b9ab2114d16c0e4bfc7f1614be967
86d55252ca2ee808fcfeec04f7c6b7f8aeba86d0
/modules/citrus-integration/src/citrus/java/com/consol/citrus/javadsl/design/SoapHeaderFragmentJavaITest.java
fa59182a81693454db149712e03de25f8b820ff1
[ "Apache-2.0" ]
permissive
Kuvaldis/citrus
26b65d2cd7fd59b0fcaddf1c4a910c6eef52b884
ef59ac3bec5a2a0b8b93d55a40fcf2c3f7deaeb3
refs/heads/master
2020-04-06T06:51:46.423068
2015-07-13T08:07:54
2015-07-13T08:07:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,370
java
/* * Copyright 2006-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.consol.citrus.javadsl.design; import com.consol.citrus.dsl.testng.TestNGCitrusTestDesigner; import com.consol.citrus.annotations.CitrusTest; import org.testng.annotations.Test; /** * @author Christoph Deppisch */ @Test public class SoapHeaderFragmentJavaITest extends TestNGCitrusTestDesigner { @CitrusTest public void SoapHeaderFragmentJavaITest() { variable("correlationId", "citrus:randomNumber(10)"); variable("messageId", "citrus:randomNumber(10)"); variable("user", "Christoph"); send("webServiceClient") .payload("<ns0:HelloRequest xmlns:ns0=\"http://www.consol.de/schemas/samples/sayHello.xsd\">" + "<ns0:MessageId>${messageId}</ns0:MessageId>" + "<ns0:CorrelationId>${correlationId}</ns0:CorrelationId>" + "<ns0:User>${user}</ns0:User>" + "<ns0:Text>Hello WebServer</ns0:Text>" + "</ns0:HelloRequest>") .header("{http://citrusframework.org/test}Operation", "sayHello") .header("citrus_http_operation", "sayHello") .header("citrus_soap_action", "sayHello") .header("<ns0:HelloHeader xmlns:ns0=\"http://www.consol.de/schemas/samples/sayHello.xsd\">" + "<ns0:MessageId>${messageId}</ns0:MessageId>" + "<ns0:CorrelationId>${correlationId}</ns0:CorrelationId>" + "<ns0:User>${user}</ns0:User>" + "<ns0:Text>Hello WebServer</ns0:Text>" + "</ns0:HelloHeader>") .soap() .fork(true); receive("webServiceRequestReceiver") .payload("<ns0:HelloRequest xmlns:ns0=\"http://www.consol.de/schemas/samples/sayHello.xsd\">" + "<ns0:MessageId>${messageId}</ns0:MessageId>" + "<ns0:CorrelationId>${correlationId}</ns0:CorrelationId>" + "<ns0:User>${user}</ns0:User>" + "<ns0:Text>Hello WebServer</ns0:Text>" + "</ns0:HelloRequest>") .header("Operation", "sayHello") .header("operation", "sayHello") .header("citrus_soap_action", "sayHello") .header("<SOAP-ENV:Header xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\">" + "<Operation xmlns=\"http://citrusframework.org/test\">sayHello</Operation>" + "<ns0:HelloHeader xmlns:ns0=\"http://www.consol.de/schemas/samples/sayHello.xsd\">" + "<ns0:MessageId>${messageId}</ns0:MessageId>" + "<ns0:CorrelationId>${correlationId}</ns0:CorrelationId>" + "<ns0:User>${user}</ns0:User>" + "<ns0:Text>Hello WebServer</ns0:Text>" + "</ns0:HelloHeader>" + "</SOAP-ENV:Header>") .schemaValidation(false) .extractFromHeader("citrus_jms_messageId", "internal_correlation_id"); send("webServiceResponseSender") .payload("<ns0:HelloResponse xmlns:ns0=\"http://www.consol.de/schemas/samples/sayHello.xsd\">" + "<ns0:MessageId>${messageId}</ns0:MessageId>" + "<ns0:CorrelationId>${correlationId}</ns0:CorrelationId>" + "<ns0:User>WebServer</ns0:User>" + "<ns0:Text>Hello ${user}</ns0:Text>" + "</ns0:HelloResponse>") .header("<ns0:HelloHeader xmlns:ns0=\"http://www.consol.de/schemas/samples/sayHello.xsd\">" + "<ns0:MessageId>${messageId}</ns0:MessageId>" + "<ns0:CorrelationId>${correlationId}</ns0:CorrelationId>" + "<ns0:User>${user}</ns0:User>" + "<ns0:Text>Hello WebServer</ns0:Text>" + "</ns0:HelloHeader>") .header("{http://citrusframework.org/test}Operation", "answerHello") .header("citrus_http_operation", "answerHello") .header("citrus_jms_correlationId", "${internal_correlation_id}"); receive("webServiceClient") .payload("<ns0:HelloResponse xmlns:ns0=\"http://www.consol.de/schemas/samples/sayHello.xsd\">" + "<ns0:MessageId>${messageId}</ns0:MessageId>" + "<ns0:CorrelationId>${correlationId}</ns0:CorrelationId>" + "<ns0:User>WebServer</ns0:User>" + "<ns0:Text>Hello ${user}</ns0:Text>" + "</ns0:HelloResponse>") .header("<SOAP-ENV:Header xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\">" + "<Operation xmlns=\"http://citrusframework.org/test\">@ignore@</Operation>" + "<ns0:HelloHeader xmlns:ns0=\"http://www.consol.de/schemas/samples/sayHello.xsd\">" + "<ns0:MessageId>${messageId}</ns0:MessageId>" + "<ns0:CorrelationId>${correlationId}</ns0:CorrelationId>" + "<ns0:User>${user}</ns0:User>" + "<ns0:Text>Hello WebServer</ns0:Text>" + "</ns0:HelloHeader>" + "</SOAP-ENV:Header>") .header("Operation", "answerHello") .header("operation", "answerHello") .schemaValidation(false) .timeout(5000L); } }
[ "deppisch@consol.de" ]
deppisch@consol.de
14e069986a27c3df2658745d084337a517442c90
5f1706f1d8927f9eddc620470494ff7c5cec382c
/admintool/src/main/java/com/hypercell/admintool/client/UserFeignClientInterceptor.java
9de157ecddae8be44d229b041d6be8ba398d670c
[]
no_license
nesmaelhebeary/admintool
ac90da9954be6049c412af4a3e1616b1ba0b7d33
582a0a3985ae87cb75ff7091cdb9565e5506d0d2
refs/heads/master
2021-06-24T07:32:27.576848
2018-10-29T20:27:44
2018-10-29T20:27:44
149,672,394
0
0
null
2020-12-09T00:37:49
2018-09-20T21:25:16
Java
UTF-8
Java
false
false
632
java
package com.hypercell.admintool.client; import com.hypercell.admintool.security.SecurityUtils; import feign.RequestInterceptor; import feign.RequestTemplate; import org.springframework.stereotype.Component; @Component public class UserFeignClientInterceptor implements RequestInterceptor { private static final String AUTHORIZATION_HEADER = "Authorization"; private static final String BEARER = "Bearer"; @Override public void apply(RequestTemplate template) { SecurityUtils.getCurrentUserJWT() .ifPresent(s -> template.header(AUTHORIZATION_HEADER,String.format("%s %s", BEARER, s))); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
c50a2a1ed923ca8fa771e5544f6220572071e06f
6eb473fdee564e75899580270c5566bdea7b5e08
/com/aliasi/lm/PAT2NodeByte.java
a6c51272a43bc72edca8d00506f088ce0568d5a5
[]
no_license
Rashmos/Information_Retrieval_System
d2f9e3db1e8a7177b3114d430e0f9c799e59dd67
4b7bc23cb38a100a202df403fd90a217e89594e6
refs/heads/master
2020-05-26T18:35:47.617244
2014-01-28T07:06:33
2014-01-28T07:06:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
563
java
/* */ package com.aliasi.lm; /* */ /* */ final class PAT2NodeByte extends PAT2Node /* */ { /* */ final byte mCount; /* */ /* */ public PAT2NodeByte(char c1, char c2, long count) /* */ { /* 859 */ super(c1, c2); /* 860 */ this.mCount = ((byte)(int)count); /* */ } /* */ public long count() { /* 863 */ return this.mCount; /* */ } /* */ } /* Location: /Users/Rashmi/Downloads/set_rp2614/rashmi.jar * Qualified Name: com.aliasi.lm.PAT2NodeByte * JD-Core Version: 0.6.2 */
[ "Rashmi@rashmis-MacBook-Pro.local" ]
Rashmi@rashmis-MacBook-Pro.local
073d97cfb1424966d6515958f6149ddbc71c2ac0
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_30735.java
23e5f08f4c655eb814d23a7f8e4dd5390e6fac2a
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
176
java
private void init(int resource,int textViewResourceId){ mDropDownResource=resource; mFieldId=textViewResourceId; mHelper=new ThemedSpinnerAdapter.Helper(getContext()); }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
17f4514aa319a35718e8e8052e385cf2fd80e60e
2c2111795aea2ee8d864e7a4dbb4e008b800260b
/rulai-common/src/main/java/com/unicdata/service/boutique/BoutiqueSupplierService.java
48e657e03aeeed190ec86e48bd5c5462463b8d3e
[]
no_license
zhai926/rulai
bd9f3f01534e174c882ca3e09e34f84f6a7213b5
4863cfcd99a29379a0781f148f6fd03a71b1c475
refs/heads/master
2020-04-26T21:53:50.611788
2019-03-05T02:27:28
2019-03-05T02:28:23
173,855,085
0
1
null
null
null
null
UTF-8
Java
false
false
910
java
package com.unicdata.service.boutique; import java.util.List; import java.util.Map; import com.github.pagehelper.PageInfo; import com.unicdata.entity.boutique.BoutiqueSupplier; public interface BoutiqueSupplierService { /** * 添加供应商 * @param supplier * @return */ public int addSupplier(BoutiqueSupplier supplier); /** * 删除供应商 * @param supplier * @return */ public int deleteSupplier(Integer id); /** * 修改供应商 * @param supplier * @return */ public int updateSupplier(BoutiqueSupplier supplier); /** * 分页条件查询供应商 * @param storeId * @param name * @return */ public PageInfo<Map<String, Object>> selectSupplier(Integer storeId, String name,Integer pageSize,Integer pageNum); /** * 查询所有供应商 * @param storeId * @return */ public List<BoutiqueSupplier> selectAllSupplier(Integer storeId); }
[ "17317900836@163.com" ]
17317900836@163.com
1002cb1790e94e2e2169b0f928a7d0d9f2af32b2
609bc25936ff08b6d4b8c7ef49bd7ab544ce807a
/2.JavaCore/src/com/javarush/task/task13/task1307/Solution.java
c39cf6021fde5a499056805e791d03f3143198b0
[]
no_license
art-sov/JavaRushTasks
11d6998e97a0f5c4852e56954942364ebf4da448
9e25490876fa030a81143e490bf2c69faabd2e65
refs/heads/master
2021-01-18T09:57:25.857392
2017-08-15T09:02:56
2017-08-15T09:02:56
88,092,937
0
0
null
null
null
null
UTF-8
Java
false
false
543
java
package com.javarush.task.task13.task1307; /* Параметризованый интерфейс В классе StringObject реализуй интерфейс SimpleObject с параметром типа String.*/ public class Solution { public static void main(String[] args) throws Exception { } interface SimpleObject<T> { SimpleObject<T> getInstance(); } class StringObject implements SimpleObject<String> { public SimpleObject<String> getInstance(){ return null; } } }
[ "admin@admin.com" ]
admin@admin.com
d8215c10db80143ae125632b079aaf154b9f5efa
0205999a193bf670cd9d6e5b37e342b75f4e15b8
/spring-test/src/test/java/org/springframework/test/context/junit4/nested/NestedTestsWithSpringRulesTests.java
2fbb5727a4d56ef2b05eb7082ad45c0ad5889772
[ "Apache-2.0" ]
permissive
leaderli/spring-source
18aa9a8c7c5e22d6faa6167e999ff88ffa211ba0
0edd75b2cedb00ad1357e7455a4fe9474b3284da
refs/heads/master
2022-02-18T16:34:19.625966
2022-01-29T08:56:48
2022-01-29T08:56:48
204,468,286
0
0
null
null
null
null
UTF-8
Java
false
false
3,035
java
/* * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.test.context.junit4.nested; import de.bechte.junit.runners.context.HierarchicalContextRunner; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.nested.NestedTestsWithSpringRulesTests.TopLevelConfig; import org.springframework.test.context.junit4.rules.SpringClassRule; import org.springframework.test.context.junit4.rules.SpringMethodRule; import static org.assertj.core.api.Assertions.assertThat; /** * JUnit 4 based integration tests for <em>nested</em> test classes that are * executed via a custom JUnit 4 {@link HierarchicalContextRunner} and Spring's * {@link SpringClassRule} and {@link SpringMethodRule} support. * * @author Sam Brannen * @see org.springframework.test.context.junit.jupiter.nested.NestedTestsWithSpringAndJUnitJupiterTestCase * @since 5.0 */ @RunWith(HierarchicalContextRunner.class) @ContextConfiguration(classes = TopLevelConfig.class) public class NestedTestsWithSpringRulesTests extends SpringRuleConfigurer { @Autowired String foo; @Test public void topLevelTest() { assertThat(foo).isEqualTo("foo"); } @Configuration public static class TopLevelConfig { @Bean String foo() { return "foo"; } } // ------------------------------------------------------------------------- @Configuration public static class NestedConfig { @Bean String bar() { return "bar"; } } @ContextConfiguration(classes = NestedConfig.class) public class NestedTestCase extends SpringRuleConfigurer { @Autowired String bar; @Test public void nestedTest() throws Exception { // Note: the following would fail since TestExecutionListeners in // the Spring TestContext Framework are not applied to the enclosing // instance of an inner test class. // // assertEquals("foo", foo); assertThat(foo).as("@Autowired field in enclosing instance should be null.").isNull(); assertThat(bar).isEqualTo("bar"); } } }
[ "429243408@qq.com" ]
429243408@qq.com
ece36d57fc0f7e3ee26ace6f9e748d4b6be85740
858a32a537520a11aa69c552af5d4dedafd2e0fc
/app/src/main/java/com/cniao/di/component/AppManagerComponent.java
744ca23c67db3441690da5839a74eb6528efc1a9
[]
no_license
xxchenqi/Cniao
ecfd66e10f03993cf0ef0991c5270aff6ebf9908
6688d56238e686d4e086fab27136e06fe18ee73a
refs/heads/master
2021-01-25T04:58:22.641383
2017-12-19T15:12:35
2017-12-19T15:12:35
93,492,654
0
0
null
null
null
null
UTF-8
Java
false
false
824
java
package com.cniao.di.component; import com.cniao.di.FragmentScope; import com.cniao.di.module.AppManagerModule; import com.cniao.ui.fragment.DownloadedFragment; import com.cniao.ui.fragment.DownloadingFragment; import com.cniao.ui.fragment.InstalledAppAppFragment; import dagger.Component; /** * 菜鸟窝http://www.cniao5.com 一个高端的互联网技能学习平台 * * @author Ivan * @version V1.0 * @Package com.cniao5.cniao5play.di * @Description: ${TODO}(用一句话描述该文件做什么) * @date */ @FragmentScope @Component(modules = AppManagerModule.class,dependencies = AppComponent.class) public interface AppManagerComponent { void inject(DownloadingFragment fragment); void injectDownloaded(DownloadedFragment fragment); void injectInstalled(InstalledAppAppFragment fragment); }
[ "812046652@qq.com" ]
812046652@qq.com
68cc9f3f64194b008a0664a087efc9009ffa75f2
869255c96f013f80705a8d515189921defd0bed0
/kie-wb-common-screens/kie-wb-common-library/kie-wb-common-library-client/src/main/java/org/kie/workbench/common/screens/library/client/settings/sections/knowledgebases/KnowledgeBasesView.java
608e617754777efbffd6b79cace4341c70c24d1e
[ "Apache-2.0" ]
permissive
evacchi/kie-wb-common
3cc558b9536086e4dccefd34af9f88f7b1e02c6a
15f86d755d59a587dd0e47ab0432ccfa7e5ab38f
refs/heads/master
2021-05-14T12:15:17.210117
2018-10-02T01:28:57
2018-10-02T01:28:57
116,400,606
0
0
Apache-2.0
2018-07-17T14:49:24
2018-01-05T15:44:35
Java
UTF-8
Java
false
false
2,125
java
/* * Copyright (C) 2017 Red Hat, Inc. and/or its affiliates. * * 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.kie.workbench.common.screens.library.client.settings.sections.knowledgebases; import javax.inject.Inject; import javax.inject.Named; import com.google.gwt.event.dom.client.ClickEvent; import elemental2.dom.Element; import elemental2.dom.HTMLButtonElement; import elemental2.dom.HTMLHeadingElement; import elemental2.dom.HTMLTableSectionElement; import org.jboss.errai.ui.shared.api.annotations.DataField; import org.jboss.errai.ui.shared.api.annotations.EventHandler; import org.jboss.errai.ui.shared.api.annotations.Templated; @Templated public class KnowledgeBasesView implements KnowledgeBasesPresenter.View { @Inject @Named("tbody") @DataField("knowledge-bases-table") private HTMLTableSectionElement knowledgeBasesTable; @Inject @DataField("add-knowledge-base-button") private HTMLButtonElement addKnowledgeBaseButton; @Inject @Named("h3") @DataField("title") private HTMLHeadingElement title; private KnowledgeBasesPresenter presenter; @Override public void init(final KnowledgeBasesPresenter presenter) { this.presenter = presenter; } @EventHandler("add-knowledge-base-button") private void onAddKnowledgeBaseButtonClicked(final ClickEvent ignore) { presenter.openAddKnowledgeBaseModal(); } @Override public Element getKnowledgeBasesTable() { return knowledgeBasesTable; } @Override public String getTitle() { return title.textContent; } }
[ "ignatowicz@gmail.com" ]
ignatowicz@gmail.com
42315af39f89a6ab08a4475d743dc432762d6774
ba074b888fc8c1521f6de218f44109e967d8def6
/RuoYi-Back/src/main/java/com/ruoyi/taoke/poster/controller/PosterController.java
d364d55126f33137cc3c400485cdc3934f1cf9e7
[ "MIT" ]
permissive
liuzhen2017/taobaoke
9ee8ddb76c78d754e8f60f75502992869124d809
c147cb267bff490df6c9e8c92779a9a51ba74f2f
refs/heads/master
2022-09-02T18:26:34.344796
2019-09-25T10:20:45
2019-09-25T10:20:45
210,815,903
0
0
null
2022-09-01T23:13:21
2019-09-25T10:16:35
JavaScript
UTF-8
Java
false
false
2,852
java
package com.ruoyi.taoke.poster.controller; import java.util.List; import com.ruoyi.common.utils.security.ShiroUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.taoke.poster.domain.Poster; import com.ruoyi.taoke.poster.service.IPosterService; import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.framework.web.page.TableDataInfo; /** * 海报配置Controller * * @author XRZ * @date 2019-09-02 */ @Controller @RequestMapping("/taoke/poster") public class PosterController extends BaseController { private String prefix = "taoke/poster"; @Autowired private IPosterService posterService; @RequiresPermissions("taoke:poster:view") @GetMapping() public String poster() { return prefix + "/poster"; } /** * 查询海报配置列表 */ @RequiresPermissions("taoke:poster:list") @PostMapping("/list") @ResponseBody public TableDataInfo list(Poster poster){ if (ShiroUtils.getUserId() != 1) { poster.setUId(String.valueOf(ShiroUtils.getUserId())); } startPage(); List<Poster> list = posterService.selectPosterList(poster); return getDataTable(list); } /** * 新增海报配置 */ @GetMapping("/add") public String add(Model model) { model.addAttribute("id",ShiroUtils.getUserId()); return prefix + "/add"; } /** * 新增保存海报配置 */ @RequiresPermissions("taoke:poster:add") @Log(title = "海报配置", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody public AjaxResult addSave(Poster poster) { poster.setUId(String.valueOf(ShiroUtils.getUserId())); return toAjax(posterService.insertPoster(poster)); } /** * 删除海报配置 */ @RequiresPermissions("taoke:poster:remove") @Log(title = "海报配置", businessType = BusinessType.DELETE) @PostMapping( "/remove") @ResponseBody public AjaxResult remove(String ids) { return toAjax(posterService.deletePosterByIds(ids)); } }
[ "294442437@qq.com" ]
294442437@qq.com
f4e731b0c999f54a41e4082f52af6f30803f4b97
46167791cbfeebc8d3ddc97112764d7947fffa22
/quarkus/src/main/java/com/justexample/repository/Entity1518Repository.java
fc0c82d6d65a0dc1779740071381b3ce4d9e76a8
[]
no_license
kahlai/unrealistictest
4f668b4822a25b4c1f06c6b543a26506bb1f8870
fe30034b05f5aacd0ef69523479ae721e234995c
refs/heads/master
2023-08-25T09:32:16.059555
2021-11-09T08:17:22
2021-11-09T08:17:22
425,726,016
0
0
null
null
null
null
UTF-8
Java
false
false
244
java
package com.example.repository; import java.util.List; import com.example.entity.Entity1518; import org.springframework.data.jpa.repository.JpaRepository; public interface Entity1518Repository extends JpaRepository<Entity1518,Long>{ }
[ "laikahhoe@gmail.com" ]
laikahhoe@gmail.com
f3f4e93266ac97bb492d834033986380ad375a88
1e147f7417a43d08defd98eb8820db3c263dc337
/src/com/lewa/player/model/Album.java
2c832d808865dd5ce7940dd732affe239b6e16a1
[]
no_license
chongbo2013/My-MusicPlayer
bd512b15ef2f0a60eb0645352cc1885b4596f97a
3ba0356418c3d27da5f0e80e3853593c8e4ad6fe
refs/heads/master
2021-05-29T20:23:49.054045
2015-08-25T06:14:23
2015-08-25T06:14:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,193
java
package com.lewa.player.model; import android.database.Cursor; /** * Created by Administrator on 13-12-2. */ public class Album extends BaseModel { public static final String TABLE_NAME = "album"; public static final String NAME = "name"; public static final String ARTIST_ID = "artist_id"; public static final String SONG_NUM = "song_num"; private String name; private Artist artist; private TYPE type; //picture url private String art; private Integer songNum; public Album() { } public Album(Long id) { this.id = id; } public Album(Long id, String name) { this.id = id; this.name = name; } public Album(String name, Integer songNum, String art) { this.name = name; this.songNum = songNum; this.art = art; } public static enum TYPE { ONLINE, LOCAL } public String getArt() { return art; } public void setArt(String art) { this.art = art; } public Artist getArtist() { return artist; } public void setArtist(Artist artist) { this.artist = artist; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getSongNum() { return songNum; } public void setSongNum(Integer songNum) { this.songNum = songNum; } public TYPE getType() { return type; } public void setType(TYPE type) { this.type = type; } public static Album fromCursor(Cursor albumCursor, AlbumCursorIndex albumCursorIndex) { Album album = new Album(); album.setId(albumCursor.getLong(albumCursorIndex.getIdIdx())); album.setName(albumCursor.getString(albumCursorIndex.getNameIdx())); album.setSongNum(albumCursor.getInt(albumCursorIndex.getSongNumIdx())); Artist artist = new Artist(); artist.setName(albumCursor.getString(albumCursorIndex.getArtistIdx())); album.setArtist(artist); album.setArt(albumCursor.getString(albumCursorIndex.getAlbumArtIdx())); return album; } }
[ "mzoneseven@foxmail.com" ]
mzoneseven@foxmail.com
90498d70c5466b1609750a9d51b99fb4eaf7f9fa
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/13/13_a33a7130726828c8a99d3505b8c8470a21f62513/EditRestaurant/13_a33a7130726828c8a99d3505b8c8470a21f62513_EditRestaurant_s.java
2420bd705f02d5b2b43ad2f5f41f032f20451ebd
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
7,440
java
package csci498.strupper.munchlist; import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.net.ConnectivityManager; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.widget.EditText; import android.widget.RadioButton; import android.widget.RadioGroup; import android.widget.Toast; public class EditRestaurant extends Activity { private RestaurantHelper helper; private String restaurantId; private final LocationListener onLocationChange = new LocationListener() { public void onLocationChanged(Location fix) { helper.updateLocation(restaurantId, fix.getLatitude(), fix.getLongitude()); ((EditText)findViewById(R.id.location)).setText(String.valueOf(fix.getLatitude()) + ", " + String.valueOf(fix.getLongitude())); ((LocationManager)getSystemService(LOCATION_SERVICE)).removeUpdates(onLocationChange); Toast .makeText(EditRestaurant.this, "Location saved", Toast.LENGTH_LONG) .show(); } public void onProviderDisabled(String provider) { // required for interface, not used } public void onProviderEnabled(String provider) { // required for interface, not used } public void onStatusChanged(String provider, int status, Bundle extras) { // required for interface, not used } }; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.edit_restaurant); helper = new RestaurantHelper(this); restaurantId = getIntent().getStringExtra(MunchList.ID_EXTRA); // restore form if (savedInstanceState != null) { String s; if (restaurantId == null && (s = savedInstanceState.getString("id")) != null) { restaurantId = s; } if ((s = savedInstanceState.getString("name")) != null) { ((EditText)findViewById(R.id.name)).setText(s); } if ((s = savedInstanceState.getString("address")) != null) { ((EditText)findViewById(R.id.address)).setText(s); } if ((s = savedInstanceState.getString("feed")) != null) { ((EditText)findViewById(R.id.feed)).setText(s); } if ((s = savedInstanceState.getString("type")) != null) { if (s.equals("sit_down")) { ((RadioButton)findViewById(R.id.sit_down)).setChecked(true); } else if (s.equals("take_out")) { ((RadioButton)findViewById(R.id.take_out)).setChecked(true); } else if (s.equals("delivery")) { ((RadioButton)findViewById(R.id.delivery)).setChecked(true); } } } if (restaurantId != null) { load(); } } @Override public boolean onPrepareOptionsMenu(Menu menu) { if (restaurantId == null) { menu.findItem(R.id.location).setEnabled(false); } return super.onPrepareOptionsMenu(menu); } @Override protected void onPause() { save(); ((LocationManager)getSystemService(LOCATION_SERVICE)).removeUpdates(onLocationChange); super.onPause(); }; private void setFrom(Restaurant r) { ((EditText)findViewById(R.id.name)).setText(r.getName()); ((EditText)findViewById(R.id.address)).setText(r.getAddress()); ((EditText)findViewById(R.id.feed)).setText(r.getFeed()); RadioGroup types = (RadioGroup)findViewById(R.id.types); if (r.getType().equals("sit_down")) { types.check(R.id.sit_down); } else if (r.getType().equals("take_out")) { types.check(R.id.take_out); } else { types.check(R.id.delivery); } ((EditText)findViewById(R.id.location)).setText(r.getLat() + ", " + r.getLon()); } private void load() { Cursor c = helper.getById(restaurantId); c.moveToFirst(); setFrom(RestaurantHelper.restaurantOf(c)); c.close(); } @Override public void onSaveInstanceState(Bundle outState) { if (restaurantId != null) { outState.putString("id", restaurantId); } outState .putString("name", ((EditText)findViewById(R.id.name)).getText().toString()); outState .putString("address", ((EditText)findViewById(R.id.address)).getText().toString()); outState .putString("feed", ((EditText)findViewById(R.id.feed)).getText().toString()); RadioGroup types = (RadioGroup)findViewById(R.id.types); switch (types.getCheckedRadioButtonId()) { case R.id.sit_down: outState.putString("type", "sit_down"); break; case R.id.take_out: outState.putString("type", "take_out"); break; case R.id.delivery: outState.putString("type", "delivery"); break; } } @Override public void onDestroy() { super.onDestroy(); helper.close(); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_edit_restaurant, menu); return super.onCreateOptionsMenu(menu); } @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == R.id.viewFeed) { if (isNetworkAvailable()) { Intent i = new Intent(this, FeedActivity.class); i.putExtra(FeedActivity.FEED_URL, ((EditText)findViewById(R.id.feed)).getText().toString()); startActivity(i); } else { Toast .makeText(this, "Sorry, the Internet is not available", Toast.LENGTH_LONG) .show(); } return true; } if (item.getItemId() == R.id.location) { ((LocationManager)getSystemService(LOCATION_SERVICE)).requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, onLocationChange); return true; } return super.onOptionsItemSelected(item); } private boolean isNetworkAvailable() { return ((ConnectivityManager)getSystemService(CONNECTIVITY_SERVICE)) .getActiveNetworkInfo() != null; } private void save() { Restaurant r = new Restaurant(); r.setName(((EditText)findViewById(R.id.name)) .getText() .toString()); r.setAddress(((EditText)findViewById(R.id.address)) .getText() .toString()); r.setFeed(((EditText)findViewById(R.id.feed)) .getText() .toString()); RadioGroup types = (RadioGroup)findViewById(R.id.types); switch (types.getCheckedRadioButtonId()) { case R.id.sit_down: r.setType("sit_down"); break; case R.id.take_out: r.setType("take_out"); break; case R.id.delivery: r.setType("delivery"); break; } if (restaurantId == null) { helper.insert(r); } else { helper.update(restaurantId, r); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
118af3213526494e47a4a13f7b27e3cb9bd540b0
36d7ac13d205b9a5b8c3308a27c4605a1cd7ee56
/others/AndEngine-GLES2-AnchorCenter/src/org/andengine/util/adt/list/DoubleArrayList.java
574dad998a741de14ec39945fbec2f1442b3b829
[ "Apache-2.0" ]
permissive
renanlr/billyadventures
92103d6208f2e80644fca38c2c8a4ad6f2b5a7ce
f35384d6355dbbdbc5708b370731d1be1e652f39
refs/heads/master
2021-01-20T03:39:09.059791
2014-12-09T05:03:33
2014-12-09T05:03:33
23,578,058
4
0
null
null
null
null
UTF-8
Java
false
false
3,364
java
package org.andengine.util.adt.list; /** * TODO This class could take some kind of AllocationStrategy object. * * (c) 2013 Zynga Inc. * * @author Nicolas Gramlich <ngramlich@zynga.com> * @since 13:18:43 - 19.01.2013 */ public class DoubleArrayList implements IDoubleList { // =========================================================== // Constants // =========================================================== private static final int CAPACITY_INITIAL_DEFAULT = 0; // =========================================================== // Fields // =========================================================== private double[] mItems; private int mSize; // =========================================================== // Constructors // =========================================================== public DoubleArrayList() { this(DoubleArrayList.CAPACITY_INITIAL_DEFAULT); } public DoubleArrayList(final int pInitialCapacity) { this.mItems = new double[pInitialCapacity]; } // =========================================================== // Getter & Setter // =========================================================== // =========================================================== // Methods for/from SuperClass/Interfaces // =========================================================== @Override public boolean isEmpty() { return this.mSize == 0; } @Override public double get(final int pIndex) throws ArrayIndexOutOfBoundsException { return this.mItems[pIndex]; } @Override public void add(final double pItem) { this.ensureCapacity(this.mSize + 1); this.mItems[this.mSize] = pItem; this.mSize++; } @Override public void add(final int pIndex, final double pItem) throws ArrayIndexOutOfBoundsException { this.ensureCapacity(this.mSize + 1); System.arraycopy(this.mItems, pIndex, this.mItems, pIndex + 1, this.mSize - pIndex); this.mItems[pIndex] = pItem; this.mSize++; } @Override public double remove(final int pIndex) throws ArrayIndexOutOfBoundsException { final double oldValue = this.mItems[pIndex]; final int numMoved = this.mSize - pIndex - 1; if (numMoved > 0) { System.arraycopy(this.mItems, pIndex + 1, this.mItems, pIndex, numMoved); } this.mSize--; return oldValue; } @Override public int size() { return this.mSize; } @Override public void clear() { this.mSize = 0; } @Override public double[] toArray() { final double[] array = new double[this.mSize]; System.arraycopy(this.mItems, 0, array, 0, this.mSize); return array; } // =========================================================== // Methods // =========================================================== private void ensureCapacity(final int pCapacity) { final int currentCapacity = this.mItems.length; if (currentCapacity < pCapacity) { /* Increase array size. */ final int newCapacity = ((currentCapacity * 3) >> 1) + 1; final double[] newItems = new double[newCapacity]; System.arraycopy(this.mItems, 0, newItems, 0, currentCapacity); this.mItems = newItems; } } // =========================================================== // Inner and Anonymous Classes // =========================================================== }
[ "renan.lobato.rheinboldt@gmail.com" ]
renan.lobato.rheinboldt@gmail.com
87b2c4fa517732641e36ac7bd7fd51de50ee807b
524c3487d7c6edf4cab0ed345237afb71d030d53
/dsf-bpe/dsf-bpe-server/src/main/java/org/highmed/dsf/bpe/camunda/MultiVersionBpmnParseFactory.java
593ff7c71df3dcf12e7cfcf08bf3dc3dfb267039
[ "Apache-2.0" ]
permissive
highmed/highmed-dsf
2d5666c23ac38e6b3e0355032a10f77f21ca7e14
2448ee9719277ae7e720b38ae600f0056c773361
refs/heads/main
2023-07-09T20:23:42.392160
2023-06-21T18:21:33
2023-06-21T18:21:33
190,670,816
35
27
Apache-2.0
2023-09-14T19:36:35
2019-06-07T01:06:36
Java
UTF-8
Java
false
false
655
java
package org.highmed.dsf.bpe.camunda; import org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse; import org.camunda.bpm.engine.impl.bpmn.parser.BpmnParser; import org.camunda.bpm.engine.impl.cfg.BpmnParseFactory; import org.highmed.dsf.bpe.delegate.DelegateProvider; public class MultiVersionBpmnParseFactory implements BpmnParseFactory { private final DelegateProvider delegateProvider; public MultiVersionBpmnParseFactory(DelegateProvider delegateProvider) { this.delegateProvider = delegateProvider; } @Override public BpmnParse createBpmnParse(BpmnParser bpmnParser) { return new MultiVersionBpmnParse(bpmnParser, delegateProvider); } }
[ "hauke.hund@hs-heilbronn.de" ]
hauke.hund@hs-heilbronn.de
f1c5923df0178f5b6c0edeeac479bdc9d09316f1
4b535cbf167323e9f61a3a17a9eca57fbc15d8dc
/src/day28/CardFlip/app/src/main/java/com/example/cardfliptest/MainActivity.java
606381e1709a7f93184c043024aa6b7f6ce5d095
[]
no_license
shlAndroid/Lecture
299fac3d396e1ef31215c92192fa43690999ea44
fd8b127e9b7c5398779c5ea1968fec20d7e6de2d
refs/heads/master
2020-08-27T23:40:50.256117
2019-11-22T07:48:01
2019-11-22T07:48:01
217,522,243
0
2
null
null
null
null
UTF-8
Java
false
false
3,305
java
package com.example.cardfliptest; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.FrameLayout; public class MainActivity extends AppCompatActivity { boolean mShowingBack = false; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); FrameLayout frameLayout = findViewById(R.id.container); frameLayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { flipCard(); } }); /* 첫 시작 */ if (savedInstanceState == null) { getSupportFragmentManager() .beginTransaction() .add(R.id.container, new CardFrontFragment()) .commit(); } } /* 클릭하면 */ void flipCard() { if (mShowingBack) { mShowingBack = false; getSupportFragmentManager().popBackStack(); } else { mShowingBack = true; /* getSupportFragmentManager() 를 통해서 Fragment 를 관리하는 객체를 얻는다. Activity 는 새로운 창을 만드는 것인데 Fragment 는 새로운 창을 띄우는것이 아닌 기존 화면에 덮어 쓰는 형식으로 처리된다. beginTransaction() 은 애니메이션 동작이 예약되어 있는 작업이 있다면 실행하는 형식이 된다. setCustomAnimations() 를 사용했으므로 기존에 가지고 있던 애니메이션이 아닌 우리가 커스텀한 애니메이션을 사용하게 된다. 결국 인자로는 사용할 애니메이션 XML 을 배치하면 된다. replace() 는 ImageView 에서는 setImageResource("*.jpg") 로 처리했는데 이 작업을 대신해주는 녀석이라고 보면 된다. 첫 번째 인자는 FrameLayout 이 되고 두 번째 인자는 이 동작을 수행할 Activity 혹은 Fragment 를 배치한다. addToBackStack() 은 Activity 와 다르게 Context 를 저장하고 복원하는 방식이 다르기 때문이다. 단순히 이전 스택으로 돌아오는 작업에 해당한다. commit() 은 실제 위에 준비한것들을 일괄 실행한다. 위 부분에서 동작할 작업들을 미리 설정해놓고 commit() 을 통해서 실제 구동하는 것이라 보면 되겠다. */ getSupportFragmentManager() .beginTransaction() .setCustomAnimations( R.anim.card_flip_right_enter, R.anim.card_flip_right_exit, R.anim.card_flip_left_enter, R.anim.card_flip_left_exit) .replace(R.id.container, new CardBackFragment()) .addToBackStack(null) .commit(); } } }
[ "gcccompil3r@gmail.com" ]
gcccompil3r@gmail.com
a291dc97ebf15e23ab289a7966eb7807696d819e
d2df96be99a1f4a630162969eef5e98f6d7e4d08
/src/main/java/mysqls/graph/AssociationEdge.java
14a5c8cc77b18f6e5a6720eaf988a3e66e75f1ff
[]
no_license
carsonshan/SqlDsigner
405d5f46014a9eb1c6c4c0f19390e417b9cc9c21
c5d8f643a62729b33024e83fb878479964d6633e
refs/heads/master
2020-04-11T20:31:05.388407
2017-07-24T11:37:39
2017-07-24T11:37:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,581
java
package mysqls.graph; import mysqls.framework.ArrowHead; import mysqls.framework.SegmentationStyleFactory; import mysqls.sql.entity.TableColumn; import java.awt.geom.Point2D; /** * 外检关系,数据在tableccolumn里面,这里主要是显示 */ public class AssociationEdge extends ClassRelationshipEdge { public enum Directionality { // None, Start, End, // Both } public TableColumn sTableColumn; public TableColumn eTableColumn; private Directionality aDirectionality = Directionality.End; /** * Creates an association edge with no labels. and no directionality */ public AssociationEdge() { sTableColumn = new TableColumn(""); eTableColumn = new TableColumn(""); } /** * @return The directionality of this association. */ public Directionality getDirectionality() { return aDirectionality; } /** * @return the eTableColumn */ public TableColumn geteTableColumn() { return this.eTableColumn; } @Override public Point2D[] getPoints() { return SegmentationStyleFactory.createHVHStrategy().getPath(getStart(), getEnd()); } /** * @return the sTableColumn */ public TableColumn getsTableColumn() { return this.sTableColumn; } @Override protected ArrowHead obtainEndArrowHead() { if (aDirectionality == Directionality.End) { return ArrowHead.V; } else { return ArrowHead.NONE; } } @Override protected ArrowHead obtainStartArrowHead() { if (aDirectionality == Directionality.Start) { return ArrowHead.V; } else { return ArrowHead.NONE; } } /** * @param pDirectionality The desired directionality. */ public void setDirectionality(Directionality pDirectionality) { aDirectionality = pDirectionality; if (aDirectionality == Directionality.Start) { sTableColumn.setForeignKey(false); eTableColumn.setForeignKey(true); } else { eTableColumn.setForeignKey(false); sTableColumn.setForeignKey(true); } } /** * @param eTableColumn the eTableColumn to set */ public void seteTableColumn(TableColumn eTableColumn) { this.eTableColumn = eTableColumn; } /** * @param sTableColumn the sTableColumn to set */ public void setsTableColumn(TableColumn sTableColumn) { this.sTableColumn = sTableColumn; } }
[ "3200601@qq.com" ]
3200601@qq.com
415bcaa3968fbf577f28d649f53498a71175ca04
1dd03ae1cdd0f80d5b07114e0cba3faee331b425
/WebSocketClient/commonadapter/src/main/java/com/changxiao/commonadapter/recyclerview/CommonAdapter.java
34360b5e913fc42e9247b05329526fecb581930f
[]
no_license
xiaoqianchang/AndroidStudioProjects
94392371a7d53c7866132842d47753c048ba2d2b
f5b256df3404f56ad53e80c818c551114555950e
refs/heads/master
2020-08-10T00:51:53.251036
2019-10-10T15:16:00
2019-10-10T15:16:00
214,214,308
0
1
null
null
null
null
UTF-8
Java
false
false
4,056
java
package com.changxiao.commonadapter.recyclerview; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.changxiao.commonadapter.ViewHolder; import java.util.List; /** * 单种ViewItemType的通用Adapter * <p/> * Created by Chang.Xiao on 2016/4/11 22:17. * * @version 1.0 */ public abstract class CommonAdapter<T> extends RecyclerView.Adapter<ViewHolder> { protected Context mContext; protected int mLayoutId; protected List<T> mDatas; protected LayoutInflater mInflater; /** * item点击事件 */ private OnItemClickListener mOnItemClickListener; public void setOnItemClickListener(OnItemClickListener onItemClickListener) { this.mOnItemClickListener = onItemClickListener; } /** * 构建CommonAdapter * * @param context 上下文 * @param layoutId item的布局文件layoutId * @param datas 数据 */ public CommonAdapter(Context context, int layoutId, List<T> datas) { this.mContext = context; this.mInflater = LayoutInflater.from(context); this.mLayoutId = layoutId; this.mDatas = datas; } /** * 得到View的类型 * * @param position * @return */ @Override public int getItemViewType(int position) { return super.getItemViewType(position); } /** * 创建、渲染视图并初始化(每个item執行一次) * * @param parent * @param viewType ListView的每一个条目布局唯一,然而Recycler的每一个条目可以有不同布局 * @return */ @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { // onCreateViewHolder时,通过layoutId即可利用我们的通用的ViewHolder生成实例。 ViewHolder viewHolder = ViewHolder.get(mContext, null, parent, mLayoutId, -1); setListener(parent, viewHolder, viewType); return viewHolder; } protected int getPosition(RecyclerView.ViewHolder viewHolder) { return viewHolder.getAdapterPosition(); } protected boolean isEnabled(int viewType) { return true; } protected void setListener(final ViewGroup parent, final ViewHolder viewHolder, int viewType) { if (!isEnabled(viewType)) return; viewHolder.getConvertView().setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mOnItemClickListener != null) { int position = getPosition(viewHolder); mOnItemClickListener.onItemClick(parent, v, mDatas.get(position), position); } } }); viewHolder.getConvertView().setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { if (mOnItemClickListener != null) { int position = getPosition(viewHolder); return mOnItemClickListener.onItemLongClick(parent, v, mDatas.get(position), position); } return false; } }); } /** * 给渲染的视图绑定数据 * * @param holder * @param position */ @Override public void onBindViewHolder(ViewHolder holder, int position) { holder.updatePosition(position); /* onBindViewHolder这里主要用于数据、事件绑定,我们这里直接抽象出去,让用户去操作。 可以看到我们修改了下参数,用户可以拿到当前Item所需要的对象和viewHolder去操作。 */ convert(holder, mDatas.get(position)); } protected abstract void convert(ViewHolder holder, T t); /** * 得到条目的数量 * * @return */ @Override public int getItemCount() { return mDatas.size(); } }
[ "qianchang.xiao@gmail.com" ]
qianchang.xiao@gmail.com
705e1abe6f75fe8d0b26f1e83f1e4d9f92b70418
9cde1bef40a72eaa90ad84fc5146ab49fac9e063
/fess-db-h2/src/main/java/org/codelibs/fess/db/cbean/cq/ciq/FileConfigToLabelTypeMappingCIQ.java
9ce433cf363f5104d9d74bb5740ba30380d274a2
[]
no_license
SocialSkyInc/fess-db
307aa23c812eb5f6cd0c85c1e9a90117f2a72932
4e3e3e4dd6f7818edd2e02fc43bb97d91e3dac5a
refs/heads/master
2021-05-11T03:00:23.043498
2015-03-29T11:22:29
2015-03-29T11:22:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,834
java
package org.codelibs.fess.db.cbean.cq.ciq; import java.util.Map; import org.dbflute.cbean.*; import org.dbflute.cbean.ckey.*; import org.dbflute.cbean.coption.ConditionOption; import org.dbflute.cbean.cvalue.ConditionValue; import org.dbflute.cbean.sqlclause.SqlClause; import org.dbflute.exception.IllegalConditionBeanOperationException; import org.codelibs.fess.db.cbean.*; import org.codelibs.fess.db.cbean.cq.bs.*; import org.codelibs.fess.db.cbean.cq.*; /** * The condition-query for in-line of FILE_CONFIG_TO_LABEL_TYPE_MAPPING. * @author DBFlute(AutoGenerator) */ public class FileConfigToLabelTypeMappingCIQ extends AbstractBsFileConfigToLabelTypeMappingCQ { // =================================================================================== // Attribute // ========= protected BsFileConfigToLabelTypeMappingCQ _myCQ; // =================================================================================== // Constructor // =========== public FileConfigToLabelTypeMappingCIQ(ConditionQuery referrerQuery, SqlClause sqlClause , String aliasName, int nestLevel, BsFileConfigToLabelTypeMappingCQ myCQ) { super(referrerQuery, sqlClause, aliasName, nestLevel); _myCQ = myCQ; _foreignPropertyName = _myCQ.xgetForeignPropertyName(); // accept foreign property name _relationPath = _myCQ.xgetRelationPath(); // accept relation path _inline = true; } // =================================================================================== // Override about Register // ======================= protected void reflectRelationOnUnionQuery(ConditionQuery bq, ConditionQuery uq) { throw new IllegalConditionBeanOperationException("InlineView cannot use Union: " + bq + " : " + uq); } @Override protected void setupConditionValueAndRegisterWhereClause(ConditionKey k, Object v, ConditionValue cv, String col) { regIQ(k, v, cv, col); } @Override protected void setupConditionValueAndRegisterWhereClause(ConditionKey k, Object v, ConditionValue cv, String col, ConditionOption op) { regIQ(k, v, cv, col, op); } @Override protected void registerWhereClause(String wc) { registerInlineWhereClause(wc); } @Override protected boolean isInScopeRelationSuppressLocalAliasName() { if (_onClause) { throw new IllegalConditionBeanOperationException("InScopeRelation on OnClause is unsupported."); } return true; } // =================================================================================== // Override about Query // ==================== protected ConditionValue xgetCValueId() { return _myCQ.xdfgetId(); } protected ConditionValue xgetCValueFileConfigId() { return _myCQ.xdfgetFileConfigId(); } protected ConditionValue xgetCValueLabelTypeId() { return _myCQ.xdfgetLabelTypeId(); } protected Map<String, Object> xfindFixedConditionDynamicParameterMap(String pp) { return null; } public String keepScalarCondition(FileConfigToLabelTypeMappingCQ sq) { throwIICBOE("ScalarCondition"); return null; } public String keepSpecifyMyselfDerived(FileConfigToLabelTypeMappingCQ sq) { throwIICBOE("(Specify)MyselfDerived"); return null;} public String keepQueryMyselfDerived(FileConfigToLabelTypeMappingCQ sq) { throwIICBOE("(Query)MyselfDerived"); return null;} public String keepQueryMyselfDerivedParameter(Object vl) { throwIICBOE("(Query)MyselfDerived"); return null;} public String keepMyselfExists(FileConfigToLabelTypeMappingCQ sq) { throwIICBOE("MyselfExists"); return null;} protected void throwIICBOE(String name) { throw new IllegalConditionBeanOperationException(name + " at InlineView is unsupported."); } // =================================================================================== // Very Internal // ============= // very internal (for suppressing warn about 'Not Use Import') protected String xinCB() { return FileConfigToLabelTypeMappingCB.class.getName(); } protected String xinCQ() { return FileConfigToLabelTypeMappingCQ.class.getName(); } }
[ "shinsuke@yahoo.co.jp" ]
shinsuke@yahoo.co.jp
dec105dfa77b9262ede7495435b2171c62959558
f5b0c9be6293194dd81d3af987bd513ab4e87221
/src/com/codeforces/competitions/year2015/round299div2/Second.java
aac73ebb25a2752a17967bd7fbe553be424b9527
[]
no_license
rahulkhairwar/dsa-library
13f8eb7765d3fa4e8cf2a746a3007e3a9447b2f8
b14d14b4e3227ef596375bab55e88d50c7b950a6
refs/heads/master
2022-04-28T06:37:16.098693
2020-04-04T19:00:11
2020-04-04T19:00:11
43,200,287
3
1
null
null
null
null
UTF-8
Java
false
false
3,734
java
package com.codeforces.competitions.year2015.round299div2; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.Writer; import java.util.InputMismatchException; public class Second { private static int a[]; private static InputReader reader; private static OutputWriter writer; public static void main(String[] args) { Second second = new Second(); reader = second.new InputReader(System.in); writer = second.new OutputWriter(System.out); find(); writer.flush(); reader.close(); writer.close(); } public static void find() { a = new int[1024]; a[0] = 4; a[1] = 7; int count = 2; for (int i = 0; i < 510; i++) { a[count++] = a[i] * 10 + 4; a[count++] = a[i] * 10 + 7; } int num = reader.nextInt(); for (int i = 0; i < 1022; i++) if (num == a[i]) { writer.println(i + 1); break; } } class InputReader { private InputStream stream; private byte[] buf = new byte[1024]; private int curChar; private int numChars; public InputReader(InputStream stream) { this.stream = stream; } public int read() { if (numChars == -1) throw new InputMismatchException(); if (curChar >= numChars) { curChar = 0; try { numChars = stream.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (numChars <= 0) return -1; } return buf[curChar++]; } public int nextInt() { int c = read(); while (isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } int res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c & 15; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public long nextLong() { int c = read(); while (isSpaceChar(c)) c = read(); int sign = 1; if (c == '-') { sign = -1; c = read(); } long result = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); result *= 10; result += c & 15; c = read(); } while (!isSpaceChar(c)); return result * sign; } public String next() { int c = read(); while (isSpaceChar(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isSpaceChar(c)); return res.toString(); } public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } public void close() { try { stream.close(); } catch (IOException e) { e.printStackTrace(); } } } class OutputWriter { private PrintWriter writer; public OutputWriter(OutputStream stream) { writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter( stream))); } public OutputWriter(Writer writer) { this.writer = new PrintWriter(writer); } public void println(int x) { writer.println(x); } public void println(long x) { writer.println(x); } public void print(int x) { writer.print(x); } public void print(long x) { writer.println(x); } public void println(String s) { writer.println(s); } public void print(String s) { writer.print(s); } public void printSpace() { writer.print(" "); } public void flush() { writer.flush(); } public void close() { writer.close(); } } }
[ "rahulkhairwar@gmail.com" ]
rahulkhairwar@gmail.com
84d70b736bf392a2faf26b2d2efc5d97752649ea
0a4d4b808ee0724114e6153c1204de4e253c1dcb
/samples/279/b.java
4c5f1a35f11005972df9f7c4811899c31674f77c
[ "MIT" ]
permissive
yura-hb/sesame-sampled-pairs
543b19bf340f6a35681cfca1084349bd3eb8f853
33b061e3612a7b26198c17245c2835193f861151
refs/heads/main
2023-07-09T04:15:05.821444
2021-08-08T12:01:04
2021-08-08T12:01:04
393,947,142
0
0
null
null
null
null
UTF-8
Java
false
false
1,414
java
import java.security.*; import java.security.spec.*; import javax.crypto.spec.DHParameterSpec; class DHParameterGenerator extends AlgorithmParameterGeneratorSpi { /** * Generates the parameters. * * @return the new AlgorithmParameters object */ @Override protected AlgorithmParameters engineGenerateParameters() { if (random == null) { random = SunJCE.getRandom(); } BigInteger paramP = null; BigInteger paramG = null; try { AlgorithmParameterGenerator dsaParamGen = AlgorithmParameterGenerator.getInstance("DSA"); dsaParamGen.init(primeSize, random); AlgorithmParameters dsaParams = dsaParamGen.generateParameters(); DSAParameterSpec dsaParamSpec = dsaParams.getParameterSpec(DSAParameterSpec.class); DHParameterSpec dhParamSpec; if (this.exponentSize &gt; 0) { dhParamSpec = new DHParameterSpec(dsaParamSpec.getP(), dsaParamSpec.getG(), this.exponentSize); } else { dhParamSpec = new DHParameterSpec(dsaParamSpec.getP(), dsaParamSpec.getG()); } AlgorithmParameters algParams = AlgorithmParameters.getInstance("DH", SunJCE.getInstance()); algParams.init(dhParamSpec); return algParams; } catch (Exception ex) { throw new ProviderException("Unexpected exception", ex); } } private SecureRandom random = null; private int primeSize = DEF_DH_KEY_SIZE; private int exponentSize = 0; }
[ "hayeuyur@MacBook-Pro.local" ]
hayeuyur@MacBook-Pro.local
6a5c81a70202f24b710f28e6bda4fbcddff09e76
fd6700a0baea14c31da8962b8686e938ba2059c1
/library/src/main/java/com/bumptech/glide/load/resource/bitmap/GlideBitmapDrawableResource.java
24e4586d00ae7a93604b9f49b9c452c5538d783b
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "BSD-2-Clause-Views", "MIT" ]
permissive
0359xiaodong/glide
f4153918faf10a13755e1a947143b1c31d4e9ced
e0239113cb498388e7c46664df6490335de6bb84
refs/heads/master
2021-01-18T00:37:22.267548
2014-09-10T01:57:14
2014-09-10T01:57:14
23,950,506
1
0
null
null
null
null
UTF-8
Java
false
false
807
java
package com.bumptech.glide.load.resource.bitmap; import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; import com.bumptech.glide.load.resource.drawable.DrawableResource; import com.bumptech.glide.util.Util; /** * A resource wrapper for {@link com.bumptech.glide.load.resource.bitmap.GlideBitmapDrawable}. */ public class GlideBitmapDrawableResource extends DrawableResource<GlideBitmapDrawable> { private BitmapPool bitmapPool; public GlideBitmapDrawableResource(GlideBitmapDrawable drawable, BitmapPool bitmapPool) { super(drawable); this.bitmapPool = bitmapPool; } @Override public int getSize() { return Util.getSize(drawable.getBitmap()); } @Override public void recycle() { bitmapPool.put(drawable.getBitmap()); } }
[ "judds@google.com" ]
judds@google.com
a5a44209976ca3d03e5145db79500a0d79fc38a4
ed58225e220e7860f79a7ddaedfe62c5373e6f9d
/GOLauncher1.5_main_screen/GOLauncher1.5_main_screen/src/com/jiubang/ggheart/apps/desks/diy/PreferencesModelFixer.java
87da505f8268edcff8b624c792ac62fd7c3d82bb
[]
no_license
led-os/samplea1
f453125996384ef5453c3dca7c42333cc9534853
e55e57f9d5c7de0e08c6795851acbc1b1679d3a1
refs/heads/master
2021-08-30T05:37:00.963358
2017-12-03T08:55:00
2017-12-03T08:55:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,859
java
package com.jiubang.ggheart.apps.desks.diy; import android.content.Context; /** * 历史原因,产生sharedpreference管理混乱的问题 * 一些模块包括n个功能点,共用一个sharedpreference文件,但其中部分功能点需要跟随备份与还原, * 另一部分功能点不能跟随备份与还原,而备份还原只能进行文件级别的整体拷贝与还原,因此导致部分功能点备份还原功能失效,但又不能直接修改保存。 * 因此,本类的作用在于,将其中需跟随备份还原的功能点,独立出来,字段不变,转移到新的sharedpreference文件中,以便备份还原模块统一处理。 * @author huyong * */ public class PreferencesModelFixer { public static void fixOldSystemSettingPreference(Context context) { final PreferencesManager pm = new PreferencesManager(context, IPreferencesIds.BACKUP_SHAREDPREFERENCES_SYSTEM_SETTING_FILE, Context.MODE_PRIVATE); boolean hasSavedMode = pm.contains(IPreferencesIds.SYSTEM_SETTING_CENTER_SHOW_DIALOG_MODE); boolean hasSavedShowDlg = pm.contains(IPreferencesIds.SYSTEM_SETTING_CENTER_SHOW_DIALOG); if (!hasSavedMode && !hasSavedShowDlg) { //尚未保存任何数据,表明是刚升级上来,尚未采用新版Preference数据,则需要更新。 final PreferencesManager oldPM = new PreferencesManager(context, IPreferencesIds.DESK_SHAREPREFERENCES_FILE, Context.MODE_PRIVATE); String oldSavedMode = oldPM.getString(IPreferencesIds.SYSTEM_SETTING_CENTER_SHOW_DIALOG_MODE, "1"); pm.putString(IPreferencesIds.SYSTEM_SETTING_CENTER_SHOW_DIALOG_MODE, oldSavedMode); boolean oldShowDlg = oldPM.getBoolean( IPreferencesIds.SYSTEM_SETTING_CENTER_SHOW_DIALOG, true); pm.putBoolean(IPreferencesIds.SYSTEM_SETTING_CENTER_SHOW_DIALOG, oldShowDlg); pm.commit(); } } }
[ "clteir28410@chacuo.net" ]
clteir28410@chacuo.net
d2fb32cd1560b0118147ce0611838757ad2f2fa5
bf0a5acf1bba30568dacb655a2a5aa4fe2c78d85
/src/com/shroggle/presentation/image/.svn/text-base/RemoveIconService.java.svn-base
c43f1d3b01c68af68f0a40cbad1c094cdadddc89
[]
no_license
shroggle/Shroggle
37fd3a8e264b275b948f05d1bfe100744bb85973
4e3c3c67c55772ca914f12f652cf6023512be615
refs/heads/master
2016-09-06T03:50:14.602344
2011-10-31T22:58:04
2011-10-31T22:58:04
2,683,810
0
0
null
null
null
null
UTF-8
Java
false
false
1,554
/********************************************************************* * * * Copyright (c) 2007-2011 by Web-Deva. * * All rights reserved. * * * * This computer program is protected by copyright law and * * international treaties. Unauthorized reproduction or distribution * * of this program, or any portion of it, may result in severe civil * * and criminal penalties, and will be prosecuted to the maximum * * extent possible under the law. * * * *********************************************************************/ package com.shroggle.presentation.image; import com.shroggle.logic.user.UsersManager; import com.shroggle.presentation.AbstractService; import com.shroggle.util.ServiceLocator; import org.directwebremoting.annotations.RemoteProxy; /** * @author Balakirev Anatoliy */ @RemoteProxy public class RemoveIconService extends AbstractService { public void remove(final int iconId) { new UsersManager().getLogined(); ServiceLocator.getPersistanceTransaction().execute(new Runnable() { @Override public void run() { ServiceLocator.getPersistance().removeIcon(iconId); } }); } }
[ "don@shefer.us" ]
don@shefer.us
0bd3aa8e87336fe27e0e2655eca3b6bcef0687e1
47efc0d0b5b55eb0461a6752b87304ea8e971927
/src/test/java/com/novaordis/series/LinkedListSeriesTest.java
3e098e42e8a984afbcf3a64d3299975c28d4e14a
[ "Apache-2.0" ]
permissive
ovidiuf/series
fbf1a38e05b74ab78f470440625a37d61af8e297
978cd2290bcd6b15c2395e18081ba2d2d467f42d
refs/heads/master
2021-05-31T00:56:07.949147
2016-03-05T21:00:59
2016-03-05T21:00:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,571
java
package com.novaordis.series; import com.novaordis.series.metric.DoubleHeader; import com.novaordis.series.metric.LongHeader; import com.novaordis.series.metric.StringHeader; import org.junit.Test; import java.util.Iterator; import java.util.List; /** * @author <a href="mailto:ovidiu@novaordis.com">Ovidiu Feodorov</a> * * Copyright 2012 Nova Ordis LLC */ public class LinkedListSeriesTest extends SeriesTest { // Constants --------------------------------------------------------------------------------------------------------------------------- // Static ------------------------------------------------------------------------------------------------------------------------------ // Attributes -------------------------------------------------------------------------------------------------------------------------- // Constructors ------------------------------------------------------------------------------------------------------------------------ // Public ------------------------------------------------------------------------------------------------------------------------------ @Test public void testHeadersInConstructor() throws Exception { Series s = new LinkedListSeries(new StringHeader("a"), new LongHeader("b"), new DoubleHeader("c")); List<Header> headers = s.getHeaders(); assertEquals(3, headers.size()); assertEquals("a", ((StringHeader)headers.get(0)).getName()); assertEquals("b", ((LongHeader)headers.get(1)).getName()); assertEquals("c", ((DoubleHeader)headers.get(2)).getName()); Iterator<Row> ri = s.iterator(); assertFalse(ri.hasNext()); } // Package protected ------------------------------------------------------------------------------------------------------------------- // Protected --------------------------------------------------------------------------------------------------------------------------- @Override protected LinkedListSeries getSeriesToTest(Row... rows) throws Exception { LinkedListSeries s = new LinkedListSeries(); for(Row r: rows) { s.add(r); } return s; } // Private ----------------------------------------------------------------------------------------------------------------------------- // Inner classes ----------------------------------------------------------------------------------------------------------------------- }
[ "ovidiu@novaordis.com" ]
ovidiu@novaordis.com
0cde3f5fc63c19bcc29f74539ecc798c2a0a7e6b
623bfc10a2c89e57740d3ae65d865f7c7b407c0e
/src/MorningZombie.java
300661e19aabe48531724bb07afdc08750b34889
[]
no_license
League-Level0-Student/level-0-module-0-RylieM
d3a39b7aa2bb582f88d942e065f1ac922a4337aa
ad5365baac651d5a27d230c33a50d0c0914fc6f5
refs/heads/master
2020-09-05T12:03:19.585134
2019-12-19T02:20:53
2019-12-19T02:20:53
220,098,274
0
0
null
null
null
null
UTF-8
Java
false
false
440
java
import javax.swing.JOptionPane; public class MorningZombie { public static void main(String[] args) { JOptionPane.showMessageDialog(null,"Turn off Alarm"); JOptionPane.showMessageDialog(null,"Put on Antipersperant"); JOptionPane.showMessageDialog(null, "Put on day Clothes"); JOptionPane.showMessageDialog(null, "Go and Eat Breakfast"); } }
[ "leaguestudent@administrator-Inspiron-15-3552" ]
leaguestudent@administrator-Inspiron-15-3552
ad145f6e4cd0192b849972b4df9aac4c4dae3179
cafd28556bb7480931e3888af7c1510cad597421
/src/main/java/adams/Main.java
1d33f6c76d387ba730950ca54d412ad51bb93f96
[ "MIT" ]
permissive
opengl-8080/adams
575c5b01a64e16a6d73f2012ea4af3c952764d2c
a76b3f6b002e02cd4d8d9449a90fd29025a8fe26
refs/heads/master
2021-05-04T04:56:24.115305
2016-10-16T15:15:40
2016-10-16T15:15:40
70,915,832
0
0
null
null
null
null
UTF-8
Java
false
false
297
java
package adams; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class Main { public static void main(String[] args) { SpringApplication.run(Main.class, args); } }
[ "tomcat.port.8080+github@gmail.com" ]
tomcat.port.8080+github@gmail.com
ac7ad32fee4506c9bfb9caee2d51db8e72afa346
10b2970c5b08b582712235d881f87e2f2a6147f7
/FactoryMethodDesignPattern/src/main/java/com/aman/gof/vendingmachine/app/concreteproduct/ColdDrinksVendingMachine.java
99fa5f1aeec476f95c17cd96bd43317630c4bc3c
[]
no_license
amanver16/design-patterns
80fbb0f483b4983234bda96b48bc175bd3ac2209
b9b31742b2fd165ed813722d4e9c36183f465f24
refs/heads/master
2020-04-02T13:19:32.679480
2018-11-09T06:59:15
2018-11-09T06:59:15
154,476,616
2
0
null
null
null
null
UTF-8
Java
false
false
1,134
java
package com.aman.gof.vendingmachine.app.concreteproduct; import com.aman.gof.vendingmachine.app.product.VendingMachine; /** * This class defines concrete product (Cold Drinks Vending Machine) which * implements Vending Machine interface and vends only cold drinks */ public class ColdDrinksVendingMachine implements VendingMachine { @Override public String vend(long money, String coldDrink) { if (money == 0) { return "Sorry !!! Please pay the amount first."; } if ("Coca Cola".equalsIgnoreCase(coldDrink) && money == 50) { return "Coca Cola"; } else if ("Pepsi".equalsIgnoreCase(coldDrink) && money == 50) { return "Pepsi"; } else if ("Sprite".equalsIgnoreCase(coldDrink) && money == 50) { return "Sprite"; } else if ("Mirinda".equalsIgnoreCase(coldDrink) && money == 50) { return "Mirinda"; } else if ("Maaza".equalsIgnoreCase(coldDrink) && money == 50) { return "Maaza"; } else { return "Sorry !!! The item you are looking for is not available."; } } }
[ "aman.verma@sysbiz.org" ]
aman.verma@sysbiz.org
e04c123596900aaf94d362022f0b2cea0a5f8288
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/28/28_873014eaaba5525d4a1fcad3c40bedc54db1cf1c/IsEqual/28_873014eaaba5525d4a1fcad3c40bedc54db1cf1c_IsEqual_t.java
ab08f639fc9933412f29eee8a00fb0328ab67b5e
[]
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,924
java
/* Copyright (c) 2000-2006 hamcrest.org */ package org.hamcrest.core; import java.lang.reflect.Array; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; import org.hamcrest.Factory; import org.hamcrest.Matcher; /** * Is the value equal to another value, as tested by the * {@link java.lang.Object#equals} invokedMethod? */ public class IsEqual<T> extends BaseMatcher<T> { private final Object object; public IsEqual(T equalArg) { object = equalArg; } public boolean matches(Object arg) { return areEqual(arg, object); } public void describeTo(Description description) { description.appendValue(object); } private static boolean areEqual(Object o1, Object o2) { if (o1 == null) { return o2 == null; } else if (isArray(o1)) { return isArray(o2) && areArraysEqual(o1, o2); } else { return o1.equals(o2); } } private static boolean areArraysEqual(Object o1, Object o2) { return areArrayLengthsEqual(o1, o2) && areArrayElementsEqual(o1, o2); } private static boolean areArrayLengthsEqual(Object o1, Object o2) { return Array.getLength(o1) == Array.getLength(o2); } private static boolean areArrayElementsEqual(Object o1, Object o2) { for (int i = 0; i < Array.getLength(o1); i++) { if (!areEqual(Array.get(o1, i), Array.get(o2, i))) return false; } return true; } private static boolean isArray(Object o) { return o.getClass().isArray(); } /** * Is the value equal to another value, as tested by the * {@link java.lang.Object#equals} invokedMethod? */ @Factory public static <T> Matcher<T> equalTo(T operand) { return new IsEqual<T>(operand); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5cf87ac7ddc96657b0e9600c7bf1d6fefb2dd1f8
f766baf255197dd4c1561ae6858a67ad23dcda68
/app/src/main/java/com/tencent/mm/protocal/c/apq.java
c8e0d296822276e31f18570505a22f5fc3408b11
[]
no_license
jianghan200/wxsrc6.6.7
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
eb6c56587cfca596f8c7095b0854cbbc78254178
refs/heads/master
2020-03-19T23:40:49.532494
2018-06-12T06:00:50
2018-06-12T06:00:50
137,015,278
4
2
null
null
null
null
UTF-8
Java
false
false
2,696
java
package com.tencent.mm.protocal.c; import java.util.LinkedList; public final class apq extends bhd { public String rSp; public String rSq; protected final int a(int paramInt, Object... paramVarArgs) { if (paramInt == 0) { paramVarArgs = (f.a.a.c.a)paramVarArgs[0]; if (this.shX != null) { paramVarArgs.fV(1, this.shX.boi()); this.shX.a(paramVarArgs); } if (this.rSp != null) { paramVarArgs.g(2, this.rSp); } if (this.rSq != null) { paramVarArgs.g(3, this.rSq); } return 0; } if (paramInt == 1) { if (this.shX == null) { break label383; } } label383: for (int i = f.a.a.a.fS(1, this.shX.boi()) + 0;; i = 0) { paramInt = i; if (this.rSp != null) { paramInt = i + f.a.a.b.b.a.h(2, this.rSp); } i = paramInt; if (this.rSq != null) { i = paramInt + f.a.a.b.b.a.h(3, this.rSq); } return i; if (paramInt == 2) { paramVarArgs = new f.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler); for (paramInt = bhd.a(paramVarArgs); paramInt > 0; paramInt = bhd.a(paramVarArgs)) { if (!super.a(paramVarArgs, this, paramInt)) { paramVarArgs.cJS(); } } break; } if (paramInt == 3) { Object localObject1 = (f.a.a.a.a)paramVarArgs[0]; apq localapq = (apq)paramVarArgs[1]; paramInt = ((Integer)paramVarArgs[2]).intValue(); switch (paramInt) { default: return -1; case 1: paramVarArgs = ((f.a.a.a.a)localObject1).IC(paramInt); i = paramVarArgs.size(); paramInt = 0; while (paramInt < i) { Object localObject2 = (byte[])paramVarArgs.get(paramInt); localObject1 = new fk(); localObject2 = new f.a.a.a.a((byte[])localObject2, unknownTagHandler); for (boolean bool = true; bool; bool = ((fk)localObject1).a((f.a.a.a.a)localObject2, (com.tencent.mm.bk.a)localObject1, bhd.a((f.a.a.a.a)localObject2))) {} localapq.shX = ((fk)localObject1); paramInt += 1; } case 2: localapq.rSp = ((f.a.a.a.a)localObject1).vHC.readString(); return 0; } localapq.rSq = ((f.a.a.a.a)localObject1).vHC.readString(); return 0; } return -1; } } } /* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes2-dex2jar.jar!/com/tencent/mm/protocal/c/apq.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "526687570@qq.com" ]
526687570@qq.com
5bbf560ac2388d4d4cbc537974ed3115dc97980d
dafcdd6347a1be928df01b5a5bf47527f38d029f
/SampleNaverMovie3/src/com/example/samplenavermovie3/MainActivity.java
7b1d44488fa5ee857efc59c40747215e900f6e34
[]
no_license
sunleesi/android-education-project
b62e63076619cb927490fe1585c6a7a0169c79a5
31c1e520275ba0445b3288e0626fe5717193bd7b
refs/heads/master
2021-01-10T03:06:12.607555
2015-06-01T06:38:54
2015-06-01T06:38:54
36,643,841
0
1
null
null
null
null
UTF-8
Java
false
false
4,590
java
package com.example.samplenavermovie3; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.net.URLEncoder; import com.begentgroup.xmlparser.XMLParser; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.app.ActionBarActivity; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.EditText; import android.widget.ListView; import android.widget.Toast; public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction() .add(R.id.container, new PlaceholderFragment()).commit(); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } /** * A placeholder fragment containing a simple view. */ public static class PlaceholderFragment extends Fragment { public PlaceholderFragment() { } ListView listView; EditText keywordView; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_main, container, false); keywordView = (EditText)rootView.findViewById(R.id.editText1); listView = (ListView)rootView.findViewById(R.id.listView1); Button btn = (Button)rootView.findViewById(R.id.button1); btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { new MyTask().execute(keywordView.getText().toString()); } }); return rootView; } class MyTask extends AsyncTask<String, Integer, NaverMovie> { @Override protected NaverMovie doInBackground(String... params) { String keyword = params[0]; try { URL url = new URL("http://openapi.naver.com/search?key=55f1e342c5bce1cac340ebb6032c7d9a&display=10&start=1&target=movie&query="+URLEncoder.encode(keyword, "utf8")); HttpURLConnection conn = (HttpURLConnection)url.openConnection(); conn.setConnectTimeout(30000); conn.setReadTimeout(30000); int responseCode = conn.getResponseCode(); if (responseCode == HttpURLConnection.HTTP_OK) { InputStream is = conn.getInputStream(); XMLParser parser = new XMLParser(); NaverMovie movies = parser.fromXml(is, "channel", NaverMovie.class); return movies; // BufferedReader br = new BufferedReader(new InputStreamReader(is)); // StringBuilder sb = new StringBuilder(); // String line; // while((line = br.readLine()) != null) { // sb.append(line + "\n\r"); // } // return sb.toString(); } } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Override protected void onPostExecute(NaverMovie result) { super.onPostExecute(result); if (result != null) { // ArrayAdapter<MovieItem> adapter = new ArrayAdapter<MovieItem>(getActivity(), android.R.layout.simple_list_item_1, result.item); MyAdapter adapter = new MyAdapter(getActivity(),result.item); listView.setAdapter(adapter); // Toast.makeText(getActivity(), "result " + result, Toast.LENGTH_SHORT).show(); } } } } }
[ "dongja94@gmail.com" ]
dongja94@gmail.com
11368acd93957ff2f4258249dbe7ac5b0468b385
cfc60fc1148916c0a1c9b421543e02f8cdf31549
/src/testcases/CWE259_Hard_Coded_Password/CWE259_Hard_Coded_Password__passwordAuth_07.java
f6a1098325b663ed50df3f946cf52e2339afb813
[ "LicenseRef-scancode-public-domain" ]
permissive
zhujinhua/GitFun
c77c8c08e89e61006f7bdbc5dd175e5d8bce8bd2
987f72fdccf871ece67f2240eea90e8c1971d183
refs/heads/master
2021-01-18T05:46:03.351267
2012-09-11T16:43:44
2012-09-11T16:43:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,678
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE259_Hard_Coded_Password__passwordAuth_07.java Label Definition File: CWE259_Hard_Coded_Password.label.xml Template File: sources-sink-07.tmpl.java */ /* * @description * CWE: 259 Hard Coded Password * BadSource: hardcodedPassword Hardcoded password in String * GoodSource: Password is read from stdin * BadSink: passwordAuth password used in PasswordAuthentication * Flow Variant: 07 Control flow: if(private_five==5) and if(private_five!=5) * * */ package testcases.CWE259_Hard_Coded_Password; import testcasesupport.*; import java.sql.*; import javax.servlet.http.*; import java.util.Properties; import java.io.*; import java.net.PasswordAuthentication; public class CWE259_Hard_Coded_Password__passwordAuth_07 extends AbstractTestCase { /* The variable below is not declared "final", but is never assigned any other value so a tool should be able to identify that reads of this will always give its initialized value. */ private int private_five = 5; /* uses badsource and badsink */ public void bad() throws Throwable { String data; if(private_five == 5) { data = "pass"; } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ java.util.logging.Logger log_good_source = java.util.logging.Logger.getLogger("local-logger"); BufferedReader bufread2 = null; InputStreamReader inread2 = null; Properties prop = new Properties(); IO.writeLine("Enter the password: "); data = ""; try { inread2 = new InputStreamReader(System.in); bufread2 = new BufferedReader(inread2); /* FIX: password is read from stdin */ data = bufread2.readLine(); } catch(Exception e) { log_good_source.warning("Exception in try"); } finally { try { if( bufread2 != null ) { bufread2.close(); } } catch( IOException e ) { log_good_source.warning("Error closing bufread2"); } finally { try { if( inread2 != null ) { inread2.close(); } } catch( IOException e ) { log_good_source.warning("Error closing inread2"); } } } } /* POTENTIAL FLAW: Hard-coded password */ PasswordAuthentication pa = new PasswordAuthentication("user", data.toCharArray()); IO.writeLine(pa.toString()); } /* goodG2B1() - use goodsource and badsink by changing private_five==5 to private_five!=5 */ private void goodG2B1() throws Throwable { String data; if(private_five != 5) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ data = "pass"; } else { java.util.logging.Logger log_good_source = java.util.logging.Logger.getLogger("local-logger"); BufferedReader bufread2 = null; InputStreamReader inread2 = null; Properties prop = new Properties(); IO.writeLine("Enter the password: "); data = ""; try { inread2 = new InputStreamReader(System.in); bufread2 = new BufferedReader(inread2); /* FIX: password is read from stdin */ data = bufread2.readLine(); } catch(Exception e) { log_good_source.warning("Exception in try"); } finally { try { if( bufread2 != null ) { bufread2.close(); } } catch( IOException e ) { log_good_source.warning("Error closing bufread2"); } finally { try { if( inread2 != null ) { inread2.close(); } } catch( IOException e ) { log_good_source.warning("Error closing inread2"); } } } } /* POTENTIAL FLAW: Hard-coded password */ PasswordAuthentication pa = new PasswordAuthentication("user", data.toCharArray()); IO.writeLine(pa.toString()); } /* goodG2B2() - use goodsource and badsink by reversing statements in if */ private void goodG2B2() throws Throwable { String data; if(private_five == 5) { java.util.logging.Logger log_good_source = java.util.logging.Logger.getLogger("local-logger"); BufferedReader bufread2 = null; InputStreamReader inread2 = null; Properties prop = new Properties(); IO.writeLine("Enter the password: "); data = ""; try { inread2 = new InputStreamReader(System.in); bufread2 = new BufferedReader(inread2); /* FIX: password is read from stdin */ data = bufread2.readLine(); } catch(Exception e) { log_good_source.warning("Exception in try"); } finally { try { if( bufread2 != null ) { bufread2.close(); } } catch( IOException e ) { log_good_source.warning("Error closing bufread2"); } finally { try { if( inread2 != null ) { inread2.close(); } } catch( IOException e ) { log_good_source.warning("Error closing inread2"); } } } } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ data = "pass"; } /* POTENTIAL FLAW: Hard-coded password */ PasswordAuthentication pa = new PasswordAuthentication("user", data.toCharArray()); IO.writeLine(pa.toString()); } public void good() throws Throwable { goodG2B1(); goodG2B2(); } /* 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); } }
[ "amitf@chackmarx.com" ]
amitf@chackmarx.com
a5086ee953080cd3efac37e1529c5121b60d6c30
69c1256baec48b66365b5ec8faec5d6318b0eb21
/Mage.Sets/src/mage/sets/exodus/ExaltedDragon.java
e0931a73e79ee41e11ac09179b7a5e4a6c2c8a27
[]
no_license
gbraad/mage
3b84eefe4845258f6250a7ff692e1f2939864355
18ce6a0305db6ebc0d34054af03fdb0ba88b5a3b
refs/heads/master
2022-09-28T17:31:38.653921
2015-04-04T22:28:22
2015-04-04T22:28:22
33,435,029
1
0
null
2022-09-01T23:39:50
2015-04-05T08:25:58
Java
UTF-8
Java
false
false
5,152
java
/* * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ package mage.sets.exodus; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.ReturnToHandTargetCost; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; import mage.target.common.TargetControlledPermanent; /** * * @author fireshoes */ public class ExaltedDragon extends CardImpl { public ExaltedDragon(UUID ownerId) { super(ownerId, 6, "Exalted Dragon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); this.expansionSetCode = "EXO"; this.subtype.add("Dragon"); this.power = new MageInt(5); this.toughness = new MageInt(5); // Flying this.addAbility(FlyingAbility.getInstance()); // Exalted Dragon can't attack unless you sacrifice a land. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ExaltedDragonReplacementEffect())); } public ExaltedDragon(final ExaltedDragon card) { super(card); } @Override public ExaltedDragon copy() { return new ExaltedDragon(this); } } class ExaltedDragonReplacementEffect extends ReplacementEffectImpl { private static final FilterControlledPermanent filter = new FilterControlledLandPermanent(); ExaltedDragonReplacementEffect ( ) { super(Duration.WhileOnBattlefield, Outcome.Neutral); staticText = "{this} can't attack unless you sacrifice a land <i>(This cost is paid as attackers are declared.)</i>"; } ExaltedDragonReplacementEffect ( ExaltedDragonReplacementEffect effect ) { super(effect); } @Override public boolean apply(Game game, Ability source) { throw new UnsupportedOperationException("Not supported."); } @Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { Player player = game.getPlayer(event.getPlayerId()); if ( player != null ) { SacrificeTargetCost attackCost = new SacrificeTargetCost(new TargetControlledPermanent(filter)); if ( attackCost.canPay(source, source.getSourceId(), event.getPlayerId(), game) && player.chooseUse(Outcome.Neutral, "Sacrifice a land?", game) ) { if (attackCost.pay(source, game, source.getSourceId(), event.getPlayerId(), true) ) { return false; } } return true; } return false; } @Override public boolean checksEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.DECLARE_ATTACKER; } @Override public boolean applies(GameEvent event, Ability source, Game game) { return event.getSourceId().equals(source.getSourceId()); } @Override public ExaltedDragonReplacementEffect copy() { return new ExaltedDragonReplacementEffect(this); } }
[ "fireshoes@fireshoes-PC" ]
fireshoes@fireshoes-PC
f62d8dd4028f18058cb2829f628a64f7592dbfba
22b1fe6a0af8ab3c662551185967bf2a6034a5d2
/experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/sub1/Class_1176.java
819a7236dc581215517ea9a2ccb271e89ad0f881
[ "Apache-2.0" ]
permissive
lesaint/experimenting-annotation-processing
b64ed2182570007cb65e9b62bb2b1b3f69d168d6
1e9692ceb0d3d2cda709e06ccc13290262f51b39
refs/heads/master
2021-01-23T11:20:19.836331
2014-11-13T10:37:14
2014-11-13T10:37:14
26,336,984
1
0
null
null
null
null
UTF-8
Java
false
false
151
java
package fr.javatronic.blog.massive.annotation1.sub1; import fr.javatronic.blog.processor.Annotation_001; @Annotation_001 public class Class_1176 { }
[ "sebastien.lesaint@gmail.com" ]
sebastien.lesaint@gmail.com
a2948ce28b6b078b2a126dac91a42530b51c82ad
10378c580b62125a184f74f595d2c37be90a5769
/net/minecraft/realms/RealmsBridge.java
2039b4fd3ee38d82ce98accd42b3bf92bd6a43e5
[]
no_license
ClientPlayground/Melon-Client
4299d7f3e8f2446ae9f225c0d7fcc770d4d48ecb
afc9b11493e15745b78dec1c2b62bb9e01573c3d
refs/heads/beta-v2
2023-04-05T20:17:00.521159
2021-03-14T19:13:31
2021-03-14T19:13:31
347,509,882
33
19
null
2021-03-14T19:13:32
2021-03-14T00:27:40
null
UTF-8
Java
false
false
1,801
java
package net.minecraft.realms; import java.lang.reflect.Constructor; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreenRealmsProxy; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class RealmsBridge extends RealmsScreen { private static final Logger LOGGER = LogManager.getLogger(); private GuiScreen previousScreen; public void switchToRealms(GuiScreen p_switchToRealms_1_) { this.previousScreen = p_switchToRealms_1_; try { Class<?> oclass = Class.forName("com.mojang.realmsclient.RealmsMainScreen"); Constructor<?> constructor = oclass.getDeclaredConstructor(new Class[] { RealmsScreen.class }); constructor.setAccessible(true); Object object = constructor.newInstance(new Object[] { this }); Minecraft.getMinecraft().displayGuiScreen((GuiScreen)((RealmsScreen)object).getProxy()); } catch (Exception exception) { LOGGER.error("Realms module missing", exception); } } public GuiScreenRealmsProxy getNotificationScreen(GuiScreen p_getNotificationScreen_1_) { try { this.previousScreen = p_getNotificationScreen_1_; Class<?> oclass = Class.forName("com.mojang.realmsclient.gui.screens.RealmsNotificationsScreen"); Constructor<?> constructor = oclass.getDeclaredConstructor(new Class[] { RealmsScreen.class }); constructor.setAccessible(true); Object object = constructor.newInstance(new Object[] { this }); return ((RealmsScreen)object).getProxy(); } catch (Exception exception) { LOGGER.error("Realms module missing", exception); return null; } } public void init() { Minecraft.getMinecraft().displayGuiScreen(this.previousScreen); } }
[ "Hot-Tutorials@users.noreply.github.com" ]
Hot-Tutorials@users.noreply.github.com
6dc47aaa6b257bd142cb414dcb106380444634f9
74f1d9c4cecd58262888ffed02101c1b6bedfe13
/src/main/java/com/chinaxiaopu/xiaopuMobi/dto/topic/VotesRankDto.java
973f6483ab347dcefdd8c2cdcc318f0d19b6b6aa
[]
no_license
wwm0104/xiaopu
341da3f711c0682d3bc650ac62179935330c27b2
ddb1b57c84cc6e6fdfdd82c2e998eea341749c87
refs/heads/master
2021-01-01T04:38:42.376033
2017-07-13T15:44:19
2017-07-13T15:44:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
213
java
package com.chinaxiaopu.xiaopuMobi.dto.topic; import lombok.Data; /** * 投票排行榜 * Created by Administrator on 2016/11/2. */ @Data public class VotesRankDto { private Integer parentType; }
[ "ellien" ]
ellien
d4cb0f1162a4fb27f1556a299bc48c6e96504da5
799cce351010ca320625a651fb2e5334611d2ebf
/Data Set/Synthetic/Before/before_1855.java
af7c1a75ee9597271bae7c5e90c7aaa198c9f8b7
[]
no_license
dareenkf/SQLIFIX
239be5e32983e5607787297d334e5a036620e8af
6e683aa68b5ec2cfe2a496aef7b467933c6de53e
refs/heads/main
2023-01-29T06:44:46.737157
2020-11-09T18:14:24
2020-11-09T18:14:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
269
java
public class Dummy { void sendRequest(Connection conn) throws SQLException { String sql = "SELECT EMPLOYEE_ID, HIRE_DATE, JOB_ID FROM EMPLOYEES WHERE HIRE_DATE =" + val1+" OR JOB_ID =" + rand4; Statement stmt = conn.createStatement(); stmt.executeQuery(sql); } }
[ "jahin99@gmail.com" ]
jahin99@gmail.com
8ec77b47d076d24773492593d6e9d9cf8fffaee8
56b7dff6880dd88f3567fe2a60a268a8038c9661
/ssm-common/src/main/java/com/adanac/ssm/common/domain/enums/TaskMaxEnum.java
eed2e460da0f9e9e9258696d9cfc8d9ce0e7dad8
[]
no_license
adanac/ssmTiny
44a28a94022ff78101c9e98e6a14909cd9ae3da5
c4fe4e247a272658b447cb4d21a9dc0aa0fcd44f
refs/heads/master
2021-01-01T19:54:43.342310
2017-07-29T19:13:38
2017-07-29T19:13:38
98,720,899
0
0
null
null
null
null
UTF-8
Java
false
false
1,109
java
package com.adanac.ssm.common.domain.enums; /** * @author liuxunyang * 2016年06月28日 * 最大任务数 1任务数 2容积 3库区商品数量 */ public enum TaskMaxEnum { TASK_NUMBER(1, "任务数"), VOLUME(2, "容积"), RESERVOIR_GOODS_QUANTITY(3, "库区商品数量"); private final Integer code; private final String desc; /** * @param code * @param description */ private TaskMaxEnum(Integer code, String description) { this.code = code; this.desc = description; } /** * @return * @desc 返回code */ public Integer getCode() { return code; } /** * @return * @desc 返回desc */ public String getDesc() { return desc; } /** * 通过code获取枚举 * @param code */ public static TaskMaxEnum getByCode(Integer code) { for (TaskMaxEnum em : values()) { if (em.getCode() == code) { return em; } } return null; } }
[ "adanac@sina.com" ]
adanac@sina.com
da9a0cb1b0b22d638345c44ae8b8aa298254941c
8bf67e3dde92e88447c607f9a1a2665778918e7d
/cloud-biz-core/src/main/java/com/qweib/cloud/biz/system/service/BiaoXsddtjService.java
dcbd72b6a5b9a2cefce5906b193ead7b6380bc93
[]
no_license
yeshenggen532432/test02
1f87235ba8822bd460f7c997dd977c3e68371898
52279089299a010f99c60bc6656476d68f19050f
refs/heads/master
2022-12-11T01:38:24.097948
2020-09-07T06:36:51
2020-09-07T06:36:51
293,404,392
0
0
null
null
null
null
UTF-8
Java
false
false
4,769
java
package com.qweib.cloud.biz.system.service; import com.qweib.cloud.biz.system.service.plat.SysDeptmempowerService; import com.qweib.cloud.repository.company.SysDeptmempowerDao; import com.qweib.cloud.repository.ws.SysDepartDao; import com.qweib.cloud.core.domain.OnlineUser; import com.qweib.cloud.core.domain.SysLoginInfo; import com.qweib.cloud.repository.BiaoXsddtjDao; import com.qweib.cloud.core.domain.BiaoXsddtj; import com.qweib.cloud.core.domain.SysBforderDetail; import com.qweib.cloud.core.exception.ServiceException; import com.qweib.cloud.utils.Page; import com.qweib.cloud.utils.StrUtil; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; import java.util.Map; @Service public class BiaoXsddtjService { @Resource private BiaoXsddtjDao xsddtjDao; @Resource private SysDepartDao departDao; @Resource private SysDeptmempowerDao deptmempowerDao; @Resource private SysDeptmempowerService deptmempowerService; /** *说明:分页查询销售订单统计表 *@创建:作者:llp 创建时间:2016-7-7 *@修改历史: * [序号](llp 2016-7-7)<修改说明> */ public Page queryBiaoXsddtj(BiaoXsddtj Xsddtj, SysLoginInfo info, String dataTp,Integer page,Integer limit){ try { String datasource = info.getDatasource(); Integer memberId = info.getIdKey(); String depts = "";//部门 String visibleDepts = "";//可见部门 String invisibleDepts = "";//不可见部门 Integer mId = null;//是否个人 if ("1".equals(dataTp)){//查询全部部门 Map<String, Object> allDeptsMap = departDao.queryAllDeptsForMap(datasource); if (null!=allDeptsMap && !StrUtil.isNull(allDeptsMap.get("depts"))) {//不为空 depts = (String) allDeptsMap.get("depts"); } } else if ("2".equals(dataTp)){//部门及子部门 Map<String, Object> map = departDao.queryBottomDepts(memberId, datasource); if (null!=map && !StrUtil.isNull(map.get("depts"))) {//不为空(如:7-9-11-) String dpt = (String) map.get("depts"); depts = dpt.substring(0,dpt.length()-1).replace("-", ",");//去掉最后一个“-”并转成逗号隔开的字符串 } } else if ("3".equals(dataTp)){//个人 mId = memberId; } //查询可见部门(如:-4-,-7-4-) visibleDepts = getPowerDepts(datasource, memberId, "1", visibleDepts); //查询不可见部门 invisibleDepts = getPowerDepts(datasource, memberId, "2", invisibleDepts); String allDepts = StrUtil.addStr(depts, visibleDepts);//整合要查询的部门和可见部门 return this.xsddtjDao.queryBiaoXsddtj(Xsddtj, datasource, mId, allDepts, invisibleDepts, page, limit); } catch (Exception e) { throw new ServiceException(e); } } //获取权限部门(可见或不可见) private String getPowerDepts(String datasource, Integer memberId,String tp, String visibleDepts) { Map<String, Object> visibleMap = deptmempowerDao.queryPowerDeptsByMemberId(memberId, tp, datasource); if (null!=visibleMap && !StrUtil.isNull(visibleMap.get("depts"))) {//将查出来的格式(如:-4-,-7-4-)转换成逗号隔开(如:4,7,4) visibleDepts = visibleMap.get("depts").toString().replace("-,-", "-"); visibleDepts = visibleDepts.substring(1, visibleDepts.length()-1).replace("-", ","); } return visibleDepts; } /** *说明:分页查询销售订单统计表Web *@创建:作者:llp 创建时间:2016-7-7 *@修改历史: * [序号](llp 2016-7-7)<修改说明> */ public Page queryBiaoXsddtjWeb(BiaoXsddtj Xsddtj,OnlineUser user, String dataTp,Integer page,Integer limit,String mids){ try { String datasource = user.getDatabase(); Integer memberId = user.getMemId(); Map<String, Object> map = deptmempowerService.getPowerDept(dataTp, memberId, datasource); return this.xsddtjDao.queryBiaoXsddtjWeb(Xsddtj, datasource, map, page, limit,mids); } catch (Exception e) { throw new ServiceException(e); } } public Map<String, Object> queryTolprice(BiaoXsddtj Xsddtj,OnlineUser user, String dataTp,String mids){ try { String datasource = user.getDatabase(); Integer memberId = user.getMemId(); Map<String, Object> map = deptmempowerService.getPowerDept(dataTp, memberId, datasource); return this.xsddtjDao.queryTolprice(Xsddtj,map, datasource,mids); } catch (Exception e) { throw new ServiceException(e); } } /** *说明:商品信息集合 *@创建:作者:llp 创建时间:2016-7-7 *@修改历史: * [序号](llp 2016-7-7)<修改说明> */ public List<SysBforderDetail> queryOrderDetailS(String database,String orderIds){ try { return this.xsddtjDao.queryOrderDetailS(database, orderIds); } catch (Exception e) { throw new ServiceException(e); } } }
[ "1617683532@qq.com" ]
1617683532@qq.com
07fa1cb2500e5f514ec27836f53f6fe5ae73dedf
d49a60be982e68f39a678947dde80e2d550bc861
/artman-output/java/proto-google-cloud-containeranalysis-v1beta1/src/main/java/io/grafeas/v1beta1/deployment/IamResourceNames.java
3e3b35d564fa974421dbd2253e72991998c7e029
[ "Apache-2.0" ]
permissive
yihanzhen/multi-pattern-resource-names
38b5fd2cbcd2a5f4a25f006414665b25b3b5cfe4
af24d391a0712ec7ed09fae7b0c4a6fac3f2f565
refs/heads/master
2022-04-09T19:57:09.142312
2020-03-24T21:37:11
2020-03-24T21:37:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,309
java
/* * Copyright 2018 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package io.grafeas.v1beta1.deployment; import com.google.api.resourcenames.ResourceName; /** * AUTO-GENERATED DOCUMENTATION AND CLASS * * @deprecated This resource name class will be removed in the next major version. */ @javax.annotation.Generated("by GAPIC protoc plugin") @Deprecated public class IamResourceNames { private IamResourceNames() {} public static IamResourceName parse(String resourceNameString) { if (NoteName.isParsableFrom(resourceNameString)) { return NoteName.parse(resourceNameString); } if (OccurrenceName.isParsableFrom(resourceNameString)) { return OccurrenceName.parse(resourceNameString); } return UntypedIamResourceName.parse(resourceNameString); } }
[ "hzyi@google.com" ]
hzyi@google.com
5fa1ac59494269c55f752f23cb73594ff2737ed4
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project56/src/test/java/org/gradle/test/performance56_3/Test56_271.java
01874aa19c52c77cd1f185d780b3929a7e115779
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance56_3; import static org.junit.Assert.*; public class Test56_271 { private final Production56_271 production = new Production56_271("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
25db9043f32c7ab36324f2a7f4e1962a535d0b1b
2f0f1e853018499ae47177888e48fe4b12200e2e
/day_three/Pttern_23.java
7473854198e78836d76f036661fb16a6442a51a4
[]
no_license
PankajAgade/Core-java
c7e87516378298137ad96ac30e1bbf9b33405c20
487a8a2e87016311fe7e49958c398aaa720401ce
refs/heads/main
2023-01-05T02:54:22.518480
2020-10-29T16:14:16
2020-10-29T16:14:16
308,380,077
2
0
null
null
null
null
UTF-8
Java
false
false
1,317
java
package day_three; //((i+3)/2)-j for 1st way /* 1 2 1 2 3 2 1 2 3 4 3 2 1 2 3 4 Steps 1.Trangle rough print (star) 2.Star pattern 3.value of n and check 1st column 4.increment and decrement base on condition */ public class Pttern_23 { public static void main(String[] args) { for (int i = 1; i <= 7; i=i+2) { int n = ((i+3)/2)-1; for (int j = 1; j <= i ; j++) { System.out.print(n+" "); if (j<=i/2) { n = n-1; } else { n=n+1; } } System.out.println(); } System.out.println(); System.out.println(); System.out.println("~~~~~~~~~~~~~~~~~~~ 2nd way~~~~~~~~~~~~~~~~~~~~~~~"); System.out.println(); for (int i = 1; i <= 4; i++) { int n = i; for (int j = 1; j <= (2*i)-1 ; j++) { System.out.print(n+" "); if (j<i) { n = n-1; } else { n=n+1; } } System.out.println(); } System.out.println(); System.out.println(); System.out.println("~~~~~~~~~~~~~~~~~~~ 3rd way~~~~~~~~~~~~~~~~~~~~~~~"); System.out.println(); for (int i = 1; i <= 4; i++) { for (int j = 1; j <= i ; j++) { System.out.print(i-j+1+" "); } for (int k = 1; k <= i ; k++) { System.out.print(k+1+" "); } System.out.println(); } } }
[ "pankajagade.pa@gmail.com" ]
pankajagade.pa@gmail.com
1a5627f74f3523a8d3ead1027605449630dfa877
834184ae7fb5fc951ec4ca76d0ab4d74224817a0
/src/main/java/com/nswt/cms/dataservice/FullTextTaskManager.java
2b4f38d5f17e34ae83ca20a420f1e0c01a9c18c1
[]
no_license
mipcdn/NswtOldPF
3bf9974be6ffbc32b2d52ef2e39adbe495185c7e
fe7be46f12b3874a7f19967c0808870d8e465f5a
refs/heads/master
2020-08-09T16:44:47.585700
2017-01-11T13:26:37
2017-01-11T13:26:37
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
1,401
java
package com.nswt.cms.dataservice; import com.nswt.cms.api.SearchAPI; import com.nswt.framework.User; import com.nswt.framework.data.DataTable; import com.nswt.framework.data.QueryBuilder; import com.nswt.framework.utility.Mapx; import com.nswt.platform.Application; import com.nswt.platform.pub.ConfigEanbleTaskManager; public class FullTextTaskManager extends ConfigEanbleTaskManager { public static final String CODE = "IndexMaintenance"; Mapx runningMap = new Mapx(); public boolean isRunning(long id) { int r = runningMap.getInt(new Long(id)); return r != 0; } public void execute(final long id) { runningMap.put(new Long(id), 1); new Thread() { public void run() { try { SearchAPI.update(id); } catch (Exception e) { e.printStackTrace(); } finally { runningMap.remove(new Long(id)); } } }.start(); } public Mapx getConfigEnableTasks() { DataTable dt = null; if (User.getCurrent() != null) { dt = new QueryBuilder("select id,name from ZCFullText where siteid=?", Application.getCurrentSiteID()) .executeDataTable(); } else { dt = new QueryBuilder("select id,name from ZCFullText").executeDataTable(); } return dt.toMapx(0, 1); } public String getCode() { return "IndexMaintenance"; } public String getName() { return "Ë÷Òýά»¤ÈÎÎñ"; } }
[ "18611949252@163.como" ]
18611949252@163.como
a1ef34dab4159853e2e3d40882c477bca3ce5fed
d994c37c75247b228d5be166e55611c48376fe4e
/src/main/java/org/fxi/auth/service/impl/UserServiceImpl.java
0d1cf7fa0a55034b2aa32742e6981e510f9e308a
[]
no_license
xif10416s/SpringMVCWithSecurity
a3d68574f6600878ac9abc0ad4094f919e882d7f
cb44a6184343973e910ec467544cb2ccc5ded6dc
refs/heads/master
2021-01-17T12:53:14.150230
2016-06-16T15:39:34
2016-06-16T15:39:48
58,306,231
0
0
null
null
null
null
UTF-8
Java
false
false
2,760
java
package org.fxi.auth.service.impl; import java.util.LinkedList; import java.util.List; import org.fxi.auth.entity.User; import org.fxi.auth.entity.UserAuthority; import org.fxi.auth.repo.UserAuthorityRepository; import org.fxi.auth.repo.UserRepository; import org.fxi.auth.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @Service public class UserServiceImpl implements UserService { @Autowired private UserRepository userRepo; @Autowired private UserAuthorityRepository userAuthRepo; @Override public User getUserById(String userId) { return userRepo.findOne(userId); } @Override public User getUserByEmail(String email) { User user = userRepo.findByEmail(email); if (user == null) return null; List<UserAuthority> uas = userAuthRepo.findByUserId(user.getUserId()); List<String> roles = new LinkedList<>(); for (UserAuthority ua : uas) { roles.add(ua.getAuthority()); } user.setAuthorities(roles); return user; } @Override @Transactional(readOnly = false, propagation = Propagation.REQUIRED) public User saveUser(User user) { List<UserAuthority> oldAuthorities = userAuthRepo.findByUserId(user.getUserId()); if (oldAuthorities != null) { for (UserAuthority ua : oldAuthorities) { userAuthRepo.delete(ua); } } List<String> authorities = user.getAuthorities(); for (String auth : authorities) { UserAuthority newRole = new UserAuthority(); newRole.setUserId(user.getUserId()); newRole.setAuthority(auth); userAuthRepo.save(newRole); } userRepo.save(user); userRepo.flush(); userAuthRepo.flush(); return user; } @Override public void delUser(User user) { if (user == null) return; List<UserAuthority> oldAuths = userAuthRepo.findByUserId(user.getUserId()); userRepo.delete(user); userAuthRepo.delete(oldAuths); } @Override public UserAuthority addAuth(User user, String auth) { UserAuthority newAuth = null; for (UserAuthority a : userAuthRepo.findByUserId(user.getUserId())) { if (a.getAuthority().equals(auth)) { newAuth = a; } } if (newAuth == null) { newAuth = new UserAuthority(); newAuth.setUserId(user.getUserId()); newAuth.setAuthority(auth); newAuth = userAuthRepo.saveAndFlush(newAuth); user.getAuthorities().add(newAuth.getAuthority()); } return newAuth; } @Override public void delAuth(User user, String auth) { for (UserAuthority a : userAuthRepo.findByUserId(user.getUserId())) { if (a.getAuthority().equals(auth)) { userAuthRepo.delete(a); return; } } } }
[ "12345678" ]
12345678
0deca7a8a07e16a8206fe63164ae60e3f29da037
ad5cd983fa810454ccbb8d834882856d7bf6faca
/platform/ext/processing/testsrc/de/hybris/platform/processengine/adminapi/BusinessProcessControllerTest.java
fe9b6fd0f0d72a8e5e601ca55c914b2ef199236c
[]
no_license
amaljanan/my-hybris
2ea57d1a4391c9a81c8f4fef7c8ab977b48992b8
ef9f254682970282cf8ad6d26d75c661f95500dd
refs/heads/master
2023-06-12T17:20:35.026159
2021-07-09T04:33:13
2021-07-09T04:33:13
384,177,175
0
0
null
null
null
null
UTF-8
Java
false
false
3,709
java
/* * Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.processengine.adminapi; import static org.assertj.core.api.Assertions.assertThat; import de.hybris.bootstrap.annotations.IntegrationTest; import de.hybris.platform.processengine.BusinessProcessService; import de.hybris.platform.servicelayer.ServicelayerBaseTest; import javax.annotation.Resource; import org.junit.Before; import org.junit.Test; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @IntegrationTest public class BusinessProcessControllerTest extends ServicelayerBaseTest { private static final String SUCCEEDED = "Operation succeeded"; private static final String CAN_T_BE_NULL = "event can't be null"; private static final String TRIGGERED = "Event has been already triggered"; private BusinessProcessController businessProcessController; @Resource private BusinessProcessService businessProcessService; @Before public void setUp() { this.businessProcessController = new BusinessProcessController(businessProcessService); } @Test public void triggerEventWithChoice() { final TriggerEventRequest triggerEventRequest = new TriggerEventRequest(); triggerEventRequest.setEvent("testEvent1"); triggerEventRequest.setChoice("choice"); final ResponseEntity<TriggerEventResponse> responseEntity = businessProcessController.triggerEvent(triggerEventRequest); assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(responseEntity.getBody().getMessage()).isEqualTo(SUCCEEDED); } @Test public void triggerEventWithoutChoice() { final TriggerEventRequest triggerEventRequest = new TriggerEventRequest(); triggerEventRequest.setEvent("testEvent2"); final ResponseEntity<TriggerEventResponse> responseEntity = businessProcessController.triggerEvent(triggerEventRequest); assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(responseEntity.getBody().getMessage()).isEqualTo(SUCCEEDED); } @Test public void triggerAlreadyTriggeredEvent() { final TriggerEventRequest triggerEventRequest = new TriggerEventRequest(); triggerEventRequest.setEvent("testEvent3"); triggerEventRequest.setChoice("chzoice"); final ResponseEntity<TriggerEventResponse> responseEntity1 = businessProcessController.triggerEvent(triggerEventRequest); assertThat(responseEntity1.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(responseEntity1.getBody().getMessage()).isEqualTo(SUCCEEDED); final ResponseEntity<TriggerEventResponse> responseEntity2 = businessProcessController.triggerEvent(triggerEventRequest); assertThat(responseEntity2.getStatusCode()).isEqualTo(HttpStatus.CONFLICT); assertThat(responseEntity2.getBody().getMessage()).isEqualTo(TRIGGERED); } @Test public void triggerEventWithoutEventName() { final TriggerEventRequest triggerEventRequest = new TriggerEventRequest(); triggerEventRequest.setChoice("choice"); final ResponseEntity<TriggerEventResponse> responseEntity = businessProcessController.triggerEvent(triggerEventRequest); assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST); assertThat(responseEntity.getBody().getMessage()).isEqualTo(CAN_T_BE_NULL); } @Test public void triggerEventWithoutEventNameAndChoice() { final TriggerEventRequest triggerEventRequest = new TriggerEventRequest(); final ResponseEntity<TriggerEventResponse> responseEntity = businessProcessController.triggerEvent(triggerEventRequest); assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST); assertThat(responseEntity.getBody().getMessage()).isEqualTo(CAN_T_BE_NULL); } }
[ "amaljanan333@gmail.com" ]
amaljanan333@gmail.com
8b3a1c5e655a3469795932a47b41f2557e18e01d
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/files/File_1011917.java
a56f761001793bf67f73eb764ae5d653860c9589
[ "Apache-2.0" ]
permissive
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,690
java
package org.jetbrains.mps.samples.ParallelFor.intentions; /*Generated by MPS */ import jetbrains.mps.intentions.AbstractIntentionDescriptor; import jetbrains.mps.openapi.intentions.IntentionFactory; import java.util.Collection; import jetbrains.mps.openapi.intentions.IntentionExecutable; import jetbrains.mps.openapi.intentions.Kind; import jetbrains.mps.smodel.SNodePointer; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.openapi.editor.EditorContext; import java.util.Collections; import jetbrains.mps.intentions.AbstractIntentionExecutable; import jetbrains.mps.smodel.action.SNodeFactoryOperations; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; import jetbrains.mps.internal.collections.runtime.ListSequence; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import org.jetbrains.mps.openapi.language.SAbstractConcept; import jetbrains.mps.internal.collections.runtime.IWhereFilter; import jetbrains.mps.internal.collections.runtime.IVisitor; import jetbrains.mps.openapi.intentions.IntentionDescriptor; public final class TurnToForEachStatement_Intention extends AbstractIntentionDescriptor implements IntentionFactory { private Collection<IntentionExecutable> myCachedExecutable; public TurnToForEachStatement_Intention() { super(Kind.NORMAL, false, new SNodePointer("r:2614090b-4018-4457-8ad5-c503bc8936fb(org.jetbrains.mps.samples.ParallelFor.intentions)", "5384012304952504715")); } @Override public String getPresentation() { return "TurnToForEachStatement"; } @Override public boolean isApplicable(final SNode node, final EditorContext editorContext) { return true; } @Override public boolean isSurroundWith() { return false; } public Collection<IntentionExecutable> instances(final SNode node, final EditorContext context) { if (myCachedExecutable == null) { myCachedExecutable = Collections.<IntentionExecutable>singletonList(new TurnToForEachStatement_Intention.IntentionImplementation()); } return myCachedExecutable; } /*package*/ final class IntentionImplementation extends AbstractIntentionExecutable { public IntentionImplementation() { } @Override public String getDescription(final SNode node, final EditorContext editorContext) { return "Turn to Sequential"; } @Override public void execute(final SNode node, final EditorContext editorContext) { SNode forStatement = SNodeFactoryOperations.createNewNode(MetaAdapterFactory.getConcept(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x10cac65f399L, "jetbrains.mps.baseLanguage.collections.structure.ForEachStatement"), null); final SNode variable = SNodeFactoryOperations.createNewNode(MetaAdapterFactory.getConcept(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x10cac6f0962L, "jetbrains.mps.baseLanguage.collections.structure.ForEachVariable"), null); SPropertyOperations.assign(variable, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), SPropertyOperations.getString(SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0xcb7388e8f1824cdaL, 0xbd839796e8634856L, 0x7bd8445d1e8770aaL, 0x7bd8445d1e8810c2L, "loopVariable")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"))); SLinkOperations.setTarget(forStatement, MetaAdapterFactory.getContainmentLink(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x10cac65f399L, 0x10cac7231f1L, "variable"), variable); SLinkOperations.setTarget(forStatement, MetaAdapterFactory.getContainmentLink(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x10cac65f399L, 0x10cac72911aL, "inputSequence"), SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0xcb7388e8f1824cdaL, 0xbd839796e8634856L, 0x7bd8445d1e8770aaL, 0x7bd8445d1e888c7eL, "inputSequence"))); ListSequence.fromList(SNodeOperations.getNodeDescendants(SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x10cb1ac5adeL, 0x10cb1ada6e8L, "body")), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c77f1e98L, "jetbrains.mps.baseLanguage.structure.VariableReference"), false, new SAbstractConcept[]{})).where(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return SNodeOperations.isInstanceOf(SLinkOperations.getTarget(SNodeOperations.cast(it, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c77f1e98L, "jetbrains.mps.baseLanguage.structure.VariableReference")), MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c77f1e98L, 0xf8cc6bf960L, "variableDeclaration")), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc67c7efL, "jetbrains.mps.baseLanguage.structure.LocalVariableDeclaration")); } }).toListSequence().where(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return SLinkOperations.getTarget(it, MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c77f1e98L, 0xf8cc6bf960L, "variableDeclaration")) == SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0xcb7388e8f1824cdaL, 0xbd839796e8634856L, 0x7bd8445d1e8770aaL, 0x7bd8445d1e8810c2L, "loopVariable")); } }).visitAll(new IVisitor<SNode>() { public void visit(SNode it) { SNode newReference = SNodeFactoryOperations.createNewNode(MetaAdapterFactory.getConcept(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x10cac6fa5c3L, "jetbrains.mps.baseLanguage.collections.structure.ForEachVariableReference"), null); SLinkOperations.setTarget(newReference, MetaAdapterFactory.getReferenceLink(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x10cac6fa5c3L, 0x10cac7007baL, "variable"), variable); SNodeOperations.replaceWithAnother(it, newReference); } }); SLinkOperations.setTarget(forStatement, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x10cb1ac5adeL, 0x10cb1ada6e8L, "body"), SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x10cb1ac5adeL, 0x10cb1ada6e8L, "body"))); SNodeOperations.replaceWithAnother(node, forStatement); editorContext.selectWRTFocusPolicy(variable); } @Override public IntentionDescriptor getDescriptor() { return TurnToForEachStatement_Intention.this; } } }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
a96243a33a72833b345be5a082e18c7f7c49f6c2
7c890da84f919085a37f68608f724cb339e6a426
/zeusLamp/src/scripts/aem/sprint11/ZCMS_6451_VerifySearchComponentWithTextBox.java
00e0830737be737759f3c700bedddba4e2dfbdae
[]
no_license
AnandSelenium/ZeusRepo
8da6921068f4ce4450c8f34706da0c52fdeb0bab
0a9bb33bdac31945b1b1a80e6475a390d1dc5d08
refs/heads/master
2020-03-23T21:38:11.536096
2018-07-24T07:26:48
2018-07-24T07:26:48
142,121,241
0
1
null
null
null
null
UTF-8
Java
false
false
2,684
java
package scripts.aem.sprint11; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; import java.io.IOException; import java.util.ArrayList; import org.testng.annotations.BeforeClass; import org.testng.annotations.Parameters; import classes.aem.AEMHomePage; import classes.vmware.VMwareSearchPage; import com.arsin.ArsinSeleniumAPI; public class ZCMS_6451_VerifySearchComponentWithTextBox { ArsinSeleniumAPI oASelFW = null; @Parameters({ "prjName", "testEnvironment","instanceName","sauceUser","moduleName","testSetName"}) @BeforeClass public void oneTimeSetUp(String prjName,String testEnvironment,String instanceName,String sauceUser,String moduleName,String testSetName) throws InterruptedException { String[] environment=new ArsinSeleniumAPI().getEnvironment(testEnvironment,this.getClass().getName()); String os=environment[0];String browser=environment[1];String testCasename=this.getClass().getSimpleName(); oASelFW = new ArsinSeleniumAPI(prjName,testCasename,browser,os,instanceName,sauceUser,moduleName,testSetName); oASelFW.startSelenium(oASelFW.getURL("VMware_Search3",oASelFW.instanceName)); } @Test public void LAMPTest() throws Exception { try{ VMwareSearchPage vmwsearch = new VMwareSearchPage(oASelFW); //Verifying Search Home Page vmwsearch.verifyVMwareSearchPage(); Thread.sleep(5000); //Searching with valid search item and validating search results vmwsearch.specificValidSearch("vmware"); //Verifying Search Support Page vmwsearch.verifyVMwareSearchSupportPage(); //Search Result Body - For Support vmwsearch.supportSearch("vmware"); } catch (Exception e) { Thread.sleep(5000); ArrayList<String> tabs = new ArrayList<String> (oASelFW.driver.getWindowHandles()); if(tabs.size()>1) { Thread.sleep(5000); oASelFW.driver.close(); /* AEMAssetsPage aasp = new AEMAssetsPage(oASelFW); aasp.SelectAndDeleteFolder(pageName); oASelFW.driver.navigate().refresh(); */ Thread.sleep(5000); String wins[]=oASelFW.effectaArray("getAllWindowNames"); oASelFW.effecta("selectWindow",wins[0]); AEMHomePage aemHomeObj=new AEMHomePage(oASelFW); //logout aemHomeObj.AEMLogout(); } else { AEMHomePage aemHomeObj=new AEMHomePage(oASelFW); aemHomeObj.AEMLogout(); } e.printStackTrace(); oASelFW.reportStepDtlsWithScreenshot (e.getMessage(),e.getMessage(),"Fail"); } } @AfterClass public void oneTearDown() throws IOException { oASelFW.stopSelenium(); } }
[ "seleniumauto175@gmail.com" ]
seleniumauto175@gmail.com
bd0f613759766a361c4057bf8de8d18e60defd46
cc32a64afed91f7186c009d3d1247370a904be1c
/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/codesystems/BenefitTermEnumFactory.java
40a5d554e9b723c6c57e5324f5ec19ebb63eb4b8
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
rmoult01/hapi_fhir_mir_1
5dc5966ce06738872d8e0ddb667d513df76bb3d1
93270786e2d30185c41987038f878943cd736e34
refs/heads/master
2021-07-20T15:58:24.384813
2017-10-30T14:36:18
2017-10-30T14:36:18
106,035,744
1
0
null
null
null
null
UTF-8
Java
false
false
2,565
java
package org.hl7.fhir.dstu3.model.codesystems; /* Copyright (c) 2011+, HL7, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Generated on Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1 import org.hl7.fhir.dstu3.model.EnumFactory; public class BenefitTermEnumFactory implements EnumFactory<BenefitTerm> { public BenefitTerm fromCode(String codeString) throws IllegalArgumentException { if (codeString == null || "".equals(codeString)) return null; if ("annual".equals(codeString)) return BenefitTerm.ANNUAL; if ("day".equals(codeString)) return BenefitTerm.DAY; if ("lifetime".equals(codeString)) return BenefitTerm.LIFETIME; throw new IllegalArgumentException("Unknown BenefitTerm code '"+codeString+"'"); } public String toCode(BenefitTerm code) { if (code == BenefitTerm.ANNUAL) return "annual"; if (code == BenefitTerm.DAY) return "day"; if (code == BenefitTerm.LIFETIME) return "lifetime"; return "?"; } public String toSystem(BenefitTerm code) { return code.getSystem(); } }
[ "moultonr@mir.wustl.edu" ]
moultonr@mir.wustl.edu
539d5cdacc07792100d01a29b83624b9d6373f0a
01bb92c1884edf8f52b770c2ef0c931ca6bce331
/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatEditorPaneUI.java
3fe21d525ec848e596522dd5ad725c2377cd6e97
[ "Apache-2.0" ]
permissive
lwdillon/FlatLaf
18b649fa9f908a1c928a5d1147ca126613573069
cce91ea16dc17deb39629636acfde356522467e7
refs/heads/main
2023-08-18T23:08:31.081873
2021-09-25T11:27:26
2021-09-25T11:27:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,012
java
/* * Copyright 2019 FormDev Software GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.formdev.flatlaf.ui; import static com.formdev.flatlaf.util.UIScale.scale; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Insets; import java.awt.event.FocusListener; import java.beans.PropertyChangeEvent; import java.util.Map; import java.util.function.Consumer; import javax.swing.JComponent; import javax.swing.JEditorPane; import javax.swing.UIManager; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.basic.BasicEditorPaneUI; import javax.swing.text.JTextComponent; import com.formdev.flatlaf.FlatClientProperties; import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable; import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI; import com.formdev.flatlaf.util.HiDPIUtils; /** * Provides the Flat LaF UI delegate for {@link javax.swing.JEditorPane}. * * <!-- BasicEditorPaneUI --> * * @uiDefault EditorPane.font Font * @uiDefault EditorPane.background Color also used if not editable * @uiDefault EditorPane.foreground Color * @uiDefault EditorPane.caretForeground Color * @uiDefault EditorPane.selectionBackground Color * @uiDefault EditorPane.selectionForeground Color * @uiDefault EditorPane.disabledBackground Color used if not enabled * @uiDefault EditorPane.inactiveBackground Color used if not editable * @uiDefault EditorPane.inactiveForeground Color used if not enabled (yes, this is confusing; this should be named disabledForeground) * @uiDefault EditorPane.border Border * @uiDefault EditorPane.margin Insets * @uiDefault EditorPane.caretBlinkRate int default is 500 milliseconds * * <!-- FlatEditorPaneUI --> * * @uiDefault Component.minimumWidth int * @uiDefault Component.isIntelliJTheme boolean * @uiDefault EditorPane.focusedBackground Color optional * * @author Karl Tauber */ public class FlatEditorPaneUI extends BasicEditorPaneUI implements StyleableUI { @Styleable protected int minimumWidth; protected boolean isIntelliJTheme; private Color background; @Styleable protected Color disabledBackground; @Styleable protected Color inactiveBackground; @Styleable protected Color focusedBackground; private Color oldDisabledBackground; private Color oldInactiveBackground; private Insets defaultMargin; private Object oldHonorDisplayProperties; private FocusListener focusListener; private Map<String, Object> oldStyleValues; public static ComponentUI createUI( JComponent c ) { return new FlatEditorPaneUI(); } @Override public void installUI( JComponent c ) { super.installUI( c ); applyStyle( FlatStylingSupport.getStyle( c ) ); } @Override protected void installDefaults() { super.installDefaults(); String prefix = getPropertyPrefix(); minimumWidth = UIManager.getInt( "Component.minimumWidth" ); isIntelliJTheme = UIManager.getBoolean( "Component.isIntelliJTheme" ); background = UIManager.getColor( prefix + ".background" ); disabledBackground = UIManager.getColor( prefix + ".disabledBackground" ); inactiveBackground = UIManager.getColor( prefix + ".inactiveBackground" ); focusedBackground = UIManager.getColor( prefix + ".focusedBackground" ); defaultMargin = UIManager.getInsets( prefix + ".margin" ); // use component font and foreground for HTML text oldHonorDisplayProperties = getComponent().getClientProperty( JEditorPane.HONOR_DISPLAY_PROPERTIES ); getComponent().putClientProperty( JEditorPane.HONOR_DISPLAY_PROPERTIES, true ); } @Override protected void uninstallDefaults() { super.uninstallDefaults(); background = null; disabledBackground = null; inactiveBackground = null; focusedBackground = null; oldDisabledBackground = null; oldInactiveBackground = null; oldStyleValues = null; getComponent().putClientProperty( JEditorPane.HONOR_DISPLAY_PROPERTIES, oldHonorDisplayProperties ); } @Override protected void installListeners() { super.installListeners(); // necessary to update focus background focusListener = new FlatUIUtils.RepaintFocusListener( getComponent(), c -> focusedBackground != null ); getComponent().addFocusListener( focusListener ); } @Override protected void uninstallListeners() { super.uninstallListeners(); getComponent().removeFocusListener( focusListener ); focusListener = null; } @Override protected void propertyChange( PropertyChangeEvent e ) { // invoke updateBackground() before super.propertyChange() String propertyName = e.getPropertyName(); if( "editable".equals( propertyName ) || "enabled".equals( propertyName ) ) updateBackground(); super.propertyChange( e ); propertyChange( getComponent(), e, this::applyStyle ); } static void propertyChange( JTextComponent c, PropertyChangeEvent e, Consumer<Object> applyStyle ) { switch( e.getPropertyName() ) { case FlatClientProperties.MINIMUM_WIDTH: c.revalidate(); break; case FlatClientProperties.STYLE: applyStyle.accept( e.getNewValue() ); c.revalidate(); c.repaint(); break; } } /** @since 2 */ protected void applyStyle( Object style ) { oldDisabledBackground = disabledBackground; oldInactiveBackground = inactiveBackground; oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty ); updateBackground(); } /** @since 2 */ protected Object applyStyleProperty( String key, Object value ) { return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, getComponent(), key, value ); } /** @since 2 */ @Override public Map<String, Class<?>> getStyleableInfos( JComponent c ) { return FlatStylingSupport.getAnnotatedStyleableInfos( this ); } private void updateBackground() { FlatTextFieldUI.updateBackground( getComponent(), background, disabledBackground, inactiveBackground, oldDisabledBackground, oldInactiveBackground ); } @Override public Dimension getPreferredSize( JComponent c ) { return applyMinimumWidth( c, super.getPreferredSize( c ), minimumWidth, defaultMargin ); } @Override public Dimension getMinimumSize( JComponent c ) { return applyMinimumWidth( c, super.getMinimumSize( c ), minimumWidth, defaultMargin ); } static Dimension applyMinimumWidth( JComponent c, Dimension size, int minimumWidth, Insets defaultMargin ) { // do not apply minimum width if JTextComponent.margin is set if( !FlatTextFieldUI.hasDefaultMargins( c, defaultMargin ) ) return size; // Assume that text area is in a scroll pane (that displays the border) // and subtract 1px border line width. // Using "(scale( 1 ) * 2)" instead of "scale( 2 )" to deal with rounding // issues. E.g. at scale factor 1.5 the first returns 4, but the second 3. minimumWidth = FlatUIUtils.minimumWidth( c, minimumWidth ); size.width = Math.max( size.width, scale( minimumWidth ) - (scale( 1 ) * 2) ); return size; } @Override protected void paintSafely( Graphics g ) { super.paintSafely( HiDPIUtils.createGraphicsTextYCorrection( (Graphics2D) g ) ); } @Override protected void paintBackground( Graphics g ) { paintBackground( g, getComponent(), isIntelliJTheme, focusedBackground ); } static void paintBackground( Graphics g, JTextComponent c, boolean isIntelliJTheme, Color focusedBackground ) { g.setColor( FlatTextFieldUI.getBackground( c, isIntelliJTheme, focusedBackground ) ); g.fillRect( 0, 0, c.getWidth(), c.getHeight() ); } }
[ "karl@jformdesigner.com" ]
karl@jformdesigner.com
33573899ff9a5309b47aa6f4f838973f7ebbabae
11002d1052b546105738829e1f49cff37588dba2
/ai.relational.orm.codegen/src/edu/neumont/schemas/orm/_2006/_04/orm/core/impl/QueryDerivationRequiresProjectionErrorTypeImpl.java
132ebb33d306c99ca19240bc6e340e1cc79b0f4e
[]
no_license
imbur/orm-codegen
2f0ddb929e364dc8945cf699ecaf08156062962c
962821f5ac2c55ffbc087eca6b45aa5e3dbe408c
refs/heads/master
2023-05-03T05:25:32.203415
2021-05-20T18:35:43
2021-05-20T18:35:43
364,452,740
0
0
null
null
null
null
UTF-8
Java
false
false
5,577
java
/** */ package edu.neumont.schemas.orm._2006._04.orm.core.impl; import edu.neumont.schemas.orm._2006._04.orm.core.CorePackage; import edu.neumont.schemas.orm._2006._04.orm.core.QueryDerivationPathRef; import edu.neumont.schemas.orm._2006._04.orm.core.QueryDerivationRequiresProjectionErrorType; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Query Derivation Requires Projection Error Type</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link edu.neumont.schemas.orm._2006._04.orm.core.impl.QueryDerivationRequiresProjectionErrorTypeImpl#getQueryDerivationPath <em>Query Derivation Path</em>}</li> * </ul> * * @generated */ public class QueryDerivationRequiresProjectionErrorTypeImpl extends ModelErrorImpl implements QueryDerivationRequiresProjectionErrorType { /** * The cached value of the '{@link #getQueryDerivationPath() <em>Query Derivation Path</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getQueryDerivationPath() * @generated * @ordered */ protected QueryDerivationPathRef queryDerivationPath; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected QueryDerivationRequiresProjectionErrorTypeImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return CorePackage.eINSTANCE.getQueryDerivationRequiresProjectionErrorType(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public QueryDerivationPathRef getQueryDerivationPath() { return queryDerivationPath; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetQueryDerivationPath(QueryDerivationPathRef newQueryDerivationPath, NotificationChain msgs) { QueryDerivationPathRef oldQueryDerivationPath = queryDerivationPath; queryDerivationPath = newQueryDerivationPath; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CorePackage.QUERY_DERIVATION_REQUIRES_PROJECTION_ERROR_TYPE__QUERY_DERIVATION_PATH, oldQueryDerivationPath, newQueryDerivationPath); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setQueryDerivationPath(QueryDerivationPathRef newQueryDerivationPath) { if (newQueryDerivationPath != queryDerivationPath) { NotificationChain msgs = null; if (queryDerivationPath != null) msgs = ((InternalEObject)queryDerivationPath).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CorePackage.QUERY_DERIVATION_REQUIRES_PROJECTION_ERROR_TYPE__QUERY_DERIVATION_PATH, null, msgs); if (newQueryDerivationPath != null) msgs = ((InternalEObject)newQueryDerivationPath).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CorePackage.QUERY_DERIVATION_REQUIRES_PROJECTION_ERROR_TYPE__QUERY_DERIVATION_PATH, null, msgs); msgs = basicSetQueryDerivationPath(newQueryDerivationPath, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.QUERY_DERIVATION_REQUIRES_PROJECTION_ERROR_TYPE__QUERY_DERIVATION_PATH, newQueryDerivationPath, newQueryDerivationPath)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case CorePackage.QUERY_DERIVATION_REQUIRES_PROJECTION_ERROR_TYPE__QUERY_DERIVATION_PATH: return basicSetQueryDerivationPath(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case CorePackage.QUERY_DERIVATION_REQUIRES_PROJECTION_ERROR_TYPE__QUERY_DERIVATION_PATH: return getQueryDerivationPath(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case CorePackage.QUERY_DERIVATION_REQUIRES_PROJECTION_ERROR_TYPE__QUERY_DERIVATION_PATH: setQueryDerivationPath((QueryDerivationPathRef)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case CorePackage.QUERY_DERIVATION_REQUIRES_PROJECTION_ERROR_TYPE__QUERY_DERIVATION_PATH: setQueryDerivationPath((QueryDerivationPathRef)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case CorePackage.QUERY_DERIVATION_REQUIRES_PROJECTION_ERROR_TYPE__QUERY_DERIVATION_PATH: return queryDerivationPath != null; } return super.eIsSet(featureID); } } //QueryDerivationRequiresProjectionErrorTypeImpl
[ "marton.bur@gmail.com" ]
marton.bur@gmail.com
5f5b1e9802e68d6b444831ecd1270945ae033a5a
d83516af69daf73a56a081f595c704d214c3963e
/nan21.dnet.module.ad/nan21.dnet.module.ad.domain/src/main/java/net/nan21/dnet/module/ad/data/domain/entity/Note.java
6204f982be7cd74f817c7f26f795e182069feaaa
[]
no_license
nan21/nan21.dnet.modules_oss
fb86d20bf8a3560d30c17e885a80f6bf48a147fe
0251680173bf2fa922850bef833cf85ba954bb60
refs/heads/master
2020-05-07T20:35:06.507957
2013-02-19T12:59:05
2013-02-19T12:59:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,060
java
/* * DNet eBusiness Suite * Copyright: 2010-2013 Nan21 Electronics SRL. All rights reserved. * Use is subject to license terms. */ package net.nan21.dnet.module.ad.data.domain.entity; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.Table; import javax.validation.constraints.NotNull; import net.nan21.dnet.core.domain.eventhandler.DefaultEventHandler; import net.nan21.dnet.core.domain.model.AbstractAuditable; import org.eclipse.persistence.annotations.Customizer; import org.eclipse.persistence.descriptors.DescriptorEvent; @NamedQueries({}) @Entity @Table(name = Note.TABLE_NAME) @Customizer(DefaultEventHandler.class) public class Note extends AbstractAuditable { public static final String TABLE_NAME = "AD_NOTE"; public static final String SEQUENCE_NAME = "AD_NOTE_SEQ"; private static final long serialVersionUID = -8865917134914502125L; /** * System generated unique identifier. */ @Column(name = "ID", nullable = false) @NotNull @Id @GeneratedValue(generator = SEQUENCE_NAME) private Long id; @Column(name = "NOTE", length = 4000) private String note; @Column(name = "TARGETUUID", length = 36) private String targetUuid; @Column(name = "TARGETTYPE", length = 255) private String targetType; public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } public String getNote() { return this.note; } public void setNote(String note) { this.note = note; } public String getTargetUuid() { return this.targetUuid; } public void setTargetUuid(String targetUuid) { this.targetUuid = targetUuid; } public String getTargetType() { return this.targetType; } public void setTargetType(String targetType) { this.targetType = targetType; } public void aboutToInsert(DescriptorEvent event) { super.aboutToInsert(event); } }
[ "mathe_attila@yahoo.com" ]
mathe_attila@yahoo.com
ad4c46d1deecd065afb3392c038cfb7a22cc469c
96342d1091241ac93d2d59366b873c8fedce8137
/dist/game/data/scripts/handlers/admincommandhandlers/AdminZone.java
1b623dc861f38c56db1e573823faa3d39baf65ea
[]
no_license
soultobe/L2JOlivia_EpicEdition
c97ac7d232e429fa6f91d21bb9360cf347c7ee33
6f9b3de9f63d70fa2e281b49d139738e02d97cd6
refs/heads/master
2021-01-10T03:42:04.091432
2016-03-09T06:55:59
2016-03-09T06:55:59
53,468,281
0
1
null
null
null
null
UTF-8
Java
false
false
7,909
java
/* * This file is part of the L2J Olivia project. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 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 handlers.admincommandhandlers; import java.util.StringTokenizer; import com.l2jolivia.gameserver.cache.HtmCache; import com.l2jolivia.gameserver.handler.IAdminCommandHandler; import com.l2jolivia.gameserver.instancemanager.MapRegionManager; import com.l2jolivia.gameserver.instancemanager.ZoneManager; import com.l2jolivia.gameserver.model.L2World; import com.l2jolivia.gameserver.model.L2WorldRegion; import com.l2jolivia.gameserver.model.Location; import com.l2jolivia.gameserver.model.TeleportWhereType; import com.l2jolivia.gameserver.model.actor.instance.L2PcInstance; import com.l2jolivia.gameserver.model.zone.L2ZoneType; import com.l2jolivia.gameserver.model.zone.ZoneId; import com.l2jolivia.gameserver.model.zone.type.NpcSpawnTerritory; import com.l2jolivia.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jolivia.util.StringUtil; /** * Small typo fix by Zoey76 24/02/2011 */ public class AdminZone implements IAdminCommandHandler { private static final String[] ADMIN_COMMANDS = { "admin_zone_check", "admin_zone_visual", "admin_zone_visual_clear" }; @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { if (activeChar == null) { return false; } final StringTokenizer st = new StringTokenizer(command, " "); final String actualCommand = st.nextToken(); // Get actual command // String val = ""; // if (st.countTokens() >= 1) {val = st.nextToken();} if (actualCommand.equalsIgnoreCase("admin_zone_check")) { showHtml(activeChar); activeChar.sendMessage("MapRegion: x:" + MapRegionManager.getInstance().getMapRegionX(activeChar.getX()) + " y:" + MapRegionManager.getInstance().getMapRegionY(activeChar.getY()) + " (" + MapRegionManager.getInstance().getMapRegionLocId(activeChar) + ")"); getGeoRegionXY(activeChar); activeChar.sendMessage("Closest Town: " + MapRegionManager.getInstance().getClosestTownName(activeChar)); Location loc; loc = MapRegionManager.getInstance().getTeleToLocation(activeChar, TeleportWhereType.CASTLE); activeChar.sendMessage("TeleToLocation (Castle): x:" + loc.getX() + " y:" + loc.getY() + " z:" + loc.getZ()); loc = MapRegionManager.getInstance().getTeleToLocation(activeChar, TeleportWhereType.CLANHALL); activeChar.sendMessage("TeleToLocation (ClanHall): x:" + loc.getX() + " y:" + loc.getY() + " z:" + loc.getZ()); loc = MapRegionManager.getInstance().getTeleToLocation(activeChar, TeleportWhereType.SIEGEFLAG); activeChar.sendMessage("TeleToLocation (SiegeFlag): x:" + loc.getX() + " y:" + loc.getY() + " z:" + loc.getZ()); loc = MapRegionManager.getInstance().getTeleToLocation(activeChar, TeleportWhereType.TOWN); activeChar.sendMessage("TeleToLocation (Town): x:" + loc.getX() + " y:" + loc.getY() + " z:" + loc.getZ()); } else if (actualCommand.equalsIgnoreCase("admin_zone_visual")) { final String next = st.nextToken(); if (next.equalsIgnoreCase("all")) { for (L2ZoneType zone : ZoneManager.getInstance().getZones(activeChar)) { zone.visualizeZone(activeChar.getZ()); } for (NpcSpawnTerritory territory : ZoneManager.getInstance().getSpawnTerritories(activeChar)) { territory.visualizeZone(activeChar.getZ()); } showHtml(activeChar); } else { final int zoneId = Integer.parseInt(next); ZoneManager.getInstance().getZoneById(zoneId).visualizeZone(activeChar.getZ()); } } else if (actualCommand.equalsIgnoreCase("admin_zone_visual_clear")) { ZoneManager.getInstance().clearDebugItems(); showHtml(activeChar); } return true; } private static void showHtml(L2PcInstance activeChar) { final String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "html/admin/zone.htm"); final NpcHtmlMessage adminReply = new NpcHtmlMessage(); adminReply.setHtml(htmContent); adminReply.replace("%PEACE%", (activeChar.isInsideZone(ZoneId.PEACE) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%PVP%", (activeChar.isInsideZone(ZoneId.PVP) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%SIEGE%", (activeChar.isInsideZone(ZoneId.SIEGE) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%TOWN%", (activeChar.isInsideZone(ZoneId.TOWN) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%CASTLE%", (activeChar.isInsideZone(ZoneId.CASTLE) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%FORT%", (activeChar.isInsideZone(ZoneId.FORT) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%HQ%", (activeChar.isInsideZone(ZoneId.HQ) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%CLANHALL%", (activeChar.isInsideZone(ZoneId.CLAN_HALL) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%LAND%", (activeChar.isInsideZone(ZoneId.LANDING) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%NOLAND%", (activeChar.isInsideZone(ZoneId.NO_LANDING) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%NOSUMMON%", (activeChar.isInsideZone(ZoneId.NO_SUMMON_FRIEND) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%WATER%", (activeChar.isInsideZone(ZoneId.WATER) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%FISHING%", (activeChar.isInsideZone(ZoneId.FISHING) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%SWAMP%", (activeChar.isInsideZone(ZoneId.SWAMP) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%DANGER%", (activeChar.isInsideZone(ZoneId.DANGER_AREA) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%NOSTORE%", (activeChar.isInsideZone(ZoneId.NO_STORE) ? "<font color=\"LEVEL\">YES</font>" : "NO")); adminReply.replace("%SCRIPT%", (activeChar.isInsideZone(ZoneId.SCRIPT) ? "<font color=\"LEVEL\">YES</font>" : "NO")); final StringBuilder zones = new StringBuilder(100); final L2WorldRegion region = L2World.getInstance().getRegion(activeChar.getX(), activeChar.getY()); for (L2ZoneType zone : region.getZones()) { if (zone.isCharacterInZone(activeChar)) { if (zone.getName() != null) { StringUtil.append(zones, zone.getName() + "<br1>"); if (zone.getId() < 300000) { StringUtil.append(zones, "(", String.valueOf(zone.getId()), ")"); } } else { StringUtil.append(zones, String.valueOf(zone.getId())); } StringUtil.append(zones, " "); } } for (NpcSpawnTerritory territory : ZoneManager.getInstance().getSpawnTerritories(activeChar)) { StringUtil.append(zones, territory.getName() + "<br1>"); } adminReply.replace("%ZLIST%", zones.toString()); activeChar.sendPacket(adminReply); } private static void getGeoRegionXY(L2PcInstance activeChar) { final int worldX = activeChar.getX(); final int worldY = activeChar.getY(); final int geoX = ((((worldX - (-327680)) >> 4) >> 11) + 10); final int geoY = ((((worldY - (-262144)) >> 4) >> 11) + 10); activeChar.sendMessage("GeoRegion: " + geoX + "_" + geoY + ""); } @Override public String[] getAdminCommandList() { return ADMIN_COMMANDS; } }
[ "kim@tsnet-j.co.jp" ]
kim@tsnet-j.co.jp
ff1b043b40e4641f2434495cef5a9b33f5d354d1
61655c4811f57b813959f48f5f10840b99f43bda
/src/edu/ucsb/cs56/S13/lab04/wmateer/ClockofDoom.java
ad260ca2b7fd2dcaee918d016f9b184d5f006855
[]
no_license
UCSB-CS56-S13/S13-lab04
84a1bf041a705f59d4e9f03fd334fb88eb4d3c8e
0c5f1902693f27f36a455a01c67d3cfececefffa
refs/heads/master
2021-01-19T17:11:30.044604
2013-06-04T00:13:54
2013-06-04T00:13:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,178
java
package edu.ucsb.cs56.S13.lab04.wmateer; /** ClockofDoom class @author Will Mateer @version CS56, S13, lab04 */ public class ClockofDoom { private String event; private int SecondsRemaining; /** no arg constructor, sets event to null and SecondsRemaining to 0 */ public ClockofDoom(){ this.event = null; this.SecondsRemaining = 0; } /** two arg construtor @param event name of input event @param TimeRemaining time left in seconds until the given event */ public ClockofDoom(String event, int TimeRemaining){ this.event = event; this.SecondsRemaining = TimeRemaining; } /** setter for event @param event name of input event */ public void setEvent(String event){ this.event = event; } /** setter for SecondsRemaining @param TimeRemaining input of seconds left until event */ public void setTimeRemaining(int TimeRemaining){ this.SecondsRemaining = TimeRemaining; } /** getter for event @return event name */ public String getEvent(){ return this.event; } /** getter for SecondsRemaining @return SecondsRemaining time in seconds until the event */ public int getTimeRemaining(){ return this.SecondsRemaining; } /** toString function that returns a formatted string of event and SecondsRemaining @return Formatted String of both private variables */ public String toString(){ return ("The event is " + this.event +" with " + this.SecondsRemaining + " seconds remaining"); } /** equals function ot check equality between object instances. @param o ambiguous object for input to check the equality @return boolean of equality */ public boolean equals(Object o){ if (o == null) return false; if (!(o instanceof ClockofDoom)) return false; ClockofDoom Test = (ClockofDoom) o; if ((Test.getEvent() == this.getEvent()) && (Test.getTimeRemaining() == this.getTimeRemaining())) { return true; } return false; } /** Example of a main of the class ClockofDoom */ public static void main (String [] args) { ClockofDoom Example = new ClockofDoom(); Example.setEvent("Insanity"); Example.setTimeRemaining(42); System.out.println(Example.toString()); } }
[ "pconrad@cs.ucsb.edu" ]
pconrad@cs.ucsb.edu
86af8e1fbc29a4dd7f8407f5da6740c426f5b027
ea65710a42cfd1a0d4c4141ac5ba297c5e6287aa
/FoodSpoty/FoodSpoty/src/com/google/android/gms/wallet/FullWalletRequest$Builder.java
775fdc0e4659bd8f66f006de38c7e6f16d558a33
[]
no_license
kanwarbirsingh/ANDROID
bc27197234c4c3295d658d73086ada47a0833d07
f84b29f0f6bd483d791983d5eeae75555e997c36
refs/heads/master
2020-03-18T02:26:55.720337
2018-05-23T18:05:47
2018-05-23T18:05:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
966
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.google.android.gms.wallet; // Referenced classes of package com.google.android.gms.wallet: // FullWalletRequest, Cart public final class <init> { final FullWalletRequest auW; public FullWalletRequest build() { return auW; } public auW setCart(Cart cart) { auW.auV = cart; return this; } public auW setGoogleTransactionId(String s) { auW.auL = s; return this; } public auW setMerchantTransactionId(String s) { auW.auM = s; return this; } private (FullWalletRequest fullwalletrequest) { auW = fullwalletrequest; super(); } auW(FullWalletRequest fullwalletrequest, auW auw) { this(fullwalletrequest); } }
[ "singhkanwar235@gmail.com" ]
singhkanwar235@gmail.com
2b334cf66d5693541877fc870dfd3f7fda9dd484
fdc5c96351aaaadfca1aade7cb3fe04c3829333c
/app/src/main/java/com/dat/barnaulzoopark/ui/admindatamanagement/DataManagementPreferenceFragment.java
6262e7c1bc04f80b3fea8bf8b9f7a4e8433a24ef
[]
no_license
jintoga/Barnaul-Zoopark
b5689058ab365961e63059d3f7f687d728ad2802
a2280cc4e601afae92e391f68b5365a123423d2f
refs/heads/master
2021-04-18T23:45:51.146694
2017-06-07T17:31:41
2017-06-07T17:31:41
50,792,159
1
0
null
null
null
null
UTF-8
Java
false
false
2,664
java
package com.dat.barnaulzoopark.ui.admindatamanagement; import android.os.Bundle; import android.support.v7.preference.Preference; import com.dat.barnaulzoopark.R; import com.dat.barnaulzoopark.api.BZFireBaseApi; import com.dat.barnaulzoopark.ui.BasePreferenceFragment; /** * Created by DAT on 4/27/2017. */ public class DataManagementPreferenceFragment extends BasePreferenceFragment { private static final String KEY_NEWS = "key_news"; private static final String KEY_ANIMAL_CATEGORIES = "key_animal_categories"; private static final String KEY_ANIMAL_SPECIES = "key_animal_species"; private static final String KEY_ANIMALS = "key_animals"; private static final String KEY_BLOG_ANIMAL = "key_blog_animal"; private static final String KEY_TICKET_PRICE = "key_ticket_price"; private static final String KEY_PHOTO_ALBUM = "key_photo_album"; private static final String KEY_VIDEO_ALBUM = "key_video_album"; private static final String KEY_SPONSORS = "key_sponsors"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.data_management); } @Override public boolean onPreferenceTreeClick(Preference preference) { switch (preference.getKey()) { case KEY_NEWS: DataManagementActivity.start(getContext(), BZFireBaseApi.news); break; case KEY_ANIMAL_CATEGORIES: DataManagementActivity.start(getContext(), BZFireBaseApi.animal_categories); break; case KEY_ANIMAL_SPECIES: DataManagementActivity.start(getContext(), BZFireBaseApi.animal_species); break; case KEY_ANIMALS: DataManagementActivity.start(getContext(), BZFireBaseApi.animal); break; case KEY_BLOG_ANIMAL: DataManagementActivity.start(getContext(), BZFireBaseApi.blog_animal); break; case KEY_SPONSORS: DataManagementActivity.start(getContext(), BZFireBaseApi.sponsors); break; case KEY_TICKET_PRICE: DataManagementActivity.start(getContext(), BZFireBaseApi.ticket_price); break; case KEY_PHOTO_ALBUM: DataManagementActivity.start(getContext(), BZFireBaseApi.photo_album); break; case KEY_VIDEO_ALBUM: DataManagementActivity.start(getContext(), BZFireBaseApi.video_album); break; } return super.onPreferenceTreeClick(preference); } }
[ "jintoga123@yahoo.com" ]
jintoga123@yahoo.com
ff859df540ff97beb3dd33380f3b9ca7c4c4e30e
b2090456613ec9446691af056e0ce626c256dc75
/008 Exception Handling/src/com/vidvaan/userdefinedexceptions/Amount.java
52dc93c35093765899f34030bd1816cff2c5ae54
[]
no_license
satya6264/CoreJava
0ed6b68ad62e383986669c21a1298c10186fbea1
0a8aeaf09e7298b1c357135b777f5286c699145f
refs/heads/main
2023-03-26T17:49:48.307386
2021-03-22T07:30:15
2021-03-22T07:30:15
350,233,320
0
0
null
null
null
null
UTF-8
Java
false
false
731
java
package com.vidvaan.userdefinedexceptions; public class Amount { private String currency; private int amount; public Amount(String currency, int amount) { super(); this.currency = currency; this.amount = amount; } public void amountAdder(Amount other) { if (!this.currency.equals(other.currency)) { throw new InsufficientCurrencyType("currency does not match"); } this.amount = this.amount + other.amount; } public String toString() { return currency + " " + amount; } public static void main(String[] args) { Amount amount1 = new Amount("INR", 5000); Amount amount2 = new Amount("INk", 6000); amount1.amountAdder(amount2); System.out.println(amount1); } }
[ "satya@LAPTOP-O9U0GDDV" ]
satya@LAPTOP-O9U0GDDV
b324d80a511b6d08af2748bb16ac75f2b2c87429
45736204805554b2d13f1805e47eb369a8e16ec3
/net/minecraft/world/gen/layer/GenLayerRareBiome.java
08351c0cfe6a3397316a23c85db87775b9130278
[]
no_license
KrOySi/ArchWare-Source
9afc6bfcb1d642d2da97604ddfed8048667e81fd
46cdf10af07341b26bfa704886299d80296320c2
refs/heads/main
2022-07-30T02:54:33.192997
2021-08-08T23:36:39
2021-08-08T23:36:39
394,089,144
2
0
null
null
null
null
UTF-8
Java
false
false
1,376
java
/* * Decompiled with CFR 0.150. */ package net.minecraft.world.gen.layer; import net.minecraft.init.Biomes; import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.layer.GenLayer; import net.minecraft.world.gen.layer.IntCache; public class GenLayerRareBiome extends GenLayer { public GenLayerRareBiome(long p_i45478_1_, GenLayer p_i45478_3_) { super(p_i45478_1_); this.parent = p_i45478_3_; } @Override public int[] getInts(int areaX, int areaY, int areaWidth, int areaHeight) { int[] aint = this.parent.getInts(areaX - 1, areaY - 1, areaWidth + 2, areaHeight + 2); int[] aint1 = IntCache.getIntCache(areaWidth * areaHeight); for (int i = 0; i < areaHeight; ++i) { for (int j = 0; j < areaWidth; ++j) { this.initChunkSeed(j + areaX, i + areaY); int k = aint[j + 1 + (i + 1) * (areaWidth + 2)]; if (this.nextInt(57) == 0) { if (k == Biome.getIdForBiome(Biomes.PLAINS)) { aint1[j + i * areaWidth] = Biome.getIdForBiome(Biomes.MUTATED_PLAINS); continue; } aint1[j + i * areaWidth] = k; continue; } aint1[j + i * areaWidth] = k; } } return aint1; } }
[ "67242784+KrOySi@users.noreply.github.com" ]
67242784+KrOySi@users.noreply.github.com
127989f43014f6bc8ed67e2ce784472978ff9f8a
5b1136d1090a28d5c247476f81510396701d404f
/07 WORKSHOP CREATING CUSTOM ORM/Mini-ORM/src/main/java/app/entities/User.java
1a7b178bbccaae0ccfc05e17601ad0617f6bfd3b
[ "MIT" ]
permissive
TsvetanNikolov123/JAVA---Databases-Frameworks-Hibernate-And-Spring-Data
1d666b9548178a3ec19ce942bbdd9dc95cc50e7e
a2db18c91fa9564e23a2322e7b71012bc56fc7ff
refs/heads/master
2022-12-24T00:16:03.372907
2019-09-23T19:43:53
2019-09-23T19:43:53
123,085,420
0
0
MIT
2022-12-10T05:25:40
2018-02-27T06:43:27
Java
UTF-8
Java
false
false
1,237
java
package app.entities; import app.annotations.Column; import app.annotations.Entity; import app.annotations.Id; import java.util.Date; @Entity(name = "users") public class User { @Id @Column(name = "id") private Integer id; @Column(name = "username") private String username; @Column(name = "age") private int age; @Column(name = "registration_date") private Date registrationDate; public User() { } public User(String username, int age, Date registrationDate) { this.username = username; this.age = age; this.registrationDate = registrationDate; } public int getId() { return this.id; } public void setId(int id) { this.id = id; } public String getUsername() { return this.username; } public void setUsername(String username) { this.username = username; } public int getAge() { return this.age; } public void setAge(int age) { this.age = age; } public Date getRegistrationDate() { return this.registrationDate; } public void setRegistrationDate(Date registrationDate) { this.registrationDate = registrationDate; } }
[ "tsdman1985@gmail.com" ]
tsdman1985@gmail.com
106b71ad69b16fb66b517a19c54ad9423e9006d9
ab3eccd0be02fb3ad95b02d5b11687050a147bce
/apis/browser-api/src/main/java/fr/lteconsulting/jsinterop/browser/Location.java
f505e40282be138e7450eff1c96be9692ebb0056
[]
no_license
ibaca/typescript2java
263fd104a9792e7be2a20ab95b016ad694a054fe
0b71b8a3a4c43df1562881f0816509ca4dafbd7e
refs/heads/master
2021-04-27T10:43:14.101736
2018-02-23T11:37:16
2018-02-23T11:37:18
122,543,398
0
0
null
2018-02-22T22:33:30
2018-02-22T22:33:29
null
UTF-8
Java
false
false
3,048
java
package fr.lteconsulting.jsinterop.browser; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsProperty; import jsinterop.annotations.JsType; /** * base type: Location * flags: 32768 * declared in: apis/browser-api/tsd/lib.es6.d.ts:499856 * declared in: apis/browser-api/tsd/lib.es6.d.ts:500209 * 1 constructors */ @JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Location") public class Location { /* Constructors */ public Location(){ } /* Properties */ public String hash; @JsProperty( name = "hash") public native String getHash(); @JsProperty( name = "hash") public native void setHash( String value ); public String host; @JsProperty( name = "host") public native String getHost(); @JsProperty( name = "host") public native void setHost( String value ); public String hostname; @JsProperty( name = "hostname") public native String getHostname(); @JsProperty( name = "hostname") public native void setHostname( String value ); public String href; @JsProperty( name = "href") public native String getHref(); @JsProperty( name = "href") public native void setHref( String value ); public String origin; @JsProperty( name = "origin") public native String getOrigin(); @JsProperty( name = "origin") public native void setOrigin( String value ); public String pathname; @JsProperty( name = "pathname") public native String getPathname(); @JsProperty( name = "pathname") public native void setPathname( String value ); public String port; @JsProperty( name = "port") public native String getPort(); @JsProperty( name = "port") public native void setPort( String value ); public String protocol; @JsProperty( name = "protocol") public native String getProtocol(); @JsProperty( name = "protocol") public native void setProtocol( String value ); public String search; @JsProperty( name = "search") public native String getSearch(); @JsProperty( name = "search") public native void setSearch( String value ); /* Methods */ /** * Std Signature : S(assign,289,,P(d1)) * TE Signature : S(assign,P(d1)) * */ /** * apis/browser-api/tsd/lib.es6.d.ts@500070 */ public native void assign(String url); /** * Std Signature : S(reload,289,,) * TE Signature : S(reload,) * */ public native void reload(); /** * Std Signature : S(reload,289,,P(d27)) * TE Signature : S(reload,P(d27)) * */ /** * apis/browser-api/tsd/lib.es6.d.ts@500101 */ public native void reload(Boolean forcedReload /* optional */); /** * Std Signature : S(replace,289,,P(d1)) * TE Signature : S(replace,P(d1)) * */ /** * apis/browser-api/tsd/lib.es6.d.ts@500143 */ public native void replace(String url); }
[ "ltearno@gmail.com" ]
ltearno@gmail.com
eb7b9435d348790a402941229c0ee836aa22cdb3
43c01dc87018e6b30d994f78a07c9dd19625e262
/guvnor-structure/guvnor-structure-client/src/main/java/org/guvnor/structure/client/resources/NavigatorResources.java
ea0c7a529f72cff30826cd17d7a23b7d19cadc89
[ "Apache-2.0" ]
permissive
hastingsr713/guvnor
dba01e078e51bb165170677ba0a78673d62e0130
30cd38003d4c8c4870d8086ff2e8e0e46dda38ce
refs/heads/master
2021-01-14T14:27:57.064082
2015-11-25T19:20:51
2015-11-26T18:20:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,325
java
/* * Copyright 2011 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.guvnor.structure.client.resources; import com.google.gwt.core.client.GWT; import com.google.gwt.resources.client.ClientBundle; import com.google.gwt.resources.client.CssResource; /** * Wizard resources */ public interface NavigatorResources extends ClientBundle { NavigatorResources INSTANCE = GWT.create( NavigatorResources.class ); @Source("css/Navigator.css") NavigatorStyle css(); interface NavigatorStyle extends CssResource { String navigator(); String message(); String author(); String date(); @ClassName("navigator-message") String navigatorMessage(); @ClassName("tree-nav") String treeNav(); } }
[ "alexandre.porcelli@gmail.com" ]
alexandre.porcelli@gmail.com
e643ff76f96825da938a888107ebc925ed2a135e
e59c998aa7c9378a2d0e7b0361078af47babab4c
/core/plugins/org.fusesource.ide.camel.model.service.impl.v2170redhat630356/src/org/fusesource/ide/camel/model/service/impl/v2170redhat630356/CamelCatalogWrapper.java
93d9375df192129a0e90566b61248ee8a1feabdb
[]
no_license
rajeshk150/jbosstools-fuse
3113a8c17edd63928b7906bb753a3fe490068a1a
f02001d7fbb269fe0144ae7206bc12cf1b666f77
refs/heads/master
2020-04-28T22:01:19.957239
2019-03-12T10:35:04
2019-03-12T13:31:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,795
java
/******************************************************************************* * Copyright (c) 2018 Red Hat, Inc. * Distributed under license by Red Hat, Inc. All rights reserved. * This program is 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: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ package org.fusesource.ide.camel.model.service.impl.v2170redhat630356; import java.net.URISyntaxException; import java.util.List; import java.util.Map; import org.apache.camel.catalog.CamelCatalog; import org.apache.camel.catalog.DefaultCamelCatalog; import org.fusesource.ide.camel.model.service.core.util.CamelCatalogUtils; import org.fusesource.ide.camel.model.service.impl.ICamelCatalogWrapper; public class CamelCatalogWrapper implements ICamelCatalogWrapper { private CamelCatalog camelCatalog; public CamelCatalogWrapper() { camelCatalog = new DefaultCamelCatalog(true); } public CamelCatalog getCamelCatalog() { return camelCatalog; } @Override public String getLoadedVersion() { return "2.17.0.redhat-630356"; } @Override public Map<String, String> endpointProperties(String uri) throws URISyntaxException { return camelCatalog.endpointProperties(uri); } @Override public List<String> findModelNames() { return camelCatalog.findModelNames(); } @Override public String modelJSonSchema(String name) { return camelCatalog.modelJSonSchema(name); } @Override public List<String> findLanguageNames() { return camelCatalog.findLanguageNames(); } @Override public String languageJSonSchema(String name) { return camelCatalog.languageJSonSchema(name); } @Override public List<String> findDataFormatNames() { return camelCatalog.findDataFormatNames(); } @Override public String dataFormatJSonSchema(String name) { return camelCatalog.dataFormatJSonSchema(name); } @Override public List<String> findComponentNames() { return camelCatalog.findComponentNames(); } @Override public String componentJSonSchema(String name) { return camelCatalog.componentJSonSchema(name); } @Override public String blueprintSchemaAsXml() { return camelCatalog.blueprintSchemaAsXml(); } @Override public String springSchemaAsXml() { return camelCatalog.springSchemaAsXml(); } @Override public void setRuntimeProvider(String runtimeProvider) { // not available with this version } @Override public String getRuntimeprovider() { return CamelCatalogUtils.RUNTIME_PROVIDER_KARAF; } @Override public void addMavenRepositoryToVersionManager(String id, String url) { //Do nothing } }
[ "apupier@redhat.com" ]
apupier@redhat.com
3c8543280a50839f312edef6b3823afb0cfcd4ec
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/a2/j/b/a/c/f.java
b7e7c1319bed54bff0de81da35657eed55799096
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
820
java
package a2.j.b.a.c; import com.google.android.datatransport.runtime.logging.Logging; import java.util.concurrent.Executor; public class f implements Executor { public final Executor a; public static class a implements Runnable { public final Runnable a; public a(Runnable runnable) { this.a = runnable; } @Override // java.lang.Runnable public void run() { try { this.a.run(); } catch (Exception e) { Logging.e("Executor", "Background execution failure.", e); } } } public f(Executor executor) { this.a = executor; } @Override // java.util.concurrent.Executor public void execute(Runnable runnable) { this.a.execute(new a(runnable)); } }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
8b7fd7ac2e1a6847812f0584dd5bd8f70d4615c5
c4879ef930bba3dadd88dff96906e357927994f1
/2.JavaCore/src/com/javarush/task/jdk13/task13/task1313/Solution.java
441f737a2ce298dea14de94cfc0b2786a5e99638
[]
no_license
tsebal/JavaRushTasks
6b4181ca59702c3799734c7bef9574f55ee4863f
8046fda30184b0a923f50a0aa21b2da2b708cf3a
refs/heads/master
2023-01-22T16:26:25.076632
2023-01-18T13:18:39
2023-01-18T13:18:39
168,700,076
0
0
null
null
null
null
UTF-8
Java
false
false
687
java
package com.javarush.task.jdk13.task13.task1313; import java.awt.*; /* Компиляция программы */ public class Solution { public static void main(String[] args) throws Exception { Fox bigFox = new BigFox(); System.out.println(bigFox.getName()); System.out.println(bigFox.getColor()); } public interface Animal { Color getColor(); } public static abstract class Fox implements Animal { public String getName() { return "Fox"; } } public static class BigFox extends Fox { @Override public Color getColor() { return Color.orange; } } }
[ "atsebal@gmail.com" ]
atsebal@gmail.com
b13121c46b1bad8273073e770917ca8d08c4f287
819b29d01434ca930f99e8818293cc1f9aa58e18
/src/contest/woburn/Woburn_Challenge_2015_Grouping_Recruits.java
698b17c2c65588ea3ca343653f55d0f82efe9678
[ "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
ANUJ581/competitive-programming-1
9bd5de60163d9a46680043d480455c8373fe26a7
d8ca9efe9762d9953bcacbc1ca1fe0da5cbe6ac4
refs/heads/master
2020-08-06T18:43:09.688000
2019-10-06T04:54:47
2019-10-06T04:54:47
213,110,718
0
0
NOASSERTION
2019-10-06T04:54:18
2019-10-06T04:54:18
null
UTF-8
Java
false
false
1,525
java
package contest.woburn; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.util.StringTokenizer; public class Woburn_Challenge_2015_Grouping_Recruits { static BufferedReader br; static PrintWriter out; static StringTokenizer st; public static void main(String[] args) throws IOException { br = new BufferedReader(new InputStreamReader(System.in)); out = new PrintWriter(new OutputStreamWriter(System.out)); //br = new BufferedReader(new FileReader("in.txt")); //out = new PrintWriter(new FileWriter("out.txt")); int n = readInt(); int m = readInt(); int sz = n / m; int leftOver = n % m; if (leftOver != 0) out.printf("%d group(s) of %d%n", leftOver, sz + 1); out.printf("%d group(s) of %d", m - leftOver, sz); out.close(); } static String next() throws IOException { while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine().trim()); return st.nextToken(); } static long readLong() throws IOException { return Long.parseLong(next()); } static int readInt() throws IOException { return Integer.parseInt(next()); } static double readDouble() throws IOException { return Double.parseDouble(next()); } static char readCharacter() throws IOException { return next().charAt(0); } static String readLine() throws IOException { return br.readLine().trim(); } }
[ "jeffrey.xiao1998@gmail.com" ]
jeffrey.xiao1998@gmail.com
e73acde4e7ab7a6417a75e46c3a1968e9b3e806c
b39d7e1122ebe92759e86421bbcd0ad009eed1db
/sources/android/service/carrier/ICarrierService.java
ea2bdc843685e2e9fa6c07e4d422e7c20eb8c762
[]
no_license
AndSource/miuiframework
ac7185dedbabd5f619a4f8fc39bfe634d101dcef
cd456214274c046663aefce4d282bea0151f1f89
refs/heads/master
2022-03-31T11:09:50.399520
2020-01-02T09:49:07
2020-01-02T09:49:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,864
java
package android.service.carrier; import android.os.Binder; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import android.os.RemoteException; import android.os.ResultReceiver; public interface ICarrierService extends IInterface { public static abstract class Stub extends Binder implements ICarrierService { private static final String DESCRIPTOR = "android.service.carrier.ICarrierService"; static final int TRANSACTION_getCarrierConfig = 1; private static class Proxy implements ICarrierService { public static ICarrierService sDefaultImpl; private IBinder mRemote; Proxy(IBinder remote) { this.mRemote = remote; } public IBinder asBinder() { return this.mRemote; } public String getInterfaceDescriptor() { return Stub.DESCRIPTOR; } public void getCarrierConfig(CarrierIdentifier id, ResultReceiver result) throws RemoteException { Parcel _data = Parcel.obtain(); try { _data.writeInterfaceToken(Stub.DESCRIPTOR); if (id != null) { _data.writeInt(1); id.writeToParcel(_data, 0); } else { _data.writeInt(0); } if (result != null) { _data.writeInt(1); result.writeToParcel(_data, 0); } else { _data.writeInt(0); } if (this.mRemote.transact(1, _data, null, 1) || Stub.getDefaultImpl() == null) { _data.recycle(); } else { Stub.getDefaultImpl().getCarrierConfig(id, result); } } finally { _data.recycle(); } } } public Stub() { attachInterface(this, DESCRIPTOR); } public static ICarrierService asInterface(IBinder obj) { if (obj == null) { return null; } IInterface iin = obj.queryLocalInterface(DESCRIPTOR); if (iin == null || !(iin instanceof ICarrierService)) { return new Proxy(obj); } return (ICarrierService) iin; } public IBinder asBinder() { return this; } public static String getDefaultTransactionName(int transactionCode) { if (transactionCode != 1) { return null; } return "getCarrierConfig"; } public String getTransactionName(int transactionCode) { return getDefaultTransactionName(transactionCode); } public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { String descriptor = DESCRIPTOR; if (code == 1) { CarrierIdentifier _arg0; ResultReceiver _arg1; data.enforceInterface(descriptor); if (data.readInt() != 0) { _arg0 = (CarrierIdentifier) CarrierIdentifier.CREATOR.createFromParcel(data); } else { _arg0 = null; } if (data.readInt() != 0) { _arg1 = (ResultReceiver) ResultReceiver.CREATOR.createFromParcel(data); } else { _arg1 = null; } getCarrierConfig(_arg0, _arg1); return true; } else if (code != IBinder.INTERFACE_TRANSACTION) { return super.onTransact(code, data, reply, flags); } else { reply.writeString(descriptor); return true; } } public static boolean setDefaultImpl(ICarrierService impl) { if (Proxy.sDefaultImpl != null || impl == null) { return false; } Proxy.sDefaultImpl = impl; return true; } public static ICarrierService getDefaultImpl() { return Proxy.sDefaultImpl; } } public static class Default implements ICarrierService { public void getCarrierConfig(CarrierIdentifier id, ResultReceiver result) throws RemoteException { } public IBinder asBinder() { return null; } } void getCarrierConfig(CarrierIdentifier carrierIdentifier, ResultReceiver resultReceiver) throws RemoteException; }
[ "shivatejapeddi@gmail.com" ]
shivatejapeddi@gmail.com
61cc5596921c7d7c494b0d56026a3645eb6c4b0f
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a014/A014193Test.java
3905b22c54bc098c6d59790f2affbabce3f34157
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a014; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A014193Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
1b7e646ec023136f6f24bd4914688b8d5e74ac0d
514355bb8a1bb1e4cc9091a2e2d63326bafe0ba4
/common/src/main/java/utils/CookieUtil.java
4dbd1a4682dbf0325a0a26420877d43c716d9a68
[]
no_license
XIAOguojia/jx
1b002914bba082684250b88abb6f5a9ec10a2843
6b8b9dfbb70dc01cf9a4e201a36297fea3528295
refs/heads/master
2020-04-14T15:42:26.875893
2019-05-13T10:36:55
2019-05-13T10:36:55
163,935,299
0
0
null
null
null
null
UTF-8
Java
false
false
7,857
java
package utils; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * Cookie 工具类 * */ public final class CookieUtil { /** * 得到Cookie的值, 不编码 * * @param request * @param cookieName * @return */ public static String getCookieValue(HttpServletRequest request, String cookieName) { return getCookieValue(request, cookieName, false); } /** * 得到Cookie的值, * * @param request * @param cookieName * @return */ public static String getCookieValue(HttpServletRequest request, String cookieName, boolean isDecoder) { Cookie[] cookieList = request.getCookies(); if (cookieList == null || cookieName == null) { return null; } String retValue = null; try { for (int i = 0; i < cookieList.length; i++) { if (cookieList[i].getName().equals(cookieName)) { if (isDecoder) { retValue = URLDecoder.decode(cookieList[i].getValue(), "UTF-8"); } else { retValue = cookieList[i].getValue(); } break; } } } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return retValue; } /** * 得到Cookie的值, * * @param request * @param cookieName * @return */ public static String getCookieValue(HttpServletRequest request, String cookieName, String encodeString) { Cookie[] cookieList = request.getCookies(); if (cookieList == null || cookieName == null) { return null; } String retValue = null; try { for (int i = 0; i < cookieList.length; i++) { if (cookieList[i].getName().equals(cookieName)) { retValue = URLDecoder.decode(cookieList[i].getValue(), encodeString); break; } } } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return retValue; } /** * 设置Cookie的值 不设置生效时间默认浏览器关闭即失效,也不编码 */ public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String cookieValue) { setCookie(request, response, cookieName, cookieValue, -1); } /** * 设置Cookie的值 在指定时间内生效,但不编码 */ public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String cookieValue, int cookieMaxage) { setCookie(request, response, cookieName, cookieValue, cookieMaxage, false); } /** * 设置Cookie的值 不设置生效时间,但编码 */ public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String cookieValue, boolean isEncode) { setCookie(request, response, cookieName, cookieValue, -1, isEncode); } /** * 设置Cookie的值 在指定时间内生效, 编码参数 */ public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String cookieValue, int cookieMaxage, boolean isEncode) { doSetCookie(request, response, cookieName, cookieValue, cookieMaxage, isEncode); } /** * 设置Cookie的值 在指定时间内生效, 编码参数(指定编码) */ public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String cookieValue, int cookieMaxage, String encodeString) { doSetCookie(request, response, cookieName, cookieValue, cookieMaxage, encodeString); } /** * 删除Cookie带cookie域名 */ public static void deleteCookie(HttpServletRequest request, HttpServletResponse response, String cookieName) { doSetCookie(request, response, cookieName, "", -1, false); } /** * 设置Cookie的值,并使其在指定时间内生效 * * @param cookieMaxage cookie生效的最大秒数 */ private static final void doSetCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String cookieValue, int cookieMaxage, boolean isEncode) { try { if (cookieValue == null) { cookieValue = ""; } else if (isEncode) { cookieValue = URLEncoder.encode(cookieValue, "utf-8"); } Cookie cookie = new Cookie(cookieName, cookieValue); if (cookieMaxage > 0) cookie.setMaxAge(cookieMaxage); if (null != request) {// 设置域名的cookie String domainName = getDomainName(request); System.out.println(domainName); if (!"localhost".equals(domainName)) { cookie.setDomain(domainName); } } cookie.setPath("/"); response.addCookie(cookie); } catch (Exception e) { e.printStackTrace(); } } /** * 设置Cookie的值,并使其在指定时间内生效 * * @param cookieMaxage cookie生效的最大秒数 */ private static final void doSetCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String cookieValue, int cookieMaxage, String encodeString) { try { if (cookieValue == null) { cookieValue = ""; } else { cookieValue = URLEncoder.encode(cookieValue, encodeString); } Cookie cookie = new Cookie(cookieName, cookieValue); if (cookieMaxage > 0) { cookie.setMaxAge(cookieMaxage); } if (null != request) { // 设置域名的cookie String domainName = getDomainName(request); System.out.println(domainName); if (!"localhost".equals(domainName)) { cookie.setDomain(domainName); } } cookie.setPath("/"); response.addCookie(cookie); } catch (Exception e) { e.printStackTrace(); } } /** * 得到cookie的域名 */ private static final String getDomainName(HttpServletRequest request) { String domainName = null; String serverName = request.getRequestURL().toString(); if (serverName == null || serverName.equals("")) { domainName = ""; } else { serverName = serverName.toLowerCase(); serverName = serverName.substring(7); final int end = serverName.indexOf("/"); serverName = serverName.substring(0, end); final String[] domains = serverName.split("\\."); int len = domains.length; if (len > 3) { // www.xxx.com.cn domainName = "." + domains[len - 3] + "." + domains[len - 2] + "." + domains[len - 1]; } else if (len <= 3 && len > 1) { // xxx.com or xxx.cn domainName = "." + domains[len - 2] + "." + domains[len - 1]; } else { domainName = serverName; } } if (domainName != null && domainName.indexOf(":") > 0) { String[] ary = domainName.split("\\:"); domainName = ary[0]; } return domainName; } }
[ "gjnerevmoresf@gmail.com" ]
gjnerevmoresf@gmail.com
c61c8cff3086854381febfddf0376a5e06e23a4f
0721305fd9b1c643a7687b6382dccc56a82a2dad
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/com/google/android/gms/location/C10586n.java
7883746c1d738535a30ad986aa3e8c316d1518dc
[]
no_license
a2en/Zenly_re
09c635ad886c8285f70a8292ae4f74167a4ad620
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
refs/heads/master
2020-12-13T17:07:11.442473
2020-01-17T04:32:44
2020-01-17T04:32:44
234,470,083
1
0
null
null
null
null
UTF-8
Java
false
false
1,474
java
package com.google.android.gms.location; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.SafeParcelReader; import java.util.ArrayList; /* renamed from: com.google.android.gms.location.n */ public final class C10586n implements Creator<LocationSettingsRequest> { public final /* synthetic */ Object createFromParcel(Parcel parcel) { int b = SafeParcelReader.m25542b(parcel); boolean z = false; ArrayList arrayList = null; zzae zzae = null; boolean z2 = false; while (parcel.dataPosition() < b) { int a = SafeParcelReader.m25536a(parcel); int a2 = SafeParcelReader.m25535a(a); if (a2 == 1) { arrayList = SafeParcelReader.m25546c(parcel, a, LocationRequest.CREATOR); } else if (a2 == 2) { z = SafeParcelReader.m25562s(parcel, a); } else if (a2 == 3) { z2 = SafeParcelReader.m25562s(parcel, a); } else if (a2 != 5) { SafeParcelReader.m25534D(parcel, a); } else { zzae = (zzae) SafeParcelReader.m25537a(parcel, a, zzae.CREATOR); } } SafeParcelReader.m25561r(parcel, b); return new LocationSettingsRequest(arrayList, z, z2, zzae); } public final /* synthetic */ Object[] newArray(int i) { return new LocationSettingsRequest[i]; } }
[ "developer@appzoc.com" ]
developer@appzoc.com
631cc44993dffcee409846b05e5a4dd42b678c97
2173d136de981d7a581e4970f4dc7313750b2b22
/tfkc_shop/src/com/koala/module/app/view/action/AppClassViewAction.java
5daf2474b9f890d53c0105702abb89bf43fa3f3f
[]
no_license
yunwow/lyRespository
b26a6c488f8aec382c2d419dacf99cfba1ece271
8e472b1350914c488a268bc5c7e8756e093a5743
refs/heads/master
2021-10-24T04:52:56.530018
2019-03-22T02:51:21
2019-03-22T02:51:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,179
java
package com.koala.module.app.view.action; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.nutz.json.Json; import org.nutz.json.JsonFormat; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import com.koala.core.tools.CommUtil; import com.koala.foundation.domain.Accessory; import com.koala.foundation.domain.GoodsClass; import com.koala.foundation.service.IAccessoryService; import com.koala.foundation.service.IActivityGoodsService; import com.koala.foundation.service.IActivityService; import com.koala.foundation.service.IGoodsBrandService; import com.koala.foundation.service.IGoodsClassService; import com.koala.foundation.service.IGoodsService; import com.koala.foundation.service.IGroupGoodsService; import com.koala.foundation.service.ISysConfigService; import com.koala.foundation.service.IUserService; /** * * <p> * Title: MobileClassViewAction.java * </p> * * <p> * Description:手机客户端商城前台分类请求 * </p> * * <p> * Copyright: Copyright (c) 2015 * </p> * * <p> * Company: 沈阳网之商科技有限公司 www.koala.com * </p> * * @author hezeng * * @date 2014-7-14 * * @version koala_b2b2c 2.0 */ @Controller public class AppClassViewAction { @Autowired private ISysConfigService configService; @Autowired private IUserService userService; @Autowired private IGoodsService goodsService; @Autowired private IGoodsBrandService brandService; @Autowired private IGoodsClassService goodsClassService; @Autowired private IGroupGoodsService groupgoodsService; @Autowired private IGoodsBrandService goodsBrandService; @Autowired private IActivityGoodsService activityGoodsService; @Autowired private IActivityService activityService; @Autowired private IAccessoryService accessoryService; /** * 手机客户端商城首页分类请求 * * @param request * @param response * @param store_id * @return */ @RequestMapping("/app/goodsclass.htm") public void goodsclass(HttpServletRequest request, HttpServletResponse response, String id) { Map map_list = new HashMap(); List list = new ArrayList(); if (id == null || id.equals("")) {// 查询顶级分类 Map params = new HashMap(); params.put("display", true); List<GoodsClass> gcs = this.goodsClassService .query("select obj from GoodsClass obj where obj.parent.id is null and obj.display=:display order by obj.sequence asc", params, -1, -1); String url = CommUtil.getURL(request); if (!"".equals(CommUtil.null2String(this.configService .getSysConfig().getImageWebServer()))) { url = this.configService.getSysConfig().getImageWebServer(); } for (GoodsClass gc : gcs) { Map gc_map = new HashMap(); gc_map.put("id", gc.getId()); gc_map.put("className", gc.getClassName()); // 一级分类的推荐子分类,3个 Map recommondmap = new HashMap(); recommondmap.put("recommend", true); recommondmap.put("parentid", gc.getId()); List<GoodsClass> recommondgcs = this.goodsClassService .query("select obj from GoodsClass obj where obj.parent.id=:parentid and obj.recommend=:recommend order by obj.sequence asc", recommondmap, 0, 3); if (recommondgcs.size() > 0) { String recommend = ""; for (GoodsClass goodsClass : recommondgcs) { recommend += goodsClass.getClassName() + "/"; } recommend = recommend.substring(0, recommend.length() - 1); gc_map.put("recommend_children", recommend); } String path = ""; if (gc.getApp_icon() != null && !gc.equals("")) { Accessory img = this.accessoryService.getObjById(CommUtil .null2Long(gc.getApp_icon())); if (img != null) { path = url + "/" + img.getPath() + "/" + img.getName(); } } else { if (gc.getIcon_type() == 0) { path = url + "/resources/style/common/images/icon/icon_" + gc.getIcon_sys() + ".png"; } else { path = url + "/" + gc.getIcon_acc().getPath() + "/" + gc.getIcon_acc().getName(); } } gc_map.put("icon_path", path); list.add(gc_map); } } else {// 查询子集分类 GoodsClass parent = this.goodsClassService.getObjById(CommUtil .null2Long(id)); for (GoodsClass gc : parent.getChilds()) { Map gc_map = new HashMap(); gc_map.put("id", gc.getId()); gc_map.put("className", gc.getClassName()); list.add(gc_map); } } map_list.put("goodsclass_list", list); map_list.put("code", "true"); String json = Json.toJson(map_list, JsonFormat.compact()); response.setContentType("text/plain"); response.setHeader("Cache-Control", "no-cache"); response.setCharacterEncoding("UTF-8"); PrintWriter writer; try { writer = response.getWriter(); writer.print(json); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
[ "67857020@qq.com" ]
67857020@qq.com
311dd52e2f5153260bae9ac40cb8999bd61405e5
6722a5dedccb83bebd3568c690e95b84bde587db
/InterviewTree/InterviewTreeQ.java
55d7315029acadb0562f1a5b827bd6e227d6648b
[]
no_license
YYxxxiiii/JavaSE2
7d36c91b467ea340fdc3d68672425ef1521c4b7b
452f32fac1b953bb9c3a1e4993da46fa477c85c1
refs/heads/master
2023-04-17T21:57:49.224979
2021-04-20T14:19:25
2021-04-20T14:19:25
280,579,496
0
0
null
null
null
null
UTF-8
Java
false
false
1,094
java
package interviewTree; /* * 100. 相同的树 给定两个二叉树,编写一个函数来检验它们是否相同。 如果两个树在结构上相同,并且节点具有相同的值,则认为它们是相同的。 示例 1: 输入: 1 1 / \ / \ 2 3 2 3 [1,2,3], [1,2,3] 输出: true 示例 2: 输入: 1 1 / \ 2 2 [1,2], [1,null,2] 输出: false*/ public class InterviewTreeQ { public boolean isSameTree(TreeNode p, TreeNode q) { // 可以分成四种情况: // 1. p q 都为 null // 2. p 为 null, q 不为 null // 3. p 不为 null, q 为 null // 4. p q 都不为 null if (q == null && p == null) { return true; } if ((p == null && q != null) || (p != null && q == null)) { return false; } //情况四 if (p.val != q.val) { return false; } return isSameTree(p.left,q.left) && isSameTree(p.right,q.right); } }
[ "axii_@outlook.com" ]
axii_@outlook.com
f3570822ece7c1b4b05fcec120d80c9bd049936d
e3e31b02ad2830ffb4a80ade756230a4cd5ca89b
/components/camel-olingo2/camel-olingo2-component/src/generated/java/org/apache/camel/component/olingo2/Olingo2ComponentConfigurer.java
12a3956acc5f84d2df5562be36c72f26cb96305d
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-unknown", "Apache-2.0" ]
permissive
connormcauliffe-toast/camel
593e11679da569d89b4e6f1af1dd9c110d464f40
a3a5fa1f93371f1b0dc7d20178e21bf84f05a44e
refs/heads/master
2021-12-25T02:03:12.864047
2020-02-27T17:15:36
2020-02-27T17:15:36
185,621,707
0
0
Apache-2.0
2020-02-28T14:55:22
2019-05-08T14:24:39
Java
UTF-8
Java
false
false
1,618
java
/* Generated by camel build tools - do NOT edit this file! */ package org.apache.camel.component.olingo2; import org.apache.camel.CamelContext; import org.apache.camel.spi.GeneratedPropertyConfigurer; import org.apache.camel.support.component.PropertyConfigurerSupport; /** * Generated by camel build tools - do NOT edit this file! */ @SuppressWarnings("unchecked") public class Olingo2ComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer { @Override public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { Olingo2Component target = (Olingo2Component) obj; switch (ignoreCase ? name.toLowerCase() : name) { case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.olingo2.Olingo2Configuration.class, value)); return true; case "bridgeerrorhandler": case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true; case "lazystartproducer": case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true; case "basicpropertybinding": case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true; case "useglobalsslcontextparameters": case "useGlobalSslContextParameters": target.setUseGlobalSslContextParameters(property(camelContext, boolean.class, value)); return true; default: return false; } } }
[ "gnodet@gmail.com" ]
gnodet@gmail.com
1b6e6c6c11b0ed9cec7c2fa3fe53bc6a33ba907f
42e94aa09fe8d979f77449e08c67fa7175a3e6eb
/src/net/minecraft/item/ItemFirework.java
b468e00495e19538f993151cb1a6ca5e8f97d6ff
[ "Unlicense" ]
permissive
HausemasterIssue/novoline
6fa90b89d5ebf6b7ae8f1d1404a80a057593ea91
9146c4add3aa518d9aa40560158e50be1b076cf0
refs/heads/main
2023-09-05T00:20:17.943347
2021-11-26T02:35:25
2021-11-26T02:35:25
432,312,803
1
0
Unlicense
2021-11-26T22:12:46
2021-11-26T22:12:45
null
UTF-8
Java
false
false
2,174
java
package net.minecraft.item; import com.google.common.collect.Lists; import java.util.ArrayList; import java.util.List; import net.minecraft.entity.item.EntityFireworkRocket; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemFireworkCharge; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; import net.minecraft.world.World; public class ItemFirework extends Item { public boolean onItemUse(ItemStack var1, EntityPlayer var2, World var3, BlockPos var4, EnumFacing var5, float var6, float var7, float var8) { if(!var3.isRemote) { EntityFireworkRocket var9 = new EntityFireworkRocket(var3, (double)((float)var4.getX() + var6), (double)((float)var4.getY() + var7), (double)((float)var4.getZ() + var8), var1); var3.spawnEntityInWorld(var9); if(!var2.abilities.isCreative()) { --var1.stackSize; } return true; } else { return false; } } public void addInformation(ItemStack var1, EntityPlayer var2, List var3, boolean var4) { if(var1.hasTagCompound()) { NBTTagCompound var5 = var1.getTagCompound().getCompoundTag("Fireworks"); if(var5.hasKey("Flight", 99)) { var3.add(StatCollector.translateToLocal("item.fireworks.flight") + " " + var5.getByte("Flight")); } NBTTagList var6 = var5.getTagList("Explosions", 10); if(var6.tagCount() > 0) { for(int var7 = 0; var7 < var6.tagCount(); ++var7) { NBTTagCompound var8 = var6.getCompoundTagAt(var7); ArrayList var9 = Lists.newArrayList(); ItemFireworkCharge.addExplosionInfo(var8, var9); if(!var9.isEmpty()) { for(int var10 = 1; var10 < var9.size(); ++var10) { var9.set(var10, " " + (String)var9.get(var10)); } var3.addAll(var9); } } } } } }
[ "91408199+jeremypelletier@users.noreply.github.com" ]
91408199+jeremypelletier@users.noreply.github.com
c3ce20423459258a676505baaf21e8ea2c63cc9f
7f298c2bf9ff5a61eeb87e3929e072c9a04c8832
/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpResponse.java
5e3de33e36a5d6b6687fef1f8a43cdae73f19fc9
[ "Apache-2.0" ]
permissive
stwen/my-spring5
1ca1e85786ba1b5fdb90a583444a9c030fe429dd
d44be68874b8152d32403fe87c39ae2a8bebac18
refs/heads/master
2023-02-17T19:51:32.686701
2021-01-15T05:39:14
2021-01-15T05:39:14
322,756,105
0
0
null
null
null
null
UTF-8
Java
false
false
2,519
java
/* * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.http.client; import java.io.IOException; import java.io.InputStream; import org.apache.http.Header; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.springframework.http.HttpHeaders; import org.springframework.lang.Nullable; import org.springframework.util.StreamUtils; /** * {@link ClientHttpResponse} implementation based on * Apache HttpComponents HttpAsyncClient. * * <p>Created via the {@link HttpComponentsAsyncClientHttpRequest}. * * @author Oleg Kalnichevski * @author Arjen Poutsma * @see HttpComponentsAsyncClientHttpRequest#executeAsync() * @since 4.0 * @deprecated as of Spring 5.0, with no direct replacement */ @Deprecated final class HttpComponentsAsyncClientHttpResponse extends AbstractClientHttpResponse { private final HttpResponse httpResponse; @Nullable private HttpHeaders headers; HttpComponentsAsyncClientHttpResponse(HttpResponse httpResponse) { this.httpResponse = httpResponse; } @Override public int getRawStatusCode() throws IOException { return this.httpResponse.getStatusLine().getStatusCode(); } @Override public String getStatusText() throws IOException { return this.httpResponse.getStatusLine().getReasonPhrase(); } @Override public HttpHeaders getHeaders() { if (this.headers == null) { this.headers = new HttpHeaders(); for (Header header : this.httpResponse.getAllHeaders()) { this.headers.add(header.getName(), header.getValue()); } } return this.headers; } @Override public InputStream getBody() throws IOException { HttpEntity entity = this.httpResponse.getEntity(); return (entity != null ? entity.getContent() : StreamUtils.emptyInput()); } @Override public void close() { // HTTP responses returned by async HTTP client are not bound to an // active connection and do not have to deallocate any resources... } }
[ "xianhao_gan@qq.com" ]
xianhao_gan@qq.com
c55077cd5f82a9fd59db3e45c4798de4ec6843cf
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project40/src/test/java/org/gradle/test/performance/largejavamultiproject/project40/p204/Test4091.java
d883cb9d5b47791030d06f47110e0365a1fd6bf3
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
2,171
java
package org.gradle.test.performance.largejavamultiproject.project40.p204; import org.junit.Test; import static org.junit.Assert.*; public class Test4091 { Production4091 objectUnderTest = new Production4091(); @Test public void testProperty0() { Production4088 value = new Production4088(); objectUnderTest.setProperty0(value); assertEquals(value, objectUnderTest.getProperty0()); } @Test public void testProperty1() { Production4089 value = new Production4089(); objectUnderTest.setProperty1(value); assertEquals(value, objectUnderTest.getProperty1()); } @Test public void testProperty2() { Production4090 value = new Production4090(); objectUnderTest.setProperty2(value); assertEquals(value, objectUnderTest.getProperty2()); } @Test public void testProperty3() { String value = "value"; objectUnderTest.setProperty3(value); assertEquals(value, objectUnderTest.getProperty3()); } @Test public void testProperty4() { String value = "value"; objectUnderTest.setProperty4(value); assertEquals(value, objectUnderTest.getProperty4()); } @Test public void testProperty5() { String value = "value"; objectUnderTest.setProperty5(value); assertEquals(value, objectUnderTest.getProperty5()); } @Test public void testProperty6() { String value = "value"; objectUnderTest.setProperty6(value); assertEquals(value, objectUnderTest.getProperty6()); } @Test public void testProperty7() { String value = "value"; objectUnderTest.setProperty7(value); assertEquals(value, objectUnderTest.getProperty7()); } @Test public void testProperty8() { String value = "value"; objectUnderTest.setProperty8(value); assertEquals(value, objectUnderTest.getProperty8()); } @Test public void testProperty9() { String value = "value"; objectUnderTest.setProperty9(value); assertEquals(value, objectUnderTest.getProperty9()); } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com