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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b92992b7ffc0d6d3b8e2537b2e534139fdaf4a44 | 0cb404e2f5a09257fb36dcf1924fbe77fba7fab9 | /CleanMaster/gen/com/yzy/supercleanmaster/BuildConfig.java | 3b8a57f3e2cc0ec23ae0cf3c5c9f6f7214a5225b | [] | no_license | tianshiaimili/androidstudio_cleandemo | 5869c5ba6af529b2bdd08ef7149e074b45692927 | 8b4734c623bd06758fa80ce84413276b0e8266f9 | refs/heads/master | 2021-01-10T02:32:30.490567 | 2015-10-31T01:45:42 | 2015-10-31T01:45:42 | 45,284,794 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 166 | java | /** Automatically generated file. DO NOT MODIFY */
package com.yzy.supercleanmaster;
public final class BuildConfig {
public final static boolean DEBUG = true;
} | [
"913540483@qq.com"
] | 913540483@qq.com |
5cdb2f7a998a93a74c3a06ff6aec04e549f57a74 | 342f92c326ab23ae70512356bb5568722aa81a7c | /TranslationUnitPatcher/src/pt/up/fe/specs/tupatcher/TUPatcherWebResource.java | 7a243b8978642d08d98f4eb3aea72f7918ec9668 | [
"Apache-2.0"
] | permissive | fabiodrg/clava | 56082f69cf43ec3054c8b181cde3d0cda32562d5 | c85df83eaf4fd2037e0b628d933ae2de4a372a35 | refs/heads/master | 2023-06-30T04:46:03.315347 | 2021-08-11T18:46:12 | 2021-08-11T18:46:12 | 369,831,920 | 0 | 0 | Apache-2.0 | 2021-05-22T14:43:23 | 2021-05-22T14:43:22 | null | UTF-8 | Java | false | false | 1,604 | java | /**
* Copyright 2016 SPeCS.
*
* 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. under the License.
*/
package pt.up.fe.specs.tupatcher;
import pt.up.fe.specs.util.providers.WebResourceProvider;
public interface TUPatcherWebResource {
static WebResourceProvider create(String resourceUrl, String version) {
return WebResourceProvider.newInstance("http://specs.fe.up.pt/resources/tupatcher/", resourceUrl, version);
}
static WebResourceProvider create(String resourceUrl) {
return WebResourceProvider.newInstance("http://specs.fe.up.pt/resources/tupatcher/", resourceUrl);
}
WebResourceProvider WIN_EXE = create("tu_dumper_windows.exe", "v1.0");
WebResourceProvider LINUX_4_EXE = create("tu_dumper_ubuntu", "v1.0");
WebResourceProvider LINUX_5_EXE = create("tu_dumper_linux5", "v1.0");
// WebResourceProvider LINUX_ARMV7_EXE = create("linux_ubuntu_14_armv7/clang_ast", "v4.2.10");
//
// WebResourceProvider CENTOS_EXE = create("centos7/clang_ast", "v4.2.10");
//
// WebResourceProvider MAC_OS_EXE = create("macos/clang_ast", "v4.2.10");
}
| [
"joaobispo@gmail.com"
] | joaobispo@gmail.com |
f8a6d3a8aaf172920e58060868a6a3a39d5c4dfe | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/8/8_0e7bd6b501ec4f92e874089c58793abfd4ba2490/EmbeddedJbpmManager/8_0e7bd6b501ec4f92e874089c58793abfd4ba2490_EmbeddedJbpmManager_t.java | a82f1258d70161942244bca98959047335018079 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 5,324 | java | /*
* Copyright 2012 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.overlord.sramp.governance.workflow.jbpm;
import java.io.InputStream;
import java.io.PrintWriter;
import java.net.Authenticator;
import java.net.HttpURLConnection;
import java.net.PasswordAuthentication;
import java.net.URL;
import java.net.URLEncoder;
import java.util.Map;
import org.apache.commons.io.IOUtils;
import org.overlord.sramp.governance.Governance;
import org.overlord.sramp.governance.workflow.BpmManager;
import org.overlord.sramp.governance.workflow.WorkflowException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class EmbeddedJbpmManager implements BpmManager {
private static Logger logger = LoggerFactory.getLogger(EmbeddedJbpmManager.class);
@Override
public long newProcessInstance(String deploymentId, String processId, Map<String, Object> context)
throws WorkflowException {
HttpURLConnection connection = null;
Governance governance = new Governance();
final String username = governance.getOverlordUser();
final String password = governance.getOverlordPassword();
Authenticator.setDefault (new Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication (username, password.toCharArray());
}
});
try {
deploymentId = URLEncoder.encode(deploymentId,"UTF-8"); //$NON-NLS-1$
processId = URLEncoder.encode(processId,"UTF-8"); //$NON-NLS-1$
String urlStr = governance.getGovernanceUrl() + String.format("/rest/process/start/%s/%s",deploymentId, processId); //$NON-NLS-1$
URL url = new URL(urlStr);
connection = (HttpURLConnection) url.openConnection();
StringBuffer params = new StringBuffer();
for (String key : context.keySet()) {
String value = String.valueOf(context.get(key));
value = URLEncoder.encode(value,"UTF-8"); //$NON-NLS-1$
params.append(String.format("&%s=%s",key,value)); //$NON-NLS-1$
}
//remove leading '&'
if (params.length() > 0) params.delete(0, 1);
connection.setDoOutput(true);
connection.setRequestMethod("POST"); //$NON-NLS-1$
connection.setConnectTimeout(60000);
connection.setReadTimeout(60000);
if (params.length() > 0) {
PrintWriter out = new PrintWriter(connection.getOutputStream());
out.print(params.toString());
out.close();
}
connection.connect();
int responseCode = connection.getResponseCode();
if (responseCode == 200) {
InputStream is = (InputStream) connection.getContent();
String reply = IOUtils.toString(is);
System.out.println("reply=" + reply); //$NON-NLS-1$
return Long.parseLong(reply);
} else {
logger.error("HTTP RESPONSE CODE=" + responseCode); //$NON-NLS-1$
throw new WorkflowException("Unable to connect to " + urlStr); //$NON-NLS-1$
}
} catch (Exception e) {
throw new WorkflowException(e);
} finally {
if (connection!=null) connection.disconnect();
}
}
@Override
public void signalProcess(long processInstanceId, String signalType, Object event)
throws WorkflowException {
HttpURLConnection connection = null;
Governance governance = new Governance();
final String username = governance.getOverlordUser();
final String password = governance.getOverlordPassword();
Authenticator.setDefault (new Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication (username, password.toCharArray());
}
});
try {
String urlStr = governance.getGovernanceUrl() + String.format("/rest/process/signal/%s/%s/%s",processInstanceId, signalType, event); //$NON-NLS-1$
URL url = new URL(urlStr);
connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT"); //$NON-NLS-1$
connection.setConnectTimeout(60000);
connection.setReadTimeout(60000);
connection.connect();
int responseCode = connection.getResponseCode();
if (responseCode!=200) {
logger.error("HTTP RESPONSE CODE=" + responseCode); //$NON-NLS-1$
throw new WorkflowException("Unable to connect to " + urlStr); //$NON-NLS-1$
}
} catch (Exception e) {
throw new WorkflowException(e);
} finally {
if (connection!=null) connection.disconnect();
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
277ac1095c101242fe60d0bbf86ac5b566550f9a | d7c5121237c705b5847e374974b39f47fae13e10 | /airspan.netspan/src/main/java/Netspan/NBI_17_5/Inventory/RegionUpdate.java | 2a91700da4b05c1f0921d59d8fe2b968f386649b | [] | no_license | AirspanNetworks/SWITModules | 8ae768e0b864fa57dcb17168d015f6585d4455aa | 7089a4b6456621a3abd601cc4592d4b52a948b57 | refs/heads/master | 2022-11-24T11:20:29.041478 | 2020-08-09T07:20:03 | 2020-08-09T07:20:03 | 184,545,627 | 1 | 0 | null | 2022-11-16T12:35:12 | 2019-05-02T08:21:55 | Java | UTF-8 | Java | false | false | 2,202 | java |
package Netspan.NBI_17_5.Inventory;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Region" type="{http://Airspan.Netspan.WebServices}Region" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"name",
"region"
})
@XmlRootElement(name = "RegionUpdate")
public class RegionUpdate {
@XmlElement(name = "Name")
protected String name;
@XmlElement(name = "Region")
protected Region region;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the region property.
*
* @return
* possible object is
* {@link Region }
*
*/
public Region getRegion() {
return region;
}
/**
* Sets the value of the region property.
*
* @param value
* allowed object is
* {@link Region }
*
*/
public void setRegion(Region value) {
this.region = value;
}
}
| [
"ggrunwald@airspan.com"
] | ggrunwald@airspan.com |
46b562db19e7b8343ce557b5a6473163a4314b68 | d963357efa51a4f74de3a510c8383e3b40014995 | /Java Data Structures/src/tree_problems/PrintAllAncestors.java | 0f6d7cb4877d7f3d3ea8146e3c511dccfe9200d8 | [] | no_license | lakshmikantdeshpande/Data_Structures_in_Java | e5ac6a9a4829c77b244510e8738df102d6739496 | db9655dff3e72f9fb90c2a8b1c3582c43270995b | refs/heads/master | 2021-06-15T22:21:07.006366 | 2019-09-09T18:07:03 | 2019-09-09T18:07:03 | 67,194,770 | 5 | 2 | null | null | null | null | UTF-8 | Java | false | false | 916 | java | // 32. Print all the ancestors of a node in a binary tree.
// n time n space
package tree_problems;
import tree.TreeNode;
public class PrintAllAncestors {
public static void main(String[] args) {
TreeNode root;
root = new TreeNode(1);
root.left = new TreeNode(2);
root.right = new TreeNode(3);
root.left.left = new TreeNode(4);
root.left.right = new TreeNode(5);
// printAllAncestors(root, new TreeNode(5));
printAllAncestors(root, root.left.right);
}
private static boolean printAllAncestors(TreeNode root, TreeNode node) {
if (root == null)
return false;
if (root.left == node || root.right == node || printAllAncestors(root.left, node)
|| printAllAncestors(root.right, node)) {
System.out.println(root.data);
return true;
}
return false;
}
}
| [
"lakshmikantdeshpande@gmail.com"
] | lakshmikantdeshpande@gmail.com |
2255f0f5360239e5249eb278a5c3499e009f01b3 | 96f8d42c474f8dd42ecc6811b6e555363f168d3e | /budejie/sources/com/sprite/ads/BuildConfig.java | 4162cfe6676b69cc4f2e3e5c0c4a6995ae2fb7e2 | [] | no_license | aheadlcx/analyzeApk | 050b261595cecc85790558a02d79739a789ae3a3 | 25cecc394dde4ed7d4971baf0e9504dcb7fabaca | refs/heads/master | 2020-03-10T10:24:49.773318 | 2018-04-13T09:44:45 | 2018-04-13T09:44:45 | 129,332,351 | 6 | 2 | null | null | null | null | UTF-8 | Java | false | false | 371 | java | package com.sprite.ads;
public final class BuildConfig {
public static final String APPLICATION_ID = "com.sprite.ads";
public static final String BUILD_TYPE = "release";
public static final boolean DEBUG = false;
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0";
}
| [
"aheadlcxzhang@gmail.com"
] | aheadlcxzhang@gmail.com |
97b8bdeffa30d460428ee227ebe656719ac805d3 | fd57ede0ba18642a730cc862c9e9059ec463320b | /opt/telephony/src/java/com/android/internal/telephony/metrics/InProgressSmsSession.java | 3327c225e6b4933f0bc1a5b65a2d084ffc7c663f | [] | no_license | kailaisi/android-29-framwork | a0c706fc104d62ea5951ca113f868021c6029cd2 | b7090eebdd77595e43b61294725b41310496ff04 | refs/heads/master | 2023-04-27T14:18:52.579620 | 2021-03-08T13:05:27 | 2021-03-08T13:05:27 | 254,380,637 | 1 | 1 | null | 2023-04-15T12:22:31 | 2020-04-09T13:35:49 | C++ | UTF-8 | Java | false | false | 3,571 | java | /*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.internal.telephony.metrics;
import android.os.SystemClock;
import com.android.internal.telephony.nano.TelephonyProto.SmsSession;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.concurrent.atomic.AtomicInteger;
/** The ongoing SMS session */
public class InProgressSmsSession {
/** Maximum events stored in the session */
private static final int MAX_EVENTS = 20;
/** Phone id */
public final int phoneId;
/** SMS session events */
public final Deque<SmsSession.Event> events;
/** Sms session starting system time in minute */
public final int startSystemTimeMin;
/** Sms session starting elapsed time in milliseconds */
public final long startElapsedTimeMs;
/** The last event's time */
private long mLastElapsedTimeMs;
/** Indicating events dropped */
private boolean mEventsDropped = false;
/** The expected SMS response #. One session could contain multiple SMS requests/responses. */
private AtomicInteger mNumExpectedResponses = new AtomicInteger(0);
/** Increase the expected response # */
public void increaseExpectedResponse() {
mNumExpectedResponses.incrementAndGet();
}
/** Decrease the expected response # */
public void decreaseExpectedResponse() {
mNumExpectedResponses.decrementAndGet();
}
/** Get the expected response # */
public int getNumExpectedResponses() {
return mNumExpectedResponses.get();
}
/** Check if events dropped */
public boolean isEventsDropped() { return mEventsDropped; }
/**
* Constructor
*
* @param phoneId Phone id
*/
public InProgressSmsSession(int phoneId) {
this.phoneId = phoneId;
events = new ArrayDeque<>();
// Save session start with lowered precision due to the privacy requirements
startSystemTimeMin = TelephonyMetrics.roundSessionStart(System.currentTimeMillis());
startElapsedTimeMs = SystemClock.elapsedRealtime();
mLastElapsedTimeMs = startElapsedTimeMs;
}
/**
* Add event
*
* @param builder Event builder
*/
public void addEvent(SmsSessionEventBuilder builder) {
addEvent(SystemClock.elapsedRealtime(), builder);
}
/**
* Add event
*
* @param timestamp Timestamp to be recoded with the event
* @param builder Event builder
*/
public synchronized void addEvent(long timestamp, SmsSessionEventBuilder builder) {
if (events.size() >= MAX_EVENTS) {
events.removeFirst();
mEventsDropped = true;
}
builder.setDelay(TelephonyMetrics.toPrivacyFuzzedTimeInterval(
mLastElapsedTimeMs, timestamp));
events.add(builder.build());
mLastElapsedTimeMs = timestamp;
}
}
| [
"541018378@qq.com"
] | 541018378@qq.com |
ee9089554b55bfa04d62914326d61f38b00f0c4e | 22bfee6b6a71860fba1d722211aca308b1784158 | /quanlydatcom/src/trong/lixco/com/bean/staticentity/MessageView.java | ff61b6a4a2d4b7fa0738db946be9da542aa3a07e | [] | no_license | quangthaiuit1/QuanLySuatAnNew | f64b0a3ebcca5c4e455663f60ad461e9be66dc74 | cad725d589d050e6ea1704a6fcde77e7918bebdb | refs/heads/master | 2023-04-13T20:32:04.715735 | 2021-04-28T13:31:47 | 2021-04-28T13:31:47 | 302,556,590 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 863 | java | package trong.lixco.com.bean.staticentity;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
public class MessageView {
static public void INFO(String message) {
FacesContext.getCurrentInstance().addMessage(null,
new FacesMessage(FacesMessage.SEVERITY_INFO, "Thông báo", message));
}
static public void WARN(String message) {
FacesContext.getCurrentInstance().addMessage(null,
new FacesMessage(FacesMessage.SEVERITY_WARN, "Thông báo", message));
}
static public void ERROR(String message) {
FacesContext.getCurrentInstance().addMessage(null,
new FacesMessage(FacesMessage.SEVERITY_ERROR, "Thông báo", message));
}
static public void FATAL(String message) {
FacesContext.getCurrentInstance().addMessage(null,
new FacesMessage(FacesMessage.SEVERITY_FATAL, "Thông báo", message));
}
}
| [
"quangthaiuit1@gmail.com"
] | quangthaiuit1@gmail.com |
71a9899e493b43b226b73d681f643eda549dd6a4 | 6421651fe9078e0826156fb00939a5b76dabaa9c | /src/ExpressionAddOperators.java | f471fbbe2986c311dced7aca4a3813c622794e63 | [] | no_license | lyzkhqby/LeetCode | 46d5271554b020ee095346d17996360ecd26d725 | 23f339ad4cad43e6797e325cb302a85359effaf6 | refs/heads/master | 2021-05-22T09:40:30.710464 | 2018-06-04T03:07:36 | 2018-06-04T03:07:36 | 54,880,138 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,236 | java | import java.util.ArrayList;
import java.util.List;
/**
* Created by zk on 2016/11/27.
*/
public class ExpressionAddOperators {
public List<String> addOperators(String num, int target) {
List<String> rst = new ArrayList<>();
if (num == null || num.length() == 0) return rst;
helper(rst, "", num, target, 0, 0, 0);
return rst;
}
private void helper(List<String> rst, String path, String num, int target, int pos, long eval, long multed) {
if (pos == num.length()) {
if (target == eval) {
rst.add(path);
}
return;
}
for (int i = pos; i < num.length(); i++) {
if (i != pos && num.charAt(pos) == '0') break;
long cur = Long.parseLong(num.substring(pos, i + 1));
if (pos == 0) {
helper(rst, path + cur, num, target, i + 1, cur, cur);
}else {
helper(rst, path + "+" + cur, num, target, i + 1, eval + cur, cur);
helper(rst, path + "-" + cur, num, target, i + 1, eval - cur, -cur);
helper(rst, path + "*" + cur, num, target, i + 1, eval - multed + multed * cur, multed * cur);
}
}
}
}
| [
"lyzkhqby@sina.com"
] | lyzkhqby@sina.com |
28954d64ce6ce6c3c4f05e2aec8f21cd972efac3 | 8b63f4abe160faf30a77be5a51c735aabbb65a95 | /mcp751/temp/src/minecraft/net/minecraft/block/BlockCake.java | 48dca03b040c263c3718224dc7c3ab9521125618 | [] | no_license | soultek101/gECON-mod | 80b3f6e760ac1f416fb70677fcfbb8378cbb65f2 | 33d1acbc88e8bd0f87b703901d71062a9720e748 | refs/heads/master | 2021-01-15T09:14:41.559008 | 2014-10-12T20:38:34 | 2014-10-12T20:38:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,517 | java | package net.minecraft.block;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Icon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockCake extends Block {
@SideOnly(Side.CLIENT)
private Icon field_94383_a;
@SideOnly(Side.CLIENT)
private Icon field_94381_b;
@SideOnly(Side.CLIENT)
private Icon field_94382_c;
protected BlockCake(int p_i9044_1_) {
super(p_i9044_1_, Material.field_76238_C);
this.func_71907_b(true);
}
public void func_71902_a(IBlockAccess p_71902_1_, int p_71902_2_, int p_71902_3_, int p_71902_4_) {
int var5 = p_71902_1_.func_72805_g(p_71902_2_, p_71902_3_, p_71902_4_);
float var6 = 0.0625F;
float var7 = (float)(1 + var5 * 2) / 16.0F;
float var8 = 0.5F;
this.func_71905_a(var7, 0.0F, var6, 1.0F - var6, var8, 1.0F - var6);
}
public void func_71919_f() {
float var1 = 0.0625F;
float var2 = 0.5F;
this.func_71905_a(var1, 0.0F, var1, 1.0F - var1, var2, 1.0F - var1);
}
public AxisAlignedBB func_71872_e(World p_71872_1_, int p_71872_2_, int p_71872_3_, int p_71872_4_) {
int var5 = p_71872_1_.func_72805_g(p_71872_2_, p_71872_3_, p_71872_4_);
float var6 = 0.0625F;
float var7 = (float)(1 + var5 * 2) / 16.0F;
float var8 = 0.5F;
return AxisAlignedBB.func_72332_a().func_72299_a((double)((float)p_71872_2_ + var7), (double)p_71872_3_, (double)((float)p_71872_4_ + var6), (double)((float)(p_71872_2_ + 1) - var6), (double)((float)p_71872_3_ + var8 - var6), (double)((float)(p_71872_4_ + 1) - var6));
}
public boolean func_71886_c() {
return false;
}
@SideOnly(Side.CLIENT)
public AxisAlignedBB func_71911_a_(World p_71911_1_, int p_71911_2_, int p_71911_3_, int p_71911_4_) {
int var5 = p_71911_1_.func_72805_g(p_71911_2_, p_71911_3_, p_71911_4_);
float var6 = 0.0625F;
float var7 = (float)(1 + var5 * 2) / 16.0F;
float var8 = 0.5F;
return AxisAlignedBB.func_72332_a().func_72299_a((double)((float)p_71911_2_ + var7), (double)p_71911_3_, (double)((float)p_71911_4_ + var6), (double)((float)(p_71911_2_ + 1) - var6), (double)((float)p_71911_3_ + var8), (double)((float)(p_71911_4_ + 1) - var6));
}
@SideOnly(Side.CLIENT)
public Icon func_71858_a(int p_71858_1_, int p_71858_2_) {
return p_71858_1_ == 1?this.field_94383_a:(p_71858_1_ == 0?this.field_94381_b:(p_71858_2_ > 0 && p_71858_1_ == 4?this.field_94382_c:this.field_94336_cN));
}
@SideOnly(Side.CLIENT)
public void func_94332_a(IconRegister p_94332_1_) {
this.field_94336_cN = p_94332_1_.func_94245_a("cake_side");
this.field_94382_c = p_94332_1_.func_94245_a("cake_inner");
this.field_94383_a = p_94332_1_.func_94245_a("cake_top");
this.field_94381_b = p_94332_1_.func_94245_a("cake_bottom");
}
public boolean func_71926_d() {
return false;
}
public boolean func_71903_a(World p_71903_1_, int p_71903_2_, int p_71903_3_, int p_71903_4_, EntityPlayer p_71903_5_, int p_71903_6_, float p_71903_7_, float p_71903_8_, float p_71903_9_) {
this.func_72259_b(p_71903_1_, p_71903_2_, p_71903_3_, p_71903_4_, p_71903_5_);
return true;
}
public void func_71921_a(World p_71921_1_, int p_71921_2_, int p_71921_3_, int p_71921_4_, EntityPlayer p_71921_5_) {
this.func_72259_b(p_71921_1_, p_71921_2_, p_71921_3_, p_71921_4_, p_71921_5_);
}
private void func_72259_b(World p_72259_1_, int p_72259_2_, int p_72259_3_, int p_72259_4_, EntityPlayer p_72259_5_) {
if(p_72259_5_.func_71043_e(false)) {
p_72259_5_.func_71024_bL().func_75122_a(2, 0.1F);
int var6 = p_72259_1_.func_72805_g(p_72259_2_, p_72259_3_, p_72259_4_) + 1;
if(var6 >= 6) {
p_72259_1_.func_94571_i(p_72259_2_, p_72259_3_, p_72259_4_);
} else {
p_72259_1_.func_72921_c(p_72259_2_, p_72259_3_, p_72259_4_, var6, 2);
}
}
}
public boolean func_71930_b(World p_71930_1_, int p_71930_2_, int p_71930_3_, int p_71930_4_) {
return !super.func_71930_b(p_71930_1_, p_71930_2_, p_71930_3_, p_71930_4_)?false:this.func_71854_d(p_71930_1_, p_71930_2_, p_71930_3_, p_71930_4_);
}
public void func_71863_a(World p_71863_1_, int p_71863_2_, int p_71863_3_, int p_71863_4_, int p_71863_5_) {
if(!this.func_71854_d(p_71863_1_, p_71863_2_, p_71863_3_, p_71863_4_)) {
p_71863_1_.func_94571_i(p_71863_2_, p_71863_3_, p_71863_4_);
}
}
public boolean func_71854_d(World p_71854_1_, int p_71854_2_, int p_71854_3_, int p_71854_4_) {
return p_71854_1_.func_72803_f(p_71854_2_, p_71854_3_ - 1, p_71854_4_).func_76220_a();
}
public int func_71925_a(Random p_71925_1_) {
return 0;
}
public int func_71885_a(int p_71885_1_, Random p_71885_2_, int p_71885_3_) {
return 0;
}
@SideOnly(Side.CLIENT)
public int func_71922_a(World p_71922_1_, int p_71922_2_, int p_71922_3_, int p_71922_4_) {
return Item.field_77746_aZ.field_77779_bT;
}
}
| [
"coreyleonardcole@gmail.com"
] | coreyleonardcole@gmail.com |
44574034e99525f67d72c7060a4d297bd3f950c6 | f8572b20164913668216c80a4969a310de9e3f73 | /kmdp-languages/kmdp-uml-model/kmdp-terminology-model/src/main/java/edu/mayo/kmdp/terms/impl/model/AnonymousConceptScheme.java | fad97389723bcb8bfa404097a41a27a83f6fee6f | [
"Apache-2.0"
] | permissive | sotty/kmdp-models | 40c9e8eab5563232293e7f47e5edd87137316fd6 | 11801a03b1e0b9a3c7d8b0c73cde20f15f33b556 | refs/heads/master | 2020-05-15T09:19:09.792363 | 2019-04-19T01:00:18 | 2019-04-19T01:00:18 | 182,174,586 | 0 | 0 | Apache-2.0 | 2019-04-19T00:19:49 | 2019-04-19T00:19:49 | null | UTF-8 | Java | false | false | 2,320 | java | /**
* Copyright © 2018 Mayo Clinic (RSTKNOWLEDGEMGMT@mayo.edu)
*
* 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 edu.mayo.kmdp.terms.impl.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import edu.mayo.kmdp.id.Term;
import edu.mayo.kmdp.id.helper.DatatypeHelper;
import edu.mayo.kmdp.terms.ConceptScheme;
import edu.mayo.kmdp.util.NameUtils;
import org.omg.spec.api4kp._1_0.identifiers.NamespaceIdentifier;
import org.omg.spec.api4kp._1_0.identifiers.URIIdentifier;
import java.net.URI;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Stream;
public class AnonymousConceptScheme extends NamespaceIdentifier implements ConceptScheme<Term> {
private URI versionId;
public AnonymousConceptScheme() {
}
public AnonymousConceptScheme(String schemeId, String schemeName, URI schemeURI,
URI schemeVersionURI) {
this.withId(schemeURI)
.withLabel(schemeName)
.withTag(schemeId)
.withVersion(DatatypeHelper.versionOf(schemeVersionURI, schemeURI));
this.versionId = schemeVersionURI;
}
public AnonymousConceptScheme(URI scheme) {
this.withId(scheme)
.withTag(scheme.getFragment())
.withLabel(scheme.getFragment());
}
@Override
@JsonIgnore
public Stream<Term> getConcepts() {
throw new UnsupportedOperationException("Unable to track Concepts in Anonymous Scheme");
}
@Override
public Optional<Term> lookup(Term other) {
return Optional.ofNullable(other);
}
@Override
public boolean subsumes(Term sup, Term sub) {
throw new UnsupportedOperationException("Unable to track Concepts in Anonymous Scheme");
}
@Override
public URI getVersionId() {
return versionId;
}
@Override
public NamespaceIdentifier asNamespace() {
return this;
}
}
| [
"dsotty@gmail.com"
] | dsotty@gmail.com |
f4f04a8bd104246ddf0bb2945cd28a9326498567 | 2deb74d5bf569bdbe637846d93fac47c01b278a4 | /java/lang/StringBuilder.java | 671bb643b813b2baea21c6768b64c70a244ea302 | [] | no_license | isabella232/android-sdk-sources-for-api-level-11 | 8aefeff38cbc0bbe7cfbbd04a940f8c4aa319772 | d772b816a1e388a5f8022d4bc47adc9016195600 | refs/heads/master | 2023-03-16T14:08:07.661845 | 2015-07-03T11:17:32 | 2015-07-03T11:17:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,876 | java | /* */ package java.lang;
/* */
/* */ import java.io.Serializable;
/* */
/* */ public final class StringBuilder extends AbstractStringBuilder
/* */ implements Appendable, CharSequence, Serializable
/* */ {
/* */ public StringBuilder()
/* */ {
/* 6 */ throw new RuntimeException("Stub!"); }
/* 7 */ public StringBuilder(int capacity) { throw new RuntimeException("Stub!"); }
/* 8 */ public StringBuilder(CharSequence seq) { throw new RuntimeException("Stub!"); }
/* 9 */ public StringBuilder(String str) { throw new RuntimeException("Stub!"); }
/* 10 */ public StringBuilder append(boolean b) { throw new RuntimeException("Stub!"); }
/* 11 */ public StringBuilder append(char c) { throw new RuntimeException("Stub!"); }
/* 12 */ public StringBuilder append(int i) { throw new RuntimeException("Stub!"); }
/* 13 */ public StringBuilder append(long l) { throw new RuntimeException("Stub!"); }
/* 14 */ public StringBuilder append(float f) { throw new RuntimeException("Stub!"); }
/* 15 */ public StringBuilder append(double d) { throw new RuntimeException("Stub!"); }
/* 16 */ public StringBuilder append(Object obj) { throw new RuntimeException("Stub!"); }
/* 17 */ public StringBuilder append(String str) { throw new RuntimeException("Stub!"); }
/* 18 */ public StringBuilder append(StringBuffer sb) { throw new RuntimeException("Stub!"); }
/* 19 */ public StringBuilder append(char[] chars) { throw new RuntimeException("Stub!"); }
/* 20 */ public StringBuilder append(char[] str, int offset, int len) { throw new RuntimeException("Stub!"); }
/* 21 */ public StringBuilder append(CharSequence csq) { throw new RuntimeException("Stub!"); }
/* 22 */ public StringBuilder append(CharSequence csq, int start, int end) { throw new RuntimeException("Stub!"); }
/* 23 */ public StringBuilder appendCodePoint(int codePoint) { throw new RuntimeException("Stub!"); }
/* 24 */ public StringBuilder delete(int start, int end) { throw new RuntimeException("Stub!"); }
/* 25 */ public StringBuilder deleteCharAt(int index) { throw new RuntimeException("Stub!"); }
/* 26 */ public StringBuilder insert(int offset, boolean b) { throw new RuntimeException("Stub!"); }
/* 27 */ public StringBuilder insert(int offset, char c) { throw new RuntimeException("Stub!"); }
/* 28 */ public StringBuilder insert(int offset, int i) { throw new RuntimeException("Stub!"); }
/* 29 */ public StringBuilder insert(int offset, long l) { throw new RuntimeException("Stub!"); }
/* 30 */ public StringBuilder insert(int offset, float f) { throw new RuntimeException("Stub!"); }
/* 31 */ public StringBuilder insert(int offset, double d) { throw new RuntimeException("Stub!"); }
/* 32 */ public StringBuilder insert(int offset, Object obj) { throw new RuntimeException("Stub!"); }
/* 33 */ public StringBuilder insert(int offset, String str) { throw new RuntimeException("Stub!"); }
/* 34 */ public StringBuilder insert(int offset, char[] ch) { throw new RuntimeException("Stub!"); }
/* 35 */ public StringBuilder insert(int offset, char[] str, int strOffset, int strLen) { throw new RuntimeException("Stub!"); }
/* 36 */ public StringBuilder insert(int offset, CharSequence s) { throw new RuntimeException("Stub!"); }
/* 37 */ public StringBuilder insert(int offset, CharSequence s, int start, int end) { throw new RuntimeException("Stub!"); }
/* 38 */ public StringBuilder replace(int start, int end, String str) { throw new RuntimeException("Stub!"); }
/* 39 */ public StringBuilder reverse() { throw new RuntimeException("Stub!"); }
/* 40 */ public String toString() { throw new RuntimeException("Stub!");
/* */ }
/* */ }
/* Location: D:\xyh\Android_3.0\android.jar
* Qualified Name: java.lang.StringBuilder
* JD-Core Version: 0.6.0
*/ | [
"root@ifeegoo.com"
] | root@ifeegoo.com |
e43682ce81a23f6569c7c87843076816c2943e69 | 7e6b8f8ab246298c55ad5dbca27366161b8c6cf6 | /src/main/java/com/sun/ws/management/DefaultAddressingModelUtility.java | e0dca06ed827667dcd600f38a6f3d61dd954de94 | [
"Apache-2.0"
] | permissive | RackHD/smi-lib-wiseman | a5488e4832e5c3f8b32105fdfe6009e3d0119059 | 15bf6c88bac8e91900cf68673c7ef0c199c4eda9 | refs/heads/master | 2021-01-01T16:02:47.064043 | 2018-07-16T07:36:06 | 2018-07-16T07:36:06 | 97,762,907 | 0 | 4 | Apache-2.0 | 2018-07-16T07:32:48 | 2017-07-19T21:30:48 | Java | UTF-8 | Java | false | false | 1,930 | java | package com.sun.ws.management;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import javax.xml.bind.JAXBException;
import javax.xml.soap.SOAPException;
import org.dmtf.schemas.wbem.wsman._1.wsman.SelectorType;
import com.sun.ws.management.addressing.Addressing;
public class DefaultAddressingModelUtility extends Management {
public DefaultAddressingModelUtility() throws SOAPException {
super();
}
public DefaultAddressingModelUtility(final Addressing addr) throws SOAPException {
super(addr);
}
public DefaultAddressingModelUtility(final InputStream is) throws
SOAPException, IOException {
super(is);
}
/** Retrieve the selectors from a Management instance.
*
* @param message
* @return a mapped set of selectors
* @throws JAXBException
* @throws SOAPException
*/
public static Map<String,String> getSelectorsAsStringMap(Management message)
throws JAXBException, SOAPException{
HashMap<String,String> selectors = new HashMap<String,String>();
if(message!=null){
Set<SelectorType> selSet = message.getSelectors();
populateMap(selectors, selSet);
}
return selectors;
}
/** Take SelectorType and populate the Map<String,String> bag passed in.
*
* @param selectors
* @param selSet
*/
public static void populateMap(HashMap<String, String> selectors,
Set<SelectorType> selSet) {
if(selectors==null){
selectors = new HashMap<String, String>();
}
if(selSet!=null){
for (Iterator iter = selSet.iterator(); iter.hasNext();) {
SelectorType element = (SelectorType) iter.next();
if((element.getName()!=null)&&(element.getName().trim().length()>0)){
selectors.put(element.getName(),
element.getContent().toString());
}
}
}
}
}
| [
"Michael_Hepfer@dell.com"
] | Michael_Hepfer@dell.com |
d3d054661e53de5e9523f6e771509d891f4d0da9 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Time/21/org/joda/time/Interval_withEnd_408.java | d44b9a512916c9f9f40de7a2a87a9f2d3cf21e2f | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 1,344 | java |
org joda time
interv standard implement immut time interv
time interv repres period time instant
interv inclus start instant exclus end
end instant greater equal start instant
interv fix millisecond durat
differ start end instant
durat repres separ link readabl durat readabledur
result interv compar
compar length interv compar durat
interv convert link readabl period readableperiod
repres differ start end point term field
year dai
interv thread safe immut
author brian neill o'neil
author sean geoghegan
author stephen colebourn
author julen parra
interv
creat interv end instant
param end end instant interv mean
interv start interv end
illeg argument except illegalargumentexcept result interv end start
interv end withend readabl instant readableinst end
end milli endmilli date time util datetimeutil instant milli getinstantmilli end
end milli withendmilli end milli endmilli
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
a8b9c14ba2831692d6259d89d7396ecad14672a0 | 39bef83f3a903f49344b907870feb10a3302e6e4 | /Android Studio Projects/bf.io.openshop/src/com/google/android/gms/tagmanager/zzbb.java | c5b3abf5c943124b7553eef3f6826f976924c1a0 | [] | no_license | Killaker/Android | 456acf38bc79030aff7610f5b7f5c1334a49f334 | 52a1a709a80778ec11b42dfe9dc1a4e755593812 | refs/heads/master | 2021-08-19T06:20:26.551947 | 2017-11-24T22:27:19 | 2017-11-24T22:27:19 | 111,960,738 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 772 | java | package com.google.android.gms.tagmanager;
import com.google.android.gms.internal.*;
import java.util.*;
public class zzbb extends zzak
{
private static final String ID;
static {
ID = zzad.zzbM.toString();
}
public zzbb() {
super(zzbb.ID, new String[0]);
}
@Override
public boolean zzFW() {
return false;
}
@Override
public zzag.zza zzP(final Map<String, zzag.zza> map) {
final Locale default1 = Locale.getDefault();
if (default1 == null) {
return zzdf.zzHF();
}
final String language = default1.getLanguage();
if (language == null) {
return zzdf.zzHF();
}
return zzdf.zzR(language.toLowerCase());
}
}
| [
"ema1986ct@gmail.com"
] | ema1986ct@gmail.com |
084e5b139ed7eabf17b276479c00ceff3e870d78 | 3ca53c13d2953805c00406476ceda9684887a8ad | /src/com/iwxxm/common/AbstractGMLType.java | 9603961d47ff9bbbca3ef82db8fcc558438806f3 | [] | no_license | yw2017051032/tac2iwxxm | ae93c12b08b7316cd59de032d4ae2e8082bc6c0b | 5a08cb9ecd0833fd4435bf6db81a2b8126380ec1 | refs/heads/master | 2020-03-17T03:03:06.671868 | 2018-06-05T16:55:59 | 2018-06-05T17:06:03 | 133,217,637 | 3 | 0 | null | null | null | null | GB18030 | Java | false | false | 6,334 | java | //
// 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.8-b130911.1802 生成的
// 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// 在重新编译源模式时, 对此文件的所有修改都将丢失。
// 生成时间: 2018.04.04 时间 10:18:30 PM CST
//
package com.iwxxm.common;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>AbstractGMLType complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* <complexType name="AbstractGMLType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <group ref="{http://www.opengis.net/gml/3.2}StandardObjectProperties"/>
* </sequence>
* <attribute ref="{http://www.opengis.net/gml/3.2}id use="required""/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AbstractGMLType", propOrder = {
"metaDataProperty",
"description",
"descriptionReference",
"identifier",
"name"
})
@XmlSeeAlso({
AerodromeCloudForecastType.class,
CompositeValueType.class,
ArrayType.class,
AbstractTopologyType.class,
AbstractTimeObjectType.class,
BagType.class,
DefinitionBaseType.class,
AbstractGeometryType.class,
AbstractAIXMObjectType.class,
AbstractFeatureType.class,
AbstractTimeSliceType.class
})
public abstract class AbstractGMLType {
protected List<MetaDataPropertyType> metaDataProperty;
protected StringOrRefType description;
protected ReferenceType descriptionReference;
protected CodeWithAuthorityType identifier;
protected List<CodeType> name;
@XmlAttribute(name = "id", namespace = "http://www.opengis.net/gml/3.2", required = true)
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
/**
* Gets the value of the metaDataProperty property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the metaDataProperty property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getMetaDataProperty().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link MetaDataPropertyType }
*
*
*/
public List<MetaDataPropertyType> getMetaDataProperty() {
if (metaDataProperty == null) {
metaDataProperty = new ArrayList<MetaDataPropertyType>();
}
return this.metaDataProperty;
}
/**
* 获取description属性的值。
*
* @return
* possible object is
* {@link StringOrRefType }
*
*/
public StringOrRefType getDescription() {
return description;
}
/**
* 设置description属性的值。
*
* @param value
* allowed object is
* {@link StringOrRefType }
*
*/
public void setDescription(StringOrRefType value) {
this.description = value;
}
/**
* 获取descriptionReference属性的值。
*
* @return
* possible object is
* {@link ReferenceType }
*
*/
public ReferenceType getDescriptionReference() {
return descriptionReference;
}
/**
* 设置descriptionReference属性的值。
*
* @param value
* allowed object is
* {@link ReferenceType }
*
*/
public void setDescriptionReference(ReferenceType value) {
this.descriptionReference = value;
}
/**
* 获取identifier属性的值。
*
* @return
* possible object is
* {@link CodeWithAuthorityType }
*
*/
public CodeWithAuthorityType getIdentifier() {
return identifier;
}
/**
* 设置identifier属性的值。
*
* @param value
* allowed object is
* {@link CodeWithAuthorityType }
*
*/
public void setIdentifier(CodeWithAuthorityType value) {
this.identifier = value;
}
/**
* Gets the value of the name property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the name property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getName().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link CodeType }
*
*
*/
public List<CodeType> getName() {
if (name == null) {
name = new ArrayList<CodeType>();
}
return this.name;
}
/**
* 获取id属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* 设置id属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
}
| [
"852406820@qq.com"
] | 852406820@qq.com |
9b7a31895b2ac182902bfd33d1dcd137d5b93d77 | c7e000e5c6549e095a8ffd032d33e0ca449c7ffd | /bin/platform/bootstrap/gensrc/de/hybris/platform/cronjob/model/StepModel.java | 5a2e1a070be4eff43703c41651757b32578b51c3 | [] | no_license | J3ys/million | e80ff953e228e4bc43a1108a1c117ddf11cc4644 | a97974b68b4adaf820f9024aa5181de635c60b4f | refs/heads/master | 2021-03-09T22:59:35.115273 | 2015-05-19T02:47:29 | 2015-05-19T02:47:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,183 | java | /*
* ----------------------------------------------------------------
* --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! ---
* --- Generated at 2015/05/18 13:25:55 ---
* ----------------------------------------------------------------
*
* [y] hybris Platform
*
* Copyright (c) 2000-2011 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*/
package de.hybris.platform.cronjob.model;
import de.hybris.platform.core.model.ItemModel;
import de.hybris.platform.cronjob.enums.ErrorMode;
import de.hybris.platform.cronjob.model.BatchJobModel;
import de.hybris.platform.servicelayer.model.ItemModelContext;
/**
* Generated model class for type Step first defined at extension processing.
*/
@SuppressWarnings("all")
public class StepModel extends ItemModel
{
/**<i>Generated model type code constant.</i>*/
public final static String _TYPECODE = "Step";
/** <i>Generated constant</i> - Attribute key of <code>Step.batchJob</code> attribute defined at extension <code>processing</code>. */
public static final String BATCHJOB = "batchJob";
/** <i>Generated constant</i> - Attribute key of <code>Step.code</code> attribute defined at extension <code>processing</code>. */
public static final String CODE = "code";
/** <i>Generated constant</i> - Attribute key of <code>Step.sequenceNumber</code> attribute defined at extension <code>processing</code>. */
public static final String SEQUENCENUMBER = "sequenceNumber";
/** <i>Generated constant</i> - Attribute key of <code>Step.synchronous</code> attribute defined at extension <code>processing</code>. */
public static final String SYNCHRONOUS = "synchronous";
/** <i>Generated constant</i> - Attribute key of <code>Step.errorMode</code> attribute defined at extension <code>processing</code>. */
public static final String ERRORMODE = "errorMode";
/** <i>Generated variable</i> - Variable of <code>Step.batchJob</code> attribute defined at extension <code>processing</code>. */
private BatchJobModel _batchJob;
/** <i>Generated variable</i> - Variable of <code>Step.code</code> attribute defined at extension <code>processing</code>. */
private String _code;
/** <i>Generated variable</i> - Variable of <code>Step.sequenceNumber</code> attribute defined at extension <code>processing</code>. */
private Integer _sequenceNumber;
/** <i>Generated variable</i> - Variable of <code>Step.synchronous</code> attribute defined at extension <code>processing</code>. */
private Boolean _synchronous;
/** <i>Generated variable</i> - Variable of <code>Step.errorMode</code> attribute defined at extension <code>processing</code>. */
private ErrorMode _errorMode;
/**
* <i>Generated constructor</i> - Default constructor for generic creation.
*/
public StepModel()
{
super();
}
/**
* <i>Generated constructor</i> - Default constructor for creation with existing context
* @param ctx the model context to be injected, must not be null
*/
public StepModel(final ItemModelContext ctx)
{
super(ctx);
}
/**
* <i>Generated constructor</i> - Constructor with all mandatory attributes.
* @deprecated Since 4.1.1 Please use the default constructor without parameters
* @param _batchJob initial attribute declared by type <code>Step</code> at extension <code>processing</code>
* @param _code initial attribute declared by type <code>Step</code> at extension <code>processing</code>
* @param _sequenceNumber initial attribute declared by type <code>Step</code> at extension <code>processing</code>
*/
@Deprecated
public StepModel(final BatchJobModel _batchJob, final String _code, final Integer _sequenceNumber)
{
super();
setBatchJob(_batchJob);
setCode(_code);
setSequenceNumber(_sequenceNumber);
}
/**
* <i>Generated constructor</i> - for all mandatory and initial attributes.
* @deprecated Since 4.1.1 Please use the default constructor without parameters
* @param _batchJob initial attribute declared by type <code>Step</code> at extension <code>processing</code>
* @param _code initial attribute declared by type <code>Step</code> at extension <code>processing</code>
* @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code>
* @param _sequenceNumber initial attribute declared by type <code>Step</code> at extension <code>processing</code>
*/
@Deprecated
public StepModel(final BatchJobModel _batchJob, final String _code, final ItemModel _owner, final Integer _sequenceNumber)
{
super();
setBatchJob(_batchJob);
setCode(_code);
setOwner(_owner);
setSequenceNumber(_sequenceNumber);
}
/**
* <i>Generated method</i> - Getter of the <code>Step.batchJob</code> attribute defined at extension <code>processing</code>.
* @return the batchJob
*/
public BatchJobModel getBatchJob()
{
if (this._batchJob!=null)
{
return _batchJob;
}
return _batchJob = getPersistenceContext().getValue(BATCHJOB, _batchJob);
}
/**
* <i>Generated method</i> - Getter of the <code>Step.code</code> attribute defined at extension <code>processing</code>.
* @return the code
*/
public String getCode()
{
if (this._code!=null)
{
return _code;
}
return _code = getPersistenceContext().getValue(CODE, _code);
}
/**
* <i>Generated method</i> - Getter of the <code>Step.errorMode</code> attribute defined at extension <code>processing</code>.
* @return the errorMode
*/
public ErrorMode getErrorMode()
{
if (this._errorMode!=null)
{
return _errorMode;
}
return _errorMode = getPersistenceContext().getValue(ERRORMODE, _errorMode);
}
/**
* <i>Generated method</i> - Getter of the <code>Step.sequenceNumber</code> attribute defined at extension <code>processing</code>.
* @return the sequenceNumber
*/
public Integer getSequenceNumber()
{
if (this._sequenceNumber!=null)
{
return _sequenceNumber;
}
return _sequenceNumber = getPersistenceContext().getValue(SEQUENCENUMBER, _sequenceNumber);
}
/**
* <i>Generated method</i> - Getter of the <code>Step.synchronous</code> attribute defined at extension <code>processing</code>.
* @return the synchronous
*/
public Boolean getSynchronous()
{
if (this._synchronous!=null)
{
return _synchronous;
}
return _synchronous = getPersistenceContext().getValue(SYNCHRONOUS, _synchronous);
}
/**
* <i>Generated method</i> - Initial setter of <code>Step.batchJob</code> attribute defined at extension <code>processing</code>. Can only be used at creation of model - before first save.
*
* @param value the batchJob
*/
public void setBatchJob(final BatchJobModel value)
{
_batchJob = getPersistenceContext().setValue(BATCHJOB, value);
}
/**
* <i>Generated method</i> - Setter of <code>Step.code</code> attribute defined at extension <code>processing</code>.
*
* @param value the code
*/
public void setCode(final String value)
{
_code = getPersistenceContext().setValue(CODE, value);
}
/**
* <i>Generated method</i> - Setter of <code>Step.errorMode</code> attribute defined at extension <code>processing</code>.
*
* @param value the errorMode
*/
public void setErrorMode(final ErrorMode value)
{
_errorMode = getPersistenceContext().setValue(ERRORMODE, value);
}
/**
* <i>Generated method</i> - Setter of <code>Step.sequenceNumber</code> attribute defined at extension <code>processing</code>.
*
* @param value the sequenceNumber
*/
public void setSequenceNumber(final Integer value)
{
_sequenceNumber = getPersistenceContext().setValue(SEQUENCENUMBER, value);
}
/**
* <i>Generated method</i> - Setter of <code>Step.synchronous</code> attribute defined at extension <code>processing</code>.
*
* @param value the synchronous
*/
public void setSynchronous(final Boolean value)
{
_synchronous = getPersistenceContext().setValue(SYNCHRONOUS, value);
}
}
| [
"yanagisawa@gotandadenshi.jp"
] | yanagisawa@gotandadenshi.jp |
b5587b0ae75e3b5f5f05e589d1b872c84bd7d68a | df134b422960de6fb179f36ca97ab574b0f1d69f | /org/apache/logging/log4j/core/appender/rolling/AbstractRolloverStrategy.java | b5b9bb2ac190fb721ca97d460457bfc0603a73d1 | [] | no_license | TheShermanTanker/NMS-1.16.3 | bbbdb9417009be4987872717e761fb064468bbb2 | d3e64b4493d3e45970ec5ec66e1b9714a71856cc | refs/heads/master | 2022-12-29T15:32:24.411347 | 2020-10-08T11:56:16 | 2020-10-08T11:56:16 | 302,324,687 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,494 | java | /* */ package org.apache.logging.log4j.core.appender.rolling;
/* */
/* */ import java.io.File;
/* */ import java.io.IOException;
/* */ import java.nio.file.DirectoryStream;
/* */ import java.nio.file.Files;
/* */ import java.nio.file.Path;
/* */ import java.util.ArrayList;
/* */ import java.util.List;
/* */ import java.util.SortedMap;
/* */ import java.util.TreeMap;
/* */ import java.util.regex.Matcher;
/* */ import java.util.regex.Pattern;
/* */ import org.apache.logging.log4j.Logger;
/* */ import org.apache.logging.log4j.LoggingException;
/* */ import org.apache.logging.log4j.core.appender.rolling.action.Action;
/* */ import org.apache.logging.log4j.core.appender.rolling.action.CompositeAction;
/* */ import org.apache.logging.log4j.core.lookup.StrSubstitutor;
/* */ import org.apache.logging.log4j.core.pattern.NotANumber;
/* */ import org.apache.logging.log4j.status.StatusLogger;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public abstract class AbstractRolloverStrategy
/* */ implements RolloverStrategy
/* */ {
/* 53 */ protected static final Logger LOGGER = (Logger)StatusLogger.getLogger();
/* */
/* */ protected final StrSubstitutor strSubstitutor;
/* */
/* */ protected AbstractRolloverStrategy(StrSubstitutor strSubstitutor) {
/* 58 */ this.strSubstitutor = strSubstitutor;
/* */ }
/* */
/* */
/* */ public StrSubstitutor getStrSubstitutor() {
/* 63 */ return this.strSubstitutor;
/* */ }
/* */
/* */ protected Action merge(Action compressAction, List<Action> custom, boolean stopOnError) {
/* 67 */ if (custom.isEmpty()) {
/* 68 */ return compressAction;
/* */ }
/* 70 */ if (compressAction == null) {
/* 71 */ return (Action)new CompositeAction(custom, stopOnError);
/* */ }
/* 73 */ List<Action> all = new ArrayList<>();
/* 74 */ all.add(compressAction);
/* 75 */ all.addAll(custom);
/* 76 */ return (Action)new CompositeAction(all, stopOnError);
/* */ }
/* */
/* */ protected int suffixLength(String lowFilename) {
/* 80 */ for (FileExtension extension : FileExtension.values()) {
/* 81 */ if (extension.isExtensionFor(lowFilename)) {
/* 82 */ return extension.length();
/* */ }
/* */ }
/* 85 */ return 0;
/* */ }
/* */
/* */
/* */ protected SortedMap<Integer, Path> getEligibleFiles(RollingFileManager manager) {
/* 90 */ return getEligibleFiles(manager, true);
/* */ }
/* */
/* */
/* */ protected SortedMap<Integer, Path> getEligibleFiles(RollingFileManager manager, boolean isAscending) {
/* 95 */ StringBuilder buf = new StringBuilder();
/* 96 */ String pattern = manager.getPatternProcessor().getPattern();
/* 97 */ manager.getPatternProcessor().formatFileName(this.strSubstitutor, buf, NotANumber.NAN);
/* 98 */ return getEligibleFiles(buf.toString(), pattern, isAscending);
/* */ }
/* */
/* */ protected SortedMap<Integer, Path> getEligibleFiles(String path, String pattern) {
/* 102 */ return getEligibleFiles(path, pattern, true);
/* */ }
/* */
/* */ protected SortedMap<Integer, Path> getEligibleFiles(String path, String logfilePattern, boolean isAscending) {
/* 106 */ TreeMap<Integer, Path> eligibleFiles = new TreeMap<>();
/* 107 */ File file = new File(path);
/* 108 */ File parent = file.getParentFile();
/* 109 */ if (parent == null) {
/* 110 */ parent = new File(".");
/* */ } else {
/* 112 */ parent.mkdirs();
/* */ }
/* 114 */ if (!logfilePattern.contains("%i")) {
/* 115 */ return eligibleFiles;
/* */ }
/* 117 */ Path dir = parent.toPath();
/* 118 */ String fileName = file.getName();
/* 119 */ int suffixLength = suffixLength(fileName);
/* 120 */ if (suffixLength > 0) {
/* 121 */ fileName = fileName.substring(0, fileName.length() - suffixLength) + ".*";
/* */ }
/* 123 */ String filePattern = fileName.replace("\000", "(\\d+)");
/* 124 */ Pattern pattern = Pattern.compile(filePattern);
/* */
/* 126 */ try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir)) {
/* 127 */ for (Path entry : stream) {
/* 128 */ Matcher matcher = pattern.matcher(entry.toFile().getName());
/* 129 */ if (matcher.matches()) {
/* 130 */ Integer index = Integer.valueOf(Integer.parseInt(matcher.group(1)));
/* 131 */ eligibleFiles.put(index, entry);
/* */ }
/* */ }
/* 134 */ } catch (IOException ioe) {
/* 135 */ throw new LoggingException("Error reading folder " + dir + " " + ioe.getMessage(), ioe);
/* */ }
/* 137 */ return isAscending ? eligibleFiles : eligibleFiles.descendingMap();
/* */ }
/* */ }
/* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\org\apache\logging\log4j\core\appender\rolling\AbstractRolloverStrategy.class
* Java compiler version: 7 (51.0)
* JD-Core Version: 1.1.3
*/ | [
"tanksherman27@gmail.com"
] | tanksherman27@gmail.com |
880912eff09c126e6ad603ec86a2fb83111db526 | 86ec42ce98b5ad11bc9c0834d698a6369e7fc76c | /Splat/zipme/src-tests/tests/Example_Paulo2.java | 5f23ae3efc57cec928634a4c76e7043b2d337a8d | [] | no_license | fischerJF/ConfigurableSotwareSystems | ecbd82035a9cf9b2fd38060331912cc8ed6276e0 | 2e85cbfba87a1f2509753410514eb4f3bc408730 | refs/heads/master | 2020-04-06T19:27:02.510899 | 2018-11-18T14:10:34 | 2018-11-18T14:10:34 | 157,737,651 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,763 | java | package tests;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import net.sf.zipme.Adler32;
import net.sf.zipme.Deflater;
import net.sf.zipme.DeflaterOutputStream;
import net.sf.zipme.GZIPInputStream;
import net.sf.zipme.GZIPOutputStream;
import net.sf.zipme.ZipArchive;
import net.sf.zipme.ZipEntry;
import net.sf.zipme.ZipException;
import net.sf.zipme.ZipInputStream;
import net.sf.zipme.ZipOutputStream;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import splat.ZipMeVariables;
public class Example_Paulo2 extends ZipMeTest {
// gets the project path
static String homeDir;
static {
try {
homeDir = (new File(".")).getCanonicalPath();
} catch (IOException e) {
e.printStackTrace();
}
};
@Before
public void setup() {
}
/**
* This test covers the 2 methods which access ARCHIVECHECK___ Satisfies:
* requirement1, requirement2, and requirement3.
*/
@Test
public void testARCHIVECHECK() throws ZipException, IOException {
// REPAIR
// ZipMeVariables.getSINGLETON().setARCHIVECHECK___(false);
FileInputStream zipFile = new FileInputStream(new File(homeDir
+ "/files/file.gz"));
ZipArchive zipArchive = new ZipArchive(zipFile);
// checkZipArchive() checks if the file is valid
// ZipArchive calls hook1() that calls checkZipArchive()
// If the test reaches this point with ARCHIVECHECK disabled and
// an invalid file, the size() will return 0;
assertFalse(zipArchive.size() > 0);
}
/**
* This test covers the 1 method that accesses DERIVATIVE_COMPRESS_CRC___
* Satisfies: requirement1 for method hook41(), requirement2, and
* requirement3.
*/
@Test
public void testDERIVATIVE_COMPRESS_CRC() throws IOException {
// ZipMeVariables.getSINGLETON().setCRC___(true);
// ZipMeVariables.getSINGLETON().setCOMPRESS___(true);
// ZipMeVariables.getSINGLETON().setDERIVATIVE_COMPRESS_CRC___(true);
ZipOutputStream zout = new ZipOutputStream(new FileOutputStream(new File(
homeDir + "/files/src.zip")));
zout.crc.update(1);
ZipEntry ze = new ZipEntry("C://");
zout.putNextEntry(ze);
zout.hook41();
assertTrue(zout.crc.crc == 0);
zout.write(new byte[32], 0, 31);
assertTrue(zout.size == 31);
zout.closeEntry();
assertTrue(ze.getCrc() == zout.crc.crc);
}
@Test
public void testCOMPRESS__() throws IOException {
// ZipMeVariables.getSINGLETON().setCOMPRESS___(true);
DeflaterOutputStream dos = new DeflaterOutputStream(new FileOutputStream(
new File(homeDir + "/files/src.zip")));
dos.deflate();
Deflater deflater = new Deflater();
byte[] buffer = new byte[32];
int output = deflater.deflate(buffer);
dos.write(new byte[32]);
deflater.flush();
boolean finished = deflater.finished();
assertFalse(finished);
deflater.finish();
finished = deflater.finished();
assertTrue(output != -1);
finished = deflater.finished();
}
// @Test
// public void testGZIP__() throws IOException {
//// ZipMeVariables.getSINGLETON().setGZIP___(true);
// GZIPInputStream is = new GZIPInputStream(new FileInputStream(new File(
// homeDir + "/files/src.zip")));
// assertFalse(is.len > 0);
// int answer = is.read();
// is.close();
// assertTrue(answer == -1);
// }
@Test
public void testEXTRACT__() throws IOException {
// ZipMeVariables.getSINGLETON().setEXTRACT___(true);
ZipInputStream zis = new ZipInputStream(new FileInputStream(new File(
homeDir + "/files/src.zip")));
assertTrue(zis.available() == 1);
int answer = zis.read();
assertTrue(answer == -1);
zis.close();
}
@Test
public void testCRC() throws IOException {
// ZipMeVariables.getSINGLETON().setCRC___(true);
ZipOutputStream zout = new ZipOutputStream(new FileOutputStream(new File(
homeDir + "/files/src.zip")));
zout.crc.update(1);
ZipEntry ze = new ZipEntry("C://");
zout.putNextEntry(ze);
// This happens because the test does not reach
// hook41() that resets the crc value, because
// DERIVATIVE_COMPRESS_CRC___ is disabled.
assertFalse(zout.crc.crc == 0);
// REPAIR
// if(!ZipMeVariables.getSINGLETON().isDERIVATIVE_COMPRESS_CRC___())
// assertFalse(zout.crc.crc == 0);
}
@Test
public void testADLER32CHECKSUM___() throws IOException {
// ZipMeVariables.getSINGLETON().setADLER32CHECKSUM___(true);
Adler32 adler = new Adler32();
byte[] buffer = new byte[32];
adler.update(buffer);
assertTrue(adler.getValue() != -1);
}
public void testDERIVATIVE_COMPRESS_ADLER32CHECKSUM___() throws IOException {
// ZipMeVariables.getSINGLETON().setADLER32CHECKSUM___(true);
// ZipMeVariables.getSINGLETON().setDERIVATIVE_COMPRESS_ADLER32CHECKSUM___(
// true);
Adler32 adler = new Adler32();
byte[] buffer = new byte[32];
adler.update(buffer);
assertTrue(adler.getValue() != -1);
}
// @Test
// public void testDERIVATIVE_COMPRESS_GZIP___() throws IOException {
//// ZipMeVariables.getSINGLETON().setGZIP___(true);
//// ZipMeVariables.getSINGLETON().setDERIVATIVE_COMPRESS_GZIP___(true);
// GZIPOutputStream os = new GZIPOutputStream(new FileOutputStream(new File(
// homeDir + "/files/file.gz")));
// byte[] b1 = os.buf;
// assertTrue(os.buf.length > 0);
// os.close();
// byte[] b2 = os.buf;
// assertTrue(b1.equals(b2));
// }
@Test
public void testDERIVATIVE_GZIPCRC___() throws IOException {
// ZipMeVariables.getSINGLETON().setGZIP___(true);
// ZipMeVariables.getSINGLETON().setCRC___(true);
// ZipMeVariables.getSINGLETON().setDERIVATIVE_GZIPCRC___(true);
// ZipMeVariables.getSINGLETON().setEXTRACT___(true);
ZipInputStream zis = new ZipInputStream(new FileInputStream(new File(
homeDir + "/files/src.zip")));
zis.hook();
assertTrue(zis.available() == 1);
}
@Test
public void testDERIVATIVE_COMPRESS_GZIPCRC___() throws IOException {
// ZipMeVariables.getSINGLETON().setGZIP___(true);
// ZipMeVariables.getSINGLETON().setCRC___(true);
// ZipMeVariables.getSINGLETON().setDERIVATIVE_COMPRESS_GZIPCRC___(true);
// ZipMeVariables.getSINGLETON().setDERIVATIVE_GZIPCRC___(true);
ZipInputStream zis = new ZipInputStream(new FileInputStream(new File(
homeDir + "/files/src.zip")));
zis.hook();
assertTrue(zis.available() == -1);
// REPAIR
// if (!ZipMeVariables.getSINGLETON().isEXTRACT___())
// assertTrue(zis.available() == -1);
// else assertFalse(zis.available() == -1);
assertTrue(zis.crc.crc == 0);
}
@Test
public void testDERIVATIVE_EXTRACT_CRC___() throws IOException {
// ZipMeVariables.getSINGLETON().setCRC___(true);
// ZipMeVariables.getSINGLETON().setEXTRACT___(true);
// ZipMeVariables.getSINGLETON().setDERIVATIVE_EXTRACT_CRC___(true);
// ZipMeVariables.getSINGLETON().setCOMPRESS___(true);
ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(new File(
homeDir + "/files/Teste.txt.zip")));
zos.putNextEntry(new ZipEntry(homeDir + "/files/Teste.txt.zip"));
zos.write(new byte[32]);
ZipInputStream zis = new ZipInputStream(new FileInputStream(new File(
homeDir + "/files/Teste.txt.zip")));
ZipEntry ze = zis.getNextEntry();
assertTrue(ze != null);
zis.available();
zos.close();
}
@After
public void tearDown() {
// ZipMeVariables.getSINGLETON().restore();
}
}
| [
"fischerbatera@hotmail.com"
] | fischerbatera@hotmail.com |
f6f2ab24974a03793b48b87b0cbdf492b187b55c | 57396d64470e19cae092c516dd36603bac6f2aa2 | /app/src/main/java/org/faqrobot/text/netapi/Rxjava_Api.java | 021c926b4ed2f3a851bfd92804bd175a9d4f394d | [] | no_license | sdmengchen12580/all_users_talk | 23ff90505bb319e25db1576b32851328c54c429e | 3e8e061086239021faa163f94ae4cc6bb8cbc59b | refs/heads/master | 2021-07-23T07:47:28.596339 | 2017-11-03T06:59:38 | 2017-11-03T06:59:38 | 109,113,844 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,698 | java | package org.faqrobot.text.netapi;
import org.faqrobot.text.entity.Access_Token;
import org.faqrobot.text.entity.GetRobatResult;
import org.faqrobot.text.entity.KeeyRobatOnlion;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;
/**
* Created by yunwen on 2017/10/9.
*/
public interface Rxjava_Api {
/**
* 1.获取accesstoken
*/
@Headers("Cache-Control:public,max-age=43200")
@POST("token/getToken")
Observable<Access_Token> getAccess_Token(@Query("appId") String appId,
@Query("secret") String secret);
/**
* 2.获取聊天信息接口
* s=固定字符串aq
* sourceId=9
* question为请求的问题(100字以内)
* clientId=一串数字
*/
@FormUrlEncoded
@POST("servlet/ApiChat")
Observable<GetRobatResult> getRobatResult(@Query("access_token") String access_token,
@Query("s") String s,
@Field("sourceId") int sourceId,
@Field("question") String question,
@Query("clientId") String clientId);
/**
* 3.设置机器人的一直在线
* s=kl
* sourceId=9
* question为请求的问题(100字以内)
* clientId=一串数字
*/
@POST("servlet/ApiChat")
Observable<KeeyRobatOnlion> setRobotOnlioning(@Query("access_token") String access_token,
@Query("s") String s,
@Query("question") String question,
@Query("clientId") String clientId,
@Query("sourceId") int sourceId);
/**
* 4.获取网页流程答案接口
* s=getflw
* fid=流程项的id代号
* question为请求的问题(100字以内)
* sourceId=9
* clientId=一串数字
*/
@FormUrlEncoded
@POST("servlet/ApiChat")
Observable<GetRobatResult> getStreamRLResult(@Query("access_token") String access_token,
@Query("s") String s,
@Query("fid") int fid,
@Field("question") String question,
@Query("clientId") String clientId,
@Query("sourceId") int sourceId);
}
| [
"1055199957@qq.com"
] | 1055199957@qq.com |
60ccff1a6887a6b9effc5a62f32ab26306ad2162 | 019351eb9567fefa8c9c15588899b52edbb68616 | /Multi-thread/src/cn/shyshetxwh/v3/v31/box/BoxTest.java | 8c90b967be3416bbe73d387e1c726199c6741d4a | [] | no_license | shyshetxwh/selfstudy | 3220bbdee656f659a8890053d12e7a792bc67ad6 | 9b536e83243214a9ea37ff46a48b72d5d242ef2b | refs/heads/master | 2023-04-02T09:52:44.067355 | 2021-04-02T13:33:46 | 2021-04-02T13:33:46 | 352,621,879 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 739 | java | package cn.shyshetxwh.v3.v31.box;
/**
* FileName: BoxTest
* Author: Administrator+shyshetxwh
* Date: 2021/1/6 0006 16:25
*/
public class BoxTest {
public static void main(String[] args) throws InterruptedException {
Box box = new Box();
ProducerService ps = new ProducerService(box);
for (int i = 0; i < 2; i++) {
new ThreadProducer(ps).start();
}
Thread.sleep(50);
new ThreadProducerCheck(ps).start();
Thread.sleep(10000);
ConsumerService cs = new ConsumerService(box);
for (int i = 0; i < 10; i++) {
new ThreadConsumer(cs).start();
}
Thread.sleep(50);
new ThreadConsumerCheck(cs).start();
}
}
| [
"shyshetxwh@163.com"
] | shyshetxwh@163.com |
e0e9ace3c32440c02a648eb00e8b6dcb797161bc | 16a83c75828ea3bceaa152663359fec50fcb11da | /Chapter_1/Actual EarthQuake Report - Copy/app/src/main/java/com/example/asheransari/uni/CustomAdapter.java | f35cb0020273d52c3eeeea78dc1558b4be48405b | [] | no_license | masheransari/EarthQuake-Report-UDACITY | 09c84d79cd16f964f2af8891aba3f2f98d2ecb97 | b81c6dea48347f218f3fba53c185c669a096f91c | refs/heads/master | 2021-01-24T10:11:14.513917 | 2016-10-07T15:53:42 | 2016-10-07T15:53:42 | 70,025,000 | 5 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,393 | java | package com.example.asheransari.uni;
import android.app.Activity;
import android.graphics.drawable.GradientDrawable;
import android.support.v4.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
/**
* Created by asher.ansari on 9/23/2016.
*/
public class CustomAdapter extends ArrayAdapter<Customclass> {
public static final String LOCATION_SEPERATOR = " of ";
CustomAdapter(Activity activity,ArrayList<Customclass> arrayAdapter){
super(activity,0,arrayAdapter);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View listitemview = convertView;
if(listitemview == null){
listitemview = LayoutInflater.from(getContext()).inflate(R.layout.list_item,parent,false);
}
Customclass currentlist = getItem(position);
TextView magnitude = (TextView) listitemview.findViewById(R.id.magnitudeview);
String mag = formatMagnitude(currentlist.getMagnitude());
magnitude.setText(mag);
GradientDrawable magnitudeDrawabale = (GradientDrawable)magnitude.getBackground();
int magnitudeColor = getMagnitudeColor(currentlist.getMagnitude());
magnitudeDrawabale.setColor(magnitudeColor);
String PrimaryLocation, offsetLocation;
TextView pri_Location = (TextView) listitemview.findViewById(R.id.primary_location);
TextView Off_Location = (TextView) listitemview.findViewById(R.id.location_offset);
String loca = currentlist.getPlace();
if (loca.contains(LOCATION_SEPERATOR)) {
String[] parts = loca.split(LOCATION_SEPERATOR);
offsetLocation = parts[0] + LOCATION_SEPERATOR;
PrimaryLocation =parts[1];
}
else
{
offsetLocation = getContext().getString(R.string.near_the);
PrimaryLocation = loca;
}
pri_Location.setText(PrimaryLocation);
Off_Location.setText(offsetLocation);
TextView date = (TextView) listitemview.findViewById(R.id.date);
Date dateobject = new Date(currentlist.getTime());
String formatteddate = formateDate(dateobject);
date.setText(formatteddate);
TextView time = (TextView) listitemview.findViewById(R.id.time);
String formattedtime = formatTime(dateobject);
time.setText(formattedtime);
return listitemview;
}
private String formateDate(Date dateObject)
{
SimpleDateFormat dateFormat = new SimpleDateFormat("LLL dd, yyyy");
return dateFormat.format(dateObject);
}
private String formatTime(Date dateObject)
{
SimpleDateFormat TimeFormat = new SimpleDateFormat("h:mm a");
String a = TimeFormat.format(dateObject);
return a;
}
private String formatMagnitude(double magnitude)
{
DecimalFormat df = new DecimalFormat("0.0");
return df.format(magnitude);
}
private int getMagnitudeColor(double magnitude)
{
int magnitudeColorResourceID;
int magnitudeFloor = (int)Math.floor(magnitude);
switch(magnitudeFloor)
{
case 1:
magnitudeColorResourceID = R.color.magnitude1;
break;
case 2:
magnitudeColorResourceID = R.color.magnitude2;
break;
case 3:
magnitudeColorResourceID = R.color.magnitude3;
break;
case 4:
magnitudeColorResourceID = R.color.magnitude4;
break;
case 5:
magnitudeColorResourceID = R.color.magnitude5;
break;
case 6:
magnitudeColorResourceID = R.color.magnitude6;
break;
case 7:
magnitudeColorResourceID = R.color.magnitude7;
break;
case 8:
magnitudeColorResourceID = R.color.magnitude8;
break;
case 9:
magnitudeColorResourceID = R.color.magnitude9;
break;
default:
magnitudeColorResourceID = R.color.magnitude10plus;
break;
}
return ContextCompat.getColor(getContext(), magnitudeColorResourceID);
}
}
| [
"asher.ansari@nhu.edu.pk"
] | asher.ansari@nhu.edu.pk |
5194cd0194e279b9aeb077056f6cd2200290f71d | a048507c1807397329a558e84a5b0f69e66437d3 | /boot/iot-master -yx/src/main/java/com/cimr/master/comm/exception/GlobalExceptionResolver.java | 62830b9c6daee2dbc5a062790f614f5b50c08d28 | [] | no_license | jlf1997/learngit | 0ffd6fec5c6e9ad10ff14ff838396e1ef53a06f3 | d6d7eba1c0bf6c76f49608dd2537594af2cd4ee9 | refs/heads/master | 2021-01-17T07:10:30.004555 | 2018-11-08T09:15:13 | 2018-11-08T09:15:13 | 59,822,610 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,947 | java | package com.cimr.master.comm.exception;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.SimpleMappingExceptionResolver;
import com.cimr.sysmanage.dto.HttpResult;
import com.cimr.util.AjaxUtil;
import com.cimr.util.LogsUtil;
public class GlobalExceptionResolver extends SimpleMappingExceptionResolver {
// private static final Log log = LogFactory.get();
private static final Logger log = LoggerFactory.getLogger(GlobalExceptionResolver.class);
protected ModelAndView doResolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
if (!SecurityUtils.getSubject().isAuthenticated()) {
if (AjaxUtil.isAjax(request)) {
HttpResult result = new HttpResult(false, ex.getMessage());
AjaxUtil.out(response, result);
return null;
}
try {
throw new NotLoginException("请重新登录。");
} catch (NotLoginException e) {
e.printStackTrace();
return getModelAndView("comm/exception/loginException", ex, request);
}
}
String viewName = determineViewName(ex, request);
response.setCharacterEncoding("UTF-8");
if (viewName != null) {
if (!AjaxUtil.isAjax(request)) {
Integer statusCode = determineStatusCode(request, viewName);
if (statusCode != null) {
applyStatusCodeIfPossible(request, response, statusCode.intValue());
}
System.out.println("JSP格式返回" + viewName);
return getModelAndView(viewName, ex, request);
}
HttpResult result = new HttpResult(false, ex.getMessage());
AjaxUtil.out(response, result);
log.error("异常信息:"+LogsUtil.getStackTrace(ex));
System.out.println("JSON格式返回" + viewName);
return null;
}
return null;
}
}
| [
"675866753@qq.com"
] | 675866753@qq.com |
e925074677df8b387cdb9ee5c0b323ae2c5652c9 | 25181b803a6da5fa748bc8ec353cd2f3a3a836ed | /clientAndServer/circle/iservice/iservice-common/java/g/service/report/IReportCqsscService.java | b2839d036eca8e9c023eb03b0c41b27b74383a2e | [] | no_license | primary10/bullCard | 991ed8619cac7a75fa56ce8cb6879f6c0bba2d62 | 39f4e36624a692b8fb6d991b791e0e2e9e8d7722 | refs/heads/master | 2022-11-08T02:20:57.135154 | 2019-10-12T01:15:52 | 2019-10-12T01:15:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,014 | java | package g.service.report;
import org.soul.iservice.support.IBaseService;
import g.model.report.po.ReportCqssc;
import g.model.report.vo.ReportCqsscListVo;
import g.model.report.vo.ReportCqsscVo;
import java.util.Map;
/**
* 服务接口
*
* @author tom
* @time 2016-8-1 15:34:20
*/
//region your codes 1
public interface IReportCqsscService extends IBaseService<ReportCqsscListVo, ReportCqsscVo, ReportCqssc, Integer> {
//endregion your codes 1
/**
* 生成报表数据
* @param map
* @return Integer
*/
Integer genReport(Map<String,Object> map);
//endregion your codes 2
/**
* 页面数据显示 分组查询
* @param listVo
* @return List<ReportCqssc>
*/
ReportCqsscListVo showTotalNumber(ReportCqsscListVo listVo);
/**
* 页面各项值汇总
* @param listVo
* @param selectType 查询类型
* @return ReportCqsscListVo
*/
ReportCqsscListVo selectTotalValue(ReportCqsscListVo listVo, String selectType);
} | [
"1406733029@qq.com"
] | 1406733029@qq.com |
c3f94a8dcc787551b608104c62f95c810e510a1c | 09b9ef9f4d622d8c4aedb82be4d520f92a683d0f | /net.sf.anathema.charms/test/net/sf/anathema/charms/xml/TestDocumentReader.java | a653043f3a646a6d7180a8d8599089fc859b1521 | [] | no_license | anathema/anathema-rcp | a10491b7b3eae5d6cce2c7eb480110f741a86dd4 | 558a47659a96a7065ab703d43740a353b43e96de | refs/heads/master | 2020-02-26T14:50:50.304707 | 2009-10-20T11:12:27 | 2009-10-20T11:12:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 407 | java | package net.sf.anathema.charms.xml;
import net.sf.anathema.lib.xml.DocumentUtilities;
import org.dom4j.Element;
public class TestDocumentReader implements IDocumentReader {
private String xml;
public void setXml(String xml) {
this.xml = xml;
}
@Override
public Element readDocument() throws Exception {
return DocumentUtilities.read(xml).getRootElement();
}
}
| [
"sandra.sieroux@googlemail.com"
] | sandra.sieroux@googlemail.com |
fffc867dd4742f40508314565ea96b7f3dffb167 | 27ae2191c9b3a11899a5f7918fc407f7b180ef81 | /fluentlenium-core/src/main/java/org/fluentlenium/core/inject/NoInject.java | ea41a2ace353c818cc775e2ebe685ca5a9a63bdb | [
"Apache-2.0"
] | permissive | akhileshkumarverma/FluentLenium | bb97ac6a4b8ab17008f997982caa81b23830f322 | a0c872870decf3a8a9d1c3375f8bfe3b8c23c8d7 | refs/heads/master | 2020-04-26T04:15:00.518358 | 2019-01-29T19:28:58 | 2019-01-29T19:28:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 492 | java | package org.fluentlenium.core.inject;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Disable FluentLenium injection for this field.
*/
@Target({METHOD, CONSTRUCTOR, FIELD})
@Retention(RUNTIME)
public @interface NoInject {
}
| [
"toilal.dev@gmail.com"
] | toilal.dev@gmail.com |
1fdfd333f482051c3bf2692c427b3866a14dc32f | 500758261a1272160d864e73fa10dae0f1561987 | /springBootEurekaClient/src/main/java/com/king/service/RestTemplateService.java | c25863efe9d947febc1aca1292fa2ef6638e2c2b | [] | no_license | ls909074489/springCloud | 6df75ef9a5a1b36893523c291fe3bc26cde0836b | 89704415fd85fdbe356c9c6be554718ada208cbf | refs/heads/master | 2021-04-16T16:32:23.063432 | 2020-03-23T09:04:42 | 2020-03-23T09:04:42 | 249,370,298 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 615 | java | package com.king.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
@Service
public class RestTemplateService {
@Autowired
private RestTemplate restTemplate;
@HystrixCommand(fallbackMethod = "hiError")
public String hi() {
return restTemplate.getForObject( "http://SBSERVICES/ping" , String.class );
}
public String hiError() {
return "sorry ,server error";
}
}
| [
"909074489@qq.com"
] | 909074489@qq.com |
4b7c0538bf60aeb5c02d0fb5224473537958314e | a67000deb8efbe45304c6071bba5182fff747d56 | /src/i_poo/q_collections/collections_III_IV_equals_hashCode/Libro.java | 833996d7d33068feed0fa984d84a151b0c395465 | [] | no_license | jorgelfant/javaCourse | c406dce78f3ce1ca4c52eb194cec04830e1ffe2f | 493707bc3f3728e92ae73f264afaed8895a377a1 | refs/heads/master | 2022-12-06T05:59:08.671126 | 2020-09-07T17:48:16 | 2020-09-07T17:48:16 | 254,644,862 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,997 | java | package i_poo.q_collections.collections_III_IV_equals_hashCode;
import java.util.Objects;
public class Libro {
private String titulo;
private String autor;
private int ISBN;
public Libro(String titulo, String autor, int ISBN) {//Constructor
this.titulo = titulo;
this.autor = autor;
this.ISBN = ISBN;
}
//SETTERS AND GETTERS
public void setTitulo(String titulo) {
this.titulo = titulo;
}
public String getTitulo() {
return titulo;
}
public void setAutor(String numeroCuenta) {
this.autor = numeroCuenta;
}
public String getAutor() {
return autor;
}
public void setISBN(int ISBN) {
this.ISBN = ISBN;
}
public int getISBN() {
return ISBN;
}
//METODO
public String getDatos() {
String datos;
datos = "Libro: " + this.titulo + ", Autor: " + this.autor + ", ISBN: " + this.ISBN;
return datos;
}
//******************************************************************************************************************
// equals()
// OTRA MANERA MENOS COMPLEJA Con eclipse o intellij idea (generador)
//// java.util.Objects; trae una manera mas facil de reescribir el codigo equals y hashcode
//******************************************************************************************************************
/*COMO SE TRATA DE OPERACIONES MUY FRECUENTES eclipse o intellij idea ya tienen una opcion para generar esto de manera
automatica o mejor dicho reescribirlo:
*/
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof Libro)) return false;
Libro libro = (Libro) o;
return getISBN() == libro.getISBN() &&
getTitulo().equals(libro.getTitulo()) &&
getAutor().equals(libro.getAutor());
}
//Esto nos ahorra el trabajo, aunque SIEMPRE CONVIENE SABER DE DONDE VIENE
//A la antigua esto hubiera sido asi manualmente:
/*
public boolean equals(Object objeto) {
if (objeto instanceof Libro) {
Libro otro = (Libro) objeto;//asi hacemos el casting ya sabiendo que es un objeto de tipo Libro
//String titulo //necesitamos el objeto para poder comparar atributos
if (this.titulo == null) {
if (otro.getTitulo() != null)
return false;//da false en los 2 casos
} else if (!this.titulo.equals(otro.getTitulo())) {
return false;
}
//String autor
if (this.autor == null) {
if (otro.getAutor() != null)
return false;//da false en los 2 casos
} else if (!this.autor.equals(otro.getAutor())) {
return false;
}
//parametros int 3ro ISBN...en mi ejemplo solo esta comparacion bastaria pa saber si son iguales o no
if (this.ISBN != otro.getISBN()) {//ya que podemos tener 2 libros con el mismo autor y titulo pero no ISBN
return false; //podria ser tb otro.ISBN ya que ahora despues del cast es un objeto Libro
}
return true;//si ninguna de las anteriores se cumple el codigo llegara aqui y dara TRUE, sino se quedara en FALSE
} else {//esto querria decir que el objeto con el que queremos comparar no es de la misma clase asi que false
return false;
}//este else es como decir que sus clases != no son iguales
}
*/
//******************************************************************************************************************
// hashCode()
//******************************************************************************************************************
//Podemos tambien utilizar el codigo hash
//Normalmente
@Override
public int hashCode() {
return Objects.hash(getTitulo(), getAutor(), getISBN());
}//o en vez de los getters las variables
/*A la antigua esto hubiera sido asi manualmente:
public int hashCode() {
//On définit un multiplication impair, de préférence un nombre premier(primo), Ceci afin de garantir l'unicité du résultat final
final int prime = 31;//primo divisible por 1 y 31
//On définit un résultat qui sera renvoyé au final
int result = 1;
//On ajoute en eux la multiplication des attributs et du multiplicateur
result = result * prime + ISBN;
//Lorsque vous devez gérer des hashcodes avec des objets dans le mode de calcul
//Vous devez vérifier si l'objet n'est pas null, sinon vous aurez une erreur
result = result * prime + ((titulo == null) ? 0 : titulo.hashCode());
result = result * prime + ((autor == null) ? 0 : autor.hashCode());
return result; //para dar algo en el else en caso el objeto no es nulo
*/
//PORQUE ECLIPSE NOS PERMITE REESCRIBIR equals, y hashCode()
//Si modificamos el metodo equals() de la clase Object , tambien deberiamos modificar el metodo hashCode()
//ya que estos solo sirven para diferenciar objetos de clases predefinidas, pero no de nuestras propias clases
//los 2 van acompaniados y se deben modificar juntos
}
| [
"jorgel_fant@yahoo.com"
] | jorgel_fant@yahoo.com |
81727542a987c84145c502a3ef4b51669d73cc0a | 9ee116100f7a425059b906448c81b146fcf23767 | /madridColab/view/src/main/java/org/xcolab/view/activityentry/proposal/ProposalVoteSwitchActivityEntry.java | 105a4aa50e9f10439e37b2f8b814ef374881478d | [
"MIT"
] | permissive | UPMitd/MadridColab | 1668a83ae0764a4165c30237983c6939d5399976 | 65e50a29453d77ab67bf18a14031dd3e6305569e | refs/heads/master | 2022-10-10T16:04:17.375488 | 2021-01-18T01:11:16 | 2021-01-18T01:11:16 | 208,265,624 | 0 | 2 | null | 2022-09-16T03:11:16 | 2019-09-13T13:01:18 | Java | UTF-8 | Java | false | false | 938 | java | package org.xcolab.view.activityentry.proposal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.xcolab.util.activities.enums.ActivityType;
import org.xcolab.util.activities.enums.ProposalActivityType;
import org.xcolab.view.i18n.ResourceMessageResolver;
@Component
public class ProposalVoteSwitchActivityEntry extends ProposalBaseActivityEntry {
@Autowired
public ProposalVoteSwitchActivityEntry(ResourceMessageResolver resourceMessageResolver) {
super(resourceMessageResolver);
}
@Override
public ActivityType getActivityType() {
return ProposalActivityType.VOTE_SWITCHED;
}
@Override
public String getBodyTemplate() {
return "activities.proposal.voteswitch.message";
}
@Override
public String getTitleTemplate() {
return "Vote switched";
}
}
| [
"livinglabmadrid@upm.es"
] | livinglabmadrid@upm.es |
4f62791af0ee629476e828c26f165f5bb4d945fc | b6ad1b4c298d4e1e2744d68ede26e3292c6beb5f | /ymate-module-oauth-client/src/main/java/net/ymate/module/oauth/client/impl/DefaultOAuthClientTokenStorageAdapter.java | 6f93e446ec14b2f0119a4af9e0bc0dc2b74fc27a | [
"Apache-2.0"
] | permissive | suninformation/ymate-module-oauth | c1ceceaff5082417a1b468e40785db690e557330 | 39c4b78a30cf4bfbcf438a67bacb149bba40d04b | refs/heads/master | 2021-01-20T06:18:02.809006 | 2019-03-26T06:47:23 | 2019-03-26T06:47:23 | 89,863,304 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,423 | java | /*
* Copyright 2007-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.ymate.module.oauth.client.impl;
import net.ymate.framework.commons.HttpClientHelper;
import net.ymate.framework.commons.IHttpResponse;
import net.ymate.module.oauth.client.IOAuthClientTokenStorageAdapter;
import net.ymate.module.oauth.client.IOAuthClients;
import net.ymate.module.oauth.client.base.OAuthAccessToken;
import net.ymate.module.oauth.client.base.OAuthAccount;
import net.ymate.platform.core.support.ReentrantLockHelper;
import net.ymate.platform.core.util.RuntimeUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantLock;
/**
* @author 刘镇 (suninformation@163.com) on 2018/10/8 上午11:36
* @version 1.0
*/
public class DefaultOAuthClientTokenStorageAdapter implements IOAuthClientTokenStorageAdapter {
private static final Log _LOG = LogFactory.getLog(DefaultOAuthClientTokenStorageAdapter.class);
private static final Map<String, OAuthAccessToken> __TOKEN_CACHES = new ConcurrentHashMap<String, OAuthAccessToken>();
@Override
public void init(IOAuthClients owner) throws Exception {
}
@Override
public void destroy() throws Exception {
}
private OAuthAccessToken __doGetAccessToken(String accountId) throws Exception {
OAuthAccessToken _accessToken = __TOKEN_CACHES.get(accountId);
if (_accessToken == null || _accessToken.isExpired()) {
// TODO 尝试从缓存或数据库中加载
}
return null;
}
private OAuthAccessToken __doGetAccessToken(OAuthAccount account) throws Exception {
Map<String, String> _params = new HashMap<String, String>();
_params.put("grant_type", "client_credentials");
_params.put("client_id", account.getClientId());
_params.put("client_secret", account.getClientSecret());
//
IHttpResponse _response = HttpClientHelper.create().post(account.getServiceUrl(), _params);
if (_response != null) {
OAuthAccessToken.Result _result = new OAuthAccessToken.Result(_response);
if (_result.isOK()) {
saveOrUpdateAccessToken(account, _result);
return _result.getAccessToken();
}
}
return null;
}
@Override
public OAuthAccessToken loadAccessToken(OAuthAccount account) {
OAuthAccessToken _accessToken = __TOKEN_CACHES.get(account.getId());
if (_accessToken == null || _accessToken.isExpired()) {
ReentrantLock _locker = ReentrantLockHelper.DEFAULT.getLocker(account.getId().concat("_token"));
_locker.lock();
try {
_accessToken = __doGetAccessToken(account.getId());
if (_accessToken == null || _accessToken.isExpired()) {
_accessToken = __doGetAccessToken(account);
}
} catch (Exception e) {
try {
_accessToken = __doGetAccessToken(account.getId());
if (_accessToken == null || _accessToken.isExpired()) {
_accessToken = __doGetAccessToken(account);
}
} catch (Exception ex) {
_LOG.warn("Exception when loading access_token: ", RuntimeUtils.unwrapThrow(ex));
}
} finally {
if (_locker.isLocked()) {
_locker.unlock();
}
}
}
return _accessToken;
}
@Override
public void saveOrUpdateAccessToken(OAuthAccount account, OAuthAccessToken.Result accessToken) {
__TOKEN_CACHES.put(account.getId(), accessToken.getAccessToken());
}
}
| [
"suninformation@163.com"
] | suninformation@163.com |
86c29d67e8ac1ad26cb8a0240e67fc80f17b9d17 | 3a5985651d77a31437cfdac25e594087c27e93d6 | /ojc-core/iepse/iepcore/src/com/sun/jbi/engine/iep/core/runtime/operator/impl/mysql/RelationStreamMySql.java | d991d9e2931e6d5fd83270259a6992648ded16e9 | [] | no_license | vitalif/openesb-components | a37d62133d81edb3fdc091abd5c1d72dbe2fc736 | 560910d2a1fdf31879e3d76825edf079f76812c7 | refs/heads/master | 2023-09-04T14:40:55.665415 | 2016-01-25T13:12:22 | 2016-01-25T13:12:33 | 48,222,841 | 0 | 5 | null | null | null | null | UTF-8 | Java | false | false | 3,887 | java | /*
* BEGIN_HEADER - DO NOT EDIT
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* See the License for the specific language governing
* permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* HEADER in each file and include the License file at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* If applicable add the following below this CDDL HEADER,
* with the fields enclosed by brackets "[]" replaced with
* your own identifying information: Portions Copyright
* [year] [name of copyright owner]
*/
/*
* @(#)RelationStreamMySql.java
*
* Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
*
* END_HEADER - DO NOT EDIT
*/
package com.sun.jbi.engine.iep.core.runtime.operator.impl.mysql;
import com.sun.jbi.engine.iep.core.runtime.operator.ColumnMetadata;
import com.sun.jbi.engine.iep.core.runtime.operator.Schema;
import com.sun.jbi.engine.iep.core.runtime.operator.impl.RelationStream;
import com.sun.jbi.engine.iep.core.runtime.operator.impl.RelationStreamDb;
import com.sun.jbi.engine.iep.core.runtime.util.Messages;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.util.logging.Level;
/**
*
* @author Bing Lu
*/
public class RelationStreamMySql implements RelationStreamDb {
private static final Messages mMessages = Messages.getMessages(RelationStreamMySql.class);
private MySqlSpecial mMySqlSpecial;
public RelationStreamMySql(MySqlSpecial mySqlSpecial) {
mMySqlSpecial = mySqlSpecial;
}
public void createStoredProcedures(Connection con) {
}
public void dropStoredProcedures(Connection con) {
}
public PreparedStatement[] createOperateStatements(Connection con, RelationStream op) throws Exception {
String outputTableName = op.getQueueName();
String inputTableName = op.getInputOperatorList().get(0).getQueueName();
Schema inputSchema = op.getInputOperatorList().get(0).getOutputSchema();
StringBuffer sb = new StringBuffer();
sb.append("INSERT INTO ");
sb.append(outputTableName + " (");
for (int i = 0; i < inputSchema.getColumnCount(); i++) {
ColumnMetadata cm = inputSchema.getColumnMetadata(i);
sb.append(cm.getColumnName());
sb.append(",");
}
sb.append(COL_TIMESTAMP);
sb.append(") SELECT ");
for (int i = 0, I = inputSchema.getColumnCount(); i < I; i++) {
ColumnMetadata cm = inputSchema.getColumnMetadata(i);
sb.append("t1.");
sb.append(cm.getColumnName());
sb.append(",");
}
sb.append("t2." + COL_TIMESTAMP + " FROM ");
sb.append(inputTableName + " t1, ");
sb.append("(SELECT DISTINCT " + COL_TIMESTAMP + " FROM " + inputTableName);
sb.append(" WHERE ? < " + COL_TIMESTAMP + " AND " + COL_TIMESTAMP + " <= ?) t2");
sb.append(" WHERE t1." + COL_TAG + " = '+' AND t1." + COL_TIMESTAMP + " <= t2." + COL_TIMESTAMP);
sb.append(" AND NOT EXISTS (SELECT 'x' FROM ");
sb.append(inputTableName);
sb.append(" WHERE " + COL_SEQID + " = t1." + COL_SEQID + " AND " + COL_TIMESTAMP + " <= t2." + COL_TIMESTAMP + " AND " + COL_TAG + " = '-')");
sb.append(" ORDER BY t2." + COL_TIMESTAMP);
String sqlStr = sb.toString();
if (mMessages.isLoggable(Level.FINE)) {
mMessages.log(Level.FINE, "Operator.operateStmt", new Object[]{op.getName(), sqlStr});
}
return new PreparedStatement[]{con.prepareStatement(sqlStr)};
}
}
| [
"bitbucket@bitbucket02.private.bitbucket.org"
] | bitbucket@bitbucket02.private.bitbucket.org |
88a97a2aafe8eaa7062c8b42e830e3ef862f036a | 37992a7083efea148c66381a2e7c988f59de712b | /chit/chit_domain/src/main/java/ru/ppr/chit/domain/ticketcontrol/StoreCompletedTicketControlEventInteractor.java | a6e8f7fdecbe2d78db56414c5aed20aadf3637ed | [] | no_license | RVC3/PTK | 5ab897d6abee1f7f7be3ba49c893b97e719085e9 | 1052b2bfa8f565c96a85d5c5928ed6c938a20543 | refs/heads/master | 2022-12-22T22:11:40.231298 | 2020-07-01T09:45:38 | 2020-07-01T09:45:38 | 259,278,530 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,865 | java | package ru.ppr.chit.domain.ticketcontrol;
import javax.inject.Inject;
import ru.ppr.chit.domain.model.local.TicketBoarding;
import ru.ppr.chit.domain.model.local.TicketControlEvent;
import ru.ppr.chit.domain.repository.local.TicketBoardingRepository;
import ru.ppr.chit.domain.repository.local.TicketControlEventRepository;
import ru.ppr.chit.domain.repository.local.base.LocalDbTransaction;
/**
* @author Aleksandr Brazhkin
*/
public class StoreCompletedTicketControlEventInteractor {
private final LocalDbTransaction localDbTransaction;
private final TicketBoardingRepository ticketBoardingRepository;
private final TicketControlEventRepository ticketControlEventRepository;
@Inject
StoreCompletedTicketControlEventInteractor(LocalDbTransaction localDbTransaction,
TicketBoardingRepository ticketBoardingRepository,
TicketControlEventRepository ticketControlEventRepository) {
this.localDbTransaction = localDbTransaction;
this.ticketBoardingRepository = ticketBoardingRepository;
this.ticketControlEventRepository = ticketControlEventRepository;
}
public void store(TicketControlEvent ticketControlEvent) {
try {
localDbTransaction.begin();
// Обновляем в БД информацию о посадке пассажира
TicketBoarding ticketBoarding = ticketControlEvent.getTicketBoarding(ticketBoardingRepository);
ticketBoardingRepository.update(ticketBoarding);
// Обновляем в БД событие контроля
ticketControlEventRepository.update(ticketControlEvent);
localDbTransaction.commit();
} finally {
localDbTransaction.end();
}
}
}
| [
"kopanevartem@mail.ru"
] | kopanevartem@mail.ru |
3731ffa5a17418c29eb16509215455299c168e28 | 182d0f4acc532472514c1a5f292436866145726a | /src/com/shangde/edu/cou/domain/CouFreeGive.java | 2af8fff91ae6ded60c939c5a4f42c50ba3e2356c | [] | no_license | fairyhawk/sedu_admin-Deprecated | 1c018f17381cd195a1370955b010b3278d893309 | eb3d22edc44b2c940942d16ffe2b4b7e41eddbfb | refs/heads/master | 2021-01-17T07:08:44.802635 | 2014-01-25T10:28:03 | 2014-01-25T10:28:03 | 8,679,677 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,873 | java | package com.shangde.edu.cou.domain;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.apache.struts2.json.annotations.JSON;
import com.shangde.edu.cou.dto.CourseIsAuditionDTO;
import com.shangde.edu.exam.domain.Exampaper;
import com.shangde.edu.res.domain.Vedio;
import com.shangde.edu.sys.domain.Grade;
import com.shangde.edu.sys.domain.Subject;
/**
* 免费赠送表
* @author fanxin
*/
public class CouFreeGive implements Serializable{
/**
* ID
*/
private int Id;
/**
* 后台管理员 (谁开通的)
*/
private String userName;
/**
* 用户ID (给谁开通)
*/
private int cusId;
/**
* 订单号 (所属订单号)
*/
private String ctId;
/**
* 创建时间 (开通时间)
*/
private java.util.Date createTime;
private String email;
private String crInfo;
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getCrInfo() {
return crInfo;
}
public void setCrInfo(String crInfo) {
this.crInfo = crInfo;
}
public int getId() {
return Id;
}
public void setId(int id) {
Id = id;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public int getCusId() {
return cusId;
}
public void setCusId(int cusId) {
this.cusId = cusId;
}
public String getCtId() {
return ctId;
}
public void setCtId(String ctId) {
this.ctId = ctId;
}
public java.util.Date getCreateTime() {
return createTime;
}
public void setCreateTime(java.util.Date createTime) {
this.createTime = createTime;
}
}
| [
"bis@foxmail.com"
] | bis@foxmail.com |
795ce672167c2d2064c6ff16b88e8e9bde43f0cd | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/jdbi/testing/864/DefaultMethodHandlerFactory.java | ae6ba77c1e204c0dd5a20c2944620ee30b9c42d1 | [] | no_license | ASSERT-KTH/synthetic-checkstyle-error-dataset | 40e8d1e0a7ebe7f7711def96a390891a6922f7bd | 40c057e1669584bfc6fecf789b5b2854660222f3 | refs/heads/master | 2023-03-18T12:50:55.410343 | 2019-01-25T09:54:39 | 2019-01-25T09:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,696 | 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.jdbi.v3.sqlobject;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
import java.util.Optional;
import java.util.stream.Stream;
import org.jdbi.v3.sqlobject.customizer.SqlStatementCustomizingAnnotation;
class DefaultMethodHandlerFactory implements HandlerFactory {
@Override
public Optional<Handler> buildHandler(Class<?> sqlObjectType, Method method) {
if (!method.isDefault()) {
return Optional.empty();
}
Stream.of(method.getAnnotations())
.map(Annotation::annotationType)
.filter(type -> type.isAnnotationPresent(SqlStatementCustomizingAnnotation.class))
.findFirst()
.ifPresent(type -> {
throw new IllegalStateException(String.format(
"Default method %s.%s has @%s annotation. Statement customizing annotations don't "
+ "work on default methods.",
sqlObjectType.getSimpleName(),
method.getName(),
type.getSimpleName()));
});
for (Parameter parameter : method.getParameters()) {
Stream.of(parameter.getAnnotations())
.map(Annotation::annotationType)
.filter(type -> type.isAnnotationPresent(SqlStatementCustomizingAnnotation.class))
.findFirst()
.ifPresent(type -> {
throw new IllegalStateException(String.format(
"Default method %s.%s parameter %s has @%s annotation. Statement customizing "
+ "annotations don't work on default methods.",
sqlObjectType.getSimpleName(),
method.getName() ,
parameter.getName(),
type.getSimpleName()));
});
}
return Optional.of(new DefaultMethodHandler(method));
}
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
71b042e2f411fd2a3eabc711fc12ee356de5a113 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/35/35_dce2ab0e6f3ac8ab44cf5367eed61b42ee36d1c3/ProxyLaunchMessages/35_dce2ab0e6f3ac8ab44cf5367eed61b42ee36d1c3_ProxyLaunchMessages_s.java | 2655f935966cd4d2b29391bbc07a72832f0281a2 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 2,210 | java | /*******************************************************************************
* Copyright (c) 2012 IBM Corporation
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.linuxtools.profiling.launch;
import org.eclipse.osgi.util.NLS;
public class ProxyLaunchMessages extends NLS {
public ProxyLaunchMessages() {
}
public static String connection_of_copy_from_exe_cannot_be_opened;
public static String uri_of_copy_from_exe_is_invalid;
public static String copy_from_exe_is_not_specified;
public static String copy_from_exe_does_not_exist;
public static String error_accessing_copy_from_exe;
public static String copy_from_exe_does_not_have_execution_rights;
public static String scheme_error_in_copy_from_exe;
public static String connection_of_executable_cannot_be_opened;
public static String uri_of_executable_is_invalid;
public static String executable_is_not_specified;
public static String executable_does_not_exist;
public static String error_accessing_executable;
public static String executable_does_not_have_execution_rights;
public static String scheme_error_in_executable;
public static String connection_of_working_directory_cannot_be_opened;
public static String uri_of_working_directory_is_invalid;
public static String working_directory_does_not_exist;
public static String error_accessing_working_directory;
public static String working_directory_is_not_a_directory;
public static String scheme_error_in_working_directory;
public static String scheme_of_working_directory_and_program_do_not_match;
public static String connection_of_working_directory_and_program_do_not_match;
static {
// Load message values from bundle file
NLS.initializeMessages(ProxyLaunchMessages.class.getCanonicalName(),
ProxyLaunchMessages.class);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
afcf783bbe51150b1df1fce42476cb904ce10209 | 8bbeb7b5721a9dbf40caa47a96e6961ceabb0128 | /java/299.Bulls and Cows(猜数字游戏).java | 4a316e68f6829fe51651c43c529ba7687852885b | [
"MIT"
] | permissive | lishulongVI/leetcode | bb5b75642f69dfaec0c2ee3e06369c715125b1ba | 6731e128be0fd3c0bdfe885c1a409ac54b929597 | refs/heads/master | 2020-03-23T22:17:40.335970 | 2018-07-23T14:46:06 | 2018-07-23T14:46:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,790 | java | /**
<p>You are playing the following <a href="https://en.wikipedia.org/wiki/Bulls_and_Cows" target="_blank">Bulls and Cows</a> game with your friend: You write down a number and ask your friend to guess what the number is. Each time your friend makes a guess, you provide a hint that indicates how many digits in said guess match your secret number exactly in both digit and position (called "bulls") and how many digits match the secret number but locate in the wrong position (called "cows"). Your friend will use successive guesses and hints to eventually derive the secret number.</p>
<p>Write a function to return a hint according to the secret number and friend's guess, use <code>A</code> to indicate the bulls and <code>B</code> to indicate the cows. </p>
<p>Please note that both secret number and friend's guess may contain duplicate digits.</p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input:</strong> secret = "1807", guess = "7810"
<strong>Output:</strong> "1A3B"
<strong>Explanation:</strong> <code>1</code><span style="font-family: sans-serif, Arial, Verdana, "Trebuchet MS";"> bull and </span><code>3</code><span style="font-family: sans-serif, Arial, Verdana, "Trebuchet MS";"> cows. The bull is </span><code>8</code><span style="font-family: sans-serif, Arial, Verdana, "Trebuchet MS";">, the cows are </span><code>0</code><span style="font-family: sans-serif, Arial, Verdana, "Trebuchet MS";">, </span><code>1</code><span style="font-family: sans-serif, Arial, Verdana, "Trebuchet MS";"> and </span><code>7<font face="sans-serif, Arial, Verdana, Trebuchet MS">.</font></code></pre>
<p><strong>Example 2:</strong></p>
<pre>
<strong>Input:</strong> secret = "1123", guess = "0111"
<strong>Output:</strong> "1A1B"
<strong>Explanation: </strong>The 1st <code>1 </code><span style="font-family: sans-serif, Arial, Verdana, "Trebuchet MS";">in friend's guess is a bull, the 2nd or 3rd </span><code>1</code><span style="font-family: sans-serif, Arial, Verdana, "Trebuchet MS";"> is a cow</span><span style="font-family: sans-serif, Arial, Verdana, "Trebuchet MS";">.</span></pre>
<p><strong>Note: </strong>You may assume that the secret number and your friend's guess only contain digits, and their lengths are always equal.</p><p>你正在和你的朋友玩 <a href="https://baike.baidu.com/item/%E7%8C%9C%E6%95%B0%E5%AD%97/83200?fromtitle=Bulls+and+Cows&fromid=12003488&fr=aladdin" target="_blank">猜数字(Bulls and Cows)</a>游戏:你写下一个数字让你的朋友猜。每次他猜测后,你给他一个提示,告诉他有多少位数字和确切位置都猜对了(称为“Bulls”, 公牛),有多少位数字猜对了但是位置不对(称为“Cows”, 奶牛)。你的朋友将会根据提示继续猜,直到猜出秘密数字。</p>
<p>请写出一个根据秘密数字和朋友的猜测数返回提示的函数,用 <code>A</code> 表示公牛,用 <code>B</code> 表示奶牛。</p>
<p>请注意秘密数字和朋友的猜测数都可能含有重复数字。</p>
<p><strong>示例 1:</strong></p>
<pre><strong>输入:</strong> secret = "1807", guess = "7810"
<strong>输出:</strong> "1A3B"
<strong>解释:</strong> <code>1</code> 公牛和 <code>3</code> 奶牛。公牛是 <code>8</code>,奶牛是 <code>0</code>, <code>1</code> 和 <code>7</code>。</pre>
<p><strong>示例 2:</strong></p>
<pre><strong>输入:</strong> secret = "1123", guess = "0111"
<strong>输出:</strong> "1A1B"
<strong>解释: </strong>朋友猜测数中的第一个 <code>1</code> 是公牛,第二个或第三个 <code>1</code> 可被视为奶牛。</pre>
<p><strong>说明: </strong>你可以假设秘密数字和朋友的猜测数都只包含数字,并且它们的长度永远相等。</p>
<p>你正在和你的朋友玩 <a href="https://baike.baidu.com/item/%E7%8C%9C%E6%95%B0%E5%AD%97/83200?fromtitle=Bulls+and+Cows&fromid=12003488&fr=aladdin" target="_blank">猜数字(Bulls and Cows)</a>游戏:你写下一个数字让你的朋友猜。每次他猜测后,你给他一个提示,告诉他有多少位数字和确切位置都猜对了(称为“Bulls”, 公牛),有多少位数字猜对了但是位置不对(称为“Cows”, 奶牛)。你的朋友将会根据提示继续猜,直到猜出秘密数字。</p>
<p>请写出一个根据秘密数字和朋友的猜测数返回提示的函数,用 <code>A</code> 表示公牛,用 <code>B</code> 表示奶牛。</p>
<p>请注意秘密数字和朋友的猜测数都可能含有重复数字。</p>
<p><strong>示例 1:</strong></p>
<pre><strong>输入:</strong> secret = "1807", guess = "7810"
<strong>输出:</strong> "1A3B"
<strong>解释:</strong> <code>1</code> 公牛和 <code>3</code> 奶牛。公牛是 <code>8</code>,奶牛是 <code>0</code>, <code>1</code> 和 <code>7</code>。</pre>
<p><strong>示例 2:</strong></p>
<pre><strong>输入:</strong> secret = "1123", guess = "0111"
<strong>输出:</strong> "1A1B"
<strong>解释: </strong>朋友猜测数中的第一个 <code>1</code> 是公牛,第二个或第三个 <code>1</code> 可被视为奶牛。</pre>
<p><strong>说明: </strong>你可以假设秘密数字和朋友的猜测数都只包含数字,并且它们的长度永远相等。</p>
**/
class Solution {
public String getHint(String secret, String guess) {
}
} | [
"lishulong@wecash.net"
] | lishulong@wecash.net |
12eeecac26c8130c2deb8e5727afde48a53e7ff1 | f1368208c65f620a071ecd3b9f69b6a4203fb051 | /src/main/java/com/github/fabriciofx/cactoos/jdbc/rset/ResultSetAsRows.java | 292b6ceaf29974dbb7204f559e9b66aaa077f833 | [
"MIT"
] | permissive | teyyub/cactoos-jdbc | b5647d146eb45e2b423388b8ddc14af0a29da4d1 | c3f8aee99f5669d825e7bf7584ae292f09b34061 | refs/heads/master | 2020-04-04T01:06:22.671113 | 2018-10-31T16:54:06 | 2018-10-31T16:54:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,969 | java | /*
* The MIT License (MIT)
*
* Copyright (C) 2018 Fabrício Barros Cabral
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.github.fabriciofx.cactoos.jdbc.rset;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import org.cactoos.Scalar;
import org.cactoos.scalar.StickyScalar;
/**
* Rows as ResultSet.
*
* @since 0.1
*/
@SuppressWarnings("PMD.AvoidCatchingGenericException")
public final class ResultSetAsRows implements Iterable<Map<String, Object>> {
/**
* Rows.
*/
private final Scalar<List<Map<String, Object>>> rows;
/**
* Ctor.
* @param rst A ResultSet
*/
public ResultSetAsRows(final ResultSet rst) {
this.rows = new StickyScalar<>(
() -> {
final List<Map<String, Object>> rws = new LinkedList<>();
final ResultSetMetaData rsmd = rst.getMetaData();
final int cols = rsmd.getColumnCount();
while (rst.next()) {
final Map<String, Object> fields = new LinkedHashMap<>();
for (int idx = 1; idx <= cols; ++idx) {
final String name = rsmd.getColumnName(idx)
.toLowerCase(Locale.ENGLISH);
final Object data = rst.getObject(idx);
fields.put(name, data);
}
rws.add(fields);
}
return rws;
}
);
}
@Override
public Iterator<Map<String, Object>> iterator() {
try {
return this.rows.value().iterator();
// @checkstyle IllegalCatchCheck (1 line)
} catch (final Exception ex) {
throw new IllegalStateException(ex);
}
}
}
| [
"fabriciofx@gmail.com"
] | fabriciofx@gmail.com |
e78898f5aa5b83602204f108b283762a9d5397cc | d4b743c052eb37b31bb91bc79e9827346a0e0087 | /app/src/main/java/com/huiyin/ui/show/view/ShareDialog.java | 11bc24d2bd669cdd0b47b52debadae01ff5d8e9b | [] | no_license | whywuzeng/huiyinlehu_app | 3715ca4cd77c09c4518fcf909df2e197a203d22e | b0e1abf792dcab890f28fb2e729f8c466d21d9ec | refs/heads/master | 2021-01-19T10:09:06.022302 | 2017-02-17T09:04:54 | 2017-02-17T09:04:54 | 82,164,535 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 781 | java | package com.huiyin.ui.show.view;
import com.huiyin.R;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.Window;
public class ShareDialog extends Dialog{
Context context;
public ShareDialog(Context context) {
super(context);
// TODO Auto-generated constructor stub
this.context = context;
}
public ShareDialog(Context context, int theme){
super(context, theme);
this.context = context;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
this.setContentView(R.layout.share_dialog);
}
}
| [
"jiushiqiangone@sina.com"
] | jiushiqiangone@sina.com |
90ea4492cb96f9cb0c9b45afcd948022ed79fc58 | 43ca534032faa722e206f4585f3075e8dd43de6c | /src/ch/boye/httpclientandroidlib/client/HttpClient.java | 26d2789631ee4c81c870a758886b77310a141dc3 | [] | no_license | dnoise/IG-6.9.1-decompiled | 3e87ba382a60ba995e582fc50278a31505109684 | 316612d5e1bfd4a74cee47da9063a38e9d50af68 | refs/heads/master | 2021-01-15T12:42:37.833988 | 2014-10-29T13:17:01 | 2014-10-29T13:17:01 | 26,952,948 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,712 | 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 ch.boye.httpclientandroidlib.client;
import ch.boye.httpclientandroidlib.HttpHost;
import ch.boye.httpclientandroidlib.HttpRequest;
import ch.boye.httpclientandroidlib.HttpResponse;
import ch.boye.httpclientandroidlib.client.methods.HttpUriRequest;
import ch.boye.httpclientandroidlib.conn.ClientConnectionManager;
import ch.boye.httpclientandroidlib.params.HttpParams;
import ch.boye.httpclientandroidlib.protocol.HttpContext;
// Referenced classes of package ch.boye.httpclientandroidlib.client:
// ResponseHandler
public interface HttpClient
{
public abstract HttpResponse execute(HttpHost httphost, HttpRequest httprequest);
public abstract HttpResponse execute(HttpHost httphost, HttpRequest httprequest, HttpContext httpcontext);
public abstract HttpResponse execute(HttpUriRequest httpurirequest);
public abstract HttpResponse execute(HttpUriRequest httpurirequest, HttpContext httpcontext);
public abstract Object execute(HttpHost httphost, HttpRequest httprequest, ResponseHandler responsehandler);
public abstract Object execute(HttpHost httphost, HttpRequest httprequest, ResponseHandler responsehandler, HttpContext httpcontext);
public abstract Object execute(HttpUriRequest httpurirequest, ResponseHandler responsehandler);
public abstract Object execute(HttpUriRequest httpurirequest, ResponseHandler responsehandler, HttpContext httpcontext);
public abstract ClientConnectionManager getConnectionManager();
public abstract HttpParams getParams();
}
| [
"leo.sjoberg@gmail.com"
] | leo.sjoberg@gmail.com |
ca6ad3f5c45bd707a763012529a1b17c14e82898 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/9/9_89cf90537524963aa09e662ccbf0c2eca085fec2/RedstoneNetwork/9_89cf90537524963aa09e662ccbf0c2eca085fec2_RedstoneNetwork_s.java | cc0486e49cd9f8f53a54e8d4985b9a6a688e9417 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 6,064 | java | package powercrystals.minefactoryreloaded.tile;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import powercrystals.core.position.BlockPosition;
import powercrystals.minefactoryreloaded.MineFactoryReloadedCore;
public class RedstoneNetwork
{
private static int _nextId = 0;
private static boolean _ignoreUpdates;
private int _id;
private boolean _invalid;
private Map<Integer, List<BlockPosition>> _nodes = new HashMap<Integer, List<BlockPosition>>();
private Map<Integer, List<BlockPosition>> _poweringNodes = new HashMap<Integer, List<BlockPosition>>();
private List<BlockPosition> _cables = new LinkedList<BlockPosition>();
private int[] _powerLevelOutput = new int[16];
private World _world;
public RedstoneNetwork(World world)
{
_world = world;
_id = _nextId;
_nextId++;
for(int i = 0; i < 16; i++)
{
_nodes.put(i, new LinkedList<BlockPosition>());
_poweringNodes.put(i, new LinkedList<BlockPosition>());
}
}
public void setInvalid()
{
_invalid = true;
}
public boolean isInvalid()
{
return _invalid;
}
public int getPowerLevelOutput(int subnet)
{
return _powerLevelOutput[subnet];
}
public int getId()
{
return _id;
}
public void addNode(BlockPosition node, int subnet)
{
if(!_nodes.get(subnet).contains(node))
{
//System.out.println("Network with ID " + _id + ":" + subnet + " adding node " + node.toString());
for(int i = 0; i < 16; i++)
{
if(i != subnet)
{
removeNode(node, i);
}
}
_nodes.get(subnet).add(node);
notifyNode(node);
//System.out.println("Network with ID " + _id + ":" + subnet + " now has " + _nodes.size() + " nodes");
}
}
public void removeNode(BlockPosition node, int subnet)
{
if(_nodes.get(subnet).contains(node))
{
//System.out.println("Network with ID " + _id + ":" + subnet + " removing node " + node.toString());
removePoweringNode(node, subnet);
_nodes.get(subnet).remove(node);
//System.out.println("Network with ID " + _id + ":" + subnet + " now has " + _nodes.size() + " nodes");
}
}
public void addCable(BlockPosition cable)
{
if(!_cables.contains(cable))
{
//System.out.println("Network with ID " + _id + " adding cable " + cable.toString());
_cables.add(cable);
//System.out.println("Network with ID " + _id + " now has " + _cables.size() + " cables");
}
}
public void addPoweringNode(BlockPosition node, int subnet)
{
if(!_poweringNodes.get(subnet).contains(node))
{
for(int i = 0; i < 16; i++)
{
if(i != subnet)
{
removePoweringNode(node, i);
}
}
//System.out.println("Network with ID " + _id + ":" + subnet + " adding powering node " + node.toString());
_poweringNodes.get(subnet).add(node);
updatePowerLevels();
//System.out.println("Network with ID " + _id + ":" + subnet + " now has " + _poweringNodes.size() + " powering nodes");
}
}
public void removePoweringNode(BlockPosition node, int subnet)
{
if(_poweringNodes.get(subnet).contains(node))
{
//System.out.println("Network with ID " + _id + ":" + subnet + " removing powering node " + node.toString());
_poweringNodes.get(subnet).remove(node);
updatePowerLevels();
//System.out.println("Network with ID " + _id + ":" + subnet + " now has " + _poweringNodes.size() + " powering nodes");
}
}
public void mergeNetwork(RedstoneNetwork network)
{
if(_invalid)
{
return;
}
//System.out.println("Network with ID " + _id + " merging with network " + network._id);
network.setInvalid();
for(int subnet = 0; subnet < 16; subnet++)
{
for(BlockPosition node : network._nodes.get(subnet))
{
_nodes.get(subnet).add(node);
}
for(BlockPosition poweringNode : network._poweringNodes.get(subnet))
{
_poweringNodes.get(subnet).add(poweringNode);
}
}
for(BlockPosition cable : network._cables)
{
_cables.add(cable);
TileEntity te = cable.getTileEntity(_world);
if(te != null && te instanceof TileRedstoneCable)
{
((TileRedstoneCable)te).setNetwork(this);
}
}
updatePowerLevels();
for(int subnet = 0; subnet < 16; subnet++)
{
notifyNodes(subnet);
}
}
private void updatePowerLevels()
{
for(int subnet = 0; subnet < 16; subnet++)
{
int lastPowerLevel = _powerLevelOutput[subnet];
_powerLevelOutput[subnet] = 0;
for(BlockPosition node : _poweringNodes.get(subnet))
{
_powerLevelOutput[subnet] = Math.max(_powerLevelOutput[subnet], _world.isBlockProvidingPowerTo(node.x, node.y, node.z, node.orientation.ordinal()) - 1);
_powerLevelOutput[subnet] = Math.max(_powerLevelOutput[subnet], _world.getIndirectPowerLevelTo(node.x, node.y, node.z, node.orientation.ordinal()) - 1);
}
if(_powerLevelOutput[subnet] != lastPowerLevel)
{
//System.out.println("Network with ID " + _id + ":" + subnet + " recalculated power levels as: output: " + _powerLevelOutput[subnet]);
notifyNodes(subnet);
}
}
}
private void notifyNodes(int subnet)
{
if(_ignoreUpdates)
{
return;
}
_ignoreUpdates = true;
for(int i = 0; i < _nodes.get(subnet).size(); i++)
{
BlockPosition bp = _nodes.get(subnet).get(i);
if(_world.getBlockId(bp.x, bp.y, bp.z) != MineFactoryReloadedCore.redstoneCableBlock.blockID)
{
//System.out.println("Network with ID " + _id + " notifying node " + bp.toString() + " of power state change to " + getPowerLevelOutput());
notifyNode(bp);
}
}
_ignoreUpdates = false;
}
private void notifyNode(BlockPosition node)
{
if(_world.getChunkProvider().chunkExists(node.x >> 4, node.z >> 4))
{
_world.notifyBlockOfNeighborChange(node.x, node.y, node.z, MineFactoryReloadedCore.redstoneCableBlock.blockID);
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
6b9d12c2b340c0abf5701e0e2912c250fe648055 | e6e964e63ec30203e11eed3b8ca310954bb73a7a | /examples/greeting-service/src/main/java/greeting/example/GreetingController.java | d415d7434e614642ca5717de20272d547649abcf | [
"Apache-2.0"
] | permissive | zyro23/micronaut-spring | 0b5ea38e99b3b37e082393cd19d6a2232768e7aa | ecce3cd84efe7f149d79c628aab5b0db9cc9d279 | refs/heads/master | 2021-05-19T04:13:19.243978 | 2020-03-27T10:12:09 | 2020-03-27T10:12:09 | 251,523,667 | 0 | 0 | Apache-2.0 | 2020-03-31T06:53:08 | 2020-03-31T06:53:08 | null | UTF-8 | Java | false | false | 1,774 | java | package greeting.example;
import io.swagger.v3.oas.annotations.Hidden;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.ui.Model;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.Pattern;
@RestController
public class GreetingController {
private final GreetingService greetingService;
public GreetingController(GreetingService greetingService) {
this.greetingService = greetingService;
}
@GetMapping("/greeting")
public Greeting greeting(@RequestParam(value="name", defaultValue="World") @Pattern(regexp = "\\D+") String name) {
return greetingService.greeting(name);
}
@PostMapping("/greeting")
public Greeting greetingByPost(@RequestBody Greeting greeting) {
return greetingService.greeting(greeting.getContent());
}
@DeleteMapping("/greeting")
@Hidden
public ResponseEntity<?> deleteGreeting() {
MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
headers.add("Foo", "Bar");
return new ResponseEntity<>(headers, HttpStatus.NO_CONTENT);
}
@GetMapping("/greeting-status")
@ResponseStatus(code = HttpStatus.CREATED)
public Greeting greetingWithStatus(@RequestParam(value="name", defaultValue="World") @Pattern(regexp = "\\D+") String name) {
return greetingService.greeting(name);
}
@GetMapping(path = "/", produces = "text/html")
public String home(Model model) {
model.addAttribute(
"message",
"Welcome to Micronaut for Spring");
return "home";
}
} | [
"graeme.rocher@gmail.com"
] | graeme.rocher@gmail.com |
71e43fc62c39ac0fb65d7344c534019971818fe3 | 563e8db7dba0131fb362d8fb77a852cae8ff4485 | /Blagosfera/core/src/main/java/ru/radom/kabinet/document/model/DocumentFolderEntity.java | 5ef87b77ee9a97f0b249bfd3b7447a8ff0022284 | [] | no_license | askor2005/blagosfera | 13bd28dcaab70f6c7d6623f8408384bdf337fd21 | c6cf8f1f7094ac7ccae3220ad6518343515231d0 | refs/heads/master | 2021-01-17T18:05:08.934188 | 2016-10-14T16:53:38 | 2016-10-14T16:53:48 | 70,894,701 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,231 | java | package ru.radom.kabinet.document.model;
import org.hibernate.annotations.Type;
import ru.askor.blagosfera.domain.document.Document;
import ru.askor.blagosfera.domain.document.DocumentFolder;
import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;
/**
* Created by Maxim Nikitin on 28.03.2016.
*/
@Entity
@Table(name = "document_folder")
public class DocumentFolderEntity {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "document_folder_id_generator")
@SequenceGenerator(name = "document_folder_id_generator", sequenceName = "document_folder_id", allocationSize = 1)
@Column(name = "id")
private Long id;
@Column(name = "name", nullable = false)
@Type(type="text")
private String name;
@Column(name = "description")
@Type(type="text")
private String description;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "folder")
private Set<DocumentEntity> documents = new HashSet<>();
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="parent_folder_id")
public DocumentFolderEntity parentFolder;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "parentFolder")
public Set<DocumentFolderEntity> subFolders = new HashSet<>();
public DocumentFolderEntity() {
}
public DocumentFolder toDomain(boolean withDocuments, boolean withParticipants) {
DocumentFolder documentFolder = new DocumentFolder();
documentFolder.setId(getId());
documentFolder.setName(getName());
documentFolder.setDescription(getDescription());
if (withDocuments && (getDocuments().size() > 0)) {
Set<Document> documentsList = new HashSet<>();
for (DocumentEntity document : getDocuments()) {
documentsList.add(document.toDomain(withParticipants, null));
}
documentFolder.setDocuments(documentsList);
}
return documentFolder;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof DocumentFolderEntity)) return false;
DocumentFolderEntity that = (DocumentFolderEntity) o;
//return !(getId() != null ? !getId().equals(that.getId()) : that.getId() != null);
return (getId() != null) && getId().equals(that.getId());
}
@Override
public int hashCode() {
return getId() != null ? getId().hashCode() : 0;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Set<DocumentEntity> getDocuments() {
return documents;
}
public DocumentFolderEntity getParentFolder() {
return parentFolder;
}
public void setParentFolder(DocumentFolderEntity parentFolder) {
this.parentFolder = parentFolder;
}
public Set<DocumentFolderEntity> getSubFolders() {
return subFolders;
}
}
| [
"askor2005@yandex.ru"
] | askor2005@yandex.ru |
99d43ef15cb23659b559bece244302a9f053bda1 | efb9475381a9723fff13e029ec7e312a721dd52f | /letu_bike_service_cms/src/main/java/org/service/cms/read/BikeRentInfoServiceRead.java | dc898f5b82164fe74a89dbaa8b8e2b2801979292 | [] | no_license | hanqiaosheng/letu-web-html | 2f76ec8d5a08e3bbfd566a006650ff1ead79247e | 0e6dae22b681ea46620fa260bc7a7919b75ba745 | refs/heads/master | 2021-09-09T19:34:43.132011 | 2018-03-19T08:50:30 | 2018-03-19T08:50:30 | 125,819,631 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,048 | java | package org.service.cms.read;
import java.util.Date;
import java.util.List;
import org.entity.dto.BikeRentInfo;
public interface BikeRentInfoServiceRead {
/**
* 查询所有车辆租赁记录
*
* @return
* @throws Exception
*/
public List<BikeRentInfo> findAllBikeRentInfo(Integer pageIndex,List<Long> channelIds, Long bikeId, Long bikerentId, String userPhone,
Date rentFromTime,Date rentTotime,Date returnFromTime,
Date returnTotime, Long rentStartFixedId,Long rentEndFixedId,Long channelid) throws Exception;
/**
* 所有租赁记录数量
*
* @param bikeId
* @param bikerentId
* @param
* @param
* @param
* @return
* @throws Exception
*/
public Integer countAllBikeRentInfo(List<Long> channelIds,Long bikeId, Long bikerentId, String userPhone, Date rentFromTime,Date rentTotime,Date returnFromTime,
Date returnTotime, Long rentStartFixedId,Long rentEndFixedId,Long channelid) throws Exception;
/**
* 根据id查询租赁信息
*
* @param bikeRentId
* @return
* @throws Exception
*/
public BikeRentInfo findBikeRentInfoById(Long bikeRentId) throws Exception;
/**
* 根据车辆编号id查询租赁信息
*
* @param
* @return
* @throws Exception
*/
public List<BikeRentInfo> findBikeRentInfoByBikeId(Long bikeId) throws Exception;
/**
* 租赁订单列表
* @param
*
* @param pageSize
* @param pageIndex
* @param userTel
* @param rentInfoId
* @param
* @param rentState
* @param rentTime
* @param returnTime
* @param
* @param
* @return
* @throws Exception
*/
public List<BikeRentInfo> findAllBikeRentInfos(List<Long> channelIds, Integer pageIndex, Integer pageSize, String userTel, Long rentInfoId,
String bikeCode, Integer rentState, Date rentTime, Date rentTime2,Date returnTime,Date returnTime2, Long rentStartFixedId,Long rentEndFixedId,Long channelid,Integer flag) throws Exception;
public Integer findAllBikeInfoCount(List<Long> channelIds,String userTel,Long rentInfoId, String bikeCode, Integer rentState, Date rentTime,Date rentTime2, Date returnTime,Date returnTime2, Long rentStartFixedId,Long rentEndFixedId,Long channelid)
throws Exception;
/**
* 查询用户的租赁记录
* @param bikeRentInfo
* @param pageIndex
* @param pageSize
* @return
* @throws Exception
*/
public List<BikeRentInfo> findUserBikeRentinfo(BikeRentInfo bikeRentInfo,Integer pageIndex, Integer pageSize) throws Exception;
/**
* 查询用户的租赁记录条数
* @param bikeRentInfo
* @return
* @throws Exception
*/
public Integer findUserBikeRentinfoCount(BikeRentInfo bikeRentInfo) throws Exception;
/**
* 租赁信息流水查询
* @return
* @throws Exception
*/
public List<BikeRentInfo> findBikeRentInfos(Long channelId,Integer pageIndex,Date returnFromTime,Date returnTotime,Integer moneyNum,List<Long> channels) throws Exception;
public Integer countBikeRentInfos(Long channelId,Date returnFromTime,Date returnTotime,Integer moneyNum,List<Long> channels) throws Exception;
/**
* 根据车辆id查他的租赁记录
* @param bikeId
* @return
* @throws Exception
*/
public List<BikeRentInfo> findByBikeId(Long bikeId,Integer pageIndex,Integer page_size_weixin) throws Exception;
/**
* 根据车id查行程条数
* @param
* @return
* @throws Exception
*/
public Integer findCountByBikeId(Long bikeId) throws Exception;
/**
* 查询会员的租赁记录
* @param bikeRentInfo
* @param pageIndex
* @param pageSize
* @return
* @throws Exception
*/
public List<BikeRentInfo> findVipUserBikeRentinfo(BikeRentInfo bikeRentInfo,Integer pageIndex, Integer pageSize) throws Exception;
/**
* 查询会员的租赁记录条数
* @param bikeRentInfo
* @return
* @throws Exception
*/
public Integer findVipUserBikeRentinfoCount(BikeRentInfo bikeRentInfo) throws Exception;
/**
* 查询订单状态未完成的订单
* @return
* @throws Exception
*/
public List<BikeRentInfo> findNotRent() throws Exception;
/**
* 通过发票Id查询订单
* @param invoiceId
* @return
* @throws Exception
*/
public List<BikeRentInfo> findByInvoiceId(Long invoiceId,Integer pageIndex, Integer pageSize) throws Exception;
public Integer findfindByInvoiceIdCount(Long invoiceId,Integer pageIndex, Integer pageSize) throws Exception;
/**
* 查询用户是否有未完成租赁订单
*/
public BikeRentInfo findNotFinishByUserId(Long userId) throws Exception;
/**
* 批量查询用户租赁订单
*/
public List<BikeRentInfo> findByUserIdsAndState(List<Long> userIds, int state) throws Exception;
/**
* 查询用户最近的租赁情况
* @param userId
* @return
* @throws Exception
*/
public BikeRentInfo findByUserId(Long userId,String phone,String idCard,String name) throws Exception;
/**
* 查询该团中某用户的租赁记录
* @param userId
* @return
* @throws Exception
*/
public List<BikeRentInfo> findByUserIdAndGroupId(Long userId,Long groupId) throws Exception;
}
| [
"896965531@qq.com"
] | 896965531@qq.com |
0c91510ea96a7786aab1ea413b4394f938dad010 | c0b5c5431ec6905793ff762e39894ace49c422b5 | /ripple-bouncycastle/src/main/java/org/ripple/bouncycastle/math/ec/WTauNafPreCompInfo.java | a6a92abfa3fa8668c503d58d9c6a3988e3a65b57 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | dzcoin/DzCoinClient | 05bcb5d59bcfc7aa4d284ca518c99fa84b05e4bd | c5ecf6e76f39863d70d73260b75e23a91e984b75 | refs/heads/master | 2021-01-20T20:39:05.850228 | 2016-08-14T17:11:00 | 2016-08-14T17:11:00 | 65,677,585 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,278 | java | package org.ripple.bouncycastle.math.ec;
/**
* class holding precomputation data for the wtnaf (window
* <code>τ</code>-adic non-adjacent form) algorithm.
*/
class wtaunafprecompinfo implements precompinfo
{
/**
* array holding the precomputed <code>ecpoint.f2m</code>s used for the
* wtnaf multiplication in <code>
* {@link org.bouncycastle.math.ec.multiplier.wtaunafmultiplier.multiply()
* wtaunafmultiplier.multiply()}</code>.
*/
private ecpoint.f2m[] precomp = null;
/**
* constructor for <code>wtaunafprecompinfo</code>
* @param precomp array holding the precomputed <code>ecpoint.f2m</code>s
* used for the wtnaf multiplication in <code>
* {@link org.bouncycastle.math.ec.multiplier.wtaunafmultiplier.multiply()
* wtaunafmultiplier.multiply()}</code>.
*/
wtaunafprecompinfo(ecpoint.f2m[] precomp)
{
this.precomp = precomp;
}
/**
* @return the array holding the precomputed <code>ecpoint.f2m</code>s
* used for the wtnaf multiplication in <code>
* {@link org.bouncycastle.math.ec.multiplier.wtaunafmultiplier.multiply()
* wtaunafmultiplier.multiply()}</code>.
*/
protected ecpoint.f2m[] getprecomp()
{
return precomp;
}
}
| [
"dzgrouphelp@foxmail.com"
] | dzgrouphelp@foxmail.com |
b9f090a51bd5a00bf36f9ffe4e7c40c82ef09183 | 38772e3d16c3c2a15c379969d9a607916a65e7ba | /libs/joriki/src/info/joriki/io/ByteSource.java | cfd8acba9219429a8c26c4b78af57a3f90f25f55 | [
"Apache-2.0"
] | permissive | emistoolbox/emistoolbox | 2d57aa6189c99f2cbd4f53429c184a4096b3a3ca | c973fc5ebe2607402a0c48b8c548dfe3188b27b9 | refs/heads/master | 2021-01-19T01:42:40.658255 | 2019-04-27T19:58:36 | 2019-04-27T19:58:36 | 32,792,202 | 1 | 0 | Apache-2.0 | 2018-11-26T10:43:07 | 2015-03-24T10:39:36 | Java | UTF-8 | Java | false | false | 450 | java | /*
* Copyright 2002 Felix Pahl. All rights reserved.
* Use is subject to license terms.
*/
package info.joriki.io;
import java.io.IOException;
/**
* A byte source is an object from which bytes can be read.
* @see ByteSink
*/
public interface ByteSource
{
/**
* Reads a single byte from the byte source.
* @return the next byte
* @exception IOException if an I/O error occurs
*/
public int read () throws IOException;
}
| [
"murkhog@googlemail.com"
] | murkhog@googlemail.com |
1c8d9be71ce74cec736e6dcb105725cd4182d2fa | 39511216bfad8ae7781e506ec395d08b07cadf08 | /com/google/android/gms/internal/zzep.java | cdb9bd81151e0c2cf2c676edfb2db1aa2a19e6f4 | [] | no_license | jguion/cloudpets_java | a34366ba78402032891759eba60e58c8858d5e3c | 60b88104275d95c6b080447a67a84741fb3dac0c | refs/heads/master | 2021-03-27T18:55:41.745321 | 2017-05-24T17:03:47 | 2017-05-24T17:03:47 | 92,316,339 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 601 | java | package com.google.android.gms.internal;
import com.google.android.gms.ads.formats.NativeCustomTemplateAd.OnCustomTemplateAdLoadedListener;
import com.google.android.gms.internal.zzek.zza;
@zziy
public class zzep extends zza {
private final OnCustomTemplateAdLoadedListener zzblz;
public zzep(OnCustomTemplateAdLoadedListener onCustomTemplateAdLoadedListener) {
this.zzblz = onCustomTemplateAdLoadedListener;
}
public void zza(zzef com_google_android_gms_internal_zzef) {
this.zzblz.onCustomTemplateAdLoaded(new zzeg(com_google_android_gms_internal_zzef));
}
}
| [
"guionj@gmail.com"
] | guionj@gmail.com |
f86491029f1426cb8b87f1ed7274173e27896c6e | 10a3195436f2ec8fc3509d7d0b526d24e213f5de | /src/com/trilead/ssh2/LocalStreamForwarder.java | 5afcea653ce1fc6f46bd451dec5369da7e373c36 | [] | no_license | balangandio/java-http-injector | afb3c469019953015d2d06f6e8ea2b5a57a75c2f | 5a83f0d72520f81b7a6ad8e30ad689de9ed28de1 | refs/heads/master | 2021-07-12T04:57:05.624111 | 2020-08-06T21:00:17 | 2020-08-06T21:00:17 | 177,001,530 | 3 | 3 | null | null | null | null | UTF-8 | Java | false | false | 2,286 | java | package com.trilead.ssh2;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import com.trilead.ssh2.channel.Channel;
import com.trilead.ssh2.channel.ChannelManager;
import com.trilead.ssh2.channel.LocalAcceptThread;
/**
* A <code>LocalStreamForwarder</code> forwards an Input- and Outputstream pair
* via the secure tunnel to another host (which may or may not be identical to
* the remote SSH-2 server).
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: LocalStreamForwarder.java,v 1.1 2007/10/15 12:49:56 cplattne
* Exp $
*/
public class LocalStreamForwarder {
ChannelManager cm;
String host_to_connect;
int port_to_connect;
LocalAcceptThread lat;
Channel cn;
LocalStreamForwarder(ChannelManager cm, String host_to_connect,
int port_to_connect) throws IOException {
this.cm = cm;
this.host_to_connect = host_to_connect;
this.port_to_connect = port_to_connect;
cn = cm.openDirectTCPIPChannel(host_to_connect, port_to_connect,
"127.0.0.1", 0);
}
/**
* Close the underlying SSH forwarding channel and free up resources. You
* can also use this method to force the shutdown of the underlying
* forwarding channel. Pending output (OutputStream not flushed) will NOT be
* sent. Pending input (InputStream) can still be read. If the shutdown
* operation is already in progress (initiated from either side), then this
* call is a no-op.
*
* @throws IOException
*/
public void close() throws IOException {
cm.closeChannel(cn, "Closed due to user request.", true);
}
/**
* @return An <code>InputStream</code> object.
* @throws IOException
*/
public InputStream getInputStream() throws IOException {
return cn.getStdoutStream();
}
/**
* Get the OutputStream. Please be aware that the implementation MAY use an
* internal buffer. To make sure that the buffered data is sent over the
* tunnel, you have to call the <code>flush</code> method of the
* <code>OutputStream</code>. To signal EOF, please use the
* <code>close</code> method of the <code>OutputStream</code>.
*
* @return An <code>OutputStream</code> object.
* @throws IOException
*/
public OutputStream getOutputStream() throws IOException {
return cn.getStdinStream();
}
}
| [
"universo42.01@gmail.com"
] | universo42.01@gmail.com |
d8f8baea25b5b99a9c45ef9fd5108678d489e2b8 | 21815b0a6e7741b6a5ed3293575d801a97b918de | /as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/runtime/RuntimeMatcherStringUtilTest.java | 127cdfbdecde88a9544ff9d7447162f73aa81723 | [] | no_license | jbosstools/jbosstools-server | f7beec8346fdae37556531e36e3af51df09a9872 | 4d8a5bb01ddec48347fddfc94c76168861b771e8 | refs/heads/main | 2023-08-02T10:42:56.991445 | 2023-07-14T15:34:36 | 2023-07-14T16:29:23 | 6,308,291 | 4 | 42 | null | 2023-09-08T20:01:00 | 2012-10-20T11:23:04 | Java | UTF-8 | Java | false | false | 1,613 | java | /*******************************************************************************
* Copyright (c) 2014 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.jboss.tools.as.test.core.runtime;
import org.jboss.tools.as.runtimes.integration.internal.RuntimeMatcherStringUtil;
import org.junit.Test;
import junit.framework.TestCase;
public class RuntimeMatcherStringUtilTest extends TestCase {
@Test
public void testSafeVersion() {
assertEquals("6.0", RuntimeMatcherStringUtil.getSafeVersionString("6.0"));
assertEquals("6.0.", RuntimeMatcherStringUtil.getSafeVersionString("6.0."));
assertEquals("6.0.1", RuntimeMatcherStringUtil.getSafeVersionString("6.0.1"));
assertEquals("6.0.1.", RuntimeMatcherStringUtil.getSafeVersionString("6.0.1."));
assertEquals("6.0.1.AB", RuntimeMatcherStringUtil.getSafeVersionString("6.0.1.AB"));
assertEquals("6.0.0.CR01", RuntimeMatcherStringUtil.getSafeVersionString("6.0.0.CR01"));
assertEquals("6.0.0.CR01_1", RuntimeMatcherStringUtil.getSafeVersionString("6.0.0.CR01.1"));
assertEquals("6.0.0.CR01_1_", RuntimeMatcherStringUtil.getSafeVersionString("6.0.0.CR01.1."));
assertEquals("6.0.0.CR01_1_1", RuntimeMatcherStringUtil.getSafeVersionString("6.0.0.CR01.1.1"));
}
}
| [
"rob@oxbeef.net"
] | rob@oxbeef.net |
664950010d70373fb5f14084a869d56e24384926 | f0568343ecd32379a6a2d598bda93fa419847584 | /modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201402/cm/ShoppingSetting.java | 7ec6a4b44e8734e0bb7955647298640fa66115bc | [
"Apache-2.0"
] | permissive | frankzwang/googleads-java-lib | bd098b7b61622bd50352ccca815c4de15c45a545 | 0cf942d2558754589a12b4d9daa5902d7499e43f | refs/heads/master | 2021-01-20T23:20:53.380875 | 2014-07-02T19:14:30 | 2014-07-02T19:14:30 | 21,526,492 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,970 | java |
package com.google.api.ads.adwords.jaxws.v201402.cm;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
*
* Setting for shopping campaigns. Defines the universe of products covered by the campaign.
* Encapsulates a merchant ID, sales country, and campaign priority.
*
*
* <p>Java class for ShoppingSetting complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ShoppingSetting">
* <complexContent>
* <extension base="{https://adwords.google.com/api/adwords/cm/v201402}Setting">
* <sequence>
* <element name="merchantId" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
* <element name="salesCountry" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="campaignPriority" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ShoppingSetting", propOrder = {
"merchantId",
"salesCountry",
"campaignPriority"
})
public class ShoppingSetting
extends Setting
{
protected Long merchantId;
protected String salesCountry;
protected Integer campaignPriority;
/**
* Gets the value of the merchantId property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getMerchantId() {
return merchantId;
}
/**
* Sets the value of the merchantId property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setMerchantId(Long value) {
this.merchantId = value;
}
/**
* Gets the value of the salesCountry property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSalesCountry() {
return salesCountry;
}
/**
* Sets the value of the salesCountry property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSalesCountry(String value) {
this.salesCountry = value;
}
/**
* Gets the value of the campaignPriority property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getCampaignPriority() {
return campaignPriority;
}
/**
* Sets the value of the campaignPriority property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setCampaignPriority(Integer value) {
this.campaignPriority = value;
}
}
| [
"jradcliff@google.com"
] | jradcliff@google.com |
9e6de02d901a1ea4a7a83ad7bda5f9e134cb88b4 | 826642720da414981580c599a32dce9ba2179da1 | /sources/kotlinx/coroutines/channels/ChannelsKt__Channels_commonKt$firstOrNull$3.java | 3c898e031099860d39ab1eef4cc2be5c9422250d | [] | no_license | bclehmann/abtracetogether_1.0.1.apk_disassembled | be60aa11b4f798952de68b985a138019cc79a4ab | 562cb759f0b45007ac4d3db171926654393ebc0b | refs/heads/master | 2022-11-07T11:13:17.926766 | 2020-06-20T04:55:34 | 2020-06-20T04:55:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,804 | java | package kotlinx.coroutines.channels;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u001c\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\u0010\u0000\u001a\u0004\u0018\u00010\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\u0012\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u0002H\u0002\u0012\u0004\u0012\u00020\u00060\u00052\u000e\u0010\u0007\u001a\n\u0012\u0006\u0012\u0004\u0018\u0001H\u00020\bHH"}, d2 = {"firstOrNull", "", "E", "Lkotlinx/coroutines/channels/ReceiveChannel;", "predicate", "Lkotlin/Function1;", "", "continuation", "Lkotlin/coroutines/Continuation;"}, k = 3, mv = {1, 1, 15})
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt", f = "Channels.common.kt", i = {0, 0, 0, 0, 0, 0}, l = {2406}, m = "firstOrNull", n = {"$this$firstOrNull", "predicate", "$this$consumeEach$iv", "$this$consume$iv$iv", "cause$iv$iv", "$this$consume$iv"}, s = {"L$0", "L$1", "L$2", "L$3", "L$4", "L$5"})
/* compiled from: Channels.common.kt */
public final class ChannelsKt__Channels_commonKt$firstOrNull$3 extends ContinuationImpl {
Object L$0;
Object L$1;
Object L$2;
Object L$3;
Object L$4;
Object L$5;
Object L$6;
int label;
/* synthetic */ Object result;
public ChannelsKt__Channels_commonKt$firstOrNull$3(Continuation continuation) {
super(continuation);
}
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return ChannelsKt.firstOrNull(null, null, this);
}
}
| [
"bclehmann@yahoo.ca"
] | bclehmann@yahoo.ca |
6d6553847bc70bf543b2f7fbdbe62213cbb6eba9 | fee36ba1d4fd00180de95287818416f1be54aa04 | /Java/src/ex8_14_1_interface/Lendable.java | 895f6d762048797a4a5d3090e5b0772e93f1d2de | [] | no_license | JungWonHong/Spring | 721f53f48ca1795198ae87211cee6e899e32d706 | bfdaaeb286fb9b1770db68f5c39f5d86b19eceb6 | refs/heads/master | 2020-04-16T13:40:14.444198 | 2019-01-14T09:56:16 | 2019-01-14T09:56:16 | 165,637,644 | 1 | 0 | null | null | null | null | UHC | Java | false | false | 220 | java | package ex8_14_1_interface;
//대출 가능 인터페이스
public interface Lendable {
public abstract void checkOut(String borrower, String date); // 대출한다.
public abstract void checkIn(); // 반납한다.
}
| [
"sungwoo808@naver.com"
] | sungwoo808@naver.com |
a59180e1c185b768ec989ae535a3a7ae722cb3f8 | 5f13d0714206bffbf6f7200d1914f1efa1653900 | /bxj/bxj/bxj_admin/src/main/java/com/hangjia/bxj/service/tjgl/impl/KmhStatisticsDataServiceImpl.java | 9f3238436e2b880f1e910ee3a1b35b505ae39b11 | [] | no_license | Mrkirito/market | 0340a45010f9bbc09524edaf001beeb14920d3e8 | bbce9192eb3f6e65a07add003b51ff33e5573327 | refs/heads/master | 2020-03-18T03:19:35.243219 | 2018-05-21T08:28:28 | 2018-05-21T08:29:13 | 134,234,703 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,964 | java | /*
* Copyright (c) 2kmhStatisticsDataMapper.16 www.baobao18.com. All Rights Reserved.
*/
package com.hangjia.bxj.service.tjgl.impl;
import com.hangjia.bxj.common.BaseCommonQuery;
import com.hangjia.bxj.common.Result;
import com.hangjia.bxj.dao.tjgl.KmhStatisticsDataMapper;
import com.hangjia.bxj.model.tjgl.KmhStatisticsData;
import com.hangjia.bxj.query.tjgl.KmhStatisticsDataQuery;
import com.hangjia.bxj.service.tjgl.KmhStatisticsDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Created by Caigp
* Date: 2016/11/10
*/
@Service
public class KmhStatisticsDataServiceImpl implements KmhStatisticsDataService {
@Autowired
private KmhStatisticsDataMapper kmhStatisticsDataMapper;
@Override
public int deleteByPrimaryKey(Long id) {
return kmhStatisticsDataMapper.deleteByPrimaryKey(id);
}
@Override
public int insert(KmhStatisticsData record) {
return kmhStatisticsDataMapper.insert(record);
}
@Override
public int insertSelective(KmhStatisticsData record) {
return kmhStatisticsDataMapper.insertSelective(record);
}
@Override
public KmhStatisticsData selectByPrimaryKey(Long id) {
return kmhStatisticsDataMapper.selectByPrimaryKey(id);
}
@Override
public int updateByPrimaryKeySelective(KmhStatisticsData record) {
return kmhStatisticsDataMapper.updateByPrimaryKeySelective(record);
}
@Override
public int updateByPrimaryKey(KmhStatisticsData record) {
return kmhStatisticsDataMapper.updateByPrimaryKey(record);
}
@Override
public int selectByCount(BaseCommonQuery query) {
return kmhStatisticsDataMapper.selectByCount(query);
}
@Override
public List<KmhStatisticsData> selectByPage(BaseCommonQuery query) {
return kmhStatisticsDataMapper.selectByPage(query);
}
@Override
public int selectCountByQuery(KmhStatisticsDataQuery query) {
return kmhStatisticsDataMapper.selectCountByQuery(query);
}
@Override
public List<KmhStatisticsData> selectPageByQuery(KmhStatisticsDataQuery query) {
return kmhStatisticsDataMapper.selectPageByQuery(query);
}
@Override
public List<KmhStatisticsData> getAllBxjAppKmhDatas() {
return kmhStatisticsDataMapper.getAllBxjAppKmhDatas();
}
@Override
public Result getPageListByQuery(KmhStatisticsDataQuery kmhStatisticsDataQuery) {
Result<List<KmhStatisticsData>> result = new Result<List<KmhStatisticsData>>();
int count = kmhStatisticsDataMapper.selectCountByQuery(kmhStatisticsDataQuery);
List<KmhStatisticsData> list = kmhStatisticsDataMapper.selectPageByQuery(kmhStatisticsDataQuery);
result.setModel(list);
kmhStatisticsDataQuery.setTotalItem(count);
result.setQuery(kmhStatisticsDataQuery);
return result;
}
} | [
"2358615148@qq.com"
] | 2358615148@qq.com |
4567e2bf893cf031e3f7d34fa6d2c1fbe4b657d0 | 066c3640aa155279b0b259f12f8fd926b8e9e72a | /emms_GXDD/.svn/pristine/db/db08bf337ee19596ffb7e42cd1a250691419b298.svn-base | 2fef9285abd1fb4c686674e74e591c2d58049092 | [] | no_license | zjt0428/emms_GXDD | 3eebe850533357e7e43858120cfa58a55d797f7c | 9dd7af521efa613c9bba3ce8f7e1c706d8b94a50 | refs/heads/master | 2020-09-13T18:09:00.499402 | 2019-11-20T07:56:23 | 2019-11-20T07:56:23 | 222,864,042 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,026 | /**
*====================================================
* 文件名称: ComponDiaryService.java
* 修订记录:
* No 日期 作者(操作:具体内容)
* 1. 2013-7-20 chenxy(创建:创建文件)
*====================================================
* 类描述:(说明未实现或其它不应生成javadoc的内容)
*/
package com.knight.emms.service;
import java.util.Date;
import java.util.List;
import java.util.Set;
import com.knight.emms.model.Borrow;
import com.knight.emms.model.BorrowComponent;
import com.knight.emms.model.ComponDiary;
import com.knight.emms.model.Pickup;
import com.knight.emms.model.PickupComponent;
import com.knight.emms.model.extend.DiaryRelationMethod;
import com.knight.system.service.BusinessLongPKService;
/**
* @ClassName: ComponDiaryService
* @Description: TODO(这里用一句话描述这个类的作用)
* @author chenxy
* @date 2013-7-20 上午8:09:06
*/
public interface ComponDiaryService extends BusinessLongPKService<ComponDiary> {
public void createComponDiary(Set<ComponDiary> componDiarySet, DiaryRelationMethod relation);
/** 零配件领用日历图 */
public void startPickupComponDiary(Pickup pickup, Set<PickupComponent> pickupComponentSet);
/** 零配件领用归还日历图 */
public void overPickupComponDiary(Pickup pickup, PickupComponent pickupComponent);
/** 零配件借用日历图 */
public void startBorrowComponDiary(Borrow borrow, Set<BorrowComponent> borrowComponentSet);
/** 零配件借用归还日历图 */
public void overBorrowComponDiary(Borrow borrow, BorrowComponent borrowComponent, BorrowComponent bor);
/** 零配件借用遗失日历图 */
public void loseBorrowComponDiary(Borrow borrow, BorrowComponent borrowComponent);
/** 安装/使用/拆卸 终结前业务零配件-业务流转至新业务 */
public void overPreInstallEmployDismantle(Long relateId, String relateModule, Date startDate);
public void fulfil(Long componDiaryId);
public List<ComponDiary> findBysql(String string);
}
| [
"3555673863@qq.com"
] | 3555673863@qq.com | |
8d064da980e278017f6f3ad553f955fedf39420d | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/1/1_2725f07c7df68570e7f5d5850078da29893f57d1/SearchQueryBuilder/1_2725f07c7df68570e7f5d5850078da29893f57d1_SearchQueryBuilder_s.java | 216af408b839ed6d511235ca28a0f6cd8c64148f | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 3,519 | java | package hu.sch.ejb.search;
import hu.sch.domain.user.User;
import hu.sch.domain.user.UserAttribute;
import hu.sch.domain.user.UserAttributeName;
import hu.sch.domain.user.UserAttribute_;
import hu.sch.domain.user.User_;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Expression;
import javax.persistence.criteria.Join;
import javax.persistence.criteria.JoinType;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
/**
* Builds the query for complex search.
*
* @author tomi
*/
public class SearchQueryBuilder {
private EntityManager em;
private final String keyword;
private Root<User> usr;
private Join<User, UserAttribute> privAttr;
private CriteriaBuilder builder;
public SearchQueryBuilder(EntityManager em, String keyword) {
this.em = em;
this.keyword = keyword;
}
public TypedQuery<User> build() {
builder = em.getCriteriaBuilder();
CriteriaQuery<User> q = builder.createQuery(User.class);
usr = q.from(User.class);
privAttr = usr.join(User_.privateAttributes, JoinType.LEFT);
List<Predicate> andFilters = new ArrayList<>();
for (String word : keyword.split(" ")) {
Predicate or = builder.or(
buildLikeQueryPart(usr.get(User_.firstName), word),
buildLikeQueryPart(usr.get(User_.lastName), word),
buildLikeQueryPart(usr.get(User_.nickName), word),
buildLikeQueryPart(usr.get(User_.screenName), word),
buildEmailQueryPart(word),
buildRoomNumberQueryPart(word)
);
andFilters.add(or);
}
q.where(andFilters.toArray(new Predicate[andFilters.size()]));
return em.createQuery(q);
}
private Predicate buildLikeQueryPart(Expression<String> expr, String word) {
return builder.like(builder.lower(expr), buildLikeString(word));
}
private String buildLikeString(String word) {
if (word == null) {
throw new IllegalArgumentException("Argument 'word' cannot be null");
}
return "%".concat(word.toLowerCase()).concat("%");
}
private Predicate buildEmailQueryPart(String word) {
return builder.and(
// email is visible
builder.equal(privAttr.get(UserAttribute_.attrName), UserAttributeName.EMAIL),
builder.isTrue(privAttr.get(UserAttribute_.visible)),
// and equals to the given word
builder.equal(usr.get(User_.emailAddress), word));
}
private Predicate buildRoomNumberQueryPart(String word) {
return builder.and(
// roomnumber is visible
builder.equal(privAttr.get(UserAttribute_.attrName), UserAttributeName.ROOM_NUMBER),
builder.isTrue(privAttr.get(UserAttribute_.visible)),
// room number consists of [dormitor] [room]
builder.or(
builder.like(usr.get(User_.dormitory), buildLikeString(word)),
builder.like(usr.get(User_.room), buildLikeString(word))
)
);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
a74bb27d98474c79f4a3fb0aa2911dfda8fe5b4b | a422de59c29d077c512d66b538ff17d179cc077a | /hsxt/hsxt-uc/hsxt-uc-api/hsxt-uc-as-api/src/main/java/com/gy/hsxt/uc/as/bean/auth/AsRole.java | 9b4b07b63060a3f668346fd088d46ec7b9c5a8a1 | [] | no_license | liveqmock/hsxt | c554e4ebfd891e4cc3d57e920d8a79ecc020b4dd | 40bb7a1fe5c22cb5b4f1d700e5d16371a3a74c04 | refs/heads/master | 2020-03-28T14:09:31.939168 | 2018-09-12T10:20:46 | 2018-09-12T10:20:46 | 148,461,898 | 0 | 0 | null | 2018-09-12T10:19:11 | 2018-09-12T10:19:10 | null | UTF-8 | Java | false | false | 2,484 | java | package com.gy.hsxt.uc.as.bean.auth;
import java.io.Serializable;
public class AsRole implements Serializable{
/**
*
*/
private static final long serialVersionUID = -8020135579456950207L;
/** 角色编号ID */
String roleId;
/** 角色名称 */
String roleName;
/** 企业客户号 */
String entCustId;
/** 角色描述 */
String roleDesc;
/** 子系统代码 */
String subSystemCode;
/** 平台代码 */
String platformCode;
/** 角色类型 */
String roleType;
/**
* @return the 角色编号ID
*/
public String getRoleId() {
return roleId;
}
/**
* @param 角色编号ID the roleId to set
*/
public void setRoleId(String roleId) {
this.roleId = roleId;
}
/**
* @return the 角色名称
*/
public String getRoleName() {
return roleName;
}
/**
* @param 角色名称 the roleName to set
*/
public void setRoleName(String roleName) {
this.roleName = roleName;
}
/**
* @return the 企业客户号
*/
public String getEntCustId() {
return entCustId;
}
/**
* @param 企业客户号 the entCustId to set
*/
public void setEntCustId(String entCustId) {
this.entCustId = entCustId;
}
/**
* @return the 角色描述
*/
public String getRoleDesc() {
return roleDesc;
}
/**
* @param 角色描述 the roleDesc to set
*/
public void setRoleDesc(String roleDesc) {
this.roleDesc = roleDesc;
}
/**
* @return the 子系统代码
*/
public String getSubSystemCode() {
return subSystemCode;
}
/**
* @param 子系统代码 the subSystemCode to set
*/
public void setSubSystemCode(String subSystemCode) {
this.subSystemCode = subSystemCode;
}
/**
* @return the 平台代码
*/
public String getPlatformCode() {
return platformCode;
}
/**
* @param 平台代码 the platformCode to set
*/
public void setPlatformCode(String platformCode) {
this.platformCode = platformCode;
}
/**
* @return the 角色类型
*/
public String getRoleType() {
return roleType;
}
/**
* @param 角色类型 the roleType to set
*/
public void setRoleType(String roleType) {
this.roleType = roleType;
}
}
| [
"864201042@qq.com"
] | 864201042@qq.com |
5b746f732261fc5902842f81026747fd3cb98100 | 10378c580b62125a184f74f595d2c37be90a5769 | /com/github/steveice10/netty/util/internal/logging/JdkLoggerFactory.java | b879dbd7bb86d89f08e461fa12ed48566a38043f | [] | 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 | 345 | java | package com.github.steveice10.netty.util.internal.logging;
import java.util.logging.Logger;
public class JdkLoggerFactory extends InternalLoggerFactory {
public static final InternalLoggerFactory INSTANCE = new JdkLoggerFactory();
public InternalLogger newInstance(String name) {
return new JdkLogger(Logger.getLogger(name));
}
}
| [
"Hot-Tutorials@users.noreply.github.com"
] | Hot-Tutorials@users.noreply.github.com |
e140ce23022630d80e98669ecc449238a636013d | 529d5e152f07821ca81dd68ee20b64e934c731c9 | /Spring5-Recipe-Application/src/test/java/com/spring/converters/RecipeToRecipeCommandTest.java | 348e00f0066272920028ed0a9e0bb9e7ace84c0e | [] | no_license | david2999999/Spring-Framework-5 | 612fe1743d9f0bb94e689956518a7477cdd5f86a | 0348fa10ec9dfffc6d5c02d5afff6e2495135632 | refs/heads/master | 2021-04-09T16:51:34.107144 | 2019-05-16T23:25:00 | 2019-05-16T23:25:00 | 125,679,491 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,431 | java | package com.spring.converters;
import com.spring.domain.*;
import com.spring.commands.RecipeCommand;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
public class RecipeToRecipeCommandTest {
public static final Long RECIPE_ID = 1L;
public static final Integer COOK_TIME = Integer.valueOf("5");
public static final Integer PREP_TIME = Integer.valueOf("7");
public static final String DESCRIPTION = "My Recipe";
public static final String DIRECTIONS = "Directions";
public static final Difficulty DIFFICULTY = Difficulty.EASY;
public static final Integer SERVINGS = Integer.valueOf("3");
public static final String SOURCE = "Source";
public static final String URL = "Some URL";
public static final Long CAT_ID_1 = 1L;
public static final Long CAT_ID2 = 2L;
public static final Long INGRED_ID_1 = 3L;
public static final Long INGRED_ID_2 = 4L;
public static final Long NOTES_ID = 9L;
RecipeToRecipeCommand converter;
@Before
public void setUp() throws Exception {
converter = new RecipeToRecipeCommand(
new CategoryToCategoryCommand(),
new IngredientToIngredientCommand(new UnitOfMeasureToUnitOfMeasureCommand()),
new NotesToNotesCommand());
}
@Test
public void testNullObject() throws Exception {
assertNull(converter.convert(null));
}
@Test
public void testEmptyObject() throws Exception {
assertNotNull(converter.convert(new Recipe()));
}
@Test
public void convert() throws Exception {
//given
Recipe recipe = new Recipe();
recipe.setId(RECIPE_ID);
recipe.setCookTime(COOK_TIME);
recipe.setPrepTime(PREP_TIME);
recipe.setDescription(DESCRIPTION);
recipe.setDifficulty(DIFFICULTY);
recipe.setDirections(DIRECTIONS);
recipe.setServings(SERVINGS);
recipe.setSource(SOURCE);
recipe.setUrl(URL);
Notes notes = new Notes();
notes.setId(NOTES_ID);
recipe.setNotes(notes);
Category category = new Category();
category.setId(CAT_ID_1);
Category category2 = new Category();
category2.setId(CAT_ID2);
recipe.getCategories().add(category);
recipe.getCategories().add(category2);
Ingredient ingredient = new Ingredient();
ingredient.setId(INGRED_ID_1);
Ingredient ingredient2 = new Ingredient();
ingredient2.setId(INGRED_ID_2);
recipe.getIngredients().add(ingredient);
recipe.getIngredients().add(ingredient2);
//when
RecipeCommand command = converter.convert(recipe);
//then
assertNotNull(command);
assertEquals(RECIPE_ID, command.getId());
assertEquals(COOK_TIME, command.getCookTime());
assertEquals(PREP_TIME, command.getPrepTime());
assertEquals(DESCRIPTION, command.getDescription());
assertEquals(DIFFICULTY, command.getDifficulty());
assertEquals(DIRECTIONS, command.getDirections());
assertEquals(SERVINGS, command.getServings());
assertEquals(SOURCE, command.getSource());
assertEquals(URL, command.getUrl());
assertEquals(NOTES_ID, command.getNotes().getId());
assertEquals(2, command.getCategories().size());
assertEquals(2, command.getIngredients().size());
}
} | [
"djiang86@binghamton.edu"
] | djiang86@binghamton.edu |
aaa6586de0ae05ebf4cfbf2fcd68b8ecd433002b | 13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3 | /crash-reproduction-new-fitness/results/MATH-40b-2-13-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/org/apache/commons/math/analysis/solvers/BaseAbstractUnivariateRealSolver_ESTest.java | 063098da47f5fe75dfea92f3c278a8edc2fb230d | [
"MIT",
"CC-BY-4.0"
] | permissive | STAMP-project/Botsing-basic-block-coverage-application | 6c1095c6be945adc0be2b63bbec44f0014972793 | 80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da | refs/heads/master | 2022-07-28T23:05:55.253779 | 2022-04-20T13:54:11 | 2022-04-20T13:54:11 | 285,771,370 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,406 | java | /*
* This file was automatically generated by EvoSuite
* Fri Oct 29 05:31:53 UTC 2021
*/
package org.apache.commons.math.analysis.solvers;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.commons.math.analysis.SinFunction;
import org.apache.commons.math.analysis.solvers.MullerSolver2;
import org.apache.commons.math.exception.TooManyEvaluationsException;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class BaseAbstractUnivariateRealSolver_ESTest extends BaseAbstractUnivariateRealSolver_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
MullerSolver2 mullerSolver2_0 = new MullerSolver2(19.568778191519318);
int int0 = (-92);
SinFunction sinFunction0 = new SinFunction();
sinFunction0.derivative();
try {
mullerSolver2_0.computeObjectiveValue((-92));
fail("Expecting exception: TooManyEvaluationsException");
} catch(TooManyEvaluationsException e) {
//
// illegal state: maximal count (0) exceeded: evaluations
//
verifyException("org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver", e);
}
}
}
| [
"pderakhshanfar@serg2.ewi.tudelft.nl"
] | pderakhshanfar@serg2.ewi.tudelft.nl |
f5b305ed8c9f2f632cd1109b7a8d616fd4dc2c3a | 92225460ebca1bb6a594d77b6559b3629b7a94fa | /src/com/kingdee/eas/fdc/sellhouse/RoomAreaCompensateTypeEnum.java | 9d94e80660dc7d2e93b966a9646804b3761b1e73 | [] | no_license | yangfan0725/sd | 45182d34575381be3bbdd55f3f68854a6900a362 | 39ebad6e2eb76286d551a9e21967f3f5dc4880da | refs/heads/master | 2023-04-29T01:56:43.770005 | 2023-04-24T05:41:13 | 2023-04-24T05:41:13 | 512,073,641 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,629 | java | /**
* output package name
*/
package com.kingdee.eas.fdc.sellhouse;
import java.util.Map;
import java.util.List;
import java.util.Iterator;
import com.kingdee.util.enums.StringEnum;
/**
* output class name
*/
public class RoomAreaCompensateTypeEnum extends StringEnum
{
public static final String BYHAND_VALUE = "byHand";
public static final String BYSCHEME_VALUE = "byScheme";
public static final RoomAreaCompensateTypeEnum BYHAND = new RoomAreaCompensateTypeEnum("BYHAND", BYHAND_VALUE);
public static final RoomAreaCompensateTypeEnum BYSCHEME = new RoomAreaCompensateTypeEnum("BYSCHEME", BYSCHEME_VALUE);
/**
* construct function
* @param String roomAreaCompensateTypeEnum
*/
private RoomAreaCompensateTypeEnum(String name, String roomAreaCompensateTypeEnum)
{
super(name, roomAreaCompensateTypeEnum);
}
/**
* getEnum function
* @param String arguments
*/
public static RoomAreaCompensateTypeEnum getEnum(String roomAreaCompensateTypeEnum)
{
return (RoomAreaCompensateTypeEnum)getEnum(RoomAreaCompensateTypeEnum.class, roomAreaCompensateTypeEnum);
}
/**
* getEnumMap function
*/
public static Map getEnumMap()
{
return getEnumMap(RoomAreaCompensateTypeEnum.class);
}
/**
* getEnumList function
*/
public static List getEnumList()
{
return getEnumList(RoomAreaCompensateTypeEnum.class);
}
/**
* getIterator function
*/
public static Iterator iterator()
{
return iterator(RoomAreaCompensateTypeEnum.class);
}
} | [
"yfsmile@qq.com"
] | yfsmile@qq.com |
5e8bf092ee08ebd7f5796dc86a975dffd8450a4f | 6ff346b4086ecdb77dfead7e26a0a951b4dc3ef3 | /core/src/org/columba/core/gui/themes/plugin/PlasticLookAndFeelConfigPlugin.java | 6ddc6b30f748b8cf92f8636a8813258579acf599 | [] | no_license | xapiens/Xendra | 02ce123adb3e986325431f06b710b9b5c7c8aadf | b63d72d2319eca3f1c6cc67d05fac29ad8f6ef9a | refs/heads/master | 2023-05-25T11:23:05.879161 | 2023-05-23T04:27:12 | 2023-05-23T04:27:12 | 101,092,524 | 0 | 5 | null | null | null | null | UTF-8 | Java | false | false | 4,433 | java | //The contents of this file are subject to the Mozilla Public License Version 1.1
//(the "License"); you may not use this file except in compliance with the
//License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
//
//Software distributed under the License is distributed on an "AS IS" basis,
//WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
//for the specific language governing rights and
//limitations under the License.
//
//The Original Code is "The Columba Project"
//
//The Initial Developers of the Original Code are Frederik Dietz and Timo Stich.
//Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
//
//All Rights Reserved.
package org.columba.core.gui.themes.plugin;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.List;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.ListCellRenderer;
import org.columba.core.config.Config;
import org.columba.core.config.Theme;
import org.columba.core.gui.plugin.AbstractConfigPlugin;
import org.columba.core.xml.XmlElement;
import org.compiere.util.Ini;
import com.jgoodies.looks.plastic.PlasticLookAndFeel;
import com.jgoodies.looks.plastic.PlasticTheme;
/**
* Asks the user which theme he wants to use.
*
* @author fdietz
*/
public class PlasticLookAndFeelConfigPlugin extends AbstractConfigPlugin {
JList list;
//XmlElement themeElement;
Theme themeElement;
/**
*
*/
public PlasticLookAndFeelConfigPlugin() {
super();
//XmlElement options = Config.getInstance().get("options").getElement("/options");
//XmlElement gui = options.getElement("gui");
//themeElement = gui.getElement("theme");
themeElement = Config.getInstance().getOptions().getGui().getTheme();
}
/* (non-Javadoc)
* @see org.columba.core.gui.plugin.AbstractConfigPlugin#createPanel()
*/
public JPanel createPanel() {
list = new JList(computeThemes());
list.setCellRenderer(createThemeRenderer());
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
JScrollPane pane = new JScrollPane(list);
panel.add(pane, BorderLayout.NORTH);
return panel;
}
protected PlasticTheme[] computeThemes() {
List themes = PlasticLookAndFeel.getInstalledThemes();
themes.add(new org.xendra.plaf.XendraThemeGreen());
return (PlasticTheme[]) themes.toArray(new PlasticTheme[themes.size()]);
}
protected PlasticTheme getTheme(String name) {
PlasticTheme[] themes = computeThemes();
for (int i = 0; i < themes.length; i++) {
String str = themes[i].getName();
if (name.equals(str)) {
return themes[i];
}
}
return null;
}
/* (non-Javadoc)
* @see org.columba.core.gui.plugin.AbstractConfigPlugin#updateComponents(boolean)
*/
public void updateComponents(boolean b) {
//String theme = themeElement.getAttribute("theme");
String theme = themeElement.getTheme();
if (b) {
if (theme != null) {
PlasticTheme t = getTheme(theme);
if (t != null) {
list.setSelectedValue(t, true);
}
}
} else {
PlasticTheme t = (PlasticTheme) list.getSelectedValue();
if (t != null) {
//themeElement.addAttribute("theme", t.getName());
themeElement.setTheme(t.getName());
Ini.setProperty(Ini.P_UI_LOOK, t.getName());
Ini.saveProperties(true);
}
}
}
private ListCellRenderer createThemeRenderer() {
return new DefaultListCellRenderer() {
public Component getListCellRendererComponent(JList list,
Object value, int index, boolean isSelected,
boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list,
value, index, isSelected, cellHasFocus);
PlasticTheme theme = (PlasticTheme) value;
label.setText(theme.getName());
return label;
}
};
}
}
| [
"xapiens@sf.net"
] | xapiens@sf.net |
882c8777f08df7f42d3ccb093f265dc713ab0786 | 20524586384db35b92f580eb48e7d09699b72030 | /aws-java-sdk-workspaces/src/main/java/com/amazonaws/services/workspaces/model/transform/WorkspaceRequestJsonMarshaller.java | ecc5a2056524f1fcedc506aece390bd280be0ca3 | [
"JSON",
"Apache-2.0"
] | permissive | guilhermejccavalcanti/aws-sdk-java | a31db0309e6505fcab7f22b2cb2ab2e741bb64aa | 64fa7c612bbda9e5f8ea1ff48eb0a6ae41f125e3 | refs/heads/master | 2020-03-25T05:46:47.633002 | 2018-08-28T10:22:14 | 2018-08-28T10:22:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,689 | java | /*
* Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.workspaces.model.transform;
import static com.amazonaws.util.StringUtils.UTF8;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.OutputStreamWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.util.Map;
import java.util.List;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.workspaces.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.BinaryUtils;
import com.amazonaws.util.StringUtils;
import com.amazonaws.util.StringInputStream;
import com.amazonaws.util.json.*;
/**
* WorkspaceRequestMarshaller
*/
public class WorkspaceRequestJsonMarshaller {
/**
* Marshall the given parameter object, and output to a JSONWriter
*/
public void marshall(WorkspaceRequest workspaceRequest,
JSONWriter jsonWriter) {
if (workspaceRequest == null) {
throw new AmazonClientException(
"Invalid argument passed to marshall(...)");
}
try {
jsonWriter.object();
if (workspaceRequest.getDirectoryId() != null) {
jsonWriter.key("DirectoryId").value(
workspaceRequest.getDirectoryId());
}
if (workspaceRequest.getUserName() != null) {
jsonWriter.key("UserName")
.value(workspaceRequest.getUserName());
}
if (workspaceRequest.getBundleId() != null) {
jsonWriter.key("BundleId")
.value(workspaceRequest.getBundleId());
}
jsonWriter.endObject();
} catch (Throwable t) {
throw new AmazonClientException(
"Unable to marshall request to JSON: " + t.getMessage(), t);
}
}
private static WorkspaceRequestJsonMarshaller instance;
public static WorkspaceRequestJsonMarshaller getInstance() {
if (instance == null)
instance = new WorkspaceRequestJsonMarshaller();
return instance;
}
}
| [
"aws@amazon.com"
] | aws@amazon.com |
6fa9979ca49421deda75ff0cf9bc592082f98ce0 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Lang/41/org/apache/commons/lang/text/StrBuilder_deleteAll_1572.java | 6655401ed7a5df8af2d350c15adbafb4e52ea0ae | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 4,115 | java |
org apach common lang text
build string constitu part provid flexibl power api
string buffer stringbuff
main differ string buffer stringbuff string builder stringbuild
subclass direct access charact arrai
addit method
append separ appendwithsepar add arrai valu separ
append pad appendpad add length pad charact
append fix length appendfixedlength add fix width field builder
char arrai tochararrai char getchar simpler wai rang charact arrai
delet delet string
replac search replac string
left string leftstr string rightstr mid string midstr substr except
builder string
size clear empti isempti collect style api method
view
token astoken intern buffer sourc str token strtoken
reader asread intern buffer sourc reader
writer aswrit writer write directli intern buffer
aim provid api mimic close string buffer stringbuff
addit method note edg case
invalid indic input alter individu method
biggest output text
'null' control properti link set null text setnulltext string
prior implement cloneabl implement
clone method onward longer
author stephen colebourn
version
str builder strbuilder char sequenc charsequ append
delet string occur builder
param str string delet action
enabl chain
str builder strbuilder delet deleteal string str
len str str length
len
index index indexof str
index
delet impl deleteimpl index index len len
index index indexof str index
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
99c423742d50e3de1adbcecf8a19ab1bf5385474 | c188408c9ec0425666250b45734f8b4c9644a946 | /open-sphere-base/core/src/main/java/io/opensphere/core/util/taskactivity/SimpleTimeoutTaskActivity.java | b176539e8371258678672fb9f563e45fb2bc1317 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | rkausch/opensphere-desktop | ef8067eb03197c758e3af40ebe49e182a450cc02 | c871c4364b3456685411fddd22414fd40ce65699 | refs/heads/snapshot_5.2.7 | 2023-04-13T21:00:00.575303 | 2020-07-29T17:56:10 | 2020-07-29T17:56:10 | 360,594,280 | 0 | 0 | Apache-2.0 | 2021-04-22T17:40:38 | 2021-04-22T16:58:41 | null | UTF-8 | Java | false | false | 789 | java | package io.opensphere.core.util.taskactivity;
import io.opensphere.core.util.concurrent.CommonTimer;
/**
* A simple example {@link TaskActivity} that displays a fixed message for a set
* period then completes and goes away.
*/
public class SimpleTimeoutTaskActivity extends TaskActivity
{
/**
* A simple TaskActivity that provides a string label and a timeout.
*
* @param label - The label to display initially
* @param longevityMS - the amount of time in milliseconds this TaskActivity
* message should be shown.
*/
public SimpleTimeoutTaskActivity(String label, int longevityMS)
{
super();
setActive(true);
setLabelValue(label);
CommonTimer.schedule(() -> setComplete(true), longevityMS);
}
}
| [
"kauschr@opensphere.io"
] | kauschr@opensphere.io |
ca7ee9103c2830fc3e0b39cf7dcb09722e1d02ef | c8cdff97fb4b6ce366bb6ab9adaff866b761a791 | /src/day13_conditional_statements/ATMPinCode.java | c90c15297ff7bc624959d59746eccc5e0427fd50 | [] | no_license | SDET222/java-programmingC | 6a50c147f526f60382c8febfe68c1a1c7f2921b2 | f6098a8a3ff2412135120efde901ab3ac558c362 | refs/heads/master | 2023-06-22T00:48:25.451665 | 2021-07-26T23:51:53 | 2021-07-26T23:51:53 | 366,196,266 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 773 | java | package day13_conditional_statements;
import java.util.Scanner;
public class ATMPinCode {
public static void main (String [] args){
Scanner input = new Scanner(System.in);
System.out.println("Welcome to TD Bank ATM!");
System.out.println("Please enter your PIN");
int secretPinCode=1234;
int inputPinCode = input.nextInt() ;
if(inputPinCode == secretPinCode) {
System.out.println("Welcome to your account");
System.out.println("You can withdraw/ check balance/ deposit");
} else {
System.out.println("Incorrect Pincode "+inputPinCode);
System.out.println("Please try again");
}
System.out.println("Thank you for using TD Bank");
}
}
| [
"jkrogers222@gmail.com"
] | jkrogers222@gmail.com |
710f9682d2b45cdc9b83f0f1aafc8849557c62e2 | ecb449c5c6c40d31911c452d3b351f18a7c436de | /www.csie.ntu.edu.tw/~sylee/courses/dataStructures/qqniuke/基础和提升/第六节/基础入门班第六课代码/class06/Graph.java | 05825212c4c6089898c61ee10ba180901b0cc09c | [] | no_license | 2892931976/Algorithms-in-Go | 166319cd97dc6521a06076f456d6eb14281868db | cbdb38d86282a42f9e0eb43e15f9362584524ffd | refs/heads/master | 2023-01-20T18:06:28.345390 | 2020-05-03T07:55:49 | 2020-05-03T07:55:49 | 203,523,554 | 1 | 1 | null | 2022-12-30T01:26:35 | 2019-08-21T06:44:23 | Java | UTF-8 | Java | false | false | 236 | java | package class06;
import java.util.HashMap;
import java.util.HashSet;
public class Graph {
public HashMap<Integer,Node> nodes;
public HashSet<Edge> edges;
public Graph() {
nodes = new HashMap<>();
edges = new HashSet<>();
}
}
| [
"2892931976@qq.com"
] | 2892931976@qq.com |
c0a507abe37a181b98841f7a173ef2e0f3e9b7ff | 778da6dbb2eb27ace541338d0051f44353c3f924 | /src/main/java/com/espertech/esper/epl/expression/accessagg/ExprPlugInAggMultiFunctionNodeFactory.java | 36b16378d411027df56629d41b78f8e070e96e01 | [] | no_license | jiji87432/ThreadForEsperAndBenchmark | daf7188fb142f707f9160173d48c2754e1260ec7 | fd2fc3579b3dd4efa18e079ce80d3aee98bf7314 | refs/heads/master | 2021-12-12T02:15:18.810190 | 2016-12-01T12:15:01 | 2016-12-01T12:15:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,886 | java | /**************************************************************************************
* Copyright (C) 2006-2015 EsperTech Inc. All rights reserved. *
* http://www.espertech.com/esper *
* http://www.espertech.com *
* ---------------------------------------------------------------------------------- *
* The software in this package is published under the terms of the GPL license *
* a copy of which has been included with this distribution in the license.txt file. *
**************************************************************************************/
package com.espertech.esper.epl.expression.accessagg;
import com.espertech.esper.client.EventType;
import com.espertech.esper.epl.agg.access.AggregationAccessor;
import com.espertech.esper.epl.agg.access.AggregationAgent;
import com.espertech.esper.epl.agg.access.AggregationStateKey;
import com.espertech.esper.epl.agg.aggregator.AggregationMethod;
import com.espertech.esper.epl.agg.service.AggregationMethodFactory;
import com.espertech.esper.epl.agg.service.AggregationMethodFactoryUtil;
import com.espertech.esper.epl.agg.service.AggregationStateFactory;
import com.espertech.esper.epl.agg.service.AggregationStateFactoryPlugin;
import com.espertech.esper.epl.core.MethodResolutionService;
import com.espertech.esper.epl.expression.core.ExprEvaluator;
import com.espertech.esper.epl.expression.core.ExprValidationException;
import com.espertech.esper.epl.expression.baseagg.ExprAggregateNodeBase;
import com.espertech.esper.epl.rettype.EPType;
import com.espertech.esper.epl.rettype.EPTypeHelper;
import com.espertech.esper.plugin.PlugInAggregationMultiFunctionAgentContext;
import com.espertech.esper.plugin.PlugInAggregationMultiFunctionHandler;
public class ExprPlugInAggMultiFunctionNodeFactory implements AggregationMethodFactory
{
private final ExprPlugInAggMultiFunctionNode parent;
private final PlugInAggregationMultiFunctionHandler handlerPlugin;
private EPType returnType;
public ExprPlugInAggMultiFunctionNodeFactory(ExprPlugInAggMultiFunctionNode parent, PlugInAggregationMultiFunctionHandler handlerPlugin) {
this.handlerPlugin = handlerPlugin;
this.parent = parent;
}
public boolean isAccessAggregation() {
return true;
}
public AggregationMethod make(MethodResolutionService methodResolutionService, int agentInstanceId, int groupId, int aggregationId) {
return null;
}
public AggregationStateKey getAggregationStateKey(boolean isMatchRecognize) {
return handlerPlugin.getAggregationStateUniqueKey();
}
public AggregationStateFactory getAggregationStateFactory(boolean isMatchRecognize) {
return new AggregationStateFactoryPlugin(this);
}
public AggregationAccessor getAccessor() {
return handlerPlugin.getAccessor();
}
public Class getResultType() {
obtainReturnType();
return EPTypeHelper.getNormalizedClass(returnType);
}
public PlugInAggregationMultiFunctionHandler getHandlerPlugin() {
return handlerPlugin;
}
public Class getComponentTypeCollection() {
obtainReturnType();
return EPTypeHelper.getClassMultiValued(returnType);
}
public EventType getEventTypeSingle() {
obtainReturnType();
return EPTypeHelper.getEventTypeSingleValued(returnType);
}
public EventType getEventTypeCollection() {
obtainReturnType();
return EPTypeHelper.getEventTypeMultiValued(returnType);
}
public ExprAggregateNodeBase getAggregationExpression() {
return parent;
}
private void obtainReturnType() {
if (returnType == null) {
returnType = handlerPlugin.getReturnType();
}
}
public void validateIntoTableCompatible(AggregationMethodFactory intoTableAgg) throws ExprValidationException {
AggregationMethodFactoryUtil.validateAggregationType(this, intoTableAgg);
ExprPlugInAggMultiFunctionNodeFactory that = (ExprPlugInAggMultiFunctionNodeFactory) intoTableAgg;
if (!getAggregationStateKey(false).equals(that.getAggregationStateKey(false))) {
throw new ExprValidationException("Mismatched state key");
}
}
public AggregationAgent getAggregationStateAgent() {
PlugInAggregationMultiFunctionAgentContext ctx = new PlugInAggregationMultiFunctionAgentContext(parent.getChildNodes());
return handlerPlugin.getAggregationAgent(ctx);
}
public ExprEvaluator getMethodAggregationEvaluator(boolean join, EventType[] typesPerStream) throws ExprValidationException {
return null;
}
}
| [
"qinjie2012@163.com"
] | qinjie2012@163.com |
0335ee60e7c965702a686259919f4619a4fb917f | a2881dfb3246eebda78c695ede7f5aa0b426aec9 | /1.7.10 obfuscated/e/ee.java | f321139b8f651914994647667c2f7ee76cab6b0d | [] | no_license | Jckf/mc-dev | ca03c1907b4b33c94a7bcb7a2067e3963bbf05d2 | 128dae1fe7e2b7772d89dcf130a49210bfd06aa3 | refs/heads/master | 2016-09-05T11:14:19.324416 | 2014-10-01T00:53:05 | 2014-10-01T00:53:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 395 | java | import java.util.ArrayList;
import java.util.Iterator;
class ee extends ec {
protected ArrayList b = new ArrayList();
public ee(String var1) {
this.a = var1;
}
public dy a() {
dq var1 = new dq();
Iterator var2 = this.b.iterator();
while(var2.hasNext()) {
ec var3 = (ec)var2.next();
var1.a(var3.a());
}
return var1;
}
}
| [
"jckf@jckf.no"
] | jckf@jckf.no |
2694e0106893e4d39c355213a54219784f18fdff | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Lang/14/org/apache/commons/lang3/ArrayUtils_add_4059.java | 276d17c9b2c5d24a5ea93810b5ca7de1b68c44cd | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 6,614 | java |
org apach common lang3
oper arrai primit arrai code
primit wrapper arrai code integ
handl code input gracefulli
except thrown code
arrai input object arrai code
element except method document behaviour
thread safe threadsaf
version
arrai util arrayutil
insert element posit arrai
shift element posit subsequ
element add indic
method return arrai element input
arrai element posit compon
type return arrai input
arrai
input arrai code element arrai return
compon type element
pre
arrai util arrayutil add
arrai util arrayutil add
arrai util arrayutil add
arrai util arrayutil add
pre
param arrai arrai add element code
param index posit object
param element object add
arrai exist element element
index bound except indexoutofboundsexcept index rang
index index arrai length
add arrai index element
add arrai index boolean valueof element boolean type
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
0f709eb5a2b00db550234e07a7dea6adb247bd93 | 95c82867f7233f4c48bc0aa9048080e52a4384c0 | /app/src/main/java/com/furestic/office/ppt/lxs/docx/pdf/viwer/reader/free/thirdpart/emf/io/EEXECEncryption.java | cd28a750bf85783e1cc26497b67fd84daf3976ff | [] | no_license | MayBenz/AllDocsReader | b4f2d4b788545c0ed476f20c845824ea7057f393 | 1914cde82471cb2bc21e00bb5ac336706febfd30 | refs/heads/master | 2023-01-06T04:03:43.564202 | 2020-10-16T13:14:09 | 2020-10-16T13:14:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,620 | java | // Copyright 2001 freehep
package com.furestic.office.ppt.lxs.docx.pdf.viwer.reader.free.thirdpart.emf.io;
//import java.util.Random;
import java.io.IOException;
import java.io.OutputStream;
/**
* Encrypts using the EEXEC form (Used by Type 1 fonts).
*
* @author Simon Fischer
* @version $Id: src/main/java/org/freehep/util/io/EEXECEncryption.java
* 96b41b903496 2005/11/21 19:50:18 duns $
*/
public class EEXECEncryption extends OutputStream implements EEXECConstants {
private int n, c1, c2, r;
private OutputStream out;
private boolean first = true;
/**
* Creates an EEXECEncryption from given stream.
*
* @param out
* stream to write
*/
public EEXECEncryption(OutputStream out) {
this(out, EEXEC_R, N);
}
/**
* Creates an EEXECEncryption from given stream.
*
* @param out
* stream to write
* @param r
*/
public EEXECEncryption(OutputStream out, int r) {
this(out, r, N);
}
/**
* Creates an EEXECEncryption from given stream.
*
* @param out
* stream to write
* @param r
* @param n
*/
public EEXECEncryption(OutputStream out, int r, int n) {
this.out = out;
this.c1 = C1;
this.c2 = C2;
this.r = r;
this.n = n;
}
private int encrypt(int plainByte) {
int cipher = (plainByte ^ (r >>> 8)) % 256;
r = ((cipher + r) * c1 + c2) % 65536;
return cipher;
}
public void write(int b) throws IOException {
if (first) {
for (int i = 0; i < n; i++) {
out.write(encrypt(0));
}
first = false;
}
out.write(encrypt(b));
}
public void flush() throws IOException {
super.flush();
out.flush();
}
public void close() throws IOException {
flush();
super.close();
out.close();
}
private static class IntOutputStream extends OutputStream {
int[] chars;
int i;
private IntOutputStream(int size) {
chars = new int[size];
i = 0;
}
public void write(int b) {
chars[i++] = b;
} // str += (char)b; }
// public String getString() { return str; }
private int[] getInts() {
return chars;
}
}
/**
* Encrypt array of characters.
*
* @param chars
* int array to encrypt
* @param r
* @param n
* @return encrypted array
* @throws IOException
* if write fails (never happens)
*/
public static int[] encryptString(int[] chars, int r, int n)
throws IOException {
IntOutputStream resultStr = new IntOutputStream(chars.length + 4);
EEXECEncryption eout = new EEXECEncryption(resultStr, r, n);
for (int i = 0; i < chars.length; i++) {
eout.write(chars[i]);
}
return resultStr.getInts();
}
}
| [
"zeeshanhayat61@gmail.com"
] | zeeshanhayat61@gmail.com |
bd18e5af9b6894058016194092b16177c7cb84ca | e3a37aaf17ec41ddc7051f04b36672db62a7863d | /business-service/report-service-project/report-service-interface/src/main/java/com/iot/report/dto/resp/DailyActivateDeviceTotalsResp.java | 4fe6158dd3b06846c3eb7ce54f6c3cc7683a924a | [] | no_license | github4n/cloud | 68477a7ecf81d1526b1b08876ca12cfe575f7788 | 7974042dca1ee25b433177e2fe6bda1de28d909a | refs/heads/master | 2020-04-18T02:04:33.509889 | 2019-01-13T02:19:32 | 2019-01-13T02:19:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 712 | java | package com.iot.report.dto.resp;
/**
*
* 项目名称:立达信IOT云平台
* 模块名称:设备日活总计出参
* 功能描述:设备日活总计出参
* 创建人: 李帅
* 创建时间:2019年1月8日 下午1:47:24
* 修改人:李帅
* 修改时间:2019年1月8日 下午1:47:24
*/
public class DailyActivateDeviceTotalsResp{
/**
* 日期
*/
private String dataDate;
/**
* 总量
*/
private Long totals;
public String getDataDate() {
return dataDate;
}
public void setDataDate(String dataDate) {
this.dataDate = dataDate;
}
public Long getTotals() {
return totals;
}
public void setTotals(Long totals) {
this.totals = totals;
}
}
| [
"qizhiyong@LDS-Z-C5497.LEEDARSON.LOCAL"
] | qizhiyong@LDS-Z-C5497.LEEDARSON.LOCAL |
6c86e6242c323157faee19ebb5ad35114057327d | 2612f336d667a087823234daf946f09b40d8ca3d | /jps/model-impl/src/org/jetbrains/jps/model/jarRepository/impl/JpsRemoteRepositoriesConfigurationImpl.java | 51e6685d900d3041071d32d7ae51080fb281926f | [
"Apache-2.0"
] | permissive | tnorbye/intellij-community | df7f181861fc5c551c02c73df3b00b70ab2dd589 | f01cf262fc196bf4dbb99e20cd937dee3705a7b6 | refs/heads/master | 2021-04-06T06:57:57.974599 | 2018-03-13T17:37:00 | 2018-03-13T17:37:00 | 125,079,130 | 2 | 0 | Apache-2.0 | 2018-03-13T16:09:41 | 2018-03-13T16:09:41 | null | UTF-8 | Java | false | false | 2,721 | java | /*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jps.model.jarRepository.impl;
import com.intellij.util.SmartList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.model.JpsElementChildRole;
import org.jetbrains.jps.model.ex.JpsElementBase;
import org.jetbrains.jps.model.ex.JpsElementChildRoleBase;
import org.jetbrains.jps.model.jarRepository.JpsRemoteRepositoriesConfiguration;
import org.jetbrains.jps.model.jarRepository.JpsRemoteRepositoryDescription;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
* @author Eugene Zhuravlev
*/
public class JpsRemoteRepositoriesConfigurationImpl extends JpsElementBase<JpsRemoteRepositoriesConfigurationImpl> implements JpsRemoteRepositoriesConfiguration{
public static final JpsElementChildRole<JpsRemoteRepositoriesConfiguration> ROLE = JpsElementChildRoleBase.create("remote repositories configuration");
private final List<JpsRemoteRepositoryDescription> myRepositories = new SmartList<>();
public JpsRemoteRepositoriesConfigurationImpl() {
this(Arrays.asList( // defaults
new JpsRemoteRepositoryDescription("central", "Maven Central repository", "https://repo1.maven.org/maven2"),
new JpsRemoteRepositoryDescription("jboss.community", "JBoss Community repository", "https://repository.jboss.org/nexus/content/repositories/public/")
));
}
public JpsRemoteRepositoriesConfigurationImpl(List<JpsRemoteRepositoryDescription> repositories) {
myRepositories.addAll(repositories);
}
@NotNull
@Override
public JpsRemoteRepositoriesConfigurationImpl createCopy() {
return new JpsRemoteRepositoriesConfigurationImpl(myRepositories);
}
@Override
public void applyChanges(@NotNull JpsRemoteRepositoriesConfigurationImpl modified) {
setRepositories(modified.getRepositories());
}
@Override
public List<JpsRemoteRepositoryDescription> getRepositories() {
return Collections.unmodifiableList(myRepositories);
}
@Override
public void setRepositories(List<JpsRemoteRepositoryDescription> repositories) {
myRepositories.clear();
myRepositories.addAll(repositories);
}
}
| [
"jeka@intellij.com"
] | jeka@intellij.com |
a54390bb42a96c299c9236388a34f0380385a184 | 7802e86c18679418838d53846b714b86c6510c3a | /ocs/src/main/java/com/it/ocs/common/ex/BussinessException.java | c3b4014a17969cd2abdc08c12a003180536f6f9e | [] | no_license | 397946820/project | 5d15886dd25b3ee9b6d8c2c7cb3273fa39b0de3d | c2c42103484c7c73c7f45069acdd8211c161cacf | refs/heads/master | 2022-01-27T03:38:25.781786 | 2019-07-22T07:31:17 | 2019-07-22T07:31:17 | 198,165,241 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 711 | java | package com.it.ocs.common.ex;
/**
* 定义一个业务异常类
* @see
* 有些业务错误的提示信息需要以异常形式往外抛,catch时通过异常类型进行辨别。</br>
* 例如:因为业务原因需要中断一个事务,且需要将原因告知事务外部调用者。
* @author zhouyancheng
*
*/
public class BussinessException extends Exception {
private static final long serialVersionUID = -8768959212812095371L;
public BussinessException() {
super();
}
public BussinessException(String message) {
super(message);
}
public BussinessException(Throwable e) {
super(e);
}
public BussinessException(String message, Throwable e) {
super(message, e);
}
}
| [
"linxianxiong@cnest.net"
] | linxianxiong@cnest.net |
07035457490eebbfd89352e9340206c9e8bb8677 | 43bf460c82c006e5e916c07d8645aad5c675b84b | /ken-spring-3.0/src/main/java/org/springframework/jdbc/core/ArgPreparedStatementSetter.java | 57fa1b17ea081fcdaab15edf27a1bb40580937be | [] | no_license | cghr/cme-2.5 | 31086f77e76b0357cc9e4134b25d73c5220774f3 | c87d64495d77dad182e2bb99e024fa3295861b92 | refs/heads/master | 2016-09-09T19:47:25.182951 | 2014-04-30T05:53:00 | 2014-04-30T05:53:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,953 | java | /* 1: */ package org.springframework.jdbc.core;
/* 2: */
/* 3: */ import java.sql.PreparedStatement;
/* 4: */ import java.sql.SQLException;
/* 5: */
/* 6: */ class ArgPreparedStatementSetter
/* 7: */ implements PreparedStatementSetter, ParameterDisposer
/* 8: */ {
/* 9: */ private final Object[] args;
/* 10: */
/* 11: */ public ArgPreparedStatementSetter(Object[] args)
/* 12: */ {
/* 13:38 */ this.args = args;
/* 14: */ }
/* 15: */
/* 16: */ public void setValues(PreparedStatement ps)
/* 17: */ throws SQLException
/* 18: */ {
/* 19:43 */ if (this.args != null) {
/* 20:44 */ for (int i = 0; i < this.args.length; i++)
/* 21: */ {
/* 22:45 */ Object arg = this.args[i];
/* 23:46 */ doSetValue(ps, i + 1, arg);
/* 24: */ }
/* 25: */ }
/* 26: */ }
/* 27: */
/* 28: */ protected void doSetValue(PreparedStatement ps, int parameterPosition, Object argValue)
/* 29: */ throws SQLException
/* 30: */ {
/* 31:60 */ if ((argValue instanceof SqlParameterValue))
/* 32: */ {
/* 33:61 */ SqlParameterValue paramValue = (SqlParameterValue)argValue;
/* 34:62 */ StatementCreatorUtils.setParameterValue(ps, parameterPosition, paramValue, paramValue.getValue());
/* 35: */ }
/* 36: */ else
/* 37: */ {
/* 38:65 */ StatementCreatorUtils.setParameterValue(ps, parameterPosition, -2147483648, argValue);
/* 39: */ }
/* 40: */ }
/* 41: */
/* 42: */ public void cleanupParameters()
/* 43: */ {
/* 44:70 */ StatementCreatorUtils.cleanupParameters(this.args);
/* 45: */ }
/* 46: */ }
/* Location: Z:\home\sagpatke\cme-workspace\cme\ken-spring-3.0\ken-spring-3.0.jar
* Qualified Name: org.springframework.jdbc.core.ArgPreparedStatementSetter
* JD-Core Version: 0.7.0.1
*/ | [
"sagarpatke@gmail.com"
] | sagarpatke@gmail.com |
a43880732c89334697d96333cebda0ef7865b004 | de0d18c1e0bfd47d44cbb3e3a66975e005953589 | /Java/workspace/30-Swing/src/calendar/HCalendar.java | 8dca5b1db704901529b089f90b4ac2c3b7c71c58 | [] | no_license | ohet9409/Git | a2ffd29ba1d9fa97f29471477f092e2579436425 | b92dd387ba0d3c9d719ea501a1f32da942ae6f6c | refs/heads/master | 2022-12-22T01:15:43.603058 | 2019-08-16T13:08:41 | 2019-08-16T13:08:41 | 202,706,298 | 0 | 0 | null | 2022-12-16T00:36:57 | 2019-08-16T10:13:14 | Java | UHC | Java | false | false | 1,461 | java | package calendar;
import java.util.Calendar;
import javax.swing.JButton;
// 날짜 계산
public class HCalendar {
JButton[] buttons;
Calendar calendar;
int year, month;
public HCalendar() {
calendar= Calendar.getInstance();
year = calendar.get(Calendar.YEAR);
month = calendar.get(Calendar.MONTH)+1; // 0 -> 1월
}
public void setButtons(JButton[] buttons) {
this.buttons = buttons;
}
// Label에 출력할 년,월 문자열
public String getCalText() {
return year +"년 " + month + "월";
}
// 달력을 새로운 년월로 새로 그리기
public void allInit(int gap) {
// 버튼의 날짜 지우기
for(int i =7; i<buttons.length; i++) {
buttons[i].setText("");
}
// 년, 월 수정
calInput(gap);
// 버튼에 날짜 출력하기
calSet();
}
// 년,월 수정
private void calInput(int gap) {
month += gap;
if(month <=0) {
month=12;
year--;
} else if(month>=13) {
month = 1;
year++;
}
}
// 버튼에 날짜 출력하기
public void calSet() {
calendar.set(year,month-1,1); // 날짜 수정
// 1일이 시작되는 요일 수 = 요일 수 - 1
// => 요일 수가 1부터 시작, 배열은 0부터 시작
int firstDay = calendar.get(Calendar.DAY_OF_WEEK)-1;
for(int i=1; i<=calendar.getActualMaximum(Calendar.DATE);i++) {
// buttons[0] ~ [6] : 일~토
// 그 달의 1일은 buttons[6+(요일수-1) + i]
buttons[6+firstDay+i].setText(String.valueOf(i));
}
}
}
| [
"dhdmsxor1@naver.com"
] | dhdmsxor1@naver.com |
9dfc2a01cbc0f282bf10085b8099ecf52deb0774 | f766baf255197dd4c1561ae6858a67ad23dcda68 | /app/src/main/java/com/tencent/mm/plugin/backup/h/ac.java | 09eb3a6605d9a3337238f1e0f48d3a17b5453c8c | [] | 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 | 5,071 | java | package com.tencent.mm.plugin.backup.h;
import java.util.LinkedList;
public final class ac
extends com.tencent.mm.bk.a
{
public int hbr;
public q hcW;
public p hcX;
public r hcY;
public s hcZ;
public int hcd;
protected final int a(int paramInt, Object... paramVarArgs)
{
int i;
if (paramInt == 0)
{
paramVarArgs = (f.a.a.c.a)paramVarArgs[0];
paramVarArgs.fT(1, this.hbr);
paramVarArgs.fT(2, this.hcd);
if (this.hcW != null)
{
paramVarArgs.fV(3, this.hcW.boi());
this.hcW.a(paramVarArgs);
}
if (this.hcX != null)
{
paramVarArgs.fV(4, this.hcX.boi());
this.hcX.a(paramVarArgs);
}
if (this.hcY != null)
{
paramVarArgs.fV(5, this.hcY.boi());
this.hcY.a(paramVarArgs);
}
if (this.hcZ != null)
{
paramVarArgs.fV(6, this.hcZ.boi());
this.hcZ.a(paramVarArgs);
}
i = 0;
}
do
{
return i;
if (paramInt != 1) {
break;
}
i = f.a.a.a.fQ(1, this.hbr) + 0 + f.a.a.a.fQ(2, this.hcd);
paramInt = i;
if (this.hcW != null) {
paramInt = i + f.a.a.a.fS(3, this.hcW.boi());
}
i = paramInt;
if (this.hcX != null) {
i = paramInt + f.a.a.a.fS(4, this.hcX.boi());
}
paramInt = i;
if (this.hcY != null) {
paramInt = i + f.a.a.a.fS(5, this.hcY.boi());
}
i = paramInt;
} while (this.hcZ == null);
return paramInt + f.a.a.a.fS(6, this.hcZ.boi());
if (paramInt == 2)
{
paramVarArgs = new f.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler);
for (paramInt = com.tencent.mm.bk.a.a(paramVarArgs); paramInt > 0; paramInt = com.tencent.mm.bk.a.a(paramVarArgs)) {
if (!super.a(paramVarArgs, this, paramInt)) {
paramVarArgs.cJS();
}
}
return 0;
}
if (paramInt == 3)
{
Object localObject1 = (f.a.a.a.a)paramVarArgs[0];
ac localac = (ac)paramVarArgs[1];
paramInt = ((Integer)paramVarArgs[2]).intValue();
Object localObject2;
boolean bool;
switch (paramInt)
{
default:
return -1;
case 1:
localac.hbr = ((f.a.a.a.a)localObject1).vHC.rY();
return 0;
case 2:
localac.hcd = ((f.a.a.a.a)localObject1).vHC.rY();
return 0;
case 3:
paramVarArgs = ((f.a.a.a.a)localObject1).IC(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject2 = (byte[])paramVarArgs.get(paramInt);
localObject1 = new q();
localObject2 = new f.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (bool = true; bool; bool = ((q)localObject1).a((f.a.a.a.a)localObject2, (com.tencent.mm.bk.a)localObject1, com.tencent.mm.bk.a.a((f.a.a.a.a)localObject2))) {}
localac.hcW = ((q)localObject1);
paramInt += 1;
}
return 0;
case 4:
paramVarArgs = ((f.a.a.a.a)localObject1).IC(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject2 = (byte[])paramVarArgs.get(paramInt);
localObject1 = new p();
localObject2 = new f.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (bool = true; bool; bool = ((p)localObject1).a((f.a.a.a.a)localObject2, (com.tencent.mm.bk.a)localObject1, com.tencent.mm.bk.a.a((f.a.a.a.a)localObject2))) {}
localac.hcX = ((p)localObject1);
paramInt += 1;
}
return 0;
case 5:
paramVarArgs = ((f.a.a.a.a)localObject1).IC(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject2 = (byte[])paramVarArgs.get(paramInt);
localObject1 = new r();
localObject2 = new f.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (bool = true; bool; bool = ((r)localObject1).a((f.a.a.a.a)localObject2, (com.tencent.mm.bk.a)localObject1, com.tencent.mm.bk.a.a((f.a.a.a.a)localObject2))) {}
localac.hcY = ((r)localObject1);
paramInt += 1;
}
return 0;
}
paramVarArgs = ((f.a.a.a.a)localObject1).IC(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject2 = (byte[])paramVarArgs.get(paramInt);
localObject1 = new s();
localObject2 = new f.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (bool = true; bool; bool = ((s)localObject1).a((f.a.a.a.a)localObject2, (com.tencent.mm.bk.a)localObject1, com.tencent.mm.bk.a.a((f.a.a.a.a)localObject2))) {}
localac.hcZ = ((s)localObject1);
paramInt += 1;
}
return 0;
}
return -1;
}
}
/* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes4-dex2jar.jar!/com/tencent/mm/plugin/backup/h/ac.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"526687570@qq.com"
] | 526687570@qq.com |
5ff12c769be6dac2d19c52a713c6cce8ef7351a1 | 682852aaf916769dce62c2a5c072656bc21b6e48 | /user-service/client/src/main/java/hr/wozai/service/user/client/conversation/dto/ConvrSourceChartListDTO.java | d0c8b6b07c06b3054b271e8b447ad162a9c076ee | [] | no_license | transienthm/rencaiyi | aaa059ef995d1e46836c750d1e894464151be392 | ca2be8bdae518f658e5443c3b55e17e733d2c5ea | refs/heads/master | 2021-08-19T12:16:00.550506 | 2017-11-26T06:13:12 | 2017-11-26T06:13:12 | 112,060,238 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,250 | java | package hr.wozai.service.user.client.conversation.dto;
import com.facebook.swift.codec.ThriftField;
import com.facebook.swift.codec.ThriftStruct;
import hr.wozai.service.servicecommons.thrift.dto.ServiceStatusDTO;
import java.util.List;
/**
* Created by wangbin on 2016/12/8.
*/
@ThriftStruct
public final class ConvrSourceChartListDTO {
private ServiceStatusDTO serviceStatusDTO;
private List<ConvrSourceChartDTO> convrSourceChartDTOs;
private Long totalNumber;
@ThriftField(1)
public ServiceStatusDTO getServiceStatusDTO() {
return serviceStatusDTO;
}
@ThriftField
public void setServiceStatusDTO(ServiceStatusDTO serviceStatusDTO) {
this.serviceStatusDTO = serviceStatusDTO;
}
@ThriftField(2)
public List<ConvrSourceChartDTO> getConvrSourceChartDTOs() {
return convrSourceChartDTOs;
}
@ThriftField
public void setConvrSourceChartDTOs(List<ConvrSourceChartDTO> convrSourceChartDTOs) {
this.convrSourceChartDTOs = convrSourceChartDTOs;
}
@ThriftField(3)
public Long getTotalNumber() {
return totalNumber;
}
@ThriftField
public void setTotalNumber(Long totalNumber) {
this.totalNumber = totalNumber;
}
}
| [
"cab@DESKTOP-OATNVVG.localdomain"
] | cab@DESKTOP-OATNVVG.localdomain |
3c54434196964c450f3d8c45dbdb835a13f02b36 | bdb5d205d56ef9e0f523be1c3fd683400f7057a5 | /app/src/main/java/com/tgf/kcwc/mvp/view/PreSeecarView.java | 16d884f1a6d046c95ecce8f9e88c1a0fb02903af | [] | no_license | yangyusong1121/Android-car | f8fbd83b8efeb2f0e171048103f2298d96798f9e | d6215e7a59f61bd7f15720c8e46423045f41c083 | refs/heads/master | 2020-03-11T17:25:07.154083 | 2018-04-19T02:18:15 | 2018-04-19T02:20:19 | 130,146,301 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 409 | java | package com.tgf.kcwc.mvp.view;
import com.tgf.kcwc.mvp.model.Pagination;
import com.tgf.kcwc.mvp.model.PreSeecarModel;
import java.util.ArrayList;
/**
* Auther: Scott
* Date: 2017/3/9 0009
* E-mail:hekescott@qq.com
*/
public interface PreSeecarView extends WrapView {
void showPreBuylist(ArrayList<PreSeecarModel.PreSeecarItem> preBuyItemList);
void showListCount(Pagination pagination);
}
| [
"328797668@qq.com"
] | 328797668@qq.com |
55a74eb757710e3881a5e7ee75cd494756aeab0d | 1bc72e67b25b721af8c0d5c8c3937f184f9cfc9b | /app/src/main/java/cn/com/timemachine/ui/base/BaseLazyFragment.java | 39ecf5304aea2945c4c1f08f8619f1b86c80ea31 | [] | no_license | Mexicande/NewTime | 9c23d4c7a683d13b877dfb3097a544df84ea48c7 | b4bd0fab9fad473d6648330999e4e6cdd8082d03 | refs/heads/master | 2020-03-19T07:59:48.340178 | 2018-06-05T11:25:28 | 2018-06-05T11:25:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,151 | java | package cn.com.timemachine.ui.base;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.gyf.barlibrary.ImmersionBar;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import cn.com.timemachine.R;
/**
* Created by apple on 2017/11/20.
*/
public abstract class BaseLazyFragment extends Fragment {
protected Activity mActivity;
protected View mRootView;
private AlertDialog mAlertDialog;
protected static final int REQUEST_STORAGE_READ_ACCESS_PERMISSION = 101;
protected static final int REQUEST_STORAGE_WRITE_ACCESS_PERMISSION = 102;
/**
* 是否对用户可见
*/
protected boolean mIsVisible;
/**
* 是否加载完成
* 当执行完onViewCreated方法后即为true
*/
protected boolean mIsPrepare;
/**
* 是否加载完成
* 当执行完onViewCreated方法后即为true
*/
protected boolean mIsImmersion;
protected ImmersionBar mImmersionBar;
private Unbinder unbinder;
@Override
public void onAttach(Context context) {
super.onAttach(context);
mActivity = (Activity) context;
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
mRootView = inflater.inflate(setLayoutId(), container, false);
return mRootView;
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
unbinder = ButterKnife.bind(this, mRootView);
if (isLazyLoad()) {
mIsPrepare = true;
mIsImmersion = true;
onLazyLoad();
} else {
initData();
if (isImmersionBarEnabled()) {
initImmersionBar();
}
}
initView();
setListener();
}
@Override
public void onDestroy() {
super.onDestroy();
if(unbinder!=null){
unbinder.unbind();
}
if (mImmersionBar != null)
mImmersionBar.destroy();
}
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (getUserVisibleHint()) {
mIsVisible = true;
onVisible();
} else {
mIsVisible = false;
onInvisible();
}
}
/**
* 是否懒加载
*
* @return the boolean
*/
protected boolean isLazyLoad() {
return true;
}
/**
* 是否在Fragment使用沉浸式
*
* @return the boolean
*/
protected boolean isImmersionBarEnabled() {
return true;
}
/**
* 用户可见时执行的操作
*/
protected void onVisible() {
onLazyLoad();
}
private void onLazyLoad() {
if (mIsVisible && mIsPrepare) {
mIsPrepare = false;
initData();
}
if (mIsVisible && mIsImmersion && isImmersionBarEnabled()) {
initImmersionBar();
}
}
/**
* Sets layout id.
*
* @return the layout id
*/
protected abstract int setLayoutId();
/**
* 初始化数据
*/
protected void initData() {
}
/**
* 初始化沉浸式
*/
protected void initImmersionBar() {
mImmersionBar = ImmersionBar.with(this);
// mImmersionBar.keyboardEnable(true).navigationBarWithKitkatEnable(false).init();
}
/**
* view与数据绑定
*/
protected void initView() {
}
/**
* 设置监听
*/
protected void setListener() {
}
/**
* 用户不可见执行
*/
protected void onInvisible() {
}
/**
* 找到activity的控件
*
* @param <T> the type parameter
* @param id the id
* @return the t
*/
@SuppressWarnings("unchecked")
protected <T extends View> T findActivityViewById(@IdRes int id) {
return (T) mActivity.findViewById(id);
}
protected void requestPermission(final String permission, String rationale, final int requestCode) {
if (ActivityCompat.shouldShowRequestPermissionRationale(mActivity, permission)) {
showAlertDialog(getString(R.string.permission_title_rationale), rationale,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
ActivityCompat.requestPermissions(mActivity,
new String[]{permission}, requestCode);
}
}, getString(R.string.label_ok), null, getString(R.string.label_cancel));
} else {
ActivityCompat.requestPermissions(mActivity, new String[]{permission}, requestCode);
}
}
protected void showAlertDialog(@Nullable String title, @Nullable String message,
@Nullable DialogInterface.OnClickListener onPositiveButtonClickListener,
@NonNull String positiveText,
@Nullable DialogInterface.OnClickListener onNegativeButtonClickListener,
@NonNull String negativeText) {
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
builder.setTitle(title);
builder.setMessage(message);
builder.setPositiveButton(positiveText, onPositiveButtonClickListener);
builder.setNegativeButton(negativeText, onNegativeButtonClickListener);
mAlertDialog = builder.show();
}
}
| [
"mexicande@hotmail.com"
] | mexicande@hotmail.com |
a6a736ff22a9a6015a8bbfe3bbac391a143e6f50 | c5765db45df294be9791e2fbcca65ffe2844bf22 | /src/main/java/com/qd/modules/monitor/utils/SystemInfo.java | c6912b36353be8566e6e63931be634c8f8149f9d | [
"Apache-2.0"
] | permissive | guohaolei/harry | f7993f09a4c65982e69125769e46a85bc7473f45 | 54fca65e0c500d7705bcffcbb21f5830b9d23eda | refs/heads/master | 2020-12-02T19:44:01.861952 | 2017-06-15T09:41:06 | 2017-06-15T09:41:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,637 | java | package com.qd.modules.monitor.utils;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import org.hyperic.sigar.CpuPerc;
import org.hyperic.sigar.FileSystem;
import org.hyperic.sigar.FileSystemUsage;
import org.hyperic.sigar.Mem;
import org.hyperic.sigar.Sigar;
import org.hyperic.sigar.Swap;
public class SystemInfo {
public static Map SystemProperty() {
Map<String, Comparable> monitorMap = new HashMap();
Runtime r = Runtime.getRuntime();
Properties props = System.getProperties();
InetAddress addr = null;
String ip = "";
String hostName = "";
try {
addr = InetAddress.getLocalHost();
} catch (UnknownHostException e) {
ip = "无法获取主机IP";
hostName = "无法获取主机名";
}
if (null != addr) {
try {
ip = addr.getHostAddress();
} catch (Exception e) {
ip = "无法获取主机IP";
}
try {
hostName = addr.getHostName();
} catch (Exception e) {
hostName = "无法获取主机名";
}
}
monitorMap.put("hostIp", ip);// 本地ip地址
monitorMap.put("hostName", hostName);// 本地主机名
monitorMap.put("osName", props.getProperty("os.name"));// 操作系统的名称
monitorMap.put("arch", props.getProperty("os.arch"));// 操作系统的构架
monitorMap.put("osVersion", props.getProperty("os.version"));// 操作系统的版本
monitorMap.put("processors", r.availableProcessors());// JVM可以使用的处理器个数
monitorMap.put("javaVersion", props.getProperty("java.version"));// Java的运行环境版本
monitorMap.put("vendor", props.getProperty("java.vendor"));// Java的运行环境供应商
monitorMap.put("javaUrl", props.getProperty("java.vendor.url"));// Java供应商的URL
monitorMap.put("javaHome", props.getProperty("java.home"));// Java的安装路径
monitorMap.put("tmpdir", props.getProperty("java.io.tmpdir"));// 默认的临时文件路径
return monitorMap;
}
public static Map memory(Sigar sigar) {
Map<String, Object> monitorMap = new HashMap();
try {
Runtime r = Runtime.getRuntime();
monitorMap.put("jvmTotal", Common.div(r.totalMemory(), (1024 * 1024), 2) + "M");// java总内存
monitorMap.put("jvmUse", Common.div(r.totalMemory() - r.freeMemory(), (1024 * 1024), 2) + "M");// JVM使用内存
monitorMap.put("jvmFree", Common.div(r.freeMemory(), (1024 * 1024), 2) + "M");// JVM剩余内存
monitorMap.put("jvmUsage", Common.div(r.totalMemory() - r.freeMemory(), r.totalMemory(), 2));// JVM使用率
Mem mem = sigar.getMem();
// 内存总量
monitorMap.put("ramTotal", Common.div(mem.getTotal(), (1024 * 1024 * 1024), 2) + "G");// 内存总量
monitorMap.put("ramUse", Common.div(mem.getUsed(), (1024 * 1024 * 1024), 2) + "G");// 当前内存使用量
monitorMap.put("ramFree", Common.div(mem.getFree(), (1024 * 1024 * 1024), 2) + "G");// 当前内存剩余量
monitorMap.put("ramUsage", Common.div(mem.getUsed(), mem.getTotal(), 2));// 内存使用率
Swap swap = sigar.getSwap();
// 交换区总量
monitorMap.put("swapTotal", Common.div(swap.getTotal(), (1024 * 1024 * 1024), 2) + "G");
// 当前交换区使用量
monitorMap.put("swapUse", Common.div(swap.getUsed(), (1024 * 1024 * 1024), 2) + "G");
// 当前交换区剩余量
monitorMap.put("swapFree", Common.div(swap.getFree(), (1024 * 1024 * 1024), 2) + "G");
monitorMap.put("swapUsage", Common.div(swap.getUsed(), swap.getTotal(), 2));//
} catch (Exception e) {
}
return monitorMap;
}
public static Map usage(Sigar sigar) {
Map<String, Long> monitorMap = new HashMap();
try {
Runtime r = Runtime.getRuntime();
monitorMap.put("jvmUsage", Math.round(Common.div(r.totalMemory()-r.freeMemory(), r.totalMemory(), 2)*100));// JVM使用率
Mem mem = sigar.getMem();
// 内存总量
monitorMap.put("ramUsage", Math.round(Common.div(mem.getUsed(), mem.getTotal(), 2)*100));// 内存使用率
List<Map> cpu = cpuInfos(sigar);
double b = 0.0;
for (Map m : cpu) {
b += Double.valueOf(m.get("cpuTotal")+"");
}
monitorMap.put("cpuUsage", Math.round(b/cpu.size()));// cpu使用率
} catch (Exception e) {
}
return monitorMap;
}
public static List<Map> cpuInfos(Sigar sigar) {
List<Map> monitorMaps = new ArrayList<Map>();
try {
CpuPerc cpuList[] = sigar.getCpuPercList();
for (CpuPerc cpuPerc : cpuList) {
Map<String, Comparable> monitorMap = new HashMap();
monitorMap.put("cpuUserUse", Math.round(cpuPerc.getUser()*100));// 用户使用率
monitorMap.put("cpuSysUse", Math.round(cpuPerc.getSys()*100));// 系统使用率
monitorMap.put("cpuWait", Math.round(cpuPerc.getWait()*100));// 当前等待率
monitorMap.put("cpuFree", Math.round(cpuPerc.getIdle()*100));// 当前空闲率
monitorMap.put("cpuTotal",Math.round(cpuPerc.getCombined()*100));// 总的使用率
monitorMaps.add(monitorMap);
}
} catch (Exception e) {
}
return monitorMaps;
}
public List<Map> diskInfos(Sigar sigar) throws Exception {
List<Map> monitorMaps = new ArrayList<Map>();
FileSystem fslist[] = sigar.getFileSystemList();
for (int i = 0; i < fslist.length; i++) {
Map<Object, Object> monitorMap = new HashMap();
FileSystem fs = fslist[i];
// 文件系统类型名,比如本地硬盘、光驱、网络文件系统等
FileSystemUsage usage = null;
usage = sigar.getFileSystemUsage(fs.getDirName());
switch (fs.getType()) {
case 0: // TYPE_UNKNOWN :未知
break;
case 1: // TYPE_NONE
break;
case 2: // TYPE_LOCAL_DISK : 本地硬盘
monitorMap.put("diskName", fs.getDevName());// 系统盘名称
monitorMap.put("diskType", fs.getSysTypeName());// 盘类型
// 文件系统总大小
monitorMap.put("diskTotal", fs.getSysTypeName());
// 文件系统剩余大小
monitorMap.put("diskFree", usage.getFree());
// 文件系统已经使用量
monitorMap.put("diskUse", usage.getUsed());
double usePercent = usage.getUsePercent() * 100D;
// 文件系统资源的利用率
monitorMap.put("diskUsage", usePercent);// 内存使用率
monitorMaps.add(monitorMap);
break;
case 3:// TYPE_NETWORK :网络
break;
case 4:// TYPE_RAM_DISK :闪存
break;
case 5:// TYPE_CDROM :光驱
break;
case 6:// TYPE_SWAP :页面交换
break;
}
}
return monitorMaps;
}
}
| [
"183865800@qq.com"
] | 183865800@qq.com |
fdb2bfd4db1d573e31ee4aaae1ce18ce008e2d97 | 9254e7279570ac8ef687c416a79bb472146e9b35 | /sofa-20190815/src/main/java/com/aliyun/sofa20190815/models/RemoveLinkeLinktProjecttemplateResponseBody.java | e89defa4b1d396087d077f690e5601aa450369ca | [
"Apache-2.0"
] | permissive | lquterqtd/alibabacloud-java-sdk | 3eaa17276dd28004dae6f87e763e13eb90c30032 | 3e5dca8c36398469e10cdaaa34c314ae0bb640b4 | refs/heads/master | 2023-08-12T13:56:26.379027 | 2021-10-19T07:22:15 | 2021-10-19T07:22:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,806 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sofa20190815.models;
import com.aliyun.tea.*;
public class RemoveLinkeLinktProjecttemplateResponseBody extends TeaModel {
@NameInMap("RequestId")
public String requestId;
@NameInMap("ResultCode")
public String resultCode;
@NameInMap("ResultMessage")
public String resultMessage;
@NameInMap("Data")
public Boolean data;
@NameInMap("ErrorCode")
public Long errorCode;
@NameInMap("ErrorMessage")
public String errorMessage;
@NameInMap("ResponseStatusCode")
public Long responseStatusCode;
@NameInMap("Success")
public Boolean success;
public static RemoveLinkeLinktProjecttemplateResponseBody build(java.util.Map<String, ?> map) throws Exception {
RemoveLinkeLinktProjecttemplateResponseBody self = new RemoveLinkeLinktProjecttemplateResponseBody();
return TeaModel.build(map, self);
}
public RemoveLinkeLinktProjecttemplateResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
public RemoveLinkeLinktProjecttemplateResponseBody setResultCode(String resultCode) {
this.resultCode = resultCode;
return this;
}
public String getResultCode() {
return this.resultCode;
}
public RemoveLinkeLinktProjecttemplateResponseBody setResultMessage(String resultMessage) {
this.resultMessage = resultMessage;
return this;
}
public String getResultMessage() {
return this.resultMessage;
}
public RemoveLinkeLinktProjecttemplateResponseBody setData(Boolean data) {
this.data = data;
return this;
}
public Boolean getData() {
return this.data;
}
public RemoveLinkeLinktProjecttemplateResponseBody setErrorCode(Long errorCode) {
this.errorCode = errorCode;
return this;
}
public Long getErrorCode() {
return this.errorCode;
}
public RemoveLinkeLinktProjecttemplateResponseBody setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
return this;
}
public String getErrorMessage() {
return this.errorMessage;
}
public RemoveLinkeLinktProjecttemplateResponseBody setResponseStatusCode(Long responseStatusCode) {
this.responseStatusCode = responseStatusCode;
return this;
}
public Long getResponseStatusCode() {
return this.responseStatusCode;
}
public RemoveLinkeLinktProjecttemplateResponseBody setSuccess(Boolean success) {
this.success = success;
return this;
}
public Boolean getSuccess() {
return this.success;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
7b7cd0db5406e04142e7af5d5c533b3865c3f205 | 914c331b1d658b40490fbcbbc7d4ef0d872d320a | /src/b_generics/exercises/custom_list_plus_sorter_and_iterator/CustomList.java | ef4ac79e7a5bd2520651384020c0846e06e5e857 | [] | no_license | IvoIvanov77/JavaOOPAdvanced | 291f1295defb042ce4776b6bbc734ed4a04bc15a | 24eb208311b5b2225d0545a36ebc9c1fc653b32e | refs/heads/master | 2021-09-07T17:03:28.611084 | 2018-02-26T14:29:57 | 2018-02-26T14:29:57 | 110,591,188 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,427 | java | package b_generics.exercises.custom_list_plus_sorter_and_iterator;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.function.Consumer;
public class CustomList<T extends Comparable<T>> implements Iterable<T>{
private List<T> list;
public CustomList() {
this.list = new ArrayList<>();
}
public void add(T element){
this.list.add(element);
}
public T remove(int index){
return this.list.remove(index);
}
public boolean contains(T element){
return this.list.contains(element);
}
public void swap(int i, int j){
T item = this.list.get(i);
this.list.set(i, this.list.get(j));
this.list.set(j, item);
}
public int countGreaterThan(T element){
int count = 0;
for (T t : this.list) {
if(t.compareTo(element) > 0){
count ++;
}
}
return count;
}
public T getMax(){
if(this.list.isEmpty()){
return null;
}
T max = this.list.get(0);
for (T t : this.list) {
if(t.compareTo(max) > 0){
max = t;
}
}
return max;
}
public T getMin(){
if(this.list.isEmpty()){
return null;
}
T min = this.list.get(0);
for (T t : this.list) {
if(t.compareTo(min) < 0){
min = t;
}
}
return min;
}
public void sort() {
this.list.sort(Comparable::compareTo);
}
@Override
public String toString() {
if(this.list.isEmpty()){
return "";
}
StringBuilder b = new StringBuilder(this.list.get(0).toString());
for (int i = 1; i < this.list.size(); i++) {
b.append("\n").append(this.list.get(i));
}
return b.toString();
}
@Override
public Iterator<T> iterator() {
return new Iterator<T>() {
private int index = 0;
@Override
public boolean hasNext() {
return index < list.size();
}
@Override
public T next() {
T item = list.get(index);
index ++;
return item;
}
};
}
@Override
public void forEach(Consumer<? super T> action) {
}
}
| [
"ivanov_ir@abv.bg"
] | ivanov_ir@abv.bg |
67915cefaaf6b50c81787ea9b09163fa6ea63070 | 8b3670883f239413bdadda9c72b7b92669da2d11 | /Invoicex_main/src/it/tnx/invoicex/iu.java | 12e1c57a440711afd6b21f635f12d3c908a6aec4 | [] | no_license | landinialejandro/invoicex | ce1af405c49cc07b345776ea689d9a977022f588 | d36a417571a3295df08c53a1e75427f60aed014d | refs/heads/master | 2020-04-20T16:27:12.317904 | 2017-08-25T16:09:38 | 2017-08-25T16:09:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 409 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package it.tnx.invoicex;
import java.awt.event.MouseEvent;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import tnxbeans.tnxDbGrid;
/**
*
* @author Marco
*/
public class iu extends InvoicexUtil {
}
| [
"ginopc@tiscali.it"
] | ginopc@tiscali.it |
a6b81bcdea8a9c83db6cfb9973bb5784c443c679 | 605b6e800c0449736d7dfe86793b1c07bb0617b6 | /src/minecraft/net/minecraft/client/renderer/entity/RenderFallingBlock.java | 93daf7ec54d28e1514f1794e9bedd00369fa10da | [] | no_license | HaxDevsClub/WordStorm | 20f07737942cbda2cd8e7002c4c971ade0725461 | 79323e0848830016429307e76042844204cbed5f | refs/heads/master | 2020-12-24T10:14:57.662136 | 2016-11-07T17:36:41 | 2016-11-07T17:36:41 | 73,095,787 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,332 | java | package net.minecraft.client.renderer.entity;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BlockRendererDispatcher;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityFallingBlock;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
public class RenderFallingBlock extends Render
{
private static final String __OBFID = "CL_00000994";
public RenderFallingBlock(RenderManager renderManagerIn)
{
super(renderManagerIn);
this.shadowSize = 0.5F;
}
public void doRender(EntityFallingBlock fallingBlock, double p_180557_2_, double p_180557_4_, double p_180557_6_, float p_180557_8_, float p_180557_9_)
{
if (fallingBlock.getBlock() != null)
{
this.bindTexture(TextureMap.locationBlocksTexture);
IBlockState var10 = fallingBlock.getBlock();
Block var11 = var10.getBlock();
BlockPos var12 = new BlockPos(fallingBlock);
World var13 = fallingBlock.getWorldObj();
if (var10 != var13.getBlockState(var12) && var11.getRenderType() != -1)
{
if (var11.getRenderType() == 3)
{
GlStateManager.pushMatrix();
GlStateManager.translate((float)p_180557_2_, (float)p_180557_4_, (float)p_180557_6_);
GlStateManager.disableLighting();
Tessellator var14 = Tessellator.getInstance();
WorldRenderer var15 = var14.getWorldRenderer();
var15.startDrawingQuads();
var15.setVertexFormat(DefaultVertexFormats.BLOCK);
int var16 = var12.getX();
int var17 = var12.getY();
int var18 = var12.getZ();
var15.setTranslation((double)((float)(-var16) - 0.5F), (double)(-var17), (double)((float)(-var18) - 0.5F));
BlockRendererDispatcher var19 = Minecraft.getMinecraft().getBlockRendererDispatcher();
IBakedModel var20 = var19.getModelFromBlockState(var10, var13, (BlockPos)null);
var19.getBlockModelRenderer().renderModel(var13, var20, var10, var12, var15, false);
var15.setTranslation(0.0D, 0.0D, 0.0D);
var14.draw();
GlStateManager.enableLighting();
GlStateManager.popMatrix();
super.doRender(fallingBlock, p_180557_2_, p_180557_4_, p_180557_6_, p_180557_8_, p_180557_9_);
}
}
}
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(EntityFallingBlock entity)
{
return TextureMap.locationBlocksTexture;
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(Entity entity)
{
return this.getEntityTexture((EntityFallingBlock)entity);
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doe
*
* @param entityYaw The yaw rotation of the passed entity
*/
public void doRender(Entity entity, double x, double y, double z, float entityYaw, float partialTicks)
{
this.doRender((EntityFallingBlock)entity, x, y, z, entityYaw, partialTicks);
}
}
| [
"jaspersmit2801@gmail.com"
] | jaspersmit2801@gmail.com |
3ad598e0bcc981ae1985e75e3742fa1414b55258 | 83d56024094d15f64e07650dd2b606a38d7ec5f1 | /sicc_druida/fuentes/java/CalTipoEstadContaComboFormatter.java | 2ba413b05ffd402ad478434bdb8a42a3e15c532e | [] | no_license | cdiglesias/SICC | bdeba6af8f49e8d038ef30b61fcc6371c1083840 | 72fedb14a03cb4a77f62885bec3226dbbed6a5bb | refs/heads/master | 2021-01-19T19:45:14.788800 | 2016-04-07T16:20:51 | 2016-04-07T16:20:51 | null | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 2,687 | java |
/*
INDRA/CAR/mmg
$Id: CalTipoEstadContaComboFormatter.java,v 1.1 2009/12/03 18:34:22 pecbazalar Exp $
DESC
*/
/*
INDRA/CAR/mmg
$Id: CalTipoEstadContaComboFormatter.java,v 1.1 2009/12/03 18:34:22 pecbazalar Exp $
fdsfdsf
DRUIDATARGET=/install/cvsiniciales
*/
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import java.util.TreeMap;
import java.util.Vector;
import es.indra.belcorp.mso.*;
import es.indra.druida.DruidaFormatoObjeto;
import es.indra.druida.belcorp.MMGDruidaFormatoObjeto;
import es.indra.druida.belcorp.MMGDruidaHelper;
import es.indra.mare.common.dto.IMareDTO;
import es.indra.utils.*;
/**
* Clase de formateo de objetos "CalTipoEstadConta" para Druida
*
* @author Indra
*/
public class CalTipoEstadContaComboFormatter extends MMGDruidaFormatoObjeto {
public CalTipoEstadContaComboFormatter() {
}
public void formatea(String s, Object obj) throws Exception {
IMareDTO dto = (IMareDTO) obj;
Vector calTipoEstadContaCombo = (Vector) dto.getProperty("result");
Vector result = new Vector();
//Ordenamos los elementos
//TreeMap orderBy = new TreeMap();
TreeMap orderBy = new TreeMap(new Comparador());
for(int i=0; i< calTipoEstadContaCombo.size(); i++){
CalTipoEstadContaData calTipoEstadContaData = (CalTipoEstadContaData)calTipoEstadContaCombo.get(i);
String description = calTipoEstadContaData.getDescripcion() != null ?
FormatUtils.formatObject(calTipoEstadContaData.getDescripcion(),
MMGDruidaHelper.getUserDecimalFormatPattern(this),
MMGDruidaHelper.getUserDecimalFormatSymbols(this)) : "";
orderBy.put(description.toUpperCase(), calTipoEstadContaData);
}
//Construimos cada fila con los valores de la clave y la descripción del elemento que se mostrará en el combo
for (Iterator it = orderBy.entrySet().iterator() ; it.hasNext();) {
CalTipoEstadContaData calTipoEstadContaData = (CalTipoEstadContaData)((Map.Entry)it.next()).getValue();
Vector row = new Vector();
// Añadir la clave
Hashtable primaryKey = calTipoEstadContaData.mmgGetPrimaryKey();
Enumeration keys = primaryKey.keys();
while (keys.hasMoreElements()) {
Object element = primaryKey.get(keys.nextElement());
row.add((element != null ? element.toString() : ""));
}
// Añadir el atributo choice
row.add((calTipoEstadContaData.getDescripcion() != null ?
FormatUtils.formatObject(calTipoEstadContaData.getDescripcion(),
MMGDruidaHelper.getUserDecimalFormatPattern(this),
MMGDruidaHelper.getUserDecimalFormatSymbols(this)) : ""));
result.add(row);
}
setCampo(s, result);
}
}
| [
"hp.vega@hotmail.com"
] | hp.vega@hotmail.com |
6463192af4d4871269fe6b952d76decd67584d17 | 19490fcc6f396eeb35a9234da31e7b615abf6d04 | /JDownloader/src/jd/plugins/decrypter/PerpLinksCom.java | 1d7551683f4ec0c6215e7131baf8b34d7a40c331 | [] | no_license | amicom/my-project | ef72026bb91694e74bc2dafd209a1efea9deb285 | 951c67622713fd89448ffe6e0983fe3f934a7faa | refs/heads/master | 2021-01-02T09:15:45.828528 | 2015-09-06T15:57:01 | 2015-09-06T15:57:01 | 41,953,961 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,712 | java | //jDownloader - Downloadmanager
//Copyright (C) 2009 JD-Team support@jdownloader.org
//
//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 jd.plugins.decrypter;
import java.util.ArrayList;
import jd.PluginWrapper;
import jd.controlling.ProgressController;
import jd.nutils.encoding.Encoding;
import jd.plugins.CryptedLink;
import jd.plugins.DecrypterPlugin;
import jd.plugins.DownloadLink;
import jd.plugins.FilePackage;
import jd.plugins.PluginForDecrypt;
@DecrypterPlugin(revision = "$Revision: 20458 $", interfaceVersion = 2, names = { "perplinks.com" }, urls = { "http://(www\\.)?perplinks\\.com/files/l/[a-z0-9]+" }, flags = { 0 })
public class PerpLinksCom extends PluginForDecrypt {
public PerpLinksCom(PluginWrapper wrapper) {
super(wrapper);
}
public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception {
ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>();
final String parameter = param.toString();
br.getPage(parameter);
if (br.containsHTML("<b>Warning</b>: mysql_connect()")) {
logger.info("Link offline (server error): " + parameter);
return decryptedLinks;
}
final String fpName = br.getRegex("<i><small>([^<>\"]*?)</small>").getMatch(0);
final String[] links = br.getRegex("<a href=\"(https?://[^<>\"]*?)\"").getColumn(0);
if (links == null || links.length == 0) {
logger.warning("Decrypter broken for link: " + parameter);
return null;
}
for (String singleLink : links)
if (!singleLink.matches("http://(www\\.)?perplinks\\.com/files/l/[a-z0-9]+")) decryptedLinks.add(createDownloadlink(singleLink));
if (fpName != null) {
final FilePackage fp = FilePackage.getInstance();
fp.setName(Encoding.htmlDecode(fpName.trim()));
fp.addLinks(decryptedLinks);
}
return decryptedLinks;
}
/* NO OVERRIDE!! */
public boolean hasCaptcha(CryptedLink link, jd.plugins.Account acc) {
return false;
}
} | [
"amicom.pro@gmail.com"
] | amicom.pro@gmail.com |
02a4d3b47d2273760112d7316d2c232ff5aa3efd | 66f7fcbdf8d73576c74bf14ee6540d76fa96d20c | /src/main/java/dev/cheerfun/pixivic/biz/web/notify/po/NotifyRemindSummary.java | 140cd5d5e74cc7a2dcd43c6be5cf27b9c6b47471 | [
"Apache-2.0"
] | permissive | gorkemzurnaci/Pixiv-Illustration-Collection-Backend | 62dd45c5f71afa366221a4f04e04b73dfdab1ef3 | 315cc4fbe002481edd32de2df34709ffc27a1a95 | refs/heads/master | 2023-09-05T09:28:22.647298 | 2021-11-06T09:53:31 | 2021-11-06T09:53:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 304 | java | package dev.cheerfun.pixivic.biz.web.notify.po;
import lombok.Data;
/**
* @author OysterQAQ
* @version 1.0
* @date 2020/10/11 12:19 AM
* @description NotifyRemindSummary
*/
@Data
public class NotifyRemindSummary {
private Integer type;
private Integer unread;
private Integer total;
}
| [
"oysterqaq@gmail.com"
] | oysterqaq@gmail.com |
3c73b10055d5409b2ffc09ca606712e7c5d1def0 | 5f7149583cbe2e556b8bd4677f3654ed810b2c03 | /gen/net/masterthought/dlanguage/psi/impl/DLanguageForeachTypeImpl.java | f11e1ca4cdf630776a3e4adb5d09d3cc6d06edb1 | [] | no_license | FrankLIKE/DLanguage | 73426dc1d845e7eb65e2dc8aa7728f3aa7eaa293 | 9e8dda435e5b8d07c422bd30b330e535cbcdf1ae | refs/heads/master | 2021-01-22T03:08:30.845571 | 2014-12-17T20:52:54 | 2014-12-17T20:52:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | true | 1,116 | java | // This is a generated file. Not intended for manual editing.
package net.masterthought.dlanguage.psi.impl;
import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiElementVisitor;
import com.intellij.psi.util.PsiTreeUtil;
import static net.masterthought.dlanguage.psi.DLanguageTypes.*;
import com.intellij.extapi.psi.ASTWrapperPsiElement;
import net.masterthought.dlanguage.psi.*;
public class DLanguageForeachTypeImpl extends ASTWrapperPsiElement implements DLanguageForeachType {
public DLanguageForeachTypeImpl(ASTNode node) {
super(node);
}
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof DLanguageVisitor) ((DLanguageVisitor)visitor).visitForeachType(this);
else super.accept(visitor);
}
@Override
@Nullable
public DLanguageType getType() {
return findChildByClass(DLanguageType.class);
}
@Override
@Nullable
public DLanguageTypeConstructors getTypeConstructors() {
return findChildByClass(DLanguageTypeConstructors.class);
}
}
| [
"kingsleyhendrickse@me.com"
] | kingsleyhendrickse@me.com |
4c741823c732e79d4fa96ad8171d6637d46506c1 | 7dc692fe30c9dcb7c92d5aca98750f0cb3ce0429 | /src/main/java/pers/laineyc/blackdream/generator/service/parameter/GeneratorInstanceConfigGetParameter.java | 9908851d058797b1cbc8ac53d205a544392025c0 | [] | no_license | LaineyC/blackdream2-server | a8e32e84fdcf25901f28d9d7b1b8c9f738fdb176 | 044f1cdc9047cddbbb036e85a8c5ff839e6fbcd6 | refs/heads/master | 2022-07-03T10:23:56.469234 | 2020-01-03T15:55:49 | 2020-01-03T15:55:49 | 135,039,160 | 1 | 0 | null | 2022-06-29T19:39:34 | 2018-05-27T11:12:19 | Java | UTF-8 | Java | false | false | 813 | java | package pers.laineyc.blackdream.generator.service.parameter;
import pers.laineyc.blackdream.framework.service.parameter.Parameter;
/**
* 生成器实例设置单个查询Parameter
* @author LaineyC
*/
public class GeneratorInstanceConfigGetParameter extends Parameter {
/**
* 主键
*/
private String id;
/**
* 所属生成器实例
*/
private String generatorInstanceId;
public GeneratorInstanceConfigGetParameter() {
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getGeneratorInstanceId() {
return generatorInstanceId;
}
public void setGeneratorInstanceId(String generatorInstanceId) {
this.generatorInstanceId = generatorInstanceId;
}
} | [
"272874065@qq.com"
] | 272874065@qq.com |
0c96e237a86a54e866a95cb9f672a8f9b563bbfa | be7dfb517e5a87255b342210350f25350675efcb | /mihxil-algebra/src/main/java/org/meeuw/math/abstractalgebra/linear/AbstractInvertibleMatrix.java | ec8397aa4b05650adcfa8e5b778b7046e82fcc38 | [
"Apache-2.0"
] | permissive | mihxil/math | daf93c07496d45a681d211c651484cc13744b8fc | 905e5dbe81dc50b355d120669463b560e57c197f | refs/heads/main | 2023-08-23T09:30:13.127140 | 2023-08-06T19:30:36 | 2023-08-06T19:30:36 | 5,719,123 | 17 | 0 | Apache-2.0 | 2022-10-18T12:39:16 | 2012-09-07T16:06:34 | Java | UTF-8 | Java | false | false | 3,150 | java | /*
* Copyright 2022 Michiel Meeuwissen
*
* 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.meeuw.math.abstractalgebra.linear;
import lombok.Getter;
import java.util.Arrays;
import org.checkerframework.checker.nullness.qual.*;
import org.meeuw.math.ArrayUtils;
import org.meeuw.math.abstractalgebra.*;
import org.meeuw.math.validation.Square;
/**
* Representation of a square, invertible matrix.
*
*/
public abstract class AbstractInvertibleMatrix<
M extends AbstractInvertibleMatrix<M, MS, E, ES>,
MS extends AbstractGeneralLinearGroup<M, MS, E, ES>,
E extends RingElement<E>,
ES extends Ring<E>
>
implements MultiplicativeGroupElement<M> {
@Square(invertible = true)
final E[][] matrix;
@Getter
final MS structure;
@MonotonicNonNull
E determinant;
/**
* General constructor, without checking.
*
* @param structure
* @param matrix An invertible, square matrix, with the dimensions specified by the structure
*/
AbstractInvertibleMatrix(@NonNull MS structure, @Square(invertible = true) E[][] matrix) {
this.matrix = matrix;
this.structure = structure;
}
@Override
public M times(M multiplier) {
return of(getStructure().getElementStructure().product(matrix, multiplier.matrix));
}
@Override
public abstract M reciprocal();
public M adjugate() {
return of(structure.getElementStructure().adjugate(matrix));
}
@EnsuresNonNull("determinant")
public E determinant() {
if (determinant == null) {
determinant = structure.getElementStructure().determinant(matrix);
}
return determinant;
}
@Override
public String toString() {
return ArrayUtils.toString(matrix);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
M that = (M) o;
return Arrays.deepEquals(matrix, that.matrix);
}
@Override
public int hashCode() {
return Arrays.deepHashCode(matrix);
}
public M times(E multiplier) {
E[][] result = newMatrix();
for (int i = 0; i < matrix.length; i++) {
for (int j = 0; j < matrix[i].length; j++) {
result[i][j] = matrix[i][j].times(multiplier);
}
}
return of(result);
}
abstract M of(@Square E[][] matrix);
protected E[][] newMatrix() {
return structure.getElementStructure().newMatrix(matrix.length, matrix.length);
}
}
| [
"git@meeuw.org"
] | git@meeuw.org |
2e7df9f4257f8c2e70a1bb4b82855aba63e1721e | 46fa5d39a3091f4d42b9e07baf3ad2633ba9c21d | /evaluation/subjects/themis_openmrs-core_unsafe/src/org/openmrs/scheduler/SchedulerUtil.java | 6de1e04dde01dfa4d7bd4b01ca9a6002b5ec6e8e | [
"Apache-2.0"
] | permissive | yannicnoller/qfuzz | 0231db497de3c16937c1a4501f44385ddfde5774 | ca03bf187cb1127763a9c78f7547cda536a69a4e | refs/heads/master | 2023-04-14T15:36:20.927575 | 2021-05-17T00:35:36 | 2021-05-17T00:35:36 | 204,430,941 | 12 | 2 | Apache-2.0 | 2021-12-03T03:41:05 | 2019-08-26T08:28:10 | Java | UTF-8 | Java | false | false | 7,471 | java | /**
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
* the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
*
* Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
* graphic logo is a trademark of OpenMRS Inc.
*/
package org.openmrs.scheduler;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;
import java.util.Properties;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.openmrs.api.context.Context;
import org.openmrs.util.PrivilegeConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SchedulerUtil {
private SchedulerUtil() {
}
private static final Logger log = LoggerFactory.getLogger(SchedulerUtil.class);
/**
* Start the scheduler given the following start up properties.
*
* @param p properties used to start the service
*/
public static void startup(Properties p) {
// Override the Scheduler constants if specified by the user
String val = p.getProperty("scheduler.username", null);
if (val != null) {
SchedulerConstants.SCHEDULER_DEFAULT_USERNAME = val;
log.warn("Deprecated runtime property: scheduler.username. Value set in global_property in database now.");
}
val = p.getProperty("scheduler.password", null);
if (val != null) {
SchedulerConstants.SCHEDULER_DEFAULT_PASSWORD = val;
log.warn("Deprecated runtime property: scheduler.username. Value set in global_property in database now.");
}
// TODO: do this for all services
try {
Context.addProxyPrivilege(PrivilegeConstants.MANAGE_SCHEDULER);
Context.getSchedulerService().onStartup();
}
finally {
Context.removeProxyPrivilege(PrivilegeConstants.MANAGE_SCHEDULER);
}
}
/**
* Shutdown the scheduler service that is statically associated with the Context class.
*/
public static void shutdown() {
SchedulerService service = null;
// ignores errors while getting the scheduler service
try {
service = Context.getSchedulerService();
}
catch (Exception e) {
// pass
}
// TODO: Do this for all services
try {
Context.addProxyPrivilege(PrivilegeConstants.MANAGE_SCHEDULER);
// doesn't attempt shutdown if there was an error getting the scheduler service
if (service != null) {
service.onShutdown();
}
}
finally {
Context.removeProxyPrivilege(PrivilegeConstants.MANAGE_SCHEDULER);
}
}
/**
* Sends an email with system information and the given exception
*
* @param throwable
*/
public static void sendSchedulerError(Throwable throwable) {
try {
Context.openSession();
Boolean emailIsEnabled = Boolean.valueOf(Context.getAdministrationService().getGlobalProperty(
SchedulerConstants.SCHEDULER_ADMIN_EMAIL_ENABLED_PROPERTY));
if (emailIsEnabled) {
// Email addresses seperated by commas
String recipients = Context.getAdministrationService().getGlobalProperty(
SchedulerConstants.SCHEDULER_ADMIN_EMAIL_PROPERTY);
// Send message if
if (recipients != null) {
// TODO need to use the default sender for the application
String sender = SchedulerConstants.SCHEDULER_DEFAULT_FROM;
String subject = SchedulerConstants.SCHEDULER_DEFAULT_SUBJECT + " : " + throwable.getClass().getName();
StringBuilder message = new StringBuilder();
message.append("\n\nStacktrace\n============================================\n");
message.append(SchedulerUtil.getExceptionAsString(throwable));
message.append("\n\nSystem Variables\n============================================\n");
for (Map.Entry<String, String> entry : Context.getAdministrationService().getSystemVariables()
.entrySet()) {
message.append(entry.getKey()).append(" = ").append(entry.getValue()).append("\n");
}
// TODO need to the send the IP information for the server instance that is running this task
log.debug("Sending scheduler error email to [" + recipients + "] from [" + sender + "] with subject ["
+ subject + "]:\n" + message);
Context.getMessageService().sendMessage(recipients, sender, subject, message.toString());
}
}
}
catch (Exception e) {
// Log, but otherwise suppress errors
log.warn("Could not send scheduler error email: ", e);
}
finally {
Context.closeSession();
}
}
/**
* @param t
* @return <code>String</code> representation of the given exception
*/
public static String getExceptionAsString(Throwable t) {
return ExceptionUtils.getStackTrace(t);
}
/**
* Gets the next execution time based on the initial start time (possibly years ago, depending
* on when the task was configured in OpenMRS) and the repeat interval of execution. We need to
* calculate the "next execution time" because the scheduled time is most likely in the past and
* the JDK timer will run the task X number of times from the start time until now in order to
* catch up. The assumption is that this is not the desired behavior -- we just want to execute
* the task on its next execution time. For instance, say we had a scheduled task that ran every
* 24 hours at midnight. In the database, the task would likely have a past start date (e.g.
* 04/01/2006 12:00am). If we scheduled the task using the JDK Timer
* scheduleAtFixedRate(TimerTask task, Date startDate, int interval) method and passed in the
* start date above, the JDK Timer would execute this task once for every day between the start
* date and today, which would lead to hundreds of unnecessary (and likely expensive)
* executions.
*
* @see java.util.Timer
* @param taskDefinition the task definition to be executed
* @return the next "future" execution time for the given task
* @should get the correct repeat interval
*/
public static Date getNextExecution(TaskDefinition taskDefinition) {
Calendar nextTime = Calendar.getInstance();
try {
Date firstTime = taskDefinition.getStartTime();
if (firstTime != null) {
// Right now
Date currentTime = new Date();
// If the first time is actually in the future, then we use that date/time
if (firstTime.after(currentTime)) {
return firstTime;
}
// The time between successive runs (e.g. 24 hours)
long repeatInterval = taskDefinition.getRepeatInterval();
if (repeatInterval == 0) {
// task is one-shot so just return the start time
return firstTime;
}
// Calculate time between the first time the process was run and right now (e.g. 3 days, 15 hours)
long betweenTime = currentTime.getTime() - firstTime.getTime();
// Calculate the last time the task was run (e.g. 15 hours ago)
long lastTime = (betweenTime % (repeatInterval * 1000));
// Calculate the time to add to the current time (e.g. 24 hours - 15 hours = 9 hours)
long additional = ((repeatInterval * 1000) - lastTime);
nextTime.setTime(new Date(currentTime.getTime() + additional));
log.debug("The task " + taskDefinition.getName() + " will start at " + nextTime.getTime());
}
}
catch (Exception e) {
log.error("Failed to get next execution time for " + taskDefinition.getName(), e);
}
return nextTime.getTime();
}
}
| [
"yannic.noller@gmx.de"
] | yannic.noller@gmx.de |
95c9bfddb98cc7000c9498171e340e6f3223d612 | 3d6f1c2234c1573965b474c8cd32b27eeb8cb6b9 | /uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridClientCompositeEditorRowTest.java | 1fa8549b1c376dd91cb980217d125b2f883c3cfe | [
"Apache-2.0"
] | permissive | lukebranch/vaadin | 3f894c48420fec8a748dcf8d2fcf61b46920422c | 3da7a1164efd54ce24e66cddb54a47c8e7e6c55e | refs/heads/master | 2020-03-29T21:32:11.373524 | 2014-12-12T18:29:29 | 2014-12-12T18:43:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 285 | java | package com.vaadin.tests.components.grid.basicfeatures.client;
import org.junit.Before;
public class GridClientCompositeEditorRowTest extends GridEditorRowClientTest {
@Override
@Before
public void setUp() {
setUseComposite(true);
super.setUp();
}
}
| [
"review@vaadin.com"
] | review@vaadin.com |
096d01ef85feb0cdb05aadb7e79167559dfa6694 | 53d933cb8b0d2189b15ec9f8d334706f59897f2e | /zuihou-backend/zuihou-authority/zuihou-authority-entity/src/main/java/com/github/zuihou/authority/dto/common/AreaSaveDTO.java | 46f8c71060914467062cae2b07dbb2ddfa456735 | [
"Apache-2.0"
] | permissive | alexhaoxuan/zuihou-admin-cloud | 6fdb8931227d84d9f61b86d76813092ad484ad64 | 6d62605a071c39428d3d515599a567838417c71c | refs/heads/master | 2020-12-22T06:35:37.516050 | 2020-01-22T10:07:34 | 2020-01-22T10:07:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,842 | java | package com.github.zuihou.authority.dto.common;
import com.baomidou.mybatisplus.annotation.TableField;
import com.github.zuihou.common.constant.RemoteDataConstants;
import com.github.zuihou.model.RemoteData;
import com.github.zuihou.remotedata.annonation.RemoteField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
/**
* <p>
* 实体类
* 地区表
* </p>
*
* @author zuihou
* @since 2020-01-03
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@ApiModel(value = "AreaSaveDTO", description = "地区表")
public class AreaSaveDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 名称
*/
@ApiModelProperty(value = "名称")
@NotEmpty(message = "名称不能为空")
@Length(max = 255, message = "名称长度不能超过255")
private String label;
/**
* 编码
*/
@ApiModelProperty(value = "编码")
@NotEmpty(message = "编码不能为空")
@Length(max = 64, message = "编码长度不能超过64")
private String code;
/**
* 全名
*/
@ApiModelProperty(value = "全名")
@Length(max = 255, message = "全名长度不能超过255")
private String fullName;
/**
* 排序
*/
@ApiModelProperty(value = "排序")
private Integer sortValue;
/**
* 经度
*/
@ApiModelProperty(value = "经度")
@Length(max = 255, message = "经度长度不能超过255")
private String longitude;
/**
* 维度
*/
@ApiModelProperty(value = "维度")
@Length(max = 255, message = "维度长度不能超过255")
private String latitude;
@ApiModelProperty(value = "数据来源")
@Length(max = 255, message = "数据来源长度不能超过255")
@TableField(value = "source_", condition = LIKE)
private String source;
/**
* 行政区级
*/
@ApiModelProperty(value = "行政区级")
@NotNull(message = "行政区级不能为空")
@TableField("level")
@RemoteField(api = RemoteDataConstants.DICTIONARY_ITEM_CLASS, method = RemoteDataConstants.DICTIONARY_ITEM_METHOD)
private RemoteData<String, String> level;
/**
* 父CODE
*/
@ApiModelProperty(value = "父CODE")
@Length(max = 64, message = "父CODE长度不能超过64")
private String parentCode;
/**
* 父ID
*/
@ApiModelProperty(value = "父ID")
private Long parentId;
}
| [
"244387066@qq.com"
] | 244387066@qq.com |
75e052687890cce4d0c3807638311242f975ade0 | 6b9588d36a20f37323724d39cf196feb31dc3103 | /skycloset_malware/src/com/facebook/react/views/view/c.java | 8123cc9e0c43f26546e7f4e3cd7bb208bad8fb89 | [] | no_license | won21kr/Malware_Project_Skycloset | f7728bef47c0b231528fdf002e3da4fea797e466 | 1ad90be1a68a4e9782a81ef1490f107489429c32 | refs/heads/master | 2022-12-07T11:27:48.119778 | 2019-12-16T21:39:19 | 2019-12-16T21:39:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,142 | java | package com.facebook.react.views.view;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.RippleDrawable;
import android.os.Build;
import android.util.TypedValue;
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.SoftAssertions;
public class c {
private static final TypedValue a = new TypedValue();
@TargetApi(21)
public static Drawable a(Context paramContext, ReadableMap paramReadableMap) {
String str1;
String str2 = paramReadableMap.getString("type");
if ("ThemeAttrAndroid".equals(str2)) {
str1 = paramReadableMap.getString("attribute");
SoftAssertions.assertNotNull(str1);
int i = paramContext.getResources().getIdentifier(str1, "attr", "android");
if (i != 0) {
if (paramContext.getTheme().resolveAttribute(i, a, true))
return (Build.VERSION.SDK_INT >= 21) ? paramContext.getResources().getDrawable(a.resourceId, paramContext.getTheme()) : paramContext.getResources().getDrawable(a.resourceId);
StringBuilder stringBuilder1 = new StringBuilder();
stringBuilder1.append("Attribute ");
stringBuilder1.append(str1);
stringBuilder1.append(" couldn't be resolved into a drawable");
throw new JSApplicationIllegalArgumentException(stringBuilder1.toString());
}
stringBuilder = new StringBuilder();
stringBuilder.append("Attribute ");
stringBuilder.append(str1);
stringBuilder.append(" couldn't be found in the resource list");
throw new JSApplicationIllegalArgumentException(stringBuilder.toString());
}
if ("RippleAndroid".equals(str2)) {
if (Build.VERSION.SDK_INT >= 21) {
int i;
if (str1.hasKey("color") && !str1.isNull("color")) {
i = str1.getInt("color");
} else if (stringBuilder.getTheme().resolveAttribute(16843820, a, true)) {
i = stringBuilder.getResources().getColor(a.resourceId);
} else {
throw new JSApplicationIllegalArgumentException("Attribute colorControlHighlight couldn't be resolved into a drawable");
}
if (!str1.hasKey("borderless") || str1.isNull("borderless") || !str1.getBoolean("borderless")) {
ColorDrawable colorDrawable = new ColorDrawable(-1);
return new RippleDrawable(new ColorStateList(new int[][] { {} }, new int[] { i }), null, colorDrawable);
}
stringBuilder = null;
return new RippleDrawable(new ColorStateList(new int[][] { {} }, new int[] { i }), null, stringBuilder);
}
throw new JSApplicationIllegalArgumentException("Ripple drawable is not available on android API <21");
}
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("Invalid type for android drawable: ");
stringBuilder.append(str2);
throw new JSApplicationIllegalArgumentException(stringBuilder.toString());
}
}
| [
"root@localhost.localdomain"
] | root@localhost.localdomain |
ed9aafd1e2bb1a867488c46f9e402d9cbb42c40d | 58b92d6687ab6de62e00ffa386e23a5c656b0b98 | /core/src/main/java/com/github/braisdom/objsql/annotations/Queryable.java | df85f0b178e2652db9ec11249e69b4235baf9f4a | [
"Apache-2.0"
] | permissive | braisdom/ObjectiveSql | c62131632cb857b76ceddcd45388b18ce86e8a76 | 26086317b1b55e607d9e48793e222d28c9dfe4ae | refs/heads/master | 2022-10-08T15:44:36.001731 | 2022-08-19T02:31:38 | 2022-08-19T02:31:38 | 278,270,052 | 1,411 | 187 | Apache-2.0 | 2023-09-10T10:58:33 | 2020-07-09T05:19:03 | Java | UTF-8 | Java | false | false | 1,371 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.braisdom.objsql.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Indicates a column can be queried. A 'queryBy...' method will be generated
* when the annotation assigned for a Java field
*/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.SOURCE)
public @interface Queryable {
/**
* Indicates whether returns a List for querying
*
* @return
*/
boolean many() default false;
}
| [
"yonghe.wang@joowing.com"
] | yonghe.wang@joowing.com |
2b63880dc7f0cd5a9278f5966644c54ad811e996 | 96c10cc7c2aba99e30bec0203cf111ced023ba05 | /src/com/armadialogcreator/control/ControlClassNestedClassUpdate.java | ae1a19ef8440aaa64947dae4e7e0f743d9e13cd9 | [
"MIT"
] | permissive | wesv/arma-dialog-creator | 0d362dc8f92d73102cbab875623a5ac535909eaf | df5f6c6b731ed875d41d094ec7622df30f84d8aa | refs/heads/master | 2020-04-13T13:46:00.060453 | 2018-12-30T19:22:19 | 2018-12-30T19:22:19 | 163,241,565 | 0 | 0 | null | 2018-12-27T03:15:21 | 2018-12-27T03:15:21 | null | UTF-8 | Java | false | false | 1,011 | java | package com.armadialogcreator.control;
import org.jetbrains.annotations.NotNull;
/**
@author Kayler
@since 08/13/2017 */
public class ControlClassNestedClassUpdate implements ControlClassUpdate {
private final ControlClass ownerControlClass;
private final ControlClass nested;
private final ControlClassUpdate nestedClassUpdate;
public ControlClassNestedClassUpdate(@NotNull ControlClass ownerControlClass, @NotNull ControlClass nested, @NotNull ControlClassUpdate nestedClassUpdate) {
this.ownerControlClass = ownerControlClass;
this.nested = nested;
this.nestedClassUpdate = nestedClassUpdate;
}
@Override
@NotNull
public ControlClass getOwnerControlClass() {
return ownerControlClass;
}
/** @return the {@link ControlClass} that had an update (this is a nested {@link ControlClass} of {@link #getOwnerControlClass()}) */
@NotNull
public ControlClass getNested() {
return nested;
}
@NotNull
public ControlClassUpdate getNestedClassUpdate() {
return nestedClassUpdate;
}
}
| [
"kaylerrenslow@gmail.com"
] | kaylerrenslow@gmail.com |
c21861bdad55cbbc711032246f4e3c81ff3e3e69 | 49fe3d43ab90b4e241795f4c3f43bb53f4cb0e32 | /src/com/company/Lesson31/Vvodchisla.java | a7986cf5f5f95a2add17e124d6afd2bd4412dbb6 | [] | no_license | aierko/dev | a0e8a6b8ceaa61f6842cf02a4443fcc9ea6a3cf7 | ea52685dd0a70e4bd578369cf417f6c6a2f7a5c9 | refs/heads/master | 2021-09-03T10:08:45.436562 | 2017-10-20T12:53:43 | 2017-10-20T12:53:43 | 106,323,994 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 862 | java | package com.company.Lesson31;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* Ввести с клавиатуры число. Если число положительное, то увеличить его в два раза.
* Если число отрицательное, то прибавить единицу. Вывести результат на экран.
*/
public class Vvodchisla {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(reader.readLine());
enter(a);
}
public static void enter (int a){
if(a>0){
System.out.println(a * 2);
}
else if(a<0){
System.out.println(a + 1);
}
}
}
| [
"vtldtl80"
] | vtldtl80 |
34378583c08bb722f503dc327e0243c9e6915ba7 | 41b5626593f86fe60035fdaae236edf2c9352926 | /roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/feign/FeignWebsiteNavController.java | 47ab12a9015480a083e1b599dd8cf2950391b4b8 | [
"MIT"
] | permissive | chenhaoaixuexi/cloudCourse | 5b662a822108efa70606c06e590870a9aa6dbbe7 | eafac97da0a08d7a3245aef2a248778d963c1997 | refs/heads/master | 2023-04-06T11:30:58.368217 | 2020-04-08T05:10:53 | 2020-04-08T05:10:53 | 253,463,242 | 0 | 0 | MIT | 2023-03-27T22:19:49 | 2020-04-06T10:22:05 | Java | UTF-8 | Java | false | false | 1,412 | java | package com.roncoo.education.system.service.feign;
import com.roncoo.education.system.feign.interfaces.IFeignWebsiteNav;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import com.roncoo.education.system.feign.qo.WebsiteNavQO;
import com.roncoo.education.system.feign.vo.WebsiteNavVO;
import com.roncoo.education.system.service.feign.biz.FeignWebsiteNavBiz;
import com.roncoo.education.util.base.BaseController;
import com.roncoo.education.util.base.Page;
/**
* 站点导航
*
* @author wuyun
*/
@RestController
public class FeignWebsiteNavController extends BaseController implements IFeignWebsiteNav {
@Autowired
private FeignWebsiteNavBiz biz;
@Override
public Page<WebsiteNavVO> listForPage(@RequestBody WebsiteNavQO qo) {
return biz.listForPage(qo);
}
@Override
public int save(@RequestBody WebsiteNavQO qo) {
return biz.save(qo);
}
@Override
public int deleteById(@RequestBody Long id) {
return biz.deleteById(id);
}
@Override
public int updateById(@RequestBody WebsiteNavQO qo) {
return biz.updateById(qo);
}
@Override
public WebsiteNavVO getById(@PathVariable(value = "id") Long id) {
return biz.getById(id);
}
}
| [
"chen@LAPTOP-0BE253LS.localdomain"
] | chen@LAPTOP-0BE253LS.localdomain |
b03d531dec0d4e0351775f21ad8d97ef492b253d | 6e4331de3349b594ed842ee763013b34aec97286 | /CoronaGoBackendBase/src/main/java/com/coronago/misc/logic/IDoctorActivityLogBLBase.java | 682b7fcf96be7fe9995fb425ae67e668e5514255 | [
"Apache-2.0"
] | permissive | VanenburgSoftware/CoronaGo | 2c927cec76aa5e4b85d5e0b024c593d798040026 | bcaf717f293864006103de32ddac52371c911166 | refs/heads/master | 2022-07-02T12:48:14.201362 | 2020-04-08T06:08:52 | 2020-04-08T06:08:52 | 252,699,233 | 0 | 1 | Apache-2.0 | 2022-06-03T02:16:39 | 2020-04-03T10:20:56 | TypeScript | UTF-8 | Java | false | false | 451 | java | package com.coronago.misc.logic;
import com.eva.base.logic.ICRUDOperation;
import com.coronago.misc.model.DoctorActivityLogBase;
import java.util.List;
import com.eva.base.model.PaginationRequest;
import com.eva.base.model.PaginationResponse;
public interface IDoctorActivityLogBLBase<T extends DoctorActivityLogBase> extends ICRUDOperation<T>{
public PaginationResponse getDoctorActivityLogAll_DoctorActivityLog(PaginationRequest dataTable);
} | [
"vvinsu@vanenburgsoftware.com"
] | vvinsu@vanenburgsoftware.com |
5c022b408f320a4bfd98164d63d675f2395c5a72 | 6d391cbd569e019a392ff25e4e149af4993b2cc9 | /src/main/java/com/mycompany/mytestapp/repository/PersistenceAuditEventRepository.java | a980820d705a31c3e7097d03033d02a0d14e08db | [] | no_license | krbi/jh-TestApp | 8f32c7b7f84652ab0f7425526e21f225166ac129 | 95320b25c38dcec62f415a6ae9334deeaaf7fcbd | refs/heads/master | 2022-12-23T16:46:06.546292 | 2019-11-22T08:58:09 | 2019-11-22T08:58:09 | 223,352,433 | 0 | 0 | null | 2022-12-16T04:41:53 | 2019-11-22T07:56:21 | Java | UTF-8 | Java | false | false | 892 | java | package com.mycompany.mytestapp.repository;
import com.mycompany.mytestapp.domain.PersistentAuditEvent;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import java.time.Instant;
import java.util.List;
/**
* Spring Data JPA repository for the {@link PersistentAuditEvent} entity.
*/
public interface PersistenceAuditEventRepository extends JpaRepository<PersistentAuditEvent, Long> {
List<PersistentAuditEvent> findByPrincipal(String principal);
List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfterAndAuditEventType(String principal, Instant after, String type);
Page<PersistentAuditEvent> findAllByAuditEventDateBetween(Instant fromDate, Instant toDate, Pageable pageable);
List<PersistentAuditEvent> findByAuditEventDateBefore(Instant before);
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
37a2e5b77ea4f4e7da924704ca918475a2e5c72d | a04d455edf12ca43e09efd9d2d03fd09bbb5b4a4 | /open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/igc-rest-client-library/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/igc/clientlibrary/model/generated/v117/FunctionCall2.java | d8d0047a155d31e611aadc4e535ea6c1f823a9ce | [
"CC-BY-4.0",
"Apache-2.0"
] | permissive | sansarip/egeria | fc16972addd3019cacecf596ccd205a96f30a2b6 | 22502aa059c87f45c48701a9d734bb71d83f3964 | refs/heads/master | 2020-04-14T04:35:49.319453 | 2018-12-30T23:31:12 | 2018-12-30T23:31:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,515 | java | /* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.adapters.repositoryservices.igc.clientlibrary.model.generated.v117;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.odpi.openmetadata.adapters.repositoryservices.igc.clientlibrary.model.common.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Date;
import java.util.ArrayList;
/**
* POJO for the 'functioncall' asset type in IGC, displayed as 'FunctionCall' in the IGC UI.
* <br><br>
* (this code has been generated based on out-of-the-box IGC metadata types;
* if modifications are needed, eg. to handle custom attributes,
* extending from this class in your own custom class is the best approach.)
*/
@JsonIgnoreProperties(ignoreUnknown=true)
public class FunctionCall2 extends Reference {
public static String getIgcTypeId() { return "functioncall"; }
/**
* The 'call_context' property, displayed as 'Call Context' in the IGC UI.
* <br><br>
* Can be one of the following values:
* <ul>
* <li>BEFORE (displayed in the UI as 'BEFORE')</li>
* <li>AFTER (displayed in the UI as 'AFTER')</li>
* <li>DEFAULT (displayed in the UI as 'DEFAULT')</li>
* </ul>
*/
protected String call_context;
/**
* The 'executes_function' property, displayed as 'Executes Function' in the IGC UI.
* <br><br>
* Will be a single {@link Reference} to a {@link Function} object.
*/
protected Reference executes_function;
/**
* The 'used_in_function' property, displayed as 'Used In Function' in the IGC UI.
* <br><br>
* Will be a single {@link Reference} to a {@link Function} object.
*/
protected Reference used_in_function;
/**
* The 'used_in_filter_constraint' property, displayed as 'Used In Filter Constraint' in the IGC UI.
* <br><br>
* Will be a single {@link Reference} to a {@link Filterconstraint} object.
*/
protected Reference used_in_filter_constraint;
/** @see #call_context */ @JsonProperty("call_context") public String getCallContext() { return this.call_context; }
/** @see #call_context */ @JsonProperty("call_context") public void setCallContext(String call_context) { this.call_context = call_context; }
/** @see #executes_function */ @JsonProperty("executes_function") public Reference getExecutesFunction() { return this.executes_function; }
/** @see #executes_function */ @JsonProperty("executes_function") public void setExecutesFunction(Reference executes_function) { this.executes_function = executes_function; }
/** @see #used_in_function */ @JsonProperty("used_in_function") public Reference getUsedInFunction() { return this.used_in_function; }
/** @see #used_in_function */ @JsonProperty("used_in_function") public void setUsedInFunction(Reference used_in_function) { this.used_in_function = used_in_function; }
/** @see #used_in_filter_constraint */ @JsonProperty("used_in_filter_constraint") public Reference getUsedInFilterConstraint() { return this.used_in_filter_constraint; }
/** @see #used_in_filter_constraint */ @JsonProperty("used_in_filter_constraint") public void setUsedInFilterConstraint(Reference used_in_filter_constraint) { this.used_in_filter_constraint = used_in_filter_constraint; }
public static final Boolean isFunctionCall2(Object obj) { return (obj.getClass() == FunctionCall2.class); }
}
| [
"chris@thegrotes.net"
] | chris@thegrotes.net |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.