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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f50a0033cada24fed5b7dbe743520b977b92647e
|
d0969e8811c0aeee14674813a83959e3c949e875
|
/1669/G/Main.java
|
221987ca1fe5c78c3a95d23d31dcadc614c83709
|
[] |
no_license
|
charles-wangkai/codeforces
|
738354a0c4bb0d83bb0ff431a0d1f39c5e5eab5c
|
b61ee17b1dea78c74d7ac2f31c4a1ddc230681a7
|
refs/heads/master
| 2023-09-01T09:07:31.814311
| 2023-09-01T01:34:10
| 2023-09-01T01:34:10
| 161,009,629
| 39
| 14
| null | 2020-10-01T17:43:45
| 2018-12-09T06:00:22
|
Java
|
UTF-8
|
Java
| false
| false
| 1,082
|
java
|
import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.Collectors;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int tc = 0; tc < t; ++tc) {
int n = sc.nextInt();
int m = sc.nextInt();
char[][] grid = new char[n][m];
for (int r = 0; r < n; ++r) {
String line = sc.next();
for (int c = 0; c < m; ++c) {
grid[r][c] = line.charAt(c);
}
}
System.out.println(solve(grid));
}
sc.close();
}
static String solve(char[][] grid) {
int n = grid.length;
int m = grid[0].length;
for (int c = 0; c < m; ++c) {
for (int r = n - 1; r >= 0; --r) {
int currentR = r;
while (currentR + 1 != n && grid[currentR][c] == '*' && grid[currentR + 1][c] == '.') {
grid[currentR][c] = '.';
grid[currentR + 1][c] = '*';
++currentR;
}
}
}
return Arrays.stream(grid).map(String::new).collect(Collectors.joining("\n"));
}
}
|
[
"charles.wangkai@gmail.com"
] |
charles.wangkai@gmail.com
|
519dd57fd1fa8680274795dc54e83e00e0d42e9d
|
dc945e62937adfecd9faad1ce434d5856316369e
|
/build/generated/jax-wsCache/service.php/n/FinishFailureStruct.java
|
b8ecaca81dded6a12dd14ce80963c395f574b56e
|
[] |
no_license
|
SCRAPPYDOO/ScrappyAirsoftShop
|
bbdc7a7da4f1ab0b47ffb08905d6cf3ee031bd35
|
977a7030b3643ce7796cf8e4d0005eb55aafd5bc
|
refs/heads/master
| 2021-03-12T21:45:57.101351
| 2015-09-16T10:49:45
| 2015-09-16T10:49:45
| 41,765,695
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,588
|
java
|
package n;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for FinishFailureStruct complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="FinishFailureStruct">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <all>
* <element name="finishItemId" type="{http://www.w3.org/2001/XMLSchema}long"/>
* <element name="finishErrorCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="finishErrorMessage" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </all>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FinishFailureStruct", propOrder = {
})
public class FinishFailureStruct {
protected long finishItemId;
@XmlElement(required = true)
protected String finishErrorCode;
@XmlElement(required = true)
protected String finishErrorMessage;
/**
* Gets the value of the finishItemId property.
*
*/
public long getFinishItemId() {
return finishItemId;
}
/**
* Sets the value of the finishItemId property.
*
*/
public void setFinishItemId(long value) {
this.finishItemId = value;
}
/**
* Gets the value of the finishErrorCode property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getFinishErrorCode() {
return finishErrorCode;
}
/**
* Sets the value of the finishErrorCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFinishErrorCode(String value) {
this.finishErrorCode = value;
}
/**
* Gets the value of the finishErrorMessage property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getFinishErrorMessage() {
return finishErrorMessage;
}
/**
* Sets the value of the finishErrorMessage property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFinishErrorMessage(String value) {
this.finishErrorMessage = value;
}
}
|
[
"scrapek69@gmail.com"
] |
scrapek69@gmail.com
|
0207612467d3a82c5339c440dee35928037b43eb
|
518bf342bc4138982af3e2724e75f1d9ca3ba56c
|
/solutions/1654. Minimum Jumps to Reach Home/1654.java
|
9969972556dc772d9ddc2531e3cdf3604da096c8
|
[
"MIT"
] |
permissive
|
walkccc/LeetCode
|
dae85af7cc689882a84ee5011f0a13a19ad97f18
|
a27be41c174565d365cbfe785f0633f634a01b2a
|
refs/heads/main
| 2023-08-28T01:32:43.384999
| 2023-08-20T19:00:45
| 2023-08-20T19:00:45
| 172,231,974
| 692
| 302
|
MIT
| 2023-08-13T14:48:42
| 2019-02-23T15:46:23
|
C++
|
UTF-8
|
Java
| false
| false
| 1,195
|
java
|
enum Direction { kForward, kBackward }
class Solution {
public int minimumJumps(int[] forbidden, int a, int b, int x) {
int furthest = x + a + b;
Set<Integer> seenForward = new HashSet<>();
Set<Integer> seenBackward = new HashSet<>();
for (final int pos : forbidden) {
seenForward.add(pos);
seenBackward.add(pos);
furthest = Math.max(furthest, pos + a + b);
}
// (direction, position)
Queue<Pair<Direction, Integer>> q =
new ArrayDeque<>(Arrays.asList(new Pair<>(Direction.kForward, 0)));
for (int ans = 0; !q.isEmpty(); ++ans)
for (int sz = q.size(); sz > 0; --sz) {
Direction dir = q.peek().getKey();
final int pos = q.poll().getValue();
if (pos == x)
return ans;
final int forward = pos + a;
final int backward = pos - b;
if (forward <= furthest && seenForward.add(forward))
q.offer(new Pair<>(Direction.kForward, forward));
// It cannot jump backward twice in a row.
if (dir == Direction.kForward && backward >= 0 && seenBackward.add(backward))
q.offer(new Pair<>(Direction.kBackward, backward));
}
return -1;
}
}
|
[
"me@pengyuc.com"
] |
me@pengyuc.com
|
a7a66d4feb96f882812d16999a630cea13380e26
|
4be72dee04ebb3f70d6e342aeb01467e7e8b3129
|
/bin/ext-commerce/xyformscockpits/src/de/hybris/platform/xyformscockpits/jalo/XyformscockpitsManager.java
|
92debc62909556870bdf258b14ee07c4f4b3c53f
|
[] |
no_license
|
lun130220/hybris
|
da00774767ba6246d04cdcbc49d87f0f4b0b1b26
|
03c074ea76779f96f2db7efcdaa0b0538d1ce917
|
refs/heads/master
| 2021-05-14T01:48:42.351698
| 2018-01-07T07:21:53
| 2018-01-07T07:21:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,433
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.xyformscockpits.jalo;
import de.hybris.platform.core.Registry;
import de.hybris.platform.util.JspContext;
import java.util.Map;
import org.apache.log4j.Logger;
import de.hybris.platform.xyformscockpits.constants.XyformscockpitsConstants;
/**
* This is the extension manager of the Xyformscockpits extension.
*/
public class XyformscockpitsManager extends GeneratedXyformscockpitsManager
{
/** Edit the local|project.properties to change logging behavior (properties 'log4j.*'). */
private static final Logger LOG = Logger.getLogger(XyformscockpitsManager.class.getName());
/*
* Some important tips for development: Do NEVER use the default constructor of manager's or items. => If you want to
* do something whenever the manger is created use the init() or destroy() methods described below Do NEVER use
* STATIC fields in your manager or items! => If you want to cache anything in a "static" way, use an instance
* variable in your manager, the manager is created only once in the lifetime of a "deployment" or tenant.
*/
/**
* Get the valid instance of this manager.
*
* @return the current instance of this manager
*/
public static XyformscockpitsManager getInstance()
{
return (XyformscockpitsManager) Registry.getCurrentTenant().getJaloConnection().getExtensionManager()
.getExtension(XyformscockpitsConstants.EXTENSIONNAME);
}
/**
* Never call the constructor of any manager directly, call getInstance() You can place your business logic here -
* like registering a jalo session listener. Each manager is created once for each tenant.
*/
public XyformscockpitsManager() // NOPMD
{
if (LOG.isDebugEnabled())
{
LOG.debug("constructor of XyformscockpitsManager called.");
}
}
/**
* Use this method to do some basic work only ONCE in the lifetime of a tenant resp. "deployment". This method is
* called after manager creation (for example within startup of a tenant). Note that if you have more than one tenant
* you have a manager instance for each tenant.
*/
@Override
public void init()
{
if (LOG.isDebugEnabled())
{
LOG.debug("init() of XyformscockpitsManager called. " + getTenant().getTenantID());
}
}
/**
* Use this method as a callback when the manager instance is being destroyed (this happens before system
* initialization, at redeployment or if you shutdown your VM). Note that if you have more than one tenant you have a
* manager instance for each tenant.
*/
@Override
public void destroy()
{
if (LOG.isDebugEnabled())
{
LOG.debug("destroy() of XyformscockpitsManager called, current tenant: " + getTenant().getTenantID());
}
}
/**
* Implement this method to create initial objects. This method will be called by system creator during
* initialization and system update. Be sure that this method can be called repeatedly. An example usage of this
* method is to create required cronjobs or modifying the type system (setting e.g some default values)
*
* @param params
* the parameters provided by user for creation of objects for the extension
* @param jspc
* the jsp context; you can use it to write progress information to the jsp page during creation
*/
@Override
public void createEssentialData(final Map<String, String> params, final JspContext jspc)
{
// implement here code creating essential data
}
/**
* Implement this method to create data that is used in your project. This method will be called during the system
* initialization. An example use is to import initial data like currencies or languages for your project from an csv
* file.
*
* @param params
* the parameters provided by user for creation of objects for the extension
* @param jspc
* the jsp context; you can use it to write progress information to the jsp page during creation
*/
@Override
public void createProjectData(final Map<String, String> params, final JspContext jspc)
{
// implement here code creating project data
}
}
|
[
"lun130220@gamil.com"
] |
lun130220@gamil.com
|
286b751439e382bcb5e041d65a7e1ee7d674b812
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.ocms-OCMS/sources/com/facebook/quicklog/identifiers/QuickerExperiment.java
|
dfe8f61bd55f32a5569b85f70bac51a3779d72cc
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 344
|
java
|
package com.facebook.quicklog.identifiers;
public class QuickerExperiment {
public static final short MODULE_ID = 129;
public static final int SESSIONED_STORE_INITIALIZE = 8454145;
public static String getMarkerName(int i) {
return i != 1 ? "UNDEFINED_QPL_EVENT" : "QUICKER_EXPERIMENT_SESSIONED_STORE_INITIALIZE";
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
d681419607ad0609040af5788f6409afd7e63340
|
5b7074ce0bac8905ffc07e229de5b174eff99cff
|
/src/org/omg/PortableInterceptor/IORInterceptor_3_0Holder.java
|
28d5241f66da577365503952688c1c88d9027dab
|
[] |
no_license
|
rocky-peng/jdk7-sourcecode-read
|
479140ca85836344bc6d6519e2c1d9304a47b6d8
|
2f932af3bb85af579f1bca45e6718e58d7073c9d
|
refs/heads/master
| 2020-09-08T11:37:18.619811
| 2019-11-18T04:34:43
| 2019-11-18T04:34:43
| 221,121,929
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,049
|
java
|
package org.omg.PortableInterceptor;
/**
* org/omg/PortableInterceptor/IORInterceptor_3_0Holder.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
* Friday, April 10, 2015 11:19:49 AM PDT
*/
public final class IORInterceptor_3_0Holder implements org.omg.CORBA.portable.Streamable
{
public org.omg.PortableInterceptor.IORInterceptor_3_0 value = null;
public IORInterceptor_3_0Holder ()
{
}
public IORInterceptor_3_0Holder (org.omg.PortableInterceptor.IORInterceptor_3_0 initialValue)
{
value = initialValue;
}
public void _read (org.omg.CORBA.portable.InputStream i)
{
value = org.omg.PortableInterceptor.IORInterceptor_3_0Helper.read (i);
}
public void _write (org.omg.CORBA.portable.OutputStream o)
{
org.omg.PortableInterceptor.IORInterceptor_3_0Helper.write (o, value);
}
public org.omg.CORBA.TypeCode _type ()
{
return org.omg.PortableInterceptor.IORInterceptor_3_0Helper.type ();
}
}
|
[
"rocky.peng@qq.com"
] |
rocky.peng@qq.com
|
9ad76c1625a99b4072a3b7cba516cb218f2e2121
|
7093ae6f0a768c8abee9db5d2e5be4d6c9105f27
|
/depa/05_Strategy/src/patterns/strategy/date/USPrintDate.java
|
4bff9c8611b8807d4366e884cc821f020cd5fb5e
|
[] |
no_license
|
heshamOuda1/FHNW-Java-Projekte
|
9da0bb495f89655eea6c521f1aaee6fb21d784dd
|
00decf1d2fae80fc29c0f8c1c251b999ed0ceabb
|
refs/heads/master
| 2021-05-29T05:46:17.805368
| 2015-06-22T13:15:04
| 2015-06-22T13:15:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 186
|
java
|
package patterns.strategy.date;
public class USPrintDate implements PrintDate {
public void print(Date d) {
System.out.println("Date: " + d.month + "/" + d.day + "/" + d.year);
}
}
|
[
"chregi.glatthard@gmail.com"
] |
chregi.glatthard@gmail.com
|
2dbdb11965087c465686b1c881d8f6deae204c65
|
07c473a7754057e99e6c81b00172b9a1a43c0e96
|
/src/main/java/com/google/devtools/build/lib/packages/SkylarkNativeAspect.java
|
4048b2fc22eecc296493a5438744189dcea16a6b
|
[
"Apache-2.0"
] |
permissive
|
chenshuo/bazel
|
ffd3f37331db1ce5979f43aa3d27b96a6efcd1a2
|
c2ba4a08a788097297da81b58e2fb9ffdb22a581
|
refs/heads/master
| 2020-04-29T20:13:31.491356
| 2019-03-18T21:51:45
| 2019-03-18T21:53:24
| 176,378,348
| 3
| 0
|
Apache-2.0
| 2019-03-18T22:18:32
| 2019-03-18T22:18:32
| null |
UTF-8
|
Java
| false
| false
| 1,430
|
java
|
// Copyright 2015 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.devtools.build.lib.packages;
import com.google.common.collect.ImmutableSet;
import com.google.devtools.build.lib.events.Location;
import com.google.devtools.build.lib.skylarkinterface.SkylarkPrinter;
/** A natively-defined aspect that is may be referenced by skylark attribute definitions. */
public abstract class SkylarkNativeAspect extends NativeAspectClass implements SkylarkAspect {
@Override
public void repr(SkylarkPrinter printer) {
printer.append("<native aspect>");
}
@Override
public void attachToAttribute(Attribute.Builder<?> attrBuilder, Location loc) {
attrBuilder.aspect(this);
}
@Override
public AspectClass getAspectClass() {
return this;
}
@Override
public ImmutableSet<String> getParamAttributes() {
return ImmutableSet.of();
}
}
|
[
"copybara-piper@google.com"
] |
copybara-piper@google.com
|
67060ba7fc3293273366172724ac5b3ee49d0c48
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Hibernate/Hibernate2621.java
|
dcd2bbcefc8ccc33358274305a9663619ad43d6f
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 797
|
java
|
public ComponentJoin(
FromClause fromClause,
FromElement origin,
String alias,
String componentPath,
CompositeType componentType) {
super( fromClause, origin, alias );
this.componentPath = componentPath;
this.componentType = componentType;
this.componentProperty = StringHelper.unqualify( componentPath );
fromClause.addJoinByPathMap( componentPath, this );
initializeComponentJoin( new ComponentFromElementType( this ) );
this.columns = origin.getPropertyMapping( "" ).toColumns( getTableAlias(), componentProperty );
StringBuilder buf = new StringBuilder();
for ( int j = 0; j < columns.length; j++ ) {
final String column = columns[j];
if ( j > 0 ) {
buf.append( ", " );
}
buf.append( column );
}
this.columnsFragment = buf.toString();
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
04a87f30c84f8f006c56343be49755acfce265e8
|
fbf77569f8d964d274ab48e29a6028eb81b3362d
|
/src/main/java/com/chenshinan/designpattern/C17Iterator/Iterator.java
|
f02ac22fa2b00e9012bcf38b5f3a68d939afa295
|
[] |
no_license
|
chenshinan/csn-designpattern
|
2cb3d201b6394608d2b33cb02de5aa7da203e93d
|
beb6c90bff7d1c6047dedbff419a42ca39e70bd5
|
refs/heads/master
| 2020-03-27T09:01:45.482497
| 2018-10-18T05:57:52
| 2018-10-18T05:57:52
| 146,308,028
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,925
|
java
|
package com.chenshinan.designpattern.C17Iterator;
/**
* 迭代器接口,定义访问和遍历元素的操作
*
* @author shinan.chen
* @date 2018/10/8
*/
public interface Iterator {
/**
* 移动到聚合对象的第一个位置
*/
void first();
/**
* 移动到聚合对象的下一个位置
*/
void next();
/**
* 判断是否已经移动到聚合对象的最后一个位置
*
* @return true表示已经移动到聚合对象的最后一个位置,
* false表示还没有移动到聚合对象的最后一个位置
*/
boolean isDone();
/**
* 获取迭代的当前元素
*
* @return 迭代的当前元素
*/
Object currentItem();
}
/**
* 具体迭代器实现对象,示意的是聚合对象为数组的迭代器
* 不同的聚合对象相应的迭代器实现是不一样的
*/
class ConcreteIterator implements Iterator {
/**
* 持有被迭代的具体的聚合对象
*/
private ConcreteAggregate aggregate;
/**
* 内部索引,记录当前迭代到的索引位置。
* -1表示刚开始的时候,迭代器指向聚合对象第一个对象之前
*/
private int index = -1;
/**
* 构造方法,传入被迭代的具体的聚合对象
*
* @param aggregate 被迭代的具体的聚合对象
*/
public ConcreteIterator(ConcreteAggregate aggregate) {
this.aggregate = aggregate;
}
@Override
public void first() {
index = 0;
}
@Override
public void next() {
if (index < this.aggregate.size()) {
index = index + 1;
}
}
@Override
public boolean isDone() {
if (index == this.aggregate.size()) {
return true;
}
return false;
}
@Override
public Object currentItem() {
return this.aggregate.get(index);
}
}
|
[
"shinan.chen@hand-china.com"
] |
shinan.chen@hand-china.com
|
085993434cf5ddceb414c0fa16f870570189ddd1
|
26b982b5be272385eb4258698dacb806e546487c
|
/gulimall-common/src/main/java/com/atguigu/common/valid/IntListValueConstraintValidator.java
|
f0352bdf129a6f636d545d92a799165012272cac
|
[
"Apache-2.0"
] |
permissive
|
Majunjie1111/grainmall2020
|
7dcc4cc058cf7d6745af4274c97a594b23c20e0e
|
e765b1f2a6f7ac98f3a18975d4e3c3311926e4ea
|
refs/heads/master
| 2023-04-19T10:52:13.300627
| 2020-07-27T13:49:20
| 2020-07-27T13:49:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,302
|
java
|
package com.atguigu.common.valid;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.util.HashSet;
import java.util.Set;
/**
* Description
* IntListValue 校验注解对应的校验器
* <p>
* Data
* 2020/5/25-22:06
*
* @author zrx
* @version 1.0
*/
public class IntListValueConstraintValidator implements ConstraintValidator<IntListValue, Integer> {
private final static Logger LOGGER = LoggerFactory.getLogger(IntListValueConstraintValidator.class);
private Set<Integer> valueSet;
/**
* 初始化方法,可以拿到这个注解
*
* @param constraintAnnotation 这个注解
*/
@Override
public void initialize(IntListValue constraintAnnotation) {
valueSet = new HashSet<>();
int[] values = constraintAnnotation.values();
for (int value : values) {
valueSet.add(value);
}
}
/**
* 校验方法
*
* @param value 要校验的值
* @return 值是否在 valueSet 中,值为空则不判断
*/
@Override
public boolean isValid(Integer value, ConstraintValidatorContext context) {
return value == null || valueSet.contains(value);
}
}
|
[
"578562554@qq.com"
] |
578562554@qq.com
|
fe1ce657c853311576c1f73ee0f20f78b613716d
|
af6251ee729995455081c4f4e48668c56007e1ac
|
/gateway/src/main/java/mmp/gps/gateway/codec/kangkaisi/beans/MemMsInfo.java
|
7dfad7b2bba666c580a5b8585adb7b8ae321f130
|
[] |
no_license
|
LXKing/monitor
|
b7522d5b95d2cca7e37a8bfc66dc7ba389e926ef
|
7d1eca454ce9a93fc47c68f311eca4dcd6f82603
|
refs/heads/master
| 2020-12-01T08:08:53.265259
| 2018-12-24T12:43:32
| 2018-12-24T12:43:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,847
|
java
|
package mmp.gps.gateway.codec.kangkaisi.beans;
import org.apache.mina.core.session.IoSession;
public class MemMsInfo {
private String id;
private IoSession tcp;
private IoSession udp;
private long lastTcpHb;
private long lastUdpHb;
private byte onlineStatus;
private short GSM;
private short VoltageLevel;
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public IoSession getTcp() {
return this.tcp;
}
public void setTcp(IoSession tcp) {
this.tcp = tcp;
}
public IoSession getUdp() {
return this.udp;
}
public void setUdp(IoSession udp) {
this.udp = udp;
}
public long getLastTcpHb() {
return this.lastTcpHb;
}
public void setLastTcpHb(long lastTcpHb) {
this.lastTcpHb = lastTcpHb;
}
public long getLastUdpHb() {
return this.lastUdpHb;
}
public void setLastUdpHb(long lastUdpHb) {
this.lastUdpHb = lastUdpHb;
}
public byte getOnlineStatus() {
return this.onlineStatus;
}
public void setOnlineStatus(byte onlineStatus) {
this.onlineStatus = onlineStatus;
}
public short getGSM() {
return this.GSM;
}
public void setGSM(short gSM) {
this.GSM = gSM;
}
public short getVoltageLevel() {
return this.VoltageLevel;
}
public void setVoltageLevel(short voltageLevel) {
this.VoltageLevel = voltageLevel;
}
public String toString() {
return "MemMsInfo [id=" + this.id + ", tcp=" + this.tcp + ", udp=" + this.udp + ", lastTcpHb=" + this.lastTcpHb + ", lastUdpHb=" + this.lastUdpHb + ", onlineStatus=" + this.onlineStatus + ", GSM=" + this.GSM + ", VoltageLevel=" + this.VoltageLevel + "]";
}
}
|
[
"heavenlystate@163.com"
] |
heavenlystate@163.com
|
d82d9bb39a79c217378e149ba920ca625efecdab
|
a8e47979b45aa428a32e16ddc4ee2578ec969dfe
|
/base/common/src/main/java/org/artifactory/addon/common/gpg/GpgKeyStore.java
|
84754b756e1f43098b0e807a09e136aeebad1a0d
|
[] |
no_license
|
nuance-sspni/artifactory-oss
|
da505cac1984da131a61473813ee2c7c04d8d488
|
af3fcf09e27cac836762e9957ad85bdaeec6e7f8
|
refs/heads/master
| 2021-07-22T20:04:08.718321
| 2017-11-02T20:49:33
| 2017-11-02T20:49:33
| 109,313,757
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,047
|
java
|
/*
*
* Copyright 2016 JFrog Ltd. All rights reserved.
* JFROG PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package org.artifactory.addon.common.gpg;
import javax.annotation.Nullable;
import java.io.File;
import java.io.IOException;
/**
* @author Yoav Luft
*/
public interface GpgKeyStore {
/**
* @return The GPG signing public key file location (the file might not exist).
*/
File getPublicKeyFile();
/**
* @return The ASCII Armored GPG signing key. Null if public key file doesn't exist
* @throws IOException If failed to read the key from file
*/
@Nullable
String getPublicKey() throws IOException;
void savePrivateKey(String privateKey) throws Exception;
void savePublicKey(String publicKey) throws Exception;
void savePassPhrase(String password);
boolean hasPrivateKey();
String getPrivateKey() throws IOException;
void removePublicKey();
void removePrivateKey();
boolean verify(String passphrase);
boolean hasPublicKey();
}
|
[
"tuan-anh.nguyen@nuance.com"
] |
tuan-anh.nguyen@nuance.com
|
8d4f317ffb5bade2a8d8d9be110e9959060dc141
|
a30b7feaac08e35a63ab2a17adce6c578ff8b9eb
|
/aebiz-b2b2c/aebiz-app/aebiz-web/src/main/java/com/aebiz/app/wx/modules/services/WxMsgService.java
|
474bf831486e9e6b1c00abddf6d0a1981fe2695b
|
[] |
no_license
|
zenghaorong/ntgcb2b2cJar
|
15ef95dfe87b5b483f63510e7a87bf73f7fa7c4e
|
ff360606816a9a76e3cccef0d821bb3a4fa24e88
|
refs/heads/master
| 2020-05-14T23:27:53.764175
| 2019-04-18T02:26:43
| 2019-04-18T02:28:22
| 181,997,233
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 211
|
java
|
package com.aebiz.app.wx.modules.services;
import com.aebiz.baseframework.base.service.BaseService;
import com.aebiz.app.wx.modules.models.Wx_msg;
public interface WxMsgService extends BaseService<Wx_msg>{
}
|
[
"2861574504@qq.com"
] |
2861574504@qq.com
|
6aeebf9fa75e3eb1d55aafe93d2b2ba92677f45c
|
2c47aa19b712395a0c72f79d3be61abc2e5ea4bb
|
/gui/src/main/java/GridLayout1.java
|
0eae39245d29d6650ebb7342ff366291443552c8
|
[] |
no_license
|
XJ2017/TIJ4-code
|
0213046c9e4902ee5a8b3073e3318c09b3be1143
|
367ab160a3bd51bb09e8220a2ddb08324a554eb2
|
refs/heads/master
| 2021-01-20T18:52:36.726726
| 2016-06-28T09:23:28
| 2016-06-28T09:23:28
| 62,103,071
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 410
|
java
|
//: gui/GridLayout1.java
// Demonstrates GridLayout.
import javax.swing.*;
import java.awt.*;
import static mindview.util.SwingConsole.*;
public class GridLayout1 extends JFrame {
public GridLayout1() {
setLayout(new GridLayout(7,3));
for(int i = 0; i < 20; i++)
add(new JButton("Button " + i));
}
public static void main(String[] args) {
run(new GridLayout1(), 300, 300);
}
} ///:~
|
[
"504283451@qq.com"
] |
504283451@qq.com
|
7cab622b94889614920f48665a2f03e51e23f4b8
|
231a828518021345de448c47c31f3b4c11333d0e
|
/src/pdf/bouncycastle/crypto/tls/EncryptionAlgorithm.java
|
9befe99c710ca5b161c4419fcc75f078d4fcab5c
|
[] |
no_license
|
Dynamit88/PDFBox-Java
|
f39b96b25f85271efbb3a9135cf6a15591dec678
|
480a576bc97fc52299e1e869bb80a1aeade67502
|
refs/heads/master
| 2020-05-24T14:58:29.287880
| 2019-05-18T04:25:21
| 2019-05-18T04:25:21
| 187,312,933
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,648
|
java
|
package pdf.bouncycastle.crypto.tls;
/**
* RFC 2246
* <p>
* Note that the values here are implementation-specific and arbitrary. It is recommended not to
* depend on the particular values (e.g. serialization).
*/
public class EncryptionAlgorithm
{
public static final int NULL = 0;
public static final int RC4_40 = 1;
public static final int RC4_128 = 2;
public static final int RC2_CBC_40 = 3;
public static final int IDEA_CBC = 4;
public static final int DES40_CBC = 5;
public static final int DES_CBC = 6;
public static final int _3DES_EDE_CBC = 7;
/*
* RFC 3268
*/
public static final int AES_128_CBC = 8;
public static final int AES_256_CBC = 9;
/*
* RFC 5289
*/
public static final int AES_128_GCM = 10;
public static final int AES_256_GCM = 11;
/*
* RFC 5932
*/
public static final int CAMELLIA_128_CBC = 12;
public static final int CAMELLIA_256_CBC = 13;
/*
* RFC 4162
*/
public static final int SEED_CBC = 14;
/*
* RFC 6655
*/
public static final int AES_128_CCM = 15;
public static final int AES_128_CCM_8 = 16;
public static final int AES_256_CCM = 17;
public static final int AES_256_CCM_8 = 18;
/*
* RFC 6367
*/
public static final int CAMELLIA_128_GCM = 19;
public static final int CAMELLIA_256_GCM = 20;
/*
* RFC 7905
*/
public static final int CHACHA20_POLY1305 = 21;
/*
* draft-zauner-tls-aes-ocb-04
*/
public static final int AES_128_OCB_TAGLEN96 = 103;
public static final int AES_256_OCB_TAGLEN96 = 104;
}
|
[
"vtuse@mail.ru"
] |
vtuse@mail.ru
|
b76db23dabe64738577b8ebbd0ba1425961733d7
|
ab7619cb640580c931b087d85f7f26fa176702e2
|
/h2/src/test/org/h2/test/synth/TestFuzzOptimizations.java
|
d43f6d41320388b51b913c7ced34f09816d94841
|
[] |
no_license
|
pkouki/icdm2017
|
440da58c66f56a36e98853ff34b14e2c066ed0f7
|
e05618c285c43416d7615bf41c812b6dede596bc
|
refs/heads/master
| 2021-01-21T13:29:22.566573
| 2017-11-19T04:29:47
| 2017-11-19T04:29:47
| 102,126,018
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,892
|
java
|
/*
* Copyright 2004-2009 H2 Group. Multiple-Licensed under the H2 License,
* Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.test.synth;
import java.sql.Connection;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.h2.constant.SysProperties;
import org.h2.test.TestBase;
import org.h2.test.db.Db;
import org.h2.test.db.Db.Prepared;
/**
* This test executes random SQL statements to test if optimizations are working
* correctly.
*/
public class TestFuzzOptimizations extends TestBase {
private Connection conn;
/**
* Run just this test.
*
* @param a ignored
*/
public static void main(String... a) throws Exception {
TestBase.createCaller().init().test();
}
public void test() throws Exception {
deleteDb("optimizations");
conn = getConnection("optimizations");
testGroupSorted();
testInSelect();
conn.close();
deleteDb("optimizations");
}
private void testInSelect() {
boolean old = SysProperties.optimizeInJoin;
Db db = new Db(conn);
db.execute("CREATE TABLE TEST(A INT, B INT)");
db.execute("CREATE INDEX IDX ON TEST(A)");
db.execute("INSERT INTO TEST SELECT X/4, MOD(X, 4) FROM SYSTEM_RANGE(1, 16)");
db.execute("UPDATE TEST SET A = NULL WHERE A = 0");
db.execute("UPDATE TEST SET B = NULL WHERE B = 0");
Random random = new Random();
long seed = random.nextLong();
println("seed: " + seed);
for (int i = 0; i < 100; i++) {
String sql = "SELECT * FROM TEST T WHERE ";
sql += random.nextBoolean() ? "A" : "B";
sql += " IN(SELECT ";
sql += new String[] { "NULL", "0", "A", "B" }[random.nextInt(4)];
sql += " FROM TEST I WHERE I.";
sql += random.nextBoolean() ? "A" : "B";
sql += "=?) ORDER BY 1, 2";
int v = random.nextInt(3);
SysProperties.optimizeInJoin = false;
List<Map<String, Object>> a = db.prepare(sql).set(v).query();
SysProperties.optimizeInJoin = true;
List<Map<String, Object>> b = db.prepare(sql).set(v).query();
assertTrue(a.equals(b));
}
db.execute("DROP TABLE TEST");
SysProperties.optimizeInJoin = old;
}
private void testGroupSorted() {
Db db = new Db(conn);
db.execute("CREATE TABLE TEST(A INT, B INT, C INT)");
Random random = new Random();
long seed = random.nextLong();
println("seed: " + seed);
for (int i = 0; i < 100; i++) {
Prepared p = db.prepare("INSERT INTO TEST VALUES(?, ?, ?)");
p.set(new String[] { null, "0", "1", "2" }[random.nextInt(4)]);
p.set(new String[] { null, "0", "1", "2" }[random.nextInt(4)]);
p.set(new String[] { null, "0", "1", "2" }[random.nextInt(4)]);
p.execute();
}
int len = getSize(1000, 3000);
for (int i = 0; i < len / 10; i++) {
db.execute("CREATE TABLE TEST_INDEXED AS SELECT * FROM TEST");
int jLen = 1 + random.nextInt(2);
for (int j = 0; j < jLen; j++) {
String x = "CREATE INDEX IDX" + j + " ON TEST_INDEXED(";
int kLen = 1 + random.nextInt(2);
for (int k = 0; k < kLen; k++) {
if (k > 0) {
x += ",";
}
x += new String[] { "A", "B", "C" }[random.nextInt(3)];
}
db.execute(x + ")");
}
for (int j = 0; j < 10; j++) {
String x = "SELECT ";
for (int k = 0; k < 3; k++) {
if (k > 0) {
x += ",";
}
x += new String[] { "SUM(A)", "MAX(B)", "AVG(C)", "COUNT(B)" }[random.nextInt(4)];
x += " S" + k;
}
x += " FROM ";
String group = " GROUP BY ";
int kLen = 1 + random.nextInt(2);
for (int k = 0; k < kLen; k++) {
if (k > 0) {
group += ",";
}
group += new String[] { "A", "B", "C" }[random.nextInt(3)];
}
group += " ORDER BY 1, 2, 3";
List<Map<String, Object>> a = db.query(x + "TEST" + group);
List<Map<String, Object>> b = db.query(x + "TEST_INDEXED" + group);
assertEquals(a.toString(), b.toString());
assertTrue(a.equals(b));
}
db.execute("DROP TABLE TEST_INDEXED");
}
db.execute("DROP TABLE TEST");
}
}
|
[
"pkouki@umiacs.umd.edu"
] |
pkouki@umiacs.umd.edu
|
7b7715511cd2ddd2bec7721ba4ee5de549f5aa6e
|
bdefb1f7722cbbd571d3cdf466671f73d4b43680
|
/src/main/java/pcehr_override/org/w3/Manifest.java
|
22355530990b986f6e9f381f207d3b3fc4c1cbdd
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
AuDigitalHealth/pcehr-compiled-wsdl-java
|
07975bcdba00af2ddd9933050a1da08a71c712e1
|
098fa9e9b0859e2785dd4ae81a60094898ecf053
|
refs/heads/master
| 2023-03-08T21:31:59.626392
| 2021-02-23T01:58:03
| 2021-02-23T01:58:03
| 338,191,318
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,868
|
java
|
package pcehr_override.org.w3;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>Java class for ManifestType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ManifestType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/>
* </sequence>
* <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ManifestType", propOrder = {
"references"
})
@XmlRootElement(name = "Manifest")
public class Manifest {
@XmlElement(name = "Reference", required = true)
protected List<Reference> references;
@XmlAttribute(name = "Id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
/**
* Gets the value of the references property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the references property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getReferences().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List<Reference> getReferences() {
if (references == null) {
references = new ArrayList<Reference>();
}
return this.references;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
}
|
[
"peter.ball@digitalhealth.gov.au"
] |
peter.ball@digitalhealth.gov.au
|
ce6b60c4b63f06d383c1a186367d03004306cc85
|
eb9f655206c43c12b497c667ba56a0d358b6bc3a
|
/plugins/kotlin/idea/tests/testData/refactoring/inline/inlineVariableOrProperty/fromFinalJavaToKotlin/fieldWithSeparateInitializer.1.java
|
85f91bba927fbc3af40d9f4b5b31a0d61b0ce796
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
JetBrains/intellij-community
|
2ed226e200ecc17c037dcddd4a006de56cd43941
|
05dbd4575d01a213f3f4d69aa4968473f2536142
|
refs/heads/master
| 2023-09-03T17:06:37.560889
| 2023-09-03T11:51:00
| 2023-09-03T12:12:27
| 2,489,216
| 16,288
| 6,635
|
Apache-2.0
| 2023-09-12T07:41:58
| 2011-09-30T13:33:05
| null |
UTF-8
|
Java
| false
| false
| 261
|
java
|
public final class JavaClass {
public final int field;
JavaClass() {
field = 42;
}
@java.lang.Override
public java.lang.String toString() {
return "JavaClass{" +
"field=" + field +
'}';
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
7e19ca51628c198b3e3b759b98e16448c3f6064d
|
b4893f54e524d61c6035ffd70804ca2d7537a2b7
|
/deps/bdb/com/sleepycat/bind/EntityBinding.java
|
97c77b04bcfdde0dc8517b18e2e2ffec5110542d
|
[] |
no_license
|
lzimm/vurs
|
96553ed5a54359699e4dc44eed062048ba7e7ce3
|
8e9c035538ff27f5368359f177ec37cb3700d1ba
|
refs/heads/master
| 2021-01-01T05:33:24.743946
| 2012-12-07T04:11:23
| 2012-12-07T04:11:23
| 7,047,447
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,424
|
java
|
/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 2000-2010 Oracle. All rights reserved.
*
*/
package bdb.com.sleepycat.bind;
import bdb.com.sleepycat.je.DatabaseEntry;
/**
* A binding between a key-value entry pair and an entity object.
*
* <p><em>WARNING:</em> Binding instances are typically shared by multiple
* threads and binding methods are called without any special synchronization.
* Therefore, bindings must be thread safe. In general no shared state should
* be used and any caching of computed values must be done with proper
* synchronization.</p>
*
* @author Mark Hayes
*/
public interface EntityBinding<E> {
/**
* Converts key and data entry buffers into an entity Object.
*
* @param key is the source key entry.
*
* @param data is the source data entry.
*
* @return the resulting Object.
*/
E entryToObject(DatabaseEntry key, DatabaseEntry data);
/**
* Extracts the key entry from an entity Object.
*
* @param object is the source Object.
*
* @param key is the destination entry buffer.
*/
void objectToKey(E object, DatabaseEntry key);
/**
* Extracts the data entry from an entity Object.
*
* @param object is the source Object.
*
* @param data is the destination entry buffer.
*/
void objectToData(E object, DatabaseEntry data);
}
|
[
"lewis@lzimm.com"
] |
lewis@lzimm.com
|
038221cbd632b60a4d136451c9a89109bcc2534a
|
ed607eb2b36cd63ddb8ea1950703f90dfbbc13e8
|
/JavaRXDemo/opensdk/src/main/java/com/chinaums/opensdk/download/model/BizPack.java
|
eb06b4f58020c922034d48ce8cff3482dbe141d8
|
[] |
no_license
|
reyhoo/collection
|
29ab53e6105e3dc4cb3b0d2a0ba56a509cfbc1ab
|
5cc0ab1b0596fd7eefb0bf755525c1cc4b8d1579
|
refs/heads/master
| 2020-07-08T20:49:12.018422
| 2017-10-23T09:28:01
| 2017-10-23T09:28:01
| 67,034,220
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,052
|
java
|
package com.chinaums.opensdk.download.model;
import android.util.Log;
import com.chinaums.opensdk.download.listener.ResourceManagerListener;
import com.chinaums.opensdk.exception.ResourceInitProcessFileException;
import com.chinaums.opensdk.exception.UnableProcessException;
public abstract class BizPack extends BasePack {
/**
* 菜单
*/
private String confMenu;
@Override
protected boolean initPack() throws Exception {
return true;
}
@Override
public void refresh(final ResourceManagerListener listener,
boolean useBackup) throws Exception {
if (isMustUpdate())
prepare(listener, useBackup);
else
refresh(listener);
}
@Override
public void refresh(ResourceManagerListener listener, boolean useBackup,
boolean needStdIcon, boolean needLargeIcon, boolean needAds,
boolean needPublic, boolean canRefresh) throws Exception {
if (canRefresh) {
refresh(listener, useBackup);
} else {
listener.onUpdated(this);
}
}
private void refresh(final ResourceManagerListener listener)
throws Exception {
boolean flag = false;
try {
log(Log.DEBUG, "进行预处理.");
onProgress("开始处理", 0, listener);
hasEnoughSpace();
flag = checkOriginalFile();
if (flag) {
onProgress("完成原始文件校验.", 70, listener);
prepareOk(listener);
return;
}
onProgress("校验原始文件出错,退出啦.", 5, listener);
changedShowState(false, false);
listener.onUpdated(this);
} catch (Exception e) {
onError("初始化失败", e, listener);
}
}
private void prepareOk(final ResourceManagerListener listener)
throws Exception {
log(Log.DEBUG, "判断文件监控是否正常.");
if (checkIsMonitoring()) {
onFinish(listener);
log(Log.DEBUG, "完成.");
return;
}
log(Log.DEBUG, "停止校验处理文件夹.");
stopProcessResourceMonitorWatch();
log(Log.DEBUG, "校验通过进行解压缩.");
if (!initResProcessByOriginal())
throw new ResourceInitProcessFileException("解压失败啦");
onProgress("完成文件解压缩,开始初始化数据.", 80, listener);
log(Log.DEBUG, "解压缩完成进行数据初始化.");
if (!initPack())
throw new UnableProcessException("数据初始化失败");
onProgress("完成数据初始化,开启文件监控.", 95, listener);
log(Log.DEBUG, "初始化完成进行通知.");
onFinish(listener);
log(Log.DEBUG, "完成.");
}
public String getConfMenu() {
return confMenu;
}
public void setConfMenu(String confMenu) {
this.confMenu = confMenu;
}
}
|
[
"373561022@qq.com"
] |
373561022@qq.com
|
a390f515734aba3a3465946e197ae3cbc8d887c0
|
a9eec019b54d4af98e9dac7ef7340f5de2d01990
|
/src/com/niucong/infoport/test/WebServiceTest.java
|
a6af64eace082e4e0c0c50c763bff325747a68d1
|
[] |
no_license
|
niucong/InfoPort
|
499b97025d3b580cbcda7694e249990bea20be83
|
0f64a21182da7de59986e838c7a7972213eda3fa
|
refs/heads/master
| 2016-09-11T21:17:30.289909
| 2016-05-30T03:30:53
| 2016-05-30T03:30:53
| 59,977,077
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,151
|
java
|
package com.niucong.infoport.test;
import java.util.ArrayList;
import android.test.AndroidTestCase;
import com.niucong.infoport.bean.ViewNewBean;
import com.niucong.infoport.net.WebServicesData;
import com.niucong.infoport.util.L;
public class WebServiceTest extends AndroidTestCase {
private static final String TAG = "WebServiceTest";
/**
* 注册
*
* @throws Exception
*/
public void sendPwd2CustomerTest() throws Exception {
L.i(TAG, "sendPwd2CustomerTest...");
String str = WebServicesData.sendPwd2Customer("18610041093");
L.d(TAG, "sendPwd2CustomerTest str=" + str);
}
/**
* 登录
*
* @throws Exception
*/
public void loginTest() throws Exception {
// L.i(TAG, "loginTest...");
// // 13802237563 18611127763(ddd1980)
// String[] strs = WebServicesData.selectAdminHttp("18610041095",
// "514243");
// // string[0]用户密码,string[1]用户编号,string[2]用户名
// // gctz2013 12478 admin
// L.d(TAG, "loginTest password=" + strs[0] + ",id=" + strs[1] +
// ",name="
// + strs[2]);
}
/**
*
*
* @throws Exception
*/
public void newMsgTest() throws Exception {
L.i(TAG, "newMsgTest...");
String[] strs = WebServicesData.getMsgPrompt("0", "");
L.d(TAG, "newMsgTest = " + strs[0] + " = " + strs[1] + " = " + strs[2]
+ " = " + strs[3]);
}
/**
* 权限验证
*
* @throws Exception
*/
public void CheckPermittedTest() throws Exception {
L.i(TAG, "CheckPermittedTest...");
String[] strs = WebServicesData.checkPermitted("12478");
for (int i = 0; i < strs.length; i++) {
L.d(TAG, "CheckPermittedTest password" + i + "=" + strs[i]);
}
}
/**
* 类型编号 类型名称 备注 今日头条:001106 独家视点:001103 002201 宏观信息 002202 行业信息 002203 今日策略
* 002204 个股信息 030801 信息港先锋版 新闻类列表显示 030802 题材起爆器 新闻类列表显示 030803 信息港体验版
* 新闻类列表显示 030804 信息港专业版 新闻类列表显示 030805 信息港实战版 新闻类列表显示 03080500 信息港实战池
* 股票池类列表显示,其权限隶属于实战版 030806 信息港组合版 新闻类列表显示 03080600 信息港组合池
* 股票池类列表显示,其权限隶属于组合版
*
* @throws Exception
*/
public void ViewNewsTest() throws Exception {
ArrayList<ViewNewBean> list = WebServicesData.viewNews("001103");
for (int i = 0; i < list.size(); i++) {
ViewNewBean bean = list.get(i);
L.i(TAG, "ViewNewsTest " + i + " num=" + bean.getNum() + ",id="
+ bean.getId() + ",title=" + bean.getTitle() + ",addtime="
+ bean.getAddTime() + ",nowtime=" + bean.getNowTime());
}
}
/**
* 阅读新闻
*
* @throws Exception
*/
public void ReadNewsTest() throws Exception {
L.i(TAG, "ReadNewsTest...");
String[] strs = WebServicesData.readNews("97793");
// string[0];新闻编号;string[1]:新闻类型;string[2]:浏览次数;string[3]:标题;
// string[5]:新闻内容;
L.d(TAG, "ReadNewsTest id=" + strs[0] + ",type=" + strs[1] + ",num="
+ strs[2] + ",title=" + strs[3] + ",context=" + strs[4]);
}
}
|
[
"niucong@julong.cc"
] |
niucong@julong.cc
|
6fb2fdee9b38aae3cde8fa5eefe9a7f0149e99ff
|
ee71c6606887b2ae9505d0e3cc04e5f701b52bef
|
/trade/src/main/java/net/shopxx/dao/ReceiverDao.java
|
e00ed81ec1014a4b90944f642e9061334de8ec5a
|
[] |
no_license
|
mythread/rongyi_source
|
24a6823f6c0f48d140262144221d2fc231f5957e
|
3da4d20548bd2609e4720ed83eda53fa45b6515c
|
refs/heads/master
| 2020-04-05T23:40:28.747465
| 2015-04-17T09:04:50
| 2015-04-17T09:04:50
| 34,106,925
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 643
|
java
|
package net.shopxx.dao;
import net.shopxx.entity.Receiver;
/**
* Dao接口 - 收货地址
* ============================================================================
* 。
* ----------------------------------------------------------------------------
* 。
* ----------------------------------------------------------------------------
*
* ----------------------------------------------------------------------------
* E55CBFB4C89A847056E2F76BC1F08AC3
* ============================================================================
*/
public interface ReceiverDao extends BaseDao<Receiver, String> {
}
|
[
"zhangxiongcai337@gmail.com"
] |
zhangxiongcai337@gmail.com
|
4b8c2a846d4ce1f69dbde605adcfb2b761f6997e
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project16/src/test/java/org/gradle/test/performance16_4/Test16_318.java
|
eeba3badaead7ae92f0a27719502d2a0c38dd65c
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package org.gradle.test.performance16_4;
import static org.junit.Assert.*;
public class Test16_318 {
private final Production16_318 production = new Production16_318("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
33ca068663ece898b33081686d0e4d4f895038cd
|
e9474845462e5f2531a74c760b7770d17c74baef
|
/10-Application/Application/Swing-Sample-APP/src/main/java/com/sgu/infowksporga/jfx/util/UserPreferencesConstant.java
|
8fa208da2e76ff1b575900bf492a914798d61738
|
[
"Apache-2.0"
] |
permissive
|
github188/InfoWkspOrga
|
869051f4e70ebc9a0125a0bddecdc1704e868b52
|
89162f127af51d697e25a46bc32dc90553388a54
|
refs/heads/master
| 2020-12-03T00:43:46.453187
| 2016-11-06T05:48:37
| 2016-11-06T05:48:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,207
|
java
|
package com.sgu.infowksporga.jfx.util;
/**
* The Class UserPreferencesConstant.
*/
public class UserPreferencesConstant {
/** The Constant DEFAULT_USER_LOCAL_SETTINGS_FILE. */
public static final String DEFAULT_USER_LOCAL_SETTINGS_FILE = "default-user-settings.properties";
/**
* Define the name of the user settings file write on user disk
*/
public static final String USER_LOCAL_SETTINGS_FILE = "infowrksporga-settings.properties";
/**
* USER_LOCAL_I18N_LOCATION define where to copy i18n files
*/
public static final String USER_LOCAL_I18N_LOCATION = "/i18n";
/**
* Define the property key user language in settings file
*/
public static final String USER_LANGUAGE_SETTING = "user.language";
/**
* Define the property key user login in settings file
*/
public static final String USER_LOGIN_SETTING = "user.login";
/**
* Define the property key user password in settings file
*/
public static final String USER_PASSWORD_SETTING = "user.password";
/**
* Define the property key preferred project import directory in settings file
*/
public static final String PROJECT_IMPORT_DIRECTORY_SETTING = "projects.import.preferred.directory";
/**
* Define the property key preferred user import directory in settings file
*/
public static final String USER_IMPORT_DIRECTORY_SETTING = "users.import.preferred.directory";
/**
* Define the property key preferred affectation import directory in settings file
*/
public static final String AFFECTATION_IMPORT_DIRECTORY_SETTING = "affectations.import.preferred.directory";
/**
* Define the property key preferred ZIP export directory in settings file
*/
public static final String ZIP_EXPORT_DIRECTORY_SETTING = "zip.export.preferred.directory";
/**
* Define the property key preferred ZIP export Exclude File in settings file
*/
public static final String ZIP_EXCLUDE_FILE = "zip.export.excude.file";
/**
* Define the property key preferred ZIP export Include File in settings file
*/
public static final String ZIP_INCLUDE_FILE = "zip.export.include.file";
/**
* The Constructor.
*/
private UserPreferencesConstant() {
}
}
|
[
"sebguisse@gmail.com"
] |
sebguisse@gmail.com
|
43eb3162b961c33f7d5a3ff63fb7d821a180340d
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/4/org/apache/commons/math3/geometry/euclidean/threed/FieldVector3D_distance_1067.java
|
d27f222636421c450a0c4b465521c8e129b2d076
|
[] |
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,673
|
java
|
org apach common math3 geometri euclidean threed
implement link vector3 vector3d link real field element realfieldel
instanc guarante immut
param type field element
version
field vector3 fieldvector3d real field element realfieldel serializ
comput distanc vector norm
call method equival call
code subtract norm getnorm code intermedi
vector built
param vector
param vector
param type field element
distanc norm
real field element realfieldel distanc field vector3 fieldvector3d
vector3 vector3d
distanc
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
6629a80a57286c335670b472e7a8be89ccf90f03
|
189c41f3c5ed039e3f98f57feecf89c81d77a8fc
|
/src/main/java/org/bian/dto/BQLegalTermsRequestInputModel.java
|
9130f78e5bf2678c65da0e76646c4196a9c27fc7
|
[
"Apache-2.0"
] |
permissive
|
bianapis/sd-customer-agreement-v2.0
|
a2e51d973c5a31a8e339fa9f02a6a64999c73641
|
f7e3498490f55e0ff903ec3983f7239a220e1788
|
refs/heads/master
| 2020-07-11T07:21:51.345367
| 2019-09-03T08:26:52
| 2019-09-03T08:26:52
| 204,477,234
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,194
|
java
|
package org.bian.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.bian.dto.BQLegalTermsRequestInputModelLegalTermsInstanceRecord;
import org.bian.dto.CRCustomerAgreementRequestInputModelRequestRecordType;
import javax.validation.Valid;
/**
* BQLegalTermsRequestInputModel
*/
public class BQLegalTermsRequestInputModel {
private String customerAgreementInstanceReference = null;
private String legalTermsInstanceReference = null;
private BQLegalTermsRequestInputModelLegalTermsInstanceRecord legalTermsInstanceRecord = null;
private Object legalTermsRequestActionTaskRecord = null;
private CRCustomerAgreementRequestInputModelRequestRecordType requestRecordType = null;
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to the parent Customer Agreement instance
* @return customerAgreementInstanceReference
**/
public String getCustomerAgreementInstanceReference() {
return customerAgreementInstanceReference;
}
public void setCustomerAgreementInstanceReference(String customerAgreementInstanceReference) {
this.customerAgreementInstanceReference = customerAgreementInstanceReference;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to the Legal Terms instance
* @return legalTermsInstanceReference
**/
public String getLegalTermsInstanceReference() {
return legalTermsInstanceReference;
}
public void setLegalTermsInstanceReference(String legalTermsInstanceReference) {
this.legalTermsInstanceReference = legalTermsInstanceReference;
}
/**
* Get legalTermsInstanceRecord
* @return legalTermsInstanceRecord
**/
public BQLegalTermsRequestInputModelLegalTermsInstanceRecord getLegalTermsInstanceRecord() {
return legalTermsInstanceRecord;
}
public void setLegalTermsInstanceRecord(BQLegalTermsRequestInputModelLegalTermsInstanceRecord legalTermsInstanceRecord) {
this.legalTermsInstanceRecord = legalTermsInstanceRecord;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Binary general-info: The request service call consolidated processing record
* @return legalTermsRequestActionTaskRecord
**/
public Object getLegalTermsRequestActionTaskRecord() {
return legalTermsRequestActionTaskRecord;
}
public void setLegalTermsRequestActionTaskRecord(Object legalTermsRequestActionTaskRecord) {
this.legalTermsRequestActionTaskRecord = legalTermsRequestActionTaskRecord;
}
/**
* Get requestRecordType
* @return requestRecordType
**/
public CRCustomerAgreementRequestInputModelRequestRecordType getRequestRecordType() {
return requestRecordType;
}
public void setRequestRecordType(CRCustomerAgreementRequestInputModelRequestRecordType requestRecordType) {
this.requestRecordType = requestRecordType;
}
}
|
[
"team1@bian.org"
] |
team1@bian.org
|
e35e11d16c65bd32701faa3b74e23efb30a80d35
|
635f226066bd493918b4fc732c4e7cb586360bad
|
/src/p08/lecture/ex6/Child.java
|
689c4d46077c67b406e5369457f99b9c548c9d77
|
[] |
no_license
|
eemin90/java_210325
|
b3df4ff24dd332078108f9a710f49d10da854fd7
|
9d64cfe3e048924a1696d3afeb8f3f7c5450e499
|
refs/heads/master
| 2023-04-12T20:15:55.427336
| 2021-05-04T15:45:43
| 2021-05-04T15:45:43
| 351,269,408
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 142
|
java
|
package p08.lecture.ex6;
public class Child extends Parent {
@Override
public void method1() {
System.out.println("child method1");
}
}
|
[
"eemin90@naver.com"
] |
eemin90@naver.com
|
82e6526055972b36d2679327bf63f13e6b03dfc7
|
56a678cf0a2d715c96727f7fbcb30001e36ea5fd
|
/presto-parser/src/main/java/com/facebook/presto/sql/tree/Window.java
|
b2dde84cd9d4c4a313346d4d1ab47b7f90beb027
|
[
"Apache-2.0"
] |
permissive
|
aslldab1/presto
|
bf099c319b8fb12f4447edb14e6b6ee8437b5f3d
|
25ba3140ce41c6acf0365630c7c16fc759cf7ce2
|
refs/heads/master
| 2021-01-14T10:28:18.852338
| 2015-03-15T07:14:20
| 2015-03-15T07:14:20
| 27,476,985
| 0
| 0
| null | 2014-12-06T16:00:50
| 2014-12-03T08:23:27
|
Java
|
UTF-8
|
Java
| false
| false
| 2,480
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.presto.sql.tree;
import com.google.common.base.Objects;
import com.google.common.base.Optional;
import java.util.List;
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Preconditions.checkNotNull;
public class Window
extends Node
{
private final List<Expression> partitionBy;
private final List<SortItem> orderBy;
private final Optional<WindowFrame> frame;
public Window(List<Expression> partitionBy, List<SortItem> orderBy, WindowFrame frame)
{
this.partitionBy = checkNotNull(partitionBy, "partitionBy is null");
this.orderBy = checkNotNull(orderBy, "orderBy is null");
this.frame = Optional.fromNullable(frame);
}
public List<Expression> getPartitionBy()
{
return partitionBy;
}
public List<SortItem> getOrderBy()
{
return orderBy;
}
public Optional<WindowFrame> getFrame()
{
return frame;
}
@Override
public <R, C> R accept(AstVisitor<R, C> visitor, C context)
{
return visitor.visitWindow(this, context);
}
@Override
public boolean equals(Object obj)
{
if (this == obj) {
return true;
}
if ((obj == null) || (getClass() != obj.getClass())) {
return false;
}
Window o = (Window) obj;
return Objects.equal(partitionBy, o.partitionBy) &&
Objects.equal(orderBy, o.orderBy) &&
Objects.equal(frame, o.frame);
}
@Override
public int hashCode()
{
return Objects.hashCode(partitionBy, orderBy, frame);
}
@Override
public String toString()
{
return toStringHelper(this)
.add("partitionBy", partitionBy)
.add("orderBy", orderBy)
.add("frame", frame)
.toString();
}
}
|
[
"david@acz.org"
] |
david@acz.org
|
659473162d549d9cfcd148a54546ec45c5f4c8a5
|
d0e74ff6e8d37984cea892dfe8508e2b44de5446
|
/logistics-wms-city-1.1.3.44.5/logistics-wms-city-common/src/main/java/com/yougou/logistics/city/common/model/BillWmDeliverKey.java
|
3c00f5e14f951602641f12e567661239238a2ac9
|
[] |
no_license
|
heaven6059/wms
|
fb39f31968045ba7e0635a4416a405a226448b5a
|
5885711e188e8e5c136956956b794f2a2d2e2e81
|
refs/heads/master
| 2021-01-14T11:20:10.574341
| 2015-04-11T08:11:59
| 2015-04-11T08:11:59
| 29,462,213
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,020
|
java
|
package com.yougou.logistics.city.common.model;
/**
* 请写出类的用途
* @author zuo.sw
* @date 2013-10-16 10:44:50
* @version 1.0.0
* @copyright (C) 2013 YouGou Information Technology Co.,Ltd
* All Rights Reserved.
*
* The software for the YouGou technology development, without the
* company's written consent, and any other individuals and
* organizations shall not be used, Copying, Modify or distribute
* the software.
*
*/
public class BillWmDeliverKey {
private String deliverNo;
private String locno;
private String ownerNo;
public String getDeliverNo() {
return deliverNo;
}
public void setDeliverNo(String deliverNo) {
this.deliverNo = deliverNo;
}
public String getLocno() {
return locno;
}
public void setLocno(String locno) {
this.locno = locno;
}
public String getOwnerNo() {
return ownerNo;
}
public void setOwnerNo(String ownerNo) {
this.ownerNo = ownerNo;
}
}
|
[
"heaven6059@126.com"
] |
heaven6059@126.com
|
f024472f8d8d2f181d63938deaf5500226270656
|
e612d59983e91772117c6607e3a3dfe25db6a78b
|
/zteguide/src/main/java/com/zteguidedemo/v0840/wifi/util/LogUtil.java
|
383c23ffb66eaca22edaeff19d585dffd4987637
|
[] |
no_license
|
pikingdom/MyProject001
|
65d3ff3ba35acd05e6f1716796b37d70edd25897
|
a1a564a4b20e4337464e49867ba8307428e4320b
|
refs/heads/master
| 2020-03-24T22:29:49.115821
| 2018-10-21T02:20:19
| 2018-10-21T02:20:19
| 143,088,389
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 788
|
java
|
package com.zteguidedemo.v0840.wifi.util;
import android.util.Log;
/**
* 对日志进行管理
* 在DeBug模式开启,其它模式关闭
* @author Llf
*/
public class LogUtil {
public static boolean isDebug=false;
/**
* 错误
* @param tag
* @param msg
*/
public static void e(String tag,String msg){
if(isDebug){
Log.e(tag, msg+"");
}
}
/**
* 信息
* @param tag
* @param msg
*/
public static void i(String tag,String msg){
if(isDebug){
Log.i(tag, msg+"");
}
}
/**
* 警告
* @param tag
* @param msg
*/
public static void w(String tag,String msg) {
if (isDebug) {
Log.w(tag, msg + "");
}
}
}
|
[
"zhenghonglin@felink.com"
] |
zhenghonglin@felink.com
|
b9f872b18f73d22411b55371e645d24e4c1b3c4b
|
9bd0d377afb094015b07afca0d15cdc8c3f1928c
|
/springcloud/cloud-eureka3/src/main/java/com/wj/EurekaApp3.java
|
72e8a7c2e03cb29494db8de9572880eb4bda86eb
|
[] |
no_license
|
wj1996/component
|
697a6da723579770ebbe1081c1be5eaab1574e4c
|
b6ae4c3c1b9605513ec53c12b7a2e31885a0bf8e
|
refs/heads/master
| 2022-12-28T13:15:21.599680
| 2021-04-27T13:04:54
| 2021-04-27T13:04:54
| 196,162,772
| 0
| 0
| null | 2022-12-16T00:47:30
| 2019-07-10T08:15:34
|
Java
|
UTF-8
|
Java
| false
| false
| 420
|
java
|
package com.wj;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
@SpringBootApplication
@EnableEurekaServer //表明自己是注册中心
public class EurekaApp3 {
public static void main(String[] args) {
SpringApplication.run(EurekaApp3.class,args);
}
}
|
[
"15236730688@163.com"
] |
15236730688@163.com
|
a4443653e2811bd623d33b1e0041524c7cb674a9
|
5f72537e8cceb3ea9a7072cf55986f67cb4c8520
|
/Jpa03PagingAndSortingRepository/src/main/java/online/qsx/repository/NewsPagingAndSortingRepository.java
|
7f14e3fc80afd42c911fc27f527dfa1535eafd86
|
[] |
no_license
|
yuanyixiong/SpringDataJPA
|
0a0b0f604e96064ccd568f788b9150826f660068
|
55239940145e36f527138e66c1b2315e9d744f46
|
refs/heads/master
| 2020-03-21T04:57:55.748992
| 2018-06-21T07:58:03
| 2018-06-21T07:58:20
| 138,136,909
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 245
|
java
|
package online.qsx.repository;
import org.springframework.data.repository.PagingAndSortingRepository;
import online.qsx.model.NewsModel;
public interface NewsPagingAndSortingRepository extends PagingAndSortingRepository<NewsModel, Long> {
}
|
[
"15926499574@163.com"
] |
15926499574@163.com
|
6321a079bc5fef6e3dd079d9d847754623449675
|
0f0e91a02f2ccbc37d243f827c87b3967f2e0535
|
/src/main/java/com/geibatista/cursomc/services/exceptions/ObjectNotFoundException.java
|
6b6908dedf89e17ac927e756452b8d412fce9213
|
[] |
no_license
|
GeiBatista/cursomc
|
5937023c836d436d9a2eb5e8545e5adbe4924d28
|
281cc7421c99d4c37bbe1c5a2832d3f1f72be624
|
refs/heads/master
| 2023-06-12T16:22:52.091929
| 2021-07-08T22:26:02
| 2021-07-08T22:26:02
| 298,903,723
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 323
|
java
|
package com.geibatista.cursomc.services.exceptions;
public class ObjectNotFoundException extends RuntimeException{
private static final long serialVersionUID = 1L;
public ObjectNotFoundException(String msg) {
super(msg);
}
public ObjectNotFoundException(String msg, Throwable cause) {
super(msg, cause);
}
}
|
[
"geibatista@hotmail.com"
] |
geibatista@hotmail.com
|
20e55993d42bd19e480c115e23c758cbdc2c7ab1
|
de3eb812d5d91cbc5b81e852fc32e25e8dcca05f
|
/tags/2.2.1-r1696/CruxShowcase/src/br/com/sysmap/crux/showcase/client/remote/SimpleGridServiceAsync.java
|
637353ed672209f1d71f8971fac9953b9c491691
|
[] |
no_license
|
svn2github/crux-framework
|
7dd52a951587d4635112987301c88db23325c427
|
58bcb4821752b405a209cfc21fb83e3bf528727b
|
refs/heads/master
| 2016-09-06T13:33:41.975737
| 2015-01-22T08:03:25
| 2015-01-22T08:03:25
| 13,135,398
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 282
|
java
|
package br.com.sysmap.crux.showcase.client.remote;
import br.com.sysmap.crux.showcase.client.dto.Contact;
import com.google.gwt.user.client.rpc.AsyncCallback;
public interface SimpleGridServiceAsync {
public void getContactList(AsyncCallback<Contact[]> callback);
}
|
[
"tr_bustamante@yahoo.com.br@a5d2bbaa-053c-11de-b17c-0f1ef23b492c"
] |
tr_bustamante@yahoo.com.br@a5d2bbaa-053c-11de-b17c-0f1ef23b492c
|
8ab7ede728c0f5b1ab01d759e85f51d561920062
|
0558bde59ea4699e3af128fbf7679d54a6ff855a
|
/bizz/seafood-otranse/src/main/java/com/eastinno/otransos/seafood/droduct/service/impl/NearRegionServiceImpl.java
|
4fd5ec3c2359874dd1ed1dde474fa54cc94d22ce
|
[] |
no_license
|
lingxfeng/seafood
|
758fccfc2ef4ff7b5ec1317de3fde32155cc0939
|
4015e374d373fa7df3de941b727161487610484d
|
refs/heads/master
| 2022-08-12T19:21:34.172827
| 2020-12-15T06:16:53
| 2020-12-15T06:17:08
| 81,176,380
| 1
| 2
| null | 2022-07-07T23:17:42
| 2017-02-07T06:50:25
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 5,197
|
java
|
package com.eastinno.otransos.seafood.droduct.service.impl;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.eastinno.otransos.core.domain.SystemRegion;
import com.eastinno.otransos.core.support.query.IQueryObject;
import com.eastinno.otransos.core.support.query.QueryObject;
import com.eastinno.otransos.web.tools.IPageList;
import com.eastinno.otransos.seafood.droduct.domain.NearRegion;
import com.eastinno.otransos.seafood.droduct.domain.RegionClass;
import com.eastinno.otransos.seafood.droduct.domain.RemoteRegion;
import com.eastinno.otransos.seafood.droduct.domain.NearRegion;
import com.eastinno.otransos.seafood.droduct.service.INearRegionService;
import com.eastinno.otransos.seafood.droduct.dao.INearRegionDAO;
import com.eastinno.otransos.seafood.droduct.dao.INearRegionDAO;
/**
* NearRegionServiceImpl
* @author ksmwly@gmail.com
*/
@Service
public class NearRegionServiceImpl implements INearRegionService{
@Resource
INearRegionDAO nearRegionDAO;
/**
* 依据主键id获取附近地区记录
* @param id
* @return
*/
public NearRegion getNearRegion(Long id){
return this.nearRegionDAO.get(id);
}
public INearRegionDAO getNearRegionDAO() {
return nearRegionDAO;
}
public void setNearRegionDAO(INearRegionDAO nearRegionDAO) {
this.nearRegionDAO = nearRegionDAO;
}
/**
* 添加一条附近地区记录
* @param remoteRegion
* @return
*/
public NearRegion addNearRegion(NearRegion remoteRegion){
return this.nearRegionDAO.save(remoteRegion);
}
/**
* 删除一条附近地区记录
* @param id
* @return
*/
public boolean delNearRegion(Long id){
try{
this.nearRegionDAO.delete(id);
}catch(Exception e){
return false;
}
return true;
}
/**
* 判断该地区是否为附近地区
* @param systemRegion
* @return
*/
public boolean isNearRegion(SystemRegion systemRegion){
boolean result = false;
QueryObject qo = new QueryObject();
qo.addQuery("obj.systemRegion.id", systemRegion.getId(), "=");
List regionList = this.nearRegionDAO.findBy(qo).getResult();
if(regionList!=null && regionList.size() == 1){
result = true;
}else{
result = false;
}
return result;
}
/**
* 判断该地区是否为附近地区
* @param systemRegion
* @return
*/
public boolean isNearRegion2(SystemRegion systemRegion,RegionClass regionClass){
boolean result = false;
QueryObject qo = new QueryObject();
qo.addQuery("obj.systemRegion.id", systemRegion.getId(), "=");
qo.addQuery("obj.regionClass.id",regionClass.getId(),"=");
System.out.println("systemRegion.getId()"+systemRegion.getId()+"。regionClass.getId()"+regionClass.getId());
List regionList = this.nearRegionDAO.findBy(qo).getResult();
if(regionList!=null && regionList.size() != 0){
System.out.println("regionList.size()"+regionList.size());
result = true;
}else{
result = false;
}
return result;
}
/**
* 批量设置list中的地区为附近地区
* @param systemRegion
* @return
*/
public boolean batchSetNearRegion(List<SystemRegion> systemRegionList){
this.nearRegionDAO.deleteAll();
for(int i=0; i<systemRegionList.size(); ++i){
SystemRegion systemRegion = systemRegionList.get(i);
NearRegion remoteRegion = new NearRegion();
remoteRegion.setCreateDate(new Date());
remoteRegion.setModifyDate(new Date());
remoteRegion.setSystemRegion(systemRegion);
try{
this.nearRegionDAO.save(remoteRegion);
}catch(Exception e){
return false;
}
}
return true;
}
/**
* 批量设置list中的地区为附近地区
* @param systemRegion
* @return
*/
public boolean batchSetNearRegion2(List<SystemRegion> systemRegionList,RegionClass regionClass){
QueryObject qo = new QueryObject();
qo.addQuery("obj.regionClass.id",regionClass.getId(),"=");
qo.setLimit(-1);
System.out.println("regionClass.getId()"+regionClass.getId());
List<NearRegion> list = this.nearRegionDAO.findBy(qo).getResult();
if(list != null && list.size() != 0){
System.out.println("需要刪除的附近地區"+list.size()+"条");
for(NearRegion nearRegion:list){
this.nearRegionDAO.delete(nearRegion);
}
}
for(int i=0; i<systemRegionList.size(); ++i){
SystemRegion systemRegion = systemRegionList.get(i);
NearRegion remoteRegion = new NearRegion();
remoteRegion.setCreateDate(new Date());
remoteRegion.setModifyDate(new Date());
remoteRegion.setSystemRegion(systemRegion);
remoteRegion.setRegionClass(regionClass);
try{
this.nearRegionDAO.save(remoteRegion);
}catch(Exception e){
return false;
}
}
return true;
}
/**
* 获取所有的附近地区
* @return
*/
public List<NearRegion> getAllNearRegion(){
return this.nearRegionDAO.findAll();
}
/**
* 获取所有的附近地区
* @return
*/
public List<NearRegion> getAllNearRegion2(RegionClass regionClass){
QueryObject qo = new QueryObject();
qo.setLimit(-1);
qo.addQuery("obj.regionClass.id",regionClass.getId(),"=");
List<NearRegion> list = this.nearRegionDAO.findBy(qo).getResult();
return list;
}
}
|
[
"991736913@qq.com"
] |
991736913@qq.com
|
a5093faa7284671ca059cb9721e0fc781db8f4b1
|
18b5f5b645410d235a246e0a50daa7aa15e47b77
|
/codegen/src/test/java/software/amazon/awssdk/codegen/poet/transform/CustomDefaultValueSupplier.java
|
42fca5373400f24338a6ae21ffd80f0c165b7a05
|
[
"Apache-2.0"
] |
permissive
|
nealkumar/aws-sdk-java-v2
|
1ceb06687132f161e417ce9a6d122bcabd1a4992
|
2ef135dea8599abde0b8a0027a5736848a55e6d0
|
refs/heads/master
| 2021-01-02T22:09:44.495111
| 2020-02-10T19:42:52
| 2020-02-10T19:42:52
| 239,818,845
| 0
| 0
|
Apache-2.0
| 2020-02-19T20:03:55
| 2020-02-11T17:09:51
| null |
UTF-8
|
Java
| false
| false
| 1,042
|
java
|
/*
* Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package software.amazon.awssdk.codegen.poet.transform;
import java.util.function.Supplier;
public class CustomDefaultValueSupplier {
/**
* Value that indicates the current account.
*/
private static final String VALUE = "BLAHBLAH";
private static final Supplier<String> INSTANCE = () -> VALUE;
private CustomDefaultValueSupplier() {
}
public static Supplier<String> getInstance() {
return INSTANCE;
}
}
|
[
"33073555+zoewangg@users.noreply.github.com"
] |
33073555+zoewangg@users.noreply.github.com
|
46752b09c119fc5d72e29f2da6d88bac6dcf308d
|
5e38cce6124cde265d3f0956d4e2f4fff6da9509
|
/src/main/java/com/springboot/mongodb/model/User.java
|
54bcdb0b31075ab766b3d8ebdcadc00384bf8e12
|
[] |
no_license
|
krishna07210/com-spring-mongodb-repo
|
07437c41573a323b9b6ff00347ccbf759d6e3df1
|
b2ba643731d08e1313ffdc45c32cbea73aabc9b9
|
refs/heads/master
| 2023-02-03T17:33:16.542920
| 2020-12-26T10:35:35
| 2020-12-26T10:35:35
| 324,532,091
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,129
|
java
|
package com.springboot.mongodb.model;
import java.util.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
@Document
public class User {
@Id
private String userid;
private String name;
private Date creatonDate = new Date();
private Map<String, String> userSettings = new HashMap<>();
public User(String userid, String name, Date creatonDate, Map<String, String> userSettings) {
super();
this.userid = userid;
this.name = name;
this.creatonDate = creatonDate;
this.userSettings = userSettings;
}
public String getUserid() {
return userid;
}
public void setUserid(String userid) {
this.userid = userid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Date getCreatonDate() {
return creatonDate;
}
public void setCreatonDate(Date creatonDate) {
this.creatonDate = creatonDate;
}
public Map<String, String> getUserSettings() {
return userSettings;
}
public void setUserSettings(Map<String, String> userSettings) {
this.userSettings = userSettings;
}
}
|
[
"="
] |
=
|
904fe730800dde853e626341136a2282f90d3805
|
f64a79c712ce9659cb1e7c27c15a766163e030ef
|
/webauthn4j-test/src/main/java/com/webauthn4j/test/authenticator/AuthenticatorAdaptor.java
|
07a4c5c9ba19d95259e11b76e0be98befcf9e79e
|
[
"Apache-2.0"
] |
permissive
|
kg0r0/webauthn4j
|
9ac73269b99ee57748b3639e0c4809dfa74f07b9
|
bcac44bb5f5ca9cd7f2d4aafbe49477caedf6f4a
|
refs/heads/master
| 2020-04-27T23:19:15.411039
| 2019-04-07T02:28:27
| 2019-04-07T02:28:27
| 174,770,911
| 0
| 0
|
Apache-2.0
| 2019-03-10T02:54:53
| 2019-03-10T02:54:52
| null |
UTF-8
|
Java
| false
| false
| 2,003
|
java
|
/*
* Copyright 2002-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 com.webauthn4j.test.authenticator;
import com.webauthn4j.data.PublicKeyCredentialCreationOptions;
import com.webauthn4j.data.PublicKeyCredentialRequestOptions;
import com.webauthn4j.data.client.CollectedClientData;
import com.webauthn4j.test.client.AuthenticationEmulationOption;
import com.webauthn4j.test.client.RegistrationEmulationOption;
public interface AuthenticatorAdaptor {
CredentialCreationResponse register(PublicKeyCredentialCreationOptions publicKeyCredentialCreationOptions,
CollectedClientData collectedClientData);
CredentialCreationResponse register(PublicKeyCredentialCreationOptions publicKeyCredentialCreationOptions,
CollectedClientData collectedClientData,
RegistrationEmulationOption registrationEmulationOption);
CredentialRequestResponse authenticate(PublicKeyCredentialRequestOptions publicKeyCredentialRequestOptions,
CollectedClientData collectedClientData);
CredentialRequestResponse authenticate(PublicKeyCredentialRequestOptions publicKeyCredentialRequestOptions,
CollectedClientData collectedClientData,
AuthenticationEmulationOption authenticationEmulationOption);
}
|
[
"mail@ynojima.net"
] |
mail@ynojima.net
|
cf956af59303f78e4e010ad190f2d55e46340947
|
e4aea93f2988e2cf1be4f96a39f6cc3328cbbd50
|
/src/com/flagleader/builder/actions/aK.java
|
65173a77ee2f7e411b9eeb17270a4a46d6ad04ab
|
[] |
no_license
|
lannerate/ruleBuilder
|
18116282ae55e9d56e9eb45d483520f90db4a1a6
|
b5d87495990aa1988adf026366e92f7cbb579b19
|
refs/heads/master
| 2016-09-05T09:13:43.879603
| 2013-11-10T08:32:58
| 2013-11-10T08:32:58
| 14,231,127
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,008
|
java
|
package com.flagleader.builder.actions;
import com.flagleader.builder.BuilderManager;
import com.flagleader.manager.builder.d;
import java.util.Hashtable;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.graphics.Point;
class aK extends MouseAdapter
{
aK(aq paramaq)
{
}
public void mouseDown(MouseEvent paramMouseEvent)
{
try
{
int i = aq.g(this.a).getLineAtOffset(aq.g(this.a).getOffsetAtLocation(new Point(paramMouseEvent.x, paramMouseEvent.y)));
String str = (String)aq.h(this.a).get(String.valueOf(i));
if (str != null)
aq.e(this.a).getProjectTree().b(str);
}
catch (RuntimeException localRuntimeException)
{
aq.g(this.a).setCursor(null);
}
}
}
/* Location: D:\Dev_tools\ruleEngine\rbuilder.jar
* Qualified Name: com.flagleader.builder.actions.aK
* JD-Core Version: 0.6.0
*/
|
[
"zhanghuizaizheli@hotmail.com"
] |
zhanghuizaizheli@hotmail.com
|
23244b3fc50a2044816427a5b1fa2dde42bb98be
|
414ebc48c256fccbefd35a3705be64879f4bd62c
|
/src/main/java/cn/mauth/account/common/bean/AppUserMobile.java
|
daa7c65775c6e975ede4f57abdd9684fd6030c65
|
[] |
no_license
|
hzw123/account
|
46837f5125b3e470c26360867f5caf21ce996083
|
82126dde8e8e9f79364b92528958fe1274a5f889
|
refs/heads/master
| 2020-04-16T09:32:27.579322
| 2019-02-12T08:33:49
| 2019-02-12T08:33:49
| 165,467,854
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 698
|
java
|
package cn.mauth.account.common.bean;
import java.io.Serializable;
public class AppUserMobile implements Serializable {
private static final long serialVersionUID = 1L;
private String userId;
private String mobile;
private String vericode;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getVericode() {
return vericode;
}
public void setVericode(String vericode) {
this.vericode = vericode;
}
}
|
[
"1127835288@qq.com"
] |
1127835288@qq.com
|
6350a0d645d857c8ae31aaf7bd19c42685560e65
|
692a7b9325014682d72bd41ad0af2921a86cf12e
|
/iZhejiang/src/org/dom4j/util/PerThreadSingleton.java
|
f9cfebed25562ac3df0e9b24ff9669bcf1b2b4e9
|
[] |
no_license
|
syanle/WiFi
|
f76fbd9086236f8a005762c1c65001951affefb6
|
d58fb3d9ae4143cbe92f6f893248e7ad788d3856
|
refs/heads/master
| 2021-01-20T18:39:13.181843
| 2015-10-29T12:38:57
| 2015-10-29T12:38:57
| 45,156,955
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,519
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package org.dom4j.util;
import java.lang.ref.WeakReference;
// Referenced classes of package org.dom4j.util:
// SingletonStrategy
public class PerThreadSingleton
implements SingletonStrategy
{
private ThreadLocal perThreadCache;
private String singletonClassName;
public PerThreadSingleton()
{
singletonClassName = null;
perThreadCache = new ThreadLocal();
}
public Object instance()
{
Object obj;
Object obj1;
obj = null;
obj1 = (WeakReference)perThreadCache.get();
if (obj1 != null && ((WeakReference) (obj1)).get() != null) goto _L2; else goto _L1
_L1:
obj1 = Thread.currentThread().getContextClassLoader().loadClass(singletonClassName).newInstance();
obj = obj1;
_L4:
perThreadCache.set(new WeakReference(obj));
return obj;
obj1;
obj1 = Class.forName(singletonClassName).newInstance();
obj = obj1;
continue; /* Loop/switch isn't completed */
_L2:
return ((WeakReference) (obj1)).get();
Exception exception;
exception;
if (true) goto _L4; else goto _L3
_L3:
}
public void reset()
{
perThreadCache = new ThreadLocal();
}
public void setSingletonClassName(String s)
{
singletonClassName = s;
}
}
|
[
"arehigh@gmail.com"
] |
arehigh@gmail.com
|
337acc6ef00a4dd20e1fa8956ddbafb5f3744942
|
228ecf0d6d294958cf09349b3e8a4f575c83ce3a
|
/src/main/java/org/seasar/doma/jdbc/PreparedSql.java
|
e5d3873f004b2c50c70d77bd5c373a0bbf1edf46
|
[
"Apache-2.0"
] |
permissive
|
smallclover/doma
|
29379415063d3ca5ad50b9b17dc4e5052f62a247
|
580d1d132461b99f17b6363b9bad6fe2464e94dc
|
refs/heads/master
| 2021-04-27T11:18:45.604036
| 2018-08-20T09:09:43
| 2018-08-20T09:09:43
| 122,559,719
| 0
| 0
|
Apache-2.0
| 2018-08-16T14:05:53
| 2018-02-23T01:51:51
|
Java
|
UTF-8
|
Java
| false
| false
| 1,497
|
java
|
/*
* Copyright 2004-2010 the Seasar Foundation and the Others.
*
* 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.seasar.doma.jdbc;
import java.util.List;
import java.util.function.Function;
/**
*
* @author taedium
*
*/
public class PreparedSql extends AbstractSql<InParameter<?>> {
public PreparedSql(SqlKind kind, CharSequence rawSql,
CharSequence formattedSql, String sqlFilePath,
List<? extends InParameter<?>> parameters, SqlLogType sqlLogType) {
this(kind, rawSql, formattedSql, sqlFilePath, parameters, sqlLogType,
Function.identity());
}
public PreparedSql(SqlKind kind, CharSequence rawSql,
CharSequence formattedSql, String sqlFilePath,
List<? extends InParameter<?>> parameters, SqlLogType sqlLogType,
Function<String, String> commenter) {
super(kind, rawSql, formattedSql, sqlFilePath, parameters, sqlLogType,
commenter);
}
}
|
[
"toshihiro.nakamura@gmail.com"
] |
toshihiro.nakamura@gmail.com
|
725b69597c88669f48bf5793e62ea99db5e1524e
|
d5d3ff3359c234c010ae84ff40755394b209724e
|
/Clients/RCP/Core/plugins/gov.pnnl.cat.ui.rcp/src/gov/pnnl/cat/ui/rcp/views/teams/TeamTreeDialog.java
|
d8cbcfca61a2927b4caefb293bdf6465651a4e46
|
[] |
no_license
|
purohitsumit/velo
|
59f58f60f926d22af270e14c6362b26d9a3b3d59
|
bd5ee6b395b2f48e1d8db613d92f567c55f9e736
|
refs/heads/master
| 2020-05-03T05:36:07.610106
| 2018-10-31T22:14:43
| 2018-10-31T22:14:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,163
|
java
|
/*******************************************************************************
* .
* Velo 1.0
* ----------------------------------------------------------
*
* Pacific Northwest National Laboratory
* Richland, WA 99352
*
* Copyright (c) 2013
* Pacific Northwest National Laboratory
* Battelle Memorial Institute
*
* Velo is an open-source collaborative content management
* and job execution environment
* distributed under the terms of the
* Educational Community License (ECL) 2.0
* A copy of the license is included with this distribution
* in the LICENSE.TXT file
*
* ACKNOWLEDGMENT
* --------------
*
* This software and its documentation were developed at Pacific
* Northwest National Laboratory, a multiprogram national
* laboratory, operated for the U.S. Department of Energy by
* Battelle under Contract Number DE-AC05-76RL01830.
******************************************************************************/
package gov.pnnl.cat.ui.rcp.views.teams;
import gov.pnnl.cat.core.resources.security.ITeam;
import gov.pnnl.cat.logging.CatLogger;
import org.apache.log4j.Logger;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.dialogs.SelectionDialog;
/**
*/
public class TeamTreeDialog extends SelectionDialog {
protected static Logger logger = CatLogger.getLogger(TeamTreeDialog.class);
private ITeam selectedTeam;
// private TeamTreeViewer treeViewer;
private TreeViewer treeViewer;
/**
* Constructor for TeamTreeDialog.
* @param parentShell Shell
*/
public TeamTreeDialog(Shell parentShell) {
super(parentShell);
setShellStyle(this.getShellStyle() | SWT.RESIZE);
}
/**
* Method createDialogArea.
* @param parent Composite
* @return Control
*/
protected Control createDialogArea(Composite parent) {
TeamFilteredTree filteredTree = new TeamFilteredTree(parent);
//treeViewer = (TeamTreeViewer)filteredTree.getViewer();
treeViewer = filteredTree.getViewer();
Tree tree = treeViewer.getTree();
GridData grid_data = createLayoutData();
parent.getShell().setText("Team Tree");
tree.setLayoutData(grid_data);
treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent e) {
if(!e.getSelection().isEmpty()){
StructuredSelection teamSelection = (StructuredSelection)(e.getSelection());
Object[] teams = teamSelection.toArray();
selectedTeam = (ITeam)teams[0];
//EZLogger.logWarning("selection:"+selectedTeam.getName(), null);
logger.warn("selection:"+selectedTeam.getName());
}
}
});
treeViewer.addDoubleClickListener(new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent e) {
if(!e.getSelection().isEmpty()){
StructuredSelection teamSelection = (StructuredSelection)(e.getSelection());
Object[] teams = teamSelection.toArray();
selectedTeam = (ITeam)teams[0];
}
okPressed();
}
});
// if they're already selected something, make that the selected item on the tree:
//TODO: this is not good yet
//Since we now use TeamFilteredTree which has its own TreeViewer,
//can we still implement TreeViewer::expandToPath(ITeam)?
//treeViewer.expandToPath(this.selectedTeam);
filteredTree.expandToPath(this.selectedTeam); //as Eric suggested
return treeViewer.getControl();
}
/**
* Method createLayoutData.
* @return GridData
*/
private GridData createLayoutData() {
GridData grid_data = new GridData();
grid_data.grabExcessHorizontalSpace = true;
grid_data.grabExcessVerticalSpace = true;
grid_data.horizontalAlignment = SWT.FILL;
grid_data.verticalAlignment = SWT.FILL;
return grid_data;
}
/**
* Method getInitialSize.
* @return Point
*/
protected Point getInitialSize() {
return new Point(375, 480);
}
/**
* Method getSelectedTeam.
* @return ITeam
*/
public ITeam getSelectedTeam() {
return selectedTeam;
}
/**
* Method setSelectedTeam.
* @param t ITeam
*/
public void setSelectedTeam(ITeam t) {
this.selectedTeam = t;
}
}
|
[
"timothy.stavenger@pnnl.gov"
] |
timothy.stavenger@pnnl.gov
|
57af2fd08d375a64c11baee3bd6bde98443d930d
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.socialplatform-base/sources/com/oculus/horizon/api/social/PYMKResponse.java
|
b99b964d53d215025650ee743a87b3f728d03b1e
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 913
|
java
|
package com.oculus.horizon.api.social;
import com.oculus.http.core.annotations.SingleEntryMapResponse;
import com.oculus.http.core.base.ValidatableApiResponse;
import java.util.ArrayList;
@SingleEntryMapResponse
public class PYMKResponse implements ValidatableApiResponse {
public final PeopleYouMayKnow people_you_may_know;
public static class PeopleYouMayKnow {
public final ArrayList<SocialUser> nodes;
}
@Override // com.oculus.http.core.base.ValidatableApiResponse
public void validate() throws RuntimeException {
PeopleYouMayKnow peopleYouMayKnow = this.people_you_may_know;
if (peopleYouMayKnow == null) {
throw new NullPointerException("PYMKResponse did not have a people_you_may_know");
} else if (peopleYouMayKnow.nodes == null) {
throw new NullPointerException("people_you_may_know had null for nodes");
}
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
c9e13f5c40fa74a8dc4f0976f999f8056841a7ed
|
cecc05df71d0af98853225f29ea36e72a6286e5e
|
/cdcommon/src/main/java/com/cdkj/baselibrary/base/AbsBaseLoadActivity.java
|
dbe9f4955f91d6a6e76417cbd2ac5b6648707d22
|
[] |
no_license
|
ibisTime/xn-h2h-candroid
|
aef8cd6eaefb90a5b9bdf579e9d4d9a81cbff01b
|
7ae3748ec397b71b4fbbaed549933cc7bfc7ac42
|
refs/heads/master
| 2021-08-26T07:27:17.756571
| 2017-11-22T07:44:31
| 2017-11-22T07:44:31
| 106,231,637
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,858
|
java
|
package com.cdkj.baselibrary.base;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.view.View;
import com.cdkj.baselibrary.R;
import com.cdkj.baselibrary.databinding.ActivityAbsBaseLoadBinding;
/**
* 带空页面,错误页面显示的BaseActivity 通过AbsBaseActivityj界面操作封装成View而来
*/
public abstract class AbsBaseLoadActivity extends BaseActivity {
protected ActivityAbsBaseLoadBinding mBaseBinding;
/**
* 布局文件xml的resId,无需添加标题栏、加载、错误及空页面
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mBaseBinding = DataBindingUtil.setContentView(this, R.layout.activity_abs_base_load);
mBaseBinding.titleView.setVisibility(canLoadTopTitleView() ? View.VISIBLE : View.GONE);
mBaseBinding.viewV.setVisibility(canLoadTopTitleView() ? View.VISIBLE : View.GONE);
mBaseBinding.contentView.addComtentView(addMainView());
mBaseBinding.titleView.setLeftFraClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (!canFinish()) {
topTitleViewleftClick();
}
finish();
}
});
mBaseBinding.titleView.setRightFraClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
topTitleViewRightClick();
}
});
setTitleWhileBg();
afterCreate(savedInstanceState);
}
/**
* 能否结束当前页面
*
* @return
*/
protected boolean canFinish() {
return true;
}
/**
* 能否加载标题
*
* @return
*/
protected boolean canLoadTopTitleView() {
return true;
}
/**
* 添加要显示的View
*/
public abstract View addMainView();
/**
* activity的初始化工作
*/
public abstract void afterCreate(Bundle savedInstanceState);
public void topTitleViewleftClick() {
}
public void topTitleViewRightClick() {
}
/**
* 设置title背景信息
*/
protected void setTitleWhileBg() {
mBaseBinding.titleView.setBackgroundColor(ContextCompat.getColor(this, R.color.white));
mBaseBinding.titleView.setLeftTitleColor(R.color.text_black_cd);
mBaseBinding.titleView.setRightTitleColor(R.color.text_black_cd);
mBaseBinding.titleView.setMidTitleColor(R.color.text_black_cd);
mBaseBinding.titleView.setLeftImg(R.drawable.back_black);
// if (canLoadTopTitleView()) {
// UIStatusBarHelper.setStatusBarLightMode(this); // 沉浸式状态栏
// }
}
}
|
[
"200951328@qq.com"
] |
200951328@qq.com
|
2c42925f4d89bc0916514fe906b6b22e8cf52f26
|
e852f4e9421ec7ceaf077abb07562ac7d012ec63
|
/serg/tags/2007-06-15/src/org/webdsl/serg/beans/AllAddressBeanInterface.java
|
ec95fa03659e1470d80031bef93a69a280604060
|
[] |
no_license
|
webdsl/webdsl-legacy-repo
|
e181f0d9f6874f88db1d870dd7000e8f6513b3a1
|
0a78926ff988ed8d56ae90aed782aa16072be87d
|
refs/heads/master
| 2021-01-21T12:43:37.550267
| 2015-06-19T16:05:29
| 2015-06-19T16:05:29
| 37,973,923
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 566
|
java
|
package org.webdsl.serg.beans;
import org.jboss.annotation.ejb.Local;
import javax.faces.event.ValueChangeEvent;
import java.util.*;
import org.webdsl.serg.domain.*;
@Local public interface AllAddressBeanInterface
{
public void initialize();
public void destroy();
public void removeAddress(Address address4);
public List<Person> getPerson34List();
public void initPerson34List();
public List<ResearchProject> getProject28List();
public void initProject28List();
public List<Address> getAddress3List();
public void initAddress3List();
}
|
[
"eelcovis@gmail.com"
] |
eelcovis@gmail.com
|
ee74a441b8c28cb3778dc70510fb1f0522daaef0
|
1fd05b32e1858a7a5a19f1804c32cb7f797443f6
|
/trunk/netx-fuse/src/main/java/com/netx/fuse/client/worth/WzDataClientAction.java
|
34b3e3fbcb2d1533420c6b5ac5acb86675e4e7d0
|
[] |
no_license
|
biantaiwuzui/netx
|
089a81cf53768121f99cb54a3daf2f6a1ec3d4c7
|
56c6e07864bd199befe90f8475bf72988c647392
|
refs/heads/master
| 2020-03-26T22:57:06.970782
| 2018-09-13T02:25:48
| 2018-09-13T02:25:48
| 145,498,445
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,391
|
java
|
package com.netx.fuse.client.worth;
import com.baomidou.mybatisplus.plugins.Page;
import com.netx.common.wz.dto.common.CommonPageDto;
import com.netx.fuse.biz.worth.MeetingFuseAction;
import com.netx.fuse.biz.worth.WishFuseAction;
import com.netx.worth.biz.demand.DemandAction;
import com.netx.worth.biz.common.GiftAction;
import com.netx.worth.biz.common.InvitationAction;
import com.netx.worth.biz.meeting.MeetingAction;
import com.netx.worth.biz.skill.SkillAction;
import com.netx.worth.biz.wish.WishAction;
import com.netx.worth.model.Demand;
import com.netx.worth.model.DemandRegister;
import com.netx.worth.model.MeetingRegister;
import com.netx.worth.model.MeetingSend;
import com.netx.worth.model.Skill;
import com.netx.worth.model.SkillRegister;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;
@Service
public class WzDataClientAction {
private Logger logger = LoggerFactory.getLogger(this.getClass().getSimpleName());
@Autowired
private GiftAction giftAction;
@Autowired
private InvitationAction invitationAction;
@Autowired
private WishAction wishAction;
@Autowired
private SkillAction skillAction;
@Autowired
private DemandAction demandAction;
@Autowired
private MeetingAction meetingAction;
@Autowired
private MeetingFuseAction meetingFuseAction;
@Autowired
private WishFuseAction wishFuseAction;
public Integer giftCount(String userId) {
try {
return giftAction.getReceiveCount(userId);
}catch (Exception e) {
logger.error(e.getMessage(),e);
}
return null;
}
public Integer invitationCount(String userId) {
try {
return invitationAction.getReceiveCount(userId);
}catch (Exception e) {
logger.error(e.getMessage(),e);
}
return null;
}
// public Map<String, Object> supportWishList(CommonPageDto commonPageDto) {
// try {
// Page<WishSupport> page = new Page<>(commonPageDto.getCurrentPage(), commonPageDto.getSize());
// return wishFuseAction.getSupportListByWish(commonPageDto.getId(), page);
// }catch (Exception e) {
// logger.error(e.getMessage(),e);
// }
// return null;
// }
public Map<String, Object> sendSkillList(CommonPageDto commonPageDto) {
try {
Page<Skill> page = new Page<>(commonPageDto.getCurrentPage(), commonPageDto.getSize());
return skillAction.publishList(commonPageDto.getUserId(), page);
}catch (Exception e) {
logger.error(e.getMessage(),e);
}
return null;
}
public Map<String, Object> registerSkillList(CommonPageDto commonPageDto) {
try {
Page<SkillRegister> page = new Page<>(commonPageDto.getCurrentPage(), commonPageDto.getSize());
Page<Skill> repage = new Page<>(commonPageDto.getCurrentPage(), commonPageDto.getSize());
// return skillAction.getRegisterList(commonPageDto.getUserId(),repage,page);
}catch (Exception e) {
logger.error(e.getMessage(),e);
}
return null;
}
public Map<String, Object> sendDemandList(CommonPageDto commonPageDto) {
try {
Page<Demand> page = new Page<>(commonPageDto.getCurrentPage(), commonPageDto.getSize());
return demandAction.getUserPublishDemand(commonPageDto.getUserId(), page);
}catch (Exception e) {
logger.error(e.getMessage(),e);
}
return null;
}
public Map<String, Object> registerDemandList(CommonPageDto commonPageDto) {
try {
Page<DemandRegister> page = new Page<>(commonPageDto.getCurrentPage(), commonPageDto.getSize());
return demandAction.getUserRegDemand(commonPageDto.getId(), commonPageDto.getUserId(), page);
}catch (Exception e) {
logger.error(e.getMessage(),e);
}
return null;
}
public Map<String, Object> sendMeetingList(CommonPageDto commonPageDto) {
try {
Page<MeetingSend> page = new Page<>(commonPageDto.getCurrentPage(), commonPageDto.getSize());
return meetingFuseAction.getUserSendMeeting(commonPageDto.getUserId(), null,null,page);
}catch (Exception e) {
logger.error(e.getMessage(),e);
}
return null;
}
public Map<String, Object> receiveMeetinList(CommonPageDto commonPageDto) {
try {
Page<MeetingRegister> page = new Page<>(commonPageDto.getCurrentPage(), commonPageDto.getSize());
// return meetingFuseAction.getUserRegMeeting(commonPageDto.getUserId(), null,null,page);
}catch (Exception e) {
logger.error(e.getMessage(),e);
}
return null;
}
}
|
[
"3043168786@qq.com"
] |
3043168786@qq.com
|
4db0b73cdbb0115bff063ca4792b1e008f79bb91
|
128eb90ce7b21a7ce621524dfad2402e5e32a1e8
|
/laravel-converted/src/main/java/com/project/convertedCode/servlets/vendor/swiftmailer/swiftmailer/lib/dependency_maps/servlet_message_deps_php.java
|
7770fb169b5513969aed471c0fad80aefc524522
|
[
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] |
permissive
|
RuntimeConverter/RuntimeConverterLaravelJava
|
657b4c73085b4e34fe4404a53277e056cf9094ba
|
7ae848744fbcd993122347ffac853925ea4ea3b9
|
refs/heads/master
| 2020-04-12T17:22:30.345589
| 2018-12-22T10:32:34
| 2018-12-22T10:32:34
| 162,642,356
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,186
|
java
|
package com.project.convertedCode.servlets.vendor.swiftmailer.swiftmailer.lib.dependency_maps;
import com.runtimeconverter.runtime.includes.RuntimeIncludable;
import com.runtimeconverter.runtime.includes.RuntimeConverterServlet;
import com.runtimeconverter.runtime.RuntimeEnv;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.annotation.WebServlet;
@WebServlet("/vendor/swiftmailer/swiftmailer/lib/dependency_maps/message_deps.php")
public class servlet_message_deps_php extends RuntimeConverterServlet {
protected final RuntimeIncludable getInclude() {
return com.project
.convertedCode
.includes
.vendor
.swiftmailer
.swiftmailer
.lib
.dependency_maps
.file_message_deps_php
.instance;
}
protected final RuntimeEnv getRuntimeEnv(
String httpRequestType, HttpServletRequest req, HttpServletResponse resp) {
return new com.project.convertedCode.main.ConvertedProjectRuntimeEnv(
req, resp, this.getInclude());
}
}
|
[
"git@runtimeconverter.com"
] |
git@runtimeconverter.com
|
2e0d7327e97db2fc20dc423c6921a2db825f8169
|
1d2fda2245888413e3eef8798a61236822f022db
|
/target/classes/com/wurmonline/server/questions/VillageJoinQuestion.java
|
c510f526ba080df96487049e19f5e0c4508eaa5a
|
[
"IJG"
] |
permissive
|
SynieztroLedPar/Wu
|
3b4391e916f6a5605d60663f800702f3e45d5dfc
|
5f7daebc2fb430411ddb76a179005eeecde9802b
|
refs/heads/master
| 2023-04-29T17:27:08.301723
| 2020-10-10T22:28:40
| 2020-10-10T22:28:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,506
|
java
|
package com.wurmonline.server.questions;
import com.wurmonline.server.NoSuchPlayerException;
import com.wurmonline.server.Server;
import com.wurmonline.server.creatures.Communicator;
import com.wurmonline.server.creatures.Creature;
import com.wurmonline.server.creatures.NoSuchCreatureException;
import com.wurmonline.server.villages.Village;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
public final class VillageJoinQuestion
extends Question
{
private static final Logger logger = Logger.getLogger(VillageJoinQuestion.class.getName());
private final Creature invited;
public VillageJoinQuestion(Creature aResponder, String aTitle, String aQuestion, long aTarget)
throws NoSuchCreatureException, NoSuchPlayerException
{
super(aResponder, aTitle, aQuestion, 11, aTarget);
this.invited = Server.getInstance().getCreature(aTarget);
}
public void answer(Properties answers)
{
setAnswer(answers);
QuestionParser.parseVillageJoinQuestion(this);
}
public Creature getInvited()
{
return this.invited;
}
public void sendQuestion()
{
Village village = getResponder().getCitizenVillage();
if (village != null)
{
StringBuilder buf = new StringBuilder();
buf.append(getBmlHeader());
buf.append("text{type=\"bold\";text=\"Joining settlement " + village.getName() + ":\"}");
buf.append("text{text=\"You have been invited by " + getResponder().getName() + " to join " + village.getName() + ". \"}");
if ((getInvited().isPlayer()) && (getInvited().mayChangeVillageInMillis() > 0L))
{
buf.append("text{text=\"You may not change settlement in " +
Server.getTimeFor(getInvited().mayChangeVillageInMillis()) + ". \"}");
}
else
{
Village currvill = getInvited().getCitizenVillage();
if (currvill != null) {
buf.append("text{text=\"Your " + currvill.getName() + " citizenship will be revoked. \"}");
} else {
buf.append("text{text=\"You are currently not citizen in any settlement. \"}");
}
if (village.isDemocracy()) {
buf.append("text{text=\"" + village
.getName() + " is a democracy. This means your citizenship cannot be revoked by any city officials such as the mayor. \"}");
} else {
buf.append("text{text=\"" + village
.getName() + " is a non-democracy. This means your citizenship can be revoked by any city officials such as the mayor. \"}");
}
buf.append("text{text=\"Do you want to join " + village.getName() + "?\"}");
buf.append("radio{ group=\"join\"; id=\"true\";text=\"Yes\"}");
buf.append("radio{ group=\"join\"; id=\"false\";text=\"No\";selected=\"true\"}");
}
buf.append(createAnswerButton2());
getInvited().getCommunicator().sendBml(300, 300, true, true, buf.toString(), 200, 200, 200, this.title);
}
else
{
logger.log(Level.WARNING, getResponder().getName() + " tried to invite to null settlement!");
getResponder().getCommunicator().sendNormalServerMessage("Failed to locate the settlement for that invitation. Please contact administration.");
}
}
}
/* Location: C:\Games\SteamLibrary\steamapps\common\Wurm Unlimited Dedicated Server\server.jar!\target\classes\com\wurmonline\server\questions\VillageJoinQuestion.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 0.7.1
*/
|
[
"dwayne.griffiths@outlook.com"
] |
dwayne.griffiths@outlook.com
|
d4a1d25d6cf77b43b248200abf2d45eece880889
|
99a15911a848676894f7cbae01d514d052f16043
|
/ai-soccer/MySoccer/src/common/misc/Utils.java
|
1dc0d719557f726d3e1494ee37f99dbb38fcda75
|
[
"MIT"
] |
permissive
|
algerd/ai
|
13f2adb6a7c7eea27e64c23912186513a9dc8baf
|
4fa0212d4fe30106b497fd4f9c44399866185b76
|
refs/heads/master
| 2021-01-11T10:16:28.198572
| 2016-11-01T15:49:14
| 2016-11-01T15:49:14
| 72,550,742
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,513
|
java
|
package common.misc;
import java.util.Random;
final public class Utils {
static public final int MaxInt = Integer.MAX_VALUE;
static public final double MaxDouble = Double.MAX_VALUE;
static public final double MinDouble = Double.MIN_VALUE;
static public final float MaxFloat = Float.MAX_VALUE;
static public final float MinFloat = Float.MIN_VALUE;
static public final double Pi = Math.PI;
static public final double TwoPi = Math.PI * 2;
static public final double HalfPi = Math.PI / 2;
static public final double QuarterPi = Math.PI / 4;
static public final double EpsilonDouble = Double.MIN_NORMAL;
static private Random rand = new Random();
static private double y2 = 0;
static private boolean use_last = false;
/**
* returns true if the value is a NaN
*/
public static <T> boolean isNaN(T val) {
return !(val != null);
}
static public double degsToRads(double degs) {
return TwoPi * (degs / 360.0);
}
static public boolean isEqual(float a, float b) {
if (Math.abs(a - b) < 1E-12) {
return true;
}
return false;
}
//----------------------------------------------------------------------------
// some random number functions.
//----------------------------------------------------------------------------
static public void setSeed(long seed) {
rand.setSeed(seed);
}
//returns a random integer between x and y
static public int randInt(int x, int y) {
assert y >= x : "<RandInt>: y is less than x";
return rand.nextInt(Integer.MAX_VALUE - x) % (y - x + 1) + x;
}
//returns a random double between zero and 1
static public double randFloat() {
return rand.nextDouble();
}
static public double randInRange(double x, double y) {
return x + randFloat() * (y - x);
}
//returns a random bool
static public boolean randBool() {
if (randFloat() > 0.5) {
return true;
} else {
return false;
}
}
//returns a random double in the range -1 < n < 1
static public double randomClamped() {
return randFloat() - randFloat();
}
//returns a random number with a normal distribution. See method at
//http://www.taygeta.com/random/gaussian.html
static public double randGaussian() {
return randGaussian(0, 1);
}
static public double randGaussian(double mean, double standard_deviation) {
double x1, x2, w, y1;
if (use_last) /* use value from previous call */ {
y1 = y2;
use_last = false;
} else {
do {
x1 = 2.0 * randFloat() - 1.0;
x2 = 2.0 * randFloat() - 1.0;
w = x1 * x1 + x2 * x2;
} while (w >= 1.0);
w = Math.sqrt((-2.0 * Math.log(w)) / w);
y1 = x1 * w;
y2 = x2 * w;
use_last = true;
}
return (mean + y1 * standard_deviation);
}
//-----------------------------------------------------------------------
// some handy little functions
//-----------------------------------------------------------------------
public static double sigmoid(double input) {
return sigmoid(input, 1.0);
}
public static double sigmoid(double input, double response) {
return (1.0 / (1.0 + Math.exp(-input / response)));
}
//returns the maximum of two values
public static <T extends Comparable> T maxOf(T a, T b) {
if (a.compareTo(b) > 0) {
return a;
}
return b;
}
//returns the minimum of two values
public static <T extends Comparable> T minOf(T a, T b) {
if (a.compareTo(b) < 0) {
return a;
}
return b;
}
/**
* clamps the first argument between the second two
*/
public static <T extends Number> T clamp(final T arg, final T minVal, final T maxVal) {
assert (minVal.doubleValue() < maxVal.doubleValue()) : "<Clamp>MaxVal < MinVal!";
if (arg.doubleValue() < minVal.doubleValue()) {
return minVal;
}
if (arg.doubleValue() > maxVal.doubleValue()) {
return maxVal;
}
return arg;
}
static public boolean isEqual(double a, double b) {
if (Math.abs(a - b) < 1E-12) {
return true;
}
return false;
}
}
|
[
"algerd75@mail.ru"
] |
algerd75@mail.ru
|
8bbf9a240fd9811d380a0e14a844b3023392cd6f
|
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
|
/database/src/main/java/adila/db/chagalllte_sm2dt805m.java
|
1da16a6833a81f4137a8a35a0adfc0b4f019501d
|
[
"MIT"
] |
permissive
|
karim/adila
|
8b0b6ba56d83f3f29f6354a2964377e6197761c4
|
00f262f6d5352b9d535ae54a2023e4a807449faa
|
refs/heads/master
| 2021-01-18T22:52:51.508129
| 2016-11-13T13:08:04
| 2016-11-13T13:08:04
| 45,054,909
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 256
|
java
|
// This file is automatically generated.
package adila.db;
/*
* Samsung Galaxy Tab S 10.5
*
* DEVICE: chagalllte
* MODEL: SM-T805M
*/
final class chagalllte_sm2dt805m {
public static final String DATA = "Samsung|Galaxy Tab S 10.5|Galaxy Tab";
}
|
[
"keldeeb@gmail.com"
] |
keldeeb@gmail.com
|
dd0fc80c3dc5ba15935c8786a13f808659377ded
|
60c69c0e8de4a464ac9f175de9451feaf06e51bb
|
/bbb-voice/src/main/java/org/bigbluebutton/voiceconf/red5/media/RtpStreamSender.java
|
392d1352f67a64c50a51ee2f55adb66921beb878
|
[] |
no_license
|
binondord/bigbluebutton
|
1723e8f852780176b40bd6ceea19a846822f8135
|
bcd8d07b9f72fe7355027edcedc4eda9be1fb060
|
refs/heads/master
| 2021-01-18T18:21:05.828138
| 2010-12-07T21:09:27
| 2010-12-07T21:09:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,796
|
java
|
/**
*
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2010 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2.1 of the License, or (at your option) any later
* version.
*
* BigBlueButton 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 BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
**/
package org.bigbluebutton.voiceconf.red5.media;
import java.io.IOException;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Random;
import org.slf4j.Logger;
import org.bigbluebutton.voiceconf.red5.media.net.RtpPacket;
import org.bigbluebutton.voiceconf.red5.media.net.RtpSocket;
import org.bigbluebutton.voiceconf.sip.SipConnectInfo;
import org.bigbluebutton.voiceconf.util.StackTraceUtil;
import org.red5.logging.Red5LoggerFactory;
public class RtpStreamSender {
private static Logger log = Red5LoggerFactory.getLogger(RtpStreamSender.class, "sip");
private static final int RTP_HEADER_SIZE = 12;
private RtpSocket rtpSocket = null;
private int sequenceNum = 0;
private final DatagramSocket srcSocket;
private final SipConnectInfo connInfo;
private boolean marked = false;
private long startTimestamp;
public RtpStreamSender(DatagramSocket srcSocket, SipConnectInfo connInfo) {
this.srcSocket = srcSocket;
this.connInfo = connInfo;
}
public void connect() throws StreamException {
try {
rtpSocket = new RtpSocket(srcSocket, InetAddress.getByName(connInfo.getRemoteAddr()), connInfo.getRemotePort());
Random rgen = new Random();
sequenceNum = rgen.nextInt(1000);
} catch (UnknownHostException e) {
log.error("Failed to connect to {}", connInfo.getRemoteAddr());
log.error(StackTraceUtil.getStackTrace(e));
throw new StreamException("Rtp sender failed to connect to " + connInfo.getRemoteAddr() + ".");
}
}
public void sendAudio(byte[] audioData, int codecId, long timestamp) {
byte[] transcodedAudioDataBuffer = new byte[audioData.length + RTP_HEADER_SIZE];
System.arraycopy(audioData, 0, transcodedAudioDataBuffer, RTP_HEADER_SIZE, audioData.length);
RtpPacket rtpPacket = new RtpPacket(transcodedAudioDataBuffer, transcodedAudioDataBuffer.length);
if (!marked) {
rtpPacket.setMarker(true);
marked = true;
startTimestamp = System.currentTimeMillis();
}
rtpPacket.setPadding(false);
rtpPacket.setExtension(false);
rtpPacket.setPayloadType(codecId);
rtpPacket.setSeqNum(sequenceNum++);
rtpPacket.setTimestamp(System.currentTimeMillis() - startTimestamp);
rtpPacket.setPayloadLength(audioData.length);
try {
rtpSocketSend(rtpPacket);
} catch (StreamException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
private synchronized void rtpSocketSend(RtpPacket rtpPacket) throws StreamException {
try {
rtpSocket.send(rtpPacket);
} catch (IOException e) {
log.error("Exception while trying to send rtp packet");
log.error(StackTraceUtil.getStackTrace(e));
throw new StreamException("Failed to send data to server.");
}
}
}
|
[
"ritzalam@gmail.com"
] |
ritzalam@gmail.com
|
e53ee47cf886967d103fb3a23b9b283877208475
|
4981fc0e1e82dc9226116aa8f0a29413c947b0ec
|
/Build/src/main/org/apache/tools/ant/types/resources/selectors/InstanceOf.java
|
bb663f0a3ab20232c189e0f8e16a5ade844384fc
|
[
"W3C",
"GPL-1.0-or-later",
"SAX-PD",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-unknown",
"MIT"
] |
permissive
|
Mayo-WE01051879/mayosapp
|
7e33d4b73b20e6f58f0ae593ae7c9ac10afff20c
|
4c678635cfd2823c2df6937165e102fdac72cb86
|
refs/heads/master
| 2022-12-10T01:22:54.629304
| 2021-02-24T20:16:36
| 2021-02-24T20:16:36
| 16,258,006
| 0
| 0
|
MIT
| 2022-12-05T23:23:59
| 2014-01-26T17:50:40
|
Java
|
UTF-8
|
Java
| false
| false
| 3,807
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.tools.ant.types.resources.selectors;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.ProjectHelper;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.ComponentHelper;
import org.apache.tools.ant.AntTypeDefinition;
import org.apache.tools.ant.types.Resource;
/**
* InstanceOf ResourceSelector.
* @since Ant 1.7
*/
public class InstanceOf implements ResourceSelector {
private static final String ONE_ONLY = "Exactly one of class|type must be set.";
private Project project;
private Class<?> clazz;
private String type;
private String uri;
/**
* Set the Project instance for this InstanceOf selector.
* @param p the Project instance used for type comparisons.
*/
public void setProject(Project p) {
project = p;
}
/**
* Set the class to compare against.
* @param c the class.
*/
public void setClass(Class<?> c) {
if (clazz != null) {
throw new BuildException("The class attribute has already been set.");
}
clazz = c;
}
/**
* Set the Ant type to compare against.
* @param s the type name.
*/
public void setType(String s) {
type = s;
}
/**
* Set the URI in which the Ant type, if specified, should be defined.
* @param u the URI.
*/
public void setURI(String u) {
uri = u;
}
/**
* Get the comparison class.
* @return the Class object.
*/
public Class<?> getCheckClass() {
return clazz;
}
/**
* Get the comparison type.
* @return the String typename.
*/
public String getType() {
return type;
}
/**
* Get the type's URI.
* @return the String URI.
*/
public String getURI() {
return uri;
}
/**
* Return true if this Resource is selected.
* @param r the Resource to check.
* @return whether the Resource was selected.
* @throws BuildException if an error occurs.
*/
public boolean isSelected(Resource r) {
if ((clazz == null) == (type == null)) {
throw new BuildException(ONE_ONLY);
}
Class<?> c = clazz;
if (type != null) {
if (project == null) {
throw new BuildException(
"No project set for InstanceOf ResourceSelector; "
+ "the type attribute is invalid.");
}
AntTypeDefinition d = ComponentHelper.getComponentHelper(
project).getDefinition(ProjectHelper.genComponentName(uri, type));
if (d == null) {
throw new BuildException("type " + type + " not found.");
}
try {
c = d.innerGetTypeClass();
} catch (ClassNotFoundException e) {
throw new BuildException(e);
}
}
return c.isAssignableFrom(r.getClass());
}
}
|
[
"delapaz.mayo@gmail.com"
] |
delapaz.mayo@gmail.com
|
d0d7d2121543f4cc0230599ae752744236f5bfd6
|
5a13f24c35c34082492ef851fb91d404827b7ddb
|
/src/test/java/ConverJavaFileToUTF8.java
|
f05095e667a390aa635401645d1f86bded411e47
|
[] |
no_license
|
featherfly/alipay-sdk
|
69b2f2fc89a09996004b36373bd5512664521bfd
|
ba2355a05de358dc15855ffaab8e19acfa24a93b
|
refs/heads/master
| 2021-01-22T11:03:20.304528
| 2017-09-04T09:39:42
| 2017-09-04T09:39:42
| 102,344,436
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,071
|
java
|
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import org.apache.commons.io.FileUtils;
public class ConverJavaFileToUTF8 {
public static void main(String[] args) throws IOException {
// GBK编码格式源码路径
String srcDirPath = "D:\\workspace\\eclipse_workspace\\eclipse_ff\\alipay-sdk\\src\\main\\java3";
// 转为UTF-8编码格式源码路径
String utf8DirPath = "D:\\workspace\\eclipse_workspace\\eclipse_ff\\alipay-sdk\\src\\main\\java";
// 获取所有java文件
Collection<File> javaGbkFileCol = FileUtils.listFiles(new File(srcDirPath), new String[] {"java"}, true);
for (File javaGbkFile : javaGbkFileCol) {
// UTF8格式文件路径
String utf8FilePath = utf8DirPath + javaGbkFile.getAbsolutePath().substring(srcDirPath.length());
// 使用GBK读取数据,然后用UTF-8写入数据
FileUtils.writeLines(new File(utf8FilePath), "UTF-8", FileUtils.readLines(javaGbkFile));
}
}
}
|
[
"zhongj@cdmhzx.com"
] |
zhongj@cdmhzx.com
|
ac19f7a522ecb40ce571ee0ab33097bfef304f46
|
8dadce08a76ce387608951673fc0364feaa9a06a
|
/flexodesktop/GUI/flexodoceditor/src/main/java/org/openflexo/doceditor/controller/action/MoveTOCEntryInitializer.java
|
29aca3a92368591bd66eba8f0b520c02e22301d3
|
[] |
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,966
|
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.doceditor.controller.action;
import java.awt.event.ActionEvent;
import java.util.logging.Logger;
import org.openflexo.foundation.action.FlexoActionFinalizer;
import org.openflexo.foundation.action.FlexoActionInitializer;
import org.openflexo.foundation.toc.action.MoveTOCEntry;
import org.openflexo.view.controller.ActionInitializer;
import org.openflexo.view.controller.ControllerActionInitializer;
public class MoveTOCEntryInitializer extends ActionInitializer {
private static final Logger logger = Logger.getLogger(ControllerActionInitializer.class.getPackage().getName());
public MoveTOCEntryInitializer(ControllerActionInitializer actionInitializer)
{
super(MoveTOCEntry.actionType,actionInitializer);
}
@Override
protected FlexoActionInitializer<MoveTOCEntry> getDefaultInitializer()
{
return new FlexoActionInitializer<MoveTOCEntry>() {
@Override
public boolean run(ActionEvent e, MoveTOCEntry action)
{
return true;
}
};
}
@Override
protected FlexoActionFinalizer<MoveTOCEntry> getDefaultFinalizer()
{
return new FlexoActionFinalizer<MoveTOCEntry>() {
@Override
public boolean run(ActionEvent e, MoveTOCEntry action)
{
return true;
}
};
}
}
|
[
"guillaume.polet@gmail.com"
] |
guillaume.polet@gmail.com
|
663e89c146c2e677e8d17449e8e972fd9a5684d3
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-13141-40-6-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/container/servlet/filters/internal/SetHTTPHeaderFilter_ESTest.java
|
d7ca9f4b886803fcb2a78cfba530293742455d1a
|
[] |
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
| 589
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sun Jan 19 03:04:27 UTC 2020
*/
package org.xwiki.container.servlet.filters.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class SetHTTPHeaderFilter_ESTest extends SetHTTPHeaderFilter_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
a29df049c785fea696828e3a245af97955370c94
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/49/org/apache/commons/math/ode/ContinuousOutputModel_handleStep_190.java
|
2b22e489f37e81933724e981a64f441d2a159890
|
[] |
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
| 2,334
|
java
|
org apach common math od
store inform provid od integr
integr process build continu model
solut
act step handler integr point
view call iter integr process
store copi step inform sort collect
integr process user
link set interpol time setinterpolatedtim set interpol time setinterpolatedtim link
interpol state getinterpolatedst interpol state getinterpolatedst retriev
inform time import wait
integr attempt call link
set interpol time setinterpolatedtim set interpol time setinterpolatedtim intern
variabl set step handl
main loop user
applic remain independ integr process
mimic behaviour analyt model
numer model abil
model time navig
data
problem model separ
integr phase contigu interv
continu output model continuousoutputmodel step handler
integr phase perform order
direct extrapol
trajectori satellit model set
differenti equat begin maneuv
complex model includ thruster model
accur attitud control maneuv revert
model end maneuv continu
output model handl step integr phase user
bother maneuv begin end
data transpar manner
import featur
code serializ code mean result
integr serial reus store
persist medium filesystem databas
applic result integr
store refer integr problem
awar amount data store
continu output model continuousoutputmodel instanc import state vector
larg integr interv step
small result small toler set link
org apach common math od nonstiff adapt stepsiz integr adaptivestepsizeintegr adapt
step size integr
step handler stephandl
step interpol stepinterpol
version
continu output model continuousoutputmodel
handl accept step
copi inform provid step store
instanc
param interpol interpol accept step
param islast step
except math user except mathuserexcept user code call step interpol
final trigger
handl step handlestep step interpol stepinterpol interpol islast
math user except mathuserexcept
step size
initi time initialtim interpol previou time getprevioustim
forward interpol forward isforward
step add interpol copi
islast
time finaltim interpol current time getcurrenttim
index step size
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
ab435d4e463b0fdba6279859d2f3145303500f5c
|
962a6192bbbadcd1a314026406670d8e87db83f5
|
/talkTV30/src/main/java/com/sumavision/talktv2/http/json/PointRequest.java
|
e67590756326434560e3dfd16987caef52542cd2
|
[] |
no_license
|
sharpayzara/TalkTV3.0_Studio_yy
|
1aa09c1b5ba697514535a507fd017faf1db81b06
|
801afa091aa41835873f466655872190745a9d93
|
refs/heads/master
| 2021-01-19T16:04:12.195817
| 2017-04-13T21:00:19
| 2017-04-13T21:00:19
| 88,245,487
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 813
|
java
|
package com.sumavision.talktv2.http.json;
import org.json.JSONException;
import org.json.JSONObject;
import com.sumavision.talktv2.bean.JSONMessageType;
import com.sumavision.talktv2.bean.UserNow;
import com.sumavision.talktv2.utils.Constants;
/**
* 赚积分任务列表
*
* @author suma-hpb
*
*/
public class PointRequest extends BaseJsonRequest {
@Override
public JSONObject make() {
JSONObject jsonObject = new JSONObject();
try {
jsonObject.put("method", Constants.userTaskList);
jsonObject.put("version", "2.6.0");
jsonObject.put("client", JSONMessageType.SOURCE);
jsonObject.put("userId", UserNow.current().userID);
jsonObject.put("jsession", UserNow.current().jsession);
} catch (JSONException e) {
e.printStackTrace();
return null;
}
return jsonObject;
}
}
|
[
"864064269@qq.com"
] |
864064269@qq.com
|
83f252849e10ee0d319051974aa2e2885621a0f6
|
09a00394429e4bad33d18299358a54fcd395423d
|
/gradle/wrapper/dists/gradle-2.2.1-all/c64ydeuardnfqctvr1gm30w53/gradle-2.2.1/src/platform-base/org/gradle/platform/base/internal/DefaultPlatformContainer.java
|
4b9b9c93da11c309fb1a8a0a6b0a044b32a44551
|
[
"BSD-2-Clause",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LGPL-2.1-or-later",
"MIT",
"CPL-1.0",
"LGPL-2.1-only"
] |
permissive
|
agneske-arter-walter-mostertruck-firetr/pushfish-android
|
35001c81ade9bb0392fda2907779c1d10d4824c0
|
09157e1d5d2e33a57b3def177cd9077cd5870b24
|
refs/heads/master
| 2021-12-02T21:13:04.281907
| 2021-10-18T21:48:59
| 2021-10-18T21:48:59
| 215,611,384
| 0
| 0
|
BSD-2-Clause
| 2019-10-16T17:58:05
| 2019-10-16T17:58:05
| null |
UTF-8
|
Java
| false
| false
| 1,348
|
java
|
/*
* Copyright 2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gradle.platform.base.internal;
import org.gradle.api.internal.DefaultPolymorphicDomainObjectContainer;
import org.gradle.internal.reflect.Instantiator;
import org.gradle.platform.base.Platform;
import org.gradle.platform.base.PlatformContainer;
import java.util.List;
public class DefaultPlatformContainer extends DefaultPolymorphicDomainObjectContainer<Platform> implements PlatformContainer {
public DefaultPlatformContainer(Class<? extends Platform> type, Instantiator instantiator) {
super(type, instantiator);
}
public <T extends Platform> List<T> select(final Class<T> type, final List<String> targets) {
return new NamedElementSelector<T>(type, targets).transform(this);
}
}
|
[
"mega@ioexception.at"
] |
mega@ioexception.at
|
a24196ac836657f8dd9f09f21c33e81ea2d4aea8
|
f9b49da86aa89a3ac4e310cc48361af0dfb8b72e
|
/com.dexels.navajo.dsl.rr.parent/com.dexels.navajo.dsl.rr/xtend-gen/com/dexels/navajo/dsl/rr/ReactiveStandaloneSetup.java
|
3bac7715bdc7f6a8ebdb014c9a8bf5098f5e9685
|
[] |
no_license
|
Dexels/navajo.dsl
|
cfa4cf45978874815e5c82779e72b00ab8c68534
|
c54990eca0cfef6182fa507bfdea98fbbb04c8ec
|
refs/heads/master
| 2020-04-20T12:30:18.456194
| 2019-02-04T17:05:51
| 2019-02-04T17:05:51
| 168,844,953
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 538
|
java
|
/**
* generated by Xtext 2.16.0
*/
package com.dexels.navajo.dsl.rr;
import com.dexels.navajo.dsl.rr.ReactiveStandaloneSetupGenerated;
/**
* Initialization support for running Xtext languages without Equinox extension registry.
*/
@SuppressWarnings("all")
public class ReactiveStandaloneSetup extends ReactiveStandaloneSetupGenerated {
public static void doSetup() {
final ReactiveStandaloneSetup reactiveStandaloneSetup = new ReactiveStandaloneSetup();
reactiveStandaloneSetup.createInjectorAndDoEMFRegistration();
}
}
|
[
"frank@dexels.com"
] |
frank@dexels.com
|
ef360c613152efe1ab85470642e231d55205dfbf
|
6bae1d7b6b3a417f2c753c51ec39b397c71fb936
|
/pdx-tools/src/main/java/io/github/ititus/pdx/stellaris/user/save/Pop.java
|
bd8e94dfa2647f0f70a60c67a2c1dfd063d11ac1
|
[
"MIT"
] |
permissive
|
iTitus/PDXTools
|
ac2b0241941b1685a03ff4fa01f14d003274d5af
|
e47d6ac11f5501381b903a4dfefba27316cd2f08
|
refs/heads/main
| 2023-08-24T12:45:11.810171
| 2023-07-07T11:00:23
| 2023-07-07T11:00:23
| 136,240,134
| 3
| 1
|
MIT
| 2023-09-05T10:59:36
| 2018-06-05T22:08:08
|
Java
|
UTF-8
|
Java
| false
| false
| 2,925
|
java
|
package io.github.ititus.pdx.stellaris.user.save;
import io.github.ititus.pdx.pdxscript.IPdxScript;
import io.github.ititus.pdx.pdxscript.PdxScriptObject;
import org.eclipse.collections.api.list.ImmutableList;
import org.eclipse.collections.api.list.primitive.ImmutableIntList;
import org.eclipse.collections.api.map.ImmutableMap;
import java.time.LocalDate;
public class Pop {
public final int id;
public final int species;
public final Ethos ethos;
public final ImmutableMap<String, FlagData> flags;
public final ImmutableList<TimedModifier> timedModifiers;
public final boolean forceFactionEvaluation;
public final int popFaction;
public final boolean enslaved;
public final String job;
public final String formerJob;
public final String category;
public final boolean demotion;
public final LocalDate demotionTime;
public final LocalDate promotionDate;
public final int planet;
public final double crime;
public final double power;
public final double diplomaticWeight;
public final double happiness;
public final boolean canMigrate;
public final double amenitiesUsage;
public final double housingUsage;
public final String approvalModifier;
public final ImmutableIntList spawnedArmies;
public Pop(int id, IPdxScript s) {
this.id = id;
PdxScriptObject o = s.expectObject();
this.species = o.getInt("species");
this.ethos = o.getObjectAsNullOr("ethos", Ethos::new);
this.flags = o.getObjectAsEmptyOrStringObjectMap("flags", FlagData::of);
this.timedModifiers = o.getImplicitListAsList("timed_modifier", TimedModifier::new);
this.forceFactionEvaluation = o.getBoolean("force_faction_evaluation", false);
this.popFaction = o.getInt("pop_faction", -1);
this.enslaved = o.getBoolean("enslaved", false);
this.job = o.getString("job", null);
this.formerJob = o.getString("former_job", null);
this.category = o.getString("category");
this.demotion = o.getBoolean("demotion", false);
this.demotionTime = o.getDate("demotion_time", null);
this.promotionDate = o.getDate("promotion_date", null);
this.planet = o.getInt("planet");
this.crime = o.getDouble("crime", 0);
this.power = o.getDouble("power", 0);
this.diplomaticWeight = o.getDouble("diplomatic_weight", 0);
this.happiness = o.getDouble("happiness", 0);
this.canMigrate = o.getBoolean("can_migrate");
this.amenitiesUsage = o.getDouble("amenities_usage");
this.housingUsage = o.getDouble("housing_usage");
this.approvalModifier = o.getString("approval_modifier", null);
this.spawnedArmies = o.getListAsEmptyOrIntList("spawned_armies");
}
public boolean hasModifier(String name) {
return timedModifiers.anySatisfy(m -> name.equals(m.modifier));
}
}
|
[
"iTitus@users.noreply.github.com"
] |
iTitus@users.noreply.github.com
|
6efc5c2cf97a393555599e0489dcf52780ebf73f
|
d37af28d8bf95332ec0903b29be1ef8962c624c8
|
/src/test/java/fr/paris/lutece/portal/web/features/LevelsJspBeanTest.java
|
ca9902a86fe11d716399569fc638af79d7fc3ef8
|
[
"LicenseRef-scancode-other-permissive"
] |
permissive
|
khalilo/lutece-core
|
df2ca89f45fb627f87724cb6ce18781018f7433f
|
0787eeb49de256fafc7319c7763ea2f3972646f1
|
refs/heads/master
| 2020-06-14T23:58:47.435720
| 2016-11-10T13:41:53
| 2016-11-10T13:41:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,396
|
java
|
/*
* Copyright (c) 2002-2014, Mairie de Paris
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright notice
* and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice
* and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* License 1.0
*/
package fr.paris.lutece.portal.web.features;
import fr.paris.lutece.portal.business.user.AdminUser;
import fr.paris.lutece.portal.service.admin.AccessDeniedException;
import fr.paris.lutece.portal.web.constants.Parameters;
import fr.paris.lutece.test.LuteceTestCase;
import fr.paris.lutece.test.MokeHttpServletRequest;
/**
* LevelsJspBeanTest Test Class
*
*/
public class LevelsJspBeanTest extends LuteceTestCase
{
private static final String TEST_LEVEL_ID = "0"; // administrator level_right
/**
* Test of getManageLevels method, of class fr.paris.lutece.portal.web.features.LevelsJspBean.
*/
public void testGetManageLevels( ) throws AccessDeniedException
{
System.out.println( "getManageLevels" );
MokeHttpServletRequest request = new MokeHttpServletRequest( );
request.registerAdminUserWithRigth( new AdminUser( ), LevelsJspBean.RIGHT_MANAGE_LEVELS );
LevelsJspBean instance = new LevelsJspBean( );
instance.init( request, LevelsJspBean.RIGHT_MANAGE_LEVELS );
instance.getManageLevels( request );
}
/**
* Test of getCreateLevel method, of class fr.paris.lutece.portal.web.features.LevelsJspBean.
*/
public void testGetCreateLevel( ) throws AccessDeniedException
{
System.out.println( "getCreateLevel" );
MokeHttpServletRequest request = new MokeHttpServletRequest( );
request.registerAdminUserWithRigth( new AdminUser( ), LevelsJspBean.RIGHT_MANAGE_LEVELS );
LevelsJspBean instance = new LevelsJspBean( );
instance.init( request, LevelsJspBean.RIGHT_MANAGE_LEVELS );
instance.getCreateLevel( request );
}
/**
* Test of doCreateLevel method, of class fr.paris.lutece.portal.web.features.LevelsJspBean.
*/
public void testDoCreateLevel( )
{
System.out.println( "doCreateLevel" );
// Not implemented yet
}
/**
* Test of getModifyLevel method, of class fr.paris.lutece.portal.web.features.LevelsJspBean.
*/
public void testGetModifyLevel( ) throws AccessDeniedException
{
System.out.println( "getModifyLevel" );
MokeHttpServletRequest request = new MokeHttpServletRequest( );
request.addMokeParameters( Parameters.LEVEL_ID, TEST_LEVEL_ID );
request.registerAdminUserWithRigth( new AdminUser( ), LevelsJspBean.RIGHT_MANAGE_LEVELS );
LevelsJspBean instance = new LevelsJspBean( );
instance.init( request, LevelsJspBean.RIGHT_MANAGE_LEVELS );
instance.getModifyLevel( request );
}
/**
* Test of doModifyLevel method, of class fr.paris.lutece.portal.web.features.LevelsJspBean.
*/
public void testDoModifyLevel( )
{
System.out.println( "doModifyLevel" );
// Not implemented yet
}
}
|
[
"pierrelevy@users.noreply.github.com"
] |
pierrelevy@users.noreply.github.com
|
86e3270f94f42d2f7ad851db6658e5201a35cadb
|
6ea7f7ecab3b2abd789753c6c833a34bcaacb48f
|
/LeetCode/P121BestTimetoBuyandSellStock.java
|
d55216d43e8f8e9ca835b767de3e51cfd6257abf
|
[] |
no_license
|
bhaskarsantoshk/problem-solving
|
2fb44712fc3495097b01339164ef570d9cb2b4f6
|
a53d19a10c181f75e11033fa2666f11b4af03485
|
refs/heads/master
| 2023-07-25T00:52:43.790559
| 2023-07-16T13:50:20
| 2023-07-16T13:50:20
| 166,809,536
| 9
| 2
| null | 2023-04-16T15:46:25
| 2019-01-21T12:20:58
|
Java
|
UTF-8
|
Java
| false
| false
| 442
|
java
|
package LeetCode;
public class P121BestTimetoBuyandSellStock {
public int maxProfit(int[] prices) {
if(prices==null || prices.length==0) return 0;
int minPrice = prices[0];
int maxProfit = 0;
for(int i=1; i<prices.length; i++){
minPrice = Math.min(prices[i], minPrice);
maxProfit = Math.max(maxProfit, prices[i]-minPrice);
}
return maxProfit;
}
}
|
[
"bhaskarsantoshk@gmail.com"
] |
bhaskarsantoshk@gmail.com
|
0c452c3e0765777eec2d89023a28b8014e6a85cb
|
a679d982f4cdd62db28003a8f7831a5fd75e696f
|
/qingcheng_service_user/src/main/java/com/qingcheng/service/impl/UserServiceImpl.java
|
555d9916584a6a29ed1fd683720fb33c47a2494c
|
[] |
no_license
|
Njlong666/qc2019.11.16
|
0636f77e575abf61d976cc2ec27af27fd4d6390d
|
1ad57897517f09b7a2f17307d5a384152ed66d5f
|
refs/heads/master
| 2022-12-26T04:17:59.307512
| 2019-11-16T02:24:26
| 2019-11-16T02:24:26
| 222,032,933
| 0
| 0
| null | 2022-12-16T04:29:48
| 2019-11-16T02:01:25
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 8,369
|
java
|
package com.qingcheng.service.impl;
import com.alibaba.dubbo.config.annotation.Service;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.qingcheng.dao.UserMapper;
import com.qingcheng.entity.PageResult;
import com.qingcheng.pojo.user.User;
import com.qingcheng.service.user.UserService;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import tk.mybatis.mapper.entity.Example;
import java.util.*;
import java.util.concurrent.TimeUnit;
@Service
public class UserServiceImpl implements UserService {
@Autowired
private UserMapper userMapper;
/**
* 返回全部记录
* @return
*/
public List<User> findAll() {
return userMapper.selectAll();
}
/**
* 分页查询
* @param page 页码
* @param size 每页记录数
* @return 分页结果
*/
public PageResult<User> findPage(int page, int size) {
PageHelper.startPage(page,size);
Page<User> users = (Page<User>) userMapper.selectAll();
return new PageResult<User>(users.getTotal(),users.getResult());
}
/**
* 条件查询
* @param searchMap 查询条件
* @return
*/
public List<User> findList(Map<String, Object> searchMap) {
Example example = createExample(searchMap);
return userMapper.selectByExample(example);
}
/**
* 分页+条件查询
* @param searchMap
* @param page
* @param size
* @return
*/
public PageResult<User> findPage(Map<String, Object> searchMap, int page, int size) {
PageHelper.startPage(page,size);
Example example = createExample(searchMap);
Page<User> users = (Page<User>) userMapper.selectByExample(example);
return new PageResult<User>(users.getTotal(),users.getResult());
}
/**
* 根据Id查询
* @param username
* @return
*/
public User findById(String username) {
return userMapper.selectByPrimaryKey(username);
}
/**
* 新增
* @param user
*/
public void add(User user) {
userMapper.insert(user);
}
/**
* 修改
* @param user
*/
public void update(User user) {
userMapper.updateByPrimaryKeySelective(user);
}
/**
* 删除
* @param username
*/
public void delete(String username) {
userMapper.deleteByPrimaryKey(username);
}
@Autowired
private RedisTemplate redisTemplate;
@Autowired
private RabbitTemplate rabbitTemplate;
/**
* 发送短信验证码
* @param phone 手机号
*/
public void sendSms(String phone) {
//1.生成一个6位的短信验证码
Random random=new Random();
int code = random.nextInt(999999); //生成的验证码
if(code<100000){ //位数处理
code=code+100000;
}
System.out.println("短信验证码:"+code);
//2.将验证码保存到redis中
redisTemplate.boundValueOps("code_"+phone).set( code+"" );
redisTemplate.boundValueOps("code_"+phone).expire( 5 , TimeUnit.MINUTES);//5分钟过期
//3.将验证码发送到mq
Map<String,String> map=new HashMap<String, String>();
map.put("phone",phone);
map.put("code",code+"");
rabbitTemplate.convertAndSend("","queue.sms", JSON.toJSONString(map));
}
public void add(User user, String smsCode) {
//1.校验
String sysCode =(String)redisTemplate.boundValueOps("code_" + user.getPhone()).get();//提取系统的验证码
if(sysCode==null){
throw new RuntimeException("验证码未发送或已过期");
}
if(!sysCode.equals(smsCode) ){
throw new RuntimeException("验证码不正确");
}
if(user.getUsername()==null){
user.setUsername( user.getPhone() );//把手机号作为用户名
}
// 校验用户名是否已经注册
User searchUser=new User();
searchUser.setUsername( user.getUsername() );
if(userMapper.selectCount(searchUser)>0){
throw new RuntimeException("该手机号已注册");
}
//2.数据添加
user.setCreated(new Date());//用户创建时间
user.setUpdated(new Date());//修改时间
user.setPoints(0);//积分
user.setStatus("1");//状态
user.setIsEmailCheck("0");//邮箱验证
user.setIsMobileCheck("1");//手机验证
userMapper.insert(user);
}
/**
* 构建查询条件
* @param searchMap
* @return
*/
private Example createExample(Map<String, Object> searchMap){
Example example=new Example(User.class);
Example.Criteria criteria = example.createCriteria();
if(searchMap!=null){
// 用户名
if(searchMap.get("username")!=null && !"".equals(searchMap.get("username"))){
criteria.andLike("username","%"+searchMap.get("username")+"%");
}
// 密码,加密存储
if(searchMap.get("password")!=null && !"".equals(searchMap.get("password"))){
criteria.andLike("password","%"+searchMap.get("password")+"%");
}
// 注册手机号
if(searchMap.get("phone")!=null && !"".equals(searchMap.get("phone"))){
criteria.andLike("phone","%"+searchMap.get("phone")+"%");
}
// 注册邮箱
if(searchMap.get("email")!=null && !"".equals(searchMap.get("email"))){
criteria.andLike("email","%"+searchMap.get("email")+"%");
}
// 会员来源:1:PC,2:H5,3:Android,4:IOS
if(searchMap.get("sourceType")!=null && !"".equals(searchMap.get("sourceType"))){
criteria.andLike("sourceType","%"+searchMap.get("sourceType")+"%");
}
// 昵称
if(searchMap.get("nickName")!=null && !"".equals(searchMap.get("nickName"))){
criteria.andLike("nickName","%"+searchMap.get("nickName")+"%");
}
// 真实姓名
if(searchMap.get("name")!=null && !"".equals(searchMap.get("name"))){
criteria.andLike("name","%"+searchMap.get("name")+"%");
}
// 使用状态(1正常 0非正常)
if(searchMap.get("status")!=null && !"".equals(searchMap.get("status"))){
criteria.andLike("status","%"+searchMap.get("status")+"%");
}
// 头像地址
if(searchMap.get("headPic")!=null && !"".equals(searchMap.get("headPic"))){
criteria.andLike("headPic","%"+searchMap.get("headPic")+"%");
}
// QQ号码
if(searchMap.get("qq")!=null && !"".equals(searchMap.get("qq"))){
criteria.andLike("qq","%"+searchMap.get("qq")+"%");
}
// 手机是否验证 (0否 1是)
if(searchMap.get("isMobileCheck")!=null && !"".equals(searchMap.get("isMobileCheck"))){
criteria.andLike("isMobileCheck","%"+searchMap.get("isMobileCheck")+"%");
}
// 邮箱是否检测(0否 1是)
if(searchMap.get("isEmailCheck")!=null && !"".equals(searchMap.get("isEmailCheck"))){
criteria.andLike("isEmailCheck","%"+searchMap.get("isEmailCheck")+"%");
}
// 性别,1男,0女
if(searchMap.get("sex")!=null && !"".equals(searchMap.get("sex"))){
criteria.andLike("sex","%"+searchMap.get("sex")+"%");
}
// 会员等级
if(searchMap.get("userLevel")!=null ){
criteria.andEqualTo("userLevel",searchMap.get("userLevel"));
}
// 积分
if(searchMap.get("points")!=null ){
criteria.andEqualTo("points",searchMap.get("points"));
}
// 经验值
if(searchMap.get("experienceValue")!=null ){
criteria.andEqualTo("experienceValue",searchMap.get("experienceValue"));
}
}
return example;
}
}
|
[
"123456"
] |
123456
|
b15f168bdbc0d8eb1b2294a3d14586caaee5436a
|
1e8c6d96b6e7526adcbc0a435208f46e07b96de0
|
/app/src/main/java/com/huanxin/oa/main/manager/NoScrollGvManager.java
|
5cdb7ce427c4b4b49339a2473dd960af36548527
|
[] |
no_license
|
yzb199211/oa
|
b0bf3a5280f489a5e090e12b5c388ad110ddd565
|
1d1a7f662073568c7b4d8b886a8d104859b475bf
|
refs/heads/master
| 2020-07-15T20:33:16.075270
| 2020-04-22T01:03:32
| 2020-04-22T01:03:32
| 205,535,489
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,968
|
java
|
package com.huanxin.oa.main.manager;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
public class NoScrollGvManager extends GridLayoutManager {
private boolean isScrollEnabled = true;
private int[] mMeasuredDimension = new int[2];
private int mChildPerLines;
public NoScrollGvManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
public NoScrollGvManager(Context context, int spanCount) {
super(context, spanCount);
this.mChildPerLines = spanCount;
}
public NoScrollGvManager(Context context, int spanCount, int orientation, boolean reverseLayout) {
super(context, spanCount, orientation, reverseLayout);
}
public void setScrollEnabled(boolean flag) {
this.isScrollEnabled = flag;
}
@Override
public boolean canScrollVertically() {
return isScrollEnabled && super.canScrollVertically();
}
@Override
public void onMeasure(@NonNull RecyclerView.Recycler recycler, @NonNull RecyclerView.State state, int widthSpec, int heightSpec) {
final int heightMode = View.MeasureSpec.getMode(heightSpec);
final int widthSize = View.MeasureSpec.getSize(widthSpec);
final int heightSize = View.MeasureSpec.getSize(heightSpec);
int height = 0;
if (getChildCount() != 0) {
for (int i = 0; i < getItemCount(); ) {
measureScrapChild(recycler, i,
View.MeasureSpec.makeMeasureSpec(i, View.MeasureSpec.UNSPECIFIED),
View.MeasureSpec.makeMeasureSpec(i, View.MeasureSpec.UNSPECIFIED),
mMeasuredDimension);
height = height + mMeasuredDimension[1];
i = i + mChildPerLines;
}
// If child view is more than screen size, there is no need to make it wrap content. We can use original onMeasure() so we can scroll view.
if (height > heightSize) {
switch (heightMode) {
case View.MeasureSpec.EXACTLY:
height = heightSize;
case View.MeasureSpec.AT_MOST:
case View.MeasureSpec.UNSPECIFIED:
}
setMeasuredDimension(widthSize, height);
} else {
super.onMeasure(recycler, state, widthSpec, heightSpec);
}
}else {
super.onMeasure(recycler, state, widthSpec, heightSpec);
}
}
private void measureScrapChild(RecyclerView.Recycler recycler, int position, int widthSpec,
int heightSpec, int[] measuredDimension) {
View view = recycler.getViewForPosition(position);
// For adding Item Decor Insets to view
super.measureChildWithMargins(view, 0, 0);
if (view != null) {
RecyclerView.LayoutParams p = (RecyclerView.LayoutParams) view.getLayoutParams();
int childWidthSpec = ViewGroup.getChildMeasureSpec(widthSpec,
getPaddingLeft() + getPaddingRight() + getDecoratedLeft(view) + getDecoratedRight(view), p.width);
int childHeightSpec = ViewGroup.getChildMeasureSpec(heightSpec,
getPaddingTop() + getPaddingBottom() + getPaddingBottom() + getDecoratedBottom(view), p.height);
view.measure(childWidthSpec, childHeightSpec);
// Get decorated measurements
measuredDimension[0] = getDecoratedMeasuredWidth(view) + p.leftMargin + p.rightMargin;
measuredDimension[1] = getDecoratedMeasuredHeight(view) + p.bottomMargin + p.topMargin;
recycler.recycleView(view);
}
}
}
|
[
"948335818@qq.com"
] |
948335818@qq.com
|
d593177fd34ba09eca10eb98cb7b7fe5372b9f1c
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_1/src/b/g/h/h/Calc_1_1_16775.java
|
1e8aea9eadbab2cb76da62e8c2abeb605541ffac
|
[] |
no_license
|
chalstrick/bigRepo1
|
ac7fd5785d475b3c38f1328e370ba9a85a751cff
|
dad1852eef66fcec200df10083959c674fdcc55d
|
refs/heads/master
| 2016-08-11T17:59:16.079541
| 2015-12-18T14:26:49
| 2015-12-18T14:26:49
| 48,244,030
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 134
|
java
|
package b.g.h.h;
public class Calc_1_1_16775 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
|
[
"christian.halstrick@sap.com"
] |
christian.halstrick@sap.com
|
2cb02ce9e60f2d0579b07afca69ff63f36595114
|
08f099a9aaa3fc595e587d9421a08968b566cd16
|
/JavaEjercicios/src/main/java/ejercicio0000473/AccionConstante.java
|
dae5e150d8bc8b137cd0f29b5a64f81916a2300c
|
[] |
no_license
|
Fhernd/Java-Ejercicios
|
6c0202651c079f34b6930fae862736eb8c1b6977
|
229d578679c1e5c198669138737bbac3667df20b
|
refs/heads/master
| 2022-12-14T04:08:04.809724
| 2022-04-30T21:42:37
| 2022-04-30T21:42:37
| 178,605,336
| 16
| 24
| null | 2022-12-06T00:45:40
| 2019-03-30T19:58:58
|
Java
|
UTF-8
|
Java
| false
| false
| 1,162
|
java
|
package ejercicio0000473;
/**
* Ejercicio 473: Realizar una acción específica acorde al valor de una constante
* de una enumeración.
*
* @author John Ortiz Ordoñez
*/
public class AccionConstante {
public static void main(String[] args) {
NivelRiesgo nivel = NivelRiesgo.BAJO;
mostrarMensaje(nivel);
System.out.println();
nivel = NivelRiesgo.MEDIO;
mostrarMensaje(nivel);
System.out.println();
nivel = NivelRiesgo.ALTO;
mostrarMensaje(nivel);
}
public static void mostrarMensaje(NivelRiesgo nivel) {
switch(nivel) {
case BAJO:
System.out.println("Tenga cuidado. Hay riesgo de contaminación.");
break;
case MEDIO:
System.out.println("Lugar de desechos tóxicos. Use el equipo de protección adecuado.");
break;
case ALTO:
System.out.println("¡Peligro! Nivel de riesgo alto. Peligro de muerte.");
break;
}
}
}
enum NivelRiesgo {
BAJO,
MEDIO,
ALTO
}
|
[
"johnortizo@outlook.com"
] |
johnortizo@outlook.com
|
262ca555a734c92f6885d67a5e3c346c1fae5ce3
|
89c87c54a2cfaf67f5736376123699a5a401f67d
|
/java/ru/myx/ae1/control/status/NodeStatusProvider.java
|
e638dba7d780d59fbef7cfcccc9d66794d04f197
|
[] |
no_license
|
acmcms/acm-base-api
|
2a84b4f1370aa5130ae4eb4007e66893123eeca5
|
5f43b617f3a0f836b5e48cbf154d1205c6dc67ec
|
refs/heads/master
| 2023-04-02T00:10:05.830383
| 2023-03-22T22:41:34
| 2023-03-22T22:41:34
| 140,326,221
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,091
|
java
|
/**
* Created on 25.10.2002
*
* myx - barachta */
package ru.myx.ae1.control.status;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import ru.myx.ae1.access.Access;
import ru.myx.ae1.control.AbstractNode;
import ru.myx.ae1.control.Control;
import ru.myx.ae1.control.ControlNode;
import ru.myx.ae1.control.MultivariantString;
import ru.myx.ae1.provide.FormStatusFiller;
import ru.myx.ae3.access.AccessPermissions;
import ru.myx.ae3.base.Base;
import ru.myx.ae3.base.BaseObject;
import ru.myx.ae3.control.command.ControlCommand;
import ru.myx.ae3.control.command.ControlCommandset;
import ru.myx.ae3.status.StatusProvider;
/** @author myx
*
* myx - barachta */
public final class NodeStatusProvider extends AbstractNode {
private static final ControlCommand<?> CMD_SHOW_STATUS = Control
.createCommand("show", MultivariantString.getString("Show status...", Collections.singletonMap("ru", "Показать статус..."))).setCommandPermission("show")
.setCommandIcon("command-open");
private final StatusProvider provider;
/** @param provider
*/
public NodeStatusProvider(final StatusProvider provider) {
this.setAttributeIntern("id", provider.statusName());
this.setAttributeIntern("title", provider.statusDescription());
this.recalculate();
this.provider = provider;
}
@Override
public AccessPermissions getCommandPermissions() {
return Access.createPermissionsLocal().addPermission("show", MultivariantString.getString("Watch status", Collections.singletonMap("ru", "Просматривать статус")))
.addPermission("invalidate", MultivariantString.getString("Invalidate tree", Collections.singletonMap("ru", "Перестраивать дерево")));
}
@Override
public Object getCommandResult(final ControlCommand<?> command, final BaseObject parameters) {
if (command == NodeStatusProvider.CMD_SHOW_STATUS) {
return FormStatusFiller.createFormStatusFiller(Base.forString(this.getTitle()), this.provider);
}
throw new IllegalArgumentException("Unknown command: " + command.getKey());
}
@Override
public ControlCommandset getCommands() {
final ControlCommandset result = Control.createOptions();
result.add(NodeStatusProvider.CMD_SHOW_STATUS);
return result;
}
@Override
public String getIcon() {
return "container-information";
}
@Override
public String getTitle() {
return this.provider.statusDescription();
}
@Override
protected ControlNode<?>[] internGetChildren() {
final StatusProvider[] children = this.provider.childProviders();
if (children != null && children.length > 0) {
final List<ControlNode<?>> list = new ArrayList<>(children.length);
for (final StatusProvider element : children) {
if (element != null) {
list.add(new NodeStatusProvider(element));
}
}
return list.toArray(new ControlNode<?>[list.size()]);
}
return null;
}
@Override
public String toString() {
return "[object " + this.baseClass() + "(" + "key=" + this.getKey() + ", path=" + this.getLocationControl() + ")]";
}
}
|
[
"myx@myx.co.nz"
] |
myx@myx.co.nz
|
841dbb24eabf5fdf40256a9ecfa5cf6d4707d8f1
|
5b582b15e62792ecaf9ae4ffa3b748fdc4341e21
|
/myeclispe 2014workpace/work/src/com/wl/testaction/po/doDetailPoServlet.java
|
de27b8fee9ec97fca1a2eb73fec68feaff59ef2f
|
[] |
no_license
|
ML-dream/LongLongWork
|
22a25d754e4b6cea59bf8089d4261f5de29ae8c0
|
0a82a2398db5a520d1ee3429b21b9eab54d6d775
|
refs/heads/master
| 2022-12-23T01:57:06.554788
| 2019-05-27T02:30:28
| 2019-05-27T02:30:28
| 188,755,200
| 0
| 0
| null | 2022-12-15T23:29:42
| 2019-05-27T02:07:01
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 2,487
|
java
|
package com.wl.testaction.po;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.wl.tools.Sqlhelper;
public class doDetailPoServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doPost(request,response);
}
/**
* The doPost method of the servlet. <br>
*
* This method is called when a form has its tag value method equals to post.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=utf-8");
PrintWriter out = response.getWriter();
request.setCharacterEncoding("utf-8");
String data=request.getParameter("submitData");
HashMap datamap=(HashMap) Test.JSON.Decode(data);
String po_sheetid=(String) datamap.get("po_sheetid");
String item_id=(String) datamap.get("item_id");
String item_name=(String) datamap.get("item_name");
String spec=(String) datamap.get("spec");
String unit=(String) datamap.get("unit");
String kind=(String) datamap.get("kind");
String usage=(String) datamap.get("usage");
String po_num=(String) datamap.get("po_num");
String unitprice=(String) datamap.get("unitprice");
String price=(String) datamap.get("price");
String memo=(String) datamap.get("memo");
String poSql="update poplan_detl set spec='"+spec+"',unit='"+unit+"',po_num='"+po_num+"'," +
"unitprice='"+unitprice+"',price='"+price+"',memo='"+memo+"',kind='"+kind+"',usage='"+usage+"' " +
"where po_sheetid='"+po_sheetid+"' and item_id='"+item_id+"'";
String statusSql="update po_plan set status='1' where po_sheetid='"+po_sheetid+"'";
try{
Sqlhelper.executeUpdate(poSql, null);
Sqlhelper.executeUpdate(statusSql, null);
String json = "{\"result\":\"操作成功!\"}";
response.getWriter().append(json).flush();
}catch(Exception e){
String json = "{\"result\":\"操作失败!\"}";
response.getWriter().append(json).flush();
e.printStackTrace();
}
}
}
|
[
"daizhiqiang1001@qq.com"
] |
daizhiqiang1001@qq.com
|
0f04d43f466040d7ef1985c8361b492b5b02ff64
|
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
|
/sources/com/google/android/gms/internal/ads/zzahd.java
|
0b28300f1acd7d115fc2db1f7b23f013cd68843d
|
[] |
no_license
|
Auch-Auch/avito_source
|
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
|
76fdcc5b7e036c57ecc193e790b0582481768cdc
|
refs/heads/master
| 2023-05-06T01:32:43.014668
| 2021-05-25T10:19:22
| 2021-05-25T10:19:22
| 370,650,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 654
|
java
|
package com.google.android.gms.internal.ads;
import com.yandex.mobile.ads.video.tracking.Tracker;
import java.util.Map;
public final class zzahd implements zzahf<zzbfq> {
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.util.Map] */
@Override // com.google.android.gms.internal.ads.zzahf
public final /* synthetic */ void zza(zzbfq zzbfq, Map map) {
zzbfq zzbfq2 = zzbfq;
if (map.keySet().contains(Tracker.Events.CREATIVE_START)) {
zzbfq2.zzaz(true);
}
if (map.keySet().contains("stop")) {
zzbfq2.zzaz(false);
}
}
}
|
[
"auchhunter@gmail.com"
] |
auchhunter@gmail.com
|
f71903e55024650fe265ce7ccabd572117af24b0
|
625af974d7fac78637fcbe7f6b66d19bbf2ff149
|
/WebServer/AutoBuild/Build/Temp/linuximaging-webui/com/ca/arcserve/linuximaging/ui/client/main/MainPanel.java
|
e26b1b5a8575d7eb94f41730b68e88ad1d04e169
|
[] |
no_license
|
cliicy/kvm
|
25d22c84bcf374a3ca1b3828ebbd442813458c75
|
9a4cf5ac895a85466e3ac88f3081bdcb93f8951e
|
refs/heads/master
| 2021-01-24T08:05:38.767986
| 2018-02-26T12:56:27
| 2018-02-26T12:56:27
| 122,967,305
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,512
|
java
|
package com.ca.arcserve.linuximaging.ui.client.main;
import com.ca.arcserve.linuximaging.ui.client.components.configuration.ConfigurationPanel;
import com.ca.arcserve.linuximaging.ui.client.homepage.Homepagetree;
import com.ca.arcserve.linuximaging.ui.client.homepage.HomepageTab;
import com.ca.arcserve.linuximaging.ui.client.main.i18n.MainUIConstants;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Element;
import com.extjs.gxt.ui.client.widget.TabPanel;
import com.extjs.gxt.ui.client.widget.layout.RowData;
import com.extjs.gxt.ui.client.Style;
import com.extjs.gxt.ui.client.util.Margins;
import com.extjs.gxt.ui.client.widget.TabItem;
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
import com.extjs.gxt.ui.client.Style.LayoutRegion;
public class MainPanel extends LayoutContainer {
public MainPanel() {
}
private static final MainUIConstants mainUIConstants = GWT.create(MainUIConstants.class);
private TabPanel mainPanel = null;
private Homepagetree tree = null;
/*public MainPanel()*/
@Override
protected void onRender(Element parent, int pos){
super.onRender(parent, pos);
setLayout(new FitLayout());
mainPanel = new TabPanel();
mainPanel.setHeight(600);
TabItem tbtmBackup = new TabItem(mainUIConstants.Backup());
tbtmBackup.setBorders(true);
tbtmBackup.setTabIndex(0);
tbtmBackup.setLayout(new BorderLayout());
tree = new Homepagetree();
BorderLayoutData data = new BorderLayoutData(LayoutRegion.WEST, 125.0f);
data.setSplit(true);
tbtmBackup.add(tree, data);
HomepageTab componentJobStatus = new HomepageTab();
tbtmBackup.add(componentJobStatus, new BorderLayoutData(LayoutRegion.CENTER, 330.0f));
mainPanel.add(tbtmBackup);
tree.setHomepageTab(componentJobStatus);
TabItem tbtmRestore = new TabItem(mainUIConstants.Restore());
tbtmRestore.setBorders(true);
tbtmRestore.setTabIndex(1);
mainPanel.add(tbtmRestore);
TabItem tbtmConfiguration = new TabItem(mainUIConstants.Configuration());
tbtmRestore.setBorders(true);
tbtmConfiguration.setTabIndex(2);
tbtmConfiguration.setLayout(new FitLayout());
ConfigurationPanel config=new ConfigurationPanel();
tbtmConfiguration.add(config);
mainPanel.add(tbtmConfiguration);
add(mainPanel, new RowData(Style.DEFAULT, Style.DEFAULT, new Margins()));
}
}
|
[
"cliicy@gmail.com"
] |
cliicy@gmail.com
|
377bf2748d997f093da7e1e481b1bd9b77cd3114
|
380fcacfd26c09a94cff5d1a8ba5ee90d769a26c
|
/src/main/java/com/eshequ/onlinepay/config/RestTempletConfig.java
|
cf57d99612992cd28ea48a8697f9640bef86f435
|
[] |
no_license
|
linknabor/onlinepay
|
d0369be5924189853febfa5c242d14af775de484
|
d56bff50ff9ee810ef52e41d9371dcfae7deeb48
|
refs/heads/master
| 2020-03-18T08:27:42.054112
| 2018-07-27T08:20:06
| 2018-07-27T08:21:17
| 134,510,787
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,384
|
java
|
package com.eshequ.onlinepay.config;
import org.apache.http.client.HttpClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
@Configuration
public class RestTempletConfig {
@Value("${http.connectTimeout}")
private int connectTimeout;
@Value("${http.connectionRequestTimeout}")
private int connectionRequestTimeout;
@Value("${http.readTimeout}")
private int readTimeout;
@Bean
public RestTemplate restTemplate(ClientHttpRequestFactory factory){
return new RestTemplate(factory);
}
@Bean
public HttpComponentsClientHttpRequestFactory getHttpRequestFactory(HttpClient httpClient) {
HttpComponentsClientHttpRequestFactory clientHttpRequestFactory = new HttpComponentsClientHttpRequestFactory(httpClient);// httpClient连接配置
clientHttpRequestFactory.setBufferRequestBody(false);
clientHttpRequestFactory.setConnectTimeout(connectTimeout);
clientHttpRequestFactory.setConnectionRequestTimeout(connectionRequestTimeout);
clientHttpRequestFactory.setReadTimeout(readTimeout);
return clientHttpRequestFactory;
}
}
|
[
"davidhardson@hotmail.com"
] |
davidhardson@hotmail.com
|
757f32762b0b99e7d253c77b2af2fcfc2c7a2b37
|
83e311d2740da24598d74063531bdbbf1aa17a50
|
/imdb-spring/src/main/java/com/example/imdb/service/business/SequenceServiceImpl.java
|
6fc1dcc9bedb992b114f8005b65ed19245cceee0
|
[
"MIT"
] |
permissive
|
deepcloudlabs/dcl375-2020-aug-17
|
e744f3715d3bb27eed1ad44d88ede6d20bf4c448
|
440adaacf5c71d1df6f9c6e0d2c0ab99c60fafa8
|
refs/heads/master
| 2022-12-29T06:10:18.310135
| 2020-08-22T16:08:34
| 2020-08-22T16:08:34
| 285,051,443
| 0
| 1
|
MIT
| 2020-10-14T00:17:07
| 2020-08-04T17:27:48
|
Java
|
UTF-8
|
Java
| false
| false
| 1,305
|
java
|
package com.example.imdb.service.business;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import org.springframework.stereotype.Service;
import com.example.imdb.aop.Profiler;
import com.example.imdb.service.SequenceService;
/**
*
* @author Binnur Kurt
*
*/
@Service
@Profiler(unit = TimeUnit.MICROSECONDS)
public class SequenceServiceImpl implements SequenceService {
private Map<String, AtomicLong> sequences = new ConcurrentHashMap<String, AtomicLong>();
@Override
public long nextId(String sequenceName) {
return getAtomicLong(sequenceName).incrementAndGet();
}
@Override
public String nextId(String sequenceName, String prefix) {
return prefix + nextId(sequenceName);
}
@Override
public long nextId(String sequenceName, int step) {
return getAtomicLong(sequenceName).addAndGet(step);
}
@Override
public String nextId(String sequenceName, String prefix, int step) {
return prefix + nextId(sequenceName, step);
}
private AtomicLong getAtomicLong(String sequenceName) {
AtomicLong atomicLong = sequences.get(sequenceName);
if (atomicLong == null) {
atomicLong = new AtomicLong(0);
sequences.put(sequenceName, atomicLong);
}
return atomicLong;
}
}
|
[
"deepcloudlabs@gmail.com"
] |
deepcloudlabs@gmail.com
|
051fb355c0fd4781bc67e862de7201b4290d1641
|
02533ed4e8c8e15d4b60d9804a57a29c8c82825b
|
/olaf/app/src/main/java/com/hq/app/olaf/ui/bean/order/ScannerOrderResp.java
|
ebfd9d808f348a4cdc0096af2e2a65955d5945be
|
[] |
no_license
|
douglashu/hq-forecast
|
804449d11c5e39f0cfa110214b6431d1d7ac8e23
|
7aa8d9c459d4aa1e62ed3827e1f951773ac249a9
|
refs/heads/master
| 2021-06-15T15:19:14.566905
| 2017-04-12T07:54:17
| 2017-04-12T07:54:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,147
|
java
|
package com.hq.app.olaf.ui.bean.order;
import android.os.Parcel;
import android.os.Parcelable;
import com.hq.app.olaf.ui.bean.BaseEntity;
/**
* Created by Administrator on 2017/2/9.
*/
public class ScannerOrderResp extends BaseEntity<ScannerOrderResp> implements Parcelable{
//SWIPE_CARD
private String bankType;
// 交易金额单位为:分
private int buyerPayAmount ;
//20170123 支付日期格式:yyyyMMdd
private String endDate ;
//143226 支付时间h24mmss
private String endTime;
//errCode 错误码
private String errCode;
// 错误描述
private String errCodeDes;
//商户单号
private String orderId;
//交易渠道
private String payChannel;
//商户实收金额
private String receiptAmount;
//外部渠道交易单号
private String tOrderId;
private String tips;
private int totalAmount;
//内部订单号
private String tradeId;
//交易状态
private String tradeState;
//交易类型
private String tradeType;
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(this.buyerPayAmount);
dest.writeString(this.endDate);
dest.writeString(this.endTime);
dest.writeString(this.errCode);
dest.writeString(this.errCodeDes);
dest.writeString(this.orderId);
dest.writeString(this.payChannel);
dest.writeString(this.receiptAmount);
dest.writeString(this.tOrderId);
dest.writeString(this.tips);
dest.writeInt(this.totalAmount);
dest.writeString(this.tradeId);
dest.writeString(this.tradeState);
dest.writeString(this.tradeType);
}
public ScannerOrderResp() {
}
protected ScannerOrderResp(Parcel in) {
this.buyerPayAmount = in.readInt();
this.endDate = in.readString();
this.endTime = in.readString();
this.errCode = in.readString();
this.errCodeDes = in.readString();
this.orderId = in.readString();
this.payChannel = in.readString();
this.receiptAmount = in.readString();
this.tOrderId = in.readString();
this.tips = in.readString();
this.totalAmount = in.readInt();
this.tradeId = in.readString();
this.tradeState = in.readString();
this.tradeType = in.readString();
}
public static final Creator<ScannerOrderResp> CREATOR = new Creator<ScannerOrderResp>() {
@Override
public ScannerOrderResp createFromParcel(Parcel source) {
return new ScannerOrderResp(source);
}
@Override
public ScannerOrderResp[] newArray(int size) {
return new ScannerOrderResp[size];
}
};
public int getBuyerPayAmount() {
return buyerPayAmount;
}
public void setBuyerPayAmount(int buyerPayAmount) {
this.buyerPayAmount = buyerPayAmount;
}
public static Creator<ScannerOrderResp> getCREATOR() {
return CREATOR;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getErrCode() {
return errCode;
}
public void setErrCode(String errCode) {
this.errCode = errCode;
}
public String getErrCodeDes() {
return errCodeDes;
}
public void setErrCodeDes(String errCodeDes) {
this.errCodeDes = errCodeDes;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getPayChannel() {
return payChannel;
}
public void setPayChannel(String payChannel) {
this.payChannel = payChannel;
}
public String getReceiptAmount() {
return receiptAmount;
}
public void setReceiptAmount(String receiptAmount) {
this.receiptAmount = receiptAmount;
}
public String getTips() {
return tips;
}
public void setTips(String tips) {
this.tips = tips;
}
public String gettOrderId() {
return tOrderId;
}
public void settOrderId(String tOrderId) {
this.tOrderId = tOrderId;
}
public int getTotalAmount() {
return totalAmount;
}
public void setTotalAmount(int totalAmount) {
this.totalAmount = totalAmount;
}
public String getTradeId() {
return tradeId;
}
public void setTradeId(String tradeId) {
this.tradeId = tradeId;
}
public String getTradeState() {
return tradeState;
}
public void setTradeState(String tradeState) {
this.tradeState = tradeState;
}
public String getTradeType() {
return tradeType;
}
public void setTradeType(String tradeType) {
this.tradeType = tradeType;
}
}
|
[
"46773109@qq.com"
] |
46773109@qq.com
|
a181e3147892ae96f34080a93c14eeafb9f492c8
|
d95a741d3f6ee67e68dd9b6c912369f8cb6b7885
|
/rhqmt-cli/src/main/java/org/rhq/metrics/qe/tools/rhqmt/cli/CommandDispatchingInputController.java
|
8cf4ba68aa28351fce196f6ef767d873db9e1c4c
|
[] |
no_license
|
jkandasa/rhq-metrics-data-pump
|
b8ef57176c235f0cb5a5023802d9e3b4515ccbf2
|
c7eddc1f96e741ed356dbe1bb413bf4d6a5d25e3
|
refs/heads/master
| 2021-01-20T05:54:39.739165
| 2015-03-12T14:40:45
| 2015-03-12T14:40:45
| 26,016,294
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,849
|
java
|
package org.rhq.metrics.qe.tools.rhqmt.cli;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import org.clamshellcli.api.Command;
import org.clamshellcli.api.Context;
import org.clamshellcli.core.AnInputController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author jkandasa@redhat.com (Jeeva Kandasamy)
* Dec 08, 2014
*/
public class CommandDispatchingInputController extends AnInputController{
private final Logger _logger = LoggerFactory.getLogger(getClass());
private final Map<String, Command> commands = new HashMap<String, Command>();
/**
* Handles incoming command-line input. CmdController first splits the input
* and uses token[0] as the action name mapped to the Command.
*
* @param ctx
* the shell context.
*/
@Override
public boolean handle(final Context ctx) {
final String cmdLine = (String) ctx.getValue(Context.KEY_COMMAND_LINE_INPUT);
_logger.debug("Processing command line [{}] ...", cmdLine);
if ((cmdLine == null) || cmdLine.trim().isEmpty() || this.commands.isEmpty()) {
_logger.warn("No command line given or no commands registered - will abort processing");
return false;
}
// handle command line entry. NOTE: value can be null
final String[] tokens = cmdLine.trim().split("\\s+");
final Command cmd = this.commands.get(tokens[0]);
if (cmd == null) {
_logger.debug("Unknown command [{}] - abort processing", tokens[0]);
ctx.getIoConsole().writeOutput(String.format("%nCommand [%s] is unknown. Type help for a list of installed commands.%n%n", tokens[0]));
return false;
}
if (tokens.length > 1) {
final String[] args = Arrays.copyOfRange(tokens, 1, tokens.length);
ctx.putValue(Context.KEY_COMMAND_LINE_ARGS, args);
}
cmd.execute(ctx);
_logger.debug("Finished processing command line [{}] - using command [{}]", cmdLine, cmd);
return true;
}
/**
* Entry point for the plugin.
*
* @param plug
*/
@Override
public void plug(final Context plug) {
super.plug(plug);
final List<Command> allCommands = plug.getCommandsByNamespace(ConsoleCommands.NAMESPACE_RHQ_METRICS_CLI);
if (allCommands.size() > 0) {
this.commands.putAll(plug.mapCommands(allCommands));
_logger.info("Registered known commands: [{}]", this.commands);
final Set<String> cmdHints = new TreeSet<String>();
// plug each Command instance and collect input hints
for (final Command cmd : allCommands) {
cmd.plug(plug);
cmdHints.addAll(collectInputHints(cmd));
}
// save expected command input hints
setExpectedInputs(cmdHints.toArray(new String[0]));
} else {
plug.getIoConsole().writeOutput(String.format("%nNo commands were found for input controller [%s].%nn", this.getClass().getName()));
}
}
}
|
[
"jkandasa@redhat.com"
] |
jkandasa@redhat.com
|
4f13724864a0c936363f0426aa1af95c6583f09d
|
84dc61449c743b72462368d230141261bdda0472
|
/jugevents/src/main/java/it/jugpadova/controllers/BasicWebAppBindingInitializer.java
|
fce60de7c6ebf89fa9a556106f5ba259741f6a67
|
[
"Apache-2.0"
] |
permissive
|
jugevents/jugevents
|
667ee3e2e3f8a733177a10e323d0f1a28cdeaf0b
|
e2a59bae342a0e772e28ab60526d2d68835d468f
|
refs/heads/master
| 2020-03-28T02:09:15.652239
| 2016-06-14T17:00:08
| 2016-06-14T17:00:08
| 61,137,524
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,064
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package it.jugpadova.controllers;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.support.WebBindingInitializer;
import org.springframework.web.context.request.WebRequest;
/**
* Shared WebBindingInitializer for PetClinic's custom editors.
*
* <p>Alternatively, such init-binder code may be put into
* {@link org.springframework.web.bind.annotation.InitBinder}
* annotated methods on the controller classes themselves.
*
* @author Juergen Hoeller
*/
public class BasicWebAppBindingInitializer implements WebBindingInitializer {
public void initBinder(WebDataBinder binder, WebRequest request) {
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
dateFormat.setLenient(false);
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
}
}
|
[
"devnull@localhost"
] |
devnull@localhost
|
a763df4c73f82ba3ff042c2c75dd27e928404b24
|
f378ddd47c8b7de6e9cf1d4228c84f73e9dc59f1
|
/projetos/MemoryStone/src/main/java/za/dats/bukkit/memorystone/Interference.java
|
f5fa64aefdc1417ce26b73ac170375581892ed43
|
[] |
no_license
|
charles-marques/dataset-375
|
29e2f99ac1ba323f8cb78bf80107963fc180487c
|
51583daaf58d5669c69d8208b8c4ed4e009001a5
|
refs/heads/master
| 2023-01-20T07:23:09.445693
| 2020-11-27T22:35:49
| 2020-11-27T22:35:49
| 283,315,149
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,701
|
java
|
package za.dats.bukkit.memorystone;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerMoveEvent;
public class Interference {
boolean active;
Location oldLocation; // Where did the compass point to before interference
MemoryStone stone; // Which stone are we currently pointing to?
Location lastPosition; // Only update when we are far enough away from the last time, prevent spam checking on
// every move.
public boolean isTooClose(Location to) {
return false;
}
public void update(Player player, PlayerMoveEvent event) {
// First check that we aren't spamming this - so check every 2 blocks worth of movement
// if lastposition isnt null and we havn't changed worlds and we have moved at least 2 blocks, 2^2 = 4
if (lastPosition != null && event.getTo().getWorld().equals(lastPosition.getWorld())
&& event.getTo().distanceSquared(lastPosition) < 4) {
return;
}
lastPosition = event.getTo();
int memorizationrange = Config.getAutomaticMemorizationDistanceSquared();
int interferencerange = Config.getCompassToUnmemorizedStoneDistanceSquared();
MemoryStone closestStone = null;
MemoryStone closestMemStone = null;
double closestDistance = 0;
double closestMemDistance = 0;
for (MemoryStone stone : MemoryStonePlugin.getInstance().getMemoryStoneManager().getStones()) {
if (stone.getSign() == null) {
continue;
}
if (!stone.getSign().getWorld().getName().equals(player.getWorld().getName())) {
continue;
}
if (MemoryStonePlugin.getInstance().getCompassManager().isMemorized(player, stone)) {
continue;
}
double currentDistance = lastPosition.distanceSquared(stone.getSign().getBlock().getLocation());
if (currentDistance < interferencerange) {
if ((closestStone == null) || (closestDistance > currentDistance)) {
closestStone = stone;
closestDistance = currentDistance;
}
}
if (currentDistance < memorizationrange) {
if ((closestMemStone == null) || (closestMemDistance > currentDistance)) {
closestMemStone = stone;
closestMemDistance = currentDistance;
}
}
}
if (closestMemStone != null) {
// has stone been memorized?
if (!MemoryStonePlugin.getInstance().getCompassManager().isMemorized(player, closestMemStone)) {
// check to see if the stone is free
if (closestMemStone.getMemorizeCost() == 0 || player.hasPermission("memorystone.usefree")) {
// if stone is free memorize the stone and give the player a message
player.sendMessage(Config.getColorLang("insidememorizationdistance"));
MemoryStonePlugin.getInstance().getCompassManager().memorizeStone(player, closestMemStone);
}
}
}
// Check that the player actually has a compass..
int index = player.getInventory().first(Material.COMPASS);
if (index == -1) {
// No compass.. nothing to see here, move on.
return;
}
// Point compass
if (closestStone != null) {
// Should only set old location if we aren't moving from stone to stone.
if (stone == null) {
oldLocation = player.getCompassTarget();
}
stone = closestStone;
player.setCompassTarget(stone.getSign().getBlock().getLocation());
if (!active) {
// Interference message was not sent yet - send it
player.sendMessage(Config.getColorLang("compassinterference"));
active = true;
}
} else if (oldLocation != null) {
// Unset compass
if (active) {
player.sendMessage(Config.getColorLang("compasslostinterference"));
}
active = false;
stone = null;
player.setCompassTarget(oldLocation);
oldLocation = null;
}
}
}
|
[
"suporte@localhost.localdomain"
] |
suporte@localhost.localdomain
|
4875da5942ba6513785342c9f71b886c4f0cc779
|
43d07af1742e01001c17eba4196f30156b08fbcc
|
/com/sun/xml/internal/rngom/parse/IllegalSchemaException.java
|
ce074aab88ccd9a6a4b97dbee4325fce395765f1
|
[] |
no_license
|
kSuroweczka/jdk
|
b408369b4b87ab09a828aa3dbf9132aaf8bb1b71
|
7ec3e8e31fcfb616d4a625191bcba0191ca7c2d4
|
refs/heads/master
| 2021-12-30T00:58:24.029054
| 2018-02-01T10:07:14
| 2018-02-01T10:07:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 256
|
java
|
package com.sun.xml.internal.rngom.parse;
public class IllegalSchemaException extends Exception
{
}
/* Location: D:\dt\jdk\tools.jar
* Qualified Name: com.sun.xml.internal.rngom.parse.IllegalSchemaException
* JD-Core Version: 0.6.2
*/
|
[
"starlich.1207@gmail.com"
] |
starlich.1207@gmail.com
|
940593ff52b050f44e36eb79910b1653fc56614d
|
ae6bad780c436d7d20711e53a36cfab72ce63c72
|
/src/main/java/org/openpbr/domain/OrgUnitGroupSet.java
|
8346e7e43ddd51f07f9328fa23207bb63356fdfe
|
[] |
no_license
|
chrismelky/openpbr
|
ac48e4a6ea3ae75ccffb6d0513cd0b7c0cb8d077
|
7ae13b4986fc05eb98e0591f7f252fbebc12f7e5
|
refs/heads/master
| 2020-05-20T20:48:32.978897
| 2019-05-09T07:22:04
| 2019-05-09T07:22:04
| 185,748,074
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,076
|
java
|
package org.openpbr.domain;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import javax.validation.constraints.*;
import org.springframework.data.elasticsearch.annotations.Document;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import java.util.Objects;
/**
* A OrgUnitGroupSet.
*/
@Entity
@Table(name = "org_unit_group_set")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Document(indexName = "orgunitgroupset")
public class OrgUnitGroupSet extends IdentifiableEntity implements Serializable {
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
@SequenceGenerator(name = "sequenceGenerator")
private Long id;
@NotNull
@Size(max = 230)
@Column(name = "name", length = 230, nullable = false, unique = true)
private String name;
@Column(name = "description")
private String description;
@Column(name = "sort_order")
private Integer sortOrder;
@Column(name = "is_active")
private Boolean isActive;
@ManyToMany
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@NotNull
@JoinTable(name = "org_unit_group_set_members",
joinColumns = @JoinColumn(name = "org_unit_group_set_id", referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name = "org_unit_group_id", referencedColumnName = "id"))
private Set<OrgUnitGroup> orgUnitGroups = new HashSet<>();
@ManyToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@JoinTable(name = "org_unit_group_set_attribute_values",
joinColumns = @JoinColumn(name = "org_unit_group_set_id", referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name = "attribute_value_id", referencedColumnName = "id"))
private Set<AttributeValue> attributeValues = new HashSet<>();
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public OrgUnitGroupSet uid(String uid) {
this.uid = uid;
return this;
}
public OrgUnitGroupSet code(String code) {
this.code = code;
return this;
}
public String getName() {
return name;
}
public OrgUnitGroupSet name(String name) {
this.name = name;
return this;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public OrgUnitGroupSet description(String description) {
this.description = description;
return this;
}
public void setDescription(String description) {
this.description = description;
}
public Integer getSortOrder() {
return sortOrder;
}
public OrgUnitGroupSet sortOrder(Integer sortOrder) {
this.sortOrder = sortOrder;
return this;
}
public void setSortOrder(Integer sortOrder) {
this.sortOrder = sortOrder;
}
public Boolean isIsActive() {
return isActive;
}
public OrgUnitGroupSet isActive(Boolean isActive) {
this.isActive = isActive;
return this;
}
public void setIsActive(Boolean isActive) {
this.isActive = isActive;
}
public Set<OrgUnitGroup> getOrgUnitGroups() {
return orgUnitGroups;
}
public OrgUnitGroupSet orgUnitGroups(Set<OrgUnitGroup> orgUnitGroups) {
this.orgUnitGroups = orgUnitGroups;
return this;
}
public OrgUnitGroupSet addOrgUnitGroups(OrgUnitGroup orgUnitGroup) {
this.orgUnitGroups.add(orgUnitGroup);
// orgUnitGroup.getOrgUnitGroupSets().add(this);
return this;
}
public OrgUnitGroupSet removeOrgUnitGroups(OrgUnitGroup orgUnitGroup) {
this.orgUnitGroups.remove(orgUnitGroup);
// orgUnitGroup.getOrgUnitGroupSets().remove(this);
return this;
}
public void setOrgUnitGroups(Set<OrgUnitGroup> orgUnitGroups) {
this.orgUnitGroups = orgUnitGroups;
}
public Set<AttributeValue> getAttributeValues() {
return attributeValues;
}
public OrgUnitGroupSet attributeValues(Set<AttributeValue> attributeValues) {
this.attributeValues = attributeValues;
return this;
}
public OrgUnitGroupSet addAttributeValues(AttributeValue attributeValue) {
this.attributeValues.add(attributeValue);
return this;
}
public OrgUnitGroupSet removeAttributeValues(AttributeValue attributeValue) {
this.attributeValues.remove(attributeValue);
return this;
}
public void setAttributeValues(Set<AttributeValue> attributeValues) {
this.attributeValues = attributeValues;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OrgUnitGroupSet orgUnitGroupSet = (OrgUnitGroupSet) o;
if (orgUnitGroupSet.getId() == null || getId() == null) {
return false;
}
return Objects.equals(getId(), orgUnitGroupSet.getId());
}
@Override
public int hashCode() {
return Objects.hashCode(getId());
}
@Override
public String toString() {
return "OrgUnitGroupSet{" +
"id=" + getId() +
", uid='" + getUid() + "'" +
", code='" + getCode() + "'" +
", name='" + getName() + "'" +
", description='" + getDescription() + "'" +
", sortOrder=" + getSortOrder() +
", isActive='" + isIsActive() + "'" +
"}";
}
}
|
[
"chrismelky05@gmail.com"
] |
chrismelky05@gmail.com
|
1c161e67cb9c180e18f18ebf6df34193e23ca9b4
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/8/8_cc09c2977d2d77463efa0bada77f503a751f19ef/TwitterActivity/8_cc09c2977d2d77463efa0bada77f503a751f19ef_TwitterActivity_s.java
|
00b4cbf772d6c292c0a37d450ad4830907b8017c
|
[] |
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
| 4,186
|
java
|
package com.sfumobile.wifilocator;
import java.util.ArrayList;
import java.util.List;
import android.app.Activity;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
import android.widget.ArrayAdapter;
import android.widget.Toast;
import twitter4j.Query;
import twitter4j.QueryResult;
import twitter4j.Status;
import twitter4j.Tweet;
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;
import twitter4j.auth.AccessToken;
public class TwitterActivity extends Activity implements OnClickListener{
private Twitter twitter;
private ListView tweetListView;
private EditText tweetText;
private Button tweetButton;
private Button cancelButton;
private String zone;
private ArrayList<String> tweet_text;
private ArrayAdapter<String> adapter;
private AccessToken token;
private SharedPreferences prefs;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.twitter_view);
prefs = getSharedPreferences(TwitterSignInActivity.TOKEN_FILE, 0);
tweetListView = (ListView)this.findViewById(R.id.TweetListView);
tweetText = (EditText)this.findViewById(R.id.tweetText);
cancelButton = (Button)this.findViewById(R.id.cancelButton);
tweetButton = (Button)this.findViewById(R.id.tweetButton);
tweetText.setOnClickListener(this);
cancelButton.setOnClickListener(this);
tweetButton.setOnClickListener(this);
twitter = new TwitterFactory().getInstance();
tweetText.setTextColor(Color.GRAY);
Bundle extras = getIntent().getExtras();
if(extras!=null){
zone = extras.getString("zone");
}
twitter.setOAuthConsumer(TwitterSignInActivity.CONSUMER_KEY, TwitterSignInActivity.CONSUMER_SECRET);
token = new AccessToken(prefs.getString("token", ""), prefs.getString("secret", ""));
twitter.setOAuthAccessToken(token);
}
@Override
protected void onStart() {
// TODO Auto-generated method stub
super.onStart();
try {
Log.d("ZONE",zone.replaceAll(" ", ""));
QueryResult result = twitter.search(new Query(zone.replaceAll(" ", "")));
List<Tweet> tweets = result.getTweets();
tweet_text = new ArrayList<String>();
for(Tweet tweet : tweets){
tweet_text.add("@" + tweet.getFromUser() + " - " + tweet.getText());
}
if(tweet_text.size() < 1){
tweet_text.add("No Tweets");
}
adapter = new ArrayAdapter<String>(this.getApplicationContext(), R.layout.tweet_row, R.id.tweetText, tweet_text);
tweetListView.setAdapter((ListAdapter)adapter);
} catch (TwitterException e) {
// TODO Auto-generated catch block
Log.e("Twitter", e.getMessage());
tweet_text = new ArrayList<String>();
tweet_text.add("No Tweets");
adapter = new ArrayAdapter<String>(this.getApplicationContext(), R.layout.tweet_row, R.id.tweetText, tweet_text);
tweetListView.setAdapter((ListAdapter)adapter);
}
}
void tweet (String message){
if (token != null) {
Status status = null;
try {
status = twitter.updateStatus(message);
} catch (Exception e) {
Toast.makeText(this, "Error:" + e.getMessage(),Toast.LENGTH_LONG).show();
Log.d("Timeline",""+e.getMessage());
}
if(status != null){
Toast.makeText(this, "Updated Twitter Status",Toast.LENGTH_SHORT).show();
}
}
}
public void onClick(View v) {
switch(v.getId()){
case R.id.tweetText:
tweetText.setText("");
tweetText.setTextColor(Color.BLACK);
break;
case R.id.cancelButton:
tweetText.setText("Tweet");
tweetText.setTextColor(Color.GRAY);
break;
case R.id.tweetButton:
tweet("#" + zone + " " + tweetText.getText().toString());
break;
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
dfcb764bea61bf73e76d58b29b18d9b7ec4f2264
|
d41522d5da5a62dc028ed9d8d8b96e48389a8fa0
|
/src/main/java/com/github/wz2cool/elasticsearch/query/builder/RangeExtQueryBuilder.java
|
9e85e367c13b93ddb4bd7d4b8578acb7ed419c6a
|
[
"Apache-2.0"
] |
permissive
|
wajncn/spring-data-elasticsearch-extension
|
afddd1d255823c9ac72b31d597157caac45838bd
|
6d4002ca0005f5b3d308de6c50e78b02f8b1fc89
|
refs/heads/main
| 2023-08-27T04:33:35.432256
| 2021-11-05T09:08:25
| 2021-11-05T09:08:25
| 424,803,387
| 0
| 0
|
Apache-2.0
| 2021-11-05T02:23:53
| 2021-11-05T02:23:52
| null |
UTF-8
|
Java
| false
| false
| 3,043
|
java
|
package com.github.wz2cool.elasticsearch.query.builder;
import com.github.wz2cool.elasticsearch.lambda.GetPropertyFunction;
import com.github.wz2cool.elasticsearch.model.ColumnInfo;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.RangeQueryBuilder;
/**
* A Query that matches documents within an range of terms.
*
* @author Frank
*/
public class RangeExtQueryBuilder<T, P extends Comparable> implements ExtQueryBuilder {
private final RangeQueryBuilder rangeQueryBuilder;
/**
* @see RangeQueryBuilder#RangeQueryBuilder(String)
*/
public RangeExtQueryBuilder(GetPropertyFunction<T, P> getPropertyFunc) {
final ColumnInfo columnInfo = getColumnInfo(getPropertyFunc);
this.rangeQueryBuilder = new RangeQueryBuilder(columnInfo.getColumnName());
}
/**
* @see RangeQueryBuilder#gt(Object)
*/
public RangeExtQueryBuilder<T, P> gt(boolean enable, P from) {
if (enable) {
rangeQueryBuilder.gt(getFilterValue(from));
}
return this;
}
/**
* @see RangeQueryBuilder#gt(Object)
*/
public RangeExtQueryBuilder<T, P> gt(P from) {
rangeQueryBuilder.gt(getFilterValue(from));
return this;
}
/**
* @see RangeQueryBuilder#gte(Object)
*/
public RangeExtQueryBuilder<T, P> gte(boolean enable, P from) {
if (enable) {
rangeQueryBuilder.gte(getFilterValue(from));
}
return this;
}
/**
* @see RangeQueryBuilder#gte(Object)
*/
public RangeExtQueryBuilder<T, P> gte(P from) {
rangeQueryBuilder.gte(getFilterValue(from));
return this;
}
/**
* @see RangeQueryBuilder#lt(Object)
*/
public RangeExtQueryBuilder<T, P> lt(boolean enable, P to) {
if (enable) {
rangeQueryBuilder.lt(getFilterValue(to));
}
return this;
}
/**
* @see RangeQueryBuilder#lt(Object)
*/
public RangeExtQueryBuilder<T, P> lt(P to) {
rangeQueryBuilder.lt(getFilterValue(to));
return this;
}
/**
* @see RangeQueryBuilder#lte(Object)
*/
public RangeExtQueryBuilder<T, P> lte(boolean enable, P to) {
if (enable) {
rangeQueryBuilder.lte(getFilterValue(to));
}
return this;
}
/**
* @see RangeQueryBuilder#lte(Object)
*/
public RangeExtQueryBuilder<T, P> lte(P to) {
rangeQueryBuilder.lte(getFilterValue(to));
return this;
}
/**
* @see RangeQueryBuilder#timeZone(String)
*/
public RangeExtQueryBuilder<T, P> timezone(String timeZone) {
rangeQueryBuilder.timeZone(timeZone);
return this;
}
/**
* @see RangeQueryBuilder#relation(String)
*/
public RangeExtQueryBuilder<T, P> relation(String relation) {
rangeQueryBuilder.relation(relation);
return this;
}
@Override
public QueryBuilder build() {
return this.rangeQueryBuilder;
}
}
|
[
"wz2cool@live.cn"
] |
wz2cool@live.cn
|
d2d8ffbfa7c6098126cdadfb9351e4c3305c5c86
|
8f87065bc3cb6d96ea2e398a98aacda4fc4bbe43
|
/src/Class00000466Worse.java
|
1104885cf8c2001454b539021078e13ac1957b21
|
[] |
no_license
|
fracz/code-quality-benchmark
|
a243d345441582473532f9b013993f77d59e19ae
|
c23e76fe315f43bea899beabb856e61348c34e09
|
refs/heads/master
| 2020-04-08T23:40:36.408828
| 2019-07-31T17:54:53
| 2019-07-31T17:54:53
| 159,835,188
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 339
|
java
|
// original filename: 00014254.txt
// after
public class Class00000466Worse {
@NotNull
public String buildErrorString(Object... infos) {
final PsiClass superClass = (PsiClass) infos[0];
return InspectionGadgetsBundle.message("extends.concrete.collection.problem.descriptor", superClass.getQualifiedName());
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
3860861521a1ec0914fd78bdb1dca7e0a483d8ef
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/1/1_35c30e78e5ce75c1b86da76a18a9d6016cc5d8d1/CachePlugin/1_35c30e78e5ce75c1b86da76a18a9d6016cc5d8d1_CachePlugin_s.java
|
3be8d4047470889d2c43e90a3e2339b9d132259a
|
[] |
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,866
|
java
|
package de.ixdb.squirrel_sql.plugins.cache;
import net.sourceforge.squirrel_sql.client.IApplication;
import net.sourceforge.squirrel_sql.client.gui.session.SQLInternalFrame;
import net.sourceforge.squirrel_sql.client.gui.session.ObjectTreeInternalFrame;
import net.sourceforge.squirrel_sql.client.action.ActionCollection;
import net.sourceforge.squirrel_sql.client.plugin.*;
import net.sourceforge.squirrel_sql.client.preferences.IGlobalPreferencesPanel;
import net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI;
import net.sourceforge.squirrel_sql.client.session.ISQLPanelAPI;
import net.sourceforge.squirrel_sql.client.session.ISession;
import net.sourceforge.squirrel_sql.fw.sql.DatabaseObjectType;
import net.sourceforge.squirrel_sql.fw.util.log.ILogger;
import net.sourceforge.squirrel_sql.fw.util.log.LoggerController;
import java.io.File;
import java.io.IOException;
/**
* The SQL Script plugin class.
*/
public class CachePlugin extends DefaultSessionPlugin
{
/** Logger for this class. */
private static ILogger s_log = LoggerController.createLogger(CachePlugin.class);
/** The app folder for this plugin. */
private File _pluginAppFolder;
private PluginResources _resources;
/** Folder to store user settings in. */
private File _userSettingsFolder;
/**
* Return the internal name of this plugin.
*
* @return the internal name of this plugin.
*/
public String getInternalName()
{
return "cache";
}
/**
* Return the descriptive name of this plugin.
*
* @return the descriptive name of this plugin.
*/
public String getDescriptiveName()
{
return "Plugin for the Intersystems Cache DB";
}
/**
* Returns the current version of this plugin.
*
* @return the current version of this plugin.
*/
public String getVersion()
{
return "0.01";
}
/**
* Returns the authors name.
*
* @return the authors name.
*/
public String getAuthor()
{
return "Gerd Wagner";
}
/**
* Returns the name of the change log for the plugin. This should
* be a text or HTML file residing in the <TT>getPluginAppSettingsFolder</TT>
* directory.
*
* @return the changelog file name or <TT>null</TT> if plugin doesn't have
* a change log.
*/
public String getChangeLogFileName()
{
return "changes.txt";
}
/**
* Returns the name of the Help file for the plugin. This should
* be a text or HTML file residing in the <TT>getPluginAppSettingsFolder</TT>
* directory.
*
* @return the Help file name or <TT>null</TT> if plugin doesn't have
* a help file.
*/
public String getHelpFileName()
{
return "readme.txt";
}
/**
* Returns the name of the Licence file for the plugin. This should
* be a text or HTML file residing in the <TT>getPluginAppSettingsFolder</TT>
* directory.
*
* @return the Licence file name or <TT>null</TT> if plugin doesn't have
* a licence file.
*/
public String getLicenceFileName()
{
return "licence.txt";
}
/**
* @return Comma separated list of contributors.
*/
public String getContributors()
{
return "Andreas Schneider";
}
/**
* Create preferences panel for the Global Preferences dialog.
*
* @return Preferences panel.
*/
public IGlobalPreferencesPanel[] getGlobalPreferencePanels()
{
return new IGlobalPreferencesPanel[0];
}
/**
* Initialize this plugin.
*/
public synchronized void initialize() throws PluginException
{
super.initialize();
IApplication app = getApplication();
PluginManager pmgr = app.getPluginManager();
// Folder within plugins folder that belongs to this
// plugin.
try
{
_pluginAppFolder = getPluginAppSettingsFolder();
}
catch (IOException ex)
{
throw new PluginException(ex);
}
// Folder to store user settings.
try
{
_userSettingsFolder = getPluginUserSettingsFolder();
}
catch (IOException ex)
{
throw new PluginException(ex);
}
_resources = new CachePluginResources("de.ixdb.squirrel_sql.plugins.cache.cache", this);
// Load plugin preferences.
ActionCollection coll = app.getActionCollection();
coll.add(new ScriptViewAction(app, _resources, this));
coll.add(new ScriptFunctionAction(app, _resources, this));
coll.add(new ScriptCdlAction(app, _resources, this));
coll.add(new ShowNamespacesAction(app, _resources, this));
coll.add(new ShowQueryPlanAction(app, _resources, this));
coll.add(new ShowProcessesAction(app, _resources, this));
// coll.add(new ScriptProcedureAction(app, _resources, this, _userSettingsFolder));
// coll.add(new RefreshRepositoryAction(app, _resources, this, _userSettingsFolder));
}
/**
* Application is shutting down so save data.
*/
public void unload()
{
super.unload();
}
/**
* Called when a session started. Add commands to popup menu
* in object tree.
*
* @param session The session that is starting.
*
* @return <TT>true</TT> to indicate that this plugin is
* applicable to passed session.
*/
public PluginSessionCallback sessionStarted(ISession session)
{
try
{
if(-1 != session.getSQLConnection().getConnection().getMetaData().getDriverName().toUpperCase().indexOf("CACHE"))
{
ActionCollection coll = getApplication().getActionCollection();
IObjectTreeAPI otApi = session.getSessionInternalFrame().getObjectTreeAPI();
otApi.addToPopup(DatabaseObjectType.VIEW, coll.get(ScriptViewAction.class));
otApi.addToPopup(DatabaseObjectType.SESSION, coll.get(ShowNamespacesAction.class));
otApi.addToPopup(DatabaseObjectType.SESSION, coll.get(ShowProcessesAction.class));
otApi.addToPopup(DatabaseObjectType.PROCEDURE, coll.get(ScriptFunctionAction.class));
otApi.addToPopup(DatabaseObjectType.PROCEDURE, coll.get(ScriptCdlAction.class));
otApi.addToPopup(DatabaseObjectType.TABLE, coll.get(ScriptCdlAction.class));
otApi.addToPopup(DatabaseObjectType.VIEW, coll.get(ScriptCdlAction.class));
ISQLPanelAPI sqlApi = session.getSessionInternalFrame().getSQLPanelAPI();
sqlApi.addToSQLEntryAreaMenu(coll.get(ShowQueryPlanAction.class));
session.addSeparatorToToolbar();
session.addToToolbar(coll.get(ShowNamespacesAction.class));
session.addToToolbar(coll.get(ShowProcessesAction.class));
session.addToToolbar(coll.get(ShowQueryPlanAction.class));
session.getSessionInternalFrame().addToToolsPopUp("cachequeryplan", coll.get(ShowQueryPlanAction.class));
return new PluginSessionCallback()
{
public void sqlInternalFrameOpened(SQLInternalFrame sqlInternalFrame, ISession sess)
{
//plugin supports only Session main window
}
public void objectTreeInternalFrameOpened(ObjectTreeInternalFrame objectTreeInternalFrame, ISession sess)
{
//plugin supports only Session main window
}
};
}
else
{
return null;
}
}
catch(Exception e)
{
s_log.error("Could not get driver name", e);
return null;
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
021034c5fd3271d96a03983d5d082283c72eaf68
|
32531b1e12defef23e6209f68b5212df949bdbd6
|
/tests/io.sarl.lang.core.tests/src/test/java/io/sarl/lang/core/tests/scoping/extensions/numbers/cast/floatobject/CompilerTest.java
|
381b5121b121dbd21a89455b76ab71e04bfb8adf
|
[
"Apache-2.0"
] |
permissive
|
martin-plessy/sarl
|
24dbc8ff287873754edf36a63a20bdbed06b71cd
|
cfc286b2a840f6a88fc4f5cffa80ea7d67324179
|
refs/heads/master
| 2020-05-06T13:21:06.861369
| 2019-06-02T14:46:57
| 2019-06-02T14:46:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,986
|
java
|
/*
* $Id$
*
* SARL is an general-purpose agent programming language.
* More details on http://www.sarl.io
*
* Copyright (C) 2014-2019 the original authors 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 io.sarl.lang.core.tests.scoping.extensions.numbers.cast.floatobject;
import org.eclipse.xtext.common.types.TypesPackage;
import org.eclipse.xtext.xbase.validation.IssueCodes;
import io.sarl.lang.SARLVersion;
import io.sarl.lang.sarl.SarlPackage;
import io.sarl.tests.api.AbstractMassiveCompilationTest;
/**
* @author $Author: sgalland$
* @version $FullVersion$
* @mavengroupid $GroupId$
* @mavenartifactid $ArtifactId$
* @see "https://github.com/eclipse/xtext-extras/issues/186"
*/
@SuppressWarnings("all")
public class CompilerTest extends AbstractMassiveCompilationTest {
@DifferedTest
public void as_byte() throws Exception {
diffSingleTypeCompileTo_unexpectedCastError(multilineString(
"class A {",
" def fct(left : Float) : byte {",
" left as byte",
" }",
"}"));
}
@DifferedTest
public void as_short() throws Exception {
diffSingleTypeCompileTo_unexpectedCastError(multilineString(
"class A {",
" def fct(left : Float) : short {",
" left as short",
" }",
"}"));
}
@DifferedTest
public void as_int() throws Exception {
diffSingleTypeCompileTo_unexpectedCastError(multilineString(
"class A {",
" def fct(left : Float) : int {",
" left as int",
" }",
"}"));
}
@DifferedTest
public void as_long() throws Exception {
diffSingleTypeCompileTo_unexpectedCastError(multilineString(
"class A {",
" def fct(left : Float) : long {",
" left as long",
" }",
"}"));
}
@DifferedTest
public void as_float() throws Exception {
diffSingleTypeCompileTo(multilineString(
"class A {",
" def fct(left : Float) : float {",
" left as float",
" }",
"}"),
multilineString(
"import io.sarl.lang.annotation.SarlElementType;",
"import io.sarl.lang.annotation.SarlSpecification;",
"import io.sarl.lang.annotation.SyntheticMember;",
"import org.eclipse.xtext.xbase.lib.Pure;",
"",
"@SarlSpecification(\"" + SARLVersion.SPECIFICATION_RELEASE_VERSION_STRING + "\")",
"@SarlElementType(" + SarlPackage.SARL_CLASS + ")",
"@SuppressWarnings(\"all\")",
"public class A {",
" @Pure",
" public float fct(final Float left) {",
" return ((float) (left).floatValue());",
" }",
" ",
" @SyntheticMember",
" public A() {",
" super();",
" }",
"}",
""));
}
@DifferedTest
public void as_double() throws Exception {
diffSingleTypeCompileTo(multilineString(
"class A {",
" def fct(left : Float) : double {",
" left as double",
" }",
"}"),
multilineString(
"import io.sarl.lang.annotation.SarlElementType;",
"import io.sarl.lang.annotation.SarlSpecification;",
"import io.sarl.lang.annotation.SyntheticMember;",
"import org.eclipse.xtext.xbase.lib.Pure;",
"",
"@SarlSpecification(\"" + SARLVersion.SPECIFICATION_RELEASE_VERSION_STRING + "\")",
"@SarlElementType(" + SarlPackage.SARL_CLASS + ")",
"@SuppressWarnings(\"all\")",
"public class A {",
" @Pure",
" public double fct(final Float left) {",
" return ((double) (left).floatValue());",
" }",
" ",
" @SyntheticMember",
" public A() {",
" super();",
" }",
"}",
""));
}
@DifferedTest
public void as_Byte() throws Exception {
diffSingleTypeCompileTo_unexpectedCastError(multilineString(
"class A {",
" def fct(left : Float) : Byte {",
" left as Byte",
" }",
"}"));
}
@DifferedTest
public void as_Short() throws Exception {
diffSingleTypeCompileTo_unexpectedCastError(multilineString(
"class A {",
" def fct(left : Float) : Short {",
" left as Short",
" }",
"}"));
}
@DifferedTest
public void as_Integer() throws Exception {
diffSingleTypeCompileTo_unexpectedCastError(multilineString(
"class A {",
" def fct(left : Float) : Integer {",
" left as Integer",
" }",
"}"));
}
@DifferedTest
public void as_Long() throws Exception {
diffSingleTypeCompileTo_unexpectedCastError(multilineString(
"class A {",
" def fct(left : Float) : Long {",
" left as Long",
" }",
"}"));
}
@DifferedTest
public void as_Float() throws Exception {
diffSingleTypeCompileTo(multilineString(
"class A {",
" def fct(left : Float) : Float {",
" left as Float",
" }",
"}"),
multilineString(
"import io.sarl.lang.annotation.SarlElementType;",
"import io.sarl.lang.annotation.SarlSpecification;",
"import io.sarl.lang.annotation.SyntheticMember;",
"import org.eclipse.xtext.xbase.lib.Pure;",
"",
"@SarlSpecification(\"" + SARLVersion.SPECIFICATION_RELEASE_VERSION_STRING + "\")",
"@SarlElementType(" + SarlPackage.SARL_CLASS + ")",
"@SuppressWarnings(\"all\")",
"public class A {",
" @Pure",
" public Float fct(final Float left) {",
" return ((Float) left);",
" }",
" ",
" @SyntheticMember",
" public A() {",
" super();",
" }",
"}",
""));
}
@DifferedTest
public void as_Double() throws Exception {
diffSingleTypeCompileTo_unexpectedCastError(multilineString(
"class A {",
" def fct(left : Float) : Double {",
" left as Double",
" }",
"}"));
}
@DifferedTest
public void as_AtomicInteger() throws Exception {
diffSingleTypeCompileTo_unexpectedCastError(multilineString(
"import java.util.concurrent.atomic.AtomicInteger",
"class A {",
" def fct(left : Float) : AtomicInteger {",
" left as AtomicInteger",
" }",
"}"));
}
@DifferedTest
public void as_AtomicLong() throws Exception {
diffSingleTypeCompileTo_unexpectedCastError(multilineString(
"import java.util.concurrent.atomic.AtomicLong",
"class A {",
" def fct(left : Float) : AtomicLong {",
" left as AtomicLong",
" }",
"}"));
}
@DifferedTest
public void as_AtomicDouble() throws Exception {
diffSingleTypeCompileTo_unexpectedCastError(multilineString(
"import com.google.common.util.concurrent.AtomicDouble",
"class A {",
" def fct(left : Float) : AtomicLong {",
" left as AtomicDouble",
" }",
"}"));
}
@DifferedTest
public void as_Number() throws Exception {
diffSingleTypeCompileTo(multilineString(
"class A {",
" def fct(left : Float) : Number {",
" left as Number",
" }",
"}"),
multilineString(
"import io.sarl.lang.annotation.SarlElementType;",
"import io.sarl.lang.annotation.SarlSpecification;",
"import io.sarl.lang.annotation.SyntheticMember;",
"import org.eclipse.xtext.xbase.lib.Pure;",
"",
"@SarlSpecification(\"" + SARLVersion.SPECIFICATION_RELEASE_VERSION_STRING + "\")",
"@SarlElementType(" + SarlPackage.SARL_CLASS + ")",
"@SuppressWarnings(\"all\")",
"public class A {",
" @Pure",
" public Number fct(final Float left) {",
" return ((Number) left);",
" }",
" ",
" @SyntheticMember",
" public A() {",
" super();",
" }",
"}",
""));
}
}
|
[
"galland@arakhne.org"
] |
galland@arakhne.org
|
4a2da28f8f0b450008b105cd0626193ddbe941ff
|
d664922140376541680caeff79873f21f64eb5aa
|
/tags/qagesa/v2.2/GAP/src/net/sf/gap/messages/Reply.java
|
f9957e85a15a812b397a042a4b8d4e9b142ebff5
|
[] |
no_license
|
gnovelli/gap
|
7d4b6e2eb7e1c0e62e86d26147c5de9c558d62f7
|
fd1cac76504d10eb96294a768833a9bdb102e66f
|
refs/heads/master
| 2021-01-10T20:11:00.977571
| 2012-02-23T20:19:44
| 2012-02-23T20:19:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,517
|
java
|
/*
****************************************************************************************
* Copyright © Giovanni Novelli
* All Rights Reserved.
****************************************************************************************
*
* Title: GAP Simulator
* Description: GAP (Grid Agents Platform) Toolkit for Modeling and Simulation
* of Mobile Agents on Grids
* License: GPL - http://www.gnu.org/copyleft/gpl.html
*
* Reply.java
*
* Created on 29 March 2007, 12.00 by Giovanni Novelli
*
****************************************************************************************
*
* $Revision: 275 $
* $Id: Reply.java 275 2008-01-27 10:39:07Z gnovelli $
* $HeadURL: https://gap.svn.sourceforge.net/svnroot/gap/tags/qagesa/v2.2/GAP/src/net/sf/gap/messages/Reply.java $
*
*****************************************************************************************
*/
package net.sf.gap.messages;
import net.sf.gap.util.EntitiesCounter;
import eduni.simjava.Sim_event;
/**
*
* @author Giovanni Novelli
*/
public abstract class Reply implements Cloneable {
private int replyID; // Unique reply ID
protected Request request;
/**
* Creates a new instance of Reply
*/
public Reply(int requestTAG, boolean ok, Request request) {
this.setRequestTAG(requestTAG);
this.setOk(ok);
this.setRequest(request);
EntitiesCounter.create("REP");
Integer irepID = EntitiesCounter.inc("REP");
int repID = irepID;
this.setReplyID(repID);
}
public static Reply get_data(Sim_event ev) {
Message<Reply> message = new Message<Reply>();
return message.get_data(ev);
}
protected boolean ok;
protected int requestTAG;
public int getEntityType() {
return this.getRequest().getDst_entityType();
}
public int getRequestTAG() {
return this.requestTAG;
}
public boolean isOk() {
return this.ok;
}
public void setOk(boolean ok) {
this.ok = ok;
}
public void setRequestTAG(int requestTAG) {
this.requestTAG = requestTAG;
}
public Request getRequest() {
return this.request;
}
public void setRequest(Request request) {
this.request = request;
}
public int getRequestID() {
return this.getRequest().getRequestID();
}
public int getReplyID() {
return replyID;
}
public void setReplyID(int replyID) {
this.replyID = replyID;
}
public int getReqrepID() {
return this.getRequest().getReqrepID();
}
}
|
[
"giovanni.novelli@gmail.com"
] |
giovanni.novelli@gmail.com
|
da8e41485449b9cf589a347d0082966d70d7f4f6
|
9ff153875921311054a27dd48ec46695e5a1893a
|
/net/minecraft/world/biome/BiomeGenPlains.java
|
1b490084e5631734495a6e7884232007c1ce233e
|
[] |
no_license
|
Nitrofyyy/SeaClientSourcev2.1
|
4d8f3151cdefcf49f10ddc6a4e861feff2e1df91
|
be0940967447fc3b9192e886a2b04dbb8636c03a
|
refs/heads/main
| 2023-08-31T13:01:54.044693
| 2021-10-22T08:23:35
| 2021-10-22T08:23:35
| 420,016,521
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,938
|
java
|
//
// Decompiled by Procyon v0.5.36
//
package net.minecraft.world.biome;
import net.minecraft.block.BlockDoublePlant;
import net.minecraft.world.World;
import net.minecraft.block.BlockFlower;
import net.minecraft.util.BlockPos;
import java.util.Random;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.passive.EntityHorse;
public class BiomeGenPlains extends BiomeGenBase
{
protected boolean field_150628_aC;
protected BiomeGenPlains(final int id) {
super(id);
this.setTemperatureRainfall(0.8f, 0.4f);
this.setHeight(BiomeGenPlains.height_LowPlains);
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
this.theBiomeDecorator.treesPerChunk = -999;
this.theBiomeDecorator.flowersPerChunk = 4;
this.theBiomeDecorator.grassPerChunk = 10;
}
@Override
public BlockFlower.EnumFlowerType pickRandomFlower(final Random rand, final BlockPos pos) {
final double d0 = BiomeGenPlains.GRASS_COLOR_NOISE.func_151601_a(pos.getX() / 200.0, pos.getZ() / 200.0);
if (d0 < -0.8) {
final int j = rand.nextInt(4);
switch (j) {
case 0: {
return BlockFlower.EnumFlowerType.ORANGE_TULIP;
}
case 1: {
return BlockFlower.EnumFlowerType.RED_TULIP;
}
case 2: {
return BlockFlower.EnumFlowerType.PINK_TULIP;
}
default: {
return BlockFlower.EnumFlowerType.WHITE_TULIP;
}
}
}
else {
if (rand.nextInt(3) > 0) {
final int i = rand.nextInt(3);
return (i == 0) ? BlockFlower.EnumFlowerType.POPPY : ((i == 1) ? BlockFlower.EnumFlowerType.HOUSTONIA : BlockFlower.EnumFlowerType.OXEYE_DAISY);
}
return BlockFlower.EnumFlowerType.DANDELION;
}
}
@Override
public void decorate(final World worldIn, final Random rand, final BlockPos pos) {
final double d0 = BiomeGenPlains.GRASS_COLOR_NOISE.func_151601_a((pos.getX() + 8) / 200.0, (pos.getZ() + 8) / 200.0);
if (d0 < -0.8) {
this.theBiomeDecorator.flowersPerChunk = 15;
this.theBiomeDecorator.grassPerChunk = 5;
}
else {
this.theBiomeDecorator.flowersPerChunk = 4;
this.theBiomeDecorator.grassPerChunk = 10;
BiomeGenPlains.DOUBLE_PLANT_GENERATOR.setPlantType(BlockDoublePlant.EnumPlantType.GRASS);
for (int i = 0; i < 7; ++i) {
final int j = rand.nextInt(16) + 8;
final int k = rand.nextInt(16) + 8;
final int l = rand.nextInt(worldIn.getHeight(pos.add(j, 0, k)).getY() + 32);
BiomeGenPlains.DOUBLE_PLANT_GENERATOR.generate(worldIn, rand, pos.add(j, l, k));
}
}
if (this.field_150628_aC) {
BiomeGenPlains.DOUBLE_PLANT_GENERATOR.setPlantType(BlockDoublePlant.EnumPlantType.SUNFLOWER);
for (int i2 = 0; i2 < 10; ++i2) {
final int j2 = rand.nextInt(16) + 8;
final int k2 = rand.nextInt(16) + 8;
final int l2 = rand.nextInt(worldIn.getHeight(pos.add(j2, 0, k2)).getY() + 32);
BiomeGenPlains.DOUBLE_PLANT_GENERATOR.generate(worldIn, rand, pos.add(j2, l2, k2));
}
}
super.decorate(worldIn, rand, pos);
}
@Override
protected BiomeGenBase createMutatedBiome(final int p_180277_1_) {
final BiomeGenPlains biomegenplains = new BiomeGenPlains(p_180277_1_);
biomegenplains.setBiomeName("Sunflower Plains");
biomegenplains.field_150628_aC = true;
biomegenplains.setColor(9286496);
biomegenplains.field_150609_ah = 14273354;
return biomegenplains;
}
}
|
[
"84819367+Nitrofyyy@users.noreply.github.com"
] |
84819367+Nitrofyyy@users.noreply.github.com
|
aa12fed11626d7be3ad059d664f2433f00004c39
|
2b2fcb1902206ad0f207305b9268838504c3749b
|
/WakfuClientSources/srcx/class_8478_dAK.java
|
fe76fe80a5b988a014c2400d5cbf117f3b0cb2b3
|
[] |
no_license
|
shelsonjava/Synx
|
4fbcee964631f747efc9296477dee5a22826791a
|
0cb26d5473ba1f36a3ea1d7163a5b9e6ebcb0b1d
|
refs/heads/master
| 2021-01-15T13:51:41.816571
| 2013-11-17T10:46:22
| 2013-11-17T10:46:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,406
|
java
|
import java.io.IOException;
import java.net.BindException;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import java.util.Iterator;
import java.util.Set;
import org.apache.log4j.Logger;
public class dAK extends bXH
{
private static final int lIp = 1024;
private static final int lIq = 5;
private static Logger K = Logger.getLogger(dAK.class);
protected ServerSocketChannel lIr;
protected int lIs;
protected String lIt;
protected int lIu = 0;
protected MV[] lIv = new MV[5];
public dAK(DL paramDL)
{
super(paramDL);
this.lIt = "";
this.lIs = 0;
kI("listener");
this.hnu = new bOO(new dKO(this));
try
{
this.lIr = ServerSocketChannel.open();
} catch (Exception localException) {
K.error(localException);
this.bZZ.a(this);
}
}
public void Z(String paramString, int paramInt)
{
this.lIt = paramString;
this.lIs = paramInt;
setName(getName() + "-listener-port-" + paramString + ":" + paramInt);
try
{
this.lIr.socket().setReuseAddress(true);
this.lIr.socket().bind(new InetSocketAddress(this.lIt, this.lIs), 1024);
this.lIr.configureBlocking(false);
this.lIr.register(this.hnt, 16);
for (int i = 0; i < 5; i++) {
this.lIv[i] = new MV(this.bZZ);
this.lIv[i].setName(getName() + "-slave-" + i);
this.lIv[i].start();
}
}
catch (BindException localBindException) {
K.error("Ouverture de socket impossible sur " + this.lIt + ":" + this.lIs + ". Port probablement déjà utilisé.");
this.bZZ.b(this);
} catch (IOException localIOException) {
K.error(localIOException);
this.bZZ.b(this);
}
K.info(getName() + " initialized: server mode.");
}
public int dej()
{
return this.lIs;
}
public String dek()
{
return this.lIt;
}
private MV del() {
if (this.lIu >= this.lIv.length)
this.lIu = 0;
return this.lIv[(this.lIu++)];
}
public void run()
{
K.info("Server ConnectionHandler started : bindAddress=" + this.lIt + ", bindPort=" + this.lIs + ", " + toString());
while (this.aKV) {
try
{
while (this.aKV) {
cdf();
int i = 0;
try {
i = this.hnt.select(hns);
} catch (Throwable localThrowable2) {
K.error("select() exception : ", localThrowable2);
}
if (i > 0) {
try {
Set localSet = this.hnt.selectedKeys();
Iterator localIterator = localSet.iterator();
while (localIterator.hasNext()) {
SelectionKey localSelectionKey = (SelectionKey)localIterator.next();
localIterator.remove();
try
{
if ((localSelectionKey.isValid()) && (localSelectionKey.isAcceptable()))
{
try
{
SocketChannel localSocketChannel = this.lIr.accept();
if (localSocketChannel != null) {
MV localMV = del();
localMV.a(localSocketChannel);
}
}
catch (Throwable localThrowable4)
{
K.error("accept() exception : ", localThrowable4);
}
}
}
catch (Throwable localThrowable5) {
K.error("Exception en traitant une clef dans le ListenerConnectionHandler : ", localThrowable5);
bcT localbcT = (bcT)localSelectionKey.attachment();
this.bZZ.d(this, localbcT);
localbcT.close();
localbcT.release();
}
}
}
catch (Throwable localThrowable3) {
K.error("Exception dans la loop interne du ListenerConnectionHandler : ", localThrowable3);
}
}
}
}
catch (Throwable localThrowable1)
{
K.error("Exception dans la loop externe du ListenerConnectionHandler : ", localThrowable1);
}
}
K.info("ListenerConnectionHandler stopped");
}
}
|
[
"music_inme@hotmail.fr"
] |
music_inme@hotmail.fr
|
cbf70cd42b645719e54f8a08d0823eb7e022f104
|
f662526b79170f8eeee8a78840dd454b1ea8048c
|
/beb.java
|
870dfbd577098a4a733f0bbb57529b81ef0d1931
|
[] |
no_license
|
jason920612/Minecraft
|
5d3cd1eb90726efda60a61e8ff9e057059f9a484
|
5bd5fb4dac36e23a2c16576118da15c4890a2dff
|
refs/heads/master
| 2023-01-12T17:04:25.208957
| 2020-11-26T08:51:21
| 2020-11-26T08:51:21
| 316,170,984
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 387
|
java
|
/* */
/* */
/* */
/* */ public abstract class beb
/* */ extends bcs
/* */ {
/* 7 */ public static final bme a = bma.H;
/* */
/* */ protected beb(bcs.c ☃) {
/* 10 */ super(☃);
/* */ }
/* */ }
/* Location: F:\dw\server.jar!\beb.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
[
"jasonya2206@gmail.com"
] |
jasonya2206@gmail.com
|
9955e83ac691e2db8006a1e89dcedf3f23a70ef4
|
352cb15cce9be9e4402131bb398a3c894b9c72bc
|
/src/main/java/chapter11/topic2/LeetCode_2055.java
|
1d0aa96834564295f50d4823b77f105d2f3e85c1
|
[
"MIT"
] |
permissive
|
DonaldY/LeetCode-Practice
|
9f67220bc6087c2c34606f81154a3e91c5ee6673
|
2b7e6525840de7ea0aed68a60cdfb1757b183fec
|
refs/heads/master
| 2023-04-27T09:58:36.792602
| 2023-04-23T15:49:22
| 2023-04-23T15:49:22
| 179,708,097
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,227
|
java
|
package chapter11.topic2;
/**
* @author donald
* @date 2022/03/08
*
* 2055. 蜡烛之间的盘子
*
* 给你一个长桌子,桌子上盘子和蜡烛排成一列。给你一个下标从 0 开始的字符串 s ,
* 它只包含字符 '*' 和 '|' ,其中 '*' 表示一个 盘子 ,'|' 表示一支 蜡烛 。
*
* 同时给你一个下标从 0 开始的二维整数数组 queries ,
* 其中 queries[i] = [lefti, righti] 表示 子字符串 s[lefti...righti] (包含左右端点的字符)。
* 对于每个查询,你需要找到 子字符串中 在 两支蜡烛之间 的盘子的 数目 。
* 如果一个盘子在 子字符串中 左边和右边 都 至少有一支蜡烛,那么这个盘子满足在 两支蜡烛之间 。
*
* 比方说,s = "||**||**|*" ,查询 [3, 8] ,表示的是子字符串 "*||**|" 。
* 子字符串中在两支蜡烛之间的盘子数目为 2 ,子字符串中右边两个盘子在它们左边和右边 都 至少有一支蜡烛。
* 请你返回一个整数数组 answer ,其中 answer[i] 是第 i 个查询的答案。
*
*
* 题目:
*
* 思路:
*/
public class LeetCode_2055 {
// Time: O(n + p), Space: O(n), Faster: 65.75%
public int[] platesBetweenCandles(String s, int[][] queries) {
int n = s.length();
int[] preSum = new int[n];
for (int i = 0, sum = 0; i < n; i++) {
if (s.charAt(i) == '*') {
sum++;
}
preSum[i] = sum;
}
int[] left = new int[n];
for (int i = 0, l = -1; i < n; i++) {
if (s.charAt(i) == '|') {
l = i;
}
left[i] = l;
}
int[] right = new int[n];
for (int i = n - 1, r = -1; i >= 0; i--) {
if (s.charAt(i) == '|') {
r = i;
}
right[i] = r;
}
int[] ans = new int[queries.length];
for (int i = 0; i < queries.length; i++) {
int[] query = queries[i];
int x = right[query[0]], y = left[query[1]];
ans[i] = x == -1 || y == -1 || x >= y ? 0 : preSum[y] - preSum[x];
}
return ans;
}
}
|
[
"448641125@qq.com"
] |
448641125@qq.com
|
8c07bb8e4a0d83c0cb8bb85a08073ae2a0b0416d
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/7/7_49c3cf33042fbce9b9915341b4e32723b894760c/GoToCommand/7_49c3cf33042fbce9b9915341b4e32723b894760c_GoToCommand_s.java
|
d331c04c3c57525703879006176f5740f597c8fe
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,482
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* 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.jledit.command.editor;
import org.jledit.ConsoleEditor;
import org.jledit.command.Command;
import java.io.IOException;
public class GoToCommand implements Command {
private final ConsoleEditor editor;
private final int line;
private final int column;
public GoToCommand(ConsoleEditor editor) {
this(editor, 0, 0);
}
public GoToCommand(ConsoleEditor editor, int line, int column) {
this.editor = editor;
this.line = line;
this.column = column;
}
@Override
public void execute() {
if (line == 0 || column == 0) {
try {
int targetLine = 1;
int targetColumn = 1;
String[] coords = editor.readLine("Go to:").split(",");
if (coords.length == 1) {
targetLine = Integer.parseInt(coords[0]);
}
if (coords.length == 2) {
targetLine = Integer.parseInt(coords[0]);
targetColumn = Integer.parseInt(coords[1]);
editor.move(targetLine, targetColumn);
}
} catch (Exception e) {
//noop
}
} else {
editor.move(line, column);
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
58dd0f0c782298472faff0a3a050042bbcda9a88
|
e3591ef38e2928c69183c1bc0e4d15d7b020751c
|
/sources/APK_Decompiled_to_java/DSAPK/src/main/java/android/support/design/widget/DirectedAcyclicGraph.java
|
dd42c65ce53502cd38c052a9f21cabcc3c1bcee6
|
[] |
no_license
|
d8ahazard/DreamscreenDocs
|
ab0695151d501d6f2176b21785eedaa5fc7f6557
|
225fbe6a279885fb6a54487ac4fe6a5a908878d9
|
refs/heads/master
| 2021-06-25T02:49:49.410684
| 2021-06-07T12:51:11
| 2021-06-07T12:51:11
| 225,887,222
| 6
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,522
|
java
|
package android.support.design.widget;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.util.Pools.Pool;
import androidx.core.util.Pools.SimplePool;
import androidx.collection.SimpleArrayMap;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
final class DirectedAcyclicGraph<T> {
private final SimpleArrayMap<T, ArrayList<T>> mGraph = new SimpleArrayMap<>();
private final Pool<ArrayList<T>> mListPool = new SimplePool(10);
private final ArrayList<T> mSortResult = new ArrayList<>();
private final HashSet<T> mSortTmpMarked = new HashSet<>();
DirectedAcyclicGraph() {
}
/* access modifiers changed from: 0000 */
public void addNode(@NonNull T node) {
if (!this.mGraph.containsKey(node)) {
this.mGraph.put(node, null);
}
}
/* access modifiers changed from: 0000 */
public boolean contains(@NonNull T node) {
return this.mGraph.containsKey(node);
}
/* access modifiers changed from: 0000 */
public void addEdge(@NonNull T node, @NonNull T incomingEdge) {
if (!this.mGraph.containsKey(node) || !this.mGraph.containsKey(incomingEdge)) {
throw new IllegalArgumentException("All nodes must be present in the graph before being added as an edge");
}
ArrayList<T> edges = (ArrayList) this.mGraph.get(node);
if (edges == null) {
edges = getEmptyList();
this.mGraph.put(node, edges);
}
edges.add(incomingEdge);
}
/* access modifiers changed from: 0000 */
@Nullable
public List getIncomingEdges(@NonNull T node) {
return (List) this.mGraph.get(node);
}
/* access modifiers changed from: 0000 */
@Nullable
public List<T> getOutgoingEdges(@NonNull T node) {
ArrayList<T> result = null;
int size = this.mGraph.size();
for (int i = 0; i < size; i++) {
ArrayList<T> edges = (ArrayList) this.mGraph.valueAt(i);
if (edges != null && edges.contains(node)) {
if (result == null) {
result = new ArrayList<>();
}
result.add(this.mGraph.keyAt(i));
}
}
return result;
}
/* access modifiers changed from: 0000 */
public boolean hasOutgoingEdges(@NonNull T node) {
int size = this.mGraph.size();
for (int i = 0; i < size; i++) {
ArrayList<T> edges = (ArrayList) this.mGraph.valueAt(i);
if (edges != null && edges.contains(node)) {
return true;
}
}
return false;
}
/* access modifiers changed from: 0000 */
public void clear() {
int size = this.mGraph.size();
for (int i = 0; i < size; i++) {
ArrayList<T> edges = (ArrayList) this.mGraph.valueAt(i);
if (edges != null) {
poolList(edges);
}
}
this.mGraph.clear();
}
/* access modifiers changed from: 0000 */
@NonNull
public ArrayList<T> getSortedList() {
this.mSortResult.clear();
this.mSortTmpMarked.clear();
int size = this.mGraph.size();
for (int i = 0; i < size; i++) {
dfs(this.mGraph.keyAt(i), this.mSortResult, this.mSortTmpMarked);
}
return this.mSortResult;
}
private void dfs(T node, ArrayList<T> result, HashSet<T> tmpMarked) {
if (!result.contains(node)) {
if (tmpMarked.contains(node)) {
throw new RuntimeException("This graph contains cyclic dependencies");
}
tmpMarked.add(node);
ArrayList<T> edges = (ArrayList) this.mGraph.get(node);
if (edges != null) {
int size = edges.size();
for (int i = 0; i < size; i++) {
dfs(edges.get(i), result, tmpMarked);
}
}
tmpMarked.remove(node);
result.add(node);
}
}
/* access modifiers changed from: 0000 */
public int size() {
return this.mGraph.size();
}
@NonNull
private ArrayList<T> getEmptyList() {
ArrayList<T> list = (ArrayList) this.mListPool.acquire();
if (list == null) {
return new ArrayList<>();
}
return list;
}
private void poolList(@NonNull ArrayList<T> list) {
list.clear();
this.mListPool.release(list);
}
}
|
[
"d8ahazard@gmail.com"
] |
d8ahazard@gmail.com
|
5d89d02e9cc3a68f444ac9dda3cc23f28034f40f
|
7e689be329d1aae9065b59c9549ee06fddecee3b
|
/platform/src/java/com/xcase/intapp/cdsrefdata/impl/simple/methods/PostTypesMethod.java
|
a7b702cdbbb73d1fe53e1831ac87b9d9d49acc55
|
[] |
no_license
|
martinpg2001/xcase
|
14564efa8160105ed2301a2c7ad79293a039414a
|
e530d16f951adbdde1694b0d837bfd6c6c9b7f6b
|
refs/heads/master
| 2023-08-22T14:28:40.712362
| 2023-08-01T03:52:35
| 2023-08-01T03:52:35
| 34,886,456
| 0
| 2
| null | 2022-12-12T02:45:28
| 2015-05-01T02:20:51
|
Java
|
UTF-8
|
Java
| false
| false
| 3,570
|
java
|
package com.xcase.intapp.cdsrefdata.impl.simple.methods;
import com.xcase.common.impl.simple.core.CommonHttpResponse;
import com.xcase.intapp.cdsrefdata.factories.CDSRefDataResponseFactory;
import com.xcase.intapp.cdsrefdata.transputs.PostTypesRequest;
import com.xcase.intapp.cdsrefdata.transputs.PostTypesResponse;
import java.lang.invoke.MethodHandles;
import java.util.HashMap;
import org.apache.http.Header;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class PostTypesMethod extends BaseCDSRefDataMethod {
private HashMap<String, String> typeHashMap = new HashMap<String, String>();
/**
* log4j object.
*/
protected static final Logger LOGGER = LogManager.getLogger(MethodHandles.lookup().lookupClass());
public PostTypesResponse postTypes(PostTypesRequest request) {
LOGGER.debug("starting postTypes()");
PostTypesResponse response = CDSRefDataResponseFactory.createPostTypesResponse();
LOGGER.debug("created response");
try {
typeHashMap.put("BillableStatus", "billablestatuses");
typeHashMap.put("ClientExternalId", "clientexternalidtypes");
typeHashMap.put("ClientPerson", "clientpersontypes");
typeHashMap.put("ClientStatus", "clientstatuses");
typeHashMap.put("CostPool", "costpools");
typeHashMap.put("Department", "departments");
typeHashMap.put("EBillingHubValidation", "ebillinghubvalidationtypes");
typeHashMap.put("MatterExternalId", "matterexternalidtypes");
typeHashMap.put("MatterPerson", "matterpersontypes");
typeHashMap.put("Office", "offices");
typeHashMap.put("PersonExternalId", "personexternalidtypes");
typeHashMap.put("Practice", "practices");
typeHashMap.put("Rounding", "roundingtypes");
typeHashMap.put("Title", "titles");
String baseVersionUrl = getAPIVersionUrl();
LOGGER.debug("baseVersionUrl is " + baseVersionUrl);
String operationPath = request.getOperationPath();
LOGGER.debug("operationPath is " + operationPath);
endPoint = baseVersionUrl + operationPath;
String type = request.getType();
endPoint = endPoint.replace("{type}", typeHashMap.get(type));
LOGGER.debug("endPoint is " + endPoint);
String entityString = request.getEntityString();
String accessToken = request.getAccessToken();
LOGGER.debug("accessToken is " + accessToken);
Header authorizationHeader = createCDSRefDataAuthenticationTokenHeader(accessToken);
LOGGER.debug("created Authorization header");
Header acceptHeader = createAcceptHeader();
Header contentTypeHeader = createContentTypeHeader();
Header[] headers = {acceptHeader, authorizationHeader, contentTypeHeader};
CommonHttpResponse commonHttpResponse = httpManager.doCommonHttpResponsePost(endPoint, headers, null, entityString, null);
int responseCode = commonHttpResponse.getResponseCode();
LOGGER.debug("responseCode is " + responseCode);
response.setResponseCode(responseCode);
if (responseCode == 200) {
handleExpectedResponseCode(response, commonHttpResponse);
} else {
handleUnexpectedResponseCode(response, commonHttpResponse);
}
} catch (Exception e) {
handleUnexpectedException(response, e);
}
return response;
}
}
|
[
"martin.gilchrist@intapp.com"
] |
martin.gilchrist@intapp.com
|
ffcb36aa5428de4e04bac4ac8274971f573d6194
|
9f5b9d1cbad1020a5ff3082da4568cc74ee0636b
|
/src/main/java/com/example/zsp/SpringBootDemo/config/SwaggerConfig.java
|
f014fc281759ad276fe3c39ba47d4948b77f89fc
|
[] |
no_license
|
zsp19931222/SpringBootDemo
|
eccf5ee26ab9167c60bb862a37238a67bcc8392d
|
f2c22dced63fe25858711cdadd3d3cc174e36561
|
refs/heads/master
| 2023-01-15T19:42:11.019698
| 2020-11-26T08:26:38
| 2020-11-26T08:26:38
| 316,163,933
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,520
|
java
|
package com.example.zsp.SpringBootDemo.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
* description: swagger配置
* author:Andy on 2020/11/23 0023-15:33
* email:zsp872126510@gmail.com
*/
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Bean
public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("com.example"))
.paths(PathSelectors.any())
.build();
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("基于Swagger构建的Rest API文档")
.description("更多请咨询服务开发者")
.contact(new Contact("周劭鹏", "http://www.baidu.com", "872126510@gmail.com"))
.termsOfServiceUrl("http://www.eknown.com")
.version("1.0")
.build();
}
}
|
[
"872126510@qq.com"
] |
872126510@qq.com
|
f2385723e7d399b397ba9310185ecac7e95c4ed9
|
3be06fef3717172e972021a617e2e6396090df40
|
/component/progmodel/wrapper/wrapper-metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/internal/IClassInstantiatorCE.java
|
d551c72a65afe663246a970c49ded27bfb96c99a
|
[
"Apache-2.0"
] |
permissive
|
fengabe/isis
|
a7479344776a039e141ac7a74be072f321f73193
|
e5e5a72867c5a6fb20f6eb008fcf4423afeca68a
|
refs/heads/master
| 2020-04-08T07:19:10.689819
| 2013-05-06T15:28:35
| 2013-05-06T15:28:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,383
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.isis.progmodel.wrapper.metamodel.internal;
/**
* Used to instantiate a given class.
*/
interface IClassInstantiatorCE {
/**
* Return a new instance of the specified class. The recommended way is
* without calling any constructor. This is usually done by doing like
* <code>ObjectInputStream.readObject()</code> which is JVM specific.
*
* @param c
* Class to instantiate
* @return new instance of clazz
*/
Object newInstance(Class<?> clazz) throws InstantiationException;
}
|
[
"danhaywood@apache.org"
] |
danhaywood@apache.org
|
91151737c2616dfd00ce572c3ad4cecd25bc0fb1
|
4148c71fc73d5b8e553c07deede613f46cde3c46
|
/src/org/processmining/parameters/DecomposeAcceptingPetriNetUsingActivityClusterArrayParameters.java
|
8ef80fbf74f47f8eb16cd2dea44dd95a1f387422
|
[] |
no_license
|
Macuyiko/processmining-decomposedconformance
|
3aee21d918d6de3554654e3fcb9e707cf284bc34
|
fc00844788e68e15580eab2071f02dc11c0b78e6
|
refs/heads/master
| 2020-05-07T15:27:08.707573
| 2019-04-10T17:58:10
| 2019-04-10T17:58:10
| 180,635,740
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,938
|
java
|
package org.processmining.parameters;
import java.util.Set;
import org.deckfour.xes.classification.XEventClass;
import org.deckfour.xes.classification.XEventClassifier;
import org.processmining.dialogs.TransEvClassMappingPanel;
import org.processmining.models.AcceptingPetriNet;
import org.processmining.models.graphbased.directed.petrinet.elements.Transition;
import org.processmining.plugins.connectionfactories.logpetrinet.TransEvClassMapping;
public class DecomposeAcceptingPetriNetUsingActivityClusterArrayParameters {
private TransEvClassMapping map;
private XEventClass invisibleActivity;
private static double BESTTHRESHOLD = 0.9;
private static double SECONDBESTTHRESHOLD = 0.05;
public DecomposeAcceptingPetriNetUsingActivityClusterArrayParameters(AcceptingPetriNet net,
Set<XEventClass> activities, XEventClassifier classifier) {
invisibleActivity = new XEventClass(TransEvClassMappingPanel.INVISIBLE, activities.size());
map = new TransEvClassMapping(classifier, invisibleActivity);
for (Transition transition : net.getNet().getTransitions()) {
map.put(transition, invisibleActivity);
for (XEventClass activity : activities) {
if (activity.getId().equals(transition.getLabel())) {
map.put(transition, activity);
}
}
}
for (Transition transition : map.keySet()) {
if (map.get(transition).equals(invisibleActivity)) {
if (activities.size() == 1) {
XEventClass activity = activities.iterator().next();
if (match(transition.getLabel(), activity.getId()) > BESTTHRESHOLD) {
map.put(transition, activity);
}
} else if (activities.size() > 1){
double bestMatch = 0.0;
double secondBestMatch = 0.0;
XEventClass bestActivity = activities.iterator().next();
for (XEventClass activity : activities) {
double match = match(transition.getLabel(), activity.getId());
// System.out.println(transition.getLabel() + " " + activity.getId() + " " + match);
if (match > bestMatch) {
secondBestMatch = bestMatch;
bestMatch = match;
bestActivity = activity;
} else if (match > secondBestMatch) {
secondBestMatch = match;
}
}
// System.out.println(transition.getLabel() + " " + bestMatch + " " + secondBestMatch);
if (bestMatch > BESTTHRESHOLD && bestMatch - secondBestMatch > SECONDBESTTHRESHOLD) {
map.put(transition, bestActivity);
}
}
}
}
}
public void setMapping(TransEvClassMapping mapping) {
this.map = mapping;
}
public TransEvClassMapping getMapping() {
return map;
}
public void setInvisibleActivity(XEventClass invisibleActivity) {
this.invisibleActivity = invisibleActivity;
}
public XEventClass getInvisibleActivity() {
return invisibleActivity;
}
public boolean equals(Object object) {
if (object instanceof DecomposeAcceptingPetriNetUsingActivityClusterArrayParameters) {
DecomposeAcceptingPetriNetUsingActivityClusterArrayParameters parameters = (DecomposeAcceptingPetriNetUsingActivityClusterArrayParameters) object;
return map.equals(parameters.map);
}
return false;
}
private int minimum(int a, int b, int c) {
return Math.min(Math.min(a, b), c);
}
public int computeLevenshteinDistance(CharSequence str1, CharSequence str2) {
int[][] distance = new int[str1.length() + 1][str2.length() + 1];
for (int i = 0; i <= str1.length(); i++)
distance[i][0] = i;
for (int j = 1; j <= str2.length(); j++)
distance[0][j] = j;
for (int i = 1; i <= str1.length(); i++)
for (int j = 1; j <= str2.length(); j++)
distance[i][j] = minimum(distance[i - 1][j] + 1, distance[i][j - 1] + 1, distance[i - 1][j - 1]
+ ((str1.charAt(i - 1) == str2.charAt(j - 1)) ? 0 : 1));
return distance[str1.length()][str2.length()];
}
public double match(CharSequence str1, CharSequence str2) {
return 1.0 - ((1.0 * computeLevenshteinDistance(str1, str2)) / (str1.length() + str2.length()));
}
}
|
[
"macuyiko@gmail.com"
] |
macuyiko@gmail.com
|
7a2426fe00a87ee8d05ffab94c541d3862e8ffa7
|
1b496b05fab9b9bcc6d7f9027d343058f8ef91a6
|
/src/main/java/com/qwit/service/DbFindingCreator.java
|
d97c323c399b4a5d34a930e336a400d32276d34a
|
[] |
no_license
|
romanm/treatment-plan2
|
9741f4e84224690f1c81b4f6bd67a477b34625f3
|
5a856881c2821ffbb684bbdaa34ab6799067ed4a
|
refs/heads/master
| 2021-01-25T04:58:02.466599
| 2014-03-23T18:40:47
| 2014-03-23T18:40:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,355
|
java
|
package com.qwit.service;
import java.util.List;
import com.qwit.domain.Finding;
import com.qwit.domain.MObject;
public class DbFindingCreator extends DbObjMCreator {
Finding finding;
public DbFindingCreator setMtlO(Finding finding) {
this.finding = finding;
return this;
}
public DbFindingCreator (){
setSql(" SELECT d FROM Finding d WHERE " +
" d.finding= :finding AND d.unit=:unit ");
}
@Override
public void create() {
log.info("----- 1 "+finding);
StringBuffer sqls = new StringBuffer().append("\n-- DB UPDATE BEGIN \n");
getDbUpdate().setParamL()
.setParam(finding.getFinding())
.setParam(finding.getUnit());
getDbUpdate().updateDirect(sqls);
sqls.append("-- DB UPDATE END \n");
log.info(sqls);
}
@Override
public MObject read() {
String sql2 = "SELECT * FROM Finding " +
" WHERE finding = '"+finding.getFinding() +"' " +
" AND unit='"+finding.getUnit()+"'";
List<Finding> dL =
em.createNativeQuery(sql2,Finding.class).getResultList();
// em.createQuery(sql)
// .setParameter("checkitem", checkitem.getCheckitem())
// .setParameter("type", checkitem.getType())
// .getResultList();
Finding pvDb=null;
if(dL.size()>0)
{
pvDb=dL.get(0);
}
return pvDb;
}
@Override
public boolean isNull() {
if(!finding.hasFinding()&&!finding.hasUnit()) return true;
return false;
}
}
|
[
"roman.mishchenko@gmail.com"
] |
roman.mishchenko@gmail.com
|
341d77a61f9adc58b82a57de5da0d46e3b36d78d
|
41cd4a03d58a57ca689069fdcc358972788b3b21
|
/JsonParsing/src/com/paradigmcreatives/jsonparsing/JSONParser.java
|
8c2fdbf8922c4561e4aa3b7a86ab73ca4505ea45
|
[] |
no_license
|
sandeep87/git-sample
|
b3160d1879af6905618418aa1d9f050ada22ca7e
|
47073895e8385fdc42e327cb16e4097fb712ed5c
|
refs/heads/master
| 2021-01-01T19:16:13.082250
| 2013-04-24T08:39:49
| 2013-04-24T08:39:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,948
|
java
|
package com.paradigmcreatives.jsonparsing;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONException;
import org.json.JSONObject;
import android.util.Log;
public class JSONParser {
InputStream is = null;
JSONObject jObj = null;
String json = "";
public JSONParser() {
}
public JSONObject getJSONFromUrl(String url) {
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost();
try {
URI uri = new URI(url);
httpPost.setURI(uri);
HttpResponse httpResponse = httpClient.execute(httpPost);
HttpEntity httpEntity = httpResponse.getEntity();
is = httpEntity.getContent();
} catch (URISyntaxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
BufferedReader br = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
StringBuilder sb = new StringBuilder();
String line = null;
try {
while((line = br.readLine()) != null) {
sb.append(line +"\n");
}
is.close();
json = sb.toString();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
jObj = new JSONObject(json);
} catch (JSONException e) {
Log.e("JSON Parser", "Error parsing data " + e.toString());
}
return jObj;
}
}
|
[
"sandeep.ayipilla@paradigmcreatives.com"
] |
sandeep.ayipilla@paradigmcreatives.com
|
86f3e8d3b34c797eaff2ba7dd0cf4f7dbf469a25
|
b14ac8880ddbe636f6c837f038586b199c374f2c
|
/safeguard-impl/src/main/java/org/apache/safeguard/impl/FailsafeExecutionManager.java
|
178a381d6420c5f8b6f3fbd1d0b83ea9b5f5c128
|
[
"Apache-2.0"
] |
permissive
|
jeanouii/geronimo-safeguard
|
7d72532089e8079c8317487a4d0325eb77125264
|
717bc162694205e752d8a01bc9a17445cf83f582
|
refs/heads/master
| 2021-05-04T12:12:29.266147
| 2018-01-06T18:04:26
| 2018-01-06T18:04:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,377
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.safeguard.impl;
import org.apache.safeguard.api.ExecutionManager;
import org.apache.safeguard.api.bulkhead.BulkheadManager;
import org.apache.safeguard.api.circuitbreaker.CircuitBreakerManager;
import org.apache.safeguard.api.retry.RetryManager;
import org.apache.safeguard.impl.bulkhead.BulkheadManagerImpl;
import org.apache.safeguard.impl.circuitbreaker.FailsafeCircuitBreakerManager;
import org.apache.safeguard.impl.config.MicroprofileAnnotationMapper;
import org.apache.safeguard.impl.executionPlans.ExecutionPlanFactory;
import org.apache.safeguard.impl.retry.FailsafeRetryManager;
import javax.enterprise.inject.Vetoed;
import javax.interceptor.InvocationContext;
import java.lang.reflect.Method;
import java.time.Duration;
import java.util.concurrent.Callable;
@Vetoed
public class FailsafeExecutionManager implements ExecutionManager {
private final MicroprofileAnnotationMapper mapper;
private final BulkheadManager bulkheadManager;
private final CircuitBreakerManager circuitBreakerManager;
private final RetryManager retryManager;
private final ExecutionPlanFactory executionPlanFactory;
public FailsafeExecutionManager() {
FailsafeCircuitBreakerManager circuitBreakerManager = new FailsafeCircuitBreakerManager();
FailsafeRetryManager retryManager = new FailsafeRetryManager();
BulkheadManagerImpl bulkheadManager = new BulkheadManagerImpl();
this.mapper = MicroprofileAnnotationMapper.getInstance();
this.executionPlanFactory = new ExecutionPlanFactory(circuitBreakerManager, retryManager, bulkheadManager, mapper);
this.circuitBreakerManager = circuitBreakerManager;
this.retryManager = retryManager;
this.bulkheadManager = bulkheadManager;
}
public FailsafeExecutionManager(MicroprofileAnnotationMapper mapper, BulkheadManagerImpl bulkheadManager,
FailsafeCircuitBreakerManager circuitBreakerManager, FailsafeRetryManager retryManager,
ExecutionPlanFactory executionPlanFactory) {
this.mapper = mapper;
this.bulkheadManager = bulkheadManager;
this.circuitBreakerManager = circuitBreakerManager;
this.retryManager = retryManager;
this.executionPlanFactory = executionPlanFactory;
}
public Object execute(InvocationContext invocationContext) {
Method method = invocationContext.getMethod();
return executionPlanFactory.locateExecutionPlan(method).execute(invocationContext::proceed, invocationContext);
}
@Override
public <T> T execute(String name, Callable<T> callable) {
return executionPlanFactory.locateExecutionPlan(name, null, false).execute(callable, null);
}
public <T> T executeAsync(String name, Callable<T> callable) {
return executionPlanFactory.locateExecutionPlan(name, null, true).execute(callable, null);
}
public <T> T executeAsync(String name, Callable<T> callable, Duration timeout) {
return executionPlanFactory.locateExecutionPlan(name, timeout, true).execute(callable, null);
}
public ExecutionPlanFactory getExecutionPlanFactory() {
return executionPlanFactory;
}
@Override
public CircuitBreakerManager getCircuitBreakerManager() {
return circuitBreakerManager;
}
@Override
public RetryManager getRetryManager() {
return retryManager;
}
@Override
public BulkheadManager getBulkheadManager() {
return bulkheadManager;
}
}
|
[
"johndament@apache.org"
] |
johndament@apache.org
|
80bd267997b2ed384ca2cb9976474072678784d6
|
17c30fed606a8b1c8f07f3befbef6ccc78288299
|
/Mate10_8_1_0/src/main/java/com/huawei/android/location/activityrecognition/SDKLog.java
|
fc1335c45e82b43900150918b100308897c4799d
|
[] |
no_license
|
EggUncle/HwFrameWorkSource
|
4e67f1b832a2f68f5eaae065c90215777b8633a7
|
162e751d0952ca13548f700aad987852b969a4ad
|
refs/heads/master
| 2020-04-06T14:29:22.781911
| 2018-11-09T05:05:03
| 2018-11-09T05:05:03
| 157,543,151
| 1
| 0
| null | 2018-11-14T12:08:01
| 2018-11-14T12:08:01
| null |
UTF-8
|
Java
| false
| false
| 471
|
java
|
package com.huawei.android.location.activityrecognition;
import android.util.Log;
public class SDKLog {
private static boolean mDebug = true;
public static void d(String tag, String msg) {
if (mDebug) {
Log.d(tag, msg);
}
}
public static void w(String tag, String msg) {
if (mDebug) {
Log.w(tag, msg);
}
}
public static void e(String tag, String msg) {
Log.e(tag, msg);
}
}
|
[
"lygforbs0@mail.com"
] |
lygforbs0@mail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.