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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e551f49a131dd9e59f3b4d703ee085c40e237979
|
4177bf760e133c4fa68b074502bbf988cdd51dba
|
/src/工厂模式/工厂方法模式/咖啡店实例/LatteCoffee.java
|
ce1ede6a5c508df076ef4c3cd80ebf022fe705a3
|
[] |
no_license
|
lcl100/designpattern-learning
|
e476293578e08a3c6b9526c9fabd4f78ba70dbae
|
adc2f10d8d0909868eef8fff631fae79ea7c74f3
|
refs/heads/main
| 2023-06-23T04:06:05.074199
| 2021-07-25T02:56:51
| 2021-07-25T02:56:51
| 344,418,812
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 259
|
java
|
package 工厂模式.工厂方法模式.咖啡店实例;
/**
* @author lcl100
* @create 2021-07-04 21:24
* @desc 拿铁咖啡
*/
public class LatteCoffee extends Coffee {
@Override
public String getName() {
return "拿铁咖啡";
}
}
|
[
"2961316542@qq.com"
] |
2961316542@qq.com
|
319b523cb8bc10471b539b1a3d7fe695a5a2f92d
|
0706cfcc326eb57b3fedeea54cca5c29fc7e60c4
|
/6-01/src/main/java/org/cxy/demo/CreateAccountMqService.java
|
e2322e6f3092bf01190880789943dd1636cab2e6
|
[] |
no_license
|
currynice/design-example
|
ec2147ce3108a678905cba700455593981b5aaa3
|
b2193ade4bea5b68f12c8e3b6a73fa34821bf388
|
refs/heads/main
| 2023-07-19T21:58:45.428961
| 2021-08-27T08:05:03
| 2021-08-27T08:05:03
| 396,593,750
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 468
|
java
|
package org.cxy.demo;
import com.alibaba.fastjson.JSON;
import org.cxy.demo.message.CreateAccountMq;
/**
* 接收到 {@link CreateAccountMq} 消息后的实现
*/
public class CreateAccountMqService {
public void onMessage(String message) {
CreateAccountMq mq = JSON.parseObject(message, CreateAccountMq.class);
/**
* deal with the message
*/
System.out.println("receive a [CreateAccount] message:"+mq);
}
}
|
[
"694975984@qq.com"
] |
694975984@qq.com
|
f626667ec4d94d3e05b4d0c64de2675e5add7cb4
|
8dc49f037b885dae5f198d625129c96edce2bc1e
|
/study/bill/org/jdesktop/swingx/plaf/macosx/MacOSXStatusBarUI.java
|
67cc0e8e10cf0607c4c2440e48c4b1c3745b9299
|
[] |
no_license
|
Dlyyy/javaproject
|
65460e0d281f017a346776f3f4b6efff6b284642
|
0d37584bf1b3fb4302afbe9571850a7c7f70a11a
|
refs/heads/master
| 2020-04-10T21:33:09.102813
| 2019-01-26T01:33:20
| 2019-01-26T01:33:20
| 161,299,205
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,328
|
java
|
/* */ package org.jdesktop.swingx.plaf.macosx;
/* */
/* */ import javax.swing.JComponent;
/* */ import javax.swing.LookAndFeel;
/* */ import javax.swing.plaf.ComponentUI;
/* */ import org.jdesktop.swingx.JXStatusBar;
/* */ import org.jdesktop.swingx.plaf.basic.BasicStatusBarUI;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class MacOSXStatusBarUI
/* */ extends BasicStatusBarUI
/* */ {
/* */ public static ComponentUI createUI(JComponent c)
/* */ {
/* 47 */ return new MacOSXStatusBarUI();
/* */ }
/* */
/* */
/* */
/* */
/* */ protected void installDefaults(JXStatusBar sb)
/* */ {
/* 55 */ super.installDefaults(sb);
/* */
/* 57 */ LookAndFeel.installProperty(this.statusBar, "opaque", Boolean.FALSE);
/* */ }
/* */ }
/* Location: E:\java\java学习\hutubill\lib\all.jar!\org\jdesktop\swingx\plaf\macosx\MacOSXStatusBarUI.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"704220442@qq.com"
] |
704220442@qq.com
|
30596f2e3f4b44251a76781b7db7168f581d7f91
|
6d5e18a2312e58ae1088bc2b7da564e8fd8fb883
|
/src/main/java/com/opengamma/elsql/OrSqlFragment.java
|
704a24947b75cff76c0c726567bf57abb2115027
|
[
"Apache-2.0"
] |
permissive
|
andrewdmay/ElSql
|
fa4a85d98c27943cb350c2623405e253329780eb
|
23c76cbcbcdac015df8eebaffee354c54a4bd68a
|
refs/heads/master
| 2020-12-27T15:27:37.374397
| 2019-01-25T21:15:50
| 2019-01-25T21:15:50
| 26,189,875
| 0
| 0
|
NOASSERTION
| 2019-01-25T21:15:51
| 2014-11-04T21:37:37
|
Java
|
UTF-8
|
Java
| false
| false
| 1,106
|
java
|
/**
* Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.elsql;
/**
* Representation of OR(expression).
* <p>
* This outputs an OR clause if the expression is true.
* It also avoids outputting OR if the last thing in the buffer is WHERE.
*/
final class OrSqlFragment extends ConditionalSqlFragment {
/**
* Creates an instance.
*
* @param variable the variable to determine whether to include the OR on, not null
* @param matchValue the value to match, null to match on existence
*/
OrSqlFragment(String variable, String matchValue) {
super(variable, matchValue);
}
//-------------------------------------------------------------------------
@Override
void toSQL(StringBuilder buf, SqlFragments fragments, SqlParams params, int loopIndex) {
if (isMatch(params, loopIndex)) {
if (endsWith(buf, " WHERE ") == false && endsWith(buf, " OR ") == false) {
buf.append("OR ");
}
super.toSQL(buf, fragments, params, loopIndex);
}
}
}
|
[
"stephen@opengamma.com"
] |
stephen@opengamma.com
|
1e208c085c0de6f6ac908e79b22c588988bb85d2
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project75/src/main/java/org/gradle/test/performance75_3/Production75_298.java
|
30c151f7bafac4941641a39331e189c51686bf14
|
[] |
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
| 305
|
java
|
package org.gradle.test.performance75_3;
public class Production75_298 extends org.gradle.test.performance16_3.Production16_298 {
private final String property;
public Production75_298() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
8281b727681848c99bc5b0e68c6b967336448043
|
5bf8000d46e55fcc92cdf409489f942714020856
|
/alfresco-mobile-android-client-api/src/main/java/org/alfresco/mobile/android/api/model/impl/ModelDefinitionImpl.java
|
d64b055b765703b4944e49231a4a9f207b1357c2
|
[
"Apache-2.0"
] |
permissive
|
asksasasa83/alfresco-android-sdk
|
2a279d124d78c2df18b26d85dcbb1b70a6d2ad55
|
ab6b136135996c2b72b53e21dbbff0e32894e35e
|
refs/heads/master
| 2022-12-26T20:52:06.372697
| 2020-10-13T07:11:11
| 2020-10-13T07:56:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,819
|
java
|
/*******************************************************************************
* Copyright (C) 2005-2014 Alfresco Software Limited.
*
* This file is part of the Alfresco Mobile SDK.
*
* 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.alfresco.mobile.android.api.model.impl;
import java.util.ArrayList;
import java.util.List;
import org.alfresco.mobile.android.api.constants.ModelMappingUtils;
import org.alfresco.mobile.android.api.model.ModelDefinition;
import org.alfresco.mobile.android.api.model.PropertyDefinition;
import org.apache.chemistry.opencmis.client.api.ObjectType;
import android.text.TextUtils;
/**
* @since 1.4
* @author Jean Marie Pascal
*/
public class ModelDefinitionImpl implements ModelDefinition
{
private static final long serialVersionUID = 1L;
protected org.apache.chemistry.opencmis.commons.definitions.TypeDefinition typeDefinition;
//protected Map<String, PropertyDefinition> propertiesIndex;
// ////////////////////////////////////////////////////////////////////////////////////
// CONSTRUCTORS
// ////////////////////////////////////////////////////////////////////////////////////
/**
* Instantiates a new tag impl.
*/
public ModelDefinitionImpl()
{
}
/**
* Instantiates a new tag impl.
*
* @param value the value of the tag
*/
public ModelDefinitionImpl(ObjectType typeDefinition)
{
this.typeDefinition = typeDefinition;
}
// ////////////////////////////////////////////////////////////////////////////////////
// PUBLIC METHODS
// ////////////////////////////////////////////////////////////////////////////////////
public String getName()
{
if (typeDefinition.getId() != null && typeDefinition.getId().startsWith(getPrefix()))
{
return typeDefinition.getId().replaceFirst(getPrefix(), "");
}
else
{
return typeDefinition.getId();
}
}
public String getTitle()
{
if (typeDefinition.getDisplayName() != null && typeDefinition.getDisplayName().startsWith(getPrefix()))
{
return typeDefinition.getDisplayName().replaceFirst(getPrefix(), "");
}
else
{
return typeDefinition.getDisplayName();
}
}
public String getDescription()
{
if (typeDefinition != null) { return typeDefinition.getDescription(); }
return null;
}
public String getParent()
{
if (typeDefinition != null)
{
if (typeDefinition.getParentTypeId() != null && typeDefinition.getParentTypeId().startsWith(getPrefix()))
{
return typeDefinition.getParentTypeId().replaceFirst(getPrefix(), "");
}
else
{
return typeDefinition.getParentTypeId();
}
}
return null;
}
@Override
public List<String> getPropertyNames()
{
if (typeDefinition == null || typeDefinition.getPropertyDefinitions() == null) { return new ArrayList<String>(); }
return new ArrayList<String>(typeDefinition.getPropertyDefinitions().keySet());
}
@Override
public PropertyDefinition getPropertyDefinition(String propertyKey)
{
if (TextUtils.isEmpty(propertyKey)){return null;}
boolean isCmis = propertyKey.startsWith("cmis:");
String prop = ModelMappingUtils.getPropertyName(propertyKey);
if (typeDefinition != null && typeDefinition.getPropertyDefinitions() != null
&& typeDefinition.getPropertyDefinitions().containsKey(prop)) { return new PropertyDefinitionImpl(isCmis,
typeDefinition.getPropertyDefinitions().get(prop)); }
return null;
}
// ////////////////////////////////////////////////////////////////////////////////////
// Internal Utils
// ////////////////////////////////////////////////////////////////////////////////////
protected String getPrefix()
{
return "";
}
}
|
[
"jeanmarie.pascal@alfresco.com"
] |
jeanmarie.pascal@alfresco.com
|
3486c7575b95c3e8397100adaf8432e595dc5329
|
4f5311b10cc203e332e1f7d23d659ca0675f1514
|
/src/main/java/com/acme/signin/SigninController.java
|
131ae08d78177444c7c5877ff05b1a3d6898fd31
|
[] |
no_license
|
samueltauil/sample-mvc-app
|
c8bbab37168a444e1f311d48eb8a288f2c152f4b
|
40f32700b73c5912f5cd5b7d683cd7d6e2c730df
|
refs/heads/master
| 2021-01-09T20:33:45.565826
| 2016-08-10T13:45:36
| 2016-08-10T13:45:36
| 65,386,062
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 286
|
java
|
package com.acme.signin;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class SigninController {
@RequestMapping(value = "signin")
public String signin() {
return "signin/signin";
}
}
|
[
"samueltauil@gmail.com"
] |
samueltauil@gmail.com
|
4fff5abbba6550b7e70c8c00d9ff30c82ff036f6
|
8d05c1160446f403168b2132df3eee9ba2b6be08
|
/app/src/main/java/yazdaniscodelab/ondemandfinalproject/ServiceProviderFragment/ProfileFragment.java
|
8c6008b6dcaa01ed8a5ad1c68c951c9a57285c6a
|
[] |
no_license
|
Yazdani1/OnDemandService-Application
|
c6751465127617af33e91462d4506b4433821f42
|
7a0eba68ca1de7b26df8dfb95e6d9287dc0202b9
|
refs/heads/master
| 2020-04-07T21:25:56.475372
| 2018-12-22T12:12:55
| 2018-12-22T12:12:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,825
|
java
|
package yazdaniscodelab.ondemandfinalproject.ServiceProviderFragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import com.google.firebase.auth.FirebaseAuth;
import yazdaniscodelab.ondemandfinalproject.ClientViewActivity.ClientViewHomeActivity;
import yazdaniscodelab.ondemandfinalproject.MainActivity;
import yazdaniscodelab.ondemandfinalproject.R;
/**
* A simple {@link Fragment} subclass.
*/
public class ProfileFragment extends Fragment {
//Firebase auth..
private FirebaseAuth mAuth;
private Button btnSignOut;
private TextView switchtoClientView;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View myview = inflater.inflate(R.layout.fragment_profile, container, false);
mAuth=FirebaseAuth.getInstance();
btnSignOut=myview.findViewById(R.id.btnSignout);
switchtoClientView=myview.findViewById(R.id.switchtoclient);
//Switch to client view
switchtoClientView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(getActivity(), ClientViewHomeActivity.class));
}
});
//Sign out button..
btnSignOut.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mAuth.signOut();
startActivity(new Intent(getActivity(), MainActivity.class));
}
});
return myview;
}
}
|
[
"yaz4dani@gmail.com"
] |
yaz4dani@gmail.com
|
85338bb2b8e7819f32fa9a961f1a61433bf0f69d
|
c9b8db6ceff0be3420542d0067854dea1a1e7b12
|
/web/KoreanAir/src/main/java/com/ke/css/cimp/fwb/fwb15/Rule_VOLUME_NUMBERS_OF_PIECES.java
|
dd8f0ec4a4f463342ac00132dbc12957c6217f2f
|
[
"Apache-2.0"
] |
permissive
|
ganzijo/portfolio
|
12ae1531bd0f4d554c1fcfa7d68953d1c79cdf9a
|
a31834b23308be7b3a992451ab8140bef5a61728
|
refs/heads/master
| 2021-04-15T09:25:07.189213
| 2018-03-22T12:11:00
| 2018-03-22T12:11:00
| 126,326,291
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,269
|
java
|
package com.ke.css.cimp.fwb.fwb15;
/* -----------------------------------------------------------------------------
* Rule_VOLUME_NUMBERS_OF_PIECES.java
* -----------------------------------------------------------------------------
*
* Producer : com.parse2.aparse.Parser 2.5
* Produced : Tue Mar 06 10:33:43 KST 2018
*
* -----------------------------------------------------------------------------
*/
import java.util.ArrayList;
final public class Rule_VOLUME_NUMBERS_OF_PIECES extends Rule
{
public Rule_VOLUME_NUMBERS_OF_PIECES(String spelling, ArrayList<Rule> rules)
{
super(spelling, rules);
}
public Object accept(Visitor visitor)
{
return visitor.visit(this);
}
public static Rule_VOLUME_NUMBERS_OF_PIECES parse(ParserContext context)
{
context.push("VOLUME_NUMBERS_OF_PIECES");
boolean parsed = true;
int s0 = context.index;
ParserAlternative a0 = new ParserAlternative(s0);
ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>();
parsed = false;
{
int s1 = context.index;
ParserAlternative a1 = new ParserAlternative(s1);
parsed = true;
if (parsed)
{
boolean f1 = true;
@SuppressWarnings("unused")
int c1 = 0;
for (int i1 = 0; i1 < 4 && f1; i1++)
{
Rule rule = Rule_Typ_Numeric.parse(context);
if ((f1 = rule != null))
{
a1.add(rule, context.index);
c1++;
}
}
parsed = true;
}
if (parsed)
{
as1.add(a1);
}
context.index = s1;
}
ParserAlternative b = ParserAlternative.getBest(as1);
parsed = b != null;
if (parsed)
{
a0.add(b.rules, b.end);
context.index = b.end;
}
Rule rule = null;
if (parsed)
{
rule = new Rule_VOLUME_NUMBERS_OF_PIECES(context.text.substring(a0.start, a0.end), a0.rules);
}
else
{
context.index = s0;
}
context.pop("VOLUME_NUMBERS_OF_PIECES", parsed);
return (Rule_VOLUME_NUMBERS_OF_PIECES)rule;
}
}
/* -----------------------------------------------------------------------------
* eof
* -----------------------------------------------------------------------------
*/
|
[
"whdnfka111@gmail.com"
] |
whdnfka111@gmail.com
|
efca6abdaf96faa31fa6cb7f4dc3ed264d9bdd8a
|
6b2a8dd202fdce77c971c412717e305e1caaac51
|
/solutions_2463486_0/java/Karian/FairAndSquare.java
|
1dafdb1d02dbc0c0a5715b3683014df57ceef332
|
[] |
no_license
|
alexandraback/datacollection
|
0bc67a9ace00abbc843f4912562f3a064992e0e9
|
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
|
refs/heads/master
| 2021-01-24T18:27:24.417992
| 2017-05-23T09:23:38
| 2017-05-23T09:23:38
| 84,313,442
| 2
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,773
|
java
|
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
public class FairAndSquare {
/**
* @param args
*/
public static void main(String[] args) throws NumberFormatException, IOException {
// open file and create a buffered reader
FileReader input = new FileReader(args[0]);
BufferedReader buffer = new BufferedReader(input);
//read the number of testcases
int max = Integer.parseInt(buffer.readLine().trim());
generateValidSquares();
// read a line and call the solving procedure for a single test case. We expect back the result as a string
for (int i = 1; i <= max; i++) {
System.out.println("Case #"+i+": " + solve(buffer.readLine()));
}
}
private static long solve(String input) {
String[] split = input.split(" ");
long A = Long.parseLong(split[0]);
long B = Long.parseLong(split[1]);
long count = 0;
int index = 0;
while (index < list.size() && list.get(index) < A)
{
index++;
}
while (index < list.size() && list.get(index) <= B)
{
count++;
index++;
}
return count;
}
private static long max = 100000000000000L;
private static long sqrtMax = 10000000L;
private static ArrayList<Long> list;
private static void generateValidSquares()
{
list = new ArrayList<Long>();
for(long i = 1; i < sqrtMax; i++)
{
long square = i*i;
if(isPalindrome(String.valueOf(i)) && isPalindrome(String.valueOf(square)))
{
list.add(square);
}
}
}
private static boolean isPalindrome(String str)
{
for (int i = 0, j = str.length() - 1; i < j; i++, j--)
{
if(str.charAt(i) != str.charAt(j))
{
return false;
}
}
return true;
}
}
|
[
"eewestman@gmail.com"
] |
eewestman@gmail.com
|
bc7b81c2ae67a852b20c11fd0e662816244e028c
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/kylin/learning/2059/PersistentException.java
|
4df1dd47a38e465c768b721d5a35c787ec6ab6ce
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,488
|
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.kylin.job.exception;
/**
*/
public class PersistentException extends Exception {
private static final long serialVersionUID = -4239863858506718998L;
public PersistentException() {
}
public PersistentException(String message) {
super(message);
}
public PersistentException(String message, Throwable cause) {
super(message, cause);
}
public PersistentException(Throwable cause) {
super(cause);
}
public PersistentException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
184c0e28aeee18b89f89bae6c4afe802051d7651
|
c36b3bacc4cf0d268d63d351b51a8a2517d571d1
|
/Core/src/com/rr/core/log/LogEvent.java
|
8fa2bd2ff5da790b689469d662a6779cb1eaea30
|
[] |
no_license
|
renicl/alphaProject
|
e4ced0c8de85b933f8b3af1903577bd0143a9acf
|
1785ecc8c7d930fda2c60452504a141e417712b6
|
refs/heads/master
| 2021-05-15T09:02:55.542649
| 2017-12-03T16:32:05
| 2017-12-03T16:32:05
| 108,066,861
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,110
|
java
|
/*******************************************************************************
* Copyright (c) 2015 Low Latency Trading Limited : Author Richard Rose
* 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.rr.core.log;
import java.nio.ByteBuffer;
import com.rr.core.lang.ErrorCode;
import com.rr.core.lang.ReusableType;
import com.rr.core.lang.ZString;
import com.rr.core.model.Message;
public interface LogEvent extends Message {
public void reset();
@Override
public ReusableType getReusableType();
public int length();
public long getTime();
public Level getLevel();
/**
* encodes the log event to the destination buffer
*
* LogEventLarge uses static vars for HEX encoding which MUST ONLY be invoked from same thread ... ie the AsyncLogger background thread
*/
public void encode( ByteBuffer dest );
public void setError( ErrorCode code, String msg );
public void setError( ErrorCode code, String msg, Throwable t );
public void setError( ErrorCode code, byte[] bytes, int offset, int length );
public void setError( ErrorCode code, byte[] bytes, int offset, int length, byte[] other, int offsetOther, int otherLength );
public void set( Level lvl, byte[] bytes, int i, int length );
public void set( Level lvl, byte[] bytes, int offset, int length, byte[] other, int offsetOther, int otherLength );
public void set( Level info, ByteBuffer buf );
public void set( Level info, String msg );
public ZString getMessage();
}
|
[
"lucasrenick@lucass-mbp.fios-router.home"
] |
lucasrenick@lucass-mbp.fios-router.home
|
100ad2cec14628ec7beb7e24f8a72d36f6f0b56a
|
a95fbe4532cd3eb84f63906167f3557eda0e1fa3
|
/dist/gameserver/data/scripts/ai/crypts_of_disgrace/ContaminatedBaturCommander.java
|
9a8d7afac9a900fce9342e360e4df44047a4243a
|
[
"MIT"
] |
permissive
|
Kryspo/L2jRamsheart
|
a20395f7d1f0f3909ae2c30ff181c47302d3b906
|
98c39d754f5aba1806f92acc9e8e63b3b827be49
|
refs/heads/master
| 2021-04-12T10:34:51.419843
| 2018-03-26T22:41:39
| 2018-03-26T22:41:39
| 126,892,421
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,828
|
java
|
package ai.crypts_of_disgrace;
import l2f.commons.util.Rnd;
import l2f.gameserver.ai.CtrlEvent;
import l2f.gameserver.ai.Fighter;
import l2f.gameserver.data.xml.holder.NpcHolder;
import l2f.gameserver.model.Creature;
import l2f.gameserver.model.SimpleSpawner;
import l2f.gameserver.model.instances.NpcInstance;
import l2f.gameserver.utils.Location;
/**
* @author Kolobrodik
* @date 11:19/19.02.12
* @description: AI для Contaminated Batur Commander в локации Crypts of Disgrace. (ID 22705)
* - Когда вы убиваете Contaminated Batur Commander, обычно респавнится такой же моб.
* Однако есть шанс, что появится Turka Commander in Chief, котоырй призовет к себе на помощь
* много Turka Troop Commanders.
*/
public class ContaminatedBaturCommander extends Fighter
{
private static final int TurkaCommanderChief = 22707; // Turka Commander in Chief
private static final int CHANCE = 10; // Шанс спауна Turka Commander in Chief и миньенов
public ContaminatedBaturCommander(NpcInstance actor)
{
super(actor);
}
@Override
protected void onEvtDead(Creature killer)
{
if(Rnd.chance(CHANCE)) // Если повезло
{
// Спауним
NpcInstance actor = getActor();
SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(TurkaCommanderChief));
sp.setLoc(Location.findPointToStay(actor, 100, 120));
NpcInstance npc = sp.doSpawn(true);
// Натравливаем на атакующего
if(killer.isPet() || killer.isSummon())
npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, killer, Rnd.get(2, 100));
npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, killer.getPlayer(), Rnd.get(1, 100));
}
super.onEvtDead(killer);
}
}
|
[
"cristianleon48@gmail.com"
] |
cristianleon48@gmail.com
|
02bf34fb8b44e36a50a8819419e6dbb3c6aea1df
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/neo4j/learning/5494/NumberValueMathTest.java
|
b6e8b5a4c182919fae1fa192016ba0d8cce38854
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,029
|
java
|
/*
* Copyright (c) 2002-2018 "Neo4j,"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.values.storable;
import org.junit.jupiter.api.Test;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.neo4j.values.storable.Values.byteValue;
import static org.neo4j.values.storable.Values.doubleValue;
import static org.neo4j.values.storable.Values.floatValue;
import static org.neo4j.values.storable.Values.intValue;
import static org.neo4j.values.storable.Values.longValue;
import static org.neo4j.values.storable.Values.shortValue;
import static org.neo4j.values.utils.ValueMath.overflowSafeAdd;
import static org.neo4j.values.utils.ValueMath.overflowSafeMultiply;
import static org.neo4j.values.utils.ValueMath.overflowSafeSubtract;
class NumberValueMathTest
{
@Test
void shouldAddSimpleIntegers() {
NumberValue[] integers =
new NumberValue[]{byteValue( (byte) 42 ), shortValue( (short) 42 ), intValue( 42 ), longValue( 42 )};
for ( NumberValue a : integers )
{
for ( NumberValue b : integers )
{
assertThat( a.plus( b ), equalTo( longValue( 84 ) ) );
assertThat( b.plus( a ), equalTo( longValue( 84 ) ) );
}
}
}
@Test
void shouldSubtractSimpleIntegers()
{
NumberValue[] integers =
new NumberValue[]{byteValue( (byte) 42 ), shortValue( (short) 42 ), intValue( 42 ), longValue( 42 )};
for ( NumberValue a : integers )
{
for ( NumberValue b : integers )
{
assertThat( a.minus( b ), equalTo( longValue( 0 ) ) );
assertThat( b.minus( a ), equalTo( longValue( 0 ) ) );
}
}
}
@Test
void shouldMultiplySimpleIntegers()
{
NumberValue[] integers =
new NumberValue[]{byteValue( (byte) 42 ), shortValue( (short) 42 ), intValue( 42 ), longValue( 42 )};
for ( NumberValue a : integers )
{
for ( NumberValue b : integers )
{
assertThat( a.times( b ), equalTo( longValue( 42 * 42 ) ) );
assertThat( b.times( a ), equalTo( longValue( 42 * 42 ) ) );
}
}
}
@Test
void shouldAddSimpleFloats()
{
NumberValue[] integers =
new NumberValue[]{byteValue( (byte) 42 ), shortValue( (short) 42 ), intValue( 42 ), longValue( 42 )};
NumberValue[] floats =
new NumberValue[]{floatValue( 42 ), doubleValue( 42 )};
for ( NumberValue a : integers )
{
for ( NumberValue b : floats )
{
assertThat( a.plus( b ), equalTo( doubleValue( 84 ) ) );
assertThat( b.plus( a ), equalTo( doubleValue( 84 ) ) );
}
}
}
@Test
void shouldSubtractSimpleFloats()
{
NumberValue[] integers =
new NumberValue[]{byteValue( (byte) 42 ), shortValue( (short) 42 ), intValue( 42 ), longValue( 42 )};
NumberValue[] floats =
new NumberValue[]{floatValue( 42 ), doubleValue( 42 )};
for ( NumberValue a : integers )
{
for ( NumberValue b : floats )
{
assertThat( a.minus( b ), equalTo( doubleValue( 0 ) ) );
assertThat( b.minus( a ), equalTo( doubleValue( 0 ) ) );
}
}
}
@Test
void shouldMultiplySimpleFloats()
{
NumberValue[] integers =
new NumberValue[]{byteValue( (byte) 42 ), shortValue( (short) 42 ), intValue( 42 ), longValue( 42 )};
NumberValue[] floats =
new NumberValue[]{floatValue( 42 ), doubleValue( 42 )};
for ( NumberValue a : integers )
{
for ( NumberValue b : floats )
{
assertThat( a.times( b ), equalTo( doubleValue( 42 * 42 ) ) );
assertThat( b.times( a ), equalTo( doubleValue( 42 * 42 ) ) );
}
}
}
@Test
void shouldDivideSimpleIntegers()
{
NumberValue[] integers =
new NumberValue[]{byteValue( (byte) 42 ), shortValue( (short) 42 ), intValue( 42 ), longValue( 42 )};
for ( NumberValue a : integers )
{
for ( NumberValue b : integers )
{
assertThat( a.divideBy( b ), equalTo( longValue( 1 ) ) );
assertThat( b.divideBy( a ), equalTo( longValue( 1 ) ) );
}
}
}
@Test
void shouldDivideSimpleFloats()
{
NumberValue[] integers =
new NumberValue[]{byteValue( (byte) 42 ), shortValue( (short) 42 ), intValue( 42 ), longValue( 42 )};
NumberValue[] floats =
new NumberValue[]{floatValue( 42 ), doubleValue( 42 )};
for ( NumberValue a : integers )
{
for ( NumberValue b : floats )
{
assertThat( a.divideBy( b ), equalTo( doubleValue( 1.0 ) ) );
assertThat( b.divideBy( a ), equalTo( doubleValue( 1.0 ) ) );
}
}
}
@Test
void shouldFailOnOverflowingAdd()
{
assertThrows(ArithmeticException.class, () -> longValue( Long.MAX_VALUE ).plus( longValue( 1 ) ) );
}
@Test
void shouldFailOnOverflowingSubtraction()
{
assertThrows( ArithmeticException.class, () -> longValue( Long.MAX_VALUE ).minus( longValue( -1 ) ) );
}
@Test
void shouldFailOnOverflowingMultiplication()
{
assertThrows( ArithmeticException.class, () -> longValue( Long.MAX_VALUE ).times( 2 ) );
}
@Test
void shouldNotOverflowOnSafeAddition()
{
assertThat( overflowSafeAdd( Long.MAX_VALUE, 1 ), equalTo( doubleValue( (double) Long.MAX_VALUE + 1 ) ) );
}
@Test
void shouldNotOverflowOnSafeSubtraction()
{
assertThat( overflowSafeSubtract( Long.MAX_VALUE, -1 ), equalTo( doubleValue( ((double) Long.MAX_VALUE) + (double) 1 ) ) );
}
@Test
void shouldNotOverflowOnMultiplication()
{
assertThat( overflowSafeMultiply( Long.MAX_VALUE, 2 ), equalTo( doubleValue( (double) Long.MAX_VALUE * 2 ) ) );
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
b3cb77a884b0d6cc54aa3a0553e7f33cfa602743
|
077eab871ee06a23904576350b065b754cbfca2e
|
/app/src/main/java/org/stepic/droid/view/fragments/MathStepFragment.java
|
634db43a29981f4a005bcdd6a4fdf86ca066f66e
|
[
"Apache-2.0"
] |
permissive
|
pk-codebox-evo/android-apps-stepic-android
|
8e007d646195d85debb899f14a5dd28d0f0ad824
|
9dc3778f34c6e2cb4efc002680ebb2b79a54778b
|
refs/heads/master
| 2021-01-17T18:09:20.806095
| 2016-07-15T11:13:23
| 2016-07-15T11:13:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,496
|
java
|
package org.stepic.droid.view.fragments;
import com.squareup.otto.Subscribe;
import org.stepic.droid.events.InternetIsEnabledEvent;
import org.stepic.droid.events.attempts.FailAttemptEvent;
import org.stepic.droid.events.attempts.SuccessAttemptEvent;
import org.stepic.droid.events.comments.NewCommentWasAddedOrUpdateEvent;
import org.stepic.droid.events.steps.StepWasUpdatedEvent;
import org.stepic.droid.events.submissions.FailGettingLastSubmissionEvent;
import org.stepic.droid.events.submissions.FailSubmissionCreatedEvent;
import org.stepic.droid.events.submissions.SubmissionCreatedEvent;
import org.stepic.droid.events.submissions.SuccessGettingLastSubmissionEvent;
import org.stepic.droid.model.Reply;
public class MathStepFragment extends SingleLineSendStepFragment {
@Override
protected Reply generateReply() {
return new Reply.Builder()
.setFormula(mAnswerField.getText().toString())
.build();
}
@Override
protected void onRestoreSubmission() {
Reply reply = mSubmission.getReply();
if (reply == null) return;
String text = reply.getFormula();
mAnswerField.setText(text);
}
@Subscribe
@Override
public void onInternetEnabled(InternetIsEnabledEvent enabledEvent) {
super.onInternetEnabled(enabledEvent);
}
@Override
@Subscribe
public void onSuccessLoadAttempt(SuccessAttemptEvent e) {
super.onSuccessLoadAttempt(e);
}
@Override
@Subscribe
public void onSuccessCreateSubmission(SubmissionCreatedEvent e) {
super.onSuccessCreateSubmission(e);
}
@Override
@Subscribe
public void onGettingSubmission(SuccessGettingLastSubmissionEvent e) {
super.onGettingSubmission(e);
}
@Subscribe
@Override
public void onFailCreateAttemptEvent(FailAttemptEvent event) {
super.onFailCreateAttemptEvent(event);
}
@Subscribe
@Override
public void onFailCreateSubmission(FailSubmissionCreatedEvent event) {
super.onFailCreateSubmission(event);
}
@Subscribe
public void onFailGettingSubmission(FailGettingLastSubmissionEvent e) {
super.onFailGettingSubmission(e);
}
@Subscribe
public void onNewCommentWasAdded(NewCommentWasAddedOrUpdateEvent event) {
super.onNewCommentWasAdded(event);
}
@Subscribe
public void onStepWasUpdated(StepWasUpdatedEvent event) {
super.onStepWasUpdated(event);
}
}
|
[
"kir-maka@yandex.ru"
] |
kir-maka@yandex.ru
|
6d2fac4c760d56b97c9f0aa2abe067da488b5427
|
0f664fbd7a60dcb9cd34e56ff105c59561d50319
|
/tip-train/tip-train-webapp-support/src/main/java/com/haoyu/tip/train/controller/TrainRegisterController.java
|
397cfa9385ec93e685f111c6363a4aea3567fe4e
|
[] |
no_license
|
osuisumi/tt
|
2c633056bba89a19dc94e422597e6b5c362a353d
|
80d04a5db899a2c01aaca1531f734e2990daddfa
|
refs/heads/master
| 2021-01-22T06:48:45.028677
| 2017-02-13T05:58:50
| 2017-02-13T05:58:50
| 81,789,191
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 391
|
java
|
package com.haoyu.tip.train.controller;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import com.haoyu.sip.core.web.AbstractBaseController;
import com.haoyu.tip.train.service.ITrainRegisterService;
@Controller
public class TrainRegisterController extends AbstractBaseController{
@Resource
private ITrainRegisterService trainRegisterService;
}
|
[
"osuisumi@163.com"
] |
osuisumi@163.com
|
dd32401806f0acd9eb2b0ef90edef18ea916473d
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Struts/Struts392.java
|
c220c4782635d784a3c99ed3b13d8854838c24c4
|
[] |
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
| 1,713
|
java
|
public void findInPackage(Test test, String packageName) {
packageName = packageName.replace('.', '/');
ClassLoader loader = getClassLoader();
Enumeration<URL> urls;
try {
urls = loader.getResources(packageName);
}
catch (IOException ioe) {
if (LOG.isWarnEnabled()) {
LOG.warn("Could not read package: " + packageName, ioe);
}
return;
}
while (urls.hasMoreElements()) {
try {
String urlPath = urls.nextElement().getFile();
urlPath = URLDecoder.decode(urlPath, "UTF-8");
// If it's a file in a directory, trim the stupid file: spec
if ( urlPath.startsWith("file:") ) {
urlPath = urlPath.substring(5);
}
// Else it's in a JAR, grab the path to the jar
if (urlPath.indexOf('!') > 0) {
urlPath = urlPath.substring(0, urlPath.indexOf('!'));
}
if (LOG.isInfoEnabled()) {
LOG.info("Scanning for classes in [" + urlPath + "] matching criteria: " + test);
}
File file = new File(urlPath);
if ( file.isDirectory() ) {
loadImplementationsInDirectory(test, packageName, file);
}
else {
loadImplementationsInJar(test, packageName, file);
}
}
catch (IOException ioe) {
if (LOG.isWarnEnabled()) {
LOG.warn("could not read entries", ioe);
}
}
}
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
401ef21166b92905dc129f1888221bafac92bd32
|
c08d4536932856a10361fc2a7f97609c1d623642
|
/Minigames/src/main/java/au/com/mineauz/minigames/config/LocationListFlag.java
|
fe04b89c45404ae9be669b1a8df9b049fca567c7
|
[
"MIT"
] |
permissive
|
Turidus/Minigames
|
ffe6de21965c375e44dacff2f3695b8a4dab2ee1
|
b7c6a46d8395b1e8056fd3a88cbbe2abc5676e11
|
refs/heads/master
| 2021-09-14T19:48:10.378307
| 2018-05-18T09:50:25
| 2018-05-18T09:50:25
| 112,511,019
| 3
| 0
|
MIT
| 2018-04-27T10:03:28
| 2017-11-29T18:15:09
|
Java
|
UTF-8
|
Java
| false
| false
| 1,435
|
java
|
package au.com.mineauz.minigames.config;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.configuration.file.FileConfiguration;
import au.com.mineauz.minigames.menu.MenuItem;
public class LocationListFlag extends Flag<List<Location>>{
public LocationListFlag(List<Location> value, String name){
setFlag(value);
setDefaultFlag(value);
setName(name);
}
@Override
public void saveValue(String path, FileConfiguration config) {
if(!getFlag().isEmpty()){
LocationFlag locf;
for(int i = 0; i < getFlag().size(); i++){
locf = new LocationFlag(null, getName() + "." + i);
locf.setFlag(getFlag().get(i));
locf.saveValue(path, config);
}
}
}
@Override
public void loadValue(String path, FileConfiguration config) {
List<Location> locs = new ArrayList<Location>();
Set<String> ids = config.getConfigurationSection(path + "." + getName()).getKeys(false);
LocationFlag locf;
for(int i = 0; i < ids.size(); i++){
locf = new LocationFlag(null, getName() + "." + String.valueOf(i));
locf.loadValue(path, config);
locs.add(locf.getFlag());
}
setFlag(locs);
}
@Override
public MenuItem getMenuItem(String name, Material displayItem) {
return null;
}
@Override
public MenuItem getMenuItem(String name, Material displayItem,
List<String> description) {
return null;
}
}
|
[
"paul.dav.1991@gmail.com"
] |
paul.dav.1991@gmail.com
|
050bdc0cde04dd66a74b1f0f288bcbb9e5e05769
|
3b6a37e4ce71f79ae44d4b141764138604a0f2b9
|
/phloc-commons/src/test/java/com/phloc/commons/combine/CombinatorStringWithSeparatorTest.java
|
ee18927c06370f4a35979df50e9432946f3b543a
|
[
"Apache-2.0"
] |
permissive
|
lsimons/phloc-schematron-standalone
|
b787367085c32e40d9a4bc314ac9d7927a5b83f1
|
c52cb04109bdeba5f1e10913aede7a855c2e9453
|
refs/heads/master
| 2021-01-10T21:26:13.317628
| 2013-09-13T12:18:02
| 2013-09-13T12:18:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,276
|
java
|
/**
* Copyright (C) 2006-2013 phloc systems
* http://www.phloc.com
* office[at]phloc[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.phloc.commons.combine;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import org.junit.Test;
import com.phloc.commons.mock.PhlocTestUtils;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
/**
* Test class for class {@link CombinatorStringWithSeparator}.
*
* @author Philip Helger
*/
public final class CombinatorStringWithSeparatorTest
{
@Test
@SuppressFBWarnings (value = "NP_NONNULL_PARAM_VIOLATION")
public void testGetStringCombinatorWithSeparator ()
{
final ICombinator <String> c = new CombinatorStringWithSeparator (";");
assertEquals ("a;b", c.combine ("a", "b"));
assertEquals ("a;null", c.combine ("a", null));
assertEquals ("null;b", c.combine (null, "b"));
assertEquals ("null;null", c.combine (null, null));
try
{
// Empty separator not allowed
new CombinatorStringWithSeparator ("");
fail ();
}
catch (final IllegalArgumentException ex)
{}
try
{
// Empty separator not allowed
new CombinatorStringWithSeparator (null);
fail ();
}
catch (final IllegalArgumentException ex)
{}
PhlocTestUtils.testDefaultImplementationWithEqualContentObject (new CombinatorStringWithSeparator (";"),
new CombinatorStringWithSeparator (";"));
PhlocTestUtils.testDefaultImplementationWithDifferentContentObject (new CombinatorStringWithSeparator (";"),
new CombinatorStringWithSeparator (","));
}
}
|
[
"mail@leosimons.com"
] |
mail@leosimons.com
|
1a812c8c6e258597d764ebc52b20d6ee119156da
|
35d105d4e23bd5e5e58221c3d07625e32f2ad052
|
/hadrumaths/hadrumaths-java/src/main/java/net/vpc/scholar/hadrumaths/VectorSpace.java
|
627dc62f74acd6e0dce2553be70012d0250114eb
|
[] |
no_license
|
imenk1986/scholar-mw
|
a7f9478bd2a56dbcb442217da5429a15030cdd6c
|
d649ed0b00d7982bf0e537c2bb582eaeeff3df96
|
refs/heads/master
| 2021-06-23T07:24:23.828936
| 2017-08-14T21:20:03
| 2017-08-14T21:20:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,804
|
java
|
package net.vpc.scholar.hadrumaths;
import net.vpc.scholar.hadrumaths.util.Converter;
import java.util.List;
public interface VectorSpace<T> {
TypeReference<T> getItemType();
<R> Converter<R, T> getConverterFrom(Class<R> t);
<R> Converter<T, R> getConverterTo(Class<R> t);
<R> R convertTo(T value, Class<R> t);
<R> T convertFrom(R value, Class<R> t);
T convert(double d);
T convert(Complex d);
T convert(Matrix d);
T zero();
T one();
T nan();
T add(T a, T b);
RepeatableOp<T> addRepeatableOp();
RepeatableOp<T> mulRepeatableOp();
T addAll(List<T> b);
T mulAll(List<T> b);
T sub(T a, T b);
T mul(T a, T b);
T div(T a, T b);
T real(T a);
T imag(T a);
T abs(T a);
double absdbl(T a);
T neg(T t);
T conj(T t);
T inv(T t);
T sin(T t);
T cos(T t);
T tan(T t);
T cotan(T t);
T sinh(T t);
T sincard(T t);
T cosh(T t);
T tanh(T t);
T cotanh(T t);
T asinh(T t);
T acosh(T t);
T asin(T t);
T acos(T t);
T atan(T t);
T arg(T t);
boolean isZero(T a);
boolean isComplex(T a);
Complex toComplex(T a);
T acotan(T t);
T exp(T t);
T log(T t);
T log10(T t);
T db(T t);
T db2(T t);
T sqr(T t);
T sqrt(T t);
T sqrt(T t, int n);
T pow(T a, T b);
T pow(T a, double b);
T npow(T t, int n);
T lt(T a, T b);
T lte(T a, T b);
T gt(T a, T b);
T gte(T a, T b);
T eq(T a, T b);
T ne(T a, T b);
T not(T a);
T and(T a, T b);
T or(T a, T b);
T If(T cond, T exp1, T exp2);
T parse(String string);
T scalarProduct(boolean hermitian, T a, T b);
T setParam(T a, String paramName, Object b);
}
|
[
"canard77"
] |
canard77
|
9cbef4e5e3367aaf6ad10a7745e5f06759c3a73e
|
c9c906108ea14002128532340777558b3fb215fb
|
/app/src/main/java/wu/wunba/model/NBAPlayerSeasonData.java
|
7b86b45585e9b42d1692eeef667adfe68e5afdc7
|
[] |
no_license
|
Wodner/WuNBA
|
e9286a17f138c1e7bfcb724a74fd33cf10bd5494
|
1b5ab186198b79ec115280cf7d98dcb02cf1fea2
|
refs/heads/master
| 2021-01-21T05:05:45.387270
| 2017-07-09T13:31:51
| 2017-07-09T13:31:51
| 83,132,586
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,480
|
java
|
package wu.wunba.model;
import java.util.List;
/**
* 描述:
* 作者:Wu on 2017/2/28 14:12
* 邮箱:wuwende@live.cn
*/
public class NBAPlayerSeasonData {
/**
* code : 0
* data : {"lastMatches":{"head":["日期","对手","分钟","得分","篮板","助攻","盖帽","抢断","失误","投篮","命中%","三分球","三分%","罚球","罚球%"],"rows":[["2017/02/27","鹈鹕","36","41","11","11","0","1","9","14/29","48.3","2/8","25","11/12","91.7"],["2017/02/25","湖人","35","17","18","17","0","3","6","4/18","22.2","1/5","20","8/9","88.9"],["2017/02/20","东部明星","19","41","5","7","0","1","2","16/26","61.5","7/13","53.8","2/2","100"],["2017/02/16","尼克斯","37","38","14","12","1","3","6","13/22","59.1","3/5","60","9/13","69.2"],["2017/02/14","奇才","24","17","4","4","0","2","2","5/19","26.3","0/4","0","7/7","100"]]},"stats":{"head":["年度","球队","赛季","场数","先发","分钟","命中%","三分%","场均篮板","场均助攻","场均盖帽","场均抢断","失误","犯规","场均得分"],"rows":[["16/17","雷霆","常规赛","59","59","34.7","42.1","33.4","10.6","10.3","0.4","1.6","5.6","2.4","31.0"],["16/17","雷霆","季前赛","6","6","22.0","42.3","41.2","2.7","6.5","0.0","1.3","2.3","2.0","16.2"]]}}
* version : 12e29748e4839ba64482d0371b009b45
*/
private int code;
private DataBean data;
private String version;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public static class DataBean {
/**
* lastMatches : {"head":["日期","对手","分钟","得分","篮板","助攻","盖帽","抢断","失误","投篮","命中%","三分球","三分%","罚球","罚球%"],"rows":[["2017/02/27","鹈鹕","36","41","11","11","0","1","9","14/29","48.3","2/8","25","11/12","91.7"],["2017/02/25","湖人","35","17","18","17","0","3","6","4/18","22.2","1/5","20","8/9","88.9"],["2017/02/20","东部明星","19","41","5","7","0","1","2","16/26","61.5","7/13","53.8","2/2","100"],["2017/02/16","尼克斯","37","38","14","12","1","3","6","13/22","59.1","3/5","60","9/13","69.2"],["2017/02/14","奇才","24","17","4","4","0","2","2","5/19","26.3","0/4","0","7/7","100"]]}
* stats : {"head":["年度","球队","赛季","场数","先发","分钟","命中%","三分%","场均篮板","场均助攻","场均盖帽","场均抢断","失误","犯规","场均得分"],"rows":[["16/17","雷霆","常规赛","59","59","34.7","42.1","33.4","10.6","10.3","0.4","1.6","5.6","2.4","31.0"],["16/17","雷霆","季前赛","6","6","22.0","42.3","41.2","2.7","6.5","0.0","1.3","2.3","2.0","16.2"]]}
*/
public LastMatchesBean lastMatches;
public StatsBean stats;
public LastMatchesBean getLastMatches() {
return lastMatches;
}
public void setLastMatches(LastMatchesBean lastMatches) {
this.lastMatches = lastMatches;
}
public StatsBean getStats() {
return stats;
}
public void setStats(StatsBean stats) {
this.stats = stats;
}
public static class LastMatchesBean {
private List<String> head;
private List<List<String>> rows;
public List<String> getHead() {
return head;
}
public void setHead(List<String> head) {
this.head = head;
}
public List<List<String>> getRows() {
return rows;
}
public void setRows(List<List<String>> rows) {
this.rows = rows;
}
}
public static class StatsBean {
private List<String> head;
private List<List<String>> rows;
public List<String> getHead() {
return head;
}
public void setHead(List<String> head) {
this.head = head;
}
public List<List<String>> getRows() {
return rows;
}
public void setRows(List<List<String>> rows) {
this.rows = rows;
}
}
}
}
|
[
"851809310@qq.com"
] |
851809310@qq.com
|
ced9f12efbfd134ddf52f8498a35dcb6e5d0850f
|
082e26b011e30dc62a62fae95f375e4f87d9e99c
|
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/plugin/appbrand/task/a.java
|
6944b0db6886975d2647ef2399166a73e39d4a3e
|
[] |
no_license
|
xsren/AndroidReverseNotes
|
9631a5aabc031006e795a112b7ac756a8edd4385
|
9202c276fe9f04a978e4e08b08e42645d97ca94b
|
refs/heads/master
| 2021-04-07T22:50:51.072197
| 2019-07-16T02:24:43
| 2019-07-16T02:24:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,069
|
java
|
package com.tencent.mm.plugin.appbrand.task;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.ui.AppBrandEmbedUI;
final class a extends j {
final long iEd;
private String iEe;
a(long j) {
super(AppBrandEmbedUI.class, null, null);
this.iEd = j;
}
/* Access modifiers changed, original: final */
public final void DI(String str) {
AppMethodBeat.i(132778);
if (this.iEe.equals(str)) {
this.iFt.clear();
this.iFu.clear();
this.iFv = g.NIL;
AppMethodBeat.o(132778);
return;
}
super.DI(str);
AppMethodBeat.o(132778);
}
/* Access modifiers changed, original: final */
public final void a(String str, int i, AppBrandRemoteTaskController appBrandRemoteTaskController) {
AppMethodBeat.i(132777);
if (this.iFt.keySet().isEmpty()) {
this.iEe = str;
}
super.a(str, i, appBrandRemoteTaskController);
AppMethodBeat.o(132777);
}
}
|
[
"alwangsisi@163.com"
] |
alwangsisi@163.com
|
1a9b0450d3e2f2a1b8f85d5a711407c6bd3b98ca
|
4ad8f282fa015116c227e480fe913779dc3c311b
|
/src/test/java/com/alibaba/druid/bvt/filter/wall/mysql/MySqlWallTest75.java
|
1040120a35ed30baa6826a2a049dbf67d80df1c7
|
[
"Apache-2.0"
] |
permissive
|
lonelyit/druid
|
91b6f36cdebeef4f96fec5b5c42e666c28e6019b
|
08da6108e409f18d38a30c0656553ab7fcbfc0f8
|
refs/heads/master
| 2023-07-24T17:37:14.479317
| 2021-09-20T06:26:47
| 2021-09-20T06:26:47
| 164,882,032
| 0
| 1
|
Apache-2.0
| 2021-09-20T13:40:13
| 2019-01-09T14:52:14
|
Java
|
UTF-8
|
Java
| false
| false
| 3,897
|
java
|
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.druid.bvt.filter.wall.mysql;
import junit.framework.TestCase;
import org.junit.Assert;
import com.alibaba.druid.wall.WallProvider;
import com.alibaba.druid.wall.spi.MySqlWallProvider;
/**
* SQLServerWallTest
*
* @author RaymondXiu
* @version 1.0, 2012-3-18
* @see
*/
public class MySqlWallTest75 extends TestCase {
public void test_false() throws Exception {
WallProvider provider = new MySqlWallProvider();
provider.getConfig().setCommentAllow(true);
Assert.assertFalse(provider.checkValid(//
"UPDATE friends_a SET requests='-^B}q^A(X \\0\\0\\0176403924cdatetime\\ndatetime\\nq^BU\\n^G--\\Z^K:5^Hw.-Rq^CX \\0\\0\\0942515122h^BU\\n^G--^X^G^^$\\n^NӅRq^DX \\0\\0\\0760857294h^BU\\n^G-- ^F8+ ---Rq^EX \\0\\0\\0207000491h^BU\\n^G--^X^E^_^L^F-$-Rq^FX \\0\\0\\0281067699h^BU\\n^G--^B^O^C-^A<13>Rq^GX \\0\\0\\0941678014h^BU\\n^G--^\\^W^N^W^F-$-Rq^HX \\0\\0\\0840070155h^BU\\n^G--^\\^L\\n6^D*ʅRq X \\0\\0\\0468440035h^BU\\n^G--^V^W*^N^Bp^K-Rq\\nU 169240315h^BU\\n^G--^W^U^W1^D-m-Rq^KX \\0\\0\\0199411251h^BU\\n^G--^V^W%^^^A---Rq^LU 210660648h^BU\\n^G--^\\^W^Y-^F\\Zd-Rq\\rU 262672217h^BU\\n^G--\\Z^V2:^O^U--Rq^NX \\0\\0\\0952838443h^BU\\n^G--^\\^W!7\\r-{-Rq^OX \\0\\0\\0263642777h^BU\\n^G--^B^U/^D^G-̅Rq^PX \\0\\0\\0286685152h^BU\\n^G--^W^T3,^Ggs-Rq^QU 290976173h^BU\\n^G--^\\^V)^X^D---Rq^RX \\0\\0\\0825427842h^BU\\n^G--\\Z^V;^Q^N- -Rq^SX \\0\\0\\0399352674h^BU\\n^G--^\\^V-0^KC\\0-Rq^TX \\0\\0\\0429293778h^BU\\n^G--^Y^U ^]^C-��Rq^UX \\0\\0\\0796702973h^BU\\n^G--^Y^S^U#^F\\\\^W-Rq^Vu.'"//
+ ",friends='-^B}q^A(X \\0\\0\\0288854421cdatetime\\ndatetime\\nq^BU\\n^G--^[^N38^L6---q^CX \\0\\0\\0307943786h^BU\\n^G--^F^V7 ^D---Rq^DX \\0\\0\\0290783072NX \\0\\0\\0498070760NX \\0\\0\\0457575155NX \\0\\0\\0304215892h^BU\\n^G--^F^W^L+^L---Rq^EX \\0\\0\\0300254457h^BU\\n^G--^F^G$)^A---Rq^FX \\0\\0\\0252042226h^BU\\n^G-- ^R8\\r ----q^GX \\0\\0\\0697110711NX \\0\\0\\0809118053h^BU\\n^G-- ^L^H^O\\0ɲ-Rq^HX \\0\\0\\0293303495h^BU\\n^G-- ^T!.^B/ʅRq X \\0\\0\\0302651538h^BU\\n^G--^G^P)^C^Fn---q\\nU 888879887h^BU\\n^G--^H^W.*^G---Rq^KX \\0\\0\\0240865621h^BU\\n^G--^G\\n2;\\n---Rq^LU 300728616h^BU\\n^G--^A^L^N8\\0\\'" //
+ "--Rq\\rX \\0\\0\\0856456443NX \\0\\0\\0302371154h^BU\\n^G--^A^Q^R^^\\0---Rq^NX \\0\\0\\0696458616h^BU\\n^G--^G\\n98\\n---Rq^OU 297082613NX \\0\\0\\0811281930h^BU\\n^G--\\n^Q^P^X^L^OɅRq^PU 300986758h^BU\\n^G--^F^F\\r3^G-$-Rq^QU 276325435h^BU\\n^G--^B^P^P^T^E^N8-Rq^RX \\0\\0\\0299082034h^BU\\n^G--^H^W^_^Q^D<--Rq^SX \\0\\0\\0171238051h^BU\\n^G--\\n\\r)^S^Dܢ-Rq^TX \\0\\0\\0780724792h^BU\\n^G--\\n^N+ ^F*>-Rq^UX \\0\\0\\0893552392h^BU\\n^G--\\n^N^_-^K^L--Rq^VX \\0\\0\\0590290136h^BU\\n^G-- \\r^Y0\\r --Rq^WX \\0\\0\\0302913387h^BU\\n^G--^C^K#,\\0^X9-Rq^XX \\0\\0\\0252736446NX \\0\\0\\0302360033h^BU\\n^G--^C^O^A^^^H-[-Rq^YU 276564368h^BU\\n^G--\\n\\r:+^K-q-Rq\\ZX \\0\\0\\0296693715h^BU\\n^G-- ^G^[/^A-F-Rq^[X \\0\\0\\0223225019h^BU\\n^G-- ^S^X^C\\07\\Z-Rq^\\X \\0\\0\\0232453764h^BU\\n^G--^_\\r3^V\\0---Rq^]U 297276051h^BU\\n^G--^C^K/4^K-Rq^^X \\0\\0\\0184978889NX \\0\\0\\0813351784h^BU\\n^G--^H^H%^X^E&^S-Rq^_X \\0\\0\\03028705"));
Assert.assertEquals(0, provider.getTableStats().size());
}
}
|
[
"szujobs@hotmail.com"
] |
szujobs@hotmail.com
|
fbbe08276fd9bd09857e9bfd289b2693dc576809
|
dc94e3f2dff7d28e0aadfef68f24fafda071e617
|
/src/main/java/com/dongnao/jack/vo/package-info.java
|
48ccdd28e899585496dca9bd7b12cfa65133f917
|
[] |
no_license
|
dn-jack/shardDb
|
07974c1c31c3dd37ec3521085fb09be09e650b92
|
52ddd858bf7db00486677e396202dfd8125ace44
|
refs/heads/master
| 2021-07-11T10:15:07.106810
| 2017-10-14T14:29:42
| 2017-10-14T14:29:42
| 106,934,701
| 0
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 402
|
java
|
/**
* @Project shardDb
* @File package-info.java
* @Package com.dongnao.jack.vo
* @Version V1.0
* @Date 2017年10月14日 上午1:02:07
* @Author 动脑学院-jack
*/
/**
* @Description TODO
* @ClassName package-info
* @Date 2017年10月14日 上午1:02:07
* @Author 动脑学院-jack
*/
package com.dongnao.jack.vo;
|
[
"305086996@qq.com"
] |
305086996@qq.com
|
9e1a76aa0f66a15fe6e8d87744fd2ba051500833
|
2e26bf48dcc19cf88f391419c92b9b4e7adcbf07
|
/at.jku.isse.ecco.base/src/main/java/at/jku/isse/ecco/artifact/ArtifactReference.java
|
afe5033c3f597fcc29e56b7669e4e4369fc63bc0
|
[] |
no_license
|
mjahn2/ecco
|
4d9aa6ebb1edce5c51e6b2ccd03c52f2d0cb160c
|
ca462c8af318279e39c0250e0cf58b4a3d30086e
|
refs/heads/master
| 2021-01-22T09:17:05.648140
| 2016-02-01T16:17:05
| 2016-02-01T16:17:05
| 52,592,244
| 0
| 0
| null | 2016-02-26T09:06:55
| 2016-02-26T09:06:54
| null |
UTF-8
|
Java
| false
| false
| 991
|
java
|
package at.jku.isse.ecco.artifact;
/**
* Captures the connection between two artifacts.
* <p>
* This interface is part of the {@link at.jku.isse.ecco.plugin.CorePlugin#EXTENSION_POINT_DAL}.
*
* @author JKU, ISSE
* @author Hannes Thaller
* @version 1.0
*/
public interface ArtifactReference {
/**
* Returns the source of the reference.
*
* @return The source of the reference.
*/
Artifact<?> getSource();
/**
* Returns the target that is referenced.
*
* @return The target that is referenced.s
*/
Artifact<?> getTarget();
/**
* The reference type.
*
* @return The type of the references.
*/
String getType();
/**
* Sets the source of the reference.
*
* @param source
* of the reference.s
*/
void setSource(Artifact<?> source);
/**
* Sets the target that is referenced.s
*
* @param target
* that is referenced
*/
void setTarget(Artifact<?> target);
}
|
[
"llinsbauer@users.noreply.github.com"
] |
llinsbauer@users.noreply.github.com
|
2268655202bc62836aef22767b424d4e50ac5b61
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XCOMMONS-928-1-8-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/extension/repository/internal/installed/DefaultInstalledExtensionRepository_ESTest.java
|
e6dc3a2212e211dbf163ecd39b1fd2653461da71
|
[] |
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
| 626
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sun Apr 05 14:09:17 UTC 2020
*/
package org.xwiki.extension.repository.internal.installed;
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 DefaultInstalledExtensionRepository_ESTest extends DefaultInstalledExtensionRepository_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
bd48c7d7b55f56357ca1fcfef9795dacb40fbd70
|
936aa88990d1e478491aa66627b0263b5590aaa0
|
/Platform/mo-4-web/src/web-face/org/mo/jfa/face/system/transfer/ITransferAction.java
|
67bfdaaa6bc1136d8355f05382d3aec52f1581e3
|
[] |
no_license
|
favedit/MoCloud3d
|
f6d417412c5686a0f043a2cc53cd34214ee35618
|
ef6116df5b66fbc16468bd5e915ba19bb982d867
|
refs/heads/master
| 2021-01-10T12:12:22.837243
| 2016-02-21T09:05:53
| 2016-02-21T09:05:53
| 48,077,310
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 791
|
java
|
package org.mo.jfa.face.system.transfer;
import org.mo.web.core.container.AContainer;
import org.mo.web.protocol.context.IWebContext;
public interface ITransferAction
{
String catalog(IWebContext context,
@AContainer(name = "page") FTransferPage page);
String delete(IWebContext context,
@AContainer(name = "page") FTransferPage page);
String insert(IWebContext context,
@AContainer(name = "page") FTransferPage page);
String list(IWebContext context,
@AContainer(name = "page") FTransferPage page);
String sort(IWebContext context,
@AContainer(name = "page") FTransferPage page);
String update(IWebContext context,
@AContainer(name = "page") FTransferPage page);
}
|
[
"favedit@hotmail.com"
] |
favedit@hotmail.com
|
fc4518bef0e451ac9cf836e56e266ccb6c9eae3f
|
7b5a744665462c985652bd05685b823a0c6d64f6
|
/zttx-tradeapi/src/main/java/com/zttx/web/module/common/service/RoleMenuService.java
|
39dd9e0c17ea20adc186acaeca9e2a39965d9066
|
[] |
no_license
|
isoundy000/zttx-trading
|
d8a7de3d846e1cc2eb0b193c31d45d36b04f7372
|
1eee959fcf1d460fe06dfcb7c79c218bcb6f5872
|
refs/heads/master
| 2021-01-14T01:07:42.580121
| 2016-01-10T04:12:40
| 2016-01-10T04:12:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,427
|
java
|
/*
* Copyright 2015 Zttx, Inc. All rights reserved. 8637.com
* PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.zttx.web.module.common.service;
import java.util.List;
import com.zttx.sdk.core.GenericServiceApi;
import com.zttx.sdk.exception.BusinessException;
import com.zttx.web.module.common.entity.RoleInfo;
import com.zttx.web.module.common.entity.RoleMenu;
/**
* 角色与菜单关联表 服务接口
* <p>File:RoleMenuService.java </p>
* <p>Title: RoleMenuService </p>
* <p>Description:RoleMenuService </p>
* <p>Copyright: Copyright (c) May 26, 2015</p>
* <p>Company: 8637.com</p>
* @author Playguy
* @version 1.0
*/
public interface RoleMenuService extends GenericServiceApi<RoleMenu>
{
void deleteByMenuId(String menuId);
void setRole(RoleMenu roleMenu);
void deleteByRoleId(String roleId);
void setMenu(List<RoleMenu> roleMenuList, RoleInfo roleInfo);
/**
* 保存角色菜单
* @param roleMenuList 菜单列表
* @param roleId 角色id
* @throws BusinessException
* @author 章旭楠
*/
void saveRoleMenu(String[] roleMenuList, String roleId) throws BusinessException;
/**
* 根据角色获取授权菜单
* @param roleId 角色id
* @return List
* @author 章旭楠
*/
List<String> findByRoleId(String roleId);
}
|
[
"ngds@maybedeMacBook-Air.local"
] |
ngds@maybedeMacBook-Air.local
|
fa6f23e97bad371d7592b3d80e72337813b2f12c
|
6503253d96eea96665429be83f5844f6fd95d80b
|
/store/src/main/java/cn/ngame/store/adapter/LvSearchAdapter.java
|
5355e0d781ba7dbf487aed4943dccf12212d1da1
|
[] |
no_license
|
liguoliang777/main
|
352b0c4bef544dbde2acb74a40f30ae9d1d98c42
|
a474ef2f863228db6c772134948523a49d7603ae
|
refs/heads/master
| 2019-09-01T02:43:56.277543
| 2018-06-27T03:13:16
| 2018-06-27T03:13:16
| 98,368,608
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,478
|
java
|
/*
* Flan.Zeng 2011-2016 http://git.oschina.net/signup?inviter=flan
*
* 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 cn.ngame.store.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.RatingBar;
import android.widget.TextView;
import java.util.List;
import cn.ngame.store.R;
import cn.ngame.store.bean.SearchHistoryBean;
import cn.ngame.store.search.view.SearchActivity;
/**
* 搜索结果的ListView控件适配器
*
* @author zeng
* @since 2016-05-16
*/
public class LvSearchAdapter extends BaseAdapter {
private List<SearchHistoryBean> searchResultList;
private Context context;
public LvSearchAdapter(Context context, List<SearchHistoryBean> searchResultList) {
super();
this.context = context;
this.searchResultList = searchResultList;
}
/**
* 设置ListView中的数据
*
* @param searchResultList 游戏数据
*/
public void setDate(List<SearchHistoryBean> searchResultList) {
this.searchResultList = searchResultList;
}
@Override
public int getCount() {
if (searchResultList != null) {
return searchResultList.size();
}
return 0;
}
@Override
public Object getItem(int position) {
if (searchResultList != null) {
return searchResultList.get(position);
}
return null;
}
@Override
public long getItemId(int position) {
return position;
}
public void clean() {
if (searchResultList != null)
searchResultList.clear();
}
@Override
public View getView(final int position, View convertView, final ViewGroup parent) {
final SearchHistoryBean result = searchResultList == null ? null : searchResultList.get(position);
ViewHolder holder;
if (convertView == null) {
holder = new ViewHolder(context);
convertView = LayoutInflater.from(context).inflate(R.layout.item_lv_search, parent, false);
holder.rl_delete = (ImageView) convertView.findViewById(R.id.rl_delete);
holder.tv_title = (TextView) convertView.findViewById(R.id.tv_title);
// holder.tv_summary = (TextView) convertView.findViewById(R.id.tv_summary);
// holder.tv_size = (TextView) convertView.findViewById(R.id.text1);
// holder.tv_count = (TextView) convertView.findViewById(R.id.text2);
// holder.ratingBar = (RatingBar) convertView.findViewById(R.id.rating_bar);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
holder.tv_title.setText(searchResultList.get(position).getTitle());
holder.rl_delete.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
((SearchActivity) context).deleteItemhistory(searchResultList.get(position).title);
}
});
// holder.update(result);
return convertView;
}
/**
* 用于保存ListView中重用的item视图的引用
*
* @author flan
* @since 2015年10月28日
*/
static class ViewHolder {
private Context context;
private ImageView rl_delete;
private TextView tv_title;
private RatingBar ratingBar;
public ViewHolder(Context context) {
this.context = context;
}
public void update(final SearchHistoryBean searchResult) {
// String gameName = searchResult.name;
// if (!"".equals(gameName)) {
// gameName = gameName.length() > 8 ? gameName.substring(0, 8) : gameName;
// tv_title.setText(gameName);
// }
// String gameDesc = searchResult.summary;
// if (!"".equals(gameDesc)) {
// gameDesc = gameDesc.length() > 30 ? gameDesc.substring(0, 30) : gameDesc;
// tv_summary.setText(gameDesc);
// }else {
// tv_summary.setText("");
// }
//
// if(searchResult.type == 1){
//
// ratingBar.setRating(searchResult.percentage);
//
// long gameSize = searchResult.fileSize;
// String gameSizeStr = TextUtil.formatFileSize(gameSize);
// tv_size.setText(gameSizeStr);
//
// long gameCount = searchResult.downloadCount;
// tv_count.setText("/"+gameCount+"次下载");
//
// }else {
// tv_size.setText("");
// tv_count.setText("");
// }
//
// //加载图片
// String imgUrl = searchResult.imgUrl;
// if(imgUrl != null && imgUrl.trim().equals("")){
// imgUrl = null;
// }
// Picasso.with(context)
// .load(imgUrl)
// .placeholder(R.drawable.ic_def_logo_720_288)
// .error(R.drawable.ic_def_logo_720_288)
// .resizeDimen(R.dimen.list_detail_image_size, R.dimen.list_detail_image_size)
// .centerInside()
// .tag(context)
// .into(img);
}
}
}
|
[
"157308001@qq.com"
] |
157308001@qq.com
|
0aa551663cd367f3d0498bed0418f03f4d519a04
|
603b9dd8d15fe9676ac5daf5bfd42266c9e95b83
|
/data-preparation/data-generation/src/main/java/com/etlsolutions/examples/data/ConstraintArray.java
|
88643e4901a4ebaaa57876d02e63a4b7c2e47c84
|
[
"Apache-2.0"
] |
permissive
|
eep60b/etlexamples
|
fef439037c660bf1a5934158f2cb397cef48b099
|
92ecfdca07ad01127b76c978432cf67f56b5f9ce
|
refs/heads/master
| 2021-07-12T05:18:29.858561
| 2019-03-07T11:48:57
| 2019-03-07T11:48:57
| 110,674,811
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,335
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.etlsolutions.examples.data;
import java.util.Arrays;
/**
* The ConstraintArray class represents a set of constraint data in a database
* table. Since there is no information about column names, the values in the
* object array must keep the same order so they can be compared to each other.
*
* This class will NOT be an immutable class if the argument is an object array.
* The object array passed in from constructor is a reference rather than a
* newly created array. This design is to ensure the maximum performance. It is
* recommended NOT to user Object[] as the argument.
*
* @author Zhipeng Chang
*
* @since 1.0.0
*
* @version 1.0.0 - Created.
*/
public final class ConstraintArray {
private final Object[] objects;
public ConstraintArray(Object... objects) {
this.objects = objects;
}
@Override
public int hashCode() {
int hash = 5;
hash = 89 * hash + Arrays.deepHashCode(this.objects);
return hash;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final ConstraintArray other = (ConstraintArray) obj;
return Arrays.deepEquals(this.objects, other.objects);
}
@Override
public String toString() {
return "ConstraintArray{" + "objects=" + Arrays.toString(objects) + '}';
}
}
|
[
"gcodegroup@gmail.com"
] |
gcodegroup@gmail.com
|
3cb6c5ab824c3d4c28fc2732bf46db494a3b2ae4
|
ad6d976a325da8355601adcee0158e852e001459
|
/src/mutationoperators/methodlevel/aor/AOR.java
|
e13ebcae59ee66a973f1f087d6fc1a42006bcd3e
|
[
"MIT"
] |
permissive
|
lsubel/jmutops
|
59501dff36bffffc5634aa1bdd8eb424714ce4e6
|
ce60c9e3065cc36808089799ad397e2e99721ad0
|
refs/heads/master
| 2021-01-23T08:21:02.248100
| 2017-04-03T18:55:56
| 2017-04-03T18:55:56
| 86,502,696
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,032
|
java
|
package mutationoperators.methodlevel.aor;
import mutationoperators.MutationOperator;
import results.JMutOpsEventListenerMulticaster;
import enums.MutationOperatorCategory;
import enums.MutationOperatorLevel;
public class AOR extends MutationOperator {
public AOR() {
this(null);
}
public AOR(JMutOpsEventListenerMulticaster eventListener) {
super(eventListener);
this.twoAST_matcher = new AOR_Matcher(this);
this.twoAST_visitor = new AOR_Visitor(this.twoAST_matcher);
}
@Override
protected void setProperties() {
this.mutopproperty.setShortname("AOR");
this.mutopproperty.setFullname("Arithmetic Operator Replacement");
this.mutopproperty.setDescription("Replace basic binary/unary/short-cut arithmetic operators with other binary/unary arithmetic operators.");
this.mutopproperty.setLevel(MutationOperatorLevel.METHOD_LEVEL);
this.mutopproperty.setCategory(MutationOperatorCategory.METHOD_LEVEL);
this.mutopproperty.setTwoAST();
this.mutopproperty.setUpdate();
}
}
|
[
"devnull@localhost"
] |
devnull@localhost
|
b8fe117b2363714e6150e04554c0bf7cf018fe18
|
09d0ddd512472a10bab82c912b66cbb13113fcbf
|
/TestApplications/privacy-friendly-netmonitor-2.0/DecompiledCode/Fernflower/src/main/java/android/support/v7/widget/AppCompatBackgroundHelper.java
|
18bbedf562e4e5ed47f82c75ae6a1219c70138b0
|
[] |
no_license
|
sgros/activity_flow_plugin
|
bde2de3745d95e8097c053795c9e990c829a88f4
|
9e59f8b3adacf078946990db9c58f4965a5ccb48
|
refs/heads/master
| 2020-06-19T02:39:13.865609
| 2019-07-08T20:17:28
| 2019-07-08T20:17:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,865
|
java
|
package android.support.v7.widget;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff.Mode;
import android.graphics.drawable.Drawable;
import android.os.Build.VERSION;
import android.support.annotation.NonNull;
import android.support.v4.view.ViewCompat;
import android.support.v7.appcompat.R;
import android.util.AttributeSet;
import android.view.View;
class AppCompatBackgroundHelper {
private int mBackgroundResId = -1;
private TintInfo mBackgroundTint;
private final AppCompatDrawableManager mDrawableManager;
private TintInfo mInternalBackgroundTint;
private TintInfo mTmpInfo;
private final View mView;
AppCompatBackgroundHelper(View var1) {
this.mView = var1;
this.mDrawableManager = AppCompatDrawableManager.get();
}
private boolean applyFrameworkTintUsingColorFilter(@NonNull Drawable var1) {
if (this.mTmpInfo == null) {
this.mTmpInfo = new TintInfo();
}
TintInfo var2 = this.mTmpInfo;
var2.clear();
ColorStateList var3 = ViewCompat.getBackgroundTintList(this.mView);
if (var3 != null) {
var2.mHasTintList = true;
var2.mTintList = var3;
}
Mode var4 = ViewCompat.getBackgroundTintMode(this.mView);
if (var4 != null) {
var2.mHasTintMode = true;
var2.mTintMode = var4;
}
if (!var2.mHasTintList && !var2.mHasTintMode) {
return false;
} else {
AppCompatDrawableManager.tintDrawable(var1, var2, this.mView.getDrawableState());
return true;
}
}
private boolean shouldApplyFrameworkTintUsingColorFilter() {
int var1 = VERSION.SDK_INT;
boolean var2 = false;
if (var1 > 21) {
if (this.mInternalBackgroundTint != null) {
var2 = true;
}
return var2;
} else {
return var1 == 21;
}
}
void applySupportBackgroundTint() {
Drawable var1 = this.mView.getBackground();
if (var1 != null) {
if (this.shouldApplyFrameworkTintUsingColorFilter() && this.applyFrameworkTintUsingColorFilter(var1)) {
return;
}
if (this.mBackgroundTint != null) {
AppCompatDrawableManager.tintDrawable(var1, this.mBackgroundTint, this.mView.getDrawableState());
} else if (this.mInternalBackgroundTint != null) {
AppCompatDrawableManager.tintDrawable(var1, this.mInternalBackgroundTint, this.mView.getDrawableState());
}
}
}
ColorStateList getSupportBackgroundTintList() {
ColorStateList var1;
if (this.mBackgroundTint != null) {
var1 = this.mBackgroundTint.mTintList;
} else {
var1 = null;
}
return var1;
}
Mode getSupportBackgroundTintMode() {
Mode var1;
if (this.mBackgroundTint != null) {
var1 = this.mBackgroundTint.mTintMode;
} else {
var1 = null;
}
return var1;
}
void loadFromAttributes(AttributeSet var1, int var2) {
TintTypedArray var24 = TintTypedArray.obtainStyledAttributes(this.mView.getContext(), var1, R.styleable.ViewBackgroundHelper, var2, 0);
label211: {
Throwable var10000;
label215: {
boolean var10001;
label209: {
ColorStateList var3;
try {
if (!var24.hasValue(R.styleable.ViewBackgroundHelper_android_background)) {
break label209;
}
this.mBackgroundResId = var24.getResourceId(R.styleable.ViewBackgroundHelper_android_background, -1);
var3 = this.mDrawableManager.getTintList(this.mView.getContext(), this.mBackgroundResId);
} catch (Throwable var23) {
var10000 = var23;
var10001 = false;
break label215;
}
if (var3 != null) {
try {
this.setInternalBackgroundTint(var3);
} catch (Throwable var22) {
var10000 = var22;
var10001 = false;
break label215;
}
}
}
try {
if (var24.hasValue(R.styleable.ViewBackgroundHelper_backgroundTint)) {
ViewCompat.setBackgroundTintList(this.mView, var24.getColorStateList(R.styleable.ViewBackgroundHelper_backgroundTint));
}
} catch (Throwable var21) {
var10000 = var21;
var10001 = false;
break label215;
}
label198:
try {
if (var24.hasValue(R.styleable.ViewBackgroundHelper_backgroundTintMode)) {
ViewCompat.setBackgroundTintMode(this.mView, DrawableUtils.parseTintMode(var24.getInt(R.styleable.ViewBackgroundHelper_backgroundTintMode, -1), (Mode)null));
}
break label211;
} catch (Throwable var20) {
var10000 = var20;
var10001 = false;
break label198;
}
}
Throwable var25 = var10000;
var24.recycle();
throw var25;
}
var24.recycle();
}
void onSetBackgroundDrawable(Drawable var1) {
this.mBackgroundResId = -1;
this.setInternalBackgroundTint((ColorStateList)null);
this.applySupportBackgroundTint();
}
void onSetBackgroundResource(int var1) {
this.mBackgroundResId = var1;
ColorStateList var2;
if (this.mDrawableManager != null) {
var2 = this.mDrawableManager.getTintList(this.mView.getContext(), var1);
} else {
var2 = null;
}
this.setInternalBackgroundTint(var2);
this.applySupportBackgroundTint();
}
void setInternalBackgroundTint(ColorStateList var1) {
if (var1 != null) {
if (this.mInternalBackgroundTint == null) {
this.mInternalBackgroundTint = new TintInfo();
}
this.mInternalBackgroundTint.mTintList = var1;
this.mInternalBackgroundTint.mHasTintList = true;
} else {
this.mInternalBackgroundTint = null;
}
this.applySupportBackgroundTint();
}
void setSupportBackgroundTintList(ColorStateList var1) {
if (this.mBackgroundTint == null) {
this.mBackgroundTint = new TintInfo();
}
this.mBackgroundTint.mTintList = var1;
this.mBackgroundTint.mHasTintList = true;
this.applySupportBackgroundTint();
}
void setSupportBackgroundTintMode(Mode var1) {
if (this.mBackgroundTint == null) {
this.mBackgroundTint = new TintInfo();
}
this.mBackgroundTint.mTintMode = var1;
this.mBackgroundTint.mHasTintMode = true;
this.applySupportBackgroundTint();
}
}
|
[
"crash@home.home.hr"
] |
crash@home.home.hr
|
189d6bea4a04c028ae31a9284ace61b856d8c0ad
|
d67f6450b24fb08f2f61b74dcdecce3025ee3efc
|
/gemp-swccg-cards/src/main/java/com/gempukku/swccgo/cards/set1/light/Card1_111.java
|
6efda11061c67c6b1a9f24ab76f9e61c8b61e603
|
[
"MIT"
] |
permissive
|
cburyta/gemp-swccg-public
|
00a974d042195e69d3c104e61e9ee5bd48728f9a
|
05529086de91ecb03807fda820d98ec8a1465246
|
refs/heads/master
| 2023-01-09T12:45:33.347296
| 2020-10-26T14:39:28
| 2020-10-26T14:39:28
| 309,400,711
| 0
| 0
|
MIT
| 2020-11-07T04:57:04
| 2020-11-02T14:47:59
| null |
UTF-8
|
Java
| false
| false
| 5,556
|
java
|
package com.gempukku.swccgo.cards.set1.light;
import com.gempukku.swccgo.cards.AbstractLostInterrupt;
import com.gempukku.swccgo.cards.GameConditions;
import com.gempukku.swccgo.cards.effects.AddBattleDestinyEffect;
import com.gempukku.swccgo.common.Side;
import com.gempukku.swccgo.common.Title;
import com.gempukku.swccgo.common.Uniqueness;
import com.gempukku.swccgo.filters.Filter;
import com.gempukku.swccgo.filters.Filters;
import com.gempukku.swccgo.game.PhysicalCard;
import com.gempukku.swccgo.game.SwccgGame;
import com.gempukku.swccgo.logic.GameUtils;
import com.gempukku.swccgo.logic.actions.PlayInterruptAction;
import com.gempukku.swccgo.logic.effects.RespondablePlayCardEffect;
import com.gempukku.swccgo.logic.effects.TargetCardOnTableEffect;
import com.gempukku.swccgo.logic.timing.Action;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Premiere
* Type: Interrupt
* Subtype: Lost
* Title: Solo Han
*/
public class Card1_111 extends AbstractLostInterrupt {
public Card1_111() {
super(Side.LIGHT, 4, Title.Solo_Han, Uniqueness.UNIQUE);
setLore("As a smuggler, Solo must always be alert for trouble, even when appearing relaxed. Bounty hunters are eager to claim the price on the Corellian pirate's head.");
setGameText("If Han is defending a battle alone at a site, add two battle destiny. OR If any alien is defending a battle alone at a site, add one battle destiny.");
}
@Override
protected List<PlayInterruptAction> getGameTextTopLevelActions(final String playerId, SwccgGame game, final PhysicalCard self) {
List<PlayInterruptAction> actions = new LinkedList<PlayInterruptAction>();
// Check condition(s)
if (GameConditions.isDuringBattleAt(game, Filters.and(Filters.site, Filters.canBeTargetedBy(self)))
&& GameConditions.canAddBattleDestinyDraws(game, self)) {
Filter hanFilter = Filters.and(Filters.Han, Filters.defendingBattle, Filters.alone);
if (GameConditions.canTarget(game, self, hanFilter)) {
final PlayInterruptAction action = new PlayInterruptAction(game, self);
action.setText("Add two battle destiny");
// Choose target(s)
action.appendTargeting(
new TargetCardOnTableEffect(action, playerId, "Choose Han", hanFilter) {
@Override
protected boolean getUseShortcut() {
return true;
}
@Override
protected void cardTargeted(final int targetGroupId1, final PhysicalCard hanTargeted) {
action.addAnimationGroup(hanTargeted);
// Allow response(s)
action.allowResponses("Add two battle destiny by targeting " + GameUtils.getCardLink(hanTargeted),
new RespondablePlayCardEffect(action) {
@Override
protected void performActionResults(Action targetingAction) {
// Perform result(s)
action.appendEffect(
new AddBattleDestinyEffect(action, 2));
}
}
);
}
}
);
actions.add(action);
}
Filter alienFilter = Filters.and(Filters.your(self), Filters.alien, Filters.defendingBattle, Filters.alone);
if (GameConditions.canTarget(game, self, alienFilter)) {
final PlayInterruptAction action = new PlayInterruptAction(game, self);
action.setText("Add one battle destiny");
// Choose target(s)
action.appendTargeting(
new TargetCardOnTableEffect(action, playerId, "Choose alien", alienFilter) {
@Override
protected boolean getUseShortcut() {
return true;
}
@Override
protected void cardTargeted(final int targetGroupId1, final PhysicalCard alienTargeted) {
action.addAnimationGroup(alienTargeted);
// Allow response(s)
action.allowResponses("Add one battle destiny by targeting " + GameUtils.getCardLink(alienTargeted),
new RespondablePlayCardEffect(action) {
@Override
protected void performActionResults(Action targetingAction) {
// Perform result(s)
action.appendEffect(
new AddBattleDestinyEffect(action, 1));
}
}
);
}
}
);
actions.add(action);
}
}
return actions;
}
}
|
[
"andrew@bender.io"
] |
andrew@bender.io
|
ed2f514a76a182bafd8e2089ccf4c688b02e8f02
|
5456a38a3374f32e3b0b36b5df47bf3e281c979a
|
/rest/workspace-csra-pjsetup/utils/src/main/java/com/hcentive/utils/search/service/CriteriaService.java
|
d18e0dbffa544a289a441ea43c85f05449efeffe
|
[] |
no_license
|
kietutorial/kiesetup
|
960ea0887af1a605bc3fbe516f1070946d2611ed
|
d856e7e2dbc31d9e928288313a6d942c4a054a09
|
refs/heads/master
| 2022-12-21T20:56:43.711869
| 2019-09-01T01:06:32
| 2019-09-01T01:06:32
| 205,611,561
| 0
| 0
| null | 2022-12-16T01:21:47
| 2019-09-01T00:41:55
|
Java
|
UTF-8
|
Java
| false
| false
| 608
|
java
|
package com.hcentive.utils.search.service;
import java.util.Map;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.metamodel.Metamodel;
import org.hibernate.Criteria;
import com.hcentive.utils.search.model.SearchCriteria;
public interface CriteriaService {
CriteriaQuery buildCriteria(CriteriaBuilder criteriaBuilder, Metamodel metamodel, Map<String, Object> searchParams);
CriteriaQuery buildCriteriaForTotalCount(CriteriaBuilder criteriaBuilder, Metamodel metamodel, Map<String, Object> searchParams);
}
|
[
"demo@demo.net"
] |
demo@demo.net
|
62e966c156a09e126c9947273fd5f9f9ebece7fc
|
20c6398b414a6f0764d21c846c6231316ff66834
|
/ordersearch/src/com/generic/ordersearch/provider/OrderSearchTypeValueProvider.java
|
18319bb85129545772481c0f4a56118d0c2c3230
|
[] |
no_license
|
vamshivushakola/b2b_assets_5.7
|
472d2597f75f685772bf2e23e14b8c1c9ff5fc05
|
722493b8fbd1dcbc8109b0fd71787669ab67fd49
|
refs/heads/master
| 2020-03-27T06:53:31.961017
| 2016-07-21T14:00:39
| 2016-07-21T14:00:39
| 63,874,082
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,881
|
java
|
package com.generic.ordersearch.provider;
import de.hybris.platform.core.model.order.AbstractOrderModel;
import de.hybris.platform.core.model.order.CartModel;
import de.hybris.platform.solrfacetsearch.config.IndexConfig;
import de.hybris.platform.solrfacetsearch.config.IndexedProperty;
import de.hybris.platform.solrfacetsearch.config.exceptions.FieldValueProviderException;
import de.hybris.platform.solrfacetsearch.provider.FieldNameProvider;
import de.hybris.platform.solrfacetsearch.provider.FieldValue;
import de.hybris.platform.solrfacetsearch.provider.FieldValueProvider;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import junit.framework.Assert;
import org.springframework.beans.factory.annotation.Required;
import com.generic.ordersearch.constants.OrdersearchConstants;
/**
* @author Capgemini
*/
public class OrderSearchTypeValueProvider implements FieldValueProvider
{
private FieldNameProvider fieldNameProvider;
@Override
public Collection<FieldValue> getFieldValues(final IndexConfig indexConfig, final IndexedProperty indexedProperty,
final Object o) throws FieldValueProviderException
{
Assert.assertTrue(o instanceof AbstractOrderModel);
final AbstractOrderModel order = (AbstractOrderModel) o;
final Collection<String> fieldNames = getFieldNameProvider().getFieldNames(indexedProperty, null);
final List<FieldValue> retList = new ArrayList();
for (final String fieldName : fieldNames)
{
retList.add(new FieldValue(fieldName, (order instanceof CartModel) ? OrdersearchConstants.OrderType.CART
: OrdersearchConstants.OrderType.ORDER));
}
return retList;
}
protected FieldNameProvider getFieldNameProvider()
{
return fieldNameProvider;
}
@Required
public void setFieldNameProvider(final FieldNameProvider fieldNameProvider)
{
this.fieldNameProvider = fieldNameProvider;
}
}
|
[
"vamshi.vushakola@gmail.com"
] |
vamshi.vushakola@gmail.com
|
8a3173ba03260b3b23d542b61b4c809006646183
|
55ae35c0d186adc835e502aafaba4d9bcab00a5f
|
/app/src/main/java/com/imagestudio/views/themeable/ThemedSettingsTitle.java
|
0c8e0228b757369a64fd2739ec2262c5da9012a1
|
[] |
no_license
|
JitendraKumar7/ImageStudio
|
7a17773eed809556fd5f6d118ad7cedc343db29b
|
7fe74c4e462b0abfab942d8ed8723eeb8fbd23c0
|
refs/heads/master
| 2020-03-22T15:51:05.406380
| 2018-07-09T12:43:08
| 2018-07-09T12:43:08
| 140,283,745
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 876
|
java
|
package com.imagestudio.views.themeable;
import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import org.horaapps.liz.ThemeHelper;
import org.horaapps.liz.Themed;
/**
* Created by darken (darken@darken.eu) on 04.03.2017.
*/
public class ThemedSettingsTitle extends android.support.v7.widget.AppCompatTextView implements Themed {
public ThemedSettingsTitle(Context context) {
this(context, null);
}
public ThemedSettingsTitle(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public ThemedSettingsTitle(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
public void refreshTheme(ThemeHelper themeHelper) {
setTextColor(themeHelper.getTextColor());
}
}
|
[
"jitendrasoam90@gmail.com"
] |
jitendrasoam90@gmail.com
|
aed6ec63a61142e13883160ffd8681d08cb9ce9a
|
ffeaf567e9b1aadb4c00d95cd3df4e6484f36dcd
|
/Hotgram/org/telegram/ui/-$$Lambda$PassportActivity$19$1$0kRj7ir3NwvnbVVMIq70mwI_7cA.java
|
ab06ec345163873787de8864b7be6dcbc0de29f0
|
[] |
no_license
|
danielperez9430/Third-party-Telegram-Apps-Spy
|
dfe541290c8512ca366e401aedf5cc5bfcaa6c3e
|
f6fc0f9c677bd5d5cd3585790b033094c2f0226d
|
refs/heads/master
| 2020-04-11T23:26:06.025903
| 2018-12-18T10:07:20
| 2018-12-18T10:07:20
| 162,166,647
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,698
|
java
|
package org.telegram.ui;
import java.util.ArrayList;
import org.telegram.messenger.SecureDocument;
import org.telegram.tgnet.TLRPC$TL_account_saveSecureValue;
import org.telegram.tgnet.TLRPC$TL_error;
import org.telegram.tgnet.TLRPC$TL_secureRequiredType;
import org.telegram.tgnet.TLRPC$TL_secureValue;
public final class -$$Lambda$PassportActivity$19$1$0kRj7ir3NwvnbVVMIq70mwI_7cA implements Runnable {
public -$$Lambda$PassportActivity$19$1$0kRj7ir3NwvnbVVMIq70mwI_7cA(org.telegram.ui.PassportActivity$19$1 arg3, TL_error arg4, ErrorRunnable arg5, String arg6, TL_account_saveSecureValue arg7, boolean arg8, TL_secureRequiredType arg9, TL_secureRequiredType arg10, TL_secureValue arg11, TL_secureValue arg12, ArrayList arg13, SecureDocument arg14, SecureDocument arg15, SecureDocument arg16, ArrayList arg17, String arg18, String arg19, int arg20, Runnable arg21) {
super();
this.f$0 = arg3;
this.f$1 = arg4;
this.f$2 = arg5;
this.f$3 = arg6;
this.f$4 = arg7;
this.f$5 = arg8;
this.f$6 = arg9;
this.f$7 = arg10;
this.f$8 = arg11;
this.f$9 = arg12;
this.f$10 = arg13;
this.f$11 = arg14;
this.f$12 = arg15;
this.f$13 = arg16;
this.f$14 = arg17;
this.f$15 = arg18;
this.f$16 = arg19;
this.f$17 = arg20;
this.f$18 = arg21;
}
public final void run() {
org.telegram.ui.PassportActivity$19$1.lambda$onResult$0(this.f$0, this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16, this.f$17, this.f$18);
}
}
|
[
"dpefe@hotmail.es"
] |
dpefe@hotmail.es
|
f0061f71617e25a7bb1001ac931a1f509054fc08
|
cf8e1797728e8f6a18c3d8e4889cdf141b3c620f
|
/dboe-base/src/main/java/org/seaborne/dboe/sys/SystemFile.java
|
d17a6f914cbea964ef9a9f5834118527fca13c75
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
anukat2015/mantis
|
2a74e6786e6ef2c98f57d1b893da2f0921cf56f3
|
7c062f3f3b15da42948c42c0d9f36c3ff4e253e9
|
refs/heads/master
| 2021-01-16T00:04:51.840293
| 2015-10-16T20:48:02
| 2015-10-16T20:48:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 815
|
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.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*/
package org.seaborne.dboe.sys;
public class SystemFile {
public static final int ObjectFileWriteBufferSize = 8*1024 ;
}
|
[
"andy@seaborne.org"
] |
andy@seaborne.org
|
4470c51c8907955e47f06d6486a356ac10d8430c
|
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
|
/Method_Scraping/xml_scraping/NicadOutputFile_t1_beam_2nd/Nicad_t1_beam_2nd2161.java
|
09361bf2fa05eee44682a4fa3f20ae23a78b1af5
|
[] |
no_license
|
ryosuke-ku/TestCodeSeacherPlus
|
cfd03a2858b67a05ecf17194213b7c02c5f2caff
|
d002a52251f5461598c7af73925b85a05cea85c6
|
refs/heads/master
| 2020-05-24T01:25:27.000821
| 2019-08-17T06:23:42
| 2019-08-17T06:23:42
| 187,005,399
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 597
|
java
|
// clone pairs:10676:80%
// 14144:beam/sdks/java/extensions/protobuf/src/main/java/org/apache/beam/sdk/extensions/protobuf/ProtoCoder.java
public class Nicad_t1_beam_2nd2161
{
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof ProtoCoder)) {
return false;
}
ProtoCoder<?> otherCoder = (ProtoCoder<?>) other;
return protoMessageClass.equals(otherCoder.protoMessageClass)
&& Sets.newHashSet(extensionHostClasses)
.equals(Sets.newHashSet(otherCoder.extensionHostClasses));
}
}
|
[
"naist1020@gmail.com"
] |
naist1020@gmail.com
|
e50df2e89509cbedc1a2d5d30168a381cabd899f
|
af0c4995d4bf5f76a6ca283fc55dfdca4e52ca3a
|
/user/src/main/java/com/whaley/biz/user/interactor/ThirdLogin.java
|
5e4fcccbe8c3bbe766afc10fad68eae582303502
|
[] |
no_license
|
portal-io/portal-android
|
da60c4a7d54fb56fbc983c635bb1d2c4d542f78e
|
623757fbb4d7979745b4c8ee34cebbf395cbd249
|
refs/heads/master
| 2020-03-20T07:58:08.196164
| 2019-03-16T02:30:48
| 2019-03-16T02:30:48
| 137,295,692
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,690
|
java
|
package com.whaley.biz.user.interactor;
import com.whaley.biz.common.interactor.BaseUseCase;
import com.whaley.biz.common.interactor.CommonFunction;
import com.whaley.biz.common.interactor.UseCaseParam;
import com.whaley.biz.common.response.BaseResponse;
import com.whaley.biz.common.response.Response;
import com.whaley.biz.user.UserConstants;
import com.whaley.biz.user.UserManager;
import com.whaley.biz.user.model.AccessTokenModel;
import com.whaley.biz.user.model.LoginModel;
import com.whaley.biz.user.model.UserModel;
import com.whaley.biz.user.model.response.WhaleyResponse;
import com.whaley.biz.user.api.UserVrApi;
import com.whaley.core.repository.IRepositoryManager;
import com.whaley.core.utils.StrUtil;
import io.reactivex.Observable;
import io.reactivex.Scheduler;
/**
* Created by Administrator on 2017/7/18.
*/
public class ThirdLogin extends BaseUseCase<UserModel, UserModel> {
public ThirdLogin(IRepositoryManager repositoryManager, Scheduler executeThread, Scheduler postExecutionThread) {
super(repositoryManager, executeThread, postExecutionThread);
}
@Override
public Observable<UserModel> buildUseCaseObservable(final UseCaseParam<UserModel> param) {
return getRepositoryManager()
.obtainRemoteService(UserVrApi.class)
.thirdLogin(param.getParam().getOpenid(),
param.getParam().getOrgin(),
UserConstants.FROM,
UserManager.getInstance().getDeviceId(),
param.getParam().getNickname(),
param.getParam().getUnionid(),
param.getParam().getAvatar(),
param.getParam().getArea(),
param.getParam().getGender())
.map(new CommonFunction<WhaleyResponse<LoginModel>, UserModel>() {
@Override
protected UserModel getData(BaseResponse response) {
UserModel userModel = param.getParam();
WhaleyResponse<LoginModel> whaleyResponse = (WhaleyResponse<LoginModel>) response;
LoginModel loginModel = whaleyResponse.getData();
if (whaleyResponse.checkStatus()) {
if (!StrUtil.isEmpty(loginModel.getAccesstoken())) {
userModel.setAccessTokenModel(new AccessTokenModel(loginModel.getAccesstoken(), loginModel.getRefreshtoken(), loginModel.getExpiretime()));
}
if (StrUtil.isEmpty(loginModel.getUsername()) || loginModel.getUsername().startsWith("vr_")) {
userModel.setAddInformation(true);
} else {
userModel.setAddInformation(false);
userModel.setNickname(loginModel.getUsername());
}
userModel.setAvatar(loginModel.getAvatar());
userModel.setMobile(loginModel.getMobile());
userModel.setAccount_id(loginModel.getHeliosid());
return userModel;
}
if (response.getStatus() == 144) {
userModel.setThird_id(whaleyResponse.getData().getThird_id());
}
return userModel;
}
});
}
public Observable<UserModel> buildUseCaseObservable(UserModel userModel) {
return buildUseCaseObservable(new UseCaseParam(userModel));
}
}
|
[
"lizs@snailvr.com"
] |
lizs@snailvr.com
|
aef662b79190edd4f0d27286602452804599d9ac
|
d71fc6f733e494f35f1ea855f25c5e830efea632
|
/kernel/impl/fabric3-contribution/src/test/java/org/fabric3/contribution/ContributionLoaderImplTestCase.java
|
3537030ff312de1387ccbde9edaa19299183fe03
|
[
"Apache-2.0"
] |
permissive
|
carecon/fabric3-core
|
d92ba6aa847386ee491d16f7802619ee1f65f493
|
14a6c6cd5d7d3cabf92e670ac89432a5f522c518
|
refs/heads/master
| 2020-04-02T19:54:51.148466
| 2018-12-06T19:56:50
| 2018-12-06T19:56:50
| 154,750,871
| 0
| 0
| null | 2018-10-25T23:39:54
| 2018-10-25T23:39:54
| null |
UTF-8
|
Java
| false
| false
| 8,049
|
java
|
/*
* Fabric3
* Copyright (c) 2009-2015 Metaform Systems
*
* 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.
*
* Portions originally based on Apache Tuscany 2007
* licensed under the Apache 2.0 license.
*/
package org.fabric3.contribution;
import java.io.File;
import java.lang.reflect.Field;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import junit.framework.TestCase;
import org.easymock.EasyMock;
import org.fabric3.api.host.Names;
import org.fabric3.api.host.runtime.HostInfo;
import org.fabric3.contribution.generator.ClassLoaderWireGenerator;
import org.fabric3.contribution.generator.JavaContributionWireGenerator;
import org.fabric3.contribution.generator.LocationContributionWireGenerator;
import org.fabric3.contribution.manifest.ContributionImport;
import org.fabric3.contribution.wire.ClassLoaderWireBuilder;
import org.fabric3.contribution.wire.JavaContributionWire;
import org.fabric3.contribution.wire.LocationContributionWire;
import org.fabric3.spi.classloader.ClassLoaderRegistry;
import org.fabric3.spi.classloader.MultiParentClassLoader;
import org.fabric3.spi.contribution.ClasspathProcessorRegistry;
import org.fabric3.spi.contribution.Contribution;
import org.fabric3.spi.contribution.ContributionManifest;
import org.fabric3.spi.contribution.ContributionWire;
import org.fabric3.spi.contribution.MetaDataStore;
import org.fabric3.spi.contribution.manifest.JavaExport;
import org.fabric3.spi.contribution.manifest.JavaImport;
import org.fabric3.spi.contribution.manifest.PackageInfo;
import org.fabric3.spi.model.physical.ClassLoaderWire;
/**
* This is more intended to be a integration test then a unit test.
*/
public class ContributionLoaderImplTestCase extends TestCase {
private ClassLoaderRegistry classLoaderRegistry;
private MetaDataStore store;
private ClasspathProcessorRegistry processorRegistry;
private Map<Class<?>, ClassLoaderWireGenerator<?>> generators;
private ClassLoaderWireBuilder builder;
private HostInfo info;
private Contribution contribution;
private URI contributionUri;
private MultiParentClassLoader hostClassLoader;
private MultiParentClassLoader extensionClassLoader;
private JavaImport imprt;
private JavaExport export;
private URI extensionProviderUri;
private URL locationUrl;
public void testLoad() throws Exception {
ContributionLoaderMonitor monitor = EasyMock.createNiceMock(ContributionLoaderMonitor.class);
EasyMock.replay(classLoaderRegistry, store, processorRegistry, builder, monitor);
ContributionLoaderImpl loader = new ContributionLoaderImpl(classLoaderRegistry, store, processorRegistry, generators, builder, info, monitor);
MultiParentClassLoader classLoader = (MultiParentClassLoader) loader.load(contribution);
assertTrue(classLoader.getParents().contains(hostClassLoader));
// verify classloader has the extension provider as an extension and the provider has the classloader as an extension
Field extensions = MultiParentClassLoader.class.getDeclaredField("extensions");
extensions.setAccessible(true);
assertTrue(((List) extensions.get(classLoader)).contains(extensionClassLoader));
assertTrue(((List) extensions.get(extensionClassLoader)).contains(classLoader));
// verify location url
assertTrue(Arrays.asList(classLoader.getURLs()).contains(locationUrl));
EasyMock.verify(classLoaderRegistry, store, processorRegistry, builder);
}
@Override
protected void setUp() throws Exception {
super.setUp();
createContribution();
hostClassLoader = new MultiParentClassLoader(Names.HOST_CONTRIBUTION, getClass().getClassLoader());
extensionClassLoader = new MultiParentClassLoader(extensionProviderUri, getClass().getClassLoader());
classLoaderRegistry = EasyMock.createMock(ClassLoaderRegistry.class);
EasyMock.expect(classLoaderRegistry.getClassLoader(Names.HOST_CONTRIBUTION)).andReturn(hostClassLoader);
EasyMock.expect(classLoaderRegistry.getClassLoader(extensionProviderUri)).andReturn(extensionClassLoader).times(2);
classLoaderRegistry.register(EasyMock.eq(contributionUri), EasyMock.isA(MultiParentClassLoader.class));
setupStore();
setupGenerators();
processorRegistry = EasyMock.createMock(ClasspathProcessorRegistry.class);
List<URL> classpath = Collections.singletonList(locationUrl);
EasyMock.expect(processorRegistry.process(contribution)).andReturn(classpath);
builder = EasyMock.createMock(ClassLoaderWireBuilder.class);
builder.build(EasyMock.isA(MultiParentClassLoader.class), EasyMock.isA(ClassLoaderWire.class));
EasyMock.expectLastCall().times(2);
info = EasyMock.createMock(HostInfo.class);
EasyMock.expect(info.supportsClassLoaderIsolation()).andReturn(true);
EasyMock.expect(info.getTempDir()).andReturn(new File(""));
EasyMock.replay(info);
}
private void setupGenerators() {
ClassLoaderWireGenerator javaGenerator = new JavaContributionWireGenerator();
ClassLoaderWireGenerator locationGenerator = new LocationContributionWireGenerator();
generators = new HashMap<>();
generators.put(JavaContributionWire.class, javaGenerator);
generators.put(LocationContributionWire.class, locationGenerator);
}
private void setupStore() {
URI importUri = URI.create("import");
URI exportUri = URI.create("export");
JavaContributionWire javaWire = new JavaContributionWire(imprt, export, importUri, exportUri);
List<ContributionWire<?, ?>> javaWires = Collections.<ContributionWire<?, ?>>singletonList(javaWire);
LocationContributionWire hostWire = new LocationContributionWire(null, null, importUri, exportUri);
List<ContributionWire<?, ?>> hostWires = Collections.<ContributionWire<?, ?>>singletonList(hostWire);
store = EasyMock.createMock(MetaDataStore.class);
EasyMock.expect(store.resolveContributionWires(EasyMock.eq(contributionUri), EasyMock.isA(JavaImport.class))).andReturn(javaWires);
EasyMock.expect(store.resolveContributionWires(EasyMock.eq(contributionUri), EasyMock.isA(ContributionImport.class))).andReturn(hostWires);
Contribution extensionProvider = new Contribution(extensionProviderUri);
EasyMock.expect(store.resolveExtensionProviders("extensionPoint")).andReturn(Collections.singletonList(extensionProvider));
EasyMock.expect(store.resolveExtensionPoints("extend")).andReturn(Collections.singletonList(extensionProvider));
}
private void createContribution() throws MalformedURLException {
contributionUri = URI.create("contribution");
locationUrl = new URL("file://test");
contribution = new Contribution(contributionUri, null, locationUrl, -1, null);
ContributionManifest manifest = contribution.getManifest();
// setup imports
PackageInfo info = new PackageInfo("org.fabric3");
imprt = new JavaImport(info);
export = new JavaExport(info);
manifest.addImport(imprt);
// setup extension points
manifest.addExtensionPoint("extensionPoint");
manifest.addExtend("extend");
extensionProviderUri = URI.create("extensionProvider");
}
}
|
[
"jim.marino@gmail.com"
] |
jim.marino@gmail.com
|
ce8eeaeff4959afea69ca332cd32b82017d58770
|
600df3590cce1fe49b9a96e9ca5b5242884a2a70
|
/components/cronet/android/java/src/org/chromium/net/urlconnection/MessageLoop.java
|
9e1f79f4cb45252273a2a0cc88e2bd1458c863e6
|
[
"BSD-3-Clause"
] |
permissive
|
metux/chromium-suckless
|
efd087ba4f4070a6caac5bfbfb0f7a4e2f3c438a
|
72a05af97787001756bae2511b7985e61498c965
|
refs/heads/orig
| 2022-12-04T23:53:58.681218
| 2017-04-30T10:59:06
| 2017-04-30T23:35:58
| 89,884,931
| 5
| 3
|
BSD-3-Clause
| 2022-11-23T20:52:53
| 2017-05-01T00:09:08
| null |
UTF-8
|
Java
| false
| false
| 5,553
|
java
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.net.urlconnection;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.net.SocketTimeoutException;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.TimeUnit;
/**
* A MessageLoop class for use in {@link CronetHttpURLConnection}.
*/
class MessageLoop implements Executor {
private final BlockingQueue<Runnable> mQueue;
// Indicates whether this message loop is currently running.
private boolean mLoopRunning = false;
// Indicates whether an InterruptedException or a RuntimeException has
// occurred in loop(). If true, the loop cannot be safely started because
// this might cause the loop to terminate immediately if there is a quit
// task enqueued.
private boolean mLoopFailed = false;
// Used when assertions are enabled to enforce single-threaded use.
private static final long INVALID_THREAD_ID = -1;
private long mThreadId = INVALID_THREAD_ID;
MessageLoop() {
mQueue = new LinkedBlockingQueue<Runnable>();
}
private boolean calledOnValidThread() {
if (mThreadId == INVALID_THREAD_ID) {
mThreadId = Thread.currentThread().getId();
return true;
}
return mThreadId == Thread.currentThread().getId();
}
/**
* Retrieves a task from the queue with the given timeout.
*
* @param useTimeout whether to use a timeout.
* @param timeoutNano Time to wait, in nanoseconds.
* @return A non-{@code null} Runnable from the queue.
* @throws InterruptedIOException
*/
private Runnable take(boolean useTimeout, long timeoutNano) throws InterruptedIOException {
Runnable task = null;
try {
if (!useTimeout) {
task = mQueue.take(); // Blocks if the queue is empty.
} else {
// poll returns null upon timeout.
task = mQueue.poll(timeoutNano, TimeUnit.NANOSECONDS);
}
} catch (InterruptedException e) {
InterruptedIOException exception = new InterruptedIOException();
exception.initCause(e);
throw exception;
}
if (task == null) {
// This will terminate the loop.
throw new SocketTimeoutException();
}
return task;
}
/**
* Runs the message loop. Be sure to call {@link MessageLoop#quit()}
* to end the loop. If an interruptedException occurs, the loop cannot be
* started again (see {@link #mLoopFailed}).
* @throws IOException
*/
public void loop() throws IOException {
loop(0);
}
/**
* Runs the message loop. Be sure to call {@link MessageLoop#quit()}
* to end the loop. If an interruptedException occurs, the loop cannot be
* started again (see {@link #mLoopFailed}).
* @param timeoutMilli Timeout, in milliseconds, or 0 for no timeout.
* @throws IOException
*/
public void loop(int timeoutMilli) throws IOException {
assert calledOnValidThread();
// Use System.nanoTime() which is monotonically increasing.
long startNano = System.nanoTime();
long timeoutNano = TimeUnit.NANOSECONDS.convert(timeoutMilli, TimeUnit.MILLISECONDS);
if (mLoopFailed) {
throw new IllegalStateException(
"Cannot run loop as an exception has occurred previously.");
}
if (mLoopRunning) {
throw new IllegalStateException(
"Cannot run loop when it is already running.");
}
mLoopRunning = true;
while (mLoopRunning) {
try {
if (timeoutMilli == 0) {
take(false, 0).run();
} else {
take(true, timeoutNano - System.nanoTime() + startNano).run();
}
} catch (InterruptedIOException | RuntimeException e) {
mLoopRunning = false;
mLoopFailed = true;
throw e;
}
}
}
/**
* This causes {@link #loop()} to stop executing messages after the current
* message being executed. Should only be called from the currently
* executing message.
*/
public void quit() {
assert calledOnValidThread();
mLoopRunning = false;
}
/**
* Posts a task to the message loop.
*/
@Override
public void execute(Runnable task) throws RejectedExecutionException {
if (task == null) {
throw new IllegalArgumentException();
}
try {
mQueue.put(task);
} catch (InterruptedException e) {
// In theory this exception won't happen, since we have an blocking
// queue with Integer.MAX_Value capacity, put() call will not block.
throw new RejectedExecutionException(e);
}
}
/**
* Returns whether the loop is currently running. Used in testing.
*/
public boolean isRunning() {
return mLoopRunning;
}
/**
* Returns whether an exception occurred in {#loop()}. Used in testing.
*/
public boolean hasLoopFailed() {
return mLoopFailed;
}
}
|
[
"enrico.weigelt@gr13.net"
] |
enrico.weigelt@gr13.net
|
4fd44f55e7cb9e2b91d6148283e935af0725b5bb
|
3dd35c0681b374ce31dbb255b87df077387405ff
|
/generated/typekey/RatingStyle.java
|
06ceae9389eb790535f9fea87ca6aa5440443879
|
[] |
no_license
|
walisashwini/SBTBackup
|
58b635a358e8992339db8f2cc06978326fed1b99
|
4d4de43576ec483bc031f3213389f02a92ad7528
|
refs/heads/master
| 2023-01-11T09:09:10.205139
| 2020-11-18T12:11:45
| 2020-11-18T12:11:45
| 311,884,817
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,830
|
java
|
package typekey;
@javax.annotation.Generated(value = "com.guidewire.pl.metadata.codegen.Codegen", comments = "RatingStyle.tti;RatingStyle.tix;RatingStyle.ttx")
@java.lang.SuppressWarnings(value = {"deprecation", "unchecked"})
@gw.internal.gosu.parser.ExtendedType
public class RatingStyle implements gw.entity.TypeKey {
/**
* Default
* Default rating style
*/
public static final typekey.RatingStyle TC_DEFAULT = new typekey.RatingStyle("Default");
/**
* Quick Quote
* Quick quote rating style
*/
public static final typekey.RatingStyle TC_QUICKQUOTE = new typekey.RatingStyle("QuickQuote");
public static final gw.pl.persistence.type.TypeListTypeReference<typekey.RatingStyle> TYPE = new com.guidewire.commons.metadata.types.TypeListIntrinsicTypeCache<typekey.RatingStyle>("RatingStyle");
private final com.guidewire.commons.typelist.TypeKeyImplManager _typeKeyImplManager;
private RatingStyle(java.lang.String code) {
_typeKeyImplManager = com.guidewire.commons.typelist.TypeKeyImplManager.newInstance(this, code);
}
public int compareTo(gw.entity.TypeKey arg0) {
return _typeKeyImplManager.getTypeKeyImpl().compareTo(arg0);
}
/**
*
* @deprecated Use this object instead.
*/
@java.lang.Deprecated
public typekey.RatingStyle get() {
return this;
}
public static typekey.RatingStyle get(java.lang.String code) {
return TYPE.get().getTypeKey(code);
}
public static java.util.List<typekey.RatingStyle> getAllTypeKeys() {
return TYPE.get().getTypeKeys(true);
}
/**
* Returns the list of categories that this key belongs to
* @return the categories that this key belongs to
*/
public gw.entity.TypeKey[] getCategories() {
return _typeKeyImplManager.getTypeKeyImpl().getCategories();
}
public java.lang.String getCode() {
return _typeKeyImplManager.getCode();
}
/**
* Returns the description for this typekey for the current locale.
* @return the description for this typekey
*/
public java.lang.String getDescription() {
return _typeKeyImplManager.getTypeKeyImpl().getDescription();
}
/**
* Returns the description of this typekey for the given locale.
* @param locale the locale to use to get the description
* @return a description for this typekey for the given locale
*/
public java.lang.String getDescription(gw.i18n.ILocale locale) {
return _typeKeyImplManager.getTypeKeyImpl().getDescription(locale);
}
public java.lang.String getDisplayName() {
return _typeKeyImplManager.getTypeKeyImpl().getDisplayName();
}
/**
* Returns the name of this typekey for the given locale.
* @param locale
*/
public java.lang.String getDisplayName(gw.i18n.ILocale locale) {
return _typeKeyImplManager.getTypeKeyImpl().getDisplayName(locale);
}
/**
* Gets the entity type associated with this typekey, if any. Returns null if this is not a subtype typekey.
*/
public gw.entity.IEntityType getEntityType() {
return _typeKeyImplManager.getTypeKeyImpl().getEntityType();
}
/**
* Returns the owning type for this key.
* @return
*/
public gw.entity.ITypeList getIntrinsicType() {
return _typeKeyImplManager.getTypeKeyImpl().getIntrinsicType();
}
/**
* A string containing the typelist name.
*/
public java.lang.String getListName() {
return _typeKeyImplManager.getTypeKeyImpl().getListName();
}
/**
* Returns the value of the "name" attribute for this typekey.
* @return the name of this typekey
* @deprecated Use {@link #getDisplayName()} or {@link #getUnlocalizedName()} instead, as appropriate.
*/
@java.lang.Deprecated
public java.lang.String getName() {
return _typeKeyImplManager.getTypeKeyImpl().getName();
}
public int getOrdinal() {
return _typeKeyImplManager.getTypeKeyImpl().getOrdinal();
}
/**
* Returns the priority for this type key
* @return the priority for this type key
*/
public int getPriority() {
return _typeKeyImplManager.getTypeKeyImpl().getPriority();
}
/**
* Returns the sort order for this type key in the specified language.
* @param locale
* @return the sort order for this type key
*/
public int getSortOrder(gw.i18n.ILocale locale) {
return _typeKeyImplManager.getTypeKeyImpl().getSortOrder(locale);
}
public static typekey.RatingStyle getTypeKey(java.lang.String code) {
return TYPE.get().getTypeKey(code);
}
/**
* All of the typekeys in this list, including retired typekeys.
* @deprecated Use getTypeKeys(boolean)
*/
@java.lang.Deprecated
public static typekey.RatingStyle[] getTypeKeys() {
return TYPE.get().getTypeKeys(true).toArray(new typekey.RatingStyle[]{});
}
public static java.util.List<typekey.RatingStyle> getTypeKeys(boolean includeRetired) {
return TYPE.get().getTypeKeys(includeRetired);
}
/**
* Returns the (non-localized) description of this typekey. Generally should not be used by application code. To get a
* displayable string, use {@link #getDescription()} instead.
* @return the non-localized description of this typekey
*/
public java.lang.String getUnlocalizedDescription() {
return _typeKeyImplManager.getTypeKeyImpl().getUnlocalizedDescription();
}
/**
* Returns the (non-localized) name of this typekey. Generally should not be used by application code. To get a
* displayable string, use {@link #getDisplayName()} instead. To get a unique string identifier for this typekey,
* use {@link #getCode()} instead.
* @return the non-localized name of this typekey
*/
public java.lang.String getUnlocalizedName() {
return _typeKeyImplManager.getTypeKeyImpl().getUnlocalizedName();
}
public typekey.RatingStyle getValue() {
return this;
}
/**
* Checks to see if this typekey has a category corresponding to the given
* typekey. For a match to be found, this typekey has to have a category
* with the same typelist and code as the given typekey.
* @param categoryToCheck
* @return
*/
public boolean hasCategory(gw.entity.TypeKey categoryToCheck) {
return _typeKeyImplManager.getTypeKeyImpl().hasCategory(categoryToCheck);
}
/**
* A boolean that indicates a type code is for internal use by Guidewire software. Internal type codes cannot be
* removed or modified.
*/
public boolean isInternal() {
return _typeKeyImplManager.getTypeKeyImpl().isInternal();
}
/**
* Returns true if this type key is retired. Retired type keys will not show up in the UI.
* @return true if this type key is retired false if not.
*/
public boolean isRetired() {
return _typeKeyImplManager.getTypeKeyImpl().isRetired();
}
private java.lang.Object readObject(java.io.ObjectInputStream in) throws java.io.InvalidObjectException {
throw new java.io.InvalidObjectException("Proxy required");
}
public java.lang.String toString() {
return getDisplayName();
}
private java.lang.Object writeReplace() {
return new com.guidewire.commons.typelist.TypeKeySerializationProxy(this);
}
static {
com.guidewire._generated.typekey.RatingStyleInternalAccess.FRIEND_ACCESSOR.init(new com.guidewire.pl.persistence.code.TypeKeyFriendAccess<typekey.RatingStyle>() {
public void clearCache(typekey.RatingStyle typeKey) {
typeKey._typeKeyImplManager.resetTypeKeyImpl();
}
public com.guidewire.commons.entity.type2.TypeKeyInternal getInternalInterface(typekey.RatingStyle typeKey) {
return typeKey._typeKeyImplManager.getTypeKeyImpl();
}
public typekey.RatingStyle newInstance(java.lang.String code) {
return new typekey.RatingStyle(code);
}
});
}
}
|
[
"ashwini@cruxxtechnologies.com"
] |
ashwini@cruxxtechnologies.com
|
2a449dfd9249fcd20bf6ebb16b92e1e8ac0cbb7f
|
be28a7b64a4030f74233a79ebeba310e23fe2c3a
|
/generated-tests/qmosa/tests/s1007/92_jcvi-javacommon/evosuite-tests/org/jcvi/jillion/core/util/FileIterator_ESTest_scaffolding.java
|
cce64dade7d65ca0af9ac057749e357558d3d868
|
[
"MIT"
] |
permissive
|
blindsubmissions/icse19replication
|
664e670f9cfcf9273d4b5eb332562a083e179a5f
|
42a7c172efa86d7d01f7e74b58612cc255c6eb0f
|
refs/heads/master
| 2020-03-27T06:12:34.631952
| 2018-08-25T11:19:56
| 2018-08-25T11:19:56
| 146,074,648
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,111
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Aug 24 11:33:44 GMT 2018
*/
package org.jcvi.jillion.core.util;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class FileIterator_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.jcvi.jillion.core.util.FileIterator";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("file.encoding", "UTF-8");
java.lang.System.setProperty("java.awt.headless", "true");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
java.lang.System.setProperty("user.country", "US");
java.lang.System.setProperty("user.dir", "/home/ubuntu/evosuite_readability_gen/projects/92_jcvi-javacommon");
java.lang.System.setProperty("user.home", "/home/ubuntu");
java.lang.System.setProperty("user.language", "en");
java.lang.System.setProperty("user.name", "ubuntu");
java.lang.System.setProperty("user.timezone", "Etc/UTC");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(FileIterator_ESTest_scaffolding.class.getClassLoader() ,
"org.jcvi.jillion.core.util.FIFOQueue",
"org.jcvi.jillion.core.util.FileIterator$NonRecursiveFileIterator",
"org.jcvi.jillion.core.util.FileIterator$DepthFirstFileIterator",
"org.jcvi.jillion.core.util.iter.StreamingIterator",
"org.jcvi.jillion.core.util.FileIterator$NullFileFilter",
"org.jcvi.jillion.core.util.iter.PeekableStreamingIterator",
"org.jcvi.jillion.core.util.iter.PeekableIterator",
"org.jcvi.jillion.core.util.FileIterator$FileNameComparator",
"org.jcvi.jillion.internal.core.util.AbstractFOQueue",
"org.jcvi.jillion.core.util.Builder",
"org.jcvi.jillion.core.util.MultipleFileFilter",
"org.jcvi.jillion.core.util.FileIterator$RecursiveFileIterator$DirectoryFileFilter",
"org.jcvi.jillion.core.util.FileIterator$DepthFirstFileIteratorBuilder",
"org.jcvi.jillion.core.util.FileIterator",
"org.jcvi.jillion.core.util.FileIterator$BreadthFirstFileIterator",
"org.jcvi.jillion.core.util.LIFOQueue",
"org.jcvi.jillion.core.util.FileIterator$BreadthFirstFileIteratorBuilder",
"org.jcvi.jillion.core.util.FileIterator$NonRecursiveFileIteratorBuilder",
"org.jcvi.jillion.core.util.FileIterator$1",
"org.jcvi.jillion.core.util.iter.IteratorUtil",
"org.jcvi.jillion.core.util.FileIterator$RecursiveFileIterator",
"org.jcvi.jillion.core.util.iter.IteratorUtil$EmptyIterator",
"org.jcvi.jillion.core.util.FileIterator$NonHiddenFileFilter",
"org.jcvi.jillion.core.util.FileIterator$FileIteratorBuilder",
"org.jcvi.jillion.core.util.FileIterator$NonDirectoryFileFilter"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(FileIterator_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.jcvi.jillion.core.util.FileIterator$NonDirectoryFileFilter",
"org.jcvi.jillion.core.util.FileIterator$NonHiddenFileFilter",
"org.jcvi.jillion.core.util.FileIterator$NullFileFilter",
"org.jcvi.jillion.core.util.FileIterator$FileNameComparator",
"org.jcvi.jillion.core.util.FileIterator",
"org.jcvi.jillion.core.util.FileIterator$FileIteratorBuilder",
"org.jcvi.jillion.core.util.FileIterator$DepthFirstFileIteratorBuilder",
"org.jcvi.jillion.core.util.FileIterator$BreadthFirstFileIteratorBuilder",
"org.jcvi.jillion.core.util.FileIterator$NonRecursiveFileIteratorBuilder",
"org.jcvi.jillion.core.util.iter.IteratorUtil$EmptyIterator",
"org.jcvi.jillion.core.util.FileIterator$NonRecursiveFileIterator",
"org.jcvi.jillion.core.util.MultipleFileFilter",
"org.jcvi.jillion.core.util.FileIterator$RecursiveFileIterator$DirectoryFileFilter",
"org.jcvi.jillion.core.util.FileIterator$RecursiveFileIterator",
"org.jcvi.jillion.core.util.FileIterator$BreadthFirstFileIterator",
"org.jcvi.jillion.internal.core.util.AbstractFOQueue",
"org.jcvi.jillion.core.util.FIFOQueue",
"org.jcvi.jillion.core.util.FileIterator$DepthFirstFileIterator",
"org.jcvi.jillion.core.util.LIFOQueue",
"org.jcvi.jillion.core.util.iter.IteratorUtil"
);
}
}
|
[
"my.submission.blind@gmail.com"
] |
my.submission.blind@gmail.com
|
f287a630c02aea4c5cd49077dedd0f34d68c3169
|
a41dff2422d6eea32514e27609166a7c628bff74
|
/Sort/src/IntersectionOfTwoArraysII.java
|
06c9b4aef23dfbab2db6d17e067962b7d34e721f
|
[] |
no_license
|
zachaxy/LeetCode
|
7eb9993e678107ab3b5447e8c522340e544c599c
|
8d4150401cdaa99755913e883f17f6fe79379192
|
refs/heads/master
| 2021-01-18T17:50:06.826624
| 2016-11-07T11:44:49
| 2016-11-07T11:44:49
| 68,922,471
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,132
|
java
|
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* Author: zhangxin
* Time: 2016/10/21.
* Desc:
* Given two arrays, write a function to compute their intersection.
* <p>
* Example:
* Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].
* <p>
* Note:
* Each element in the result should appear as many times as it shows in both arrays.
* The result can be in any order.
* Follow up:
* What if the given array is already sorted? How would you optimize your algorithm?
* What if nums1's size is small compared to nums2's size? Which algorithm is better?
* What if elements of nums2 are stored on disk, and the memory is limited such that you cannot load all elements into the memory at once?
*/
public class IntersectionOfTwoArraysII {
//总耗时8ms;该方法中一个蹩脚的问题是,不知道公共元素有多少个,所以也无法确定数组个数,只能先用list,然后在转换
public int[] intersect(int[] nums1, int[] nums2) {
Arrays.sort(nums1);
Arrays.sort(nums2);
List<Integer> list = new ArrayList<Integer>();
int i = 0, j = 0;
int len1 = nums1.length;
int len2 = nums2.length;
while (i < len1 && j < len2) {
if (nums1[i] == nums2[j]) {
list.add(nums1[i]);
i++;
j++;
} else if (nums1[i] > nums2[j]) {
if (nums1[i] > nums2[len2 - 1]) break; //(1)
j++;
} else {
if (nums2[j] > nums1[len1 - 1]) break; //(2)
i++;
}
}
int[] result = new int[list.size()];
for (int k = 0; k < list.size(); k++) {
result[k] = list.get(k);
}
return result;
}
//添加了(1)(2)的判断后,从8ms替身到了5ms
public static void main(String[] args) {
int[] nums1 = {1, 2, 2, 1};
int[] nums2 = {2, 2};
int[] r = new IntersectionOfTwoArraysII().intersect(nums1, nums2);
for (int k = 0; k < r.length; k++) {
System.out.println(r[k]);
}
}
}
|
[
"zachaxy@163.com"
] |
zachaxy@163.com
|
7bf5a7f45572717acf870ea55b4dea9cec003906
|
bceba483c2d1831f0262931b7fc72d5c75954e18
|
/src/qubed/corelogic/TITLEADDITIONALEXCEPTIONS.java
|
4563d2770521cf580202b57c71d169d861f6f411
|
[] |
no_license
|
Nigel-Qubed/credit-services
|
6e2acfdb936ab831a986fabeb6cefa74f03c672c
|
21402c6d4328c93387fd8baf0efd8972442d2174
|
refs/heads/master
| 2022-12-01T02:36:57.495363
| 2020-08-10T17:26:07
| 2020-08-10T17:26:07
| 285,552,565
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,276
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2020.08.05 at 04:46:29 AM CAT
//
package qubed.corelogic;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
/**
* The container for all the TITLE_ADDITIONAL_EXCEPTION records clarifying coverage included in the title product.
*
* <p>Java class for TITLE_ADDITIONAL_EXCEPTIONS complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="TITLE_ADDITIONAL_EXCEPTIONS">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="TITLE_ADDITIONAL_EXCEPTION" type="{http://www.mismo.org/residential/2009/schemas}TITLE_ADDITIONAL_EXCEPTION" maxOccurs="unbounded" minOccurs="0"/>
* <element name="EXTENSION" type="{http://www.mismo.org/residential/2009/schemas}TITLE_ADDITIONAL_EXCEPTIONS_EXTENSION" minOccurs="0"/>
* </sequence>
* <attGroup ref="{http://www.mismo.org/residential/2009/schemas}AttributeExtension"/>
* <attGroup ref="{http://www.w3.org/1999/xlink}MISMOresourceLink"/>
* <anyAttribute processContents='lax'/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TITLE_ADDITIONAL_EXCEPTIONS", propOrder = {
"titleadditionalexception",
"extension"
})
public class TITLEADDITIONALEXCEPTIONS {
@XmlElement(name = "TITLE_ADDITIONAL_EXCEPTION")
protected List<TITLEADDITIONALEXCEPTION> titleadditionalexception;
@XmlElement(name = "EXTENSION")
protected TITLEADDITIONALEXCEPTIONSEXTENSION extension;
@XmlAttribute(name = "label", namespace = "http://www.w3.org/1999/xlink")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
protected String label;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the titleadditionalexception 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 titleadditionalexception property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getTITLEADDITIONALEXCEPTION().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link TITLEADDITIONALEXCEPTION }
*
*
*/
public List<TITLEADDITIONALEXCEPTION> getTITLEADDITIONALEXCEPTION() {
if (titleadditionalexception == null) {
titleadditionalexception = new ArrayList<TITLEADDITIONALEXCEPTION>();
}
return this.titleadditionalexception;
}
/**
* Gets the value of the extension property.
*
* @return
* possible object is
* {@link TITLEADDITIONALEXCEPTIONSEXTENSION }
*
*/
public TITLEADDITIONALEXCEPTIONSEXTENSION getEXTENSION() {
return extension;
}
/**
* Sets the value of the extension property.
*
* @param value
* allowed object is
* {@link TITLEADDITIONALEXCEPTIONSEXTENSION }
*
*/
public void setEXTENSION(TITLEADDITIONALEXCEPTIONSEXTENSION value) {
this.extension = value;
}
/**
* Gets the value of the label property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLabel() {
return label;
}
/**
* Sets the value of the label property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLabel(String value) {
this.label = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}
|
[
"vectorcrael@yahoo.com"
] |
vectorcrael@yahoo.com
|
927f62d3a3122c41f6241c50149584930d4b66da
|
22ae2eff1647df337a18a870f73c697f6729ac4d
|
/learn-note-springboot2-datesource/learn-note-springboot2-oracle-mybatisplus-druid-page-single/src/main/java/cn/center/service/TestService2.java
|
1a4bd1fedb5b21c05339dc55eaf6894f0a219043
|
[] |
no_license
|
Steve133/learn-note-springboot2
|
9a3c6635196ba14246ff395299e376884fc75633
|
3dd52dde26080e9e828470531c22f9f6b193eb95
|
refs/heads/master
| 2022-12-10T18:58:56.346348
| 2019-12-12T14:30:20
| 2019-12-12T14:30:20
| 226,075,619
| 0
| 0
| null | 2022-12-06T00:44:43
| 2019-12-05T10:26:57
|
Java
|
UTF-8
|
Java
| false
| false
| 177
|
java
|
package cn.center.service;
public interface TestService2 {
void testSelect() throws Exception;
void testSelectPage() throws Exception;
void testRoll() throws Exception;
}
|
[
"810203590@qq.com"
] |
810203590@qq.com
|
f185673b63a35531095d5f31e63fce05e5a2919d
|
449cc92656d1f55bd7e58692657cd24792847353
|
/weixin-service/src/main/java/com/lj/business/weixin/dto/DelWxFriendsInfo.java
|
9d6481e23d20bee1cc2f3b1502b00a98db887388
|
[] |
no_license
|
cansou/HLM
|
f80ae1c71d0ce8ead95c00044a318796820a8c1e
|
69d859700bfc074b5948b6f2c11734ea2e030327
|
refs/heads/master
| 2022-08-27T16:40:17.206566
| 2019-12-18T06:48:10
| 2019-12-18T06:48:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 681
|
java
|
package com.lj.business.weixin.dto;
/**
* Copyright © 2017-2020 All rights reserved.
*
* Licensed under the 深圳市扬恩科技 License, Version 1.0 (the "License");
*
*/
import java.io.Serializable;
public class DelWxFriendsInfo implements Serializable {
/**
*
*/
private static final long serialVersionUID = -3654612046965029430L;
/**
* .
*/
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("DelWxFriendsInfo [id=").append(id).append("]");
return builder.toString();
}
}
|
[
"37724558+wo510751575@users.noreply.github.com"
] |
37724558+wo510751575@users.noreply.github.com
|
78f21a7fb89a05c9a1ca43cd7cf780630694b791
|
1ac3bd7f79b1767a73c6f37964373ed350011086
|
/src/main/java/io/proleap/vb6/asg/metamodel/impl/LiteralImpl.java
|
bb24798979caf1d8fe7b75e00bc3050629119aad
|
[
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
fossamagna/vb6parser
|
c7f1cb1a5d5a76520f76ab56b02ee3af99272372
|
6395d8c11d486b5da1e21e8d4dcd021ebd3a9df5
|
refs/heads/master
| 2023-04-06T10:57:17.341891
| 2017-09-19T08:51:40
| 2017-09-19T08:51:40
| 87,297,924
| 0
| 0
|
BSD-3-Clause
| 2023-04-04T00:16:49
| 2017-04-05T10:40:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,193
|
java
|
/*
* Copyright (C) 2016, Ulrich Wolffgang <u.wol@wwu.de>
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD 3-clause license. See the LICENSE file for details.
*/
package io.proleap.vb6.asg.metamodel.impl;
import io.proleap.vb6.VisualBasic6Parser.LiteralContext;
import io.proleap.vb6.asg.metamodel.Literal;
import io.proleap.vb6.asg.metamodel.Module;
import io.proleap.vb6.asg.metamodel.Scope;
import io.proleap.vb6.asg.metamodel.type.Type;
public class LiteralImpl extends ScopedElementImpl implements Literal {
protected final LiteralContext ctx;
protected final Type type;
protected final String value;
public LiteralImpl(final Type type, final String value, final Module module, final Scope scope,
final LiteralContext ctx) {
super(module.getProgram(), module, scope, ctx);
this.ctx = ctx;
this.type = type;
this.value = value;
}
@Override
public LiteralContext getCtx() {
return ctx;
}
@Override
public Type getType() {
return type;
}
@Override
public String getValue() {
return value;
}
@Override
public String toString() {
return super.toString() + ", value=[" + value + "]";
}
}
|
[
"u.wol@wwu.de"
] |
u.wol@wwu.de
|
53577283bce4a89593c7065285ecaa420d8d0636
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.minihd.qq/assets/exlibs.1.jar/classes.jar/ipa.java
|
6209034454c9204d7b78b0fb0a8f324c3d204851
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 1,716
|
java
|
import com.tencent.mobileqq.filemanager.activity.localfile.QfileLocalFilePicTabView;
import com.tencent.mobileqq.filemanager.data.FileInfo;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Set;
public class ipa
implements Runnable
{
public ipa(QfileLocalFilePicTabView paramQfileLocalFilePicTabView) {}
public void run()
{
LinkedHashMap localLinkedHashMap = new LinkedHashMap();
localLinkedHashMap.put("已下载图片", new ArrayList());
Iterator localIterator = this.a.a.iterator();
while (localIterator.hasNext())
{
FileInfo localFileInfo = (FileInfo)localIterator.next();
String str = localFileInfo.a();
if ((str != null) && (str.length() != 0))
{
localObject = str;
if (!str.equalsIgnoreCase("QQfile_recv")) {}
}
else
{
localObject = "已下载图片";
}
if (!localLinkedHashMap.containsKey(localObject)) {
localLinkedHashMap.put(localObject, new ArrayList());
}
((List)localLinkedHashMap.get(localObject)).add(localFileInfo);
}
Object localObject = localLinkedHashMap.keySet().iterator();
while (((Iterator)localObject).hasNext()) {
if (((List)localLinkedHashMap.get((String)((Iterator)localObject).next())).size() == 0) {
((Iterator)localObject).remove();
}
}
QfileLocalFilePicTabView.a(this.a, new ipb(this, localLinkedHashMap));
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.1.jar\classes.jar
* Qualified Name: ipa
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
e4da7970f39a5359572cd95658059b50b0d848bb
|
c3101515ddde8a6e6ddc4294a4739256d1600df0
|
/GeneralApp__2.20_1.0(1)_source_from_JADX/sources/androidx/preference/PreferenceDialogFragment.java
|
a164c43ac628537502fac2a1a0f40ee2123f2b06
|
[] |
no_license
|
Aelshazly/Carty
|
b56fdb1be58a6d12f26d51b46f435ea4a73c8168
|
d13f3a4ad80e8a7d0ed1c6a5720efb4d1ca721ee
|
refs/heads/master
| 2022-11-14T23:29:53.547694
| 2020-07-08T19:23:39
| 2020-07-08T19:23:39
| 278,175,183
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,582
|
java
|
package androidx.preference;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import androidx.preference.DialogPreference.TargetFragment;
@Deprecated
public abstract class PreferenceDialogFragment extends DialogFragment implements OnClickListener {
@Deprecated
protected static final String ARG_KEY = "key";
private static final String SAVE_STATE_ICON = "PreferenceDialogFragment.icon";
private static final String SAVE_STATE_LAYOUT = "PreferenceDialogFragment.layout";
private static final String SAVE_STATE_MESSAGE = "PreferenceDialogFragment.message";
private static final String SAVE_STATE_NEGATIVE_TEXT = "PreferenceDialogFragment.negativeText";
private static final String SAVE_STATE_POSITIVE_TEXT = "PreferenceDialogFragment.positiveText";
private static final String SAVE_STATE_TITLE = "PreferenceDialogFragment.title";
private BitmapDrawable mDialogIcon;
private int mDialogLayoutRes;
private CharSequence mDialogMessage;
private CharSequence mDialogTitle;
private CharSequence mNegativeButtonText;
private CharSequence mPositiveButtonText;
private DialogPreference mPreference;
private int mWhichButtonClicked;
@Deprecated
public abstract void onDialogClosed(boolean z);
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Fragment rawFragment = getTargetFragment();
if (rawFragment instanceof TargetFragment) {
TargetFragment fragment = (TargetFragment) rawFragment;
String key = getArguments().getString(ARG_KEY);
if (savedInstanceState == null) {
this.mPreference = (DialogPreference) fragment.findPreference(key);
this.mDialogTitle = this.mPreference.getDialogTitle();
this.mPositiveButtonText = this.mPreference.getPositiveButtonText();
this.mNegativeButtonText = this.mPreference.getNegativeButtonText();
this.mDialogMessage = this.mPreference.getDialogMessage();
this.mDialogLayoutRes = this.mPreference.getDialogLayoutResource();
Drawable icon = this.mPreference.getDialogIcon();
if (icon == null || (icon instanceof BitmapDrawable)) {
this.mDialogIcon = (BitmapDrawable) icon;
return;
}
Bitmap bitmap = Bitmap.createBitmap(icon.getIntrinsicWidth(), icon.getIntrinsicHeight(), Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
icon.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
icon.draw(canvas);
this.mDialogIcon = new BitmapDrawable(getResources(), bitmap);
return;
}
this.mDialogTitle = savedInstanceState.getCharSequence(SAVE_STATE_TITLE);
this.mPositiveButtonText = savedInstanceState.getCharSequence(SAVE_STATE_POSITIVE_TEXT);
this.mNegativeButtonText = savedInstanceState.getCharSequence(SAVE_STATE_NEGATIVE_TEXT);
this.mDialogMessage = savedInstanceState.getCharSequence(SAVE_STATE_MESSAGE);
this.mDialogLayoutRes = savedInstanceState.getInt(SAVE_STATE_LAYOUT, 0);
Bitmap bitmap2 = (Bitmap) savedInstanceState.getParcelable(SAVE_STATE_ICON);
if (bitmap2 != null) {
this.mDialogIcon = new BitmapDrawable(getResources(), bitmap2);
return;
}
return;
}
throw new IllegalStateException("Target fragment must implement TargetFragment interface");
}
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putCharSequence(SAVE_STATE_TITLE, this.mDialogTitle);
outState.putCharSequence(SAVE_STATE_POSITIVE_TEXT, this.mPositiveButtonText);
outState.putCharSequence(SAVE_STATE_NEGATIVE_TEXT, this.mNegativeButtonText);
outState.putCharSequence(SAVE_STATE_MESSAGE, this.mDialogMessage);
outState.putInt(SAVE_STATE_LAYOUT, this.mDialogLayoutRes);
BitmapDrawable bitmapDrawable = this.mDialogIcon;
if (bitmapDrawable != null) {
outState.putParcelable(SAVE_STATE_ICON, bitmapDrawable.getBitmap());
}
}
public Dialog onCreateDialog(Bundle savedInstanceState) {
Context context = getActivity();
this.mWhichButtonClicked = -2;
Builder builder = new Builder(context).setTitle(this.mDialogTitle).setIcon(this.mDialogIcon).setPositiveButton(this.mPositiveButtonText, this).setNegativeButton(this.mNegativeButtonText, this);
View contentView = onCreateDialogView(context);
if (contentView != null) {
onBindDialogView(contentView);
builder.setView(contentView);
} else {
builder.setMessage(this.mDialogMessage);
}
onPrepareDialogBuilder(builder);
Dialog dialog = builder.create();
if (needInputMethod()) {
requestInputMethod(dialog);
}
return dialog;
}
@Deprecated
public DialogPreference getPreference() {
if (this.mPreference == null) {
this.mPreference = (DialogPreference) ((TargetFragment) getTargetFragment()).findPreference(getArguments().getString(ARG_KEY));
}
return this.mPreference;
}
/* access modifiers changed from: protected */
@Deprecated
public void onPrepareDialogBuilder(Builder builder) {
}
/* access modifiers changed from: protected */
public boolean needInputMethod() {
return false;
}
private void requestInputMethod(Dialog dialog) {
dialog.getWindow().setSoftInputMode(5);
}
/* access modifiers changed from: protected */
@Deprecated
public View onCreateDialogView(Context context) {
int resId = this.mDialogLayoutRes;
if (resId == 0) {
return null;
}
return LayoutInflater.from(context).inflate(resId, null);
}
/* access modifiers changed from: protected */
@Deprecated
public void onBindDialogView(View view) {
View dialogMessageView = view.findViewById(16908299);
if (dialogMessageView != null) {
CharSequence message = this.mDialogMessage;
int newVisibility = 8;
if (!TextUtils.isEmpty(message)) {
if (dialogMessageView instanceof TextView) {
((TextView) dialogMessageView).setText(message);
}
newVisibility = 0;
}
if (dialogMessageView.getVisibility() != newVisibility) {
dialogMessageView.setVisibility(newVisibility);
}
}
}
@Deprecated
public void onClick(DialogInterface dialog, int which) {
this.mWhichButtonClicked = which;
}
public void onDismiss(DialogInterface dialog) {
super.onDismiss(dialog);
onDialogClosed(this.mWhichButtonClicked == -1);
}
}
|
[
"aelshazly@engineer.com"
] |
aelshazly@engineer.com
|
342780ee43379e20df3a37edbbed74327793d072
|
ea38db0eaecefcbf4f7f85056eefe2e06f015dc4
|
/java-basic/src/main/java/bitcamp/java100/ch13/ex9/EmptyStringException.java
|
8e7166f94f52f844264b1a4ad14ba99fd7d3a88a
|
[] |
no_license
|
tjr7788/bitcamp
|
5b8dfff352a812719b2013a8e59c72f271e3e758
|
89cfab1e2cc1de403a04d033db431b29dde7e361
|
refs/heads/master
| 2021-09-05T05:17:05.620145
| 2018-01-24T09:53:16
| 2018-01-24T09:53:16
| 104,423,411
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 246
|
java
|
package bitcamp.java100.ch13.ex9;
public class EmptyStringException extends Exception {
public EmptyStringException() {
super();
}
public EmptyStringException(String message) {
super(message);
}
}
|
[
"sig4213@naver.com"
] |
sig4213@naver.com
|
d905a6b16b784cef1cac7a946586949ea2dcbcf9
|
5bb4a4b0364ec05ffb422d8b2e76374e81c8c979
|
/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitServiceProviderProperties.java
|
f2f9495ac2966bf1de296fac3ae4e573d0bd5bb2
|
[
"MIT",
"LicenseRef-scancode-generic-cla",
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-or-later",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
FabianMeiswinkel/azure-sdk-for-java
|
bd14579af2f7bc63e5c27c319e2653db990056f1
|
41d99a9945a527b6d3cc7e1366e1d9696941dbe3
|
refs/heads/main
| 2023-08-04T20:38:27.012783
| 2020-07-15T21:56:57
| 2020-07-15T21:56:57
| 251,590,939
| 3
| 1
|
MIT
| 2023-09-02T00:50:23
| 2020-03-31T12:05:12
|
Java
|
UTF-8
|
Java
| false
| false
| 2,582
|
java
|
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.network.v2019_09_01;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Contains ServiceProviderProperties in an ExpressRouteCircuit.
*/
public class ExpressRouteCircuitServiceProviderProperties {
/**
* The serviceProviderName.
*/
@JsonProperty(value = "serviceProviderName")
private String serviceProviderName;
/**
* The peering location.
*/
@JsonProperty(value = "peeringLocation")
private String peeringLocation;
/**
* The BandwidthInMbps.
*/
@JsonProperty(value = "bandwidthInMbps")
private Integer bandwidthInMbps;
/**
* Get the serviceProviderName.
*
* @return the serviceProviderName value
*/
public String serviceProviderName() {
return this.serviceProviderName;
}
/**
* Set the serviceProviderName.
*
* @param serviceProviderName the serviceProviderName value to set
* @return the ExpressRouteCircuitServiceProviderProperties object itself.
*/
public ExpressRouteCircuitServiceProviderProperties withServiceProviderName(String serviceProviderName) {
this.serviceProviderName = serviceProviderName;
return this;
}
/**
* Get the peering location.
*
* @return the peeringLocation value
*/
public String peeringLocation() {
return this.peeringLocation;
}
/**
* Set the peering location.
*
* @param peeringLocation the peeringLocation value to set
* @return the ExpressRouteCircuitServiceProviderProperties object itself.
*/
public ExpressRouteCircuitServiceProviderProperties withPeeringLocation(String peeringLocation) {
this.peeringLocation = peeringLocation;
return this;
}
/**
* Get the BandwidthInMbps.
*
* @return the bandwidthInMbps value
*/
public Integer bandwidthInMbps() {
return this.bandwidthInMbps;
}
/**
* Set the BandwidthInMbps.
*
* @param bandwidthInMbps the bandwidthInMbps value to set
* @return the ExpressRouteCircuitServiceProviderProperties object itself.
*/
public ExpressRouteCircuitServiceProviderProperties withBandwidthInMbps(Integer bandwidthInMbps) {
this.bandwidthInMbps = bandwidthInMbps;
return this;
}
}
|
[
"yaozheng@microsoft.com"
] |
yaozheng@microsoft.com
|
e2303b646bdfa29abca6e3b3bf6c37fdcdafebfc
|
84892ced062f8ebe5419e2676f304c1e139cfc9c
|
/src/main/java/com/training/eazyrides/userprofile/web/rest/errors/CustomParameterizedException.java
|
c3f864b8582ab13c3e851cce3e05abcfa7ddbc8d
|
[] |
no_license
|
NatkhatNishi/EazyRidesenduserprofile
|
70f866625c392229d6fd84257e1d2fd21937303c
|
714d7f846d9e3e8cfda052870f2f763610d74d60
|
refs/heads/master
| 2020-03-19T13:42:38.111656
| 2018-06-08T08:40:58
| 2018-06-08T08:40:58
| 136,591,664
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,752
|
java
|
package com.training.eazyrides.userprofile.web.rest.errors;
import org.zalando.problem.AbstractThrowableProblem;
import java.util.HashMap;
import java.util.Map;
import static org.zalando.problem.Status.BAD_REQUEST;
/**
* Custom, parameterized exception, which can be translated on the client side.
* For example:
*
* <pre>
* throw new CustomParameterizedException("myCustomError", "hello", "world");
* </pre>
*
* Can be translated with:
*
* <pre>
* "error.myCustomError" : "The server says {{param0}} to {{param1}}"
* </pre>
*/
public class CustomParameterizedException extends AbstractThrowableProblem {
private static final long serialVersionUID = 1L;
private static final String PARAM = "param";
public CustomParameterizedException(String message, String... params) {
this(message, toParamMap(params));
}
public CustomParameterizedException(String message, Map<String, Object> paramMap) {
super(ErrorConstants.PARAMETERIZED_TYPE, "Parameterized Exception", BAD_REQUEST, null, null, null, toProblemParameters(message, paramMap));
}
public static Map<String, Object> toParamMap(String... params) {
Map<String, Object> paramMap = new HashMap<>();
if (params != null && params.length > 0) {
for (int i = 0; i < params.length; i++) {
paramMap.put(PARAM + i, params[i]);
}
}
return paramMap;
}
public static Map<String, Object> toProblemParameters(String message, Map<String, Object> paramMap) {
Map<String, Object> parameters = new HashMap<>();
parameters.put("message", message);
parameters.put("params", paramMap);
return parameters;
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
bc59ee69cc71f58c9e45ef5f735ba2205521a95d
|
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
|
/large/module2249_public/tests/unittests/src/java/module2249_public_tests_unittests/a/Foo1.java
|
8079b6367c6860cc145c982323755818b83c63f1
|
[
"BSD-3-Clause"
] |
permissive
|
salesforce/bazel-ls-demo-project
|
5cc6ef749d65d6626080f3a94239b6a509ef145a
|
948ed278f87338edd7e40af68b8690ae4f73ebf0
|
refs/heads/master
| 2023-06-24T08:06:06.084651
| 2023-03-14T11:54:29
| 2023-03-14T11:54:29
| 241,489,944
| 0
| 5
|
BSD-3-Clause
| 2023-03-27T11:28:14
| 2020-02-18T23:30:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,704
|
java
|
package module2249_public_tests_unittests.a;
import javax.lang.model.*;
import javax.management.*;
import javax.naming.directory.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see java.nio.file.FileStore
* @see java.sql.Array
* @see java.util.logging.Filter
*/
@SuppressWarnings("all")
public abstract class Foo1<L> extends module2249_public_tests_unittests.a.Foo0<L> implements module2249_public_tests_unittests.a.IFoo1<L> {
java.util.zip.Deflater f0 = null;
javax.annotation.processing.Completion f1 = null;
javax.lang.model.AnnotatedConstruct f2 = null;
public L element;
public static Foo1 instance;
public static Foo1 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return module2249_public_tests_unittests.a.Foo0.create(input);
}
public String getName() {
return module2249_public_tests_unittests.a.Foo0.getInstance().getName();
}
public void setName(String string) {
module2249_public_tests_unittests.a.Foo0.getInstance().setName(getName());
return;
}
public L get() {
return (L)module2249_public_tests_unittests.a.Foo0.getInstance().get();
}
public void set(Object element) {
this.element = (L)element;
module2249_public_tests_unittests.a.Foo0.getInstance().set(this.element);
}
public L call() throws Exception {
return (L)module2249_public_tests_unittests.a.Foo0.getInstance().call();
}
}
|
[
"gwagenknecht@salesforce.com"
] |
gwagenknecht@salesforce.com
|
9f994070c869910a2eff58eb0aa29286759937ad
|
9acd0cb19c1cf4485a1516eb04b9844c3600c879
|
/dada/sport-admin/trunk/src/main/java/com/youyisi/admin/infrastructure/persist/gift/MybatisGiftRepositoryImpl.java
|
ee41e5a7b31448b1ff80f33cfac1249a6a64201e
|
[] |
no_license
|
kevinkerry/dada
|
e8156f0dc57d2745334bb13d1b9010bf64f97a21
|
ff6a8d0be3dbfc61ca72a2cac22b1cb57f80bce7
|
refs/heads/master
| 2021-04-26T23:54:10.877546
| 2017-02-21T05:36:07
| 2017-02-21T05:36:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 432
|
java
|
package com.youyisi.admin.infrastructure.persist.gift;
import org.springframework.stereotype.Repository;
import com.youyisi.admin.domain.gift.Gift;
import com.youyisi.admin.domain.gift.GiftRepository;
import com.youyisi.mybatis.MybatisOperations;
/**
* @author yinjunfeng
* @time 2015-08-06
*/
@Repository
public class MybatisGiftRepositoryImpl extends MybatisOperations<Long, Gift> implements GiftRepository {
}
|
[
"804745459@qq.com"
] |
804745459@qq.com
|
4808b7a756111aa49ac2af98809e88598c5cb3d5
|
a03cfaa12d8dcdec627cf242de07f949ff4194d1
|
/bud-mall-server/src/main/java/net/scode/budmall/server/dto/adminUser/AdminUserUpdateDto.java
|
b1272210800a9b52b8fe4b41c97988f95e316090
|
[] |
no_license
|
734635746/bud-mall
|
53fa573b6040e00c1c691a2b95c483c5973ad93a
|
bad4e5d22f1be4ba8b87ac4ac7c3688e62d053b5
|
refs/heads/master
| 2022-12-27T10:00:09.603554
| 2020-05-24T12:24:40
| 2020-05-24T12:24:40
| 302,664,437
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,560
|
java
|
package net.scode.budmall.server.dto.adminUser;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.Min;
import javax.validation.constraints.Pattern;
/**
* 管理员更新信息Dto
*
* @author liuyoubin
* @since 2020/4/10 - 20:42
*/
@Data
@Accessors(chain = true)
public class AdminUserUpdateDto {
/**
* 自增id
*/
//更新时触发校验,id不能为默认值0(最小为1)
@Min(value = 1, message = "Id不能为空!")
@ApiModelProperty(value = "自增id", dataType = "int", required = true)
private int id;
/**
* 账号
*/
@ApiModelProperty(value = "账号", dataType = "String", required = true)
@Pattern(regexp = "^[A-Za-z0-9]{4,20}$", message = "账号只能由字母、数字构成,最少4位最高20位!")
private String account;
/**
* 头像图片url地址
*/
@ApiModelProperty(value = "头像图片url地址", dataType = "String")
private String avatar;
/**
* 昵称
*/
@ApiModelProperty(value = "昵称", dataType = "String")
private String nickname;
/**
* 角色id
*/
@ApiModelProperty(value = "角色id", dataType = "int", required = true)
private int roleId;
/**
* 通用状态,2正常,3删除,4禁用
*/
@ApiModelProperty(value = "通用状态,2正常,3删除,4禁用", dataType = "int", required = true)
private int dataStatus;
}
|
[
"734635746@qq.com"
] |
734635746@qq.com
|
da1b60dc3e5728a166eb8130500f1745d86f8c13
|
13496701ebeafb7eb840f409d8d196f2a1dd20bf
|
/isuite-core-ui/src/main/java/gov/nwcg/isuite/core/service/DataAuditTrackingService.java
|
c9b518630dc45d31e57794a81fc1713e38e2132d
|
[] |
no_license
|
paulduong222/development
|
9a79c65e79bdf3fb35e505355e7bd66652f3817c
|
ace0e056d7e6f2f056daa3dd34b7cdbea983612b
|
refs/heads/master
| 2023-01-09T23:01:17.546717
| 2019-09-19T21:49:27
| 2019-09-19T21:49:27
| 209,649,814
| 0
| 0
| null | 2023-01-07T09:56:09
| 2019-09-19T21:15:13
|
Java
|
UTF-8
|
Java
| false
| false
| 688
|
java
|
package gov.nwcg.isuite.core.service;
import gov.nwcg.isuite.core.filter.impl.DataAuditTrackingFilterImpl;
import gov.nwcg.isuite.core.vo.DataAuditTrackingGridVo;
import gov.nwcg.isuite.core.vo.dialogue.DialogueVo;
import gov.nwcg.isuite.framework.core.service.TransactionService;
import gov.nwcg.isuite.framework.exceptions.ServiceException;
import gov.nwcg.isuite.framework.exceptions.ValidationException;
public interface DataAuditTrackingService extends TransactionService {
public DialogueVo getGrid(DialogueVo dialogueVo) throws ServiceException;
public DialogueVo getGrid(DialogueVo dialogueVo, DataAuditTrackingFilterImpl dataAuditTrackingFilter) throws ServiceException;
}
|
[
"paulduong@yahoo.com"
] |
paulduong@yahoo.com
|
3bf8e2fa14c9be1315d4c9dc9d78c6756336111c
|
f113ad399b9867a8832dc6720f9d1ef6bcd2add5
|
/springBoot/src/main/java/com/caideli/springBoot/headfirst/facade/hometheater/Projector.java
|
490545525dea0f3732c1db64d7b76ee000696f5b
|
[] |
no_license
|
caideli1/myGeneration
|
a3d761457d97f126255d804fd6ca5d91c7f08db3
|
0875cb9508f8269daf966f6148245ae9f20382e2
|
refs/heads/master
| 2023-08-03T17:04:17.201122
| 2022-06-20T02:26:36
| 2022-06-20T02:26:36
| 214,383,397
| 1
| 0
| null | 2023-07-22T18:29:13
| 2019-10-11T08:25:53
|
Java
|
UTF-8
|
Java
| false
| false
| 697
|
java
|
package com.caideli.springBoot.headfirst.facade.hometheater;
public class Projector {
String description;
DvdPlayer dvdPlayer;
public Projector(String description, DvdPlayer dvdPlayer) {
this.description = description;
this.dvdPlayer = dvdPlayer;
}
public void on() {
System.out.println(description + " on");
}
public void off() {
System.out.println(description + " off");
}
public void wideScreenMode() {
System.out.println(description + " in widescreen mode (16x9 aspect ratio)");
}
public void tvMode() {
System.out.println(description + " in tv mode (4x3 aspect ratio)");
}
public String toString() {
return description;
}
}
|
[
"deri@moneed.net"
] |
deri@moneed.net
|
19a0b611c6f0b1550ce6514c70be39e49f817659
|
87f06e39e40ad51afe673fac25c9f3305dc4ed9a
|
/wyApp/app/src/main/java/com/example/classes/Statistics.java
|
742faec160869fef18f142cc67bb96562eed0bb2
|
[] |
no_license
|
jaronho/demos_android
|
0f8024dcd608a83d5f2ddd3d64f0f7d3f0f8be2f
|
148240f550c1fcc95a66de33ebb2a836e0229c70
|
refs/heads/master
| 2021-01-19T05:05:53.339867
| 2018-11-03T09:17:34
| 2018-11-03T09:17:34
| 87,407,713
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,494
|
java
|
package com.example.classes;
public class Statistics {
private double allMoney;//总代购金额
private double allRevenue;//总代购收益
private double canCashout;//未提现
private double cashedOut;//已提现
private double cashingOut;//提现中
private double freeze;//冻结
private double todayRevenue;//今日新增代购收益
private double cashedEnter;//转入余额
public double getCashedEnter() {
return cashedEnter;
}
public void setCashedEnter(double cashedEnter) {
this.cashedEnter = cashedEnter;
}
public double getAllMoney() {
return allMoney;
}
public void setAllMoney(double allMoney) {
this.allMoney = allMoney;
}
public double getAllRevenue() {
return allRevenue;
}
public void setAllRevenue(double allRevenue) {
this.allRevenue = allRevenue;
}
public double getCanCashout() {
return canCashout;
}
public void setCanCashout(double canCashout) {
this.canCashout = canCashout;
}
public double getCashedOut() {
return cashedOut;
}
public void setCashedOut(double cashedOut) {
this.cashedOut = cashedOut;
}
public double getCashingOut() {
return cashingOut;
}
public void setCashingOut(double cashingOut) {
this.cashingOut = cashingOut;
}
public double getFreeze() {
return freeze;
}
public void setFreeze(double freeze) {
this.freeze = freeze;
}
public double getTodayRevenue() {
return todayRevenue;
}
public void setTodayRevenue(double todayRevenue) {
this.todayRevenue = todayRevenue;
}
}
|
[
"892134825@qq.com"
] |
892134825@qq.com
|
f5ceadf6da5b5cd991f650470bdbf801e80dc5c9
|
3297eb23cfd8fb83479dc4667050d3c9b30493ef
|
/Selenide-Junit/src/main/java/org/automation/support/steps/StepPreProcessor.java
|
262e7b6aeafb287d8b3e454114392444f65a8b3a
|
[] |
no_license
|
sankarsp/Automation-Getting-Started
|
5434eaaa1601699ff0c0a01cb63fb94fcf083af6
|
6b920e93be5b1d187d132ecf81aed792aa0b9aed
|
refs/heads/master
| 2021-05-24T10:54:48.434951
| 2020-03-20T02:15:36
| 2020-03-20T02:15:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 213
|
java
|
package org.automation.support.steps;
/**
* Created by shantonu on 9/5/17.
*/
//this will process steps before execution
public class StepPreProcessor {
public static void processPrivateMethods(){
}
}
|
[
"shantonu_oxford@yahoo.com"
] |
shantonu_oxford@yahoo.com
|
beabe1a51aff97582c69e5c5c39931a2e16d03a5
|
2324e5edc2172027ec129af7cc174b2d86d0de20
|
/lesson014_menu_groups_order_menuinflator_xmlmenu/src/androidTest/java/com/example/lesson014_menu_groups_order_menuinflator_xmlmenu/ExampleInstrumentedTest.java
|
4c0be5a8d48970e8b4ab8cf865611a6cd499e74d
|
[] |
no_license
|
denmariupol/StartAndroid
|
4cc9503a8665b690f17d1f2d88b773f61cde68a1
|
ec9d66a07c8ab62078b547f7ac866047e9a069de
|
refs/heads/master
| 2021-01-12T06:06:27.763874
| 2017-04-05T11:26:59
| 2017-04-05T11:26:59
| 77,301,535
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 824
|
java
|
package com.example.lesson014_menu_groups_order_menuinflator_xmlmenu;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.lesson014_menu_groups_order_menuinflator_xmlmenu", appContext.getPackageName());
}
}
|
[
"denmariupol@mail.ru"
] |
denmariupol@mail.ru
|
46582d9d6e49989ec5e1aabdb2d5b1a87a29776e
|
ebdcaff90c72bf9bb7871574b25602ec22e45c35
|
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201802/cm/AdGroupCriterionService.java
|
a019b3b802ddc03fb58cc9f1e3e5a5cf29afb39c
|
[
"Apache-2.0"
] |
permissive
|
ColleenKeegan/googleads-java-lib
|
3c25ea93740b3abceb52bb0534aff66388d8abd1
|
3d38daadf66e5d9c3db220559f099fd5c5b19e70
|
refs/heads/master
| 2023-04-06T16:16:51.690975
| 2018-11-15T20:50:26
| 2018-11-15T20:50:26
| 158,986,306
| 1
| 0
|
Apache-2.0
| 2023-04-04T01:42:56
| 2018-11-25T00:56:39
|
Java
|
UTF-8
|
Java
| false
| false
| 3,603
|
java
|
// Copyright 2018 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.api.ads.adwords.jaxws.v201802.cm;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.2.9-b130926.1035
* Generated source version: 2.1
*
*/
@WebServiceClient(name = "AdGroupCriterionService", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201802", wsdlLocation = "https://adwords.google.com/api/adwords/cm/v201802/AdGroupCriterionService?wsdl")
public class AdGroupCriterionService
extends Service
{
private final static URL ADGROUPCRITERIONSERVICE_WSDL_LOCATION;
private final static WebServiceException ADGROUPCRITERIONSERVICE_EXCEPTION;
private final static QName ADGROUPCRITERIONSERVICE_QNAME = new QName("https://adwords.google.com/api/adwords/cm/v201802", "AdGroupCriterionService");
static {
URL url = null;
WebServiceException e = null;
try {
url = new URL("https://adwords.google.com/api/adwords/cm/v201802/AdGroupCriterionService?wsdl");
} catch (MalformedURLException ex) {
e = new WebServiceException(ex);
}
ADGROUPCRITERIONSERVICE_WSDL_LOCATION = url;
ADGROUPCRITERIONSERVICE_EXCEPTION = e;
}
public AdGroupCriterionService() {
super(__getWsdlLocation(), ADGROUPCRITERIONSERVICE_QNAME);
}
public AdGroupCriterionService(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
/**
*
* @return
* returns AdGroupCriterionServiceInterface
*/
@WebEndpoint(name = "AdGroupCriterionServiceInterfacePort")
public AdGroupCriterionServiceInterface getAdGroupCriterionServiceInterfacePort() {
return super.getPort(new QName("https://adwords.google.com/api/adwords/cm/v201802", "AdGroupCriterionServiceInterfacePort"), AdGroupCriterionServiceInterface.class);
}
/**
*
* @param features
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns AdGroupCriterionServiceInterface
*/
@WebEndpoint(name = "AdGroupCriterionServiceInterfacePort")
public AdGroupCriterionServiceInterface getAdGroupCriterionServiceInterfacePort(WebServiceFeature... features) {
return super.getPort(new QName("https://adwords.google.com/api/adwords/cm/v201802", "AdGroupCriterionServiceInterfacePort"), AdGroupCriterionServiceInterface.class, features);
}
private static URL __getWsdlLocation() {
if (ADGROUPCRITERIONSERVICE_EXCEPTION!= null) {
throw ADGROUPCRITERIONSERVICE_EXCEPTION;
}
return ADGROUPCRITERIONSERVICE_WSDL_LOCATION;
}
}
|
[
"jradcliff@users.noreply.github.com"
] |
jradcliff@users.noreply.github.com
|
a2d623043f6ae89c7906397bcf5c6c3f0929ac1f
|
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
|
/Corpus/ecf/1063.java
|
ed337541093bc0b9c8c98538d3318be4c40ed333
|
[
"MIT"
] |
permissive
|
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
|
d3fd21745dfddb2979e8ac262588cfdfe471899f
|
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
|
refs/heads/master
| 2020-03-31T15:52:01.005505
| 2018-10-01T23:38:50
| 2018-10-01T23:38:50
| 152,354,327
| 1
| 0
|
MIT
| 2018-10-10T02:57:02
| 2018-10-10T02:57:02
| null |
UTF-8
|
Java
| false
| false
| 6,201
|
java
|
/****************************************************************************
* Copyright (c) 2004, 2007 Composent, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Composent, Inc. - initial API and implementation
* Abner Ballardo <modlost@modlost.net> - bug 198731
*****************************************************************************/
package org.eclipse.ecf.ui.hyperlink;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.StringTokenizer;
import org.eclipse.jface.text.*;
import org.eclipse.jface.text.hyperlink.IHyperlink;
/**
* Abstract class for representing ECF URL hyperlink detectors. This class should be subclassed to
* detect URL hyperlink specifically for accessing ECF protocols. For example,
* and XMPPURLHyperlinkDetector subclass can be created to detect URLs of the form:
* <p>
* xmpp://foo@bar.com
* </p>
*/
public abstract class AbstractURLHyperlinkDetector extends org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector {
//$NON-NLS-1$
public static final String DEFAULT_DETECTABLE = "://";
//$NON-NLS-1$
public static final String DEFAULT_ENDDELIMITERS = " \t\n\r\f<>";
String[] protocols = null;
protected void setProtocols(String[] protocols) {
this.protocols = protocols;
}
protected String[] getProtocols() {
return protocols;
}
protected IRegion detectSubRegion(IRegion lineInfo, String fromLine, int offsetInLine) {
boolean startDoubleQuote = false;
int detectableOffsetInLine = 0;
int resultLength = 0;
int separatorOffset = fromLine.indexOf(DEFAULT_DETECTABLE);
while (separatorOffset >= 0) {
detectableOffsetInLine = separatorOffset;
char ch;
do {
detectableOffsetInLine--;
ch = ' ';
if (detectableOffsetInLine > -1)
ch = fromLine.charAt(detectableOffsetInLine);
startDoubleQuote = ch == '"';
} while (Character.isUnicodeIdentifierStart(ch));
detectableOffsetInLine++;
StringTokenizer tokenizer = new StringTokenizer(fromLine.substring(separatorOffset + DEFAULT_DETECTABLE.length()), DEFAULT_ENDDELIMITERS, false);
if (!tokenizer.hasMoreTokens())
return null;
resultLength = tokenizer.nextToken().length() + DEFAULT_DETECTABLE.length() + separatorOffset - detectableOffsetInLine;
if (offsetInLine >= detectableOffsetInLine && offsetInLine <= detectableOffsetInLine + resultLength)
break;
separatorOffset = fromLine.indexOf(DEFAULT_DETECTABLE, separatorOffset + 1);
}
if (separatorOffset < 0)
return null;
if (startDoubleQuote) {
int endOffset = -1;
int nextDoubleQuote = fromLine.indexOf('"', detectableOffsetInLine);
int nextWhitespace = fromLine.indexOf(' ', detectableOffsetInLine);
if (nextDoubleQuote != -1 && nextWhitespace != -1)
endOffset = Math.min(nextDoubleQuote, nextWhitespace);
else if (nextDoubleQuote != -1)
endOffset = nextDoubleQuote;
else if (nextWhitespace != -1)
endOffset = nextWhitespace;
if (endOffset != -1)
resultLength = endOffset - detectableOffsetInLine;
}
return new Region(lineInfo.getOffset() + detectableOffsetInLine, resultLength);
}
protected URI detectProtocol(String uriString) {
if (uriString == null)
return null;
URI uri = null;
try {
uri = new URI(uriString);
String protocol = uri.getScheme();
if (protocol == null || protocols == null)
return null;
for (int i = 0; i < protocols.length; i++) {
if (protocols[i].equalsIgnoreCase(protocol))
return uri;
}
} catch (URISyntaxException e) {
return null;
}
return null;
}
/**
* Create hyperlinks for detected URI.
*
* @param region
* an IRegion to show for hyperlink. Will not be
* <code>null</code>.
* @param uri
* a URI to create a hyperlink for. Will not be <code>null</code>.
* @return IHyperlink[] of hyperlinks for given URL. Return
* <code>null</code> if no hyperlinks should be displayed for
* detected URI.
*/
protected abstract IHyperlink[] createHyperLinksForURI(IRegion region, URI uri);
/* (non-Javadoc)
* @see org.eclipse.jface.text.hyperlink.IHyperlinkDetector#detectHyperlinks(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion, boolean)
*/
public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) {
if (region == null || textViewer == null)
return null;
IDocument document = textViewer.getDocument();
if (document == null)
return null;
if (protocols == null)
return null;
int offset = region.getOffset();
IRegion lineInfo;
String line;
try {
lineInfo = document.getLineInformationOfOffset(offset);
line = document.get(lineInfo.getOffset(), lineInfo.getLength());
} catch (BadLocationException ex) {
return null;
}
IRegion detectedRegion = detectSubRegion(lineInfo, line, offset - lineInfo.getOffset());
if (detectedRegion == null)
return null;
// Set and validate URL string
int detectedOffset = detectedRegion.getOffset() - lineInfo.getOffset();
URI uri = detectProtocol(line.substring(detectedOffset, detectedOffset + detectedRegion.getLength()));
if (uri == null)
return null;
return createHyperLinksForURI(detectedRegion, uri);
}
}
|
[
"masudcseku@gmail.com"
] |
masudcseku@gmail.com
|
d5921e1b7b5364bacd28d089c5297fe8a9e2621b
|
437c1569341d32996d522fbdd0fdcb4dec603359
|
/ew.levr.service.dropbox/src/main/java/com/eduworks/cruncher/service/dropbox/CruncherDropboxList.java
|
41168202904570f65687586088b1c82483976f7c
|
[
"Apache-2.0"
] |
permissive
|
Eduworks/ew
|
199b5dc23ce4408b4bbf70543b087bb1c06f70ff
|
a7954aa8e9a79f1a8330c9b45a71cad8a0da11df
|
refs/heads/master
| 2022-09-27T03:42:52.559640
| 2020-11-25T23:37:33
| 2020-11-25T23:37:33
| 58,094,996
| 2
| 2
|
Apache-2.0
| 2022-09-01T22:56:44
| 2016-05-05T01:25:18
|
Java
|
UTF-8
|
Java
| false
| false
| 2,208
|
java
|
package com.eduworks.cruncher.service.dropbox;
import com.dropbox.core.DbxApiException;
import com.dropbox.core.DbxException;
import com.dropbox.core.DbxRequestConfig;
import com.dropbox.core.v2.DbxClientV2;
import com.dropbox.core.v2.DbxTeamClientV2;
import com.dropbox.core.v2.files.ListFolderResult;
import com.dropbox.core.v2.files.Metadata;
import com.eduworks.resolver.Context;
import com.eduworks.resolver.Cruncher;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.InputStream;
import java.util.Map;
public class CruncherDropboxList extends Cruncher {
@Override
public Object resolve(Context c, Map<String, String[]> parameters, Map<String, InputStream> dataStreams) throws JSONException {
String path = getAsString("path", c, parameters, dataStreams);
String clientIdentifier = getAsString("clientIdentifier", c, parameters, dataStreams);
String access_token = getAsString("accessToken", c, parameters, dataStreams);
String userId = optAsString("userId", null, c, parameters, dataStreams);
JSONArray results = new JSONArray();
try {
// Create Dropbox client
DbxRequestConfig config = new DbxRequestConfig(clientIdentifier);
DbxClientV2 client;
if (userId == null)
client = new DbxClientV2(config, access_token);
else
client = new DbxTeamClientV2(config, access_token).asMember(userId);
ListFolderResult result = client.files().listFolder(path);
while (true) {
for (Metadata metadata : result.getEntries()) {
results.put(metadata.getPathLower());
}
if (!result.getHasMore()) {
break;
}
result = client.files().listFolderContinue(result.getCursor());
}
} catch (DbxApiException e) {
throw new RuntimeException(e);
} catch (DbxException e) {
throw new RuntimeException(e);
}
return results;
}
@Override
public String getDescription() {
return "Lists files in a directory in dropbox.";
}
@Override
public String getReturn() {
return "Array";
}
@Override
public String getAttribution() {
return ATTRIB_NONE;
}
@Override
public JSONObject getParameters() throws JSONException {
return jo("accessToken", "String", "path", "String");
}
}
|
[
"fritz.ray@eduworks.com"
] |
fritz.ray@eduworks.com
|
4aa2a3d34c58b26c5a452d643f23822997db56fa
|
5e0ec9c4ad9a381aa4605eea1f80bf41a26df28b
|
/dataset/digits/1391c9b132764431738ca64d39293c8f76de61bab8169ea5e4daf9d14441ee02bf9cf5e448136f7f58d730052ff1c3803688d9e65680d8b757ee1ffdabd4b01f/011/src/main/java/introclassJava/digits_1391c9b132764431738ca64d39293c8f76de61bab8169ea5e4daf9d14441ee02bf9cf5e448136f7f58d730052ff1c3803688d9e65680d8b757ee1ffdabd4b01f_011.java
|
664652643377fe99da6fdc1c674c3394529e0e2a
|
[] |
no_license
|
dufaux/IntroClassJava
|
8d763bf225e8c4eec8426b919309f2ae0dc40c78
|
a6ac9c2d4d71621d4841bfd308a51c3eb4511606
|
refs/heads/master
| 2021-01-14T14:18:57.699360
| 2015-09-23T15:00:46
| 2015-09-23T15:03:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,025
|
java
|
package introclassJava;
class IntObj {public int value; public IntObj(){} public IntObj(int i){value = i;}}
class FloatObj {public float value; public FloatObj(){} public FloatObj(float i){value = i;}}
class LongObj {public long value; public LongObj(){} public LongObj(long i){value = i;}}
class DoubleObj {public double value; public DoubleObj(){} public DoubleObj(double i){value = i;}}
class CharObj {public char value; public CharObj(){} public CharObj(char i){value = i;}}
public class digits_1391c9b132764431738ca64d39293c8f76de61bab8169ea5e4daf9d14441ee02bf9cf5e448136f7f58d730052ff1c3803688d9e65680d8b757ee1ffdabd4b01f_011 {
public java.util.Scanner scanner;
public String output = "";
public static void main(String[] args) throws Exception {
digits_1391c9b132764431738ca64d39293c8f76de61bab8169ea5e4daf9d14441ee02bf9cf5e448136f7f58d730052ff1c3803688d9e65680d8b757ee1ffdabd4b01f_011 mainClass = new digits_1391c9b132764431738ca64d39293c8f76de61bab8169ea5e4daf9d14441ee02bf9cf5e448136f7f58d730052ff1c3803688d9e65680d8b757ee1ffdabd4b01f_011();
String output;
if(args.length > 0) {
mainClass.scanner = new java.util.Scanner(args[0]);
} else {
mainClass.scanner = new java.util.Scanner(System.in);
}
mainClass.exec();
System.out.println(mainClass.output);
}
public void exec () throws Exception {
IntObj X = new IntObj(), Num = new IntObj(), NewNum = new IntObj();
output += (String.format("Enter an integer > "));
Num.value = scanner.nextInt();
while(Num.value != 0){
X.value = Num.value % 10;
NewNum.value = (Num.value - X.value) / 10.0;
if(Math.abs(Num.value) >= 10){
output += (String.format("%d\n", Math.abs(X.value)));
}
if(Math.abs(Num.value) < 10){
output += (String.format("%d\n", X.value));
}
Num.value = NewNum.value;
}
output += (String.format("That's all, have a nice day!\n"));
if(true)return;;
}
}
|
[
"durieuxthomas@hotmail.com"
] |
durieuxthomas@hotmail.com
|
a312ba93d54a91721d383b7107510f399b9cdb31
|
84cad0afa643c446a51123831dbcfde6c9d926a9
|
/mes-root/mes-auto-core/src/main/java/com/hengyi/japp/mes/auto/domain/data/PackageBoxType.java
|
bb0c59b8a63d1d633036b401aed27fdef66f6510
|
[] |
no_license
|
HengYi-JAPP/mes
|
280e62a92703c926a9cb5002b25365af9e498fe8
|
c34aa362df7972a5c5ed0c65a7eb1a8b24a9437b
|
refs/heads/master
| 2023-03-10T07:41:43.617327
| 2022-11-15T03:11:17
| 2022-11-15T03:11:17
| 164,339,876
| 1
| 1
| null | 2023-03-02T19:48:58
| 2019-01-06T19:46:43
|
Java
|
UTF-8
|
Java
| false
| false
| 411
|
java
|
package com.hengyi.japp.mes.auto.domain.data;
/**
* @author jzb 2018-06-22
*/
public enum PackageBoxType {
/**
* 自动打包
*/
AUTO,
/**
* 人工打包
*/
MANUAL,
/**
* 人工打包,小包装
*/
SMALL,
/**
* 人工补充唛头
*/
MANUAL_APPEND,
/**
* 车间领用
*/
WORK_FETCH,
FOREIGN,
BIG_SILK_CAR,
}
|
[
"ixtf1984@gmail.com"
] |
ixtf1984@gmail.com
|
a20f86db48b7e1fd64c09db4be3ea155a4956c87
|
2e590ef886718e01d7ec58beff00a28d7aa9a366
|
/source-code/java/services/src/gov/nasa/kepler/services/metrics/threepar/UnitNameConstants.java
|
92879ab073e3c82f7dc3c86c1f9b12ec0d9370a4
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
adam-sweet/kepler-pipeline
|
95a6cbc03dd39a8289b090fb85cdfc1eb5011fd9
|
f58b21df2c82969d8bd3e26a269bd7f5b9a770e1
|
refs/heads/master
| 2022-06-07T21:22:33.110291
| 2020-05-06T01:12:08
| 2020-05-06T01:12:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,691
|
java
|
/*
* Copyright 2017 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
* This file is available under the terms of the NASA Open Source Agreement
* (NOSA). You should have received a copy of this agreement with the
* Kepler source code; see the file NASA-OPEN-SOURCE-AGREEMENT.doc.
*
* No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY
* WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY,
* INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE
* WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR FREEDOM FROM
* INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL BE ERROR
* FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM
* TO THE SUBJECT SOFTWARE. THIS AGREEMENT DOES NOT, IN ANY MANNER,
* CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR RECIPIENT
* OF ANY RESULTS, RESULTING DESIGNS, HARDWARE, SOFTWARE PRODUCTS OR ANY
* OTHER APPLICATIONS RESULTING FROM USE OF THE SUBJECT SOFTWARE.
* FURTHER, GOVERNMENT AGENCY DISCLAIMS ALL WARRANTIES AND LIABILITIES
* REGARDING THIRD-PARTY SOFTWARE, IF PRESENT IN THE ORIGINAL SOFTWARE,
* AND DISTRIBUTES IT "AS IS."
*
* Waiver and Indemnity: RECIPIENT AGREES TO WAIVE ANY AND ALL CLAIMS
* AGAINST THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND
* SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT. IF RECIPIENT'S USE OF
* THE SUBJECT SOFTWARE RESULTS IN ANY LIABILITIES, DEMANDS, DAMAGES,
* EXPENSES OR LOSSES ARISING FROM SUCH USE, INCLUDING ANY DAMAGES FROM
* PRODUCTS BASED ON, OR RESULTING FROM, RECIPIENT'S USE OF THE SUBJECT
* SOFTWARE, RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS THE UNITED
* STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY
* PRIOR RECIPIENT, TO THE EXTENT PERMITTED BY LAW. RECIPIENT'S SOLE
* REMEDY FOR ANY SUCH MATTER SHALL BE THE IMMEDIATE, UNILATERAL
* TERMINATION OF THIS AGREEMENT.
*/
package gov.nasa.kepler.services.metrics.threepar;
/**
* Constants for the metric names based on units.
*
* @author Sean McCauliff
*
*/
public interface UnitNameConstants {
static final String IOOPS_SEC = ".ioops-sec";
static final String KBYTES_SEC = ".kbytes-sec";
static final String SVC_NS = ".svc-ns";
/** service time in micro seconds. */
static final String SVC_US = ".svc-us";
static final String IO_SIZE_BYTES = ".size-bytes";
static final String QUEUE_LEN = ".queue-length";
static final double BASE10_K_TO_BASE2_K = 1000.0/1024.0;
static final double BASE10K = 1000.0;
}
|
[
"Bill.Wohler@nasa.gov"
] |
Bill.Wohler@nasa.gov
|
fb72a11a5ddc0ede75500eb90f4b06995b74e528
|
a49206b04a49a74b4df9f76cb11c7f2637dad61d
|
/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/StatusBarUtilsFragment.java
|
cfda47c534d05b5671ceea95f83daeba436dac94
|
[
"Apache-2.0"
] |
permissive
|
xyzero/XUI
|
d383e87d3231a716d290288b2a201f69317c89a7
|
2e54179bd19b311c1e61c2246c36926ebf3d0e1b
|
refs/heads/master
| 2022-09-21T06:29:01.466589
| 2022-09-19T03:57:28
| 2022-09-19T03:57:28
| 270,934,068
| 0
| 0
|
Apache-2.0
| 2020-06-09T07:33:09
| 2020-06-09T07:33:09
| null |
UTF-8
|
Java
| false
| false
| 3,631
|
java
|
package com.xuexiang.xuidemo.fragment.utils;
import android.view.View;
import com.xuexiang.xpage.annotation.Page;
import com.xuexiang.xui.utils.StatusBarUtils;
import com.xuexiang.xui.widget.grouplist.XUIGroupListView;
import com.xuexiang.xuidemo.R;
import com.xuexiang.xuidemo.activity.TranslucentActivity;
import com.xuexiang.xuidemo.base.BaseFragment;
import com.xuexiang.xuidemo.utils.XToastUtils;
import com.xuexiang.xutil.app.ActivityUtils;
import butterknife.BindView;
/**
* @author xuexiang
* @since 2019/4/8 下午11:32
*/
@Page(name = "StatusBarUtils", extra = R.drawable.ic_util_status_bar)
public class StatusBarUtilsFragment extends BaseFragment {
@BindView(R.id.groupListView)
XUIGroupListView groupListView;
boolean isFullScreen;
/**
* 布局的资源id
*
* @return
*/
@Override
protected int getLayoutId() {
return R.layout.fragment_util_statusbar;
}
/**
* 初始化控件
*/
@Override
protected void initViews() {
XUIGroupListView.newSection(getContext())
.setDescription("支持 4.4 以上版本的 MIUI 和 Flyme,以及 5.0 以上版本的其他 Android")
.addItemView(groupListView.createItemView("沉浸式状态栏"), new View.OnClickListener() {
@Override
public void onClick(View v) {
ActivityUtils.startActivity(TranslucentActivity.class);
}
})
.addTo(groupListView);
XUIGroupListView.newSection(getContext())
.setDescription("支持 4.4 以上版本 MIUI 和 Flyme,以及 6.0 以上版本的其他 Android")
.addItemView(groupListView.createItemView("设置状态栏黑色字体与图标"), new View.OnClickListener() {
@Override
public void onClick(View v) {
StatusBarUtils.setStatusBarLightMode(getActivity());
}
})
.addItemView(groupListView.createItemView("设置状态栏白色字体与图标"), new View.OnClickListener() {
@Override
public void onClick(View v) {
StatusBarUtils.setStatusBarDarkMode(getActivity());
}
})
.addTo(groupListView);
XUIGroupListView.newSection(getContext())
.setDescription("不同机型下状态栏高度可能略有差异,并不是固定值,可以通过这个方法获取实际高度")
.addItemView(groupListView.createItemView("获取状态栏的实际高度"), new View.OnClickListener() {
@Override
public void onClick(View v) {
XToastUtils.toast("状态栏的实际高度:" + StatusBarUtils.getStatusBarHeight(getContext()));
}
})
.addTo(groupListView);
XUIGroupListView.newSection(getContext())
.addItemView(groupListView.createItemView("切换全屏"), new View.OnClickListener() {
@Override
public void onClick(View v) {
if (isFullScreen) {
StatusBarUtils.cancelFullScreen(getActivity());
} else {
StatusBarUtils.fullScreen(getActivity());
}
isFullScreen = !isFullScreen;
}
})
.addTo(groupListView);
}
}
|
[
"xuexiangjys@163.com"
] |
xuexiangjys@163.com
|
e3a6d0de489a9cd4f37b10a765837ce89a27ec39
|
0c359e241cce729ce777db41d3a4feefa48c30c0
|
/src/main/java/com/controllerface/cmdr_j/enums/equipment/modules/SpaceSuit.java
|
1aa6f4ce9b66908757c64e9f45a77217b5ac7566
|
[] |
no_license
|
controllerface/CMDR-J
|
760cafe4b89fc86715ee7941d66eaaf7978cf067
|
9fc70e1ae2f2119e3dc93bbc9a26544526beb56a
|
refs/heads/main
| 2022-09-29T02:43:58.308231
| 2022-09-12T02:09:01
| 2022-09-12T02:09:01
| 128,938,494
| 1
| 1
| null | 2021-11-21T01:42:20
| 2018-04-10T13:37:30
|
Java
|
UTF-8
|
Java
| false
| false
| 4,639
|
java
|
package com.controllerface.cmdr_j.enums.equipment.modules;
import com.controllerface.cmdr_j.classes.data.ItemEffects;
import com.controllerface.cmdr_j.classes.modules.gear.suits.*;
import com.controllerface.cmdr_j.enums.craftable.upgrades.UpgradeBlueprint;
import com.controllerface.cmdr_j.enums.equipment.modules.stats.ItemGrade;
import com.controllerface.cmdr_j.interfaces.commander.OwnableModule;
import com.controllerface.cmdr_j.interfaces.tasks.TaskRecipe;
import com.controllerface.cmdr_j.interfaces.tasks.TaskType;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;
public enum SpaceSuit implements OwnableModule
{
explorationsuit_class1(0L, 1,
new Artemis_Suit_Grade_1(),
UpgradeBlueprint.Artemis_Suit),
explorationsuit_class2(0L, 2,
new Artemis_Suit_Grade_2(),
UpgradeBlueprint.Artemis_Suit),
explorationsuit_class3(0L, 3,
new Artemis_Suit_Grade_3(),
UpgradeBlueprint.Artemis_Suit),
explorationsuit_class4(0L, 4,
new Artemis_Suit_Grade_4(),
UpgradeBlueprint.Artemis_Suit),
explorationsuit_class5(0L, 5,
new Artemis_Suit_Grade_5(),
UpgradeBlueprint.Artemis_Suit),
tacticalsuit_class1(0L, 1,
new Dominator_Suit_Grade_1(),
UpgradeBlueprint.Dominator_Suit),
tacticalsuit_class2(0L, 2,
new Dominator_Suit_Grade_2(),
UpgradeBlueprint.Dominator_Suit),
tacticalsuit_class3(0L, 3,
new Dominator_Suit_Grade_3(),
UpgradeBlueprint.Dominator_Suit),
tacticalsuit_class4(0L, 4,
new Dominator_Suit_Grade_4(),
UpgradeBlueprint.Dominator_Suit),
tacticalsuit_class5(0L, 5,
new Dominator_Suit_Grade_5(),
UpgradeBlueprint.Dominator_Suit),
utilitysuit_class1(0L, 1,
new Maverick_Suit_Grade_1(),
UpgradeBlueprint.Maverick_Suit),
utilitysuit_class2(0L, 2,
new Maverick_Suit_Grade_2(),
UpgradeBlueprint.Maverick_Suit),
utilitysuit_class3(0L, 3,
new Maverick_Suit_Grade_3(),
UpgradeBlueprint.Maverick_Suit),
utilitysuit_class4(0L, 4,
new Maverick_Suit_Grade_4(),
UpgradeBlueprint.Maverick_Suit),
utilitysuit_class5(0L, 5,
new Maverick_Suit_Grade_5(),
UpgradeBlueprint.Maverick_Suit),
;
public final long id;
public final int gearClass;
private final OwnableModule delegate;
public final UpgradeBlueprint upgradeBlueprint;
SpaceSuit(long id, int gearClass, OwnableModule delegate, UpgradeBlueprint upgradeBlueprint)
{
this.id = id;
this.gearClass = gearClass;
this.delegate = delegate;
this.upgradeBlueprint = upgradeBlueprint;
}
@Override
public TaskType modificationType()
{
return delegate.modificationType();
}
@Override
public TaskType experimentalType()
{
return delegate.experimentalType();
}
@Override
public String displayText()
{
return delegate.displayText();
}
@Override
public ItemEffects itemEffects()
{
return delegate.itemEffects();
}
public String getName()
{
return name();
}
public static Optional<SpaceSuit> findModule(String moduleName)
{
try
{
return Optional.of(valueOf(moduleName.toLowerCase()));
}
catch (Exception e)
{
e.printStackTrace();
if (moduleName == null || moduleName.isEmpty()) return Optional.empty();
}
return Arrays.stream(SpaceSuit.values())
.filter(spaceSuit -> spaceSuit.name().toLowerCase().equals(moduleName.toLowerCase()))
.findFirst();
}
@Override
public List<TaskRecipe> getAssociated()
{
return null;
}
@Override
public void associate(TaskRecipe recipe)
{
}
@Override
public String getLocationInformation()
{
return null;
}
@Override
public void setLocationInformation(String locationInformation)
{
}
@Override
public String getLocalizedName()
{
return displayText();
}
@Override
public void setLocalizedName(String localizedName)
{
}
@Override
public ItemGrade getGrade()
{
return null;
}
@Override
public long price()
{
return delegate.price();
}
public static OwnableModule findById(long itemId)
{
return Stream.of(values())
.filter(item -> item.id == itemId)
.findFirst()
.orElse(null);
}
}
|
[
"controll.face@gmail.com"
] |
controll.face@gmail.com
|
9788ba27a817979ee9d0faa995aa6daf1bee53ad
|
72e1e90dd8e1e43bad4a6ba46a44d1f30aa76fe6
|
/java/core/javaee7-samples-master/jaxrs/readerwriter-json/src/main/java/org/javaee7/jaxrs/readerwriter/json/MyResource.java
|
2d95bebd0244f9f9f932c76cb2e856b3d0f1356d
|
[
"CDDL-1.0",
"MIT",
"GPL-2.0-only",
"LicenseRef-scancode-oracle-openjdk-exception-2.0",
"Apache-2.0"
] |
permissive
|
fernando-romulo-silva/myStudies
|
bfdf9f02778d2f4993999f0ffc0ddd0066ec41b4
|
aa8867cda5edd54348f59583555b1f8fff3cd6b3
|
refs/heads/master
| 2023-08-16T17:18:50.665674
| 2023-08-09T19:47:15
| 2023-08-09T19:47:15
| 230,160,136
| 3
| 0
|
Apache-2.0
| 2023-02-08T19:49:02
| 2019-12-25T22:27:59
| null |
UTF-8
|
Java
| false
| false
| 2,411
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package org.javaee7.jaxrs.readerwriter.json;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
/**
* @author Arun Gupta
*/
@Path("endpoint")
public class MyResource {
@POST
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public MyObject echoObject(MyObject mo) {
return mo;
}
}
|
[
"fernando.romulo.silva@gmail.com"
] |
fernando.romulo.silva@gmail.com
|
5198cc5a305c20650538bc1868852385951507dd
|
53f5a941261609775dc3eedf0cb487956b734ab0
|
/com.samsung.accessory.atticmgr/sources/androidx/constraintlayout/widget/Group.java
|
fcd2934e465b8c0b674eea89aaf62d8aa22479a0
|
[] |
no_license
|
ThePBone/BudsProAnalysis
|
4a3ede6ba6611cc65598d346b5a81ea9c33265c0
|
5b04abcae98d1ec8d35335d587b628890383bb44
|
refs/heads/master
| 2023-02-18T14:24:57.731752
| 2021-01-17T12:44:58
| 2021-01-17T12:44:58
| 322,783,234
| 16
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,826
|
java
|
package androidx.constraintlayout.widget;
import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import android.view.View;
import androidx.constraintlayout.widget.ConstraintLayout;
public class Group extends ConstraintHelper {
public Group(Context context) {
super(context);
}
public Group(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public Group(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
}
/* access modifiers changed from: protected */
@Override // androidx.constraintlayout.widget.ConstraintHelper
public void init(AttributeSet attributeSet) {
super.init(attributeSet);
this.mUseViewMeasure = false;
}
@Override // androidx.constraintlayout.widget.ConstraintHelper
public void updatePreLayout(ConstraintLayout constraintLayout) {
int visibility = getVisibility();
float elevation = Build.VERSION.SDK_INT >= 21 ? getElevation() : 0.0f;
for (int i = 0; i < this.mCount; i++) {
View viewById = constraintLayout.getViewById(this.mIds[i]);
if (viewById != null) {
viewById.setVisibility(visibility);
if (elevation > 0.0f && Build.VERSION.SDK_INT >= 21) {
viewById.setElevation(elevation);
}
}
}
}
@Override // androidx.constraintlayout.widget.ConstraintHelper
public void updatePostLayout(ConstraintLayout constraintLayout) {
ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) getLayoutParams();
layoutParams.widget.setWidth(0);
layoutParams.widget.setHeight(0);
}
}
|
[
"thebone.main@gmail.com"
] |
thebone.main@gmail.com
|
bbb7e86712d15be869ccaf2d5e28b32d3c3fc5de
|
ac3a7a8d120d4e281431329c8c9d388fcfb94342
|
/src/main/java/com/leetcode/algorithm/hard/longestduplicatesubstring/Solution.java
|
885196be126cc34df9c3ad136550009fe33ac174
|
[
"MIT"
] |
permissive
|
paulxi/LeetCodeJava
|
c69014c24cda48f80a25227b7ac09c6c5d6cfadc
|
10b4430629314c7cfedaae02c7dc4c2318ea6256
|
refs/heads/master
| 2021-04-03T08:03:16.305484
| 2021-03-02T06:20:24
| 2021-03-02T06:20:24
| 125,126,097
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,403
|
java
|
package com.leetcode.algorithm.hard.longestduplicatesubstring;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
class Solution {
private long q = (1 << 31) - 1;
private int r = 256;
public String longestDupSubstring(String s) {
int lo = 0;
int hi = s.length();
while (lo < hi) {
int mid = lo + (hi - lo) / 2;
int index = test(s, mid);
if (index < 0) {
hi = mid;
} else {
lo = mid + 1;
}
}
int len = lo - 1;
if (len <= 0) {
return "";
}
int start = test(s, len);
return s.substring(start, start + len);
}
// https://github.com/kevin-wayne/algs4/blob/master/src/main/java/edu/princeton/cs/algs4/RabinKarp.java
private int test(String s, int len) {
Map<Long, List<Integer>> map = new HashMap<>();
long h = hash(s, len);
map.put(h, new ArrayList<>());
map.get(h).add(0);
long rm = 1;
for (int i = 1; i <= len - 1; i++) {
rm = (r * rm) % q;
}
for (int i = len; i < s.length(); i++) {
// h = (h - s.charAt(i - len)) / q;
// h += (s.charAt(i) - 'a' + 1) * pow(q, len - 1);
h = (h + q - rm * s.charAt(i - len) % q) % q;
h = (h * r + s.charAt(i)) % q;
int startIndex = i - len + 1;
if (map.containsKey(h)) {
for (int prev: map.get(h)) {
if (compare(s, startIndex, prev, len)) {
return startIndex;
}
}
} else {
map.put(h, new ArrayList<>());
}
map.get(h).add(startIndex);
}
return -1;
}
// private long hash(String key, int len) {
// long h = 0;
// for (int j = 0; j < len; j++) {
// h += (key.charAt(j) - 'a' + 1) * pow(q, j);
// }
// return h;
// }
private long hash(String key, int len) {
// From Algorithms 4th edition
long h = 0;
for (int j = 0; j < len; j++) {
h = (r * h + key.charAt(j)) % q;
}
return h;
}
private boolean compare(String s, int i1, int i2, int len) {
for (int i = 0; i < len; i++) {
if (s.charAt(i1 + i) != s.charAt(i2 + i)) {
return false;
}
}
return true;
}
private long pow(long base, int p) {
long result = 1;
long num = base;
for (long i = p; i > 0; i /= 2) {
if (i % 2 == 1) {
result *= num;
}
num *= num;
}
return result;
}
}
|
[
"paulxi@gmail.com"
] |
paulxi@gmail.com
|
fdce6e48c33d06606df79537c8cf1993385983b4
|
bf4122f5ae3a9f9b9c2cc94ef87cdb9dcadc9dc9
|
/Training/BackEnd/collectionframework/lists/practise/Student.java
|
f2c638b4a9d0947745a4f1458b3ea319c1968a20
|
[] |
no_license
|
haren7474/TY_ELF_JFS_HarendraKumar
|
7ef8b9a0bb6d6bdddb94b88ab2db4e0aef0fbc1d
|
f99ef30b40d0877167c8159e8b7f322af7cc87b9
|
refs/heads/master
| 2023-01-11T01:01:10.458037
| 2020-01-23T18:20:20
| 2020-01-23T18:20:20
| 225,845,989
| 0
| 0
| null | 2023-01-07T22:01:21
| 2019-12-04T11:00:37
|
HTML
|
UTF-8
|
Java
| false
| false
| 972
|
java
|
package com.tyss.collectionframework.lists.practise;
import java.util.Comparator;
public class Student implements Comparable<Student>, Comparator<Student>
{
private int id;
private String name;
private double marks;
public Student(int id, String name, double marks) {
this.id = id;
this.name = name;
this.marks = marks;
}
public Student() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public double getMarks() {
return marks;
}
public void setMarks(double marks) {
this.marks = marks;
}
@Override
public String toString() {
return getId() + "\t\t" + getName() + "\t\t" + getMarks();
}
@Override
public int compareTo(Student s)
{
return this.getId()- s.getId();
}
@Override
public int compare(Student s1, Student s2)
{
return s2.getName().compareTo(s1.getName());
}
}
|
[
"harendra10104698@gmail.com"
] |
harendra10104698@gmail.com
|
d41cf0e042b2d0688c3b69167f9cf6c3e0ff7fa7
|
b6e99b0346572b7def0e9cdd1b03990beb99e26f
|
/src/gcom/gui/cobranca/TransferirRotaGrupoEmpresaAction.java
|
b5bc162e56f79cd5f9d63488a7568c9a5e22ed57
|
[] |
no_license
|
prodigasistemas/gsan
|
ad64782c7bc991329ce5f0bf5491c810e9487d6b
|
bfbf7ad298c3c9646bdf5d9c791e62d7366499c1
|
refs/heads/master
| 2023-08-31T10:47:21.784105
| 2023-08-23T17:53:24
| 2023-08-23T17:53:24
| 14,600,520
| 19
| 20
| null | 2015-07-29T19:39:10
| 2013-11-21T21:24:16
|
Java
|
ISO-8859-1
|
Java
| false
| false
| 6,856
|
java
|
package gcom.gui.cobranca;
import java.util.Collection;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import gcom.cadastro.empresa.Empresa;
import gcom.cadastro.empresa.FiltroEmpresa;
import gcom.cobranca.CobrancaGrupo;
import gcom.cobranca.FiltroCobrancaGrupo;
import gcom.fachada.Fachada;
import gcom.faturamento.FaturamentoGrupo;
import gcom.faturamento.FiltroFaturamentoGrupo;
import gcom.gui.GcomAction;
import gcom.seguranca.acesso.usuario.Usuario;
import gcom.util.Util;
import gcom.util.filtro.ParametroSimples;
/**
* @date 20/10/09
* @author Anderson Italo
* UC0960 Transferir Rotas Entre Grupos e/ou Empresas
*/
public class TransferirRotaGrupoEmpresaAction extends GcomAction{
public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm, HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) {
ActionForward retorno = actionMapping
.findForward("telaSucesso");
HttpSession sessao = httpServletRequest.getSession(false);
Fachada fachada = Fachada.getInstancia();
TransferirRotasGruposEmpresasActionForm form = (TransferirRotasGruposEmpresasActionForm) actionForm;
FaturamentoGrupo faturamentoGrupoDestino = null;
CobrancaGrupo cobrancaGrupoDestino = null;
Empresa empresaFaturamentoDestino = null;
Empresa empresaCobrancaDestino = null;
Collection colecaoRotas = (Collection)sessao.getAttribute("rotasSelecionadas");
/*7.1. Caso não tenha sido informado algum dos parâmetros
* para onde devem ser transferidas as rotas, este campo
* não deve ser alterado.*/
if (form.getIdGrupoFaturamentoDestino() != null && !form.getIdGrupoFaturamentoDestino().equals("")
&& !form.getIdGrupoFaturamentoDestino().equals("-1")){
FiltroFaturamentoGrupo filtroFaturamentoGrupo = new FiltroFaturamentoGrupo();
filtroFaturamentoGrupo.adicionarParametro(new ParametroSimples(FiltroFaturamentoGrupo.ID , new Integer(form.getIdGrupoFaturamentoDestino())));
Collection colecaoGrupoFaturamento = fachada.pesquisar(filtroFaturamentoGrupo, FaturamentoGrupo.class.getName());
faturamentoGrupoDestino = (FaturamentoGrupo)Util.retonarObjetoDeColecao(colecaoGrupoFaturamento);
}
if (form.getIdGrupoCobrancaDestino() != null && !form.getIdGrupoCobrancaDestino().equals("")
&& !form.getIdGrupoCobrancaDestino().equals("-1")){
FiltroCobrancaGrupo filtroCobrancaGrupo = new FiltroCobrancaGrupo();
filtroCobrancaGrupo.adicionarParametro(new ParametroSimples(FiltroCobrancaGrupo.ID , new Integer(form.getIdGrupoCobrancaDestino())));
Collection colecaoGrupoCobranca = fachada.pesquisar(filtroCobrancaGrupo, CobrancaGrupo.class.getName());
cobrancaGrupoDestino = (CobrancaGrupo)Util.retonarObjetoDeColecao(colecaoGrupoCobranca);
}
if (form.getIdEmpresaFaturamentoDestino() != null && !form.getIdEmpresaFaturamentoDestino().equals("")
&& !form.getIdEmpresaFaturamentoDestino().equals("-1")){
FiltroEmpresa filtroEmpresa = new FiltroEmpresa();
filtroEmpresa.adicionarParametro(new ParametroSimples(FiltroEmpresa.ID , new Integer(form.getIdEmpresaFaturamentoDestino())));
Collection colecaoEmpresaFaturamento = fachada.pesquisar(filtroEmpresa, Empresa.class.getName());
empresaFaturamentoDestino = (Empresa)Util.retonarObjetoDeColecao(colecaoEmpresaFaturamento);
}
if (form.getIdEmpresaCobrancaDestino() != null && !form.getIdEmpresaCobrancaDestino().equals("")
&& !form.getIdEmpresaCobrancaDestino().equals("-1")){
FiltroEmpresa filtroEmpresa = new FiltroEmpresa();
filtroEmpresa.adicionarParametro(new ParametroSimples(FiltroEmpresa.ID , new Integer(form.getIdEmpresaCobrancaDestino())));
Collection colecaoEmpresaCobranca = fachada.pesquisar(filtroEmpresa, Empresa.class.getName());
empresaCobrancaDestino = (Empresa)Util.retonarObjetoDeColecao(colecaoEmpresaCobranca);
}
//7. O sistema faz a transferência de rotas solicitadas
fachada.transferirRotasEntreGrupoEmpresa(faturamentoGrupoDestino, cobrancaGrupoDestino,
empresaFaturamentoDestino, empresaCobrancaDestino, colecaoRotas, (Usuario)sessao.getAttribute("usuarioLogado"));
//limpa os dados do formulário
form.setIdLocalidadeInicial(null);
form.setDescricaoLocalidadeInicial(null);
form.setIdLocalidadeFinal(null);
form.setDescricaoLocalidadeFinal(null);
form.setIdLocalidadeInicial(null);
form.setDescricaoLocalidadeFinal(null);
form.setIdSetorComercialInicial(null);
form.setDescricaoSetorComercialInicial(null);
form.setIdSetorComercialFinal(null);
form.setDescricaoSetorComercialFinal(null);
form.setIdRotaInicial(null);
form.setIdRotaFinal(null);
form.setQuantidadeRotas(null);
form.setIdGrupoCobrancaFiltro(null);
form.setIdGrupoCobrancaSelecao(null);
form.setIdGrupoCobrancaDestino(null);
form.setIdGrupoFaturamentoFiltro(null);
form.setIdGrupoFaturamentoSelecao(null);
form.setIdGrupoFaturamentoDestino(null);
form.setIdEmpresaCobrancaFiltro(null);
form.setIdEmpresaCobrancaSelecao(null);
form.setIdEmpresaCobrancaDestino(null);
form.setIdEmpresaFaturamentoFiltro(null);
form.setIdEmpresaFaturamentoSelecao(null);
form.setIdEmpresaFaturamentoDestino(null);
sessao.removeAttribute("rotasSelecionadas");
httpServletRequest.removeAttribute("colecaoEmpresaCobrancaSelecao");
httpServletRequest.removeAttribute("colecaoEmpresaFaturamentoSelecao");
httpServletRequest.removeAttribute("colecaoGrupoCobrancaSelecao");
httpServletRequest.removeAttribute("colecaoGrupoFaturamentoSelecao");
httpServletRequest.removeAttribute("colecaoUnidadeNegocio");
httpServletRequest.removeAttribute("colecaoGerenciaRegional");
httpServletRequest.removeAttribute("colecaoEmpresaFaturamentoFiltro");
httpServletRequest.removeAttribute("colecaoGrupoFaturamentoFiltro");
httpServletRequest.removeAttribute("colecaoGrupoCobrancaFiltro");
httpServletRequest.removeAttribute("colecaoCobrancaGrupoDestino");
httpServletRequest.removeAttribute("colecaoFaturamentoGrupoDestino");
httpServletRequest.removeAttribute("colecaoEmpresaDestino");
httpServletRequest.removeAttribute("colecaoEmpresaFaturamentoDestino");
httpServletRequest.removeAttribute("colecaoEmpresaCobrancaDestino");
montarPaginaSucesso(httpServletRequest, "Rota(s) Tranferida(s) com sucesso.",
"Realizar outra Tranferencia de Rota(s)",
"exibirTransferirRotaGrupoEmpresaAction.do?desfazer=S");
return retorno;
}
}
|
[
"piagodinho@gmail.com"
] |
piagodinho@gmail.com
|
160463fb7f50871b7abfe93a82a442698358d0af
|
969208d133ffc7119401f4fe03c21414e33fc54c
|
/server/src/main/java/com/projects/core/shiro/service/UserAuthService.java
|
7bb67cfad555266b3f25c3c48707c4b02719f8c0
|
[] |
no_license
|
kangwubin/XATU_JavaEE
|
e7b23248e0baff54e06bf5fc135b959b711bf8f3
|
b2b770496552c120b25126559599b3484ccadcfa
|
refs/heads/master
| 2022-12-11T11:42:00.895448
| 2020-05-25T14:16:16
| 2020-05-25T14:16:34
| 224,195,169
| 0
| 0
| null | 2022-12-06T00:45:44
| 2019-11-26T13:09:28
|
Java
|
UTF-8
|
Java
| false
| false
| 1,704
|
java
|
/**
* Copyright 2018-2020 stylefeng & fengshuonan (https://gitee.com/stylefeng)
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.projects.core.shiro.service;
import org.apache.shiro.authc.SimpleAuthenticationInfo;
import com.projects.core.shiro.ShiroUser;
import com.projects.modular.system.entity.User;
import java.util.List;
/**
* 定义shirorealm所需数据的接口
*
* @author fengshuonan
* @date 2016年12月5日 上午10:23:34
*/
public interface UserAuthService {
/**
* 根据账号获取登录用户
*
* @param account 账号
*/
User user(String account);
/**
* 根据系统用户获取Shiro的用户
*
* @param user 系统用户
*/
ShiroUser shiroUser(User user);
/**
* 获取权限列表通过角色id
*
* @param roleId 角色id
*/
List<String> findPermissionsByRoleId(Long roleId);
/**
* 根据角色id获取角色名称
*
* @param roleId 角色id
*/
String findRoleNameByRoleId(Long roleId);
/**
* 获取shiro的认证信息
*/
SimpleAuthenticationInfo info(ShiroUser shiroUser, User user, String realmName);
}
|
[
"2624656980@qq.com"
] |
2624656980@qq.com
|
b1baffcb5e1ffacebd34541b828f7aa9a619edee
|
10e1fe4940718d045f980577b82dd427315153e0
|
/src/android/CoolLessons/DeSL/app/src/main/java/ua/kh/em/desl/ui/textinput/TextInputActivity.java
|
278713fbdc3044857fbc87198649ac9e4db00a8e
|
[] |
no_license
|
ValenbergHar/G-JD1-2019-10-01_ValenbergHar
|
6b693f08becdf624b235170712e552a4ff148ac3
|
bff38b21a10594cdfa7a719c216c04614cc01ac3
|
refs/heads/master
| 2022-12-22T12:10:22.999080
| 2020-10-20T21:02:01
| 2020-10-20T21:02:01
| 212,853,204
| 0
| 1
| null | 2022-12-16T15:42:29
| 2019-10-04T16:00:20
|
Java
|
UTF-8
|
Java
| false
| false
| 3,907
|
java
|
package ua.kh.em.desl.ui.textinput;
import android.content.Context;
import android.os.Bundle;
import com.google.android.material.textfield.TextInputEditText;
import com.google.android.material.textfield.TextInputLayout;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.Gravity;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import ua.kh.em.desl.R;
public class TextInputActivity extends AppCompatActivity {
final Context context = this;
@BindView(R.id.toolbar) Toolbar toolbar;
@BindView(R.id.txt_inp_1) TextInputLayout txtInput_1;
@BindView(R.id.txt_inp_2) TextInputLayout txtInput_2;
@BindView(R.id.txt_inp_3) TextInputLayout txtInput_3;
@BindView(R.id.et_inp_1) EditText etInput_1;
@BindView(R.id.et_inp_2) TextInputEditText etInput_2;
@BindView(R.id.et_inp_3) EditText etInput_3;
@BindView(R.id.text_output) TextView textOutput;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_text_input);
ButterKnife.bind(this);
setSupportActionBar(toolbar);
nameError();
}
// Валидация ввода имени
private void nameError() {
Objects.requireNonNull(txtInput_1.getEditText()).addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int start, int count, int after) {
if (charSequence.length() > 0 && charSequence.length() <= 3) {
txtInput_1.setError(getString(R.string.username_must));
// Установка подключения вывода ошибки при валидации ввода текста
txtInput_1.setErrorEnabled(true);
} else {
txtInput_1.setErrorEnabled(false);
}
}
@Override
public void onTextChanged(CharSequence charSequence, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable editable) {
}
});
}
// Обработчик нажатия на FAB
@OnClick(R.id.fab)
void fabClick(){
String txt_1 = etInput_1.getText().toString();
String txt_2 = etInput_2.getText().toString();
String txt_3 = etInput_3.getText().toString();
if(txt_1.isEmpty() || txt_2.isEmpty()){
Toast toast = Toast.makeText(getApplicationContext(), R.string.input_empty, Toast.LENGTH_SHORT);
toast.setGravity(Gravity.TOP, 0, 0);
toast.show();
} else if (!emailValid(txt_3)) {
Toast toast = Toast.makeText(getApplicationContext(), R.string.email_input_error, Toast.LENGTH_SHORT);
toast.setGravity(Gravity.TOP, 0, 0);
toast.show();
}else {
Toast.makeText(context, txt_1 + "\n" + txt_2 + "\n" + txt_3, Toast.LENGTH_SHORT).show();
textOutput.setText(txt_1 + "\n" + txt_2 + "\n" + txt_3);
}
}
// Валидация email
private boolean emailValid(String input_Email) {
// String EMAIL_VALID = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@"
// + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
String EMAIL_VALID = "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$";
Pattern pattern = Pattern.compile(EMAIL_VALID, Pattern.CASE_INSENSITIVE);
Matcher matcher = pattern.matcher(input_Email);
return matcher.matches();
}
}
|
[
"maskevich.valeri@gmail.com"
] |
maskevich.valeri@gmail.com
|
464c1c5703d531f6328ae64e10b5ab5daeb2aef2
|
e43ec5ada826aee5b690d8008ef183e9c14bcd2f
|
/src/practice/PrintAlotTest.java
|
1ed141f320446c030f70b6205bb2e8263405f82b
|
[] |
no_license
|
eyilmaz4/Feb22
|
a243d9e06161e992614a812c679d2c91229769c1
|
9c9311a3246f5b317a2ca998a219a589085ece66
|
refs/heads/master
| 2021-01-15T01:17:55.381848
| 2020-02-24T19:45:22
| 2020-02-24T19:45:22
| 242,828,000
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 143
|
java
|
package practice;
public class PrintAlotTest {
public static void main(String[] args) {
parameter.printMultiHelloWorld(4);
}
}
|
[
"eyilmaz4@na.edu"
] |
eyilmaz4@na.edu
|
299a51fc6ac73a0a9709cdc3ec5106ec9ad321d1
|
dab9095d0c261dfe35b252bf264f000a70f40b33
|
/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ShutdownMvcEndpoint.java
|
c38098f559913c46cc00b379c1c5f0369a323951
|
[
"Apache-2.0"
] |
permissive
|
Nephilim84/contestparser
|
1501d3a32221d9c6acfbb1969a3fbbd2f9626d69
|
e2ad787b368faf23d45bd87f3cb3f3324d4de616
|
refs/heads/master
| 2021-01-10T15:02:25.989320
| 2015-10-25T16:12:48
| 2015-10-25T16:12:48
| 44,915,265
| 1
| 4
| null | 2016-03-09T18:26:48
| 2015-10-25T15:13:34
|
Java
|
UTF-8
|
Java
| false
| false
| 1,643
|
java
|
/*
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.endpoint.mvc;
import java.util.Collections;
import java.util.Map;
import org.springframework.boot.actuate.endpoint.ShutdownEndpoint;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* Adapter to expose {@link ShutdownEndpoint} as an {@link MvcEndpoint}.
*
* @author Dave Syer
*/
public class ShutdownMvcEndpoint extends EndpointMvcAdapter {
public ShutdownMvcEndpoint(ShutdownEndpoint delegate) {
super(delegate);
}
@RequestMapping(method = RequestMethod.POST)
@ResponseBody
@Override
public Object invoke() {
if (!getDelegate().isEnabled()) {
return new ResponseEntity<Map<String, String>>(
Collections.singletonMap("message", "This endpoint is disabled"),
HttpStatus.NOT_FOUND);
}
return super.invoke();
}
}
|
[
"you@example.com"
] |
you@example.com
|
d2b45619f128fa533d02762c4429431d23b517a4
|
79b203d6f3b37ddc5ee2ad34257a64c6ee1b1026
|
/libs/baesrc/main/java/us/battleaxe/bae/PlayerNameChatFormatter.java
|
327bc6d129395e71b94406f4768cfae539afadfe
|
[] |
no_license
|
123099/Bounce
|
0c4103c59171b64299b8560c715be7f48a375eab
|
97c931067d0cd5816f8f246468ecb169b435436a
|
refs/heads/master
| 2023-07-06T13:19:31.998341
| 2021-08-10T21:45:01
| 2021-08-10T21:45:01
| 394,787,692
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,411
|
java
|
package us.battleaxe.bae;
import java.text.NumberFormat;
import java.util.Locale;
import org.bukkit.entity.Player;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.TextComponent;
import us.battleaxe.bae.api.API;
import us.battleaxe.bae.api.AbstractChatFormatter;
import us.battleaxe.bae.chat.AdvancedReplacementRule;
public class PlayerNameChatFormatter extends AbstractChatFormatter {
private final API api;
private final NumberFormat numberFormat;
public PlayerNameChatFormatter(API api, String format) {
super(format);
this.api = api;
this.numberFormat = NumberFormat.getInstance(Locale.US);
addDefaultRules();
}
private void addDefaultRules() {
addReplacementRule(new AdvancedReplacementRule("{name}", getCurrentReplacementRule("{name}")) {
@Override
public BaseComponent getResult(Player player) {
return this.defaultFormat.format(new TextComponent(player.getName()));
}
});
addReplacementRule(new AdvancedReplacementRule("{rank}", getCurrentReplacementRule("{rank}")) {
@Override
public BaseComponent getResult(Player player) {
return this.defaultFormat.format(new TextComponent(api.getOnlineAccount(player).getGroup().getName()));
}
});
addReplacementRule(new AdvancedReplacementRule("{prefix}", getCurrentReplacementRule("{prefix}")) {
@Override
public BaseComponent getResult(Player player) {
TextComponent component = new TextComponent(ChatColor.translateAlternateColorCodes('&', api.getOnlineAccount(player).getGroup().getPrefix()));
this.defaultFormat.format(component);
return component;
}
});
addReplacementRule(new AdvancedReplacementRule("{suffix}", getCurrentReplacementRule("{suffix}")) {
@Override
public BaseComponent getResult(Player player) {
TextComponent component = new TextComponent(ChatColor.translateAlternateColorCodes('&', api.getOnlineAccount(player).getGroup().getSuffix()));
this.defaultFormat.format(component);
return component;
}
});
addReplacementRule(new AdvancedReplacementRule("{gold}", getCurrentReplacementRule("{gold}")) {
@Override
public BaseComponent getResult(Player player) {
TextComponent component = new TextComponent(numberFormat.format((int) api.getOnlineAccount(player).getGold()));
this.defaultFormat.format(component);
return component;
}
});
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
b4ec47bc4f6bd92023dead444e0177c2073b1c9c
|
154a885ad39ece031e5224f99b2f8a3082fcb000
|
/Day_1231/src/Exam_02.java
|
e753a100125df4fd0eba0ecc070242fabfac882b
|
[] |
no_license
|
moonhwan123/moonhwan
|
1b1e2fbc5589ac24d0806029465cdc232f5b9b29
|
84aa4dd9ca1a2f373d91ccbabce154f05c45c3c6
|
refs/heads/master
| 2021-07-05T04:46:46.814625
| 2021-04-01T09:21:19
| 2021-04-01T09:21:19
| 228,724,072
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 932
|
java
|
import java.util.Scanner;
/*
if()
switch ~ case
90이상 , 80이상, 70이상, 60이상 , 60미만
100~90 , 89~80 , 79~70 , 69~60, 59~0
*/
public class Exam_02 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("점수 입력 : ");
int var = sc.nextInt();
String str = ""; // String str = null; 이거랑은 다른거임
//char ch = 'A';
switch(var/10) { //수식 또는 변수가 들어감(정수,문자,문자열)
case 10: // 값(정수,문자,문자열)
str = "A";
break; // 이게 없으면 -> 조건 만족시 밑에 꺼도 다 실행되어 버림
case 9:
str = "A";
break;
case 8:
str = "B";
break;
case 7:
str = "C";
break;
case 6:
str = "D";
break;
default:
str = "F";
}
System.out.println("당신의 성적은"+str+"점 입니다.");
}
}
|
[
"58998949+moonhwan123@users.noreply.github.com"
] |
58998949+moonhwan123@users.noreply.github.com
|
d295d707326d4dbe654f14c74dd143ca702f3670
|
1dd1923defe8bc58dcc65e5049c9a2e55ee98c6d
|
/app/src/main/java/com/delex/bankDetails/BankListFragModel.java
|
1d7c1055cb030c4386768e4b0709892cd3f59e8b
|
[] |
no_license
|
gogo207/delexDriver
|
359bfd2a568a39a7d31f75e5b2ac057ed93faba7
|
0f986927bc8264dc234453b3bf4137bd0e428824
|
refs/heads/master
| 2020-03-31T00:49:54.331713
| 2018-07-18T06:36:10
| 2018-07-18T06:36:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,525
|
java
|
package com.delex.bankDetails;
import android.util.Log;
import com.delex.pojo.bank.BankList;
import com.delex.pojo.bank.LegalEntity;
import com.delex.pojo.bank.StripeDetailsPojo;
import com.delex.utility.OkHttp3Connection;
import com.delex.utility.ServiceUrl;
import com.google.gson.Gson;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
/**
* Created by murashid on 25-Aug-17.
*/
public class BankListFragModel {
private static final String TAG = "SupportFragModel";
private BankListFragModelImplement modelImplement;
BankListFragModel(BankListFragModelImplement modelImplement) {
this.modelImplement = modelImplement;
}
void fetchData(String token) {
OkHttp3Connection.doOkHttp3Connection(token, ServiceUrl.FETCH_ADD_STRIPE_ACCOUNT, OkHttp3Connection.Request_type.GET, new JSONObject(), new OkHttp3Connection.OkHttp3RequestCallback() {
@Override
public void onSuccess(String result) {
try {
if (result != null) {
Log.d(TAG, "onSuccess: " + result);
JSONObject jsonObject = new JSONObject(result);
if (jsonObject.has("legal_entity")) {
StripeDetailsPojo stripeDetailsPojo = new Gson().fromJson(result, StripeDetailsPojo.class);
modelImplement.onSuccess(stripeDetailsPojo.getLegal_entity(), stripeDetailsPojo.getExternal_accounts().getData());
return;
}
if (jsonObject.getString("errFlag").equals("1") && jsonObject.getString("errNum").equals("400")) {
modelImplement.noStipeAccount();
} else {
modelImplement.onFailure(jsonObject.getString("errMsg"));
}
} else {
modelImplement.onFailure();
}
} catch (JSONException e) {
modelImplement.onFailure();
}
}
@Override
public void onError(String error) {
modelImplement.onFailure();
}
}, token);
}
interface BankListFragModelImplement {
void onFailure(String failureMsg);
void onFailure();
void onSuccess(LegalEntity legalEntity, ArrayList<BankList> bankLists);
void noStipeAccount();
}
}
|
[
"kyoungae3017@gmail.com"
] |
kyoungae3017@gmail.com
|
ecec3942fff70b8e420b2a272c52d0260748d4d3
|
51b718f4d2dfe9fa68246cceba1d3782260c42cb
|
/src/main/java/funwayguy/esm/ai/ESM_EntityAIDoorInteract.java
|
9557284d85bdc8e700dc313ea380a2ae93c30b56
|
[] |
no_license
|
da3dsoul/Epic-Siege-Mod
|
7845c59bae972f71eafd7e46f5a38211b4990306
|
4044b5213f66eddb0b7918a001acdf92e92810a2
|
refs/heads/master
| 2020-12-23T11:50:15.170175
| 2016-03-19T07:47:58
| 2016-03-19T07:47:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,339
|
java
|
package funwayguy.esm.ai;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.ai.EntityAIBase;
import net.minecraft.init.Blocks;
import net.minecraft.pathfinding.PathEntity;
import net.minecraft.pathfinding.PathNavigate;
import net.minecraft.pathfinding.PathPoint;
import net.minecraft.util.MathHelper;
public abstract class ESM_EntityAIDoorInteract extends EntityAIBase
{
protected EntityLiving theEntity;
protected int entityPosX;
protected int entityPosY;
protected int entityPosZ;
protected Block field_151504_e;
/** If is true then the Entity has stopped Door Interaction and compoleted the task. */
boolean hasStoppedDoorInteraction;
float entityPositionX;
float entityPositionZ;
public ESM_EntityAIDoorInteract(EntityLiving p_i1621_1_)
{
this.theEntity = p_i1621_1_;
}
/**
* Returns whether the EntityAIBase should begin execution.
*/
public boolean shouldExecute()
{
PathNavigate pathnavigate = this.theEntity.getNavigator();
PathEntity pathentity = pathnavigate.getPath();
if (pathentity != null && !pathentity.isFinished() && pathnavigate.getCanBreakDoors())
{
for (int i = 0; i < Math.min(pathentity.getCurrentPathIndex() + 2, pathentity.getCurrentPathLength()); ++i)
{
PathPoint pathpoint = pathentity.getPathPointFromIndex(i);
this.entityPosX = pathpoint.xCoord;
this.entityPosY = pathpoint.yCoord + 1;
this.entityPosZ = pathpoint.zCoord;
if (this.theEntity.getDistanceSq((double)this.entityPosX, this.entityPosY, (double)this.entityPosZ) <= 9D)
{
this.field_151504_e = this.func_151503_a(this.entityPosX, this.entityPosY, this.entityPosZ);
if (this.field_151504_e != null)
{
return true;
}
}
this.entityPosY = pathpoint.yCoord;
if (this.theEntity.getDistanceSq((double)this.entityPosX, this.entityPosY, (double)this.entityPosZ) <= 9D)
{
this.field_151504_e = this.func_151503_a(this.entityPosX, this.entityPosY, this.entityPosZ);
if (this.field_151504_e != null)
{
return true;
}
}
}
this.entityPosX = MathHelper.floor_double(this.theEntity.posX);
this.entityPosY = MathHelper.floor_double(this.theEntity.posY);
this.entityPosZ = MathHelper.floor_double(this.theEntity.posZ);
this.field_151504_e = this.func_151503_a(this.entityPosX, this.entityPosY, this.entityPosZ);
return this.field_151504_e != null;
}
else
{
return false;
}
}
/**
* Returns whether an in-progress EntityAIBase should continue executing
*/
public boolean continueExecuting()
{
return !this.hasStoppedDoorInteraction;
}
/**
* Execute a one shot task or start executing a continuous task
*/
public void startExecuting()
{
this.hasStoppedDoorInteraction = false;
this.entityPositionX = (float)((double)((float)this.entityPosX + 0.5F) - this.theEntity.posX);
this.entityPositionZ = (float)((double)((float)this.entityPosZ + 0.5F) - this.theEntity.posZ);
}
/**
* Updates the task
*/
public void updateTask()
{
float f = (float)((double)((float)this.entityPosX + 0.5F) - this.theEntity.posX);
float f1 = (float)((double)((float)this.entityPosZ + 0.5F) - this.theEntity.posZ);
float f2 = this.entityPositionX * f + this.entityPositionZ * f1;
if (f2 < 0.0F)
{
this.hasStoppedDoorInteraction = true;
}
}
private Block func_151503_a(int p_151503_1_, int p_151503_2_, int p_151503_3_)
{
Block block = this.theEntity.worldObj.getBlock(p_151503_1_, p_151503_2_, p_151503_3_);
return !(block == Blocks.wooden_door || block == Blocks.trapdoor || block == Blocks.fence_gate) ? null : block;
}
}
|
[
"FunwayguyEmail@gmail.com"
] |
FunwayguyEmail@gmail.com
|
1d6ae3495da4efe9c644c7879885c46bee2cfc65
|
5841ebcb90abaad976c31e1929f72de86a30397b
|
/likp_ai/trunk/webproject/src/main/java/com/lkp/dao/impl/TlkWechatAccesstokenEntityDaoImpl.java
|
468bc9b8813ff7a7da493c7c6ff2260309304e14
|
[] |
no_license
|
JustForMyDream/lkp_ai
|
4e95a375f07449221ef0111e5cfa787d93800bfc
|
96f8b24abe9fc6f67814a7eab2a139677df952e0
|
refs/heads/master
| 2021-07-09T12:24:47.790259
| 2017-10-08T08:57:29
| 2017-10-08T08:57:29
| 106,161,465
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 747
|
java
|
package com.lkp.dao.impl;
import com.lkp.dao.TlkWechatAccesstokenEntityDao;
import com.lkp.entity.TlkWechatAccesstokenEntity;
import org.hibernate.Query;
import org.springframework.stereotype.Repository;
/**
*
*/
@Repository
public class TlkWechatAccesstokenEntityDaoImpl extends BaseDaoImpl<TlkWechatAccesstokenEntity> implements TlkWechatAccesstokenEntityDao {
String QUERY_NEWEST_TOKEN = "from "+TlkWechatAccesstokenEntity.class.getName()+" a order by a.itemUpdatedate desc";
@Override
public TlkWechatAccesstokenEntity getTlkWechatAccesstokenEntity() {
Query query = getSession().createQuery(QUERY_NEWEST_TOKEN);
query.setMaxResults(1);
return (TlkWechatAccesstokenEntity) query.uniqueResult();
}
}
|
[
"2589475332@qq.com"
] |
2589475332@qq.com
|
b8ee2e142351b10619a81d05cdee4bc90cc053f0
|
10378c580b62125a184f74f595d2c37be90a5769
|
/com/google/common/util/concurrent/UncheckedTimeoutException.java
|
3a4cf20dccbf696f154385bb1b3f52965380d11e
|
[] |
no_license
|
ClientPlayground/Melon-Client
|
4299d7f3e8f2446ae9f225c0d7fcc770d4d48ecb
|
afc9b11493e15745b78dec1c2b62bb9e01573c3d
|
refs/heads/beta-v2
| 2023-04-05T20:17:00.521159
| 2021-03-14T19:13:31
| 2021-03-14T19:13:31
| 347,509,882
| 33
| 19
| null | 2021-03-14T19:13:32
| 2021-03-14T00:27:40
| null |
UTF-8
|
Java
| false
| false
| 544
|
java
|
package com.google.common.util.concurrent;
import javax.annotation.Nullable;
public class UncheckedTimeoutException extends RuntimeException {
private static final long serialVersionUID = 0L;
public UncheckedTimeoutException() {}
public UncheckedTimeoutException(@Nullable String message) {
super(message);
}
public UncheckedTimeoutException(@Nullable Throwable cause) {
super(cause);
}
public UncheckedTimeoutException(@Nullable String message, @Nullable Throwable cause) {
super(message, cause);
}
}
|
[
"Hot-Tutorials@users.noreply.github.com"
] |
Hot-Tutorials@users.noreply.github.com
|
705037c8bbaa08e66151fe81f4a5c72508bf68f3
|
2b2fcb1902206ad0f207305b9268838504c3749b
|
/WakfuClientSources/srcx/class_8701_dcm.java
|
eabf9f4bcefbf5f975bca54c9f350045d1e7ece2
|
[] |
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
| 562
|
java
|
public class dcm
implements cvk
{
private String kUU;
private int index = -1;
public String toString()
{
return "[Comment] " + this.kUU;
}
public String ctd() {
return this.kUU;
}
void oQ(String paramString) {
this.kUU = paramString;
}
public int DG()
{
return 0;
}
void setIndex(int paramInt) {
this.index = paramInt;
}
public int getIndex() {
return this.index;
}
public EJ DH()
{
return null;
}
public int DI()
{
return 0;
}
public String DJ()
{
return null;
}
}
|
[
"music_inme@hotmail.fr"
] |
music_inme@hotmail.fr
|
1e996fb446a8a6f447155af924cfcce43c75051a
|
d93ce8a57be61625c4259b41f860c596726bd2af
|
/src/main/java/soot/jimple/internal/AbstractLengthExpr.java
|
ba6724ba045698895c597dce3c13b71ea89a8339
|
[
"Apache-2.0"
] |
permissive
|
izgzhen/markii
|
81b67049ce817582736c8d630ec0e2cd12caa214
|
237a054a72f01121ce0fefac7532c1a39444e852
|
refs/heads/master
| 2023-05-06T00:24:48.026714
| 2021-04-14T17:41:27
| 2021-04-16T06:29:12
| 275,070,321
| 5
| 0
|
Apache-2.0
| 2021-04-16T06:29:13
| 2020-06-26T04:06:53
|
Java
|
UTF-8
|
Java
| false
| false
| 1,968
|
java
|
package soot.jimple.internal;
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1999 Patrick Lam
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
import soot.IntType;
import soot.Type;
import soot.UnitPrinter;
import soot.ValueBox;
import soot.jimple.ExprSwitch;
import soot.jimple.Jimple;
import soot.jimple.LengthExpr;
import soot.util.Switch;
@SuppressWarnings("serial")
public abstract class AbstractLengthExpr extends AbstractUnopExpr implements LengthExpr {
protected AbstractLengthExpr(ValueBox opBox) {
super(opBox);
}
public boolean equivTo(Object o) {
if (o instanceof AbstractLengthExpr) {
return opBox.getValue().equivTo(((AbstractLengthExpr) o).opBox.getValue());
}
return false;
}
/** Returns a hash code for this object, consistent with structural equality. */
public int equivHashCode() {
return opBox.getValue().equivHashCode();
}
public abstract Object clone();
public String toString() {
return Jimple.LENGTHOF + " " + opBox.getValue().toString();
}
public void toString(UnitPrinter up) {
up.literal(Jimple.LENGTHOF);
up.literal(" ");
opBox.toString(up);
}
public Type getType() {
return IntType.v();
}
public void apply(Switch sw) {
((ExprSwitch) sw).caseLengthExpr(this);
}
}
|
[
"7168454+izgzhen@users.noreply.github.com"
] |
7168454+izgzhen@users.noreply.github.com
|
b25b4a3f0941d85ee6b11ad5117a6d0de43b6ab1
|
8417d01f53bc35e710e85e35048b5b1f68a3c9b2
|
/src/main/java/org/py/translate/markdown/renderer/MarkdownContentWriter.java
|
69cc66326bb42b5003f5655e6fec0721e23eeb49
|
[] |
no_license
|
kana112233/translate-plugin-gradle
|
32b6bf19fe493b1448471bcf7c56b53995d03d94
|
c7f771b2ea2b5cf1fc2fbb74f2e2d225eed92a09
|
refs/heads/master
| 2020-05-19T02:11:14.536894
| 2019-07-03T12:21:18
| 2019-07-03T12:21:18
| 184,773,934
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,316
|
java
|
package org.py.translate.markdown.renderer;
import java.io.IOException;
public class MarkdownContentWriter {
private final Appendable buffer;
private char lastChar;
public MarkdownContentWriter(Appendable out) {
buffer = out;
}
public void whitespace() {
if (lastChar != 0 && lastChar != ' ') {
append(' ');
}
}
public void colon() {
if (lastChar != 0 && lastChar != ':') {
append(':');
}
}
public void line() {
if (lastChar != 0 && lastChar != '\n') {
append('\n');
}
}
public void writeStripped(String s) {
append(s.replaceAll("[\\r\\n\\s]+", " "));
}
public void write(String s) {
append(s);
}
public void write(char c) {
append(c);
}
private void append(String s) {
try {
buffer.append(s);
} catch (IOException e) {
throw new RuntimeException(e);
}
int length = s.length();
if (length != 0) {
lastChar = s.charAt(length - 1);
}
}
private void append(char c) {
try {
buffer.append(c);
} catch (IOException e) {
throw new RuntimeException(e);
}
lastChar = c;
}
}
|
[
"admin@example.com"
] |
admin@example.com
|
3eeaf8502029f3222ec04e4f101fa16b09c763ad
|
c474b03758be154e43758220e47b3403eb7fc1fc
|
/apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/com/tinder/enums/ReportCause.java
|
fc06a30f27cb0709f0483dedd89901b3bcdf6bb6
|
[] |
no_license
|
EstebanDalelR/tinderAnalysis
|
f80fe1f43b3b9dba283b5db1781189a0dd592c24
|
941e2c634c40e5dbf5585c6876ef33f2a578b65c
|
refs/heads/master
| 2020-04-04T09:03:32.659099
| 2018-11-23T20:41:28
| 2018-11-23T20:41:28
| 155,805,042
| 0
| 0
| null | 2018-11-18T16:02:45
| 2018-11-02T02:44:34
| null |
UTF-8
|
Java
| false
| false
| 669
|
java
|
package com.tinder.enums;
import android.support.annotation.NonNull;
@Deprecated
public enum ReportCause {
OTHER("OTHER", 0),
SPAM("SPAM", 1),
INAPPROPRIATE_PHOTOS("INAPPROPRIATE_PHOTOS", 4),
OFFLINE_BEHAVIOR("OFFLINE_BEHAVIOR", 5),
INAPPROPRIATE_MESSAGES("INAPPROPRIATE_MESSAGES", 6);
private final int intValue;
@NonNull
private final String mAnalyticsValue;
private ReportCause(String str, int i) {
this.mAnalyticsValue = str;
this.intValue = i;
}
public String getAnalyticsValue() {
return this.mAnalyticsValue;
}
public int getIntValue() {
return this.intValue;
}
}
|
[
"jdguzmans@hotmail.com"
] |
jdguzmans@hotmail.com
|
a1bce6b37f8ebc76802387239994654f50eb1fcc
|
547f667fc96ff43cad7d6b4372d7cd095ad8cc38
|
/src/main/java/edu/cmu/cs/stage3/alice/core/response/visualization/model/SetItem.java
|
4ea898f5fa738ddadbe3ea6eabcef37a8043f680
|
[
"BSD-2-Clause"
] |
permissive
|
ericpauley/Alice
|
ca01da9cd90ebe743d392522e1e283d63bdaa184
|
a0b732c548f051f5c99dd90ec9410866ba902479
|
refs/heads/master
| 2020-06-05T03:15:51.421453
| 2012-03-20T13:50:16
| 2012-03-20T13:50:16
| 2,081,310
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,679
|
java
|
package edu.cmu.cs.stage3.alice.core.response.visualization.model;
import edu.cmu.cs.stage3.alice.core.Model;
import edu.cmu.cs.stage3.alice.core.visualization.ModelVisualization;
import edu.cmu.cs.stage3.math.HermiteCubic;
import edu.cmu.cs.stage3.math.Matrix44;
import edu.cmu.cs.stage3.math.Quaternion;
public class SetItem extends ModelVisualizationWithItemAnimation {
public class RuntimeSetItem extends RuntimeModelVisualizationWithItemAnimation {
private Quaternion m_quaternion0;
private Quaternion m_quaternion1;
private HermiteCubic m_xHermite;
private HermiteCubic m_yHermite;
private HermiteCubic m_zHermite;
private ModelVisualization m_subject;
private Model m_value;
@Override
public void prologue(double t) {
m_subject = subject.getModelVisualizationValue();
m_value = item.getModelValue();
Model prev = m_subject.getItem();
if (prev != null && prev != m_value) {
prev.visualization.set(null);
}
if (m_value != null) {
// todo?
m_value.visualization.set(null);
Matrix44 transformation0 = m_value.getTransformation(m_subject);
Matrix44 transformation1 = new Matrix44(m_subject.getTransformationFor(m_value));
m_quaternion0 = transformation0.getAxes().getQuaternion();
m_quaternion1 = transformation1.getAxes().getQuaternion();
double dx = transformation0.m30 - transformation1.m30;
double dy = transformation0.m31 - transformation1.m31;
double dz = transformation0.m32 - transformation1.m32;
double distance = Math.sqrt(dx * dx + dy * dy + dz * dz);
double s = distance / 2;
m_xHermite = new HermiteCubic(transformation0.m30, transformation1.m30, transformation0.m20 * s, transformation1.m20 * s);
m_yHermite = new HermiteCubic(transformation0.m31, transformation1.m31, transformation0.m21 * s, transformation1.m21 * s);
m_zHermite = new HermiteCubic(transformation0.m32, transformation1.m32, transformation0.m22 * s, transformation1.m22 * s);
}
super.prologue(t);
}
@Override
public void update(double t) {
super.update(t);
if (m_value != null) {
double portion = getPortion(t);
double x = m_xHermite.evaluate(portion);
double y = m_yHermite.evaluate(portion);
double z = m_zHermite.evaluate(portion);
m_value.setPositionRightNow(x, y, z, m_subject);
edu.cmu.cs.stage3.math.Quaternion q = edu.cmu.cs.stage3.math.Quaternion.interpolate(m_quaternion0, m_quaternion1, getPortion(t));
m_value.setOrientationRightNow(q, m_subject);
}
}
@Override
public void epilogue(double t) {
super.epilogue(t);
m_subject.setItem(m_value);
}
}
}
|
[
"zonedabone@gmail.com"
] |
zonedabone@gmail.com
|
e8ed36b15f18a68b3634352b350e5242a8c7f5f7
|
e06df16478bc1ecd396319cfde5b6e1076581781
|
/app/src/main/java/com/jinke/housekeeper/saas/patrol/listener/IPatrolRecordListener.java
|
a6e83466c74f0d88335b1203064eac3a210c2bc1
|
[] |
no_license
|
632215/HouseKeeper
|
52c44ec439ea29e23c16f5a35e1c05d9799b6a87
|
05ba37d8e3f127b0ea46c96c43cda7c438f37cd2
|
refs/heads/master
| 2020-03-21T12:01:25.883436
| 2018-06-25T02:20:32
| 2018-06-25T02:20:32
| 138,533,070
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 253
|
java
|
package com.jinke.housekeeper.saas.patrol.listener;
/**
* function:
* author: hank
* date: 2017/7/25
*/
public interface IPatrolRecordListener<T> {
void onBackPatrolRecord(T t);
void onError(String code, String msg);
}
|
[
"weishaung@example.com"
] |
weishaung@example.com
|
eea1a23bf0dc3d006f9063c3cf19be2c9a87a29e
|
f9b8e87245ec19a1cb476504981411e208238fab
|
/src/main/java/de/fmi/framework/core/dao/DaoFactory.java
|
28dbdc6da1b6305f7f5654fd343499a0719643cc
|
[] |
no_license
|
HorstDerPfer/JpaSpringFaces
|
e58ddf18a798b7c26450ffe46ec7bbe5627927db
|
2a13ec5c6c46c13789a256ca67ff6987b5a51c33
|
refs/heads/master
| 2020-04-28T12:44:32.880471
| 2011-09-15T19:37:38
| 2011-09-15T19:37:38
| 2,394,818
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 441
|
java
|
package de.fmi.framework.core.dao;
import org.springframework.web.context.WebApplicationContext;
public class DaoFactory {
private WebApplicationContext wac;
private static DaoFactory instance;
private DaoFactory() {
}
public static DaoFactory getInstance() {
if (instance == null)
instance = new DaoFactory();
return instance;
}
public void setWebApplicationContext(WebApplicationContext wac) {
this.wac = wac;
}
}
|
[
"felix.michels@accel-gmbh.de"
] |
felix.michels@accel-gmbh.de
|
d1498b2986aa1a73c33f91cb281816fbc5ffe095
|
4e6473153ecde7c7451c94b60bac8836c94e424f
|
/baseio-jms/src/main/java/com/generallycloud/nio/container/jms/server/MessageWriterJob.java
|
874fabb4cac861b07c26568bcf12af802ab5d3cc
|
[] |
no_license
|
pengp/baseio
|
df07daee2dd2d25c7dbf03f3f6eba0a1768af897
|
dfb5215f4f22f451d80f2435c3e47fc37b4da5cc
|
refs/heads/master
| 2020-06-10T17:16:45.090864
| 2016-12-06T06:13:02
| 2016-12-06T06:13:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 822
|
java
|
package com.generallycloud.nio.container.jms.server;
import com.generallycloud.nio.common.Logger;
import com.generallycloud.nio.common.LoggerFactory;
import com.generallycloud.nio.container.jms.Message;
public class MessageWriterJob implements Runnable {
private static Logger logger = LoggerFactory.getLogger(MessageWriterJob.class);
private Consumer consumer ;
private Message message ;
private MQContext context ;
public MessageWriterJob(MQContext context, Consumer consumer, Message message) {
this.context = context;
this.consumer = consumer;
this.message = message;
}
public void run() {
try {
consumer.push(message);
context.consumerMessage(message);
} catch (Exception e) {
logger.error(e.getMessage(), e);
// 回炉
context.offerMessage(message);
}
}
}
|
[
"8738115@qq.com"
] |
8738115@qq.com
|
f49712c89c27c0a7b80ec514f884c864841bfb38
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project33/src/main/java/org/gradle/test/performance33_3/Production33_274.java
|
e020bdd435373d282f8d74b80b904c0ba8fd1bd6
|
[] |
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
| 305
|
java
|
package org.gradle.test.performance33_3;
public class Production33_274 extends org.gradle.test.performance13_3.Production13_274 {
private final String property;
public Production33_274() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
d65d4bebbeb94c01ddee2b78144a9c5e7a1eb1af
|
42ee249ee400463ed58aaea30160f2dd4b2bbb1e
|
/src/test/java/com/amhzing/participant/api/command/CreateParticipantCommandTest.java
|
436138531c8e905aac9a4a5a770c8749bc0c850b
|
[] |
no_license
|
VinodKandula/participant-microservice
|
0a975e4fcc4e296844369e240557d362882ba5dd
|
7ff0c868224877d4fc8cf0c6c7c26adab26238fe
|
refs/heads/master
| 2020-12-03T00:22:59.219653
| 2016-10-31T13:20:04
| 2016-10-31T13:20:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,386
|
java
|
package com.amhzing.participant.api.command;
import org.junit.Test;
import java.util.UUID;
import static com.amhzing.participant.helper.ParticipantApiModelHelper.*;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
public class CreateParticipantCommandTest {
private UUID uuid = UUID.randomUUID();
@Test
public void should_create_valid_command() {
final CreateParticipantCommand command = CreateParticipantCommand.create(uuid, name(), address(), contactNumber(), email());
assertThat(command.getName().getLastName()).isEqualTo("lName");
}
@Test(expected = NullPointerException.class)
public void should_fail_to_create_if_missing_id() {
CreateParticipantCommand.create(null, name(), address(), contactNumber(), email());
fail("Should not have gotten this far");
}
@Test(expected = NullPointerException.class)
public void should_fail_to_create_if_missing_name() {
CreateParticipantCommand.create(uuid, null, address(), contactNumber(), email());
fail("Should not have gotten this far");
}
@Test(expected = NullPointerException.class)
public void should_fail_to_create_if_missing_address() {
CreateParticipantCommand.create(uuid, name(), null, contactNumber(), email());
fail("Should not have gotten this far");
}
}
|
[
"mahanhz@gmail.com"
] |
mahanhz@gmail.com
|
adfc3fc2d9cbfee490dc36d154356a235b67ae3b
|
df290d57e06afa36cf9b33494b21ad3dcd62de8f
|
/pivo-services/src/test/java/pe/com/tintegro/services/test/SipTrunkServicesTest.java
|
03b8c58aeed7ef032a89150f97638f3f190a89ad
|
[] |
no_license
|
vgaray/sic-tintegro
|
ac766f28f0c8769fe8efb63498bc2f4e5ecf1500
|
ddb62bdaafe1d6d136c32a758e51eca92dcf365b
|
refs/heads/master
| 2022-12-21T15:14:06.168702
| 2019-09-30T02:09:35
| 2019-09-30T02:09:35
| 211,740,401
| 0
| 0
| null | 2022-12-16T07:46:49
| 2019-09-29T23:40:44
|
Java
|
UTF-8
|
Java
| false
| false
| 1,424
|
java
|
package pe.com.tintegro.services.test;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import pe.com.tintegro.dominio.SipTrunk;
import pe.com.tintegro.dto.request.ListaSipTrunkRequest;
import pe.com.tintegro.dto.response.ListaSipTrunkResponse;
import pe.com.tintegro.services.SipTrunkServices;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations =
{ "classpath*:/pe/com/tintegro/config/applicationContext.xml" })
public class SipTrunkServicesTest
{
@Autowired
SipTrunkServices sipTrunkServices;
// @Test
public void listarSipTrunk()
{
try
{
ListaSipTrunkRequest request = new ListaSipTrunkRequest();
request.setIdSipTrunk(8);
ListaSipTrunkResponse response = sipTrunkServices.listaSipTrunk("cli", "jPfFl7Jg2rg", request);
for (SipTrunk sipTrunk : response.getListaSipTrunk())
{
System.out.println(sipTrunk.getHostSaliente());
}
}
catch (Exception e)
{
// TODO: handle exception
}
}
@Test
public void generarSipTrunkTxtTest()
{
try
{
String cont = sipTrunkServices.generarSipTrunkTxt("cli", "jPfFl7Jg2rg");
System.out.print(cont);
}
catch (Exception e)
{
// TODO: handle exception
System.out.print(e.getMessage());
}
}
}
|
[
"victorgaray1296.vg@gmail.com"
] |
victorgaray1296.vg@gmail.com
|
6757679c465139f6fd9f7003aa50919c6fd8522b
|
88529b98c0dbc869b21eb6f419e92df89adaad6b
|
/app/src/main/java/com/example/administrator/pandachannels/fragmentchinese/fragmentclassify/Funghwang_fragment.java
|
b239dcb56b09661a34d4a65650cb894161c43fce
|
[] |
no_license
|
hh415415/PandaChannelss
|
6468db54eb1cc7d8e07d4a9390e17d6a9322cc9a
|
778d885918440474c64c1dda0ff8eeca3a44f18c
|
refs/heads/master
| 2021-05-05T18:46:10.256366
| 2017-09-16T10:53:27
| 2017-09-16T10:53:27
| 103,745,343
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,064
|
java
|
package com.example.administrator.pandachannels.fragmentchinese.fragmentclassify;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.example.administrator.pandachannels.R;
import com.example.administrator.pandachannels.framework.baseview.BaseFragment;
public class Funghwang_fragment extends BaseFragment {
private TextView ddf;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_funghwang_fragment, container, false);
initView(view);
return view;
}
@Override
protected void initView(View view) {
ddf = (TextView) view.findViewById(R.id.ddf);
}
@Override
protected int getLayout() {
return R.layout.fragment_funghwang_fragment;
}
@Override
protected void initData() {
}
}
|
[
"1282775652@QQ.com"
] |
1282775652@QQ.com
|
bd57c351c148693d27c6e638a0f2e0bb81ca0913
|
1314a08f65938dc6d850a8680b163b3e7183a14f
|
/src/com/redmoon/oa/flow/macroctl/CityCtl.java
|
dc7be2ecc01f64b1e622c75dc2f7bec83d2825d8
|
[] |
no_license
|
wuce7758/yimioa
|
02bb7eef481c1daa2c65dd1002f8a2e36f1bb3e6
|
07862525a6deaf09559339e73b4c8dcb15b8e232
|
refs/heads/master
| 2020-06-28T11:26:19.357340
| 2019-04-18T14:07:39
| 2019-04-18T14:07:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,675
|
java
|
package com.redmoon.oa.flow.macroctl;
import java.sql.SQLException;
import javax.servlet.http.HttpServletRequest;
import cn.js.fan.db.ResultIterator;
import cn.js.fan.db.ResultRecord;
import cn.js.fan.util.StrUtil;
import com.cloudwebsoft.framework.db.JdbcTemplate;
import com.cloudwebsoft.framework.util.LogUtil;
import com.redmoon.oa.flow.FormField;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2007</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class CityCtl extends AbstractMacroCtl{
public CityCtl() {
}
public String convertToHTMLCtl(HttpServletRequest request, FormField ff) {
String str = "";
String rid = ff.getName(); // String)request.getAttribute("province_city_country_id");
str += "<select id='" + ff.getName() + "' name='" + ff.getName() + "' onchange=\"if (this.value!='') ajaxShowCityCountry" + rid + "('',this.value)\">";
str += "<option value=''>无</option>";
if (ff.getValue()!=null && !ff.getValue().equals("")) {
try {
JdbcTemplate jt = new JdbcTemplate();
String sql =
"select parent_id from oa_china_region where region_id=" +
ff.getValue();
int parent_id = -1;
ResultIterator ri = jt.executeQuery(sql);
if (ri.hasNext()) {
ResultRecord rr = (ResultRecord) ri.next();
parent_id = rr.getInt(1);
}
sql = "select region_id,region_name from oa_china_region where region_type=2 and parent_id=" + parent_id
+ " order by region_id";
ri = jt.executeQuery(sql);
while (ri.hasNext()) {
ResultRecord rr = (ResultRecord) ri.next();
str += "<option value='" + rr.getInt(1) + "'>" +
rr.getString(2) +
"</option>";
}
} catch (SQLException e) {
LogUtil.getLog(getClass()).error(StrUtil.trace(e));
}
}
str += "</select>";
return str;
}
public String converToHtml(HttpServletRequest request, FormField ff, String fieldValue) {
if (fieldValue==null || "".equals(fieldValue)) {
return "";
}
try {
String sql = "select region_name from oa_china_region where region_id=" + fieldValue;
JdbcTemplate jt = new JdbcTemplate();
ResultIterator ri = jt.executeQuery(sql);
if (ri.hasNext()) {
ResultRecord rr = (ResultRecord) ri.next();
fieldValue = rr.getString(1);
}
}
catch (SQLException e) {
LogUtil.getLog(getClass()).error(StrUtil.trace(e));
}
return fieldValue;
}
/**
* 当report时,取得用来替换控件的脚本
* @param ff FormField
* @return String
*/
public String getReplaceCtlWithValueScript(FormField ff) {
String v = "";
String regionId = StrUtil.getNullStr(ff.getValue());
if (!regionId.equals("")) {
try {
String sql = "select region_name from oa_china_region where region_id=" + regionId;
JdbcTemplate jt = new JdbcTemplate();
ResultIterator ri = jt.executeQuery(sql);
if (ri.hasNext()) {
ResultRecord rr = (ResultRecord) ri.next();
v = rr.getString(1);
}
}
catch (SQLException e) {
LogUtil.getLog(getClass()).error(StrUtil.trace(e));
}
}
return "ReplaceCtlWithValue('" + ff.getName() +"', '" + ff.getType() + "','" + v + "');\n";
}
/**
* 获取用来保存宏控件toHtml后的值的表单中的HTML元素中保存的值,生成用以禁用控件的脚本
* @return String
*/
public String getDisableCtlScript(FormField ff, String formElementId) {
String v = "";
String regionId = StrUtil.getNullStr(ff.getValue());
if (!regionId.equals("")) {
try {
String sql = "select region_name from oa_china_region where region_id=" + regionId;
JdbcTemplate jt = new JdbcTemplate();
ResultIterator ri = jt.executeQuery(sql);
if (ri.hasNext()) {
ResultRecord rr = (ResultRecord) ri.next();
v = rr.getString(1);
}
}
catch (SQLException e) {
LogUtil.getLog(getClass()).error(StrUtil.trace(e));
}
}
String str = "DisableCtl('" + ff.getName() + "', '" + ff.getType() +
"','" + v + "','" + regionId + "');\n";
return str;
}
/**
* 根据名称取值,用于导入Excel数据
* @return
*/
public String getValueByName(FormField ff, String name) {
String fieldValue="";
try {
String sql = "select region_id from oa_china_region where region_name='" + name + "'";
JdbcTemplate jt = new JdbcTemplate();
ResultIterator ri = jt.executeQuery(sql);
if (ri.hasNext()) {
ResultRecord rr = (ResultRecord) ri.next();
fieldValue = rr.getString(1);
}
}
catch (SQLException e) {
LogUtil.getLog(getClass()).error(StrUtil.trace(e));
}
return fieldValue;
}
public String getControlType() {
return "text";
}
public String getControlValue(String userName, FormField ff) {
return ff.getValue();
}
public String getControlText(String userName, FormField ff) {
String fieldValue = ff.getValue();
if (fieldValue==null || "".equals(fieldValue)) {
return "";
}
try {
String sql = "select region_name from oa_china_region where region_id=" + fieldValue;
JdbcTemplate jt = new JdbcTemplate();
ResultIterator ri = jt.executeQuery(sql);
if (ri.hasNext()) {
ResultRecord rr = (ResultRecord) ri.next();
fieldValue = rr.getString(1);
}
}
catch (SQLException e) {
LogUtil.getLog(getClass()).error(StrUtil.trace(e));
}
return fieldValue;
}
public String getControlOptions(String userName, FormField ff) {
return "";
}
}
|
[
"bestfeng@163.com"
] |
bestfeng@163.com
|
78c43a094bf4b4bb08c2c44d1cf320c0386ef658
|
3eb706124f6cf45a523a5494db305974a020c18e
|
/src/main/java/Dimensions.java
|
554abc568eb7993c8cfe722e9f3a33bb8e71bf38
|
[] |
no_license
|
RichardInnocent/ConnectN
|
e069e47b4985a3808e61b77a7f8e423d0bdcc68d
|
22fc214714dda540107285af04984b07055fc851
|
refs/heads/master
| 2023-03-30T22:52:08.838430
| 2021-04-01T12:26:06
| 2021-04-01T12:26:06
| 323,468,051
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,079
|
java
|
import java.util.Objects;
/**
* A set of dimensions with a width and height.
*/
public final class Dimensions {
private final int width;
private final int height;
/**
* Creates a new dimensions instance with the given width and height.
* @param width The width.
* @param height The height.
*/
public Dimensions(int width, int height) {
this.width = width;
this.height = height;
}
/**
* Gets the width.
* @return The width.
*/
public int getWidth() {
return width;
}
/**
* Gets the height.
* @return The height.
*/
public int getHeight() {
return height;
}
@Override
public String toString() {
return "[" + width + ", " + height + "]";
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Dimensions that = (Dimensions) o;
return width == that.width && height == that.height;
}
@Override
public int hashCode() {
return Objects.hash(width, height);
}
}
|
[
"richardinnocent@sky.com"
] |
richardinnocent@sky.com
|
3f239d673f340bdb41ee25148a1e9b30433196f7
|
106f03c056dfc0cd6f888041f8fcd296a1c1c787
|
/module/01.web/src/com/gxx/record/entities/wedisle/WedisleSeatInfo.java
|
4c45d44b3e9ca066b002be78701b21aad4c71439
|
[] |
no_license
|
GuanXianghui/wedisle
|
d41d0b4128b3e8e2f916469b781daf5f4d2ba872
|
f6a073eb717d3d27493432b50fe3523b0296d9f2
|
refs/heads/master
| 2021-01-19T15:40:34.910491
| 2014-03-26T01:44:27
| 2014-03-26T01:44:27
| 18,000,286
| 0
| 1
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,314
|
java
|
package com.gxx.record.entities.wedisle;
/**
* 席位信息
* User: Gxx
* Time: 2013-11-02 10:18
*/
public class WedisleSeatInfo
{
/**
* 初始化桌数
*/
public static final int DEFAULT_TABLE_COUNT = 5;
/**
* 初始化每桌人数
*/
public static final int DEFAULT_NUM_EVERY_TABLE = 5;
/**
* 用户ID 不为空
*/
int userId;
/**
* 桌数 不为空 初始5
*/
int tableCount;
/**
* 每桌人数 不为空 初始5
*/
int numEveryTable;
/**
* 构造函数
* @param userId
* @param tableCount
* @param numEveryTable
*/
public WedisleSeatInfo(int userId, int tableCount, int numEveryTable) {
this.userId = userId;
this.tableCount = tableCount;
this.numEveryTable = numEveryTable;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public int getTableCount() {
return tableCount;
}
public void setTableCount(int tableCount) {
this.tableCount = tableCount;
}
public int getNumEveryTable() {
return numEveryTable;
}
public void setNumEveryTable(int numEveryTable) {
this.numEveryTable = numEveryTable;
}
}
|
[
"419066357@163.com"
] |
419066357@163.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.