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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
04749fb41742ea8244e0de898fcdc60724a5087a
|
3c9fd716bb9f0a2aa0952b1765a20068b5c3b499
|
/src/main/java/com/hacker/service/IShippingService.java
|
d000de9c4a7cee816174d4d8c4557f914a457116
|
[] |
no_license
|
UncleCatMySelf/SSM_To_Mall
|
fd57116316060a0d1c9e1f5056f5b41580687e34
|
c11be8ef383ada88ab8448cce4848883ef906b76
|
refs/heads/master
| 2020-03-26T14:23:59.359856
| 2018-08-16T12:36:31
| 2018-08-16T12:36:31
| 144,985,755
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 598
|
java
|
package com.hacker.service;
import com.github.pagehelper.PageInfo;
import com.hacker.common.ServiceResponse;
import com.hacker.pojo.Shipping;
/**
* Created by 这个程序员有纹身 on 12/12/17.
*/
public interface IShippingService {
ServiceResponse add(Integer userId, Shipping shipping);
ServiceResponse<String> del(Integer userId,Integer shippingId);
public ServiceResponse update(Integer userId, Shipping shipping);
ServiceResponse<Shipping> select(Integer userId,Integer shippingId);
ServiceResponse<PageInfo> list(Integer userId, int pageNum, int pageSize);
}
|
[
"awakeningcode@126.com"
] |
awakeningcode@126.com
|
006c8cbecc61601001ee4a615f470fb3e9c89640
|
f5f5d836c9a2fb7636d02283ccc6753678c273ad
|
/Enox Server/src/com/rs/game/player/dialogues/OsmanDialogue.java
|
5790936569c1123e7c8bb193d53a88c3fddccef9
|
[] |
no_license
|
gnmmarechal/EnoxScapeReloaded
|
3a48c1925fef1bfb7969230f4258a65ae21c7bf2
|
ae9639be756b4adb139faa00553adf3e26c488fe
|
refs/heads/master
| 2020-04-22T12:54:40.777755
| 2019-06-28T20:46:34
| 2019-06-28T20:46:34
| 170,389,675
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,176
|
java
|
package com.rs.game.player.dialogues;
import com.rs.game.player.Skills;
import com.rs.game.player.dialogues.Dialogue;
public class OsmanDialogue extends Dialogue {
private int npcId;
@Override
public void start() {
npcId = (Integer) parameters[0];
if (player.getInventory().containsOneItem(10848, 10849, 10850, 10851)) {
sendPlayerDialogue(9827, "I have some sq'irk juice for you.");
stage = -3;
} else
sendPlayerDialogue(9827, "I'd like to talk about sq'irks.");
}
@Override
public void run(int interfaceId, int componentId) {
switch (stage) {
case -3:
int totalXp = player.getInventory().getAmountOf(10851) * 350;
totalXp += player.getInventory().getAmountOf(10848) * 1350;
totalXp += player.getInventory().getAmountOf(10850) * 2350;
totalXp += player.getInventory().getAmountOf(10849) * 3000;
player.getInventory().deleteItem(10848, Integer.MAX_VALUE);
player.getInventory().deleteItem(10849, Integer.MAX_VALUE);
player.getInventory().deleteItem(10850, Integer.MAX_VALUE);
player.getInventory().deleteItem(10851, Integer.MAX_VALUE);
sendDialogue("Osman imparts some Thieving advice to you ( " + totalXp + " Thieving experience points ) as reward for the sq'irk juice.");
player.getSkills().addXp(Skills.THIEVING, totalXp);
stage = -4;
break;
case -4:
sendNPCDialogue(npcId, 9827, "That you very much OH my gosh. If you get some more sq'irks be sure to come back.");
stage = -5;
break;
case -5:
sendPlayerDialogue(9827, "I will. It's been a pleasure doing business with you.");
stage = -2;
break;
case -1:
stage = 0;
this.sendOptionsDialogue(DEFAULT_OPTIONS_TITLE, "Where do I get sq'irks?", "Why can't you get the sq'irks yourself?", "How should I squeeze the fruit?", "Is there a reward for getting these sq'irks?", "Whats so good about sq'irk juice then?");
break;
case 0:
if (componentId == OPTION_1) {
sendPlayerDialogue(9827, "Where am I meant to find sq'irks?");
stage = 1;
} else if (componentId == OPTION_2) {
sendPlayerDialogue(9827, "Why can't you get the sq'irks yourself?");
stage = 13;
} else if (componentId == OPTION_3) {
sendPlayerDialogue(9827, "How should I squeeze the fruit?");
stage = 14;
} else if (componentId == OPTION_4) {
sendPlayerDialogue(9827, "Is there a reward for getting these sq'irks?");
stage = 15;
} else if (componentId == OPTION_5) {
sendPlayerDialogue(9827, "What's so good about sq'irk juice then?");
stage = 19;
}
break;
case 1:
sendNPCDialogue(npcId, 9827, "There is a sorceress near the south-eastern edge of edge of Al Kharid who grows them. Once upon a time we considered each other friends.");
stage = 2;
break;
case 2:
sendPlayerDialogue(9827, "What happened?");
stage = 3;
break;
case 3:
sendNPCDialogue(npcId, 9827, "We fell out, and now she won't give me any more fruit.");
stage = 4;
break;
case 4:
sendPlayerDialogue(9827, "So all I have to do is ask her for some fruit for you?");
stage = 5;
break;
case 5:
sendNPCDialogue(npcId, 9827, "I doubt it will be that easy. She is not renowned for her generosity and is very secretive about her garden's location.");
stage = 6;
break;
case 6:
sendPlayerDialogue(9827, "Oh cmon, it should be easy enough to find.");
stage = 7;
break;
case 7:
sendNPCDialogue(npcId, 9827, "Her garden has remained hidden even to me - the chief spy of Al Kharid. I belive her garden must be hidden by magical means.");
stage = 8;
break;
case 8:
sendPlayerDialogue(9827, "This should be an interesting task. How many sq'irks do you want?");
stage = 9;
break;
case 9:
sendNPCDialogue(npcId, 9827, "I'll reward you as many as you can get your hands on but could you please squeeze the fruit into a glass first?");
stage = 10;
break;
case 10:
sendOptionsDialogue(DEFAULT_OPTIONS_TITLE, "I've another question about sq'irks.", "Thanks for the information.");
stage = 11;
break;
case 11:
if (componentId == OPTION_1) {
sendPlayerDialogue(9827, "I've another question about sq'irks.");
stage = 12;
} else if (componentId == OPTION_2) {
sendPlayerDialogue(9827, "Thanks for the information.");
stage = -2;
}
break;
case 12:
sendNPCDialogue(npcId, 9827, "What would you like to know?");
stage = -1;
break;
case 13:
sendNPCDialogue(npcId, 9827, "I may have mentioned that I had a falling out with Sorceress. WEll, unsurprisingly, she refuses to giveme any more of her garden's produce.");
stage = 10;
break;
case 14:
sendNPCDialogue(npcId, 9827, "Use a pestle and mortal to squeeze the sq'irks. Make sure you have an empty glass with you to collect the juice.");
stage = 10;
break;
case 15:
sendNPCDialogue(npcId, 9827, "Of course there is. I am a generous man. I'll teach you the art of Thieving for your troubles.");
stage = 16;
break;
case 16:
sendPlayerDialogue(9827, "How much training will you give?");
stage = 17;
break;
case 17:
sendNPCDialogue(npcId, 9827, "That depends on the quantity and ripeness of the sq'irks you put into the juice.");
stage = 18;
break;
case 18:
sendPlayerDialogue(9827, "That sounds fair enough.");
stage = 10;
break;
case 19:
sendNPCDialogue(npcId, 9827, "Ah it's sweet, sweet nectar for a thief or spy; it makes light fingers lighter, fleet fleet flightier and comes in four different colours for those who are easily amused.");
stage = 20;
break;
case 20:
sendDialogue("Osman starts salivating at the thought of sq'irk juice.");
stage = 21;
break;
case 21:
sendPlayerDialogue(9827, "It wouldn't have addictive propertie, would it?");
stage = 22;
break;
case 22:
sendNPCDialogue(npcId, 9827, "It only holds power over those with poor self-control, something which I have an abundance of.");
stage = 23;
break;
case 23:
sendPlayerDialogue(9827, "I see.");
stage = 10;
break;
default:
end();
break;
}
}
@Override
public void finish() {
// TODO Auto-generated method stub
}
}
|
[
"mliberato@gs2012.xyz"
] |
mliberato@gs2012.xyz
|
8675b3d195d76d35d3cf12f4026c91bd09417ee9
|
de325819e931c79b25fde0ec5db511e6235e98bd
|
/src/main/java/net/sagebits/tmp/isaac/rest/api1/data/logic/RestLiteralNodeInstant.java
|
09f0eca00a9b2170ae213702d883b20ec97f4dab
|
[
"Apache-2.0"
] |
permissive
|
Sagebits/uts-rest-api
|
d5f318d0be7de6b64801eb3478abc6911973ac88
|
65c749c16b5f8241bea4511b855e4274c330e0af
|
refs/heads/develop
| 2023-05-11T07:37:57.918343
| 2020-05-18T06:49:48
| 2020-05-18T06:49:48
| 157,817,215
| 0
| 0
|
Apache-2.0
| 2023-05-09T18:06:40
| 2018-11-16T05:29:17
|
Java
|
UTF-8
|
Java
| false
| false
| 3,378
|
java
|
/*
* Copyright 2018 VetsEZ Inc, Sagebits LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Contributions from 2015-2017 where performed either by US government
* employees, or under US Veterans Health Administration contracts.
*
* US Veterans Health Administration contributions by government employees
* are work of the U.S. Government and are not subject to copyright
* protection in the United States. Portions contributed by government
* employees are USGovWork (17USC §105). Not subject to copyright.
*
* Contribution by contractors to the US Veterans Health Administration
* during this period are contractually contributed under the
* Apache License, Version 2.0.
*
* See: https://www.usa.gov/government-works
*/
package net.sagebits.tmp.isaac.rest.api1.data.logic;
import java.time.Instant;
import javax.xml.bind.annotation.XmlElement;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import sh.isaac.model.logic.node.LiteralNodeInstant;
/**
*
* {@link RestLiteralNodeInstant}
*
* @author <a href="mailto:joel.kniaz.list@gmail.com">Joel Kniaz</a>
*
* RestLiteralNodeInstant is a logic node containing only an Instant literal value
*
* Each RestLiteralNodeInstant instance has a RestNodeSemanticType/NodeSemantic == NodeSemantic.LITERAL_INSTANT
*
* A RestLiteralNodeInstant may not have any child logic nodes.
*
* For serialization purposes, we store / send the second and nanos in this Rest class.
* See {@link Instant} for details on these fields.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
public class RestLiteralNodeInstant extends RestLogicNode
{
/**
* The epochSecond of the {@link Instant}
*
* Gets the number of seconds from the Java epoch of 1970-01-01T00:00:00Z.
* <p>
* The epoch second count is a simple incrementing count of seconds where
* second 0 is 1970-01-01T00:00:00Z.
* The nanosecond part of the day is returned by {@code nanos}.
*
* returns the seconds from the epoch of 1970-01-01T00:00:00Z
*/
@XmlElement
long epochSecond;
/**
* The nanos of the The epochSecond of the {@link Instant}
*
* Gets the number of nanoseconds, later along the time-line, from the start
* of the second.
* <p>
* The nanosecond-of-second value measures the total number of nanoseconds from
* the second returned by {@code epochSecond}.
*
* returns the nanoseconds within the second, always positive, never exceeds 999,999,999
*/
@XmlElement
int nanos;
protected RestLiteralNodeInstant()
{
// For JAXB
}
/**
* @param literalNodeInstant
*/
public RestLiteralNodeInstant(LiteralNodeInstant literalNodeInstant)
{
super(literalNodeInstant);
epochSecond = literalNodeInstant.getLiteralValue().getEpochSecond();
nanos = literalNodeInstant.getLiteralValue().getNano();
}
}
|
[
"daniel.armbrust.list@gmail.com"
] |
daniel.armbrust.list@gmail.com
|
87f5142aa1999d070c4470584ec0ad296652f585
|
09a353c0dee6c67a3a2ea38bbb5b2a8c60ae5ca0
|
/src/br/com/unipampa/remoa/conexaoHTTP/Logar.java
|
96c59e7ea3224d80c3c22a085ac5bf2d62408555
|
[] |
no_license
|
adminremoa/remoav2.1
|
13f71beef3cb9a1b35f9aa5577e57498a5212bd1
|
00ee76ecfe2eced6d93d9d9f4fc36334371e2575
|
refs/heads/master
| 2021-01-21T12:43:28.650982
| 2012-08-08T14:22:57
| 2012-08-08T14:22:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 531
|
java
|
package br.com.unipampa.remoa.conexaoHTTP;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class Logar {
private final String url;
public Logar(String url) throws IOException{
this.url = url;
}
public boolean logar(String sen, String login) {
Map params = new HashMap();
params.put("usuario", login);
params.put("senha", sen);
boolean retornoServer = Boolean.parseBoolean(Http.getInstance(Http.JAKARTA).doPost(url, params));
return retornoServer;
}
}
|
[
"="
] |
=
|
e74ec0c3ad9bef4f5a5b28f2a3c3170e67c52407
|
01340816f7165798fd857f33b4b4414fa9bf192c
|
/src/main/java/leetcode/Nine/reverseOnlyLetters/Solution.java
|
f064c70016760e22651412c4ad411d3cac15636f
|
[] |
no_license
|
EarWheat/LeetCode
|
250f181c2c697af29ce6f76b1fdf7c7b0d7fb02c
|
f440e6c76efb4554e0404cacf137dc1f6677e2e1
|
refs/heads/master
| 2023-08-31T06:25:35.460107
| 2023-08-30T06:41:10
| 2023-08-30T06:41:10
| 145,558,499
| 2
| 1
| null | 2023-06-14T22:51:49
| 2018-08-21T12:05:56
|
Java
|
UTF-8
|
Java
| false
| false
| 1,523
|
java
|
package leetcode.Nine.reverseOnlyLetters;
import java.util.Arrays;
/**
* @author :liuzhaolu
* @description:917. 仅仅反转字母
* @prd : https://leetcode-cn.com/problems/reverse-only-letters/
* @date :2022/2/23 11:33 上午
* @Modification Date Author Description
* ------------------------------------------ *
* 2022/2/23 11:33 上午 liuzhaolu firstVersion
*/
public class Solution {
public String reverseOnlyLetters(String s) {
char[] chars = s.toCharArray();
int start = 0;
int end = s.length() - 1;
while (start < s.length() && !isValid(chars[start])) start++;
while (end >=0 && !isValid(chars[end])) end--;
while (start < end) {
if (isValid(chars[start]) && isValid(chars[end])){
swap(chars, start, end);
start++;
end--;
} else if(!isValid(chars[start])){
start++;
} else if(!isValid(chars[end])){
end--;
}
}
return String.valueOf(chars);
}
public boolean isValid(char c) {
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
}
public void swap(char[] chars, int i , int j){
char temp = chars[i];
chars[i] = chars[j];
chars[j] = temp;
}
public static void main(String[] args) {
Solution solution = new Solution();
System.out.println(solution.reverseOnlyLetters("Test1ng-Leet=code-Q!"));
}
}
|
[
"2636965138@qq.com"
] |
2636965138@qq.com
|
a2b86e5d0e58a89c77307038d1ba36c166a38a9e
|
f40c5613a833bc38fca6676bad8f681200cffb25
|
/extensions/istio/examples/src/main/java/io/fabric8/istio/api/examples/v1beta1/ServiceEntryExample.java
|
018a2192b87815de9ab497b96447e24f63b24c13
|
[
"Apache-2.0"
] |
permissive
|
rohanKanojia/kubernetes-client
|
2d599e4ed1beedf603c79d28f49203fbce1fc8b2
|
502a14c166dce9ec07cf6adb114e9e36053baece
|
refs/heads/master
| 2023-07-25T18:31:33.982683
| 2022-04-12T13:39:06
| 2022-04-13T05:12:38
| 106,398,990
| 2
| 3
|
Apache-2.0
| 2023-04-28T16:21:03
| 2017-10-10T09:50:25
|
Java
|
UTF-8
|
Java
| false
| false
| 2,337
|
java
|
/**
* Copyright (C) 2015 Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.fabric8.istio.api.examples.v1beta1;
import io.fabric8.istio.api.networking.v1beta1.PortBuilder;
import io.fabric8.istio.api.networking.v1beta1.ServiceEntryBuilder;
import io.fabric8.istio.api.networking.v1beta1.ServiceEntryList;
import io.fabric8.istio.api.networking.v1beta1.ServiceEntryLocation;
import io.fabric8.istio.client.IstioClient;
import io.fabric8.kubernetes.client.KubernetesClientException;
public class ServiceEntryExample {
private static final String NAMESPACE = "test";
public static void main(String[] args) {
try {
IstioClient client = ClientFactory.newClient(args);
createResource(client);
System.exit(0);
} catch (KubernetesClientException ex) {
System.err.println("Failed with " + ex.getMessage());
System.exit(1);
}
}
public static void createResource(IstioClient client) {
System.out.println("Creating a service entry");
// Example from: https://istio.io/latest/docs/reference/config/networking/service-entry/
client.v1beta1().serviceEntries().inNamespace(NAMESPACE).create(new ServiceEntryBuilder()
.withNewMetadata()
.withName("external-svc-https")
.endMetadata()
.withNewSpec()
.withHosts("api.dropboxapi.com", "www.googleapis.com")
.withLocation(ServiceEntryLocation.MESH_INTERNAL)
.withPorts(new PortBuilder().withName("https").withProtocol("TLS").withNumber(443).build())
.endSpec()
.build());
System.out.println("Listing Virtual Service Instances:");
ServiceEntryList list = client.v1beta1().serviceEntries().inNamespace(NAMESPACE).list();
list.getItems().forEach(b -> System.out.println(b.getMetadata().getName()));
System.out.println("Done");
}
}
|
[
"marc@marcnuri.com"
] |
marc@marcnuri.com
|
5f4ad0625488dc4a300aba372afb30cafab4bf8c
|
7040527ed67d9046a98d802b98bd449002d66d1c
|
/travisjr/src/main/java/com/lonepulse/travisjr/TravisJrException.java
|
35ede13ecac7a88e433f685af8e078169fd45674
|
[
"Apache-2.0"
] |
permissive
|
wvengen/Travis-Jr
|
ca1a45b4aee52d1762d8bdd79632b9f952c6cdd8
|
41f3c9a94221435b12ffc552c9a6b677e43df563
|
refs/heads/master
| 2021-01-15T20:33:11.734589
| 2014-07-18T20:53:27
| 2014-07-18T20:53:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,663
|
java
|
package com.lonepulse.travisjr;
/*
* #%L
* Travis Jr.
* %%
* Copyright (C) 2013 Lonepulse
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
/**
* <p>This exception is thrown due to erroneous conditions which <b>can</b>
* be recovered from or circumvented.
*
* @version 1.1.0
* <br><br>
* @author <a href="mailto:lahiru@lonepulse.com">Lahiru Sahan Jayasinghe</a>
*/
public class TravisJrException extends Exception {
private static final long serialVersionUID = -8961893348374141489L;
/**
* <p>See {@link Exception#Exception()}.
*
* @since 1.1.0
*/
public TravisJrException() {}
/**
* <p>See {@link Exception#Exception(String)}.
*
* @since 1.1.0
*/
public TravisJrException(String detailMessage) {
super(detailMessage);
}
/**
* <p>See {@link Exception#Exception(Throwable)}.
*
* @since 1.1.0
*/
public TravisJrException(Throwable throwable) {
super(throwable);
}
/**
* <p>See {@link Exception#Exception(String, Throwable)}.
*
* @since 1.1.0
*/
public TravisJrException(String detailMessage, Throwable throwable) {
super(detailMessage, throwable);
}
}
|
[
"lahiru@lonepulse.com"
] |
lahiru@lonepulse.com
|
08bcf73bd9af7a2fd0319fb809ad1aedd78e8b31
|
1d0601ba9c4ff00e0d2772804dc36e49fc9d869f
|
/src/mit/introduction_to_computer_science/problem_set_five/WordTrigger.java
|
30d342fc5133a4bf82111866b931660c21a03c26
|
[
"Giftware"
] |
permissive
|
CiroDeLeon/mit
|
914cfbdc915706df81799bd827bb94a635ef0ad5
|
60d46df61b91ed0ef160e636f8693faebefedd95
|
refs/heads/master
| 2021-01-14T09:55:03.917104
| 2017-02-15T01:16:56
| 2017-02-15T01:16:56
| 82,005,850
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,053
|
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 mit.introduction_to_computer_science.problem_set_five;
/**
*
* @author Usuario1
*/
public class WordTrigger implements Trigger{
private String word;
@Override
public boolean evaluate(NewsStory obj) {
return true;
}
public boolean is_word_in(String text){
if(text!=null){
String[]words=text.split(" ");
for(int i=0;i<words.length;i++){
if(words[i].toLowerCase().equals(getWord().toLowerCase())==true){
return true;
}
}
}
return false;
}
/**
* @return the word
*/
public String getWord() {
return word;
}
/**
* @param word the word to set
*/
public void setWord(String word) {
this.word = word;
}
}
|
[
"Usuario1@Usuario"
] |
Usuario1@Usuario
|
10641f999d9a4ab29768f97446c68a4a15cd8646
|
e6be1c458851a19b5f53e86e8505fe07bc5c6014
|
/Ghidra/Framework/Docking/src/main/java/docking/widgets/GenericDateCellRenderer.java
|
7a65b1d9a0ae9ef57921300496d31b7a498d7fec
|
[
"Apache-2.0",
"GPL-1.0-or-later",
"GPL-3.0-only",
"LicenseRef-scancode-public-domain",
"LGPL-2.1-only",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
penhoi/ghidra-decompiler
|
6a950ad56acc467fa4fd771097d068d9785d36e0
|
151133f957e8fb4172cd6f0f4b750b5948df4c95
|
refs/heads/master
| 2020-05-19T16:46:36.863144
| 2019-07-26T01:17:19
| 2019-07-26T01:17:19
| 185,118,431
| 17
| 7
|
Apache-2.0
| 2019-07-10T10:16:13
| 2019-05-06T03:36:43
|
Java
|
UTF-8
|
Java
| false
| false
| 1,762
|
java
|
/* ###
* IP: GHIDRA
*
* 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 docking.widgets;
import java.awt.Component;
import java.text.DateFormat;
import java.util.Date;
import javax.swing.JComponent;
import docking.widgets.table.GTableCellRenderer;
import docking.widgets.table.GTableCellRenderingData;
/**
* The JDK-provided DateRenderer does not inherit the backgrounds and such properly.
* For LAFs having tables with alternating backgrounds, e.g., Aqua and Nimbus, the date
* column does not have the correct background. This fixes that.
*/
public class GenericDateCellRenderer extends GTableCellRenderer {
private DateFormat format;
private String toolTip;
public GenericDateCellRenderer(DateFormat format, String toolTip) {
this.format = format;
this.toolTip = toolTip;
}
public GenericDateCellRenderer(DateFormat format) {
this(format, null);
}
@Override
public Component getTableCellRendererComponent(GTableCellRenderingData data) {
Date value = (Date) data.getValue();
GTableCellRenderingData newData = data.copyWithNewValue(format.format(value));
JComponent c = (JComponent) super.getTableCellRendererComponent(newData);
if (toolTip != null) {
c.setToolTipText(toolTip);
}
return c;
}
}
|
[
"46821332+nsadeveloper789@users.noreply.github.com"
] |
46821332+nsadeveloper789@users.noreply.github.com
|
8af192e5c797b9afe0493f2ff976ff73a744514d
|
aa9b39c681f65079d36d072abfb43a12dc686efa
|
/jsoagger-jfxcore-engine/src/main/java/io/github/jsoagger/jfxcore/engine/components/security/UIContext.java
|
5bbb2e543a8c079bf5e2b6f2d5330df1145129ee
|
[
"Apache-2.0"
] |
permissive
|
HuyaAuto/jsoagger-fx
|
1da426f4bbd864fcc302b472c94db1dc4a2ef2cd
|
97012d09e58ea2486c68762f121dc9fcd52e5e9d
|
refs/heads/master
| 2023-04-18T06:12:09.741134
| 2020-04-25T12:03:14
| 2020-04-25T12:03:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,610
|
java
|
/*-
* ========================LICENSE_START=================================
* JSoagger
* %%
* Copyright (C) 2019 JSOAGGER
* %%
* 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.
* =========================LICENSE_END==================================
*/
package io.github.jsoagger.jfxcore.engine.components.security;
import java.util.HashMap;
import java.util.Locale;
import io.github.jsoagger.jfxcore.api.ICriteriaContext;
import io.github.jsoagger.jfxcore.api.security.IRootContext;
import io.github.jsoagger.jfxcore.api.security.IUserContext;
import io.github.jsoagger.jfxcore.api.security.IViewContext;
import io.github.jsoagger.jfxcore.viewdef.json.xml.model.VLViewConfigXML;
/**
* @author Ramilafananana VONJISOA
* @mailto yvonjisoa@nexitia.com
* @date 2019
*/
public class UIContext implements IViewContext {
protected ICriteriaContext criterias = new CriteriaContext();
protected VLViewConfigXML viewConfig;
protected HashMap<String, String> parameters = new HashMap<>();
protected IUserContext userContext;
protected IRootContext rootContext;
/**
* New view context
*
*/
public UIContext() {}
/**
* {@inheritDoc}
*/
@Override
public void addCriterias(HashMap<String, String> filters) {
if (filters != null) {
for(String e: filters.keySet()) {
criterias.setFilter(e, filters.get(e));
}
}
}
public boolean evaluate(String filterName) {
return "true".equals(criterias.filterValue(filterName));
}
/**
* New view context
*
* @param viewConfig
*/
public UIContext(VLViewConfigXML viewConfig) {
this.viewConfig = viewConfig;
}
/**
* @return
*/
@Override
public Locale getUserLocale() {
return userContext.getUserLocale();
}
/**
*
* @param viewConfig
*/
public void controllerCfg(VLViewConfigXML viewConfig) {
this.viewConfig = viewConfig;
}
/**
*
* @return
*/
public VLViewConfigXML controllerCfg() {
return viewConfig;
}
/**
* @return the criterias
*/
@Override
public ICriteriaContext getCriterias() {
return criterias;
}
/**
* @param criterias the criterias to set
*/
@Override
public void setCriterias(ICriteriaContext criterias) {
this.criterias = criterias;
}
/**
* @return the viewConfig
*/
@Override
public VLViewConfigXML getViewConfig() {
return viewConfig;
}
/**
* @param viewConfig the viewConfig to set
*/
@Override
public void setViewConfig(VLViewConfigXML viewConfig) {
this.viewConfig = viewConfig;
}
/**
* Get the userContext
*
* @return the userContext
*/
public IUserContext getUserContext() {
return userContext;
}
/**
* @param userContext the userContext to set
*/
public void setUserContext(IUserContext userContext) {
this.userContext = userContext;
}
/**
* Getter of parameters
*
* @return the parameters
*/
public HashMap<String, String> getParameters() {
return parameters;
}
/**
* Setter of parameters
*
* @param parameters the parameters to set
*/
public void setParameters(HashMap<String, String> parameters) {
this.parameters = parameters;
}
/**
* Getter of rootContext
*
* @return the rootContext
*/
@Override
public IRootContext getRootContext() {
return rootContext;
}
/**
* Setter of rootContext
*
* @param rootContext the rootContext to set
*/
@Override
public void setRootContext(IRootContext rootContext) {
this.rootContext = rootContext;
}
/**
* Getter of viewConfigXML
*
* @return the viewConfigXML
*/
public VLViewConfigXML getViewConfigXML() {
return viewConfig;
}
/**
* Setter of viewConfigXML
*
* @param viewConfigXML the viewConfigXML to set
*/
public void setViewConfigXML(VLViewConfigXML viewConfigXML) {
this.viewConfig = viewConfigXML;
}
/**
* @{inheritedDoc}
*/
@Override
public void processFrom(VLViewConfigXML configXML, IRootContext context) {
this.viewConfig = configXML;
}
}
|
[
"rmvonji@gmail.com"
] |
rmvonji@gmail.com
|
e0e98f7a42b1aa00f6f85382f9c2e92e5bb42450
|
c37d2a36312534a55c319b19b61060649c7c862c
|
/app/src/main/java/com/spongycastle/cms/CMSRuntimeException.java
|
7cd9857ccc89d9e46eaebfa69489eb32bb3bb92f
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
trwinowiecki/AndroidTexting
|
f5626ad91a07ea7b3cd3ee75893abf8b1fe7154f
|
27e84a420b80054e676c390b898705856364b340
|
refs/heads/master
| 2020-12-30T23:10:17.542572
| 2017-02-01T01:46:13
| 2017-02-01T01:46:13
| 80,580,124
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 476
|
java
|
package com.spongycastle.cms;
public class CMSRuntimeException
extends RuntimeException
{
Exception e;
public CMSRuntimeException(
String name)
{
super(name);
}
public CMSRuntimeException(
String name,
Exception e)
{
super(name);
this.e = e;
}
public Exception getUnderlyingException()
{
return e;
}
public Throwable getCause()
{
return e;
}
}
|
[
"trw0511@gmail.com"
] |
trw0511@gmail.com
|
0187becad91be76b482dc8861f937edd0f77064d
|
faea9e6e294eb4546a548249e1ad698765a332f4
|
/Client(using Fragment)/AnimalsShelter/app/src/main/java/com/app/animalsshelter/content/get_list_animals/GetListAnimalsFragment.java
|
6199e2558e44e1d7a8226af4c98db73cf30a2150
|
[] |
no_license
|
jintoga/Client-Server-animal-shelter
|
9e777e760d28dabe45ebfbbbeaf33bc4533e8de2
|
6f5a2b2366c02238dd445a85354556282df354e8
|
refs/heads/master
| 2021-01-10T09:10:11.940235
| 2015-08-18T17:20:09
| 2015-08-18T17:20:09
| 36,151,224
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,418
|
java
|
package com.app.animalsshelter.content.get_list_animals;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.Spinner;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;
import com.app.animalsshelter.BaseFragment;
import com.app.animalsshelter.R;
import com.app.animalsshelter.camera.BaseAlbumDirFactory;
import com.app.animalsshelter.internet.ServerRequest;
import com.app.animalsshelter.model.Animal;
import java.util.ArrayList;
public class GetListAnimalsFragment extends BaseFragment {
GridView gridview;
public CustomAdapterGridView customAdapterGridView = null;
private ArrayList<Animal> listAnimal = new ArrayList<>();
EditText editTextSearch;
public static Spinner spinnerFilterSpecies, spinnerFilterGender, spinnerFilterAge;
public static boolean searchOn = false;
public static String filterSpecies, filterGender, filterAge;
CharSequence all = "--Все--";
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.activity_get_list_animals, container, false);
getID(root);
setEvents();
if (listAnimal.size() == 0) {
RequestQueue mRequestQueue = Volley.newRequestQueue(root.getContext());
ServerRequest serverRequest = new ServerRequest(GetListAnimalsFragment.this);
serverRequest.downloadingFromServer(root.getContext());
}
/*customAdapterGridView.notifyDataSetChanged();*/
return root;
}
/*@Override
public void onViewCreated(View root, Bundle savedInstanceState) {
}*/
private void getID(View root) {
gridview = (GridView) root.findViewById(R.id.gridView);
editTextSearch = (EditText) root.findViewById(R.id.editTextSearch);
editTextSearch.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
searchOn = true;
GetListAnimalsFragment.this.customAdapterGridView.getFilter().filter(charSequence);
spinnerFilterSpecies.setSelection(0);
spinnerFilterGender.setSelection(0);
spinnerFilterAge.setSelection(0);
}
@Override
public void afterTextChanged(Editable editable) {
}
});
spinnerFilterSpecies = (Spinner) root.findViewById(R.id.spinnerFilterSpecies);
spinnerFilterGender = (Spinner) root.findViewById(R.id.spinnerFilterGender);
spinnerFilterAge = (Spinner) root.findViewById(R.id.spinnerFilterAge);
}
private void setEvents() {
customAdapterGridView = new CustomAdapterGridView(getActivity(), R.layout.custom_item_gridview, listAnimal);
gridview.setAdapter(customAdapterGridView);
Log.e("listanimal", listAnimal.toString());
gridview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {
Animal animal = (Animal) adapterView.getItemAtPosition(position);
/*Intent intent = new Intent(getActivity(), ShowOneAnimal.class);*/
Bundle bundle = new Bundle();
bundle.putSerializable("ANIMAL", animal);
/*intent.putExtra("DATA", bundle);
GetListAnimalsFragment.this.startActivity(intent);*/
BaseFragment fragment = new ShowOneAnimalFragment();
fragment.setArguments(bundle);
FragmentTransaction fragmentTransaction = getActivity().getFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, fragment);
fragmentTransaction.addToBackStack(null);
fragmentTransaction.commit();
}
});
spinnerFilterSpecies.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
filterSpecies = spinnerFilterSpecies.getSelectedItem().toString();
CharSequence charSequence = spinnerFilterSpecies.getSelectedItem().toString();
GetListAnimalsFragment.this.customAdapterGridView.getFilter().filter(charSequence);
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
spinnerFilterGender.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
filterGender = spinnerFilterGender.getSelectedItem().toString();
CharSequence charSequence = spinnerFilterGender.getSelectedItem().toString();
GetListAnimalsFragment.this.customAdapterGridView.getFilter().filter(charSequence);
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
spinnerFilterAge.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
filterAge = spinnerFilterAge.getSelectedItem().toString();
CharSequence charSequence = spinnerFilterAge.getSelectedItem().toString();
GetListAnimalsFragment.this.customAdapterGridView.getFilter().filter(charSequence);
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
}
public ArrayList<Animal> getListAnimal() {
return listAnimal;
}
}
|
[
"jintoga123@yahoo.com"
] |
jintoga123@yahoo.com
|
f450f7b0ea6077a90fc90506803c4f274c86d45b
|
f6899a2cf1c10a724632bbb2ccffb7283c77a5ff
|
/glassfish-4.1.1/nucleus/admin/cli/src/main/java/com/sun/enterprise/admin/cli/CLIConstants.java
|
b4fb79af77fe0b4b08f73a0997f3756c8149184d
|
[] |
no_license
|
Appdynamics/OSS
|
a8903058e29f4783e34119a4d87639f508a63692
|
1e112f8854a25b3ecf337cad6eccf7c85e732525
|
refs/heads/master
| 2023-07-22T03:34:54.770481
| 2021-10-28T07:01:57
| 2021-10-28T07:01:57
| 19,390,624
| 2
| 13
| null | 2023-07-08T02:26:33
| 2014-05-02T22:42:20
| null |
UTF-8
|
Java
| false
| false
| 5,258
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package com.sun.enterprise.admin.cli;
/**
* Constants for use in this package and "sub" packages
* @author bnevins
*/
public class CLIConstants {
////////////////////////////////////////////////////////////////////////////
/////// public /////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
public static final int DEFAULT_ADMIN_PORT = 4848;
public static final String DEFAULT_HOSTNAME = "localhost";
public static final String EOL = System.getProperty("line.separator");
public static final long WAIT_FOR_DAS_TIME_MS = 10 * 60 * 1000; // 10 minutes
public static final int RESTART_NORMAL = 10;
public static final int RESTART_DEBUG_ON = 11;
public static final int RESTART_DEBUG_OFF = 12;
public static final String WALL_CLOCK_START_PROP = "WALL_CLOCK_START";
public static final String MASTER_PASSWORD = "AS_ADMIN_MASTERPASSWORD";
public static final int SUCCESS = 0;
public static final int ERROR = 1;
public static final int WARNING = 4;
public static final long DEATH_TIMEOUT_MS = 1 * 60 * 1000;
public static final String K_ADMIN_PORT = "agent.adminPort";
public static final String K_ADMIN_HOST = "agent.adminHost";
public static final String K_AGENT_PROTOCOL = "agent.protocol";
public static final String K_CLIENT_HOST = "agent.client.host";
public static final String K_DAS_HOST = "agent.das.host";
public static final String K_DAS_PROTOCOL = "agent.das.protocol";
public static final String K_DAS_PORT = "agent.das.port";
public static final String K_DAS_IS_SECURE = "agent.das.isSecure";
public static final String K_MASTER_PASSWORD = "agent.masterpassword";
public static final String K_SAVE_MASTER_PASSWORD = "agent.saveMasterPassword";
public static final String AGENT_LISTEN_ADDRESS_NAME="listenaddress";
public static final String REMOTE_CLIENT_ADDRESS_NAME="remoteclientaddress";
public static final String AGENT_JMX_PROTOCOL_NAME="agentjmxprotocol";
public static final String DAS_JMX_PROTOCOL_NAME="dasjmxprotocol";
public static final String AGENT_DAS_IS_SECURE="isDASSecure";
public static final String NODEAGENT_DEFAULT_DAS_IS_SECURE = "false";
public static final String NODEAGENT_DEFAULT_DAS_PORT = String.valueOf(CLIConstants.DEFAULT_ADMIN_PORT);
public static final String NODEAGENT_DEFAULT_HOST_ADDRESS = "0.0.0.0";
public static final String NODEAGENT_JMX_DEFAULT_PROTOCOL = "rmi_jrmp";
public static final String HOST_NAME_PROPERTY = "com.sun.aas.hostName";
public static final int RESTART_CHECK_INTERVAL_MSEC = 300;
////////////////////////////////////////////////////////////////////////////
/////// private ////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
private CLIConstants() {
// no instances allowed!
}
}
|
[
"fgonzales@appdynamics.com"
] |
fgonzales@appdynamics.com
|
2a86a8318065ae468ec6df2938104f8c720f9e67
|
82a8f35c86c274cb23279314db60ab687d33a691
|
/duokan/reader/ui/reading/rw.java
|
2d9ff193256b93c25907b2935f5a21649c086e55
|
[] |
no_license
|
QMSCount/DReader
|
42363f6187b907dedde81ab3b9991523cbf2786d
|
c1537eed7091e32a5e2e52c79360606f622684bc
|
refs/heads/master
| 2021-09-14T22:16:45.495176
| 2018-05-20T14:57:15
| 2018-05-20T14:57:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 824
|
java
|
package com.duokan.reader.ui.reading;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.drawable.Drawable;
public class rw extends Drawable {
final /* synthetic */ qh a;
protected rw(qh qhVar) {
this.a = qhVar;
}
public Bitmap a() {
return this.a.t;
}
public void draw(Canvas canvas) {
if (this.a.t != null) {
int i = getBounds().left;
while (i < getBounds().right) {
canvas.drawBitmap(this.a.t, (float) i, 0.0f, null);
i += this.a.t.getWidth();
}
}
}
public void setAlpha(int i) {
}
public void setColorFilter(ColorFilter colorFilter) {
}
public int getOpacity() {
return -1;
}
}
|
[
"lixiaohong@p2peye.com"
] |
lixiaohong@p2peye.com
|
6b48b9aba7d2ec535929edaca9b5723b6663d1ef
|
1880559c0770b9c0587a175e0cb416736e677c71
|
/agent-plugins/agent-plugin-mysql-commons/src/main/java/com/yametech/yangjian/agent/plugin/mysql/commons/druid/sql/dialect/mysql/ast/clause/MySqlIterateStatement.java
|
0ca2f484c32be06a5484462766a01afd23940bac
|
[
"Apache-2.0"
] |
permissive
|
hbkuang/yangjian
|
09589f27fb9f6659b56a40a7fd603517a1ac8a5d
|
a13042cfa467fe7913064d3d86c010584648ec1e
|
refs/heads/master
| 2023-08-03T20:10:40.389648
| 2021-03-01T02:29:55
| 2021-03-01T02:29:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,336
|
java
|
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* 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.yametech.yangjian.agent.plugin.mysql.commons.druid.sql.dialect.mysql.ast.clause;
import com.yametech.yangjian.agent.plugin.mysql.commons.druid.sql.dialect.mysql.ast.statement.MySqlStatementImpl;
import com.yametech.yangjian.agent.plugin.mysql.commons.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;
/**
*
* @author zz [455910092@qq.com]
*/
public class MySqlIterateStatement extends MySqlStatementImpl {
private String labelName;
@Override
public void accept0(MySqlASTVisitor visitor) {
visitor.visit(this);
visitor.endVisit(this);
}
public String getLabelName() {
return labelName;
}
public void setLabelName(String labelName) {
this.labelName = labelName;
}
}
|
[
"liming.d.pro@gmail.com"
] |
liming.d.pro@gmail.com
|
ef9ee0ceddee57b0e828b4cd0e0be3a4776ee250
|
6de2301bbc9048d1a363d44231273f3db9da4ec6
|
/bitcamp-java-basic/src/step21/ex3/Exam04_6.java
|
feff3150bfbaf9e8ca1c09d4aa1521ca26e40b39
|
[] |
no_license
|
sunghyeondong/bitcamp
|
5265d207306adec04223dd0e0d958661334731fa
|
c4a7d0ba01b0d6b684c67004e6c487b61c6656d6
|
refs/heads/master
| 2021-01-24T10:28:52.267015
| 2018-10-24T01:32:45
| 2018-10-24T01:32:45
| 123,054,630
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,004
|
java
|
// 던지는 예외 받기 - 다형적 변수의 특징을 이용하여 여러 예외를 한 catch에서 받을 수 있다.
package step21.ex3;
import java.io.IOException;
import java.sql.SQLException;
public class Exam04_6 {
static void m(int i)
throws Exception, RuntimeException, SQLException, IOException {
if (i == 0)
throw new Exception();
else if (i == 1)
throw new RuntimeException();
else if (i == 2)
throw new SQLException();
else
throw new IOException();
}
public static void main(String[] args) {
try {
// try 블록에서 예외가 발생할 수 있는 메서드를 호출한다.
m(1);
} catch (RuntimeException | SQLException | IOException e) {
// OR 연산자를 사용하여 여러 개의 예외를 묶어 받을 수 있다.
//
} catch (Exception e) {
}
}
}
|
[
"tjdgusehd0@naver.com"
] |
tjdgusehd0@naver.com
|
cb8640e1cbd7505ca115610a9bb867956446e94e
|
ca87f2c2e46be07c54f5579b0bec802fa0daba49
|
/src/main/java/com/demo/api/entity/SysUser.java
|
a96e96193e9ad14227ddbe247476ef128394dd9f
|
[] |
no_license
|
wanghws/SpringBootMVC
|
81f338c01f436b59f2b6e8161e1af0c9a84e888d
|
9e9d6d550f187500114c4b103c446c830c46df53
|
refs/heads/master
| 2020-05-20T11:16:48.341745
| 2019-05-08T07:50:58
| 2019-05-08T07:50:58
| 185,546,224
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,801
|
java
|
package com.demo.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.demo.api.commons.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import java.util.Set;
/**
* <p>
* 系统用户表
* </p>
*
* @author wanghw
* @since 2019-03-21
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="SysUser对象", description="系统用户表")
public class SysUser extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "部门ID")
@JsonSerialize(using= ToStringSerializer.class)
private Long officeId;
@ApiModelProperty(value = "昵称")
private String loginName;
@JsonIgnore
@ApiModelProperty(value = "密码")
private String password;
@ApiModelProperty(value = "邮箱")
private String email;
@ApiModelProperty(value = "状态 0:禁用 1:正常 2:锁定")
private Integer status;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "密码时间")
private LocalDateTime passwordTime;
@ApiModelProperty(value = "密码ip")
private Integer passwordIp;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "登录时间")
private LocalDateTime loginTime;
@ApiModelProperty(value = "登录IP")
private Integer loginIp;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "注册时间")
private LocalDateTime registerTime;
@ApiModelProperty(value = "注册IP")
private Integer registerIp;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "修改时间")
private LocalDateTime updateTime;
@TableField(exist = false)
@ApiModelProperty(value = "部门名字")
private String officeName;
@TableField(exist = false)
@ApiModelProperty(value = "权限路由")
private Set<String> roles;
@ApiModelProperty(value = "查询条件:注册开始时间")
private transient LocalDateTime regStartDate;
@ApiModelProperty(value = "查询条件:注册结束时间")
private transient LocalDateTime regEndDate;
@ApiModelProperty(value = "查询条件:登录开始时间")
private transient LocalDateTime loginStartDate;
@ApiModelProperty(value = "查询条件:登录结束时间")
private transient LocalDateTime loginEndDate;
}
|
[
"wanghws@gmail.com"
] |
wanghws@gmail.com
|
6069a4a4661029c451fa3626c780d4ed05d826c4
|
2e98a39e61db1e5da89a71607b13082af4ddca94
|
/flexwdreanew/src/com/flexwm/server/op/PmSupplierBankAccount.java
|
2110626663d677391f62639df0c27963df78bcd2
|
[] |
no_license
|
ceherrera-sym/flexwm-dreanew
|
59b927a48a8246babe827f19a131b9129abe2a52
|
228ed7be7718d46a1f2592c253b096e1b942631e
|
refs/heads/master
| 2022-12-18T13:44:42.804524
| 2020-09-15T15:01:52
| 2020-09-15T15:01:52
| 285,393,781
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,258
|
java
|
/**
* SYMGF
* Derechos Reservados Mauricio Lopez Barba
* Este software es propiedad de Mauricio Lopez Barba, y no puede ser
* utilizado, distribuido, copiado sin autorizacion expresa por escrito.
*
* @author Mauricio Lopez Barba
* @version 2013-10
*/
package com.flexwm.server.op;
import com.symgae.server.PmObject;
import com.symgae.server.PmConn;
import com.symgae.server.PmJoin;
import com.symgae.shared.BmObject;
import com.symgae.shared.SFException;
import com.symgae.shared.SFParams;
import com.symgae.shared.SFPmException;
import java.util.ArrayList;
import java.util.Arrays;
import com.flexwm.shared.op.BmoSupplierBankAccount;
public class PmSupplierBankAccount extends PmObject {
BmoSupplierBankAccount bmoSupplierBankAccount;
public PmSupplierBankAccount(SFParams sfParams) throws SFPmException {
super(sfParams);
bmoSupplierBankAccount = new BmoSupplierBankAccount();
setBmObject(bmoSupplierBankAccount);
// Lista de joins
setJoinList(new ArrayList<PmJoin>(Arrays.asList(
new PmJoin(bmoSupplierBankAccount.getCurrencyId(), bmoSupplierBankAccount.getBmoCurrency())
)));
}
@Override
public BmObject populate(PmConn pmConn) throws SFException {
return autoPopulate(pmConn, new BmoSupplierBankAccount());
}
}
|
[
"ceherrera.symetria@gmail.com"
] |
ceherrera.symetria@gmail.com
|
feba432a76fd0d5fc9e7a92fff64169b3245f687
|
352163a8f69f64bc87a9e14471c947e51bd6b27d
|
/bin/ext-integration/sap/core/sapcore/src/de/hybris/platform/sap/core/configuration/global/impl/package-info.java
|
3677e0bae7ca2e4c7619ae9a82be085f4002e0d1
|
[] |
no_license
|
GTNDYanagisawa/merchandise
|
2ad5209480d5dc7d946a442479cfd60649137109
|
e9773338d63d4f053954d396835ac25ef71039d3
|
refs/heads/master
| 2021-01-22T20:45:31.217238
| 2015-05-20T06:23:45
| 2015-05-20T06:23:45
| 35,868,211
| 3
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 560
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2014 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 for SAP hybris integration framework core global configuration implementations.
*/
package de.hybris.platform.sap.core.configuration.global.impl;
|
[
"yanagisawa@gotandadenshi.jp"
] |
yanagisawa@gotandadenshi.jp
|
b6479d7f0769a94fe8139edb804ea44b95d82737
|
6ed973a3d7de6e384a6aaa11492923cb1ae23d19
|
/platform/com.netifera.platform.core/com.netifera.platform.tasks/src/com/netifera/platform/tasks/internal/Task.java
|
960b3b0eac9ea77838badc0a84365cb37b4a3f1a
|
[] |
no_license
|
juli/netifera
|
e598445a11109e0d0dac48577befcef3835fa4c6
|
d70fcaa92bfbe299b924314a10991d4445d96cd0
|
refs/heads/master
| 2020-12-25T08:19:23.881797
| 2009-07-15T01:03:08
| 2009-07-15T01:03:08
| 180,060
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,337
|
java
|
package com.netifera.platform.tasks.internal;
import java.io.PrintWriter;
import java.io.StringWriter;
import com.netifera.platform.api.dispatcher.IMessenger;
import com.netifera.platform.api.log.ILogger;
import com.netifera.platform.api.tasks.ITask;
import com.netifera.platform.api.tasks.ITaskMessenger;
import com.netifera.platform.api.tasks.ITaskOutput;
import com.netifera.platform.api.tasks.ITaskRunnable;
import com.netifera.platform.api.tasks.TaskException;
import com.netifera.platform.tasks.ITaskProgress;
import com.netifera.platform.tasks.ITaskPrompter;
import com.netifera.platform.tasks.TaskConsoleOutput;
import com.netifera.platform.tasks.TaskLogOutput;
import com.netifera.platform.tasks.TaskStatus;
public class Task implements Runnable, ITaskProgress, ITaskPrompter, ITaskMessenger, ITask {
private final ITaskRunnable runnableInstance;
private Thread taskThread;
/* Not used right now */
private ITaskPrompter prompter;
private final TaskManager taskManager;
private final TaskStatus status;
private volatile boolean canceled;
private boolean started;
private final ILogger logger;
private final TaskProgressHelper progress;
private final TaskOutputHelper output;
Task(TaskStatus record, ITaskRunnable instance, IMessenger messenger,
TaskManager taskManager, ILogger logger) {
assert instance != null;
assert messenger != null;
this.status = record;
this.runnableInstance = instance;
this.taskManager = taskManager;
this.logger = logger;
output = new TaskOutputHelper(this, messenger, logger);
progress = new TaskProgressHelper(this, output);
}
public void start() {
if(!started) {
started = true;
taskManager.runTask(this);
}
}
public void run() {
taskThread = Thread.currentThread();
try {
status.setRunning();
status.setStartTime(System.currentTimeMillis());
output.changed();
/* run the tool */
runnableInstance.run(this);
status.setFinished();
output.changed();
} catch(TaskException e) {
String message = e.getMessage();
if (message == null) message = e.toString();
error(message);
status.setFailed();
output.changed();
} catch (Exception e) {
logger.warning("Unhandled exception in task running tool: " + this, e);
error("Unexpected error, please contact technical support.\n" + e);
status.setFailed();
output.changed();
}
}
public void cancel() {
canceled = true;
if(taskThread != null) {
taskThread.interrupt();
} else {
/*to trigger update in the client when scheduled tasks are canceled */
status.setFinished();
output.changed();
}
}
public void failed() {
logger.debug("Task failed: " + this);
status.setFailed();
/* Fill the progress bar. RunState is not changed on purpose */
status.updateElapsedTime();
output.changed();
}
boolean isStarted() {
return started;
}
/** Running Task methods */
public long getTaskId() {
return status.getTaskId();
}
// public long getProbeId() {
// return record.getProbeId();
// }
@Override
public String toString() {
return status.getTitle();
}
public TaskStatus getStatus() {
return status;
}
public IMessenger getMessenger() {
return output.getMessenger();
}
public void setMessenger(IMessenger messenger) {
output.setMessenger(messenger);
}
public void addMessage(ITaskOutput taskOutput) {
output.addMessage(taskOutput);
}
/** ITaskProgress interface, could be delegated */
public void setTotalWork(int totalWork) {
progress.setTotalWork(totalWork);
}
public void worked(int work) {
progress.worked(work);
}
public void done() {
progress.done();
}
public boolean isCanceled() {
if(taskThread != null && taskThread.isInterrupted()) {
canceled = true;
}
return canceled;
}
public void setTitle(String title) {
this.status.setTitle(title);
output.changed();
}
public void setStatus(String status) {
this.status.setStatus(status);
output.changed();
}
/* XXX Task Logging methods could be implemented in ITaskLogging interface and delegate*/
public void debug(String message) {
log(TaskLogOutput.DEBUG, message);
}
public void info(String message) {
log(TaskLogOutput.INFO, message);
}
public void warning(String message) {
log(TaskLogOutput.WARNING, message);
}
public void error(String message) {
log(TaskLogOutput.ERROR, message);
}
public void log(int logLevel, String message) {
addMessage(new TaskLogOutput(logLevel, message));
}
public void print(String message) {
addMessage(new TaskConsoleOutput(message));
}
public void exception(String message, Throwable throwable) {
final String output = message + "\n" + renderBacktrace(throwable);
addMessage(new TaskConsoleOutput(output));
}
private String renderBacktrace(Throwable throwable) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
if(throwable.getMessage() != null) {
pw.println(throwable.getMessage());
}
throwable.printStackTrace(pw);
pw.flush();
return sw.toString();
}
public String askPassword(String message) {
if(prompter == null) {
return null;
}
return prompter.askPassword(message);
}
public String askString(String message) {
if(prompter == null) {
return null;
}
return prompter.askString(message);
}
}
|
[
"bruce@netifera.com"
] |
bruce@netifera.com
|
9ce96d60b1132774186120d3fa0554c15340d198
|
db97ce70bd53e5c258ecda4c34a5ec641e12d488
|
/src/main/java/com/alipay/api/domain/AlipaySecurityRiskCustomerriskQueryModel.java
|
de14d2c821bd0e9787766ff8f1d842368a3d92cf
|
[
"Apache-2.0"
] |
permissive
|
smitzhang/alipay-sdk-java-all
|
dccc7493c03b3c937f93e7e2be750619f9bed068
|
a835a9c91e800e7c9350d479e84f9a74b211f0c4
|
refs/heads/master
| 2022-11-23T20:32:27.041116
| 2020-08-03T13:03:02
| 2020-08-03T13:03:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,114
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 商户风险服务输出
*
* @author auto create
* @since 1.0, 2020-03-19 20:39:24
*/
public class AlipaySecurityRiskCustomerriskQueryModel extends AlipayObject {
private static final long serialVersionUID = 8759765479634739733L;
/**
* 用于查询银行卡号是否有风险
*/
@ApiField("bank_card_no")
private String bankCardNo;
/**
* 用于查询营业执照是否来自风险商户
*/
@ApiField("business_license_no")
private String businessLicenseNo;
/**
* 用于境外银行卡号的查询(预留)
*/
@ApiField("card_no")
private String cardNo;
/**
* 用于传递需查询风险的身份证号码
*/
@ApiField("cert_no")
private String certNo;
/**
* 用于查询公司名称是否来自风险公司
*/
@ApiField("company_name")
private String companyName;
/**
* 间连交易场景下,银行类合作伙伴记录的风险商户ID
*/
@ApiField("external_id")
private String externalId;
/**
* 用于查询手机号是否来自风险用户
*/
@ApiField("mobile_no")
private String mobileNo;
/**
* 查询商户风险类型时:支持以下三种:riskinfo_cert_no(身份证风险查询),riskinfo_bank_card_no(银行卡风险查询),riskinfo_business_license_no(营业执照风险查询)
查询ISV风险类型时:支持以下二种:riskinfo_cert_no_isv(服务商法人身份证风险查询),riskinfo_business_license_no_isv(营业执照风险查询)。
营销作弊风险场景:riskinfo_marketing
先享后付保障风险场景:riskinfo_nsf
使用服务时指定查询风险类型,且一次调用可以传递多个风险类型,用英文逗号隔开。
*/
@ApiField("risk_type")
private String riskType;
public String getBankCardNo() {
return this.bankCardNo;
}
public void setBankCardNo(String bankCardNo) {
this.bankCardNo = bankCardNo;
}
public String getBusinessLicenseNo() {
return this.businessLicenseNo;
}
public void setBusinessLicenseNo(String businessLicenseNo) {
this.businessLicenseNo = businessLicenseNo;
}
public String getCardNo() {
return this.cardNo;
}
public void setCardNo(String cardNo) {
this.cardNo = cardNo;
}
public String getCertNo() {
return this.certNo;
}
public void setCertNo(String certNo) {
this.certNo = certNo;
}
public String getCompanyName() {
return this.companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getExternalId() {
return this.externalId;
}
public void setExternalId(String externalId) {
this.externalId = externalId;
}
public String getMobileNo() {
return this.mobileNo;
}
public void setMobileNo(String mobileNo) {
this.mobileNo = mobileNo;
}
public String getRiskType() {
return this.riskType;
}
public void setRiskType(String riskType) {
this.riskType = riskType;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
04107a03f8e849c9fcaf40a00afd80078c17bab6
|
40665051fadf3fb75e5a8f655362126c1a2a3af6
|
/eclipse-milo/8b6ca0d837a6767f07ffb9c454a641870eb16094/885/AbstractNodeManager.java
|
e0c00e37a667762ded2cf85da9f5117631212210
|
[] |
no_license
|
fermadeiral/StyleErrors
|
6f44379207e8490ba618365c54bdfef554fc4fde
|
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
|
refs/heads/master
| 2020-07-15T12:55:10.564494
| 2019-10-24T02:30:45
| 2019-10-24T02:30:45
| 205,546,543
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,549
|
java
|
/*
* Copyright (c) 2019 the Eclipse Milo Authors
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.milo.opcua.sdk.server.api;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ListMultimap;
import com.google.common.collect.Lists;
import com.google.common.collect.MapMaker;
import com.google.common.collect.Multimaps;
import com.google.common.collect.Sets;
import org.eclipse.milo.opcua.sdk.core.Reference;
import org.eclipse.milo.opcua.sdk.server.api.nodes.Node;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
public abstract class AbstractNodeManager<T extends Node> implements NodeManager<T> {
private final ConcurrentMap<NodeId, T> nodeMap;
private final ListMultimap<NodeId, Reference> concreteReferences;
private final ListMultimap<NodeId, Reference> virtualReferences;
public AbstractNodeManager() {
nodeMap = makeNodeMap(new MapMaker());
concreteReferences = Multimaps.synchronizedListMultimap(ArrayListMultimap.create());
virtualReferences = Multimaps.synchronizedListMultimap(ArrayListMultimap.create());
}
/**
* Optionally customize the backing {@link ConcurrentMap} with the provided {@link MapMaker}.
*
* @param mapMaker the {@link MapMaker} that make the backing map with.
* @return a {@link ConcurrentMap}.
*/
protected ConcurrentMap<NodeId, T> makeNodeMap(MapMaker mapMaker) {
return mapMaker.makeMap();
}
@Override
public void addNode(T node) {
nodeMap.put(node.getNodeId(), node);
}
@Override
public boolean containsNode(NodeId nodeId) {
return nodeMap.containsKey(nodeId);
}
@Override
public Optional<T> getNode(NodeId nodeId) {
return Optional.ofNullable(nodeMap.get(nodeId));
}
@Override
public Optional<T> removeNode(NodeId nodeId) {
return Optional.ofNullable(nodeMap.remove(nodeId));
}
@Override
public void addReference(Reference reference) {
concreteReferences.put(reference.getSourceNodeId(), reference);
}
@Override
public void addVirtualReference(Reference reference) {
virtualReferences.put(reference.getSourceNodeId(), reference);
}
@Override
public void removeReference(Reference reference) {
concreteReferences.remove(reference.getSourceNodeId(), reference);
}
@Override
public void removeVirtualReference(Reference reference) {
virtualReferences.remove(reference.getSourceNodeId(), reference);
}
@Override
public List<Reference> getReferences(NodeId nodeId) {
List<Reference> concreteList = concreteReferences.get(nodeId);
LinkedHashSet<Reference> concreteSet = new LinkedHashSet<>(concreteList);
LinkedHashSet<Reference> virtualSet = new LinkedHashSet<>(virtualReferences.get(nodeId));
// All virtual refs that do not also have a concrete ref
Set<Reference> uniqueVirtualRefs = Sets.difference(virtualSet, concreteSet);
List<Reference> references = Lists.newArrayList();
references.addAll(concreteList);
references.addAll(uniqueVirtualRefs);
return references;
}
}
|
[
"fer.madeiral@gmail.com"
] |
fer.madeiral@gmail.com
|
5ddf14cc14e02eda13b25b4256094e6f13484ff4
|
134fca5b62ca6bac59ba1af5a5ebd271d9b53281
|
/build/stx/libjava/tests/mauve/java/src/gnu/testlet/java/io/OutputStreamWriter/jdk11.java
|
f7fc22889c304f31531a6acbe5d0c822d2429116
|
[
"MIT"
] |
permissive
|
GunterMueller/ST_STX_Fork
|
3ba5fb5482d9827f32526e3c32a8791c7434bb6b
|
d891b139f3c016b81feeb5bf749e60585575bff7
|
refs/heads/master
| 2020-03-28T03:03:46.770962
| 2018-09-06T04:19:31
| 2018-09-06T04:19:31
| 147,616,821
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,148
|
java
|
// Test for OutputStreamWriter methods
// Written by Daryl Lee (dol@sources.redhat.com)
// Elaboration of except.java by paul@dawa.demon.co.uk
// This file is part of Mauve.
// Mauve 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 2, or (at your option)
// any later version.
// Mauve 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 Mauve; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
// Tags: JDK1.1
package gnu.testlet.java.io.OutputStreamWriter;
import gnu.testlet.Testlet;
import gnu.testlet.TestHarness;
import java.io.OutputStreamWriter;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
public class jdk11 implements Testlet {
public void test(TestHarness harness) {
try {
String tstr = "ABCDEFGH";
ByteArrayOutputStream baos = new ByteArrayOutputStream();
OutputStreamWriter osw = new OutputStreamWriter(baos); //Default encoding
harness.check(true, "OutputStreamWriter(writer)");
harness.check(osw.getEncoding() != null,
"non-null getEncoding");
osw.write(tstr.charAt(0)); // 'A'
harness.check(true, "write(int)");
osw.write("ABCDE", 1, 3); // 'ABCD'
harness.check(true, "write(string, off, len)");
char[] cbuf = new char[8];
tstr.getChars(4, 8, cbuf, 0);
osw.write(cbuf, 0, 4); // 'ABCDEFGH'
harness.check(true, "write(char[], off, len)");
osw.flush();
harness.check(true, "flush()");
harness.check(baos.toString(), tstr, "Wrote all characters okay");
osw.close();
harness.check(osw.getEncoding(), null,
"null encoding after close");
ByteArrayOutputStream baos2 = new ByteArrayOutputStream();
// ISO-8859-1 is a required encoding and this is the
// "preferred" name, latin1 is a legal alias
// see also http://www.iana.org/assignments/character-sets
OutputStreamWriter osw2 = new OutputStreamWriter(baos2, "ISO-8859-1");
// Note that for java.io the canonical name as returned by
// getEncoding() must be the "historical" name. ISO8859_1.
harness.check(osw2.getEncoding(), "ISO8859_1", "OutputStreamWriter(writer, encoding)");
osw2.close();
osw2 = new OutputStreamWriter(baos2, "latin1");
harness.check(osw2.getEncoding(), "ISO8859_1", "OutputStreamWriter(writer, encoding) // alias");
osw2.close();
} catch (IOException e) {
harness.check(false, "IOException unexpected");
}
}
}
|
[
"gunter.mueller@gmail.com"
] |
gunter.mueller@gmail.com
|
b1fbd3ececc0973049a9991ea33e97f215c13a39
|
5272ea9b2c0679a5ba5ef4b7cabcf75a30634ee2
|
/spring-messaging/src/test/java/org/springframework/messaging/simp/user/UserRegistryMessageHandlerTests.java
|
c74c720182e0d015e9b85f33e7104860682bf344
|
[
"Apache-2.0"
] |
permissive
|
whvixd/spring4-note
|
ad3fa3a79fc0a23b8f6bc5e27770b3eaa09c0593
|
1f37db9f25bdadb09f417ce84f6266921c308dee
|
refs/heads/master
| 2022-12-30T16:36:20.729963
| 2020-10-21T03:47:10
| 2020-10-21T03:47:10
| 269,893,579
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,286
|
java
|
/*
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.simp.user;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.concurrent.ScheduledFuture;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.MessageHeaders;
import org.springframework.messaging.converter.MappingJackson2MessageConverter;
import org.springframework.messaging.converter.MessageConverter;
import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.messaging.simp.broker.BrokerAvailabilityEvent;
import org.springframework.scheduling.TaskScheduler;
/**
* User tests for {@link UserRegistryMessageHandler}.
* @author Rossen Stoyanchev
*/
public class UserRegistryMessageHandlerTests {
private UserRegistryMessageHandler handler;
private SimpUserRegistry localRegistry;
private MultiServerUserRegistry multiServerRegistry;
private MessageConverter converter;
@Mock
private MessageChannel brokerChannel;
@Mock
private TaskScheduler taskScheduler;
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
when(this.brokerChannel.send(any())).thenReturn(true);
this.converter = new MappingJackson2MessageConverter();
SimpMessagingTemplate brokerTemplate = new SimpMessagingTemplate(this.brokerChannel);
brokerTemplate.setMessageConverter(this.converter);
this.localRegistry = mock(SimpUserRegistry.class);
this.multiServerRegistry = new MultiServerUserRegistry(this.localRegistry);
this.handler = new UserRegistryMessageHandler(this.multiServerRegistry, brokerTemplate,
"/topic/simp-user-registry", this.taskScheduler);
}
@Test
public void brokerAvailableEvent() throws Exception {
Runnable runnable = getUserRegistryTask();
assertNotNull(runnable);
}
@SuppressWarnings("unchecked")
@Test
public void brokerUnavailableEvent() throws Exception {
ScheduledFuture future = Mockito.mock(ScheduledFuture.class);
when(this.taskScheduler.scheduleWithFixedDelay(any(Runnable.class), any(Long.class))).thenReturn(future);
BrokerAvailabilityEvent event = new BrokerAvailabilityEvent(true, this);
this.handler.onApplicationEvent(event);
verifyNoMoreInteractions(future);
event = new BrokerAvailabilityEvent(false, this);
this.handler.onApplicationEvent(event);
verify(future).cancel(true);
}
@Test
public void broadcastRegistry() throws Exception {
TestSimpUser simpUser1 = new TestSimpUser("joe");
TestSimpUser simpUser2 = new TestSimpUser("jane");
simpUser1.addSessions(new TestSimpSession("123"));
simpUser1.addSessions(new TestSimpSession("456"));
HashSet<SimpUser> simpUsers = new HashSet<>(Arrays.asList(simpUser1, simpUser2));
when(this.localRegistry.getUsers()).thenReturn(simpUsers);
getUserRegistryTask().run();
ArgumentCaptor<Message> captor = ArgumentCaptor.forClass(Message.class);
verify(this.brokerChannel).send(captor.capture());
Message<?> message = captor.getValue();
assertNotNull(message);
MessageHeaders headers = message.getHeaders();
assertEquals("/topic/simp-user-registry", SimpMessageHeaderAccessor.getDestination(headers));
MultiServerUserRegistry remoteRegistry = new MultiServerUserRegistry(mock(SimpUserRegistry.class));
remoteRegistry.addRemoteRegistryDto(message, this.converter, 20000);
assertEquals(2, remoteRegistry.getUsers().size());
assertNotNull(remoteRegistry.getUser("joe"));
assertNotNull(remoteRegistry.getUser("jane"));
}
@Test
public void handleMessage() throws Exception {
TestSimpUser simpUser1 = new TestSimpUser("joe");
TestSimpUser simpUser2 = new TestSimpUser("jane");
simpUser1.addSessions(new TestSimpSession("123"));
simpUser2.addSessions(new TestSimpSession("456"));
HashSet<SimpUser> simpUsers = new HashSet<>(Arrays.asList(simpUser1, simpUser2));
SimpUserRegistry remoteUserRegistry = mock(SimpUserRegistry.class);
when(remoteUserRegistry.getUsers()).thenReturn(simpUsers);
MultiServerUserRegistry remoteRegistry = new MultiServerUserRegistry(remoteUserRegistry);
Message<?> message = this.converter.toMessage(remoteRegistry.getLocalRegistryDto(), null);
this.handler.handleMessage(message);
assertEquals(2, remoteRegistry.getUsers().size());
assertNotNull(this.multiServerRegistry.getUser("joe"));
assertNotNull(this.multiServerRegistry.getUser("jane"));
}
@Test
public void handleMessageFromOwnBroadcast() throws Exception {
TestSimpUser simpUser = new TestSimpUser("joe");
simpUser.addSessions(new TestSimpSession("123"));
when(this.localRegistry.getUsers()).thenReturn(Collections.singleton(simpUser));
assertEquals(1, this.multiServerRegistry.getUsers().size());
Message<?> message = this.converter.toMessage(this.multiServerRegistry.getLocalRegistryDto(), null);
this.multiServerRegistry.addRemoteRegistryDto(message, this.converter, 20000);
assertEquals(1, this.multiServerRegistry.getUsers().size());
}
private Runnable getUserRegistryTask() {
BrokerAvailabilityEvent event = new BrokerAvailabilityEvent(true, this);
this.handler.onApplicationEvent(event);
ArgumentCaptor<? extends Runnable> captor = ArgumentCaptor.forClass(Runnable.class);
verify(this.taskScheduler).scheduleWithFixedDelay(captor.capture(), eq(10000L));
return captor.getValue();
}
}
|
[
"wangzhx@fxiaoke.com"
] |
wangzhx@fxiaoke.com
|
8a969217e960295f352915915a3846c910468f46
|
a2158de9ea231b4433ef32a7e98f1072b2eae4a6
|
/lib/src/main/java/com/d/lib/taskscheduler/schedule/Schedulers.java
|
4b2e9643390d947dcfbbb1c95f5ea03bbd924c92
|
[
"Apache-2.0"
] |
permissive
|
Dsiner/TaskScheduler
|
bde1c2735aa7d7ff2f051f3a5c69e75fc42aa8ee
|
2ec38923137adae528f85c4a14c0edfea463a2a8
|
refs/heads/master
| 2021-06-19T21:08:44.885924
| 2020-12-24T13:29:10
| 2020-12-24T13:29:10
| 133,646,662
| 6
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,896
|
java
|
package com.d.lib.taskscheduler.schedule;
import android.os.Looper;
import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
import com.d.lib.taskscheduler.TaskScheduler;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Schedulers
* Created by D on 2018/5/15.
*/
public class Schedulers {
static final int DEFAULT_THREAD = 0;
static final int NEW_THREAD = 1;
static final int IO = 2;
static final int MAIN_THREAD = 3;
@Scheduler
public static int defaultThread() {
return DEFAULT_THREAD;
}
@Scheduler
public static int newThread() {
return NEW_THREAD;
}
@Scheduler
public static int io() {
return IO;
}
@Scheduler
public static int mainThread() {
return MAIN_THREAD;
}
/**
* Executes the given runnable at some time in the future.
* The runnable may execute in a new thread, in a pooled thread, or in the calling thread
*/
public static void switchThread(@Scheduler final int scheduler, @NonNull final Runnable runnable) {
if (scheduler == NEW_THREAD) {
TaskScheduler.executeNew(runnable);
return;
} else if (scheduler == IO) {
TaskScheduler.executeTask(runnable);
return;
} else if (scheduler == MAIN_THREAD) {
TaskScheduler.executeMain(runnable);
return;
}
runnable.run();
}
public static boolean isMainThread() {
return Looper.getMainLooper().getThread() == Thread.currentThread();
}
@IntDef({DEFAULT_THREAD, NEW_THREAD, IO, MAIN_THREAD})
@Target({ElementType.METHOD, ElementType.PARAMETER})
@Retention(RetentionPolicy.SOURCE)
public @interface Scheduler {
}
}
|
[
"s90789@outlook.com"
] |
s90789@outlook.com
|
70b0f6ce377042e7d7c9bf2c157ac19fc450bd47
|
4abd603f82fdfa5f5503c212605f35979b77c406
|
/html/Programs/hw4-diff/r04522627-208-10/Diff.java
|
b6dd6e765fed3e9bb156e72646dc1e0376d8d196
|
[] |
no_license
|
dn070017/1042-PDSA
|
b23070f51946c8ac708d3ab9f447ab8185bd2a34
|
5e7d7b1b2c9d751a93de9725316aa3b8f59652e6
|
refs/heads/master
| 2020-03-20T12:13:43.229042
| 2018-06-15T01:00:48
| 2018-06-15T01:00:48
| 137,424,305
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,322
|
java
|
import java.util.Iterator;
import java.util.NoSuchElementException;
public class Deque<Item> implements Iterable<Item> {
private int N; // number of elements on queue
private Node<Item> first; // beginning of queue
private Node<Item> last; // end of queue
// helper linked list class
private static class Node<Item> {
private Item item;
private Node<Item> next;
private Node<Item> pre;
}
/**
.
*/
public Deque() {
first = null;
last = null;
N = 0;
}
/**
* Is this queue empty?
* @return true if this queue is empty; false otherwise
*/
public boolean isEmpty() {
return (first == null || last == null);
}
/**
.
* @return the number of items in this queue
*/
public int size() {
return N;
}
/**
.
* @return the item least recently added to this queue
* @throws java.util.NoSuchElementException if this queue is empty
*/
// public Item peek() {
// if (isEmpty()) throw new NoSuchElementException(""Queue underflow"");
// return first.item;
// }
public void addFirst(Item item) // add the item to the front
{
if(item == null) throw new NullPointerException();
Node<Item> oldfirst = first;
first = new Node<Item>();
first.item = item;
first.next = oldfirst;
first.pre = null;
if (isEmpty()) last = first;
else oldfirst.pre = first;
N++;
}
public void addLast(Item item) // add the item to the end
{
if(item == null) throw new NullPointerException();
Node<Item> oldlast = last;
last = new Node<Item>();
last.item = item;
last.next = null;
last.pre = oldlast;
if (isEmpty()) first = last;
else oldlast.next = last;
N++;
}
public Item removeFirst() // remove and return the item from the front
{
if (isEmpty()) throw new NoSuchElementException();
Item item = first.item;
first = first.next;
N--;
if (isEmpty())
{
first = null;
last = null;
} // to avoid loitering
else first.pre = null;
return item;
}
public Item removeLast() // remove and return the item from the end
{
if (isEmpty()) throw new NoSuchElementException();
Item item = last.item;
last = last.pre;
N--;
if (isEmpty())
{
first = null;
last = null;
}
else last.next = null;
return item;
}
/**
.
* @param item the item to add
*/
/* public void enqueue(Item item) {
Node<Item> oldlast = last;
last = new Node<Item>();
last.item = item;
last.next = null;
if (isEmpty()) first = last;
else oldlast.next = last;
N++;
}*/
/**
.
* @return the item on this queue that was least recently added
* @throws java.util.NoSuchElementException if this queue is empty
*/
/*public Item dequeue() {
if (isEmpty()) throw new NoSuchElementException(""Queue underflow"");
Item item = first.item;
first = first.next;
N--;
if (isEmpty()) last = null; // to avoid loitering
return item;
}*/
/**
.
* @return the sequence of items in FIFO order, separated by spaces
*/
// public String toString() {
// StringBuilder s = new StringBuilder();
// for (Item item : this)
// s.append(item + "" "");
// return s.toString();
// }
/**
.
* @return an iterator that iterates over the items in this queue in FIFO order
*/
@Override
public Iterator<Item> iterator() {
return new ListIterator<>(first);
}
// an iterator, doesn't implement remove() since it's optional
private class ListIterator<Item> implements Iterator<Item> {
private Node<Item> current;
public ListIterator(Node<Item> first) {
current = first;
}
@Override
public boolean hasNext() { return current != null; }
@Override
public void remove() { throw new UnsupportedOperationException(); }
@Override
public Item next() {
if (!hasNext()) throw new NoSuchElementException();
Item item = current.item;
current = current.next;
return item;
}
}
/**
.
*/
public static void main(String[] args) {
// Deque<String> q = new Deque<String>();
// while (!StdIn.isEmpty()) {
// String item = StdIn.readString();
// if (!item.equals(""-"")) q.enqueue(item);
// else if (!q.isEmpty()) StdOut.print(q.dequeue() + "" "");
// }
// StdOut.println(""("" + q.size() + "" left on queue)"");
}
}
|
[
"dn070017@gmail.com"
] |
dn070017@gmail.com
|
ef46ca5fdc09b3e02cd4951c3899590aea56651c
|
942b915c089e0a97cd57bbdaac40ea5f1c9688c2
|
/src/main/java/com/liangxunwang/unimanager/dao/ScoreRuleDao.java
|
5699febe034e629bfc1b8a77f4e87d95b85d7681
|
[] |
no_license
|
eryiyi/LbinsManager
|
86e8648804b391beed69cab085a43f1ea6ee59c7
|
05f9f745178da26ac3e78fe6add37e56f02ecbde
|
refs/heads/master
| 2021-01-10T11:50:40.649724
| 2016-04-02T02:33:38
| 2016-04-02T02:33:38
| 55,196,053
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 439
|
java
|
package com.liangxunwang.unimanager.dao;
import com.liangxunwang.unimanager.model.ScoreRule;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* Created by liuzwei on 2015/2/4.
*/
@Repository("scoreRuleDao")
public interface ScoreRuleDao {
public void save(ScoreRule scoreRule);
public List<ScoreRule> list();
public void update(ScoreRule scoreRule);
public void delete(String ruleId);
}
|
[
"826321978@qq.com"
] |
826321978@qq.com
|
b2288961b4e151e8813b9f9360ad677fafd07c06
|
b02d70f6d23cbfe3cc9424e6c08369bfc29ad6bc
|
/li.strolch.service/src/main/java/li/strolch/command/AddResourceCollectionCommand.java
|
e3c15b5fa23eb0a59fdae738807d730a2ba5f27a
|
[
"Apache-2.0"
] |
permissive
|
garunjp/strolch
|
d7df3f4d07f412e92d1907fce36b2afd435050af
|
e44094d861ac1efcc5ba99c0779568e850b7c555
|
refs/heads/master
| 2020-12-27T15:00:47.586870
| 2015-03-02T13:03:02
| 2015-03-02T13:03:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,405
|
java
|
/*
* Copyright 2013 Robert von Burg <eitch@eitchnet.ch>
*
* 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 li.strolch.command;
import java.text.MessageFormat;
import java.util.List;
import li.strolch.agent.api.ComponentContainer;
import li.strolch.agent.api.ResourceMap;
import li.strolch.exception.StrolchException;
import li.strolch.model.Resource;
import li.strolch.persistence.api.StrolchTransaction;
import li.strolch.service.api.Command;
import ch.eitchnet.utils.dbc.DBC;
/**
* @author Robert von Burg <eitch@eitchnet.ch>
*/
public class AddResourceCollectionCommand extends Command {
private List<Resource> resources;
/**
* @param tx
*/
public AddResourceCollectionCommand(ComponentContainer container, StrolchTransaction tx) {
super(container, tx);
}
/**
* @param resources
* the resources to set
*/
public void setResources(List<Resource> resources) {
this.resources = resources;
}
@Override
public void validate() {
DBC.PRE.assertNotNull("Resource list may not be null!", this.resources);
}
@Override
public void doCommand() {
for (Resource resource : this.resources) {
tx().lock(resource);
}
ResourceMap resourceMap = tx().getResourceMap();
for (Resource resource : this.resources) {
if (resourceMap.hasElement(tx(), resource.getType(), resource.getId())) {
String msg = MessageFormat.format("The Resource {0} already exists!", resource.getLocator());
throw new StrolchException(msg);
}
}
resourceMap.addAll(tx(), this.resources);
}
@Override
public void undo() {
if (this.resources != null && !this.resources.isEmpty() && tx().isRollingBack()) {
ResourceMap resourceMap = tx().getResourceMap();
for (Resource resource : this.resources) {
if (resourceMap.hasElement(tx(), resource.getType(), resource.getId())) {
resourceMap.remove(tx(), resource);
}
}
}
}
}
|
[
"eitch@eitchnet.ch"
] |
eitch@eitchnet.ch
|
493e97072de3a2012f466c91dca80fa09d0ec470
|
8dadce08a76ce387608951673fc0364feaa9a06a
|
/flexodesktop/generators/flexocodegenerator/src/test/java/org/openflexo/generator/AllCGTests.java
|
53dca37faa1c10478b36bdd179acff0885235c1c
|
[] |
no_license
|
melbarra/openflexo
|
b8e1a97d73a9edebad198df4e776d396ae8e9a09
|
9b2d8efe1982ec8f64dee8c43a2e7207594853f3
|
refs/heads/master
| 2021-01-24T02:22:47.141424
| 2012-03-12T00:15:57
| 2012-03-12T00:15:57
| 2,756,256
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,242
|
java
|
/*
* (c) Copyright 2010-2011 AgileBirds
*
* This file is part of OpenFlexo.
*
* OpenFlexo 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.
*
* OpenFlexo 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 OpenFlexo. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.openflexo.generator;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* @author gpolet
*
*/
public class AllCGTests
{
public static Test suite()
{
TestSuite suite = new TestSuite("Tests for Code Generator");
//$JUnit-BEGIN$
suite.addTestSuite(TestCG.class);
suite.addTestSuite(TestCG2.class);
suite.addTestSuite(TestRoundTrip.class);
//suite.addTestSuite(TestWar.class);
//$JUnit-END$
return suite;
}
}
|
[
"guillaume.polet@gmail.com"
] |
guillaume.polet@gmail.com
|
b819d74a12e3366f0482adc2ca83751bba4bb491
|
6cef34a322f0e0b9cfc2d995321edcf068e69cc5
|
/HelloSpring/src/test/java/hello/HelloSpring/repository/MemoryMemberRepositoryTest.java
|
efa8222cb7cbed0010f15e3defbbbb248cf695d6
|
[] |
no_license
|
ev15963/IntelliJ_Spring
|
1b3e302259c95c6cee47cc9e4701d5a378b8cf1f
|
a9f4e385e4eca3b73ffbcfe5cf647d6d39b5c402
|
refs/heads/master
| 2023-09-04T07:14:24.897944
| 2023-08-30T22:33:50
| 2023-08-30T22:33:50
| 254,678,085
| 0
| 0
| null | 2020-10-14T00:13:22
| 2020-04-10T16:06:48
|
Java
|
UTF-8
|
Java
| false
| false
| 1,595
|
java
|
package hello.HelloSpring.repository;
import hello.HelloSpring.domain.Member;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
class MemoryMemberRepositoryTest {
MemberRepository repository = new MemoryMemberRepository();
// @AfterEach
// public void afterEach() {
// repository.clearStore();
// }
@Test
public void save() {
Member member = new Member();
member.setName("spring");
repository.save(member);
Member result = repository.findById(member.getId()).get();
System.out.println("result = " + (result == member));
Assertions.assertEquals(member, result);
}
@Test
public void findByName() {
Member member1 = new Member();
member1.setName("spring1");
repository.save(member1);
Member member2 = new Member();
member2.setName("spring2");
repository.save(member2);
//when
Member result = repository.findByName("spring1").get();
//then
assertThat(result).isEqualTo(member1);
}
@Test
public void findAll() {
//given
Member member1 = new Member();
member1.setName ("spring");
repository.save(member1);
Member member2 = new Member();
member2.setName("spring2");
repository.save(member2);
List<Member> result = repository.findByAll();
assertThat(result.size()).isEqualTo(2);
}
}
|
[
"ev15963@hs.ac.kr"
] |
ev15963@hs.ac.kr
|
e7e0c496a7404763eebebf23805abeb425177e2a
|
a52a0ccc2cc1ee565a67c670bd6849ae65688b3e
|
/app/src/main/java/uinbdg/developer/surveriorapps/DashboardActivity.java
|
78bac88733cdcd17ab622557a434aea30ad600fb
|
[] |
no_license
|
NikkoES/Surverior
|
bb804768c11ff2ded2669f586f916b99ad8810ff
|
58e231c71cf9d121ffa25423f4157557273b45de
|
refs/heads/master
| 2021-05-01T14:31:20.053766
| 2018-02-11T06:56:33
| 2018-02-11T06:56:33
| 121,086,952
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,281
|
java
|
package uinbdg.developer.surveriorapps;
import android.support.annotation.ColorRes;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.aurelhubert.ahbottomnavigation.AHBottomNavigation;
import com.aurelhubert.ahbottomnavigation.AHBottomNavigationItem;
import com.aurelhubert.ahbottomnavigation.notification.AHNotification;
import uinbdg.developer.surveriorapps.adapter.BottomBarAdapter;
import uinbdg.developer.surveriorapps.adapter.NoSwipePager;
import uinbdg.developer.surveriorapps.fragment.HistoryFragment;
import uinbdg.developer.surveriorapps.fragment.HomeFragment;
import uinbdg.developer.surveriorapps.fragment.ProfileFragment;
public class DashboardActivity extends AppCompatActivity {
private NoSwipePager viewPager;
private AHBottomNavigation bottomNavigation;
private BottomBarAdapter pagerAdapter;
private boolean notificationVisible = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dashboard);
//noinspection ConstantConditions
getSupportActionBar().setTitle("Surverior Apps");
setupViewPager();
bottomNavigation = (AHBottomNavigation) findViewById(R.id.bottom_navigation);
setupBottomNavBehaviors();
setupBottomNavStyle();
addBottomNavigationItems();
bottomNavigation.setCurrentItem(0);
bottomNavigation.setOnTabSelectedListener(new AHBottomNavigation.OnTabSelectedListener() {
@Override
public boolean onTabSelected(int position, boolean wasSelected) {
// fragment.updateColor(ContextCompat.getColor(MainActivity.this, colors[position]));
if (!wasSelected)
viewPager.setCurrentItem(position);
// remove notification badge
int lastItemPos = bottomNavigation.getItemsCount() - 1;
if (notificationVisible && position == lastItemPos)
bottomNavigation.setNotification(new AHNotification(), lastItemPos);
return true;
}
});
}
private void setupViewPager() {
viewPager = (NoSwipePager) findViewById(R.id.viewpager);
viewPager.setPagingEnabled(false);
pagerAdapter = new BottomBarAdapter(getSupportFragmentManager());
pagerAdapter.addFragments(new HomeFragment());
pagerAdapter.addFragments(new HistoryFragment());
pagerAdapter.addFragments(new ProfileFragment());
viewPager.setAdapter(pagerAdapter);
}
public void setupBottomNavBehaviors() {
// bottomNavigation.setBehaviorTranslationEnabled(false);
/*
Before enabling this. Change MainActivity theme to MyTheme.TranslucentNavigation in
AndroidManifest.
Warning: Toolbar Clipping might occur. Solve this by wrapping it in a LinearLayout with a top
View of 24dp (status bar size) height.
*/
bottomNavigation.setTranslucentNavigationEnabled(false);
}
/**
* Adds styling properties to {@link AHBottomNavigation}
*/
private void setupBottomNavStyle() {
/*
Set Bottom Navigation colors. Accent color for active item,
Inactive color when its view is disabled.
Will not be visible if setColored(true) and default current item is set.
*/
bottomNavigation.setDefaultBackgroundColor(getResources().getColor(R.color.bottomtab_active));
bottomNavigation.setAccentColor(fetchColor(R.color.bottomtab_active));
bottomNavigation.setInactiveColor(fetchColor(R.color.bottomtab_item_resting));
// Colors for selected (active) and non-selected items.
bottomNavigation.setColoredModeColors(getResources().getColor(R.color.bottomtab_active),
fetchColor(R.color.bottomtab_item_resting));
// Enables Reveal effect
bottomNavigation.setColored(true);
// Displays item Title always (for selected and non-selected items)
bottomNavigation.setTitleState(AHBottomNavigation.TitleState.ALWAYS_SHOW);
}
/**
* Adds (items) {@link AHBottomNavigationItem} to {@link AHBottomNavigation}
* Also assigns a distinct color to each Bottom Navigation item, used for the color ripple.
*/
private void addBottomNavigationItems() {
AHBottomNavigationItem item1 = new AHBottomNavigationItem(R.string.tab_1, R.drawable.ic_home_black_24px, R.color.bottomtab);
AHBottomNavigationItem item2 = new AHBottomNavigationItem(R.string.tab_2, R.drawable.ic_list_black_24px, R.color.bottomtab);
AHBottomNavigationItem item3 = new AHBottomNavigationItem(R.string.tab_3, R.drawable.ic_account_box_black_24px, R.color.bottomtab);
bottomNavigation.addItem(item1);
bottomNavigation.addItem(item2);
bottomNavigation.addItem(item3);
}
/**
* Simple facade to fetch color resource, so I avoid writing a huge line every time.
*
* @param color to fetch
* @return int color value.
*/
private int fetchColor(@ColorRes int color) {
return ContextCompat.getColor(this, color);
}
}
|
[
"nikkoeka04@gmail.com"
] |
nikkoeka04@gmail.com
|
0575e6f25b1f0258db27f0b4985d0de95a6a30bd
|
5f67a36915a67c07fda935215883517d933d8021
|
/src/cf529d3/D.java
|
0641654254d9aeedcdd41b701d91667670262640
|
[] |
no_license
|
joedurie/java
|
79679ea3b3e2da979fe85e3e3fec2e0a7e06ff83
|
9abb2d86a8a4b7a2ff0e933e0b1ba81b758cb311
|
refs/heads/master
| 2020-07-27T14:04:31.261585
| 2019-09-17T18:07:14
| 2019-09-17T18:07:14
| 209,116,065
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 687
|
java
|
package cf529d3;
import java.util.*;
public class D {
public static void main(String[]args){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
HashMap<Integer,TreeSet<Integer>>map=new HashMap<Integer,TreeSet<Integer>>();
for(int i=1;i<=n;i++)
map.put(i,new TreeSet<Integer>());
for(int i=1;i<=n;i++){
map.get(i).add(sc.nextInt());
map.get(i).add(sc.nextInt());
}
sc.close();
int curr=1;
boolean[]used=new boolean[n];
do{
System.out.print(curr+" ");
used[curr-1]=true;
int a=map.get(curr).first(),b=map.get(curr).last();
if(!used[b-1]&&map.get(b).contains(a))
curr=b;
else
curr=a;
}while(curr!=1);
}
}
|
[
"45380849+joedurie@users.noreply.github.com"
] |
45380849+joedurie@users.noreply.github.com
|
60431dcfb32569143695d66e067441d9f0315947
|
69c00032e21079eb41b86c2085d38b8ba3e6e5cb
|
/Development_library/05Coding/安卓/andr_b/src/cn/suanzi/baomi/shop/activity/BillDetailActivity.java
|
83f20a2b86b111d66bc791e46937dcaed92d3a2c
|
[] |
no_license
|
qiaobenlaing/coupon
|
476b90ac9c8a9bb56f4c481c3e0303adc9575133
|
32a53667f0c496cda0d7df71651e07f0138001d3
|
refs/heads/master
| 2023-01-20T03:40:42.118722
| 2020-11-20T00:59:29
| 2020-11-20T01:13:28
| 312,522,162
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 390
|
java
|
package cn.suanzi.baomi.shop.activity;
import android.app.Fragment;
import cn.suanzi.baomi.base.SingleFragmentActivity;
import cn.suanzi.baomi.shop.fragment.BillDetailFragment;
/**
* 账单详情
* @author wensi.yu
*
*/
public class BillDetailActivity extends SingleFragmentActivity{
@Override
protected Fragment createFragment() {
return BillDetailFragment.newInstance();
}
}
|
[
"980415842@qq.com"
] |
980415842@qq.com
|
feb9a0e72b128ff9969a26a87a56383b9c62739d
|
01b23223426a1eb84d4f875e1a6f76857d5e8cd9
|
/icefaces3/scratchpads/ice-6600/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/compat/menuBar/MenuBarClick.java
|
4e269e6350aa104242bd06f8edd9c586435fb5cd
|
[
"Apache-2.0"
] |
permissive
|
numbnet/icesoft
|
8416ac7e5501d45791a8cd7806c2ae17305cdbb9
|
2f7106b27a2b3109d73faf85d873ad922774aeae
|
refs/heads/master
| 2021-01-11T04:56:52.145182
| 2016-11-04T16:43:45
| 2016-11-04T16:43:45
| 72,894,498
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,748
|
java
|
/*
* Copyright 2004-2012 ICEsoft Technologies Canada Corp.
*
* 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.icefaces.samples.showcase.example.compat.menuBar;
import java.io.Serializable;
import javax.faces.bean.CustomScoped;
import javax.faces.bean.ManagedBean;
import javax.faces.event.ActionEvent;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
import org.icefaces.samples.showcase.metadata.annotation.ComponentExample;
import org.icefaces.samples.showcase.metadata.annotation.ExampleResource;
import org.icefaces.samples.showcase.metadata.annotation.ExampleResources;
import org.icefaces.samples.showcase.metadata.annotation.Menu;
import org.icefaces.samples.showcase.metadata.annotation.MenuLink;
import org.icefaces.samples.showcase.metadata.annotation.ResourceType;
import org.icefaces.samples.showcase.metadata.context.ComponentExampleImpl;
@ComponentExample(
parent = MenuBarBean.BEAN_NAME,
title = "example.compat.menuBar.click.title",
description = "example.compat.menuBar.click.description",
example = "/resources/examples/compat/menuBar/menuBarClick.xhtml"
)
@ExampleResources(
resources ={
// xhtml
@ExampleResource(type = ResourceType.xhtml,
title="menuBarClick.xhtml",
resource = "/resources/examples/compat/"+
"menuBar/menuBarClick.xhtml"),
// Java Source
@ExampleResource(type = ResourceType.java,
title="MenuBarClick.java",
resource = "/WEB-INF/classes/org/icefaces/samples/"+
"showcase/example/compat/menuBar/MenuBarClick.java")
}
)
@ManagedBean(name= MenuBarClick.BEAN_NAME)
@CustomScoped(value = "#{window}")
public class MenuBarClick extends ComponentExampleImpl<MenuBarClick> implements Serializable {
public static final String BEAN_NAME = "menuBarClick";
private boolean displayOnClick = true;
public MenuBarClick() {
super(MenuBarClick.class);
}
public boolean getDisplayOnClick() { return displayOnClick; }
public void setDisplayOnClick(boolean displayOnClick) { this.displayOnClick = displayOnClick; }
}
|
[
"ted.goddard@8668f098-c06c-11db-ba21-f49e70c34f74"
] |
ted.goddard@8668f098-c06c-11db-ba21-f49e70c34f74
|
0b7ce1a572522a9bf47061f2c192351b15b9ee23
|
b49d56ae4b22eba2f5b04b7f16b6db8d18022fe8
|
/ScheduledRequest/src/main/java/com/appzoneltd/lastmile/microservice/scheduledrequest/OAuth2ResourceServerConfig.java
|
609a0d27ede98ec40808b015a0bcdffecc890091
|
[] |
no_license
|
hashish93/last-mile-backend
|
15259d7bbeadcf6c1b10fde4917279cd208b30cf
|
b15f29ac6aea277941b386e7ba8019d0ecf206ab
|
refs/heads/master
| 2020-04-07T14:31:54.409913
| 2018-11-20T21:15:09
| 2018-11-20T21:15:09
| 158,450,997
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 839
|
java
|
package com.appzoneltd.lastmile.microservice.scheduledrequest;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.access.expression.method.MethodSecurityExpressionHandler;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration;
import org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler;
@Configuration
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class OAuth2ResourceServerConfig extends GlobalMethodSecurityConfiguration {
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
return new OAuth2MethodSecurityExpressionHandler();
}
}
|
[
"m.hashish93@gmail.com"
] |
m.hashish93@gmail.com
|
08ff4e9bb7cdc4e3fdb3fc66e05ca9f7884c5d6a
|
573a66e4f4753cc0f145de8d60340b4dd6206607
|
/JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/363862/ij120-src/source/ij/plugin/PGM_Reader.java
|
ccfec35a578a3d49bdb349578787b5a07002114c
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
mkaouer/Code-Smells-Detection-in-JavaScript
|
3919ec0d445637a7f7c5f570c724082d42248e1b
|
7130351703e19347884f95ce6d6ab1fb4f5cfbff
|
refs/heads/master
| 2023-03-09T18:04:26.971934
| 2022-03-23T22:04:28
| 2022-03-23T22:04:28
| 73,915,037
| 8
| 3
| null | 2023-02-28T23:00:07
| 2016-11-16T11:47:44
| null |
UTF-8
|
Java
| false
| false
| 4,999
|
java
|
package ij.plugin;
import java.awt.*;
import java.awt.image.*;
import java.io.*;
import ij.*;
import ij.io.*;
import ij.process.*;
/**
This plug-in opens PGM (portable graymap) format images.
The portable graymap format is a lowest common denominator
grayscale file format. The definition is as follows:
- A "magic number" for identifying the file type. A pgm
file's magic number is the two characters "P2".
- Whitespace (blanks, TABs, CRs, LFs).
- A width, formatted as ASCII characters in decimal.
- Whitespace.
- A height, again in ASCII decimal.
- Whitespace.
- The maximum gray value, again in ASCII decimal.
- Whitespace.
- Width * height gray values, each in ASCII decimal, between
0 and the specified maximum value, separated by whi-
tespace, starting at the top-left corner of the graymap,
proceeding in normal English reading order. A value of 0
means black, and the maximum value means white.
- Characters from a "#" to the next end-of-line are ignored
(comments).
- No line should be longer than 70 characters.
Here is an example of a small graymap in this format:
P2
# feep.pgm
24 7
15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 3 3 3 3 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 15 15 15 0
0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 15 0
0 3 3 3 0 0 0 7 7 7 0 0 0 11 11 11 0 0 0 15 15 15 15 0
0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 0 0
0 3 0 0 0 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
There is a PGM variant that stores the pixel data as raw bytes:
-The "magic number" is "P5" instead of "P2".
-The gray values are stored as plain bytes, instead of ASCII decimal.
-No whitespace is allowed in the grays section, and only a single
character of whitespace (typically a newline) is allowed after the maxval.
-The files are smaller and many times faster to read and write.
*/
public class PGM_Reader extends ImagePlus implements PlugIn {
private int width, height;
private boolean rawBits;
public void run(String arg) {
OpenDialog od = new OpenDialog("PGM Reader...", arg);
String directory = od.getDirectory();
String name = od.getFileName();
if (name==null)
return;
String path = directory + name;
IJ.showStatus("Opening: " + path);
ImageProcessor ip;
try {
ip = openFile(path);
}
catch (Exception e) {
IJ.showMessage("PGM Reader", e.getMessage());
return;
}
setProcessor(name, ip);
if (arg.equals(""))
show();
}
public ImageProcessor openFile(String path) throws IOException {
InputStream is = new BufferedInputStream(new FileInputStream(path));
//This was a failed attempt to avoid the "deprecated" message
//Reader r = new InputStreamReader(is);
//StreamTokenizer tok = new StreamTokenizer(r);
StreamTokenizer tok = new StreamTokenizer(is);
tok.resetSyntax();
tok.wordChars(33, 255);
tok.whitespaceChars(0, ' ');
tok.parseNumbers();
tok.eolIsSignificant(true);
tok.commentChar('#');
openHeader(tok);
byte[] pixels = new byte[width*height];
ImageProcessor ip = new ByteProcessor(width, height, pixels, null);
if (rawBits)
openRawImage(is, width*height, pixels);
else
openAsciiImage(tok, width*height, pixels);
return ip;
}
public void openHeader(StreamTokenizer tok) throws IOException {
String magicNumber = getWord(tok);
if (magicNumber.equals("P5"))
rawBits = true;
else if (!magicNumber.equals("P2"))
throw new IOException("PGM files must start with \"P2\" or \"P5\"");
width = getInt(tok);
height = getInt(tok);
int maxValue = getInt(tok);
if (width==-1 || height==-1 || maxValue==-1)
throw new IOException("Error opening PGM header..");
if (maxValue>255)
throw new IOException("The maximum gray vale is larger than 255.");
}
public void openAsciiImage(StreamTokenizer tok, int size, byte[] pixels) throws IOException {
int i = 0;
int inc = size/20;
while (tok.nextToken() != tok.TT_EOF) {
if (tok.ttype==tok.TT_NUMBER) {
pixels[i++] = (byte)(((int)tok.nval)&255);
if (i%inc==0)
IJ.showProgress(0.5+((double)i/size)/2.0);
}
}
IJ.showProgress(1.0);
}
public void openRawImage(InputStream is, int size, byte[] pixels) throws IOException {
int count = 0;
while (count<size && count>=0)
count = is.read(pixels, count, size-count);
}
String getWord(StreamTokenizer tok) throws IOException {
while (tok.nextToken() != tok.TT_EOF) {
if (tok.ttype==tok.TT_WORD)
return tok.sval;
}
return null;
}
int getInt(StreamTokenizer tok) throws IOException {
while (tok.nextToken() != tok.TT_EOF) {
if (tok.ttype==tok.TT_NUMBER)
return (int)tok.nval;
}
return -1;
}
}
|
[
"mmkaouer@umich.edu"
] |
mmkaouer@umich.edu
|
8b91bfd9869b274e287d577632bf9f57d8a2ab8f
|
c705c7b80b19a9f769490293e8b0f5517e6d2237
|
/src/main/java/com/codefountain/security/entity/Post.java
|
ec5d268302a828d35b6d0b60b11e5af73ed23df6
|
[] |
no_license
|
musibs/bitcoin-portfolio-spring-security
|
a330b5656a26d9f558478e9431738a0591b76eed
|
c027614415101d09a355f0d9a79f6ae5055ab1a8
|
refs/heads/master
| 2022-07-05T03:13:34.515737
| 2020-05-21T04:20:00
| 2020-05-21T04:20:00
| 265,756,869
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 530
|
java
|
package com.codefountain.security.entity;
import org.bson.types.ObjectId;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
@Getter
@ToString
@EqualsAndHashCode
public class Post {
private String id;
private final String userName;
private final String content;
private final long timestamp;;
public Post(String userName, String content, long timestamp) {
this.userName = userName;
this.content = content;
this.timestamp = timestamp;
this.id = new ObjectId().toHexString();
}
}
|
[
"musib.somnath@gmail.com"
] |
musib.somnath@gmail.com
|
315061a1b694655d2251a653cf9c40391dd5b1dd
|
e7b92be503ff0ff8303e866fecad137a0937ed85
|
/back-end/hub-codegen/src/test/resources/OpenApi2JaxRsTest/_expected-nzdax/generated-api/src/main/java/org/example/api/beans/TradeResponse.java
|
0453f7ef0710857f8d36e6643973868df0721f58
|
[
"Apache-2.0"
] |
permissive
|
anniyanvr/apicurio-studio
|
2a2a6a82ce50aecdfc58ea41a85673ab1d63af6a
|
8be546683a72efec1258fe72c28badd625085539
|
refs/heads/master
| 2023-08-16T18:08:36.453778
| 2021-04-21T07:23:21
| 2021-04-21T07:23:21
| 135,623,068
| 0
| 0
|
Apache-2.0
| 2021-04-28T20:09:30
| 2018-05-31T18:48:46
|
Java
|
UTF-8
|
Java
| false
| false
| 4,397
|
java
|
package org.example.api.beans;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"id",
"info",
"timestamp",
"symbol",
"side",
"price",
"amount"
})
public class TradeResponse {
/**
* The unique identifier of the exchange for this trade
*
*/
@JsonProperty("id")
@JsonPropertyDescription("The unique identifier of the exchange for this trade")
private String id;
/**
* Raw trade response gotten from the exchange site's API
* (Required)
*
*/
@JsonProperty("info")
@JsonPropertyDescription("Raw trade response gotten from the exchange site's API")
private Info info;
/**
* The timestamp of this trade
*
*/
@JsonProperty("timestamp")
@JsonPropertyDescription("The timestamp of this trade")
private Date timestamp;
/**
* The currency pair of this trade
* (Required)
*
*/
@JsonProperty("symbol")
@JsonPropertyDescription("The currency pair of this trade")
private String symbol;
/**
* Wether this is a bid or ask (i.e. buy or sell) order
* (Required)
*
*/
@JsonProperty("side")
@JsonPropertyDescription("Wether this is a bid or ask (i.e. buy or sell) order")
private Side side;
/**
* The price of this trade
* (Required)
*
*/
@JsonProperty("price")
@JsonPropertyDescription("The price of this trade")
private Double price;
/**
* The amount of this trade
* (Required)
*
*/
@JsonProperty("amount")
@JsonPropertyDescription("The amount of this trade")
private Double amount;
/**
* The unique identifier of the exchange for this trade
*
*/
@JsonProperty("id")
public String getId() {
return id;
}
/**
* The unique identifier of the exchange for this trade
*
*/
@JsonProperty("id")
public void setId(String id) {
this.id = id;
}
/**
* Raw trade response gotten from the exchange site's API
* (Required)
*
*/
@JsonProperty("info")
public Info getInfo() {
return info;
}
/**
* Raw trade response gotten from the exchange site's API
* (Required)
*
*/
@JsonProperty("info")
public void setInfo(Info info) {
this.info = info;
}
/**
* The timestamp of this trade
*
*/
@JsonProperty("timestamp")
public Date getTimestamp() {
return timestamp;
}
/**
* The timestamp of this trade
*
*/
@JsonProperty("timestamp")
public void setTimestamp(Date timestamp) {
this.timestamp = timestamp;
}
/**
* The currency pair of this trade
* (Required)
*
*/
@JsonProperty("symbol")
public String getSymbol() {
return symbol;
}
/**
* The currency pair of this trade
* (Required)
*
*/
@JsonProperty("symbol")
public void setSymbol(String symbol) {
this.symbol = symbol;
}
/**
* Wether this is a bid or ask (i.e. buy or sell) order
* (Required)
*
*/
@JsonProperty("side")
public Side getSide() {
return side;
}
/**
* Wether this is a bid or ask (i.e. buy or sell) order
* (Required)
*
*/
@JsonProperty("side")
public void setSide(Side side) {
this.side = side;
}
/**
* The price of this trade
* (Required)
*
*/
@JsonProperty("price")
public Double getPrice() {
return price;
}
/**
* The price of this trade
* (Required)
*
*/
@JsonProperty("price")
public void setPrice(Double price) {
this.price = price;
}
/**
* The amount of this trade
* (Required)
*
*/
@JsonProperty("amount")
public Double getAmount() {
return amount;
}
/**
* The amount of this trade
* (Required)
*
*/
@JsonProperty("amount")
public void setAmount(Double amount) {
this.amount = amount;
}
}
|
[
"eric.wittmann@gmail.com"
] |
eric.wittmann@gmail.com
|
84b519d219a4375c06f20995340140afad5523d2
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/9/9_bf21f5a1e362ded0a801240b5c0cf603d3f903d1/ArchetypeIDTest/9_bf21f5a1e362ded0a801240b5c0cf603d3f903d1_ArchetypeIDTest_t.java
|
fb8a253d68d014de20dcfcceab5a73d11de9260f
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,973
|
java
|
/*
* component: "openEHR Reference Implementation"
* description: "Class ArchetypeIDTest"
* keywords: "unit test"
*
* author: "Rong Chen <rong@acode.se>"
* support: "Acode HB <support@acode.se>"
* copyright: "Copyright (c) 2004 Acode HB, Sweden"
* license: "See notice at bottom of class"
*
* file: "$URL: http://svn.openehr.org/ref_impl_java/BRANCHES/RM-1.0-update/libraries/src/test/org/openehr/rm/support/identification/ArchetypeIDTest.java $"
* revision: "$LastChangedRevision: 2 $"
* last_change: "$LastChangedDate: 2005-10-12 23:20:08 +0200 (Wed, 12 Oct 2005) $"
*/
/**
* ArchetypeIDTest
*
* @author Rong Chen
* @version 1.0
*/
package org.openehr.rm.support.identification;
import junit.framework.TestCase;
public class ArchetypeIDTest extends TestCase {
public ArchetypeIDTest(String test) {
super(test);
}
/**
* The fixture set up called before every test method.
*/
protected void setUp() throws Exception {
}
/**
* The fixture clean up called after every test method.
*/
protected void tearDown() throws Exception {
}
public void testConstructorTakesStringValue() throws Exception {
for (int i = 0; i < STRING_VALUE.length; i++) {
assertArchetypeID(new ArchetypeID(STRING_VALUE[ i ]), i);
}
}
public void testConstructorTakesSections() throws Exception {
for (int i = 0; i < SECTIONS.length; i++) {
ArchetypeID aid = new ArchetypeID(SECTIONS[ i ][ 0 ],
SECTIONS[ i ][ 1 ],
SECTIONS[ i ][ 2 ],
SECTIONS[ i ][ 3 ],
SECTIONS[ i ][ 4 ],
SECTIONS[ i ][ 5 ]);
assertArchetypeID(aid, i);
}
}
public void testConstructorWithInvalidValue() {
String[] data = {
// rm entity part
"openehr-ehr_rm.physical_examination.v2", // too less sections
"openehr-ehr_rm-section-entry.physical_examination-prenatal.v1", // to many sections
"openehr.ehr_rm-entry.progress_note-naturopathy.v2", // too many axes
// domain concept part
"openehr-ehr_rm-section.physical+examination.v2", // illegal char
// version part
"hl7-rim-act.progress_note.", // missing version
"openehr-ehr_rm-entry.progress_note-naturopathy" // missing version
};
for (int i = 0; i < data.length; i++) {
try {
new ArchetypeID(data[ i ]);
fail("should fail on " + data[ i ]);
} catch (Exception e) {
assertTrue(e instanceof IllegalArgumentException);
}
}
}
public void testEqualsIgnoreVersionID() throws Exception {
String base1 = "openehr-ehr_rm-section.physical_examination.";
String base2 = "openehr-ehr_rm-section.simple_medication.";
// same base
assertEqualsIgnoreVersion(base1, "v1", base1, "v1", true);
assertEqualsIgnoreVersion(base1, "v1", base1, "v2", true);
assertEqualsIgnoreVersion(base1, "v2", base1, "v1", true);
// different base
assertEqualsIgnoreVersion(base1, "v1", base2, "v1", false);
assertEqualsIgnoreVersion(base1, "v1", base2, "v2", false);
assertEqualsIgnoreVersion(base1, "v2", base2, "v1", false);
}
private void assertEqualsIgnoreVersion(String baseOne,
String versionOne,
String baseTwo,
String versionTwo,
boolean expected) {
assertEquals(expected,
new ArchetypeID(baseOne + versionOne).equalsIgnoreVersionID(
new ArchetypeID(baseTwo + versionTwo)));
}
public void testBase() {
String base = "openehr-ehr_rm-section.physical_examination";
assertEquals(base, new ArchetypeID(base + ".v1").base());
}
public void testMultipleSpecialisation() {
ArchetypeID aid = null;
try {
aid = new ArchetypeID("openEHR-EHR-CLUSTER.exam-generic-joint.v1");
assertEquals("wrong specialisation", "joint", aid.specialisation());
} catch(Exception e) {
e.printStackTrace();
fail("failed to create ArchetypeID with multiple specialisation");
}
}
// assert content of archetype id
private void assertArchetypeID(ArchetypeID aid, int i) {
assertEquals("value", STRING_VALUE[ i ], aid.getValue());
assertEquals("contextID", null, aid.contextID());
assertEquals("localID", STRING_VALUE[ i ], aid.localID());
assertEquals("rmOriginator", SECTIONS[ i ][ 0 ],
aid.rmOriginator());
assertEquals("rmName", SECTIONS[ i ][ 1 ], aid.rmName());
assertEquals("rmEntity", SECTIONS[ i ][ 2 ],
aid.rmEntity());
assertEquals("conceptName", SECTIONS[ i ][ 3 ],
aid.conceptName());
assertEquals("specialisation", SECTIONS[ i ][ 4 ],
aid.specialisation());
assertEquals("qualifiedRmEntity", AXES[ i ][ 0 ],
aid.qualifiedRmEntity());
assertEquals("domainConcept", AXES[ i ][ 1 ],
aid.domainConcept());
assertEquals("versionID", AXES[ i ][ 2 ],
aid.versionID());
}
private static String[] STRING_VALUE = {
"openehr-ehr_rm-section.physical_examination.v2",
"openehr-ehr_rm-section.physical_examination-prenatal.v1",
"hl7-rim-act.progress_note.v1",
"openehr-ehr_rm-ENTRY.progress_note-naturopathy.draft"
};
private static String[][] SECTIONS = {
{"openehr", "ehr_rm", "section", "physical_examination",
null, "v2"},
{"openehr", "ehr_rm", "section", "physical_examination",
"prenatal", "v1"},
{"hl7", "rim", "act", "progress_note", null, "v1"},
{"openehr", "ehr_rm", "ENTRY", "progress_note", "naturopathy", "draft"}
};
private static String[][] AXES = {
{"openehr-ehr_rm-section", "physical_examination", "v2"},
{"openehr-ehr_rm-section", "physical_examination-prenatal",
"v1"},
{"hl7-rim-act", "progress_note", "v1"},
{"openehr-ehr_rm-ENTRY", "progress_note-naturopathy", "draft"}
};
}
/*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the 'License'); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an 'AS IS' basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is ArchetypeIDTest.java
*
* The Initial Developer of the Original Code is Rong Chen.
* Portions created by the Initial Developer are Copyright (C) 2003-2004
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* 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.
*
* ***** END LICENSE BLOCK *****
*/
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
a4b013c715702315da6fbca70ecda9f6be13f44d
|
873ba033d4c470f88512544bbaeab2a5dbfbf7a6
|
/Java/CS-316-PrincipleOfProgrammingLanguage-master/Parser/src/Parenthesized.java
|
019d1ba2034abc398324a032261a53f2c979d289
|
[] |
no_license
|
derickh93/School-Code
|
a888c88d8cf1270865b84867c4ed4dcaee619613
|
fea2081956ceb9941f3ceb58e04fbe8f5b7b4f23
|
refs/heads/main
| 2023-05-27T04:41:42.522130
| 2021-06-10T05:22:04
| 2021-06-10T05:22:04
| 301,509,770
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 261
|
java
|
class Parenthesized extends Primary
{
Expr expr;
Parenthesized(Expr e)
{
expr = e;
}
void printParseTree(String indent){
IO.displayln(indent + indent.length() + " <primary> ");
String indent1 = indent + " ";
expr.printParseTree(indent1);
}
}
|
[
"derickhansraj@ymail.com"
] |
derickhansraj@ymail.com
|
4277a4bfab4dc782bd96a3aec4c64a4423a405b6
|
d3381a70a8c4ac7b35276dee803ee57aff0e60c6
|
/src/main/java/org/minions/devfund/noemiguzman/battleship/Ocean.java
|
3d9d4751028d52fd4d465341d0b01c85ae172581
|
[] |
no_license
|
Cristhian-4237/devfund-h
|
49c8441e7d531aafbc01714f38d5e2cb587e9519
|
ea081bc5e689d882ea24a333387b4bbee6071a22
|
refs/heads/develop
| 2020-04-02T23:45:59.798185
| 2018-10-22T01:23:44
| 2018-10-22T01:23:44
| 154,878,786
| 0
| 0
| null | 2018-10-26T18:55:44
| 2018-10-26T18:33:51
|
Java
|
UTF-8
|
Java
| false
| false
| 5,224
|
java
|
package org.minions.devfund.noemiguzman.battleship;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
/**
* Ocean class.
*/
public class Ocean {
private static final int SIZE_OCEAN = 20;
private static final int NRO_SHIPS = 13;
private static final int BATTLESHIP_NUMBER = 1;
private static final int BATTLE_CRUISER_NUMBER = 1;
private static final int CRUISER_NUMBER = 2;
private static final int LIGHT_CRUISER_NUMBER = 2;
private static final int DESTROYER_NUMBER = 3;
private static final int SUBMARINE_NUMBER = 4;
private static final Map<String, Integer> FLEET_MAP = new HashMap<>();
static {
FLEET_MAP.put("BattleShip", BATTLESHIP_NUMBER);
FLEET_MAP.put("BattleCruiser", BATTLE_CRUISER_NUMBER);
FLEET_MAP.put("Cruiser", CRUISER_NUMBER);
FLEET_MAP.put("LightCruiser", LIGHT_CRUISER_NUMBER);
FLEET_MAP.put("Destroyer", DESTROYER_NUMBER);
FLEET_MAP.put("Submarine", SUBMARINE_NUMBER);
}
private Ship[][] ships;
private int shotsFired;
private int hitCount;
private int shipsSunk;
private Random random;
/**
* Creates an empty ocean (fills the ships array with a bunch of EmptySea instances).
* Also initializes any game variables, such as how many shots have been fired.
*/
public Ocean() {
ships = new Ship[SIZE_OCEAN][SIZE_OCEAN];
for (int i = 0; i < SIZE_OCEAN; i++) {
for (int j = 0; j < SIZE_OCEAN; j++) {
EmptySea emptySea = new EmptySea();
emptySea.placeShipAt(i, j, true, this);
}
}
random = new Random();
}
/**
* Place all randomly on the (initially empty) ocean.
* Place larger ships before smaller ones, or you may end up with no legal place to put a large ship.
*/
public void placeAllShipsRandomly() {
for (Map.Entry<String, Integer> shipFleet : FLEET_MAP.entrySet()) {
String shipType = shipFleet.getKey();
int shipQuantity = shipFleet.getValue();
int placedShips = 0;
while (placedShips < shipQuantity) {
Ship ship = ShipFactory.getShip(shipType);
putRandom(ship);
placedShips++;
}
}
}
/**
* put ship on ocean.
*
* @param ship object
*/
public void putRandom(final Ship ship) {
int row;
int column;
boolean horizontalRando;
do {
row = random.nextInt(SIZE_OCEAN);
column = random.nextInt(SIZE_OCEAN);
horizontalRando = random.nextBoolean();
} while (!ship.okToPlaceShipAt(row, column, horizontalRando, this));
ship.placeShipAt(row, column, horizontalRando, this);
}
/**
* Returns true if the given location contains a ship, false if it does not.
*
* @param row number
* @param column number
* @return true if it is occupied.
*/
public boolean isOccupied(int row, int column) {
return !ships[row][column].getShipType().equals("empty");
}
/**
* Returns true if the given location contains a real ship, still afloat, (not an EmptySea), false if it does not.
* In addition, this method updates the number of shots that have been fired, and the number of hits.
* If a location contains a real ship, shootAt should return true every time the user shoots at that same location.
* Once a ship has been sunk, additional shots at its location should return false.
*
* @param row number
* @param column number
* @return true
*/
public boolean shootAt(int row, int column) {
this.shotsFired++;
if (isOccupied(row, column)) {
if (ships[row][column].shootAt(row, column)) {
if (ships[row][column].isSunk()) {
shipsSunk++;
}
hitCount++;
return true;
}
return false;
}
ships[row][column].shootAt(row, column);
return false;
}
/**
* Returns the 20x20 array of ships.
* Take an Ocean parameter really need to be able to look at the contents of this array;
* the placeShipAt method even needs to modify it.
*
* @return Ships
*/
public Ship[][] getShipArray() {
return ships.clone();
}
/**
* Returns the number of shots fired (in this game).
*
* @return in shots
*/
public int getShotsFired() {
return shotsFired;
}
/**
* Returns the number of hits recorded (in this game).
* All hits are counted, not just the first time a given square is hit.
*
* @return hits
*/
public int getHitCount() {
return hitCount;
}
/**
* Returns the number of ships sunk (in this game).
*
* @return in sunk
*/
public int getShipsSunk() {
return shipsSunk;
}
/**
* Returns true if all ships have been sunk, otherwise false.
*
* @return true if shipssumk
*/
public boolean isGameOver() {
return shipsSunk == NRO_SHIPS;
}
}
|
[
"carledriss@gmail.com"
] |
carledriss@gmail.com
|
6c214235151c2c8a54e331a594341f9fb60729d4
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/50/org/apache/commons/math/stat/descriptive/SummaryStatistics_getGeometricMean_274.java
|
cff8a04569c95bb43a514dcc5495b3e22bae6b1e
|
[] |
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,598
|
java
|
org apach common math stat descript
comput summari statist stream data valu ad
link add addvalu add addvalu method data valu store
memori comput statist larg data
stream
link storeless univari statist storelessunivariatestatist instanc maintain summari
state comput statist configur setter
implement varianc overridden call
link set varianc impl setvarianceimpl storeless univari statist storelessunivariatestatist actual paramet
method implement link storeless univari statist storelessunivariatestatist
configur complet code add addvalu code
call configur common math
provid implement
note thread safe
link synchron summari statist synchronizedsummarystatist concurr access multipl
thread requir
version
summari statist summarystatist statist summari statisticalsummari serializ
return geometr valu ad
doubl nan return valu ad
geometr
geometr getgeometricmean
geo impl geomeanimpl result getresult
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
3b44ed6e8567bfd52cc27437a995019a56209ffe
|
b9852e928c537ce2e93aa7e378689e5214696ca5
|
/hse-app-phone-res/build/generated/source/buildConfig/androidTest/debug/com/hd/hse/app/phone/res/test/BuildConfig.java
|
8f0e897d057814df463ef10e6110d59ad520de14
|
[] |
no_license
|
zhanshen1373/Hseuse
|
bc701c6de7fd88753caced249032f22d2ca39f32
|
110f9d1a8db37d5b0ea348069facab8699e251f1
|
refs/heads/master
| 2023-04-04T08:27:10.675691
| 2021-03-29T07:44:02
| 2021-03-29T07:44:02
| 352,548,680
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 463
|
java
|
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.hd.hse.app.phone.res.test;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "com.hd.hse.app.phone.res.test";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = -1;
public static final String VERSION_NAME = "";
}
|
[
"dubojian@ushayden.com"
] |
dubojian@ushayden.com
|
cef00f9b2d7b3366b586fddc2612adadcd486afa
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/api-vs-impl-small/core/src/main/java/org/gradle/testcore/performancenull_39/Productionnull_3876.java
|
5ec46e8e42bc3820692d9f14dc8b7d4000e25f9e
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 589
|
java
|
package org.gradle.testcore.performancenull_39;
public class Productionnull_3876 {
private final String property;
public Productionnull_3876(String param) {
this.property = param;
}
public String getProperty() {
return property;
}
private String prop0;
public String getProp0() {
return prop0;
}
public void setProp0(String value) {
prop0 = value;
}
private String prop1;
public String getProp1() {
return prop1;
}
public void setProp1(String value) {
prop1 = value;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
9a6dfbed9ce0f8690e3e49ea5aabf41d055c2857
|
125af5bae85eba5fa8368c4111cc26f3e43ab6c8
|
/app/src/main/java/com/xlg/android/LoginChannel.java
|
86d6d551c5eee41b87b2fe89a8037bc50e8c44bd
|
[] |
no_license
|
jackycaojiaqi/LihaoVV
|
a3779e45f71f84e2c82b193fd4fa3e7d63ea426d
|
ea819f460f5202ac0a6f89bc09cbcf62cff9c973
|
refs/heads/master
| 2021-01-23T11:33:27.609769
| 2017-07-10T08:49:45
| 2017-07-10T08:49:45
| 93,148,307
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,401
|
java
|
package com.xlg.android;
import com.xlg.android.protocol.Header;
import com.xlg.android.protocol.Hello;
import com.xlg.android.protocol.LogonError;
import com.xlg.android.protocol.LogonRequest;
import com.xlg.android.protocol.LogonResponse;
import com.xlg.android.protocol.Message;
import com.xlg.android.protocol.RegisterRequest;
import com.xlg.android.protocol.RegisterResponse;
import com.xlg.android.utils.ByteBuffer;
public class LoginChannel implements ClientSocketHandler {
// 客户端回调
private LoginHandler mHandler;
// 新的socket对像
private LoginClientSocket mSocket = new LoginClientSocket(this);
// 接收缓冲区
private ByteBuffer mBuffer = new ByteBuffer();
public LoginChannel(LoginHandler handler) {
mHandler = handler;
}
// 连接服务器
public int Connect(String ip, int port) {
return mSocket.Connect(ip, port);
}
// 关闭
public void Close() {
mSocket.Close();
}
@Override
public void onConnected(int ret) {
if(0 == ret) {
mHandler.onConnectSuccessed();
} else {
mHandler.onConnectFailed();
}
}
@Override
public void onRecv(byte[] data, int size) {
// System.out.println("接收数据"+data.length+"----size"+size);
// 加入缓冲区
mBuffer.addBytes(data, 0, size);
// System.out.println("mBuffer"+mBuffer.size());
// 解析数据
Header head = new Header();
int len;
while(true)
{
len = Message.DecodeHeader(mBuffer, head);
// System.out.println("len"+len);
if(len <= 0) {
break;
}
System.out.println("登录响应"+head.getCmd1());
switch (head.getCmd1()) {
case Header.MessageType_mxpLogonResponse:
{
LogonResponse obj = new LogonResponse();
Message.DecodeObject(mBuffer, obj);
mHandler.onLogonResponse(obj);
break;
}
case Header.MessageType_mxpLogonError:
{
LogonError obj = new LogonError();
Message.DecodeObject(mBuffer, obj);
mHandler.onLogonError(obj);
break;
}
case Header.MessageType_mxpRegisterResponse:
{
RegisterResponse obj = new RegisterResponse();
Message.DecodeObject(mBuffer, obj);
mHandler.onRegisterResponse(obj);
break;
}
default:
break;
}
// 移除一个包
mBuffer.rdarin(head.getLength());
}
}
@Override
public void onDisconnected() {
mHandler.onDisconnected();
}
private void sendPack(Header head, Object obj) {
ByteBuffer buf = new ByteBuffer();
if( Message.EncodePack(buf, head, obj, true) ) {
byte [] data = new byte[buf.size()];
buf.getBytes(data, 0, buf.size());
mSocket.Send(data);
}
}
// 发送Hello
public void SendHello() {
Header head = new Header();
Hello obj = new Hello();
// 构建消息头
head.setCmd1(Header.MessageType_mxpClientHelloCommand);
// 构建消息体
obj.setParam0((int)(Math.random() * 0xffff));
obj.setParam1(obj.getParam0() + (obj.getParam0() & 0xffff));
obj.setParam2(obj.getParam0() - 2 * (obj.getParam0() & 0xffff));
sendPack(head, obj);
}
// 发送登录请求
public void SendLogonRequest(int nUserId, int visitor, int nOnlineSate, String pszPwd,
String pszMacAddr, String pszDiskId, String cldcode, int flag) {
Header head = new Header();
LogonRequest obj = new LogonRequest();
// 构建消息头
head.setCmd1(Header.MessageType_mxpLogonRequest);
// 构建消息体
obj.setUserid(nUserId);
// obj.setPort((short) 2);
obj.setPort((short)2);
obj.setVisitor((byte)visitor);
obj.setOnline_stat((byte)nOnlineSate);
if (flag == 0 || flag == 5) {
obj.setCuserpwd(pszPwd);
}
obj.setCmac(pszMacAddr);
if (flag == 2 || flag == 5){
obj.setCldcode(cldcode);
}
sendPack(head, obj);
}
//注册
public void SendRegisterRequest(String psd, String cldcode){
Header head = new Header();
RegisterRequest obj = new RegisterRequest();
head.setCmd1(Header.MessageType_mxpRegisterRequest);
obj.setDeviceid((short) 2);
obj.setVisitor((byte) 5);
obj.setCldcode(cldcode);
obj.setCuserpwd(psd);
sendPack(head,obj);
}
// 临时用户登录请求
public void SendTempUserLogonRequest(String pszMacAddr, String pszDiskId) {
Header head = new Header();
LogonRequest obj = new LogonRequest();
// 构建消息头
head.setCmd1(Header.MessageType_mxpLogonRequest);
// 构建消息体
obj.setVisitor((byte)1);
obj.setOnline_stat((byte)1);
obj.setCmac(pszMacAddr);
sendPack(head, obj);
}
}
|
[
"353938360@qq.com"
] |
353938360@qq.com
|
166fc26c617ef94edeee7a92e1367597497e7956
|
56adea945b27ccaf880decadb7f7cb86de450a8d
|
/importexport/ep-importexport/src/main/java/com/elasticpath/importexport/exporter/exporters/impl/StoreAssociationExporter.java
|
30025e761035af18aa9b98180e686a1099a7f736
|
[] |
no_license
|
ryanlfoster/ep-commerce-engine-68
|
89b56878806ca784eca453d58fb91836782a0987
|
7364bce45d25892e06df2e1c51da84dbdcebce5d
|
refs/heads/master
| 2020-04-16T04:27:40.577543
| 2013-12-10T19:31:52
| 2013-12-10T20:01:08
| 40,164,760
| 1
| 1
| null | 2015-08-04T05:15:25
| 2015-08-04T05:15:25
| null |
UTF-8
|
Java
| false
| false
| 3,166
|
java
|
package com.elasticpath.importexport.exporter.exporters.impl;
import java.util.ArrayList;
import java.util.List;
import com.elasticpath.common.dto.store.StoreAssociationDTO;
import com.elasticpath.domain.store.Store;
import com.elasticpath.importexport.common.adapters.DomainAdapter;
import com.elasticpath.importexport.common.exception.ConfigurationException;
import com.elasticpath.importexport.common.types.JobType;
import com.elasticpath.importexport.exporter.context.ExportContext;
import com.elasticpath.persistence.support.FetchGroupConstants;
import com.elasticpath.persistence.support.impl.FetchGroupLoadTunerImpl;
import com.elasticpath.service.store.StoreService;
/**
* Exporter for {@link com.elasticpath.importexport.exporter.exporters.impl.StoreAssociation}s.
*/
public class StoreAssociationExporter extends AbstractExporterImpl<Store, StoreAssociationDTO, String> {
// private static final Logger LOG = Logger.getLogger(StoreAssociationExporter.class);
private StoreService storeService;
private DomainAdapter<Store, StoreAssociationDTO> storeAssociationAdapter;
private List<String> storeCodes;
public JobType getJobType() {
return JobType.STORE_ASSOCIATION;
}
public Class<?>[] getDependentClasses() {
return new Class<?>[] { StoreAssociation.class };
}
@Override
protected void initializeExporter(final ExportContext context) throws ConfigurationException {
storeCodes = new ArrayList<String>();
// does nothing as is dependent on Store.
}
@Override
protected Class<? extends StoreAssociationDTO> getDtoClass() {
return StoreAssociationDTO.class;
}
@Override
protected List<String> getListExportableIDs() {
if (getContext().getDependencyRegistry().supportsDependency(StoreAssociation.class)) {
storeCodes.addAll(getContext().getDependencyRegistry().getDependentGuids(StoreAssociation.class));
}
return storeCodes;
}
@Override
protected List<Store> findByIDs(final List<String> subList) {
ArrayList<Store> stores = new ArrayList<Store>();
for (String storeCode : subList) {
Store lite = storeService.findStoreWithCode(storeCode);
FetchGroupLoadTunerImpl loadTunerAll = new FetchGroupLoadTunerImpl();
loadTunerAll.addFetchGroup(FetchGroupConstants.ALL);
stores.add(storeService.getTunedStore(lite.getUidPk(), loadTunerAll));
}
return stores;
}
@Override
protected DomainAdapter<Store, StoreAssociationDTO> getDomainAdapter() {
return storeAssociationAdapter;
}
/**
* @return the storeService
*/
public StoreService getStoreService() {
return storeService;
}
/**
* @param storeService the storeService to set
*/
public void setStoreService(final StoreService storeService) {
this.storeService = storeService;
}
/**
* @return the storeAssociationAdapter
*/
public DomainAdapter<Store, StoreAssociationDTO> getStoreAssociationAdapter() {
return storeAssociationAdapter;
}
/**
* @param storeAssociationAdapter the storeAssociationAdapter to set
*/
public void setStoreAssociationAdapter(final DomainAdapter<Store, StoreAssociationDTO> storeAssociationAdapter) {
this.storeAssociationAdapter = storeAssociationAdapter;
}
}
|
[
"chris.gomes@pearson.com"
] |
chris.gomes@pearson.com
|
eeda59c8af391b759eaff5acabc797ac29f67d3d
|
dd789c809afaffc8ee0d59eb621dcaf172f6168a
|
/jgami-courses/src/main/java/jgami/courses/backend/CourseInfoConverter.java
|
95307f25a7868de4e8d5623c23d8f4d935d0ba4b
|
[] |
no_license
|
vicziani/jgami-servlet24
|
c09d6e32af424e90022078c8e7f8646f4c5db52e
|
d0d999dcf3853a92bfc588f73a3a30d1dccd90c5
|
refs/heads/master
| 2021-01-11T01:50:16.154184
| 2016-10-13T21:39:26
| 2016-10-13T21:39:26
| 70,850,395
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 404
|
java
|
package jgami.courses.backend;
import jgami.core.courses.CourseInfo;
import org.springframework.core.convert.converter.Converter;
public class CourseInfoConverter implements Converter<Course, CourseInfo> {
@Override
public CourseInfo convert(Course course) {
return new CourseInfo(course.getId(), course.getName(), course.getDescription(), course.getStart(), course.getEnd());
}
}
|
[
"viczian.istvan@gmail.com"
] |
viczian.istvan@gmail.com
|
f7e4f4b42bec04de64275b5e62f184941b5e8afb
|
93a82eebc89db6e905bb52505870be1cc689566d
|
/android_news_mvvm/news/src/main/java/top/zcwfeng/news/homefragment/newslist/NewsListModel.java
|
cb5e5e51238e19e724b8fa76f5a366c45ca991f7
|
[] |
no_license
|
zcwfeng/zcw_android_demo
|
78cdc86633f01babfe99972b9fde52a633f65af9
|
f990038fd3643478dbf4f65c03a70cd2f076f3a0
|
refs/heads/master
| 2022-07-27T05:32:09.421349
| 2022-03-14T02:56:41
| 2022-03-14T02:56:41
| 202,998,648
| 15
| 8
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,364
|
java
|
package top.zcwfeng.news.homefragment.newslist;
import com.xiangxue.network.TecentNetworkApi;
import com.xiangxue.network.observer.BaseObserver;
import java.util.ArrayList;
import java.util.List;
import top.zcwfeng.base.customview.customview.BaseCustomViewModel;
import top.zcwfeng.base.customview.mvvm.model.BaseMvvmModel;
import top.zcwfeng.common.views.pictureview.PictureTitleViewModel;
import top.zcwfeng.common.views.titleview.TitleViewModel;
import top.zcwfeng.news.homefragment.api.NewsApiInterface;
import top.zcwfeng.news.homefragment.api.NewsListBean;
public
class NewsListModel extends BaseMvvmModel<NewsListBean,List<BaseCustomViewModel>> {
String channelId;
String channelName;
public NewsListModel(String channelId, String channelName) {
super(true,
channelId+channelName+"_preference_key",
null,
1);
this.channelId = channelId;
this.channelName = channelName;
}
@Override
public void load() {
TecentNetworkApi.getService(NewsApiInterface.class)
.getNewsList(channelId,
channelName, String.valueOf(mPage))
.compose(TecentNetworkApi.getInstance()
.applySchedulers(new BaseObserver<NewsListBean>(this,this)));
}
@Override
public void onSuccess(NewsListBean newsListBean, boolean isFromcache) {
List<BaseCustomViewModel> viewModels = new ArrayList<>();
for (NewsListBean.Contentlist contentlist:newsListBean.showapiResBody.pagebean.contentlist) {
if(contentlist.imageurls !=null && contentlist.imageurls.size() >0){
PictureTitleViewModel model = new PictureTitleViewModel();
model.pictureUrl = contentlist.imageurls.get(0).url;
model.title = contentlist.title;
model.jumpUrl = contentlist.link;
viewModels.add(model);
} else{
TitleViewModel model = new TitleViewModel();
model.title = contentlist.title;
model.jumpUrl = contentlist.link;
viewModels.add(model);
}
}
notifyResultToListener(newsListBean,viewModels,isFromcache);
}
@Override
public void onFailure(Throwable e) {
loadFail(e.getMessage());
}
}
|
[
"zcwfeng@126.com"
] |
zcwfeng@126.com
|
9013357961dda3e25d8644f775a03b69a0a39ae7
|
b48ceeccd61da07a45ee1fdc68c1b3f4310e4739
|
/src/basic/com/huateng/ebank/business/customer/getter/IndPbocScoreQueryGetter.java
|
3388e2dde8b5424b6df36f9703b5d495d65404c9
|
[] |
no_license
|
chenshibi/IBSCORE
|
0a8f66560c10b8ae49d94e513359074904e5f4ad
|
effb4f25a4c3b5e21f34df0cadf8f8b39f2bbd98
|
refs/heads/master
| 2022-04-22T16:27:36.702522
| 2020-04-17T10:47:14
| 2020-04-17T10:47:14
| 256,475,829
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,257
|
java
|
/*
* ==================================================================
* The Huateng Software License
*
* Copyright (c) 2004-2005 Huateng Software System. All rights
* reserved.
* ==================================================================
*/
package com.huateng.ebank.business.customer.getter;
import java.util.ArrayList;
import java.util.List;
import resource.bean.basic.IndApp;
import resource.bean.basic.IndPbocScore;
import com.huateng.common.err.Module;
import com.huateng.common.err.Rescode;
import com.huateng.commquery.result.Result;
import com.huateng.commquery.result.ResultMng;
import com.huateng.ebank.business.common.PageQueryResult;
import com.huateng.ebank.business.common.ROOTDAO;
import com.huateng.ebank.business.common.ROOTDAOUtils;
import com.huateng.ebank.framework.util.DataFormat;
import com.huateng.ebank.framework.web.commQuery.BaseGetter;
import com.huateng.exception.AppException;
/**
* @author
*
*/
public class IndPbocScoreQueryGetter extends BaseGetter {
public Result call() throws AppException {
try {
PageQueryResult pageResult = getData();
ResultMng.fillResultByList(getCommonQueryBean(), getCommQueryServletRequest(), pageResult.getQueryResult(),
getResult());
result.setContent(pageResult.getQueryResult());
result.getPage().setTotalPage(pageResult.getPageCount(getResult().getPage().getEveryPage()));
result.init();
result.setTotal(pageResult.getTotalCount());
return result;
} catch (AppException appEx) {
throw appEx;
} catch (Exception ex) {
throw new AppException(Module.SYSTEM_MODULE, Rescode.DEFAULT_RESCODE, ex.getMessage(), ex);
}
}
@SuppressWarnings("unchecked")
protected PageQueryResult getData() throws Exception {
String rptId = (String) getCommQueryServletRequest().getParameterMap().get("rptId");
PageQueryResult pageQueryResult = new PageQueryResult();
ROOTDAO rootdao = ROOTDAOUtils.getROOTDAO();
List<IndPbocScore> list = new ArrayList();
StringBuffer hql1 = new StringBuffer("select ips from IndPbocScore ips where ips.rptId='"+rptId+"'");
List<IndPbocScore> listPbocScore = rootdao.queryByCondition(hql1.toString());
if(listPbocScore.size()>0){
IndPbocScore indPbocScore=new IndPbocScore();
indPbocScore.setPbocScore(listPbocScore.get(0).getPbocScore());
indPbocScore.setScoreDescription(listPbocScore.get(0).getScoreDescription());
indPbocScore.setScorePercentile(listPbocScore.get(0).getScorePercentile());
list.add(indPbocScore);
}
int pageIndex = getResult().getPage().getCurrentPage();
int pageSize = getResult().getPage().getEveryPage();
int maxIndex = pageIndex * pageSize;
/* 对最后一页的处理 */
if (maxIndex > list.size()) {
maxIndex = list.size();
}
List result = new ArrayList();
result = list.subList((pageIndex - 1) * pageSize, maxIndex);
pageQueryResult.setTotalCount(list.size());
pageQueryResult.setQueryResult(result);
return pageQueryResult;
}
}
|
[
"chensibiy@163.com"
] |
chensibiy@163.com
|
c109d5bc04f777fdb933fdc9636c99b480ef5f98
|
6c102dc10f9185ba47c39a32a1d0f9bb34c6992b
|
/app/src/main/java/com/shrinktool/rule/ssc/SpecialNumberRuleSet.java
|
bc240d03fbb5a33afa31f114a0c79db19382f4a1
|
[] |
no_license
|
azbjx5288/ShrinkTool
|
646d170bc330078c4da9cc0fa737f1e3c1e4244b
|
3421b6609b21626d3a007579c71f707c48b1c1ed
|
refs/heads/master
| 2021-09-17T18:31:54.061944
| 2018-07-04T11:32:05
| 2018-07-04T11:32:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,409
|
java
|
package com.shrinktool.rule.ssc;
import com.shrinktool.rule.Path;
import com.shrinktool.rule.RuleObject;
import com.shrinktool.rule.RuleSet;
import java.util.ArrayList;
/**
* 胆码
* Created by Alashi on 2016/5/30.
*/
public class SpecialNumberRuleSet extends RuleSet {
private int type = RuleSet.TYPE_0_9_SXZX;
public SpecialNumberRuleSet(Path path, int type) {
super(path);
this.type = type;
}
@Override
public ArrayList<String[]> onCreateRuleList(int numberCount) {
return null;
}
@Override
public RuleObject createRuleObject(Path path) {
return new SpecialNumberRuleItem(path, type);
}
@Override
public String getName() {
return "胆码";
}
//***0_1_2_A
public String createPathByNumber(int count, ArrayList<Integer> numbers) {
String key = String.valueOf(count);
if (type == RuleSet.TYPE_SSQ) {
for (int num : numbers) {
key += "_";
key += num;
}
} else {
for (int num : numbers) {
key += "_";
if (num == 10) {
key += "A";
} else if (num == 11) {
key += "B";
} else {
key += num;
}
}
}
return getPath().getChild(key).toString();
}
}
|
[
"429533813@qq.com"
] |
429533813@qq.com
|
9c829b9d29f144e410a34f4338ea9d89abeec923
|
78cc0dff55fb2ade8b776390f83a79188157cf57
|
/DingTalk/com/dingtalk/api/request/OapiOpenencryptEncryptboxStatusUpdateRequest.java
|
1c6e6d2155199ddce5f6111adbe8561c8b4b06f2
|
[] |
no_license
|
carlvine500/taobao-sdk-java
|
e6b3c0f20dd6e7f0d1895d0e2f569046777d71f9
|
4a49208e4a11d23e9c0a7ca132437671bce0325f
|
refs/heads/master
| 2021-07-15T00:15:03.905983
| 2021-06-28T09:35:41
| 2021-06-28T09:35:41
| 247,893,296
| 0
| 0
| null | 2020-03-17T06:12:14
| 2020-03-17T06:12:14
| null |
UTF-8
|
Java
| false
| false
| 3,993
|
java
|
package com.dingtalk.api.request;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.TaobaoObject;
import java.util.Map;
import java.util.List;
import com.taobao.api.ApiRuleException;
import com.taobao.api.BaseTaobaoRequest;
import com.dingtalk.api.DingTalkConstants;
import com.taobao.api.Constants;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.internal.util.TaobaoUtils;
import com.taobao.api.internal.util.json.JSONWriter;
import com.dingtalk.api.response.OapiOpenencryptEncryptboxStatusUpdateResponse;
/**
* TOP DingTalk-API: dingtalk.oapi.openencrypt.encryptbox.status.update request
*
* @author top auto create
* @since 1.0, 2020.05.07
*/
public class OapiOpenencryptEncryptboxStatusUpdateRequest extends BaseTaobaoRequest<OapiOpenencryptEncryptboxStatusUpdateResponse> {
/**
* 请求参数
*/
private String topEncryptBoxStatus;
public void setTopEncryptBoxStatus(String topEncryptBoxStatus) {
this.topEncryptBoxStatus = topEncryptBoxStatus;
}
public void setTopEncryptBoxStatus(TopEncryptBoxStatus topEncryptBoxStatus) {
this.topEncryptBoxStatus = new JSONWriter(false,false,true).write(topEncryptBoxStatus);
}
public String getTopEncryptBoxStatus() {
return this.topEncryptBoxStatus;
}
public String getApiMethodName() {
return "dingtalk.oapi.openencrypt.encryptbox.status.update";
}
private String topResponseType = Constants.RESPONSE_TYPE_DINGTALK_OAPI;
public String getTopResponseType() {
return this.topResponseType;
}
public void setTopResponseType(String topResponseType) {
this.topResponseType = topResponseType;
}
public String getTopApiCallType() {
return DingTalkConstants.CALL_TYPE_OAPI;
}
private String topHttpMethod = DingTalkConstants.HTTP_METHOD_POST;
public String getTopHttpMethod() {
return this.topHttpMethod;
}
public void setTopHttpMethod(String topHttpMethod) {
this.topHttpMethod = topHttpMethod;
}
public void setHttpMethod(String httpMethod) {
this.setTopHttpMethod(httpMethod);
}
public Map<String, String> getTextParams() {
TaobaoHashMap txtParams = new TaobaoHashMap();
txtParams.put("top_encrypt_box_status", this.topEncryptBoxStatus);
if(this.udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}
public Class<OapiOpenencryptEncryptboxStatusUpdateResponse> getResponseClass() {
return OapiOpenencryptEncryptboxStatusUpdateResponse.class;
}
public void check() throws ApiRuleException {
}
/**
* 请求参数
*
* @author top auto create
* @since 1.0, null
*/
public static class TopEncryptBoxStatus extends TaobaoObject {
private static final long serialVersionUID = 6477368358742774793L;
/**
* 微应用的id
*/
@ApiField("appid")
private Long appid;
/**
* 组织的id
*/
@ApiField("corp_id")
private String corpId;
/**
* 附加信息,方便扩展
*/
@ApiField("extension")
private String extension;
/**
* 请求的id
*/
@ApiField("request_id")
private String requestId;
/**
* 加密盒子状态,1表示盒子掉线,2表示盒子上线,3表示企业之前有盒子,现在变成了无盒子的状态
*/
@ApiField("status")
private Long status;
public Long getAppid() {
return this.appid;
}
public void setAppid(Long appid) {
this.appid = appid;
}
public String getCorpId() {
return this.corpId;
}
public void setCorpId(String corpId) {
this.corpId = corpId;
}
public String getExtension() {
return this.extension;
}
public void setExtension(String extension) {
this.extension = extension;
}
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public Long getStatus() {
return this.status;
}
public void setStatus(Long status) {
this.status = status;
}
}
}
|
[
"tingfeng.liu@successchannel.com"
] |
tingfeng.liu@successchannel.com
|
2e61380474d1c706c73743d49c99be1b808a77e0
|
c24c66e6a95847c234322cee75af9a1c91f6cda8
|
/plugin/vip/src/main/java/org/zstack/network/service/vip/VipCascadeExtension.java
|
d74fc5fa52b7d9e429783d5c347b8f2b47280afd
|
[
"Apache-2.0"
] |
permissive
|
Matrix-lk/zstack
|
547d66d1357b728158f9627bcddc207fe96b0107
|
3c60d54d4f56b92aa735d699b9a19f8ad5e1c7eb
|
refs/heads/master
| 2021-01-25T13:17:34.083292
| 2018-02-28T07:55:04
| 2018-02-28T07:55:04
| 123,546,870
| 1
| 0
| null | 2018-03-02T07:40:01
| 2018-03-02T07:40:01
| null |
UTF-8
|
Java
| false
| false
| 5,754
|
java
|
package org.zstack.network.service.vip;
import org.springframework.beans.factory.annotation.Autowired;
import org.zstack.core.cascade.AbstractAsyncCascadeExtension;
import org.zstack.core.cascade.CascadeAction;
import org.zstack.core.cascade.CascadeConstant;
import org.zstack.core.cloudbus.CloudBus;
import org.zstack.core.cloudbus.CloudBusListCallBack;
import org.zstack.core.db.DatabaseFacade;
import org.zstack.core.db.SimpleQuery;
import org.zstack.core.db.SimpleQuery.Op;
import org.zstack.header.core.Completion;
import org.zstack.header.message.MessageReply;
import org.zstack.header.network.l3.IpRangeInventory;
import org.zstack.header.network.l3.IpRangeVO;
import org.zstack.header.network.l3.L3NetworkInventory;
import org.zstack.header.network.l3.L3NetworkVO;
import org.zstack.utils.CollectionUtils;
import org.zstack.utils.Utils;
import org.zstack.utils.function.Function;
import org.zstack.utils.logging.CLogger;
import java.util.Arrays;
import java.util.List;
/**
*/
public class VipCascadeExtension extends AbstractAsyncCascadeExtension {
private static final CLogger logger = Utils.getLogger(VipCascadeExtension.class);
private static final String NAME = VipVO.class.getSimpleName();
@Autowired
private DatabaseFacade dbf;
@Autowired
private CloudBus bus;
public void asyncCascade(CascadeAction action, Completion completion) {
if (action.isActionCode(CascadeConstant.DELETION_CHECK_CODE)) {
handleDeletionCheck(action, completion);
} else if (action.isActionCode(CascadeConstant.DELETION_DELETE_CODE, CascadeConstant.DELETION_FORCE_DELETE_CODE)) {
handleDeletion(action, completion);
} else if (action.isActionCode(CascadeConstant.DELETION_CLEANUP_CODE)) {
handleDeletionCleanup(action, completion);
} else {
completion.success();
}
}
private void handleDeletionCleanup(CascadeAction action, Completion completion) {
dbf.eoCleanup(VipVO.class);
completion.success();
}
private void handleDeletion(CascadeAction action, final Completion completion) {
final List<VipInventory> vipinvs = vipFromAction(action);
if (vipinvs == null || vipinvs.isEmpty()) {
completion.success();
return;
}
List<VipDeletionMsg> msgs = CollectionUtils.transformToList(vipinvs, new Function<VipDeletionMsg, VipInventory>() {
@Override
public VipDeletionMsg call(VipInventory arg) {
VipDeletionMsg msg = new VipDeletionMsg();
msg.setVipUuid(arg.getUuid());
bus.makeTargetServiceIdByResourceUuid(msg, VipConstant.SERVICE_ID, msg.getVipUuid());
return msg;
}
});
bus.send(msgs, 10, new CloudBusListCallBack(completion) {
@Override
public void run(List<MessageReply> replies) {
for (MessageReply r : replies) {
VipInventory vip = vipinvs.get(replies.indexOf(r));
if (!r.isSuccess()) {
logger.warn(String.format("failed to delete vip[uuid:%s, ip: %s, name:%s], %s",
vip.getUuid(), vip.getIp(), vip.getName(), r.getError()));
}
}
completion.success();
}
});
}
private void handleDeletionCheck(CascadeAction action, Completion completion) {
completion.success();
}
@Override
public List<String> getEdgeNames() {
return Arrays.asList(L3NetworkVO.class.getSimpleName(), IpRangeVO.class.getSimpleName());
}
@Override
public String getCascadeResourceName() {
return NAME;
}
@Override
public CascadeAction createActionForChildResource(CascadeAction action) {
if (CascadeConstant.DELETION_CODES.contains(action.getActionCode())) {
List<VipInventory> vips = vipFromAction(action);
if (vips != null) {
return action.copy().setParentIssuer(NAME).setParentIssuerContext(vips);
}
}
return null;
}
private List<VipInventory> vipFromAction(CascadeAction action) {
if (L3NetworkVO.class.getSimpleName().equals(action.getParentIssuer())) {
List<String> l3Uuids = CollectionUtils.transformToList((List<L3NetworkInventory>) action.getParentIssuerContext(), new Function<String, L3NetworkInventory>() {
@Override
public String call(L3NetworkInventory arg) {
return arg.getUuid();
}
});
if (l3Uuids.isEmpty()) {
return null;
}
SimpleQuery<VipVO> q = dbf.createQuery(VipVO.class);
q.add(VipVO_.l3NetworkUuid, Op.IN, l3Uuids);
List<VipVO> vipVOs = q.list();
return VipInventory.valueOf(vipVOs);
} else if (IpRangeVO.class.getSimpleName().equals(action.getParentIssuer())) {
List<String> iprUuids = CollectionUtils.transformToList((List<IpRangeInventory>) action.getParentIssuerContext(), new Function<String, IpRangeInventory>() {
@Override
public String call(IpRangeInventory arg) {
return arg.getUuid();
}
});
SimpleQuery<VipVO> q = dbf.createQuery(VipVO.class);
q.add(VipVO_.ipRangeUuid, Op.IN, iprUuids);
List<VipVO> vipVOs = q.list();
return VipInventory.valueOf(vipVOs);
} else if (VipVO.class.getSimpleName().equals(action.getParentIssuer())) {
return action.getParentIssuerContext();
}
return null;
}
}
|
[
"xuexuemiao@yeah.net"
] |
xuexuemiao@yeah.net
|
a3d4ba0624ecb5d9c87d0942e88eb85cedbd3354
|
bc794d54ef1311d95d0c479962eb506180873375
|
/kerencourrier/kerencourrier-dao/src/main/java/com/keren/courrier/dao/ifaces/courrier/CourrierDepartDAORemote.java
|
16e4ee949629efe2863667b55e9b0165716a9070
|
[] |
no_license
|
Teratech2018/Teratech
|
d1abb0f71a797181630d581cf5600c50e40c9663
|
612f1baf9636034cfa5d33a91e44bbf3a3f0a0cb
|
refs/heads/master
| 2021-04-28T05:31:38.081955
| 2019-04-01T08:35:34
| 2019-04-01T08:35:34
| 122,177,253
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 268
|
java
|
package com.keren.courrier.dao.ifaces.courrier;
import javax.ejb.Remote;
/**
* Interface remote de la DAO
* @since Wed Jul 18 13:37:32 GMT+01:00 2018
*
*/
@Remote
public interface CourrierDepartDAORemote
extends CourrierDepartDAO
{
}
|
[
"bekondo_dieu@yahoo.fr"
] |
bekondo_dieu@yahoo.fr
|
d117785827d82214ad339a2b94c3b4527182f6a6
|
7f52c1414ee44a3efa9fae60308e4ae0128d9906
|
/core/src/test/java/com/alibaba/druid/bvt/sql/mysql/insert/MySqlInsertTest_27_str_concat.java
|
794b0d864ab23737708c77312966345ca561bdd1
|
[
"Apache-2.0"
] |
permissive
|
luoyongsir/druid
|
1f6ba7c7c5cabab2879a76ef699205f484f2cac7
|
37552f849a52cf0f2784fb7849007e4656851402
|
refs/heads/master
| 2022-11-19T21:01:41.141853
| 2022-11-19T13:21:51
| 2022-11-19T13:21:51
| 474,518,936
| 0
| 1
|
Apache-2.0
| 2022-03-27T02:51:11
| 2022-03-27T02:51:10
| null |
UTF-8
|
Java
| false
| false
| 4,787
|
java
|
/*
* Copyright 1999-2017 Alibaba Group Holding Ltd.
*
* 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.alibaba.druid.bvt.sql.mysql.insert;
import com.alibaba.druid.sql.MysqlTest;
import com.alibaba.druid.sql.SQLUtils;
import com.alibaba.druid.sql.ast.SQLStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlInsertStatement;
import com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser;
import com.alibaba.druid.sql.visitor.ParameterizedOutputVisitorUtils;
import com.alibaba.druid.util.JdbcConstants;
import java.util.ArrayList;
import java.util.List;
public class MySqlInsertTest_27_str_concat extends MysqlTest {
public void test_insert_concat() throws Exception {
String sql = "insert ignore into ktv_sms_test (cp) values ('a' 'b')";
MySqlStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> statementList = parser.parseStatementList();
SQLStatement stmt = statementList.get(0);
MySqlInsertStatement insertStmt = (MySqlInsertStatement) stmt;
assertEquals("INSERT IGNORE INTO ktv_sms_test (cp)\n" +
"VALUES ('ab')", SQLUtils.toMySqlString(insertStmt));
System.out.println(sql);
System.out.println(stmt.toString());
{
List<Object> outParameters = new ArrayList<Object>();
String psql = ParameterizedOutputVisitorUtils.parameterize(sql, JdbcConstants.MYSQL, outParameters);
assertEquals("INSERT IGNORE INTO ktv_sms_test(cp)\n" +
"VALUES (?)", psql);
assertEquals(1, outParameters.size());
String rsql = ParameterizedOutputVisitorUtils.restore(psql, JdbcConstants.MYSQL, outParameters);
assertEquals("INSERT IGNORE INTO ktv_sms_test (cp)\n" +
"VALUES ('ab')", rsql);
}
}
public void test_insert_concat_2() throws Exception {
String sql = "insert ignore into ktv_sms_test (cp) values (\"a\" \"b\")";
MySqlStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> statementList = parser.parseStatementList();
SQLStatement stmt = statementList.get(0);
MySqlInsertStatement insertStmt = (MySqlInsertStatement) stmt;
assertEquals("INSERT IGNORE INTO ktv_sms_test (cp)\n" +
"VALUES ('ab')", SQLUtils.toMySqlString(insertStmt));
System.out.println(sql);
System.out.println(stmt.toString());
{
List<Object> outParameters = new ArrayList<Object>();
String psql = ParameterizedOutputVisitorUtils.parameterize(sql, JdbcConstants.MYSQL, outParameters);
assertEquals("INSERT IGNORE INTO ktv_sms_test(cp)\n" +
"VALUES (?)", psql);
assertEquals(1, outParameters.size());
String rsql = ParameterizedOutputVisitorUtils.restore(psql, JdbcConstants.MYSQL, outParameters);
assertEquals("INSERT IGNORE INTO ktv_sms_test (cp)\n" +
"VALUES ('ab')", rsql);
}
}
public void test_insert_concat_3() throws Exception {
String sql = "insert ignore into ktv_sms_test (cp) values (\"a\" 'b')";
MySqlStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> statementList = parser.parseStatementList();
SQLStatement stmt = statementList.get(0);
MySqlInsertStatement insertStmt = (MySqlInsertStatement) stmt;
assertEquals("INSERT IGNORE INTO ktv_sms_test (cp)\n" +
"VALUES ('ab')", SQLUtils.toMySqlString(insertStmt));
System.out.println(sql);
System.out.println(stmt.toString());
{
List<Object> outParameters = new ArrayList<Object>();
String psql = ParameterizedOutputVisitorUtils.parameterize(sql, JdbcConstants.MYSQL, outParameters);
assertEquals("INSERT IGNORE INTO ktv_sms_test(cp)\n" +
"VALUES (?)", psql);
assertEquals(1, outParameters.size());
String rsql = ParameterizedOutputVisitorUtils.restore(psql, JdbcConstants.MYSQL, outParameters);
assertEquals("INSERT IGNORE INTO ktv_sms_test (cp)\n" +
"VALUES ('ab')", rsql);
}
}
}
|
[
"szujobs@hotmail.com"
] |
szujobs@hotmail.com
|
635fb59fe377eb5cdc7d407cef332ed67bad4e3b
|
66fa0ab7de46d9cf9cb32e654a8c35127a87943a
|
/src/main/java/com/wondertek/core/util/Algorithms/Merge.java
|
1a39c54173d3b6d8806f4718a91b93e0d4ac9fb5
|
[] |
no_license
|
zbcstudy/commons-util
|
b8f3c4730f865c0bdc3bbc78c8cdad0c65ef4ba7
|
afd0f6a3eb6ad5afb0ea6e5eebb3ffb19bc59a6a
|
refs/heads/master
| 2020-04-23T15:49:49.697195
| 2019-04-01T15:02:23
| 2019-04-01T15:02:23
| 171,277,858
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,078
|
java
|
/******************************************************************************
* Compilation: javac Merge.java
* Execution: java Merge < input.txt
* Dependencies: StdOut.java StdIn.java
* Data files: https://algs4.cs.princeton.edu/22mergesort/tiny.txt
* https://algs4.cs.princeton.edu/22mergesort/words3.txt
*
* Sorts a sequence of strings from standard input using mergesort.
*
* % more tiny.txt
* S O R T E X A M P L E
*
* % java Merge < tiny.txt
* A E E L M O P R S T X [ one string per line ]
*
* % more words3.txt
* bed bug dad yes zoo ... all bad yet
*
* % java Merge < words3.txt
* all bad bed bug dad ... yes yet zoo [ one string per line ]
*
******************************************************************************/
package com.wondertek.core.util.Algorithms;
/**
* The {@code Merge} class provides static methods for sorting an
* array using mergesort.
* <p>
* For additional documentation, see <a href="https://algs4.cs.princeton.edu/22mergesort">Section 2.2</a> of
* <i>Algorithms, 4th Edition</i> by Robert Sedgewick and Kevin Wayne.
* For an optimized version, see {@link MergeX}.
*
* @author Robert Sedgewick
* @author Kevin Wayne
*/
public class Merge {
// This class should not be instantiated.
private Merge() { }
// stably merge a[lo .. mid] with a[mid+1 ..hi] using aux[lo .. hi]
private static void merge(Comparable[] a, Comparable[] aux, int lo, int mid, int hi) {
// precondition: a[lo .. mid] and a[mid+1 .. hi] are sorted subarrays
assert isSorted(a, lo, mid);
assert isSorted(a, mid+1, hi);
// copy to aux[]
for (int k = lo; k <= hi; k++) {
aux[k] = a[k];
}
// merge back to a[]
int i = lo, j = mid+1;
for (int k = lo; k <= hi; k++) {
if (i > mid) a[k] = aux[j++];
else if (j > hi) a[k] = aux[i++];
else if (less(aux[j], aux[i])) a[k] = aux[j++];
else a[k] = aux[i++];
}
// postcondition: a[lo .. hi] is sorted
assert isSorted(a, lo, hi);
}
// mergesort a[lo..hi] using auxiliary array aux[lo..hi]
private static void sort(Comparable[] a, Comparable[] aux, int lo, int hi) {
if (hi <= lo) return;
int mid = lo + (hi - lo) / 2;
sort(a, aux, lo, mid);
sort(a, aux, mid + 1, hi);
merge(a, aux, lo, mid, hi);
}
/**
* Rearranges the array in ascending order, using the natural order.
* @param a the array to be sorted
*/
public static void sort(Comparable[] a) {
Comparable[] aux = new Comparable[a.length];
sort(a, aux, 0, a.length-1);
assert isSorted(a);
}
/***************************************************************************
* Helper sorting function.
***************************************************************************/
// is v < w ?
private static boolean less(Comparable v, Comparable w) {
return v.compareTo(w) < 0;
}
/***************************************************************************
* Check if array is sorted - useful for debugging.
***************************************************************************/
private static boolean isSorted(Comparable[] a) {
return isSorted(a, 0, a.length - 1);
}
private static boolean isSorted(Comparable[] a, int lo, int hi) {
for (int i = lo + 1; i <= hi; i++)
if (less(a[i], a[i-1])) return false;
return true;
}
/***************************************************************************
* Index mergesort.
***************************************************************************/
// stably merge a[lo .. mid] with a[mid+1 .. hi] using aux[lo .. hi]
private static void merge(Comparable[] a, int[] index, int[] aux, int lo, int mid, int hi) {
// copy to aux[]
for (int k = lo; k <= hi; k++) {
aux[k] = index[k];
}
// merge back to a[]
int i = lo, j = mid+1;
for (int k = lo; k <= hi; k++) {
if (i > mid) index[k] = aux[j++];
else if (j > hi) index[k] = aux[i++];
else if (less(a[aux[j]], a[aux[i]])) index[k] = aux[j++];
else index[k] = aux[i++];
}
}
/**
* Returns a permutation that gives the elements in the array in ascending order.
* @param a the array
* @return a permutation {@code p[]} such that {@code a[p[0]]}, {@code a[p[1]]},
* ..., {@code a[p[N-1]]} are in ascending order
*/
public static int[] indexSort(Comparable[] a) {
int n = a.length;
int[] index = new int[n];
for (int i = 0; i < n; i++)
index[i] = i;
int[] aux = new int[n];
sort(a, index, aux, 0, n-1);
return index;
}
// mergesort a[lo..hi] using auxiliary array aux[lo..hi]
private static void sort(Comparable[] a, int[] index, int[] aux, int lo, int hi) {
if (hi <= lo) return;
int mid = lo + (hi - lo) / 2;
sort(a, index, aux, lo, mid);
sort(a, index, aux, mid + 1, hi);
merge(a, index, aux, lo, mid, hi);
}
// print array to standard output
private static void show(Comparable[] a) {
for (int i = 0; i < a.length; i++) {
StdOut.println(a[i]);
}
}
/**
* Reads in a sequence of strings from standard input; mergesorts them;
* and prints them to standard output in ascending order.
*
* @param args the command-line arguments
*/
public static void main(String[] args) {
String[] a = StdIn.readAllStrings();
Merge.sort(a);
show(a);
}
}
/******************************************************************************
* Copyright 2002-2018, Robert Sedgewick and Kevin Wayne.
*
* This file is part of algs4.jar, which accompanies the textbook
*
* Algorithms, 4th edition by Robert Sedgewick and Kevin Wayne,
* Addison-Wesley Professional, 2011, ISBN 0-321-57351-X.
* http://algs4.cs.princeton.edu
*
*
* algs4.jar 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.
*
* algs4.jar 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 algs4.jar. If not, see http://www.gnu.org/licenses.
******************************************************************************/
|
[
"1434756304@qq.com"
] |
1434756304@qq.com
|
7231bcbb13fa64e9019fe0d6d6d026777589b3ae
|
2527ba0ca293ac24c212deff64a361fa9e4119cf
|
/app/src/main/java/com/lq/im/service/listener/Listener.java
|
2176caac09209544cccfe39b2880026a053f9028
|
[] |
no_license
|
1352101891/android_mina_client
|
2eea59ce92b9634464998bc4ef1274a8534a20a7
|
92faf4c6e8db83e84eff943af5d7befc814e1cab
|
refs/heads/master
| 2021-06-26T20:33:51.825813
| 2021-02-12T15:40:32
| 2021-02-12T15:40:32
| 212,015,696
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 143
|
java
|
package com.lq.im.service.listener;
public interface Listener<T> {
void process(T t);
boolean shouldProcess(T t);
void clear();
}
|
[
"1352101891@qq.com"
] |
1352101891@qq.com
|
58a76f21bf944ea470a6f5cc9471a02a43744a30
|
eaec4795e768f4631df4fae050fd95276cd3e01b
|
/src/cmps252/HW4_2/UnitTesting/record_4920.java
|
68aecb304bc290b429a0ab1cd812285447f93ee5
|
[
"MIT"
] |
permissive
|
baraabilal/cmps252_hw4.2
|
debf5ae34ce6a7ff8d3bce21b0345874223093bc
|
c436f6ae764de35562cf103b049abd7fe8826b2b
|
refs/heads/main
| 2023-01-04T13:02:13.126271
| 2020-11-03T16:32:35
| 2020-11-03T16:32:35
| 307,839,669
| 1
| 0
|
MIT
| 2020-10-27T22:07:57
| 2020-10-27T22:07:56
| null |
UTF-8
|
Java
| false
| false
| 2,453
|
java
|
package cmps252.HW4_2.UnitTesting;
import static org.junit.jupiter.api.Assertions.*;
import java.io.FileNotFoundException;
import java.util.List;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import cmps252.HW4_2.Customer;
import cmps252.HW4_2.FileParser;
@Tag("2")
class Record_4920 {
private static List<Customer> customers;
@BeforeAll
public static void init() throws FileNotFoundException {
customers = FileParser.getCustomers(Configuration.CSV_File);
}
@Test
@DisplayName("Record 4920: FirstName is Sidney")
void FirstNameOfRecord4920() {
assertEquals("Sidney", customers.get(4919).getFirstName());
}
@Test
@DisplayName("Record 4920: LastName is Hitch")
void LastNameOfRecord4920() {
assertEquals("Hitch", customers.get(4919).getLastName());
}
@Test
@DisplayName("Record 4920: Company is Shryner, J Marlin Esq")
void CompanyOfRecord4920() {
assertEquals("Shryner, J Marlin Esq", customers.get(4919).getCompany());
}
@Test
@DisplayName("Record 4920: Address is 6th Stt Paul Stre")
void AddressOfRecord4920() {
assertEquals("6th Stt Paul Stre", customers.get(4919).getAddress());
}
@Test
@DisplayName("Record 4920: City is Baltimore")
void CityOfRecord4920() {
assertEquals("Baltimore", customers.get(4919).getCity());
}
@Test
@DisplayName("Record 4920: County is Baltimore City")
void CountyOfRecord4920() {
assertEquals("Baltimore City", customers.get(4919).getCounty());
}
@Test
@DisplayName("Record 4920: State is MD")
void StateOfRecord4920() {
assertEquals("MD", customers.get(4919).getState());
}
@Test
@DisplayName("Record 4920: ZIP is 21202")
void ZIPOfRecord4920() {
assertEquals("21202", customers.get(4919).getZIP());
}
@Test
@DisplayName("Record 4920: Phone is 410-685-4789")
void PhoneOfRecord4920() {
assertEquals("410-685-4789", customers.get(4919).getPhone());
}
@Test
@DisplayName("Record 4920: Fax is 410-685-9645")
void FaxOfRecord4920() {
assertEquals("410-685-9645", customers.get(4919).getFax());
}
@Test
@DisplayName("Record 4920: Email is sidney@hitch.com")
void EmailOfRecord4920() {
assertEquals("sidney@hitch.com", customers.get(4919).getEmail());
}
@Test
@DisplayName("Record 4920: Web is http://www.sidneyhitch.com")
void WebOfRecord4920() {
assertEquals("http://www.sidneyhitch.com", customers.get(4919).getWeb());
}
}
|
[
"mbdeir@aub.edu.lb"
] |
mbdeir@aub.edu.lb
|
1f4e491dc296066c1d13d7dbbd30bd0067328579
|
c498cefc16ba5d75b54d65297b88357d669c8f48
|
/commons/src/main/java/ru/catssoftware/configurations/PropertyTransformer.java
|
9ed78078c6c66f75b669303404340a06a6a9610d
|
[] |
no_license
|
ManWithShotgun/l2i-JesusXD-3
|
e17f7307d9c5762b60a2039655d51ab36ec76fad
|
8e13b4dda28905792621088714ebb6a31f223c90
|
refs/heads/master
| 2021-01-17T16:10:42.561720
| 2016-07-22T18:41:22
| 2016-07-22T18:41:22
| 63,967,514
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,404
|
java
|
/*
* This file is part of aion-emu <aion-emu.com>.
*
* aion-emu 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.
*
* aion-emu 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 aion-emu. If not, see <http://www.gnu.org/licenses/>.
*/
package ru.catssoftware.configurations;
import java.lang.reflect.Field;
/**
* This insterface represents property transformer, each transformer should implement it.
*
* @author SoulKeeper
* @param <T>
* Type of returned value
*/
public interface PropertyTransformer<T>
{
/**
* This method actually transforms value to object instance
*
* @param value
* value that will be transformed
* @param field
* value will be assigned to this field
* @return result of transformation
* @throws TransformationException
* if something went wrong
*/
public T transform(String value, Field field, Object... data) throws TransformationException;
}
|
[
"u3n3ter7@mail.ru"
] |
u3n3ter7@mail.ru
|
f6b16706acb7c28c473c9d1118f516f68b8e6f38
|
0c0f7d6b46b9830ff4baf4a7ae52d6ea74e16248
|
/xauth/src/main/java/com/github/haozi/service/dto/DepartmentCriteria.java
|
a6dcfdce29e31bacb31fadf9ec37bccfc136c9c2
|
[] |
no_license
|
haoziapple/hello-world
|
e4b76c1447613f55eff36ca65d1cf62bb6113fb1
|
945d20701749592ae2ed9de25b22d688f7a3bec2
|
refs/heads/master
| 2023-01-31T22:51:23.500400
| 2019-07-12T03:09:41
| 2019-07-12T03:09:41
| 52,886,890
| 3
| 0
| null | 2023-01-11T22:17:36
| 2016-03-01T15:21:52
|
Java
|
UTF-8
|
Java
| false
| false
| 4,730
|
java
|
package com.github.haozi.service.dto;
import java.io.Serializable;
import java.util.Objects;
import io.github.jhipster.service.filter.BooleanFilter;
import io.github.jhipster.service.filter.DoubleFilter;
import io.github.jhipster.service.filter.Filter;
import io.github.jhipster.service.filter.FloatFilter;
import io.github.jhipster.service.filter.IntegerFilter;
import io.github.jhipster.service.filter.LongFilter;
import io.github.jhipster.service.filter.StringFilter;
/**
* Criteria class for the Department entity. This class is used in DepartmentResource to
* receive all the possible filtering options from the Http GET request parameters.
* For example the following could be a valid requests:
* <code> /departments?id.greaterThan=5&attr1.contains=something&attr2.specified=false</code>
* As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use
* fix type specific filters.
*/
public class DepartmentCriteria implements Serializable {
private static final long serialVersionUID = 1L;
private LongFilter id;
private StringFilter name;
private StringFilter code;
private IntegerFilter seq;
private BooleanFilter leaf;
private StringFilter remark;
private StringFilter extMap;
private LongFilter workspaceId;
private LongFilter parentId;
private LongFilter profileId;
public LongFilter getId() {
return id;
}
public void setId(LongFilter id) {
this.id = id;
}
public StringFilter getName() {
return name;
}
public void setName(StringFilter name) {
this.name = name;
}
public StringFilter getCode() {
return code;
}
public void setCode(StringFilter code) {
this.code = code;
}
public IntegerFilter getSeq() {
return seq;
}
public void setSeq(IntegerFilter seq) {
this.seq = seq;
}
public BooleanFilter getLeaf() {
return leaf;
}
public void setLeaf(BooleanFilter leaf) {
this.leaf = leaf;
}
public StringFilter getRemark() {
return remark;
}
public void setRemark(StringFilter remark) {
this.remark = remark;
}
public StringFilter getExtMap() {
return extMap;
}
public void setExtMap(StringFilter extMap) {
this.extMap = extMap;
}
public LongFilter getWorkspaceId() {
return workspaceId;
}
public void setWorkspaceId(LongFilter workspaceId) {
this.workspaceId = workspaceId;
}
public LongFilter getParentId() {
return parentId;
}
public void setParentId(LongFilter parentId) {
this.parentId = parentId;
}
public LongFilter getProfileId() {
return profileId;
}
public void setProfileId(LongFilter profileId) {
this.profileId = profileId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final DepartmentCriteria that = (DepartmentCriteria) o;
return
Objects.equals(id, that.id) &&
Objects.equals(name, that.name) &&
Objects.equals(code, that.code) &&
Objects.equals(seq, that.seq) &&
Objects.equals(leaf, that.leaf) &&
Objects.equals(remark, that.remark) &&
Objects.equals(extMap, that.extMap) &&
Objects.equals(workspaceId, that.workspaceId) &&
Objects.equals(parentId, that.parentId) &&
Objects.equals(profileId, that.profileId);
}
@Override
public int hashCode() {
return Objects.hash(
id,
name,
code,
seq,
leaf,
remark,
extMap,
workspaceId,
parentId,
profileId
);
}
@Override
public String toString() {
return "DepartmentCriteria{" +
(id != null ? "id=" + id + ", " : "") +
(name != null ? "name=" + name + ", " : "") +
(code != null ? "code=" + code + ", " : "") +
(seq != null ? "seq=" + seq + ", " : "") +
(leaf != null ? "leaf=" + leaf + ", " : "") +
(remark != null ? "remark=" + remark + ", " : "") +
(extMap != null ? "extMap=" + extMap + ", " : "") +
(workspaceId != null ? "workspaceId=" + workspaceId + ", " : "") +
(parentId != null ? "parentId=" + parentId + ", " : "") +
(profileId != null ? "profileId=" + profileId + ", " : "") +
"}";
}
}
|
[
"haozixiaowang@163.com"
] |
haozixiaowang@163.com
|
12bea398df240a770072586cde521f6de883ec20
|
684f50dd1ae58a766ce441d460214a4f7e693101
|
/common/src/main/java/com/dimeng/p2p/S60/entities/T6048.java
|
f45043d37bf9de443905b149171c778781fc0e3a
|
[] |
no_license
|
wang-shun/rainiee-core
|
a0361255e3957dd58f653ae922088219738e0d25
|
80a96b2ed36e3460282e9e21d4f031cfbd198e69
|
refs/heads/master
| 2020-03-29T16:40:18.372561
| 2018-09-22T10:05:17
| 2018-09-22T10:05:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 315
|
java
|
package com.dimeng.p2p.S60.entities;
import com.dimeng.framework.service.AbstractEntity;
/**
* 邮件内容表
*/
public class T6048 extends AbstractEntity {
private static final long serialVersionUID = 1L;
/**
* 邮件ID,参考T6047.F01
*/
public int F01;
/**
* 内容
*/
public String F02;
}
|
[
"humengmeng@rainiee.com"
] |
humengmeng@rainiee.com
|
6a052669cfb5708b53fc0e8eaa885d63fbd954a3
|
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
|
/jackson-modules/jackson/src/test/java/com/surya/jackson/dtos/MyDto.java
|
e7a3ba7ca5a783efdd24ddcda0787288f2338d9d
|
[] |
no_license
|
Suryakanta97/DemoExample
|
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
|
5c6b831948e612bdc2d9d578a581df964ef89bfb
|
refs/heads/main
| 2023-08-10T17:30:32.397265
| 2021-09-22T16:18:42
| 2021-09-22T16:18:42
| 391,087,435
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,138
|
java
|
package com.surya.jackson.dtos;
public class MyDto {
private String stringValue;
private int intValue;
private boolean booleanValue;
public MyDto() {
super();
}
public MyDto(final String stringValue, final int intValue, final boolean booleanValue) {
super();
this.stringValue = stringValue;
this.intValue = intValue;
this.booleanValue = booleanValue;
}
// API
public String getStringValue() {
return stringValue;
}
public void setStringValue(final String stringValue) {
this.stringValue = stringValue;
}
public int getIntValue() {
return intValue;
}
public void setIntValue(final int intValue) {
this.intValue = intValue;
}
public boolean isBooleanValue() {
return booleanValue;
}
public void setBooleanValue(final boolean booleanValue) {
this.booleanValue = booleanValue;
}
//
@Override
public String toString() {
return "MyDto [stringValue=" + stringValue + ", intValue=" + intValue + ", booleanValue=" + booleanValue + "]";
}
}
|
[
"suryakanta97@github.com"
] |
suryakanta97@github.com
|
3fcb3ca8411d11f23311b2e47d29a253f609ceb0
|
21f553e7941c9e2154ff82aaef5e960942f89387
|
/lang_interface/java/com/intel/daal/algorithms/neural_networks/layers/convolution2d/Convolution2dForwardBatch.java
|
705a72febb62151b22601749773b9100697954ef
|
[
"Apache-2.0",
"Intel"
] |
permissive
|
tonythomascn/daal
|
7e6fe4285c7bb640cc58deb3359d4758a9f5eaf5
|
3e5071f662b561f448e8b20e994b5cb53af8e914
|
refs/heads/daal_2017_update2
| 2021-01-19T23:05:41.968161
| 2017-04-19T16:18:44
| 2017-04-19T16:18:44
| 88,920,723
| 1
| 0
| null | 2017-04-20T23:54:18
| 2017-04-20T23:54:18
| null |
UTF-8
|
Java
| false
| false
| 7,947
|
java
|
/* file: Convolution2dForwardBatch.java */
/*******************************************************************************
* Copyright 2014-2017 Intel Corporation
*
* 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.
*******************************************************************************/
/**
* @defgroup convolution2d_forward_batch Batch
* @ingroup convolution2d_forward
* @{
*/
package com.intel.daal.algorithms.neural_networks.layers.convolution2d;
import com.intel.daal.algorithms.Precision;
import com.intel.daal.algorithms.ComputeMode;
import com.intel.daal.algorithms.AnalysisBatch;
import com.intel.daal.services.DaalContext;
/**
* <a name="DAAL-CLASS-ALGORITHMS__NEURAL_NETWORKS__LAYERS__CONVOLUTION2D__CONVOLUTION2DFORWARDBATCH"></a>
* \brief Class that computes the results of the forward 2D convolution layer in the batch processing mode
* \n<a href="DAAL-REF-CONVOLUTION2DFORWARD">Forward 2D convolution layer description and usage models</a>
*
* \par References
* - @ref Convolution2dLayerDataId class
*/
public class Convolution2dForwardBatch extends com.intel.daal.algorithms.neural_networks.layers.ForwardLayer {
public Convolution2dForwardInput input; /*!< %Input data */
public Convolution2dMethod method; /*!< Computation method for the layer */
public Convolution2dParameter parameter; /*!< Convolution2dParameters of the layer */
private Precision prec; /*!< Data type to use in intermediate computations for the layer */
/** @private */
static {
System.loadLibrary("JavaAPI");
}
/**
* Constructs the forward 2D convolution layer by copying input objects of another forward 2D convolution layer
* @param context Context to manage the forward 2D convolution layer
* @param other A forward 2D convolution layer to be used as the source to initialize the input objects of the forward 2D convolution layer
*/
public Convolution2dForwardBatch(DaalContext context, Convolution2dForwardBatch other) {
super(context);
this.method = other.method;
prec = other.prec;
this.cObject = cClone(other.cObject, prec.getValue(), method.getValue());
input = new Convolution2dForwardInput(context, cGetInput(cObject, prec.getValue(), method.getValue()));
parameter = new Convolution2dParameter(context, cInitParameter(cObject, prec.getValue(), method.getValue()));
}
/**
* Constructs the forward 2D convolution layer
* @param context Context to manage the layer
* @param cls Data type to use in intermediate computations for the layer, Double.class or Float.class
* @param method The layer computation method, @ref Convolution2dMethod
*/
public Convolution2dForwardBatch(DaalContext context, Class<? extends Number> cls, Convolution2dMethod method) {
super(context);
this.method = method;
if (method != Convolution2dMethod.defaultDense) {
throw new IllegalArgumentException("method unsupported");
}
if (cls != Double.class && cls != Float.class) {
throw new IllegalArgumentException("type unsupported");
}
if (cls == Double.class) {
prec = Precision.doublePrecision;
}
else {
prec = Precision.singlePrecision;
}
this.cObject = cInit(prec.getValue(), method.getValue());
input = new Convolution2dForwardInput(context, cGetInput(cObject, prec.getValue(), method.getValue()));
parameter = new Convolution2dParameter(context, cInitParameter(cObject, prec.getValue(), method.getValue()));
}
/**
* Constructs the forward 2D convolution layer
* @param context Context to manage the layer
* @param cls Data type to use in intermediate computations for the layer, Double.class or Float.class
* @param method The layer computation method, @ref Convolution2dMethod
* @param cObject Address of C++ forward batch
*/
Convolution2dForwardBatch(DaalContext context, Class<? extends Number> cls, Convolution2dMethod method, long cObject) {
super(context);
this.method = method;
if (method != Convolution2dMethod.defaultDense) {
throw new IllegalArgumentException("method unsupported");
}
if (cls != Double.class && cls != Float.class) {
throw new IllegalArgumentException("type unsupported");
}
if (cls == Double.class) {
prec = Precision.doublePrecision;
}
else {
prec = Precision.singlePrecision;
}
this.cObject = cObject;
input = new Convolution2dForwardInput(context, cGetInput(cObject, prec.getValue(), method.getValue()));
parameter = new Convolution2dParameter(context, cInitParameter(cObject, prec.getValue(), method.getValue()));
}
/**
* Computes the result of the forward 2D convolution layer
* @return Forward 2D convolution layer result
*/
@Override
public Convolution2dForwardResult compute() {
super.compute();
Convolution2dForwardResult result = new Convolution2dForwardResult(getContext(), cGetResult(cObject, prec.getValue(), method.getValue()));
return result;
}
/**
* Registers user-allocated memory to store the result of the forward 2D convolution layer
* @param result Structure to store the result of the forward 2D convolution layer
*/
public void setResult(Convolution2dForwardResult result) {
cSetResult(cObject, prec.getValue(), method.getValue(), result.getCObject());
}
/**
* Returns the structure that contains result of the forward layer
* @return Structure that contains result of the forward layer
*/
@Override
public Convolution2dForwardResult getLayerResult() {
return new Convolution2dForwardResult(getContext(), cGetResult(cObject, prec.getValue(), method.getValue()));
}
/**
* Returns the structure that contains input object of the forward layer
* @return Structure that contains input object of the forward layer
*/
@Override
public Convolution2dForwardInput getLayerInput() {
return input;
}
/**
* Returns the structure that contains parameters of the forward layer
* @return Structure that contains parameters of the forward layer
*/
@Override
public Convolution2dParameter getLayerParameter() {
return parameter;
}
/**
* Returns the newly allocated forward 2D convolution layer
* with a copy of input objects of this forward 2D convolution layer
* @param context Context to manage the layer
*
* @return The newly allocated forward 2D convolution layer
*/
@Override
public Convolution2dForwardBatch clone(DaalContext context) {
return new Convolution2dForwardBatch(context, this);
}
private native long cInit(int prec, int method);
private native long cInitParameter(long cAlgorithm, int prec, int method);
private native long cGetInput(long cAlgorithm, int prec, int method);
private native long cGetResult(long cAlgorithm, int prec, int method);
private native void cSetResult(long cAlgorithm, int prec, int method, long cObject);
private native long cClone(long algAddr, int prec, int method);
}
/** @} */
|
[
"vasily.rubtsov@intel.com"
] |
vasily.rubtsov@intel.com
|
b665bab25c39964d1b7450eba43f458805a85816
|
d99e6aa93171fafe1aa0bb39b16c1cc3b63c87f1
|
/stress/src/main/java/com/stress/sub0/sub2/sub3/Class722.java
|
2b3bf7b261a610be53c63d39d88aa4b4b894ff0f
|
[] |
no_license
|
jtransc/jtransc-examples
|
291c9f91c143661c1776ddb7a359790caa70a37b
|
f44979531ac1de72d7af52545c4a9ef0783a0d5b
|
refs/heads/master
| 2021-01-17T13:19:55.535947
| 2017-09-13T06:31:25
| 2017-09-13T06:31:25
| 51,407,684
| 14
| 4
| null | 2017-07-04T10:18:40
| 2016-02-09T23:11:45
|
Java
|
UTF-8
|
Java
| false
| false
| 386
|
java
|
package com.stress.sub0.sub2.sub3;
import com.jtransc.annotation.JTranscKeep;
@JTranscKeep
public class Class722 {
public static final String static_const_722_0 = "Hi, my num is 722 0";
static int static_field_722_0;
int member_722_0;
public void method722()
{
System.out.println(static_const_722_0);
}
public void method722_1(int p0, String p1)
{
System.out.println(p1);
}
}
|
[
"soywiz@gmail.com"
] |
soywiz@gmail.com
|
8be2c004b514b17f5381b1b7a4d4c5db505c8f79
|
cfb6a37d986ceef219c4dd87e27c1babd6e54cd9
|
/GoldenMango/app/src/main/java/com/goldenmango/lottery/data/UserInfo.java
|
e85bd6a9d5f1b47472cb968c1ecb6982c43d6e7e
|
[] |
no_license
|
azbjx5288/shangjia
|
3d975b0924bb0e3d7b1b6c1e7402f3d314d1ae3d
|
9af270fc94bcd60a5f33399c0ab3ad71c384c803
|
refs/heads/master
| 2021-09-22T15:43:00.720327
| 2018-09-11T12:58:48
| 2018-09-11T12:58:48
| 139,444,560
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,662
|
java
|
package com.goldenmango.lottery.data;
import com.google.gson.annotations.SerializedName;
/**
* Created by Alashi on 2016/1/7.
*/
public class UserInfo {
/**
* id : 306
* is_agent : 1
* username : amostest
* parent_id : null
* forefather_ids :
* parent :
* forefathers :
* account_id : 306
* prize_group : 1960
* blocked : 0
* portrait_code : 1
* name :
* nickname : amos
* email :
* mobile :
* is_tester : 1
* qq :
* skype :
* bet_coefficient : 1.000
* login_ip : 203.82.46.57
* signin_at : 2016-07-22 16:57:02
* register_at : 2016-06-24 16:01:56
* abalance : 10072362.9000
* fund_pwd_seted : 1
* token : 02c89afc28cd301560a8dae6e88b9ffa310d4977
*/
private int id;
@SerializedName("is_agent")
private boolean isAgent;
private String username;
@SerializedName("parent_id")
private String parentId;
@SerializedName("forefather_ids")
private String forefatherIds;
private String parent;
private String forefathers;
@SerializedName("account_id")
private int accountId;
@SerializedName("prize_group")
private int prizeGroup;
private int blocked;
@SerializedName("portrait_code")
private int portraitCode;
private String name;
private String nickname;
private String email;
private String mobile;
@SerializedName("is_tester")
private boolean isTester;
private String qq;
private String skype;
@SerializedName("bet_coefficient")
private double betCoefficient;
@SerializedName("login_ip")
private String loginIp;
@SerializedName("signin_at")
private String signinAt;
@SerializedName("register_at")
private String registerAt;
private double abalance;
@SerializedName("fund_pwd_seted")
private boolean fundPwdSeted;
private String token;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public boolean isAgent() { return isAgent; }
public void setAgent(boolean agent) { isAgent = agent; }
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public String getForefatherIds() {
return forefatherIds;
}
public void setForefatherIds(String forefatherIds) {
this.forefatherIds = forefatherIds;
}
public String getParent() {
return parent;
}
public void setParent(String parent) {
this.parent = parent;
}
public String getForefathers() {
return forefathers;
}
public void setForefathers(String forefathers) {
this.forefathers = forefathers;
}
public int getAccountId() {
return accountId;
}
public void setAccountId(int accountId) {
this.accountId = accountId;
}
public int getPrizeGroup() {
return prizeGroup;
}
public void setPrizeGroup(int prizeGroup) {
this.prizeGroup = prizeGroup;
}
public int getBlocked() {
return blocked;
}
public void setBlocked(int blocked) {
this.blocked = blocked;
}
public int getPortraitCode() {
return portraitCode;
}
public void setPortraitCode(int portraitCode) {
this.portraitCode = portraitCode;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public boolean isTester() {
return isTester;
}
public void setTester(boolean tester) {
isTester = tester;
}
public String getQq() {
return qq;
}
public void setQq(String qq) {
this.qq = qq;
}
public String getSkype() {
return skype;
}
public void setSkype(String skype) {
this.skype = skype;
}
public double getBetCoefficient() {
return betCoefficient;
}
public void setBetCoefficient(double betCoefficient) {
this.betCoefficient = betCoefficient;
}
public String getLoginIp() {
return loginIp;
}
public void setLoginIp(String loginIp) {
this.loginIp = loginIp;
}
public String getSigninAt() {
return signinAt;
}
public void setSigninAt(String signinAt) {
this.signinAt = signinAt;
}
public String getRegisterAt() {
return registerAt;
}
public void setRegisterAt(String registerAt) {
this.registerAt = registerAt;
}
public double getAbalance() {
return abalance;
}
public void setAbalance(double abalance) {
this.abalance = abalance;
}
public boolean isFundPwdSeted() {
return fundPwdSeted;
}
public void setFundPwdSeted(boolean fundPwdSeted) {
this.fundPwdSeted = fundPwdSeted;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
}
|
[
"429533813@qq.com"
] |
429533813@qq.com
|
22888ddc3951d1faf7d00038d9da5cb3bdf45dd3
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Chart/15/org/jfree/chart/plot/PiePlot_getLabelOutlineStroke_1682.java
|
29616572ae6b04b6e7c827ef18ca29529d975888
|
[] |
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
| 3,573
|
java
|
org jfree chart plot
plot displai data form pie chart data
link pie dataset piedataset
special note
start point o'clock pie section proce
clockwis direct set chang
neg valu dataset
util method creat link pie dataset piedataset
link org jfree data categori categori dataset categorydataset
plot
pie dataset piedataset
pie plot pieplot plot cloneabl serializ
return section label outlin stroke
stroke possibl code code
set label outlin stroke setlabeloutlinestrok stroke
stroke label outlin stroke getlabeloutlinestrok
label outlin stroke labeloutlinestrok
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
c5b200ce23442431b866c724a351bfb86478e547
|
c1042b007ea283256441066020f8e4a9208c1f2c
|
/src/main/java/cn/ms/gateway/common/log/LoggerFactory.java
|
23e8b23de3706e580e2cdfd93e7e7e8ed1c6561f
|
[
"MIT"
] |
permissive
|
tomdev2008/ms-gateway
|
3265a5ccc5bdc087e593c4cc7b2acef4e8db1f3d
|
f553a96d32808699fc92b71d04ec4b7b284766e3
|
refs/heads/master
| 2020-07-29T12:02:27.238560
| 2016-11-13T08:23:03
| 2016-11-13T08:23:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,168
|
java
|
package cn.ms.gateway.common.log;
import cn.ms.gateway.common.log.impl.JdkLoggerFactory;
public class LoggerFactory {
public static interface InternalLoggerFactory {
Logger getLogger(Class<?> clazz);
Logger getLogger(String name);
}
private static InternalLoggerFactory factory;
static {
initDefaultFactory();
}
public static void setLoggerFactory(InternalLoggerFactory factory) {
if (factory != null) {
LoggerFactory.factory = factory;
}
}
public static Logger getLogger(Class<?> clazz) {
return factory.getLogger(clazz);
}
public static Logger getLogger(String name) {
return factory.getLogger(name);
}
public static void initDefaultFactory() {
if (factory != null){
return ;
}
try {
//default to Log4j2
Class.forName("org.apache.logging.log4j.Logger");
String defaultFactory = String.format("%s.impl.Log4j2LoggerFactory", Logger.class.getPackage().getName());
Class<?> factoryClass = Class.forName(defaultFactory);
factory = (InternalLoggerFactory)factoryClass.newInstance();
return;
} catch (Exception e) {
}
if(factory == null){
factory = new JdkLoggerFactory();
}
}
}
|
[
"595208882@qq.com"
] |
595208882@qq.com
|
5b69bfacc941418cdcfd4f2da5b4c1e2a0a0fd14
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-14626-5-3-NSGA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/store/XWikiHibernateBaseStore_ESTest_scaffolding.java
|
6eb5fc79e2bfb1bf613bb17b431eabe1c0efc9e1
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 447
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Apr 03 07:53:10 UTC 2020
*/
package com.xpn.xwiki.store;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class XWikiHibernateBaseStore_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
8baf8f706095be83df833156b89f6c6f680953fb
|
4c6adf0ce6ef3f02dcef9c345e0e5e4ff139d886
|
/Common/FO/fo-jar/fo-order/src/main/java/com/pay/fo/order/service/batchpayment/BatchPaymentToAcctReqDetailService.java
|
4b55b9d7ece0f36be0eb811c09b5917aae2666e6
|
[] |
no_license
|
happyjianguo/pay-1
|
8631906be62707316f0ed3eb6b2337c90d213bc0
|
40ae79738cfe4e5d199ca66468f3a33e9d8f2007
|
refs/heads/master
| 2020-07-27T19:51:54.958859
| 2016-12-19T07:34:24
| 2016-12-19T07:34:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,565
|
java
|
/**
*
*/
package com.pay.fo.order.service.batchpayment;
import java.util.List;
import com.pay.inf.exception.AppException;
import com.pay.fo.order.dto.batchpayment.BatchPaymentReqBaseInfoDTO;
import com.pay.fo.order.dto.batchpayment.BatchPaymentToAcctReqDetailDTO;
import com.pay.fo.order.dto.batchpayment.RequestDetail;
/**
* @author NEW
*
*/
public interface BatchPaymentToAcctReqDetailService {
/**
* 存储批付到账户请求明细信息
* @param detail
*/
void create(BatchPaymentToAcctReqDetailDTO detail);
/**
* 批量存储批付到账户请求明细信息
* @param details
* @throws AppException
*/
void create(List<RequestDetail> details,BatchPaymentReqBaseInfoDTO reqInfo) throws AppException;
/**
* 更新批付到账户请求信息
* @param detail
* @return
*/
boolean updateStatus(BatchPaymentToAcctReqDetailDTO detail,int oldStatus);
/**
* 获取单笔批付到账户请求明细
* @param detailSeq
* @return
*/
BatchPaymentToAcctReqDetailDTO getDetail(Long detailSeq);
/**
* 获取验证明细列表
* @param requestSeq 请求流水号
* @param validateStatus 0:未验证通过;1:验证通过
* @return
*/
List<BatchPaymentToAcctReqDetailDTO> getValidateDetailList(Long requestSeq,Integer validateStatus);
/**
* 获取创建订单明细列表
* @param requestSeq 请求流水号
* @param orderStatus 0:未生成订单;1:已生成订单
* @return
*/
List<BatchPaymentToAcctReqDetailDTO> getCreateOrderDetailList(Long requestSeq,Integer orderStatus);
}
|
[
"stanley.zou@hrocloud.com"
] |
stanley.zou@hrocloud.com
|
0aee01645351de4632f5ff4e0e4e64a68c5b2321
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/finder/live/viewmodel/a$$ExternalSyntheticLambda0.java
|
cb59ed37201b87aa3a1bf598b210581012700fbd
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 481
|
java
|
package com.tencent.mm.plugin.finder.live.viewmodel;
import android.view.View;
import android.view.View.OnClickListener;
public final class a$$ExternalSyntheticLambda0
implements View.OnClickListener
{
public final void onClick(View arg1) {}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes3.jar
* Qualified Name: com.tencent.mm.plugin.finder.live.viewmodel.a..ExternalSyntheticLambda0
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
169133337b249a04b817022f3b10581a9aee3058
|
3a5985651d77a31437cfdac25e594087c27e93d6
|
/ojc-core/databasebc/databasebcimpl/test/org/glassfish/openesb/databasebc/extensions/JDBCExtSerializerTest.java
|
017bdfffb3fcd71eb4ee0250c516490a7aa18d53
|
[] |
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
| 8,040
|
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]
*/
/*
* @(#)JDBCExtSerializerTest.java
*
* Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
*
* END_HEADER - DO NOT EDIT
*/
package org.glassfish.openesb.databasebc.extensions;
import com.ibm.wsdl.Constants;
import com.ibm.wsdl.factory.WSDLFactoryImpl;
import com.sun.wsdl4j.ext.impl.WSDLFactoryEx;
import com.sun.wsdl4j.ext.impl.WSDLFactoryEx;
import com.sun.wsdl4j.ext.impl.WSDLReaderEx;
import junit.framework.*;
import org.apache.xml.resolver.CatalogManager;
import org.apache.xml.resolver.tools.CatalogResolver;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import javax.wsdl.Definition;
import javax.wsdl.extensions.ExtensibilityElement;
import javax.wsdl.extensions.ExtensionRegistry;
import javax.wsdl.factory.WSDLFactory;
import javax.wsdl.xml.WSDLReader;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
/**
*
*
*/
public class JDBCExtSerializerTest extends TestCase {
Class parentType = null;
Definition def = null;
ExtensionRegistry extReg = null;
JDBCExtSerializer instance = null;
QName bindingElementType = null;
QName bindingOperationElementType = null;
QName addressElementType = null;
Document doc = null;
WSDLFactoryEx wsdlFactory = null;
WSDLReaderEx reader = null;
String outputFolder = null;
String expectedFolder = null;
public JDBCExtSerializerTest(final String testName) {
super(testName);
}
//@Override
public void setUp() throws Exception {
instance = new JDBCExtSerializer();
extReg = new ExtensionRegistry();
bindingElementType = new QName("http://schemas.sun.com/jbi/wsdl-extensions/jdbc/",
Constants.ELEM_BINDING);
bindingOperationElementType = new QName("http://schemas.sun.com/jbi/wsdl-extensions/jdbc/",
Constants.ELEM_OPERATION);
addressElementType = new QName("http://schemas.sun.com/jbi/wsdl-extensions/jdbc/",
"address");
outputFolder = "test/org/glassfish/openesb/databasebc/extensions/output/";
expectedFolder = "test/org/glassfish/openesb//databasebc/extensions/expected/";
final BufferedReader br = new BufferedReader(new InputStreamReader(
new FileInputStream(
new File(
"test/org/glassfish/openesb/databasebc/packaging/wsdls/TestJdbc.wsdl")),
"UTF-8"));
//wsdlFactory = WSDLFactory.newInstance();
//reader = ((WSDLFactoryImpl) wsdlFactory).newWSDLReader(new CatalogResolver(
// new CatalogManager()));
//def = reader.readWSDL(new File(
// "test/org/glassfish/openesb/databasebc/packaging/wsdls/TestJdbc.wsdl").getAbsolutePath());
// above default Implementation changed with current sun extension
wsdlFactory = new WSDLFactoryEx();
reader = wsdlFactory.newWSDLReaderEx();
reader.setEntityResolver(new CatalogResolver(new CatalogManager()));
reader.setExtensionRegistry(new JDBCExtensionRegistry(instance));
def = reader.readWSDL(new File(
"test/org/glassfish/openesb/databasebc/packaging/wsdls/TestJdbc.wsdl").getAbsolutePath());
try {
final InputSource is = new InputSource(br);
final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db;
synchronized (dbf) {
dbf.setNamespaceAware(true);
db = dbf.newDocumentBuilder();
}
doc = db.parse(is);
} catch (final Exception e) {
Assert.fail(
"Something went wrong during parsing TestJdbc.wsdl, cannot proceed");
}
if (doc == null) {
Assert.fail(
"Something went wrong during parsing TestJdbc.wsdl, cannot proceed");
}
}
//@Override
public void tearDown() throws Exception {
}
public static Test suite() {
final TestSuite suite = new TestSuite(JDBCExtSerializerTest.class);
return suite;
}
/**
* Test of marshall method, of class org.glassfish.openesb.databasebc.extensions.JdbcExtSerializer.
*/
public void testMarshall() throws Exception {
System.out.println("Testing marshall");
System.out.println("Successfully tested marshal");
}
/**
* Test of unmarshall method, of class org.glassfish.openesb.databasebc.extensions.JdbcExtSerializer.
*/
public void testUnmarshall() throws Exception {
System.out.println("Testing unmarshall");
Element xelem = null;
ExtensibilityElement result = null;
// 1. testing file:binding element
xelem = getElement(doc, "jdbc:binding");
result = instance.unmarshall(null, bindingElementType, xelem, null,
extReg);
Assert.assertTrue(result instanceof JDBCBinding);
// 2. testing file:operation element
xelem = getElement(doc, "jdbc:operation");
if (xelem != null) {
result = instance.unmarshall(null, bindingOperationElementType,
xelem, null, extReg);
Assert.assertTrue(result instanceof JDBCOperation);
//JDBCOperation oper = (JDBCOperation)result;
//assertEquals("insert", oper.getOperationType());
} else {
Assert.fail(
"Something went wrong during parsing TestFile.wsdl, cannot proceed");
}
// 3. testing file:address element
xelem = getElement(doc, "jdbc:address");
if (xelem != null) {
result = instance.unmarshall(null, addressElementType, xelem, null,
extReg);
Assert.assertTrue(result instanceof JDBCAddress);
final JDBCAddress address = (JDBCAddress) result;
Assert.assertEquals("jdbc/__OrclPool", address.getJndiName());
} else {
Assert.fail(
"Something went wrong during parsing TestJdbc.wsdl, cannot proceed");
}
System.out.println("Successfully tested unmarshal");
}
public Element getElement(final Node aNode, final String elementName) {
Element theOne = null;
if (aNode.getNodeName().equalsIgnoreCase(elementName)) {
return (Element) aNode;
}
final NodeList children = aNode.getChildNodes();
for (int ii = 0; ii < children.getLength(); ii++) {
final Node child = children.item(ii);
if (child.getNodeName().equalsIgnoreCase(elementName)) {
theOne = (Element) child;
break;
} else {
theOne = getElement(child, elementName);
if (theOne != null) {
break;
}
}
}
return theOne;
}
}
|
[
"bitbucket@bitbucket02.private.bitbucket.org"
] |
bitbucket@bitbucket02.private.bitbucket.org
|
83950ad1c156596139a49ed4e22e5ffc1eca9970
|
e0d52bbf5d1b657afb07795bf456e8e680302980
|
/App/TwoAdw/src/twoadw/wicket/website/productmanufacturer/EntityDisplaySlidePage.java
|
560d9d86d5e0b8294bd53c7b149fdf4e33ec06ab
|
[] |
no_license
|
youp911/modelibra
|
acc391da16ab6b14616cd7bda094506a05414b0f
|
00387bd9f1f82df3b7d844650e5a57d2060a2ec7
|
refs/heads/master
| 2021-01-25T09:59:19.388394
| 2011-11-24T21:46:26
| 2011-11-24T21:46:26
| 42,008,889
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,897
|
java
|
/*
* Modelibra
*
* 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 twoadw.wicket.website.productmanufacturer;
import org.modelibra.wicket.view.View;
import org.modelibra.wicket.view.ViewModel;
import twoadw.website.productmanufacturer.ProductManufacturers;
/**
* Entity display slide page.
*
* @author TeamFcp
* @version 2009-03-16
*/
public class EntityDisplaySlidePage extends
org.modelibra.wicket.concept.EntityDisplaySlidePage {
private static final long serialVersionUID = 1234729930227L;
/**
* Constructs an entity display slide page.
*
* @param viewModel
* view model
* @param view
* view
*/
public EntityDisplaySlidePage(final ViewModel viewModel, final View view) {
super(getNewViewModel(viewModel), view);
}
/**
* Gets a new view model.
*
* @param viewModel
* view model
* @return new view model
*/
private static ViewModel getNewViewModel(final ViewModel viewModel) {
ViewModel newViewModel = new ViewModel();
newViewModel.copyPropertiesFrom(viewModel);
ProductManufacturers productManufacturers = (ProductManufacturers) viewModel.getEntities();
// productManufacturers = productManufacturers.getProductManufacturersOrderedBy????(true);
newViewModel.setEntities(productManufacturers);
return newViewModel;
}
}
|
[
"dzenanr@c25eb2fc-9753-11de-83f8-39e71e4dc75d"
] |
dzenanr@c25eb2fc-9753-11de-83f8-39e71e4dc75d
|
3fe9050c3d745f2aa1d79cd95bc7a15f8710fe0c
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/61/org/apache/commons/math/genetics/GeneticAlgorithm_getCrossoverPolicy_181.java
|
d3c940223e327c164f40b12be8be71576ba9255a
|
[] |
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
| 511
|
java
|
org apach common math genet
implement genet algorithm factor govern oper
algorithm configur specif problem
version revis date
genet algorithm geneticalgorithm
return crossov polici
crossov polici
crossov polici crossoverpolici crossov polici getcrossoverpolici
crossov polici crossoverpolici
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
429ea1ad79d7d79becf5ae4780d12716d00b2744
|
f0d25d83176909b18b9989e6fe34c414590c3599
|
/app/src/main/java/com/tencent/midas/oversea/api/request/IProductInfoCallback.java
|
aca4eea3a00cf3ee4f8e41dc7dc02e0becb88921
|
[] |
no_license
|
lycfr/lq
|
e8dd702263e6565486bea92f05cd93e45ef8defc
|
123914e7c0d45956184dc908e87f63870e46aa2e
|
refs/heads/master
| 2022-04-07T18:16:31.660038
| 2020-02-23T03:09:18
| 2020-02-23T03:09:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 130
|
java
|
package com.tencent.midas.oversea.api.request;
public interface IProductInfoCallback {
void onProductInfoResp(String str);
}
|
[
"quyenlm.vn@gmail.com"
] |
quyenlm.vn@gmail.com
|
1b323910e0647735d47a023930a06894d47b5ff0
|
b2f07f3e27b2162b5ee6896814f96c59c2c17405
|
/javax/xml/transform/stream/StreamResult.java
|
034e6fb694fef9a86d1c5de5dce004b485b0bc95
|
[] |
no_license
|
weiju-xi/RT-JAR-CODE
|
e33d4ccd9306d9e63029ddb0c145e620921d2dbd
|
d5b2590518ffb83596a3aa3849249cf871ab6d4e
|
refs/heads/master
| 2021-09-08T02:36:06.675911
| 2018-03-06T05:27:49
| 2018-03-06T05:27:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,232
|
java
|
/* */ package javax.xml.transform.stream;
/* */
/* */ import java.io.File;
/* */ import java.io.OutputStream;
/* */ import java.io.Writer;
/* */ import java.net.URI;
/* */ import javax.xml.transform.Result;
/* */
/* */ public class StreamResult
/* */ implements Result
/* */ {
/* */ public static final String FEATURE = "http://javax.xml.transform.stream.StreamResult/feature";
/* */ private String systemId;
/* */ private OutputStream outputStream;
/* */ private Writer writer;
/* */
/* */ public StreamResult()
/* */ {
/* */ }
/* */
/* */ public StreamResult(OutputStream outputStream)
/* */ {
/* 65 */ setOutputStream(outputStream);
/* */ }
/* */
/* */ public StreamResult(Writer writer)
/* */ {
/* 79 */ setWriter(writer);
/* */ }
/* */
/* */ public StreamResult(String systemId)
/* */ {
/* 88 */ this.systemId = systemId;
/* */ }
/* */
/* */ public StreamResult(File f)
/* */ {
/* 100 */ setSystemId(f.toURI().toASCIIString());
/* */ }
/* */
/* */ public void setOutputStream(OutputStream outputStream)
/* */ {
/* 112 */ this.outputStream = outputStream;
/* */ }
/* */
/* */ public OutputStream getOutputStream()
/* */ {
/* 122 */ return this.outputStream;
/* */ }
/* */
/* */ public void setWriter(Writer writer)
/* */ {
/* 136 */ this.writer = writer;
/* */ }
/* */
/* */ public Writer getWriter()
/* */ {
/* 146 */ return this.writer;
/* */ }
/* */
/* */ public void setSystemId(String systemId)
/* */ {
/* 157 */ this.systemId = systemId;
/* */ }
/* */
/* */ public void setSystemId(File f)
/* */ {
/* 170 */ this.systemId = f.toURI().toASCIIString();
/* */ }
/* */
/* */ public String getSystemId()
/* */ {
/* 180 */ return this.systemId;
/* */ }
/* */ }
/* Location: C:\Program Files\Java\jdk1.7.0_79\jre\lib\rt.jar
* Qualified Name: javax.xml.transform.stream.StreamResult
* JD-Core Version: 0.6.2
*/
|
[
"yuexiahandao@gmail.com"
] |
yuexiahandao@gmail.com
|
1bc1ffdf955bab968b4a4aa40bd2f6bd8a472fa9
|
859963903d96ed693575636c207a27e7d7d858d5
|
/poo/ejemplos/src/main/java/co/edu/sena/poo/ejemplo05metodos/Ejemplo01.java
|
9ea9517c5c7ec92f609c8e4e84e0853d819488cd
|
[] |
no_license
|
yibethpachon24198/1803182G1-Trimestre-2
|
456c94380f7f7ba80d8f4786caa9bdf8327e3dad
|
a4209eb13120429f8540d4ac36e59ad30fafd819
|
refs/heads/master
| 2020-08-07T14:20:36.015460
| 2019-08-15T12:02:32
| 2019-08-15T12:02:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 363
|
java
|
package co.edu.sena.poo.ejemplo05metodos;
public class Ejemplo01 {
public static void main(String[] args) {
Calculadora calculadora = new Calculadora();
calculadora.sumar(1,2);
calculadora.sumar(2,4.6F);
calculadora.sumar("4.6", "7.9");
int a=15;
int b=15;
System.out.println(Math.max(a,b));
}
}
|
[
"hemoreno33@misena.edu.co"
] |
hemoreno33@misena.edu.co
|
b19ae18a0f9a8cca33c591e8b3051d0858931741
|
2a9dd6077aab664cf4733738799981bf27caf079
|
/ahpucampus-core/src/main/java/com/stylefeng/guns/core/exception/GunsExceptionEnum.java
|
1411311d2e851ab539368cba42c5171a2c37a38c
|
[
"Apache-2.0"
] |
permissive
|
itxiaojian/ahpucampusadmin
|
45a50c38bda692f4f63e92e1ed5096ba68ee79fb
|
bc4b4a9a533fb8b179f59df391cb8974a7b4d7c5
|
refs/heads/master
| 2020-04-09T10:08:01.214096
| 2019-03-05T15:19:36
| 2019-03-05T15:19:36
| 160,259,463
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 979
|
java
|
package com.stylefeng.guns.core.exception;
/**
* Guns异常枚举
*
* @author fengshuonan
* @Date 2017/12/28 下午10:33
*/
public enum GunsExceptionEnum implements ServiceExceptionEnum{
/**
* 其他
*/
WRITE_ERROR(500,"渲染界面错误"),
/**
* 文件上传
*/
FILE_READING_ERROR(400,"FILE_READING_ERROR!"),
FILE_NOT_FOUND(400,"FILE_NOT_FOUND!"),
FILE_TYPE_ERROR(400,"FILE_TYPE_ERROR!"),
WEIBOLOGIN_CODE_EMPTY(400,"WEIBOLOGIN_CODE_EMPTY!"),
/**
* 错误的请求
*/
REQUEST_NULL(400, "请求有错误"),
SERVER_ERROR(500, "服务器异常");
GunsExceptionEnum(int code, String message) {
this.code = code;
this.message = message;
}
private Integer code;
private String message;
@Override
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
@Override
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
|
[
"2629690209@qq.com"
] |
2629690209@qq.com
|
563801d46289e07d810c02aa503405e002c58f1d
|
a160e717506a2b6babd9b95500bb017297db7f71
|
/src/main/java/ch07/instructions/comparisons/ifcond/IFGE.java
|
4ab899782d489ebf9c08b9a9d1a0b4bd1fc9b414
|
[] |
no_license
|
zhaohan6357/JVM_java
|
cb93455143d9f0b879c766a8dec593934be3dc9b
|
fe7b1b3fde1fe4e4b9098b4f3ae86e02b68adca1
|
refs/heads/master
| 2020-03-22T10:41:04.897568
| 2018-08-09T02:17:11
| 2018-08-09T02:17:34
| 139,919,863
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 653
|
java
|
package ch07.instructions.comparisons.ifcond;
import ch07.instructions.base.branch_logic.branch_logic;
import ch07.instructions.base.instruction.BranchInstruction;
import ch07.rtda.Frame;
public class IFGE extends BranchInstruction {
/* type IFEQ struct{ base.BranchInstruction }
func (self *IFEQ) Execute(frame *rtda.Frame) {
val := frame.OperandStack().PopInt()
if val == 0 {
base.Branch(frame, self.Offset)
}
}*/
@Override
public void Execute(Frame frame) {
int val=frame.operandStack.popInt();
if(val>=0) {
branch_logic.Branch(frame, offset);
}
}
}
|
[
"zhaohan6357@163.com"
] |
zhaohan6357@163.com
|
1f770b7435b2109e34b894587371c363ae69667e
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/8/8_4665c53fe53a3f22cc1f6e9cbd7688392bfdc398/MainAppFrame/8_4665c53fe53a3f22cc1f6e9cbd7688392bfdc398_MainAppFrame_s.java
|
55dfe58eb751a354ac43fed1f16bd51942f996c0
|
[] |
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,392
|
java
|
package interiores.presentation.swing.views;
import interiores.business.events.room.RoomCreatedEvent;
import interiores.business.events.room.RoomLoadedEvent;
import interiores.core.presentation.SwingController;
import interiores.core.presentation.annotation.Listen;
import interiores.core.presentation.swing.SwingException;
import java.awt.BorderLayout;
import javax.swing.JFrame;
/**
*
* @author hector
*/
public class MainAppFrame extends JFrame
{
private SwingController presentation;
private WelcomePanel welcome;
private RoomMapPanel map;
private WishListPanel wishListPanel;
/**
* Creates new form MainView
*/
public MainAppFrame(SwingController presentation) throws SwingException
{
initComponents();
setLayout(new BorderLayout());
this.presentation = presentation;
welcome = presentation.get(WelcomePanel.class);
map = presentation.get(RoomMapPanel.class);
wishListPanel = presentation.get(WishListPanel.class);
add(welcome, BorderLayout.CENTER);
welcome.setVisible(true);
pack();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents()
{
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
newRoom = new javax.swing.JMenuItem();
jMenu2 = new javax.swing.JMenu();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Interior design");
setAlwaysOnTop(true);
jMenu1.setText("File");
newRoom.setText("New room design...");
newRoom.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt)
{
newRoomActionPerformed(evt);
}
});
jMenu1.add(newRoom);
jMenuBar1.add(jMenu1);
jMenu2.setText("Edit");
jMenuBar1.add(jMenu2);
setJMenuBar(jMenuBar1);
pack();
}// </editor-fold>//GEN-END:initComponents
private void newRoomActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_newRoomActionPerformed
{//GEN-HEADEREND:event_newRoomActionPerformed
presentation.showNew(NewDesignDialog.class);
}//GEN-LAST:event_newRoomActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuItem newRoom;
// End of variables declaration//GEN-END:variables
@Listen({RoomCreatedEvent.class, RoomLoadedEvent.class})
public void showMap() {
remove(welcome);
add(map, BorderLayout.CENTER);
add(wishListPanel, BorderLayout.LINE_END);
map.setVisible(true);
wishListPanel.setVisible(true);
wishListPanel.updateSelectable();
validate();
pack();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
511acdaf8ecadc590ea3e02d806e596d9f38973f
|
890af51efbc9b8237e0fd09903f78fe2bb9caadd
|
/general/report/com/hd/agent/report/model/FundsCustomerReturnReport.java
|
1c865fdbf9c52169a20cd9b5e7094aaa7954e9ba
|
[] |
no_license
|
1045907427/project
|
815fb0c5b4b44bf5d8365acfde61b6f68be6e52a
|
6eaecf09cd3414295ccf91454f62cf4d619cdbf2
|
refs/heads/master
| 2020-04-14T19:17:54.310613
| 2019-01-14T10:49:11
| 2019-01-14T10:49:11
| 164,052,678
| 0
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,779
|
java
|
/**
* @(#)FundsCustomerReturnReport.java
* @author chenwei
* 版本历史
* -------------------------------------------------------------------------
* 时间 作者 内容
* -------------------------------------------------------------------------
* Jul 20, 2013 chenwei 创建版本
*/
package com.hd.agent.report.model;
import java.io.Serializable;
import java.math.BigDecimal;
/**
*
* 按客户资金回笼统计报表
* @author chenwei
*/
public class FundsCustomerReturnReport implements Serializable{
/**
*
*/
private static final long serialVersionUID = 999720234039840694L;
/**
* 客户编号
*/
private String customerid;
/**
* 客户名称
*/
private String customername;
/**
* 总店客户
*/
private String pcustomerid;
/**
* 总店客户名称
*/
private String pcustomername;
/**
* 发货金额
*/
private BigDecimal sendamount;
/**
* 发货无税金额
*/
private BigDecimal sendnotaxamount;
/**
* 直退金额
*/
private BigDecimal directreturnamount;
/**
* 无税直退金额
*/
private BigDecimal directreturnnotaxamount;
/**
* 验收退货金额
*/
private BigDecimal checkreturnamount;
/**
* 无税售后退货金额
*/
private BigDecimal checkreturnnotaxamount;
/**
* 退货金额
*/
private BigDecimal returntaxamount;
/**
* 退货无税金额
*/
private BigDecimal returnnotaxamount;
/**
* 冲差金额(时候折扣)
*/
private BigDecimal pushbalanceamount;
/**
* 实际应收金额
*/
private BigDecimal receivableamount;
/**
* 成本金额
*/
private BigDecimal costamount;
/**
* 实际毛利率
*/
private BigDecimal realrate;
/**
* 计划毛利率
*/
private BigDecimal planrate;
/**
* 已回笼金额
*/
private BigDecimal withdrawnamount;
/**
* 未回笼金额
*/
private BigDecimal unwithdrawnamount;
/**
* 资金回笼率
*/
private BigDecimal withdrawrate;
/**
* 未核销总发货金额
*/
private BigDecimal allsendamount;
/**
* 未核销总退货金额
*/
private BigDecimal allreturnamount;
/**
* 未核销冲差金额
*/
private BigDecimal allpushbalanceamount;
/**
* 总应收款
*/
private BigDecimal allunwithdrawnamount;
/**
* 回单未审核应收款(历史在途应收款)
*/
private BigDecimal unauditamount;
/**
* 回单已审核应收款(历史已验收应收款)
*/
private BigDecimal auditamount;
/**
* 售后退货未核销应收款(历史退货应收款)
*/
private BigDecimal rejectamount;
/**
* 回笼成本金额
*/
private BigDecimal costwriteoffamount;
/**
* 回笼毛利率
*/
private BigDecimal writeoffrate;
public String getCustomerid() {
return customerid;
}
public void setCustomerid(String customerid) {
this.customerid = customerid;
}
public String getCustomername() {
return customername;
}
public void setCustomername(String customername) {
this.customername = customername;
}
public BigDecimal getSendamount() {
return sendamount;
}
public void setSendamount(BigDecimal sendamount) {
this.sendamount = sendamount;
}
public BigDecimal getSendnotaxamount() {
return sendnotaxamount;
}
public void setSendnotaxamount(BigDecimal sendnotaxamount) {
this.sendnotaxamount = sendnotaxamount;
}
public BigDecimal getReturntaxamount() {
return returntaxamount;
}
public void setReturntaxamount(BigDecimal returntaxamount) {
this.returntaxamount = returntaxamount;
}
public BigDecimal getReturnnotaxamount() {
return returnnotaxamount;
}
public void setReturnnotaxamount(BigDecimal returnnotaxamount) {
this.returnnotaxamount = returnnotaxamount;
}
public BigDecimal getReceivableamount() {
return receivableamount;
}
public void setReceivableamount(BigDecimal receivableamount) {
this.receivableamount = receivableamount;
}
public BigDecimal getCostamount() {
return costamount;
}
public void setCostamount(BigDecimal costamount) {
this.costamount = costamount;
}
public BigDecimal getRealrate() {
return realrate;
}
public void setRealrate(BigDecimal realrate) {
this.realrate = realrate;
}
public BigDecimal getPlanrate() {
return planrate;
}
public void setPlanrate(BigDecimal planrate) {
this.planrate = planrate;
}
public BigDecimal getWithdrawnamount() {
return withdrawnamount;
}
public void setWithdrawnamount(BigDecimal withdrawnamount) {
this.withdrawnamount = withdrawnamount;
}
public BigDecimal getUnwithdrawnamount() {
return unwithdrawnamount;
}
public void setUnwithdrawnamount(BigDecimal unwithdrawnamount) {
this.unwithdrawnamount = unwithdrawnamount;
}
public BigDecimal getWithdrawrate() {
return withdrawrate;
}
public void setWithdrawrate(BigDecimal withdrawrate) {
this.withdrawrate = withdrawrate;
}
public BigDecimal getPushbalanceamount() {
return pushbalanceamount;
}
public void setPushbalanceamount(BigDecimal pushbalanceamount) {
this.pushbalanceamount = pushbalanceamount;
}
public String getPcustomerid() {
return pcustomerid;
}
public void setPcustomerid(String pcustomerid) {
this.pcustomerid = pcustomerid;
}
public String getPcustomername() {
return pcustomername;
}
public void setPcustomername(String pcustomername) {
this.pcustomername = pcustomername;
}
public BigDecimal getDirectreturnamount() {
return directreturnamount;
}
public void setDirectreturnamount(BigDecimal directreturnamount) {
this.directreturnamount = directreturnamount;
}
public BigDecimal getDirectreturnnotaxamount() {
return directreturnnotaxamount;
}
public void setDirectreturnnotaxamount(BigDecimal directreturnnotaxamount) {
this.directreturnnotaxamount = directreturnnotaxamount;
}
public BigDecimal getCheckreturnamount() {
return checkreturnamount;
}
public void setCheckreturnamount(BigDecimal checkreturnamount) {
this.checkreturnamount = checkreturnamount;
}
public BigDecimal getCheckreturnnotaxamount() {
return checkreturnnotaxamount;
}
public void setCheckreturnnotaxamount(BigDecimal checkreturnnotaxamount) {
this.checkreturnnotaxamount = checkreturnnotaxamount;
}
public BigDecimal getAllsendamount() {
return allsendamount;
}
public void setAllsendamount(BigDecimal allsendamount) {
this.allsendamount = allsendamount;
}
public BigDecimal getAllreturnamount() {
return allreturnamount;
}
public void setAllreturnamount(BigDecimal allreturnamount) {
this.allreturnamount = allreturnamount;
}
public BigDecimal getAllunwithdrawnamount() {
return allunwithdrawnamount;
}
public void setAllunwithdrawnamount(BigDecimal allunwithdrawnamount) {
this.allunwithdrawnamount = allunwithdrawnamount;
}
public BigDecimal getAllpushbalanceamount() {
return allpushbalanceamount;
}
public void setAllpushbalanceamount(BigDecimal allpushbalanceamount) {
this.allpushbalanceamount = allpushbalanceamount;
}
public BigDecimal getUnauditamount() {
return unauditamount;
}
public void setUnauditamount(BigDecimal unauditamount) {
this.unauditamount = unauditamount;
}
public BigDecimal getAuditamount() {
return auditamount;
}
public void setAuditamount(BigDecimal auditamount) {
this.auditamount = auditamount;
}
public BigDecimal getRejectamount() {
return rejectamount;
}
public void setRejectamount(BigDecimal rejectamount) {
this.rejectamount = rejectamount;
}
public BigDecimal getCostwriteoffamount() {
return costwriteoffamount;
}
public void setCostwriteoffamount(BigDecimal costwriteoffamount) {
this.costwriteoffamount = costwriteoffamount;
}
public BigDecimal getWriteoffrate() {
return writeoffrate;
}
public void setWriteoffrate(BigDecimal writeoffrate) {
this.writeoffrate = writeoffrate;
}
}
|
[
"1045907427@qq.com"
] |
1045907427@qq.com
|
35ed7504bbaff822004f293768d8c2a9b0d1a5c3
|
8b05a92e2d1a2661751818bbb817da919be2a8c5
|
/test/com/ming/CommandVOTest.java
|
e9a631aea7bd1144579c24d2842b5008678f474e
|
[] |
no_license
|
mySoul8012/Move-the-unix-command
|
fc7eabc8a838b7b8eeb8f9894afdac67793a9c54
|
f693706f0c55ce8cc69360ca4f49c9a1117dde83
|
refs/heads/master
| 2020-04-18T19:48:55.886534
| 2019-01-29T17:55:59
| 2019-01-29T17:55:59
| 167,721,724
| 0
| 1
| null | 2019-02-23T04:41:02
| 2019-01-26T18:09:32
|
Java
|
UTF-8
|
Java
| false
| false
| 492
|
java
|
package com.ming;
import junit.framework.TestCase;
public class CommandVOTest extends TestCase {
public void setUp() throws Exception {
super.setUp();
String ls = "ls";
CommandVO commandVO = new CommandVO(ls);
}
public void tearDown() throws Exception {
}
public void testGetCommandName() {
String ls = "ls -a /home/ming";
CommandVO commandVO = new CommandVO(ls);
System.out.println(commandVO.getCommandName());
}
}
|
[
"mingming@mingming.email"
] |
mingming@mingming.email
|
52eb44fbe50a9d4ab242333a738f6982879e3322
|
122287275ec1666cc27a6b6d06bab4f8b1c4ff33
|
/实验生成的中间数据/毕设_log/tmp/2021_05_10_08_27_06/EvoSuiteWrapper_45.java
|
42b03483a022b351f6c87cb37b934a3e766d4d9d
|
[] |
no_license
|
NJUCWL/symbolic_tools
|
f036691918b147019c99584efb4dcbe1228ae6c0
|
669f549b0a97045de4cd95b1df43de93b1462e45
|
refs/heads/main
| 2023-05-09T12:00:57.836897
| 2021-06-01T13:34:40
| 2021-06-01T13:34:40
| 370,017,201
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,483
|
java
|
import static tardis.compile.path_condition_distance.DistanceBySimilarityWithPathCondition.distance;
import static java.lang.Double.*;
import static java.lang.Math.*;
import tardis.compile.path_condition_distance.*;
import tardis.logging.Level;
import tardis.logging.Logger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class EvoSuiteWrapper_45 {
private static final double SMALL_DISTANCE = 1;
private static final double BIG_DISTANCE = 1E300;
private final HashMap<Long, String> constants = new HashMap<>();
private final ClassLoader classLoader;
public EvoSuiteWrapper_45(ClassLoader classLoader) {
this.classLoader = classLoader;
}
public double test0(org.apache.bcel.generic.InstructionList V0, org.apache.bcel.generic.InstructionHandle V1, org.apache.bcel.generic.CompoundInstruction V2) throws Exception {
//generated for state [0]
final ArrayList<ClauseSimilarityHandler> pathConditionHandler = new ArrayList<>();
ValueCalculator valueCalculator;
final HashMap<String, Object> candidateObjects = new HashMap<>();
candidateObjects.put("{ROOT}:this", V0);
candidateObjects.put("{ROOT}:ih", V1);
candidateObjects.put("{ROOT}:c", V2);
double d = distance(pathConditionHandler, candidateObjects, this.constants, this.classLoader);
if (d == 0.0d)
System.out.println("test0 0 distance");
return d;
}
}
|
[
"48467952+NJUCWL@users.noreply.github.com"
] |
48467952+NJUCWL@users.noreply.github.com
|
f35ad30c98c1c29c3fc731b106d76d793acf79b0
|
02a087e8de0a7d0cfed9dba60e8cff5be4ae3be1
|
/Research_Bucket/Completed_Archived/ConcolicProcess/oracles/Bellon/bellon_benchmark/sourcecode/j2sdk1.4.0-javax-swing/src/text/html/OptionComboBoxModel.java
|
eb0cb3071f129ff864bc1b0cf13aeb1e14620113
|
[] |
no_license
|
dan7800/Research
|
7baf8d5afda9824dc5a53f55c3e73f9734e61d46
|
f68ea72c599f74e88dd44d85503cc672474ec12a
|
refs/heads/master
| 2021-01-23T09:50:47.744309
| 2018-09-01T14:56:01
| 2018-09-01T14:56:01
| 32,521,867
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,267
|
java
|
/*
* @(#)OptionComboBoxModel.java 1.6 01/12/03
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package javax.swing.text.html;
import javax.swing.*;
import javax.swing.event.*;
import java.io.Serializable;
/**
* OptionComboBoxModel extends the capabilities of the DefaultComboBoxModel,
* to store the Option that is initially marked as selected.
* This is stored, in order to enable an accurate reset of the
* ComboBox that represents the SELECT form element when the
* user requests a clear/reset. Given that a combobox only allow
* for one item to be selected, the last OPTION that has the
* attribute set wins.
*
@author Sunita Mani
@version 1.6 12/03/01
*/
class OptionComboBoxModel extends DefaultComboBoxModel implements Serializable {
private Option selectedOption = null;
/**
* Stores the Option that has been marked its
* selected attribute set.
*/
public void setInitialSelection(Option option) {
selectedOption = option; }
/**
* Fetches the Option item that represents that was
* initially set to a selected state.
*/
public Option getInitialSelection() {
return selectedOption; } }
|
[
"dxkvse@rit.edu"
] |
dxkvse@rit.edu
|
0524b12bee0e7ddd78dcb0a39bb922f345a00937
|
db65addba08664383d6ff3424f568b32738b5630
|
/src/main/java/com/era/utilities/excel/rows/KitExcelRow.java
|
d4590f51eaee17fdbd80e3da4ce2eb013cc031db
|
[] |
no_license
|
davidtadeovargas/era_utilities
|
4c4db1ea95bf3863d2257c3a42236ed0b9bf50ea
|
cf76261579f676afe01710d5ae499d57a8e00c75
|
refs/heads/master
| 2023-01-13T05:55:16.407826
| 2020-11-13T23:35:12
| 2020-11-13T23:35:12
| 245,112,906
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,867
|
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 com.era.utilities.excel.rows;
import com.era.utilities.excel.rows.models.KitExcelRowModel;
import org.apache.poi.ss.usermodel.Cell;
import static org.apache.poi.ss.usermodel.Cell.CELL_TYPE_NUMERIC;
import static org.apache.poi.ss.usermodel.Cell.CELL_TYPE_STRING;
/**
*
* @author PC
*/
public class KitExcelRow extends BaseExcelRow {
public KitExcelRow(){
this.OnCell = (int cellNumber, int cellType, Cell Cell, Object RowExcelModel) -> {
KitExcelRowModel KitExcelRowModel;
if(RowExcelModel != null){
KitExcelRowModel = (KitExcelRowModel)RowExcelModel;
}
else{
KitExcelRowModel = new KitExcelRowModel();
}
switch(cellType){
case CELL_TYPE_STRING:
if(cellNumber == 0){
KitExcelRowModel.setKitCode(Cell.getStringCellValue());
}
else if(cellNumber == 1){
KitExcelRowModel.setProductCode(Cell.getStringCellValue());
}
else if(cellNumber == 2){
KitExcelRowModel.setCant(Cell.getStringCellValue());
}
break;
case CELL_TYPE_NUMERIC:
KitExcelRowModel.setCant(String.valueOf(Cell.getNumericCellValue()));
break;
}
return KitExcelRowModel;
};
}
}
|
[
"coritocorito@hotmail.com"
] |
coritocorito@hotmail.com
|
7883c594c7911d972307cee7825ee9464b99f28d
|
cea3fe1ae551bf2f81b431876d15563d6347119b
|
/case 0 All Parent/common-lib/src/main/java/com/gang/study/utils/CommonStringUtils.java
|
b6068187017020c3110dd0e3f46006f5921bd45b
|
[] |
no_license
|
black-ant/case
|
2e33cbd74b559924d3a53092a8b070edea4d143d
|
589598bb41398b330bc29b2ca61757296b55b579
|
refs/heads/master
| 2023-07-31T23:22:51.168312
| 2022-07-24T06:15:53
| 2022-07-24T06:15:53
| 137,761,384
| 86
| 26
| null | 2023-07-17T01:03:21
| 2018-06-18T14:22:01
|
Java
|
UTF-8
|
Java
| false
| false
| 3,287
|
java
|
package com.gang.study.utils;
import com.alibaba.fastjson.JSONObject;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @Classname StringUtils
* @Description TODO
* @Date 2019/12/28 14:10
* @Created by zengzg
*/
public final class CommonStringUtils {
private static Pattern linePattern = Pattern.compile("_(\\w)");
private static Pattern humpPattern = Pattern.compile("[A-Z]");
private CommonStringUtils() {
}
/**
* @param templateBody
* @param jsonObject
* @return
*/
public static String replaceTemplateString(String templateBody, String jsonObject) {
return replaceTemplate(templateBody, JSONObject.parseObject(jsonObject));
}
/**
* @param templateBody
* @param jsonObject
* @return
*/
public static String replaceTemplate(String templateBody, JSONObject jsonObject) {
return JexlUtils.evaluate(templateBody, jsonObject.getInnerMap());
}
/**
* 截取最后一个字符串
*
* @param str
* @param vchar
* @return
*/
public static String lastVarchar(String str, char vchar) {
return str.substring(str.lastIndexOf(vchar) + 1).trim();
}
/**
* desc : 替换为template
*
* @param templateBody
* @param map
* @return
*/
public String replaceTemplate(String templateBody, Map<String, Object> map) {
return JexlUtils.evaluate(templateBody, map);
}
/**
* replace json Type string entity new String
*
* @param url
* @param jsonString
* @return
*/
public static String replaceJSONObjectString(String url, String jsonString) {
return replaceJSONObject(url, JSONObject.parseObject(jsonString));
}
/**
* desc : 替换 JSONObject 中所有的属性
*
* @param url
* @param params
* @return
*/
public static String replaceJSONObject(String url, JSONObject params) {
String newUrl = url;
for (String key : params.keySet()) {
newUrl = org.apache.commons.lang3.StringUtils.replace(newUrl, key, params.getString(key));
}
return newUrl;
}
/**
* 下划线转驼峰
*/
public static String lineToHump(String str) {
str = str.toLowerCase();
Matcher matcher = linePattern.matcher(str);
StringBuffer sb = new StringBuffer();
while (matcher.find()) {
matcher.appendReplacement(sb, matcher.group(1).toUpperCase());
}
matcher.appendTail(sb);
return sb.toString();
}
/**
* 驼峰转下划线(简单写法,效率低于{@link #humpToLine2(String)})
*
* @param str
* @return
*/
public static String humpToLine(String str) {
return str.replaceAll("[A-Z]", "_$0").toLowerCase();
}
/**
* 驼峰转下划线,效率比上面高
*/
public static String humpToLine2(String str) {
Matcher matcher = humpPattern.matcher(str);
StringBuffer sb = new StringBuffer();
while (matcher.find()) {
matcher.appendReplacement(sb, "_" + matcher.group(0).toLowerCase());
}
matcher.appendTail(sb);
return sb.toString();
}
}
|
[
"1016930479@qq.com"
] |
1016930479@qq.com
|
fa01e753e303bfc5d92b738c81f6d458aa6fa817
|
08b8d598fbae8332c1766ab021020928aeb08872
|
/src/gcom/gui/atendimentopublico/ordemservico/AutorizarServicoAssociadoHelper.java
|
44ef4f472038011e4803a31e4a5af18dcc16d689
|
[] |
no_license
|
Procenge/GSAN-CAGEPA
|
53bf9bab01ae8116d08cfee7f0044d3be6f2de07
|
dfe64f3088a1357d2381e9f4280011d1da299433
|
refs/heads/master
| 2020-05-18T17:24:51.407985
| 2015-05-18T23:08:21
| 2015-05-18T23:08:21
| 25,368,185
| 3
| 1
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 6,665
|
java
|
/*
* Copyright (C) 2007-2007 the GSAN – Sistema Integrado de Gestão de Serviços de Saneamento
*
* This file is part of GSAN, an integrated service management system for Sanitation
*
* GSAN 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 2 of the License.
*
* GSAN 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, write to the Free Software
* Foundation, Inc., 59 Temple Place – Suite 330, Boston, MA 02111-1307, USA
*/
/*
* GSAN – Sistema Integrado de Gestão de Serviços de Saneamento
* Copyright (C) <2007>
*
* GSANPCG
* André Nishimura
* Eduardo Henrique Bandeira Carneiro da Silva
* José Gilberto de França Matos
* Saulo Vasconcelos de Lima
* Virginia Santos de Melo
*
* Este programa é software livre; você pode redistribuí-lo e/ou
* modificá-lo sob os termos de Licença Pública Geral GNU, conforme
* publicada pela Free Software Foundation; versão 2 da Licença.
* Este programa é distribuído na expectativa de ser útil, mas SEM
* QUALQUER GARANTIA; sem mesmo a garantia implícita de
* COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM
* PARTICULAR.
* Consulte a Licença Pública Geral GNU para obter mais detalhes.
* Você deve ter recebido uma cópia da Licença Pública Geral GNU
* junto com este programa; se não, escreva para Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
package gcom.gui.atendimentopublico.ordemservico;
import gcom.atendimentopublico.ordemservico.bean.OSEncerramentoHelper;
import gcom.atendimentopublico.ordemservico.bean.ServicoAssociadoAutorizacaoHelper;
import java.util.List;
import java.util.Map;
/**
* Helper utilizado para manter os dados de autorização das Ordens de Serviço Associadas.
*
* @author Virgínia Melo
*/
public class AutorizarServicoAssociadoHelper {
private String caminhoAutorizacao;
private String caminhoRetorno;
private Map<String, Object> parametrosCaminhoRetorno;
private Map<String, Object> parametrosCaminhoAutorizacao;
private List<ServicoAssociadoAutorizacaoHelper> servicosParaAutorizacao;
private Map<Integer, ServicoAssociadoAutorizacaoHelper> mapServicosAutorizados;
private Map<Integer, OSEncerramentoHelper> mapaServicosAssociadosEncerrados;
public AutorizarServicoAssociadoHelper() {
super();
}
/**
* @param caminhoAutorizacao
* @param caminhoRetorno
* @param parametrosCaminhoRetorno
* @param parametrosCaminhoAutorizacao
* @param servicosParaAutorizacao
* @param mapServicosAutorizados
* @param mapaServicosAssociadosEncerrados
*/
private AutorizarServicoAssociadoHelper(String caminhoAutorizacao, String caminhoRetorno, Map<String, Object> parametrosCaminhoRetorno,
Map<String, Object> parametrosCaminhoAutorizacao,
List<ServicoAssociadoAutorizacaoHelper> servicosParaAutorizacao,
Map<Integer, ServicoAssociadoAutorizacaoHelper> mapServicosAutorizados,
Map<Integer, OSEncerramentoHelper> mapaServicosAssociadosEncerrados) {
super();
this.caminhoAutorizacao = caminhoAutorizacao;
this.caminhoRetorno = caminhoRetorno;
this.parametrosCaminhoRetorno = parametrosCaminhoRetorno;
this.parametrosCaminhoAutorizacao = parametrosCaminhoAutorizacao;
this.servicosParaAutorizacao = servicosParaAutorizacao;
this.mapServicosAutorizados = mapServicosAutorizados;
this.mapaServicosAssociadosEncerrados = mapaServicosAssociadosEncerrados;
}
/**
* @return the caminhoAutorizacao
*/
public String getCaminhoAutorizacao(){
return caminhoAutorizacao;
}
/**
* @param caminhoAutorizacao
* the caminhoAutorizacao to set
*/
public void setCaminhoAutorizacao(String caminhoAutorizacao){
this.caminhoAutorizacao = caminhoAutorizacao;
}
/**
* @return the caminhoRetorno
*/
public String getCaminhoRetorno(){
return caminhoRetorno;
}
/**
* @param caminhoRetorno
* the caminhoRetorno to set
*/
public void setCaminhoRetorno(String caminhoRetorno){
this.caminhoRetorno = caminhoRetorno;
}
/**
* @return the parametrosCaminhoRetorno
*/
public Map<String, Object> getParametrosCaminhoRetorno(){
return parametrosCaminhoRetorno;
}
/**
* @param parametrosCaminhoRetorno
* the parametrosCaminhoRetorno to set
*/
public void setParametrosCaminhoRetorno(Map<String, Object> parametrosCaminhoRetorno){
this.parametrosCaminhoRetorno = parametrosCaminhoRetorno;
}
/**
* @return the parametrosCaminhoAutorizacao
*/
public Map<String, Object> getParametrosCaminhoAutorizacao(){
return parametrosCaminhoAutorizacao;
}
/**
* @param parametrosCaminhoAutorizacao
* the parametrosCaminhoAutorizacao to set
*/
public void setParametrosCaminhoAutorizacao(Map<String, Object> parametrosCaminhoAutorizacao){
this.parametrosCaminhoAutorizacao = parametrosCaminhoAutorizacao;
}
/**
* @return the servicosParaAutorizacao
*/
public List<ServicoAssociadoAutorizacaoHelper> getServicosParaAutorizacao(){
return servicosParaAutorizacao;
}
/**
* @param servicosParaAutorizacao
* the servicosParaAutorizacao to set
*/
public void setServicosParaAutorizacao(List<ServicoAssociadoAutorizacaoHelper> servicosParaAutorizacao){
this.servicosParaAutorizacao = servicosParaAutorizacao;
}
/**
* @return the mapServicosAutorizados
*/
public Map<Integer, ServicoAssociadoAutorizacaoHelper> getMapServicosAutorizados(){
return mapServicosAutorizados;
}
/**
* @param mapServicosAutorizados
* the mapServicosAutorizados to set
*/
public void setMapServicosAutorizados(Map<Integer, ServicoAssociadoAutorizacaoHelper> mapServicosAutorizados){
this.mapServicosAutorizados = mapServicosAutorizados;
}
/**
* @return the mapaServicosAssociadosEncerrados
*/
public Map<Integer, OSEncerramentoHelper> getMapaServicosAssociadosEncerrados(){
return mapaServicosAssociadosEncerrados;
}
/**
* @param mapaServicosAssociadosEncerrados
* the mapaServicosAssociadosEncerrados to set
*/
public void setMapaServicosAssociadosEncerrados(Map<Integer, OSEncerramentoHelper> mapaServicosAssociadosEncerrados){
this.mapaServicosAssociadosEncerrados = mapaServicosAssociadosEncerrados;
}
}
|
[
"Yara.Souza@procenge.com.br"
] |
Yara.Souza@procenge.com.br
|
de5b17a4815d6d4fd94e284c84ed3c41742a0cc0
|
17079fa276050a5a7b5994d7fae541d7d0cfa3b3
|
/yxw-stats/src/main/java/com/yxw/task/collect/RedisTestCollector.java
|
85e6a6b0dba46664813ee1c78c4788d54c6fb83a
|
[] |
no_license
|
zhiji6/yxw
|
664f6729b6642affb8ff1ee258b915f8d1ccf666
|
7f75370fcd425cda11faf3d2c54e6119ecc7d9fd
|
refs/heads/master
| 2023-08-17T00:12:03.150081
| 2019-12-04T07:33:45
| 2019-12-04T07:33:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,215
|
java
|
package com.yxw.task.collect;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.FutureTask;
import java.util.concurrent.TimeUnit;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.Lists;
import com.yxw.framework.cache.redis.RedisService;
import com.yxw.framework.common.spring.ext.SpringContextHolder;
import com.yxw.framework.common.threadpool.SimpleThreadFactory;
import com.yxw.task.callable.RedisTestCollectCall;
import com.yxw.task.manager.User;
public class RedisTestCollector {
public static Logger logger = LoggerFactory.getLogger(RedisTestCollector.class);
private RedisService redisSvc = SpringContextHolder.getBean(RedisService.class);
public void start() {
// 根据采集的机器配置得出默认的线程数
int threadNum = 2;
List<User> results = Lists.newArrayList();
for (int i = 0; i < 100; i++) {
User user = new User();
user.setId(UUID.randomUUID().toString());
user.setName(user.getId() + i);
user.setAge(String.valueOf(new Random().nextInt(100)));
user.setSexy(String.valueOf(new Random().nextInt(2)));
user.setMobile(getMobile(11));
user.setAddress(UUID.randomUUID().toString());
results.add(user);
}
if (CollectionUtils.isNotEmpty(results)) {
if (threadNum > 0) {
//设置线程池的数量
ExecutorService collectExec = Executors.newFixedThreadPool(threadNum, new SimpleThreadFactory("redisTest"));
List<FutureTask<String>> taskList = new ArrayList<FutureTask<String>>();
for (User user : results) {
RedisTestCollectCall collectCall = new RedisTestCollectCall(redisSvc, user);
// 创建每条指令的采集任务对象
FutureTask<String> collectTask = new FutureTask<String>(collectCall);
// 添加到list,方便后面取得结果
taskList.add(collectTask);
// 提交给线程池 exec.submit(task);
collectExec.submit(collectTask);
}
// 阻塞主线程,等待采集所有子线程结束,获取所有子线程的执行结果,get方法阻塞主线程,再继续执行主线程逻辑
List<String> records = new ArrayList<String>();
try {
for (FutureTask<String> taskF : taskList) {
// 防止某个子线程查询时间过长 超过默认时间没有拿到抛出异常
String collectData = taskF.get(Long.MAX_VALUE, TimeUnit.DAYS);
if (collectData != null) {
if (!StringUtils.isEmpty(collectData)) {
}
}
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// 处理完毕,关闭线程池,这个不能在获取子线程结果之前关闭,因为如果线程多的话,执行中的可能被打断
collectExec.shutdown();
}
}
}
public static String getMobile(int count) {
StringBuffer sb = new StringBuffer();
Random r = new Random();
for (int i = 0; i < count; i++) {
int num = r.nextInt(10);
sb.append(num);
}
return sb.toString();
}
}
|
[
"279430985@qq.com"
] |
279430985@qq.com
|
8b9ca5bd6d4d56d02141218379cea9caa4da0b8f
|
4d41728f620d6be9916b3c8446da9e01da93fa4c
|
/src/main/java/org/bukkit/material/PistonExtensionMaterial.java
|
d491753d311f0281be1b580b69d842f9c53d24a2
|
[] |
no_license
|
TechCatOther/um_bukkit
|
a634f6ccf7142b2103a528bba1c82843c0bc4e44
|
836ed7a890b2cb04cd7847eff2c59d7a2f6d4d7b
|
refs/heads/master
| 2020-03-22T03:13:57.898936
| 2018-07-02T09:20:00
| 2018-07-02T09:20:00
| 139,420,415
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,014
|
java
|
package org.bukkit.material;
import org.bukkit.Material;
import org.bukkit.block.BlockFace;
/**
* Material data for the piston extension block
*/
public class PistonExtensionMaterial extends MaterialData implements Attachable
{
/**
* @deprecated Magic value
*/
@Deprecated
public PistonExtensionMaterial(final int type)
{
super(type);
}
public PistonExtensionMaterial(final Material type)
{
super(type);
}
/**
* @deprecated Magic value
*/
@Deprecated
public PistonExtensionMaterial(final int type, final byte data)
{
super(type, data);
}
/**
* @deprecated Magic value
*/
@Deprecated
public PistonExtensionMaterial(final Material type, final byte data)
{
super(type, data);
}
public void setFacingDirection(BlockFace face)
{
byte data = (byte) (getData() & 0x8);
switch(face)
{
case UP:
data |= 1;
break;
case NORTH:
data |= 2;
break;
case SOUTH:
data |= 3;
break;
case WEST:
data |= 4;
break;
case EAST:
data |= 5;
break;
}
setData(data);
}
public BlockFace getFacing()
{
byte dir = (byte) (getData() & 7);
switch(dir)
{
case 0:
return BlockFace.DOWN;
case 1:
return BlockFace.UP;
case 2:
return BlockFace.NORTH;
case 3:
return BlockFace.SOUTH;
case 4:
return BlockFace.WEST;
case 5:
return BlockFace.EAST;
default:
return BlockFace.SELF;
}
}
/**
* Checks if this piston extension is sticky, and returns true if so
*
* @return true if this piston is "sticky", or false
*/
public boolean isSticky()
{
return (getData() & 8) == 8;
}
/**
* Sets whether or not this extension is sticky
*
* @param sticky true if sticky, otherwise false
*/
public void setSticky(boolean sticky)
{
setData((byte) (sticky ? (getData() | 0x8) : (getData() & ~0x8)));
}
public BlockFace getAttachedFace()
{
return getFacing().getOppositeFace();
}
@Override
public PistonExtensionMaterial clone()
{
return (PistonExtensionMaterial) super.clone();
}
}
|
[
"alone.inbox@gmail.com"
] |
alone.inbox@gmail.com
|
0745f840f6a42de637486f5454d029c38df34aaa
|
fcfcfccc2db5cc08c2e634c0bdd055fe1fd2699c
|
/log/pyx-log-gwt/src/main/java/com/pyx4j/log4gwt/client/AppenderFirebug.java
|
0968a461abf5cfdc029f0913b347ddc2f5de53cc
|
[] |
no_license
|
michaellif/pyx4j
|
45ae006e8785e5a245a619ad9b43d5c9946a86d4
|
cc8699d5d70ba618ec812b963e338d4bbe39df20
|
refs/heads/master
| 2020-03-26T06:10:36.655951
| 2016-04-29T05:25:25
| 2016-04-29T05:25:25
| 144,593,106
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,773
|
java
|
/*
* Pyx4j framework
* Copyright (C) 2008-2010 pyx4j.com.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*
* Created on Apr 24, 2009
* @author vlads
*/
package com.pyx4j.log4gwt.client;
import com.pyx4j.log4gwt.shared.LogEvent;
public class AppenderFirebug implements Appender {
public static boolean isSupported() {
return supported();
}
public AppenderFirebug() {
}
@Override
public String getAppenderName() {
return "firebug";
}
@Override
public void doAppend(LogEvent event) {
try {
switch (event.getLevel()) {
case ERROR:
error(LogFormatter.format(event, LogFormatter.FormatStyle.LINE));
break;
case WARN:
warn(LogFormatter.format(event, LogFormatter.FormatStyle.LINE));
break;
case INFO:
info(LogFormatter.format(event, LogFormatter.FormatStyle.LINE));
break;
case TRACE:
case DEBUG:
debug(LogFormatter.format(event, LogFormatter.FormatStyle.LINE));
break;
}
} catch (Throwable e) {
// Happens when navigating away to different module.
if (supported()) {
throw new Error(e);
}
}
}
private static native boolean supported() /*-{
return $wnd.console != null && $wnd.console.firebug != null;
}-*/;
private native void debug(String message) /*-{
$wnd.console.debug(message);
}-*/;
private native void info(String message) /*-{
$wnd.console.info(message);
}-*/;
private native void warn(String message) /*-{
$wnd.console.warn(message);
}-*/;
private native void error(String message) /*-{
$wnd.console.error(message);
}-*/;
}
|
[
"vlads@propertyvista.com"
] |
vlads@propertyvista.com
|
bfcdcdb79cd080dfc975c949e1b14e7916449179
|
e4b363f3d0cc837aef9a8a0f24bda39e8a2309ab
|
/src/main/java/com/alam/tokokitagate/service/util/RandomUtil.java
|
6fb8c5e3c47fdc53282f2032bd59786bf0139fd0
|
[] |
no_license
|
rizkiisroi/tokoKitaGate
|
8200b3b65e84820ce81aac32f0e4290691af4839
|
48145a43af37a460f901245022162f24feaaebad
|
refs/heads/master
| 2022-12-21T13:05:15.408025
| 2019-11-11T02:50:35
| 2019-11-11T02:50:35
| 220,888,202
| 0
| 0
| null | 2022-12-16T04:41:45
| 2019-11-11T02:50:21
|
Java
|
UTF-8
|
Java
| false
| false
| 1,231
|
java
|
package com.alam.tokokitagate.service.util;
import org.apache.commons.lang3.RandomStringUtils;
import java.security.SecureRandom;
/**
* Utility class for generating random Strings.
*/
public final class RandomUtil {
private static final int DEF_COUNT = 20;
private static final SecureRandom SECURE_RANDOM;
static {
SECURE_RANDOM = new SecureRandom();
SECURE_RANDOM.nextBytes(new byte[64]);
}
private RandomUtil() {
}
private static String generateRandomAlphanumericString() {
return RandomStringUtils.random(DEF_COUNT, 0, 0, true, true, null, SECURE_RANDOM);
}
/**
* Generate a password.
*
* @return the generated password.
*/
public static String generatePassword() {
return generateRandomAlphanumericString();
}
/**
* Generate an activation key.
*
* @return the generated activation key.
*/
public static String generateActivationKey() {
return generateRandomAlphanumericString();
}
/**
* Generate a reset key.
*
* @return the generated reset key.
*/
public static String generateResetKey() {
return generateRandomAlphanumericString();
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
658ffb614781aa0cd2e21e4f5ffd5568fc52479a
|
541c2d6c2f5f4338147ae78802232171785898a6
|
/src/main/java/org/docksidestage/dbflute/bsbhv/loader/LoaderOfProduct.java
|
e27ced49203ec2cada68f62603bcd46360993630
|
[
"Apache-2.0"
] |
permissive
|
lastaflute/lastaflute-example-paradeplaza
|
10082eebd8bcbccf64be12f777e31ba84492f010
|
05b8b0c79376a51b58b50cc8106f9c40708db3f3
|
refs/heads/master
| 2020-04-02T05:03:54.568333
| 2018-11-29T21:20:53
| 2018-11-29T21:20:53
| 154,050,759
| 0
| 1
|
Apache-2.0
| 2018-10-28T15:45:00
| 2018-10-21T20:47:14
|
Java
|
UTF-8
|
Java
| false
| false
| 6,686
|
java
|
/*
* Copyright 2015-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 org.docksidestage.dbflute.bsbhv.loader;
import java.util.List;
import org.dbflute.bhv.*;
import org.dbflute.bhv.referrer.*;
import org.docksidestage.dbflute.exbhv.*;
import org.docksidestage.dbflute.exentity.*;
import org.docksidestage.dbflute.cbean.*;
/**
* The referrer loader of (商品)PRODUCT as TABLE. <br>
* <pre>
* [primary key]
* PRODUCT_ID
*
* [column]
* PRODUCT_ID, PRODUCT_NAME, PRODUCT_HANDLE_CODE, PRODUCT_CATEGORY_CODE, PRODUCT_STATUS_CODE, REGULAR_PRICE, REGISTER_DATETIME, REGISTER_USER, UPDATE_DATETIME, UPDATE_USER, VERSION_NO
*
* [sequence]
*
*
* [identity]
* PRODUCT_ID
*
* [version-no]
* VERSION_NO
*
* [foreign table]
* PRODUCT_CATEGORY, PRODUCT_STATUS
*
* [referrer table]
* PURCHASE
*
* [foreign property]
* productCategory, productStatus
*
* [referrer property]
* purchaseList
* </pre>
* @author DBFlute(AutoGenerator)
*/
public class LoaderOfProduct {
// ===================================================================================
// Attribute
// =========
protected List<Product> _selectedList;
protected BehaviorSelector _selector;
protected ProductBhv _myBhv; // lazy-loaded
// ===================================================================================
// Ready for Loading
// =================
public LoaderOfProduct ready(List<Product> selectedList, BehaviorSelector selector)
{ _selectedList = selectedList; _selector = selector; return this; }
protected ProductBhv myBhv()
{ if (_myBhv != null) { return _myBhv; } else { _myBhv = _selector.select(ProductBhv.class); return _myBhv; } }
// ===================================================================================
// Load Referrer
// =============
protected List<Purchase> _referrerPurchase;
/**
* Load referrer of purchaseList by the set-upper of referrer. <br>
* (購入)PURCHASE by PRODUCT_ID, named 'purchaseList'.
* <pre>
* <span style="color: #0000C0">productBhv</span>.<span style="color: #994747">load</span>(<span style="color: #553000">productList</span>, <span style="color: #553000">productLoader</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">productLoader</span>.<span style="color: #CC4747">loadPurchase</span>(<span style="color: #553000">purchaseCB</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">purchaseCB</span>.setupSelect...
* <span style="color: #553000">purchaseCB</span>.query().set...
* <span style="color: #553000">purchaseCB</span>.query().addOrderBy...
* }); <span style="color: #3F7E5E">// you can load nested referrer from here</span>
* <span style="color: #3F7E5E">//}).withNestedReferrer(<span style="color: #553000">purchaseLoader</span> -> {</span>
* <span style="color: #3F7E5E">// purchaseLoader.load...</span>
* <span style="color: #3F7E5E">//});</span>
* });
* for (Product product : <span style="color: #553000">productList</span>) {
* ... = product.<span style="color: #CC4747">getPurchaseList()</span>;
* }
* </pre>
* About internal policy, the value of primary key (and others too) is treated as case-insensitive. <br>
* The condition-bean, which the set-upper provides, has settings before callback as follows:
* <pre>
* cb.query().setProductId_InScope(pkList);
* cb.query().addOrderBy_ProductId_Asc();
* </pre>
* @param refCBLambda The callback to set up referrer condition-bean for loading referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
*/
public NestedReferrerLoaderGateway<LoaderOfPurchase> loadPurchase(ReferrerConditionSetupper<PurchaseCB> refCBLambda) {
myBhv().loadPurchase(_selectedList, refCBLambda).withNestedReferrer(refLs -> _referrerPurchase = refLs);
return hd -> hd.handle(new LoaderOfPurchase().ready(_referrerPurchase, _selector));
}
// ===================================================================================
// Pull out Foreign
// ================
protected LoaderOfProductCategory _foreignProductCategoryLoader;
public LoaderOfProductCategory pulloutProductCategory() {
if (_foreignProductCategoryLoader == null)
{ _foreignProductCategoryLoader = new LoaderOfProductCategory().ready(myBhv().pulloutProductCategory(_selectedList), _selector); }
return _foreignProductCategoryLoader;
}
protected LoaderOfProductStatus _foreignProductStatusLoader;
public LoaderOfProductStatus pulloutProductStatus() {
if (_foreignProductStatusLoader == null)
{ _foreignProductStatusLoader = new LoaderOfProductStatus().ready(myBhv().pulloutProductStatus(_selectedList), _selector); }
return _foreignProductStatusLoader;
}
// ===================================================================================
// Accessor
// ========
public List<Product> getSelectedList() { return _selectedList; }
public BehaviorSelector getSelector() { return _selector; }
}
|
[
"dbflute@gmail.com"
] |
dbflute@gmail.com
|
149397028a28b278d55d28ba50c6a0c74f04867f
|
d4d59d2528493451e1e352b39af097d13e88ce14
|
/plugins/org.emftext.term.propositional.expression.resource.expression/src-gen/org/emftext/term/propositional/expression/resource/expression/debug/ExpressionSourceLocator.java
|
d8740379f8ad6e2be622cd94b08c71f2c67a3a3a
|
[] |
no_license
|
extFM/extFM-Tooling
|
19daf7ba1b454c471700e9f1e050283d85c5aebd
|
46d6d261234c4a34e7d3f0150b2ac6d388f531d3
|
refs/heads/master
| 2021-03-12T21:18:36.828945
| 2014-02-03T17:56:53
| 2014-02-03T17:56:53
| 5,505,989
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 273
|
java
|
/**
* <copyright>
* </copyright>
*
*
*/
package org.emftext.term.propositional.expression.resource.expression.debug;
public class ExpressionSourceLocator {
// The generator for this class is currently disabled by option
// 'disableDebugSupport' in the .cs file.
}
|
[
"julia.schroeter@sap.com"
] |
julia.schroeter@sap.com
|
0aab43e3ffb417045781aa893606d7a52f59272c
|
8506f836b7e3ccf4ff8b487d9c14c2892b53e625
|
/service/src/main/java/com/rishiqing/common/exception/RsqUpdateNotExistsException.java
|
1cd2b23acf701bdc089cfbe22a13c4897a39f040
|
[] |
no_license
|
ZhaoYu1105/qywx-isv-access
|
b21150b738e86111d4225e43ce0bcfde49d85627
|
ef73ffe4d0f57b4391ebd003e819ba488f9a7326
|
refs/heads/master
| 2021-01-03T05:48:58.984112
| 2019-02-19T09:28:02
| 2019-02-19T09:28:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 728
|
java
|
package com.rishiqing.common.exception;
public class RsqUpdateNotExistsException extends RuntimeException {
private long errcode;
private String errmsg;
public RsqUpdateNotExistsException() {
super();
}
public RsqUpdateNotExistsException(String message) {
super(message);
}
public RsqUpdateNotExistsException(String message, Throwable cause) {
super(message, cause);
}
public RsqUpdateNotExistsException(Throwable cause) {
super(cause);
}
protected RsqUpdateNotExistsException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}
|
[
"maowenqiang0752@163.com"
] |
maowenqiang0752@163.com
|
9e4f6b7364f7880e31969b50d7350515a64f3101
|
f5434bd02b3ccfd3a7cf5d53cbfdf8ed2979cc2f
|
/java/N-Series/DynamicProgramming/WordBreak.java
|
98dfa2a78f94b0d5bfeae9d7f6b73d0bb5c6de68
|
[] |
no_license
|
WChCh/my-algorithm-training
|
9d3fa2d7780765f6c6414dba583fdf4557db8fc1
|
808304bcac5fe7330b5dddfcd41ccbad013f8ccd
|
refs/heads/master
| 2021-05-07T15:57:06.761804
| 2017-09-18T11:17:41
| 2017-09-18T11:17:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,734
|
java
|
/**
* Given a string s and a dictionary of words dict,
* determine if s can be break into a space-separated sequence of one or more dictionary words.
* Example
* Given s = "lintcode", dict = ["lint", "code"].
* Return true because "lintcode" can be break as "lint code".
*
*
*
*/
package chapter5;
import java.util.HashSet;
import java.util.Set;
public class WordBreak {
public boolean wordBreak(String s, Set<String> dict) {
// write your code here
if ((s.length() == 0 || s == null) &&(dict == null || dict.size() == 0)){
return true;
}
int maxLength = getdictMaxLength(dict);
boolean[] f = new boolean[s.length() + 1];
f[0] = true;
for (int i = 1; i <= s.length();i++) {
f[i] = false;
for (int lastmaxlength = 1; lastmaxlength <= maxLength && lastmaxlength <= i; lastmaxlength++) {
if(!f[i - lastmaxlength]){
continue;
}
String sub = s.substring(i - lastmaxlength,i);
if(dict.contains(sub)){
f[i] = true;
break;
}
}
}
return f[s.length()];
}
private int getdictMaxLength(Set<String> dict) {
int maxLength = 0;
for (String str : dict){
maxLength = Math.max(maxLength , str.length());
}
return maxLength;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
String s = "luckylau";
Set<String> dict = new HashSet<String>();
dict.add("lucky");
dict.add("lau");
WordBreak wordBreak = new WordBreak();
System.out.println(wordBreak.wordBreak(s, dict));
}
}
|
[
"laujunbupt0203@163.com"
] |
laujunbupt0203@163.com
|
64bb6e19d439a629820d29cff4227035449b5b2c
|
ecf7974f2a63ae7a04e0c13f794384252bc08aa7
|
/src/com/excellentsystem/TokoEmasPadi/View/Dialog/PengaturanUmumController.java
|
c7d7148f541772cf4ad94267e7e4010301f25617
|
[] |
no_license
|
vonn89/TokoEmasPadi
|
b49fefd5bc24868e09ef59e890ab3d8b24b747e7
|
e4de7e9a0aaaab66c513af31eb5e64ce2ef26062
|
refs/heads/master
| 2023-02-27T16:37:54.977270
| 2021-01-31T12:39:28
| 2021-01-31T12:39:28
| 334,651,982
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,294
|
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 com.excellentsystem.TokoEmasPadi.View.Dialog;
import com.excellentsystem.TokoEmasPadi.DAO.SistemDAO;
import com.excellentsystem.TokoEmasPadi.Koneksi;
import com.excellentsystem.TokoEmasPadi.Main;
import static com.excellentsystem.TokoEmasPadi.Main.ipServer;
import static com.excellentsystem.TokoEmasPadi.Main.sistem;
import com.excellentsystem.TokoEmasPadi.Model.Sistem;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.sql.Connection;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.TextField;
import javafx.stage.FileChooser;
import javafx.stage.Modality;
import javafx.stage.Stage;
/**
* FXML Controller class
*
* @author Xtreme
*/
public class PengaturanUmumController {
@FXML private TextField namaField;
@FXML private TextField alamatField;
@FXML private TextField kotaField;
@FXML private TextField noTelpField;
@FXML private TextField emailField;
@FXML private TextField prefixBarcodeField;
@FXML private TextField serverField;
@FXML private TextField printerPenjualanField;
@FXML private TextField printerGadaiField;
@FXML private TextField printerBarcodeField;
private Main mainApp;
private Stage stage;
public void setMainApp(Main mainApp, Stage stage) {
this.mainApp = mainApp;
this.stage = stage;
setDataPerusahaan();
}
@FXML
private void setDataPerusahaan(){
try{
namaField.setText(sistem.getNama());
alamatField.setText(sistem.getAlamat());
kotaField.setText(sistem.getKota());
noTelpField.setText(sistem.getNoTelp());
emailField.setText(sistem.getWebsite());
prefixBarcodeField.setText(sistem.getCode());
BufferedReader in = new BufferedReader(new FileReader("koneksi.txt"));
String ipServer = in.readLine();
String printerPenjualan = in.readLine();
String printerGadai = in.readLine();
String printerBarcode = in.readLine();
serverField.setText(ipServer);
printerPenjualanField.setText(printerPenjualan);
printerGadaiField.setText(printerGadai);
printerBarcodeField.setText(printerBarcode);
}catch(Exception e){
mainApp.showMessage(Modality.NONE, "Error", e.toString());
}
}
@FXML
private void cancel(){
stage.close();
}
@FXML
private void backup(){
try {
FileChooser fileChooser = new FileChooser();
fileChooser.setTitle("Select location to backup");
fileChooser.setInitialFileName("Backup database - "+sistem.getTglSystem());
fileChooser.getExtensionFilters().addAll(new FileChooser.ExtensionFilter("zip file", "*.zip"));
File backupfile = fileChooser.showSaveDialog(stage);
File file = new File("temp.sql");
String executeCmd = "mysqldump --host "+ipServer+" -P 3306 "
+ " -u admin -pexcellentsystem tokoemaspadi -r \"" + file.getPath()+"\"";
System.out.println(executeCmd);
Process runtimeProcess = Runtime.getRuntime().exec(executeCmd);
int processComplete = runtimeProcess.waitFor();
if (processComplete == 0) {
FileOutputStream fos = new FileOutputStream(backupfile.getPath());
ZipOutputStream zipOut = new ZipOutputStream(fos);
FileInputStream fis = new FileInputStream(file);
ZipEntry zipEntry = new ZipEntry(file.getName());
zipOut.putNextEntry(zipEntry);
final byte[] bytes = new byte[1024];
int length;
while((length = fis.read(bytes)) >= 0) {
zipOut.write(bytes, 0, length);
}
zipOut.close();
fis.close();
fos.close();
file.delete();
mainApp.showMessage(Modality.NONE, "Success", "Backup database berhasil");
} else {
mainApp.showMessage(Modality.NONE, "Success", "Backup database gagal");
}
} catch (Exception ex) {
mainApp.showMessage(Modality.NONE, "Error", ex.toString());
}
}
@FXML
private void restore(){
}
@FXML
private void saveDataPerusahaan(){
try(Connection con = Koneksi.getConnection()){
Sistem sistem = Main.sistem;
sistem.setNama(namaField.getText());
sistem.setAlamat(alamatField.getText());
sistem.setKota(kotaField.getText());
sistem.setNoTelp(noTelpField.getText());
sistem.setWebsite(emailField.getText());
sistem.setCode(prefixBarcodeField.getText());
try (BufferedWriter out = new BufferedWriter(new FileWriter("koneksi.txt"))) {
out.write(serverField.getText());
out.newLine();
out.write(printerPenjualanField.getText());
out.newLine();
out.write(printerGadaiField.getText());
out.newLine();
out.write(printerBarcodeField.getText());
}
SistemDAO.update(con, sistem);
MessageController controller = mainApp.showMessage(Modality.APPLICATION_MODAL, "Confirmation",
"Setting baru berhasil disimpan,\nto take effect please restart program");
controller.OK.setOnAction((ActionEvent event) -> {
try{
mainApp.MainStage.close();
mainApp.start(new Stage());
}catch(Exception e){
System.exit(0);
}
});
}catch(Exception e){
mainApp.showMessage(Modality.NONE, "Error", e.toString());
}
}
}
|
[
"vonn89@gmail.com"
] |
vonn89@gmail.com
|
e877c9ea60286c0dde311ed62b28860f93b3b2ac
|
ab2a601f3703b5555c364ed4157040036568936b
|
/core/src/com/perl5/lang/perl/idea/run/debugger/PerlDebuggerProgramRunner.java
|
0c86fce6db45660ca37b6723d963cfb6c7334885
|
[
"Apache-2.0"
] |
permissive
|
ikenox/Perl5-IDEA
|
72aa2d8b622004654d6f0e9a078e5a08b617181c
|
f37df01dde8558a44beadcbc2066e8debe33ce64
|
refs/heads/master
| 2022-01-17T12:57:19.096014
| 2019-04-21T18:58:42
| 2019-04-21T18:58:42
| 148,667,285
| 0
| 0
|
NOASSERTION
| 2018-12-11T14:11:27
| 2018-09-13T16:35:53
|
Java
|
UTF-8
|
Java
| false
| false
| 2,524
|
java
|
/*
* Copyright 2015-2018 Alexandr Evstigneev
*
* 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.perl5.lang.perl.idea.run.debugger;
import com.intellij.execution.ExecutionException;
import com.intellij.execution.configurations.RunProfile;
import com.intellij.execution.configurations.RunProfileState;
import com.intellij.execution.executors.DefaultDebugExecutor;
import com.intellij.execution.runners.DefaultProgramRunner;
import com.intellij.execution.runners.ExecutionEnvironment;
import com.intellij.execution.ui.RunContentDescriptor;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.xdebugger.XDebugProcess;
import com.intellij.xdebugger.XDebugProcessStarter;
import com.intellij.xdebugger.XDebugSession;
import com.intellij.xdebugger.XDebuggerManager;
import org.jetbrains.annotations.NotNull;
/**
* Created by hurricup on 04.05.2016.
*/
public class PerlDebuggerProgramRunner extends DefaultProgramRunner {
@NotNull
@Override
public String getRunnerId() {
return "Perl Debugger";
}
@Override
public boolean canRun(@NotNull String executorId, @NotNull RunProfile profile) {
return executorId.equals(DefaultDebugExecutor.EXECUTOR_ID) && profile instanceof PerlDebuggableRunConfiguration;
}
@Override
protected RunContentDescriptor doExecute(@NotNull final RunProfileState state, @NotNull final ExecutionEnvironment env)
throws ExecutionException {
FileDocumentManager.getInstance().saveAllDocuments();
XDebugSession xDebugSession = XDebuggerManager.getInstance(env.getProject()).startSession(env, new XDebugProcessStarter() {
@NotNull
@Override
public XDebugProcess start(@NotNull XDebugSession session) throws ExecutionException {
return ((PerlDebuggableRunConfiguration)env.getRunProfile())
.createDebugProcess(((PerlDebuggableRunConfiguration)env.getRunProfile()).computeDebugAddress(null), session, null, env);
}
});
return xDebugSession.getRunContentDescriptor();
}
}
|
[
"hurricup@gmail.com"
] |
hurricup@gmail.com
|
7d8a05e7d37413343eb8bf56fe21e45f5c0c7b04
|
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
|
/large/third-party/other/external-module-0929/src/java/external_module_0929/a/IFoo0.java
|
28b68b87af9e623675a5a7909f656840f76f5234
|
[
"BSD-3-Clause"
] |
permissive
|
salesforce/bazel-ls-demo-project
|
5cc6ef749d65d6626080f3a94239b6a509ef145a
|
948ed278f87338edd7e40af68b8690ae4f73ebf0
|
refs/heads/master
| 2023-06-24T08:06:06.084651
| 2023-03-14T11:54:29
| 2023-03-14T11:54:29
| 241,489,944
| 0
| 5
|
BSD-3-Clause
| 2023-03-27T11:28:14
| 2020-02-18T23:30:47
|
Java
|
UTF-8
|
Java
| false
| false
| 852
|
java
|
package external_module_0929.a;
import java.util.logging.*;
import java.util.zip.*;
import javax.annotation.processing.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see javax.net.ssl.ExtendedSSLSession
* @see javax.rmi.ssl.SslRMIClientSocketFactory
* @see java.awt.datatransfer.DataFlavor
*/
@SuppressWarnings("all")
public interface IFoo0<U> extends java.util.concurrent.Callable<U> {
java.beans.beancontext.BeanContext f0 = null;
java.io.File f1 = null;
java.rmi.Remote f2 = null;
String getName();
void setName(String s);
U get();
void set(U e);
}
|
[
"gwagenknecht@salesforce.com"
] |
gwagenknecht@salesforce.com
|
7ac38200ae5560f8fe1a8e900e31541be749f106
|
937169c7c2e1b003a853421c9bae90fedf23d246
|
/violin-test/src/main/java/com/wolf/test/redis/inaction/Chapter04.java
|
1c3206263e8275bede8369ef07164143bf7b1b36
|
[
"Apache-2.0"
] |
permissive
|
liyork/violin
|
7edc4ce113b4b229ad7698a8fe5f3ad2f6031e14
|
53ca1869e614e7940e9097f3ef3f45f755c78345
|
refs/heads/master
| 2023-08-07T01:10:08.932970
| 2023-07-24T08:51:06
| 2023-07-24T08:51:06
| 101,621,643
| 0
| 2
|
Apache-2.0
| 2022-12-14T20:22:45
| 2017-08-28T08:30:21
|
Java
|
UTF-8
|
Java
| false
| false
| 7,743
|
java
|
package com.wolf.test.redis.inaction;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.Pipeline;
import redis.clients.jedis.Transaction;
import redis.clients.jedis.Tuple;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class Chapter04 {
public static final void main(String[] args) {
new Chapter04().run();
}
public void run() {
Jedis conn = new Jedis("localhost");
conn.select(15);
testListItem(conn, false);
testPurchaseItem(conn);
testBenchmarkUpdateToken(conn);
}
public void testListItem(Jedis conn, boolean nested) {
if (!nested){
System.out.println("\n----- testListItem -----");
}
System.out.println("We need to set up just enough state so that a user can list an item");
String seller = "userX";
String item = "itemX";
conn.sadd("inventory:" + seller, item);
Set<String> i = conn.smembers("inventory:" + seller);
System.out.println("The user's inventory has:");
for (String member : i){
System.out.println(" " + member);
}
assert i.size() > 0;
System.out.println();
System.out.println("Listing the item...");
boolean l = listItem(conn, item, seller, 10);
System.out.println("Listing the item succeeded? " + l);
assert l;
Set<Tuple> r = conn.zrangeWithScores("market:", 0, -1);
System.out.println("The market contains:");
for (Tuple tuple : r){
System.out.println(" " + tuple.getElement() + ", " + tuple.getScore());
}
assert r.size() > 0;
}
public void testPurchaseItem(Jedis conn) {
System.out.println("\n----- testPurchaseItem -----");
testListItem(conn, true);
System.out.println("We need to set up just enough state so a user can buy an item");
conn.hset("users:userY", "funds", "125");
Map<String,String> r = conn.hgetAll("users:userY");
System.out.println("The user has some money:");
for (Map.Entry<String,String> entry : r.entrySet()){
System.out.println(" " + entry.getKey() + ": " + entry.getValue());
}
assert r.size() > 0;
assert r.get("funds") != null;
System.out.println();
System.out.println("Let's purchase an item");
boolean p = purchaseItem(conn, "userY", "itemX", "userX", 10);
System.out.println("Purchasing an item succeeded? " + p);
assert p;
r = conn.hgetAll("users:userY");
System.out.println("Their money is now:");
for (Map.Entry<String,String> entry : r.entrySet()){
System.out.println(" " + entry.getKey() + ": " + entry.getValue());
}
assert r.size() > 0;
String buyer = "userY";
Set<String> i = conn.smembers("inventory:" + buyer);
System.out.println("Their inventory is now:");
for (String member : i){
System.out.println(" " + member);
}
assert i.size() > 0;
assert i.contains("itemX");
assert conn.zscore("market:", "itemX.userX") == null;
}
public void testBenchmarkUpdateToken(Jedis conn) {
System.out.println("\n----- testBenchmarkUpdate -----");
benchmarkUpdateToken(conn, 5);
}
public boolean listItem(
Jedis conn, String itemId, String sellerId, double price) {
String inventory = "inventory:" + sellerId;
String item = itemId + '.' + sellerId;
long end = System.currentTimeMillis() + 5000;
while (System.currentTimeMillis() < end) {
conn.watch(inventory);
if (!conn.sismember(inventory, itemId)){
conn.unwatch();
return false;
}
Transaction trans = conn.multi();
trans.zadd("market:", price, item);
trans.srem(inventory, itemId);
List<Object> results = trans.exec();
// null response indicates that the transaction was aborted due to
// the watched key changing.
if (results == null){
continue;
}
return true;
}
return false;
}
public boolean purchaseItem(
Jedis conn, String buyerId, String itemId, String sellerId, double lprice) {
String buyer = "users:" + buyerId;
String seller = "users:" + sellerId;
String item = itemId + '.' + sellerId;
String inventory = "inventory:" + buyerId;
long end = System.currentTimeMillis() + 10000;
while (System.currentTimeMillis() < end){
conn.watch("market:", buyer);
double price = conn.zscore("market:", item);
double funds = Double.parseDouble(conn.hget(buyer, "funds"));
if (price != lprice || price > funds){
conn.unwatch();
return false;
}
Transaction trans = conn.multi();
trans.hincrBy(seller, "funds", (int)price);
trans.hincrBy(buyer, "funds", (int)-price);
trans.sadd(inventory, itemId);
trans.zrem("market:", item);
List<Object> results = trans.exec();
// null response indicates that the transaction was aborted due to
// the watched key changing.
if (results == null){
continue;
}
return true;
}
return false;
}
public void benchmarkUpdateToken(Jedis conn, int duration) {
try{
@SuppressWarnings("rawtypes")
Class[] args = new Class[]{
Jedis.class, String.class, String.class, String.class};
Method[] methods = new Method[]{
this.getClass().getDeclaredMethod("updateToken", args),
this.getClass().getDeclaredMethod("updateTokenPipeline", args),
};
for (Method method : methods){
int count = 0;
long start = System.currentTimeMillis();
long end = start + (duration * 1000);
while (System.currentTimeMillis() < end){
count++;
method.invoke(this, conn, "token", "user", "item");
}
long delta = System.currentTimeMillis() - start;
System.out.println(
method.getName() + ' ' +
count + ' ' +
(delta / 1000) + ' ' +
(count / (delta / 1000)));
}
}catch(Exception e){
throw new RuntimeException(e);
}
}
public void updateToken(Jedis conn, String token, String user, String item) {
long timestamp = System.currentTimeMillis() / 1000;
conn.hset("login:", token, user);
conn.zadd("recent:", timestamp, token);
if (item != null) {
conn.zadd("viewed:" + token, timestamp, item);
conn.zremrangeByRank("viewed:" + token, 0, -26);
conn.zincrby("viewed:", -1, item);
}
}
public void updateTokenPipeline(Jedis conn, String token, String user, String item) {
long timestamp = System.currentTimeMillis() / 1000;
Pipeline pipe = conn.pipelined();
pipe.multi();
pipe.hset("login:", token, user);
pipe.zadd("recent:", timestamp, token);
if (item != null){
pipe.zadd("viewed:" + token, timestamp, item);
pipe.zremrangeByRank("viewed:" + token, 0, -26);
pipe.zincrby("viewed:", -1, item);
}
pipe.exec();
}
}
|
[
"lichao27270891@163.com"
] |
lichao27270891@163.com
|
2c6a296748f1592b1f66cd2c8cfdf985adb60889
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_1002954.java
|
f84da84cc0119677a2be6be8d95a04520ab6834c
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 281
|
java
|
private Supplier<Mono<Void>> execute(Supplier<HttpRequest> supplier){
return () -> Mono.defer(() -> {
assert request == null : request;
request=supplier.get();
future.complete(client.execute(request));
return Mono.fromFuture(request.completionFuture());
}
);
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
39c7aed1551c6257013a2ea221a5d734ac3715f5
|
79595075622ded0bf43023f716389f61d8e96e94
|
/app/src/main/java/android/annotation/InterpolatorRes.java
|
45c1b4235092ef85f0a9d8d6f62252280b5803ce
|
[] |
no_license
|
dstmath/OppoR15
|
96f1f7bb4d9cfad47609316debc55095edcd6b56
|
b9a4da845af251213d7b4c1b35db3e2415290c96
|
refs/heads/master
| 2020-03-24T16:52:14.198588
| 2019-05-27T02:24:53
| 2019-05-27T02:24:53
| 142,840,716
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 388
|
java
|
package android.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Documented
@Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD})
@Retention(RetentionPolicy.SOURCE)
public @interface InterpolatorRes {
}
|
[
"toor@debian.toor"
] |
toor@debian.toor
|
03200ed403e5d7aa439a1ec664b4642f0bfc6d15
|
84572d5d682bd7e6973b8105fb921b0c448ff1f7
|
/projects/BouncyCastle/src/org/sandrob/bouncycastle/crypto/engines/ElGamalEngine.java
|
6ad52abaa11626ebccd5e53fccc3844d741254e8
|
[
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] |
permissive
|
liang47009/sandrop
|
806169c72a516b3191aae07c234a225db5343888
|
28045e53cec0f043d3aaf426f7055fbf8ca38a76
|
refs/heads/master
| 2020-04-13T18:24:58.767107
| 2018-12-28T09:32:53
| 2018-12-28T09:33:14
| 163,373,426
| 0
| 0
| null | 2018-12-28T06:15:22
| 2018-12-28T06:15:22
| null |
UTF-8
|
Java
| false
| false
| 7,046
|
java
|
package org.sandrob.bouncycastle.crypto.engines;
import org.sandrob.bouncycastle.crypto.AsymmetricBlockCipher;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.DataLengthException;
import org.sandrob.bouncycastle.crypto.params.ElGamalKeyParameters;
import org.sandrob.bouncycastle.crypto.params.ElGamalPrivateKeyParameters;
import org.sandrob.bouncycastle.crypto.params.ElGamalPublicKeyParameters;
import org.sandrob.bouncycastle.crypto.params.ParametersWithRandom;
import org.sandrob.bouncycastle.util.BigIntegers;
import java.math.BigInteger;
import java.security.SecureRandom;
/**
* this does your basic ElGamal algorithm.
*/
public class ElGamalEngine
implements AsymmetricBlockCipher
{
private ElGamalKeyParameters key;
private SecureRandom random;
private boolean forEncryption;
private int bitSize;
private static final BigInteger ZERO = BigInteger.valueOf(0);
private static final BigInteger ONE = BigInteger.valueOf(1);
private static final BigInteger TWO = BigInteger.valueOf(2);
/**
* initialise the ElGamal engine.
*
* @param forEncryption true if we are encrypting, false otherwise.
* @param param the necessary ElGamal key parameters.
*/
public void init(
boolean forEncryption,
CipherParameters param)
{
if (param instanceof ParametersWithRandom)
{
ParametersWithRandom p = (ParametersWithRandom)param;
this.key = (ElGamalKeyParameters)p.getParameters();
this.random = p.getRandom();
}
else
{
this.key = (ElGamalKeyParameters)param;
this.random = new SecureRandom();
}
this.forEncryption = forEncryption;
BigInteger p = key.getParameters().getP();
bitSize = p.bitLength();
if (forEncryption)
{
if (!(key instanceof ElGamalPublicKeyParameters))
{
throw new IllegalArgumentException("ElGamalPublicKeyParameters are required for encryption.");
}
}
else
{
if (!(key instanceof ElGamalPrivateKeyParameters))
{
throw new IllegalArgumentException("ElGamalPrivateKeyParameters are required for decryption.");
}
}
}
/**
* Return the maximum size for an input block to this engine.
* For ElGamal this is always one byte less than the size of P on
* encryption, and twice the length as the size of P on decryption.
*
* @return maximum size for an input block.
*/
public int getInputBlockSize()
{
if (forEncryption)
{
return (bitSize - 1) / 8;
}
return 2 * ((bitSize + 7) / 8);
}
/**
* Return the maximum size for an output block to this engine.
* For ElGamal this is always one byte less than the size of P on
* decryption, and twice the length as the size of P on encryption.
*
* @return maximum size for an output block.
*/
public int getOutputBlockSize()
{
if (forEncryption)
{
return 2 * ((bitSize + 7) / 8);
}
return (bitSize - 1) / 8;
}
/**
* Process a single block using the basic ElGamal algorithm.
*
* @param in the input array.
* @param inOff the offset into the input buffer where the data starts.
* @param inLen the length of the data to be processed.
* @return the result of the ElGamal process.
* @exception DataLengthException the input block is too large.
*/
public byte[] processBlock(
byte[] in,
int inOff,
int inLen)
{
if (key == null)
{
throw new IllegalStateException("ElGamal engine not initialised");
}
int maxLength = forEncryption
? (bitSize - 1 + 7) / 8
: getInputBlockSize();
if (inLen > maxLength)
{
throw new DataLengthException("input too large for ElGamal cipher.\n");
}
BigInteger p = key.getParameters().getP();
if (key instanceof ElGamalPrivateKeyParameters) // decryption
{
byte[] in1 = new byte[inLen / 2];
byte[] in2 = new byte[inLen / 2];
System.arraycopy(in, inOff, in1, 0, in1.length);
System.arraycopy(in, inOff + in1.length, in2, 0, in2.length);
BigInteger gamma = new BigInteger(1, in1);
BigInteger phi = new BigInteger(1, in2);
ElGamalPrivateKeyParameters priv = (ElGamalPrivateKeyParameters)key;
// a shortcut, which generally relies on p being prime amongst other things.
// if a problem with this shows up, check the p and g values!
BigInteger m = gamma.modPow(p.subtract(ONE).subtract(priv.getX()), p).multiply(phi).mod(p);
return BigIntegers.asUnsignedByteArray(m);
}
else // encryption
{
byte[] block;
if (inOff != 0 || inLen != in.length)
{
block = new byte[inLen];
System.arraycopy(in, inOff, block, 0, inLen);
}
else
{
block = in;
}
BigInteger input = new BigInteger(1, block);
if (input.bitLength() >= p.bitLength())
{
throw new DataLengthException("input too large for ElGamal cipher.\n");
}
ElGamalPublicKeyParameters pub = (ElGamalPublicKeyParameters)key;
int pBitLength = p.bitLength();
BigInteger k = new BigInteger(pBitLength, random);
while (k.equals(ZERO) || (k.compareTo(p.subtract(TWO)) > 0))
{
k = new BigInteger(pBitLength, random);
}
BigInteger g = key.getParameters().getG();
BigInteger gamma = g.modPow(k, p);
BigInteger phi = input.multiply(pub.getY().modPow(k, p)).mod(p);
byte[] out1 = gamma.toByteArray();
byte[] out2 = phi.toByteArray();
byte[] output = new byte[this.getOutputBlockSize()];
if (out1.length > output.length / 2)
{
System.arraycopy(out1, 1, output, output.length / 2 - (out1.length - 1), out1.length - 1);
}
else
{
System.arraycopy(out1, 0, output, output.length / 2 - out1.length, out1.length);
}
if (out2.length > output.length / 2)
{
System.arraycopy(out2, 1, output, output.length - (out2.length - 1), out2.length - 1);
}
else
{
System.arraycopy(out2, 0, output, output.length - out2.length, out2.length);
}
return output;
}
}
}
|
[
"supp.sandrob@gmail.com"
] |
supp.sandrob@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.