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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8aa7ee1beae82c12fb26226072ffd3a863eee240
|
5456502f97627278cbd6e16d002d50f1de3da7bb
|
/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemRow.java
|
b2109d737b0cb85a6e76a025257eef6d0316577c
|
[
"BSD-3-Clause"
] |
permissive
|
TrellixVulnTeam/Chromium_7C66
|
72d108a413909eb3bd36c73a6c2f98de1573b6e5
|
c8649ab2a0f5a747369ed50351209a42f59672ee
|
refs/heads/master
| 2023-03-16T12:51:40.231959
| 2017-12-20T10:38:26
| 2017-12-20T10:38:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,913
|
java
|
// Copyright 2015 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.chrome.browser.bookmarks;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.support.v4.graphics.drawable.RoundedBitmapDrawable;
import android.support.v4.graphics.drawable.RoundedBitmapDrawableFactory;
import android.util.AttributeSet;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.bookmarks.BookmarkBridge.BookmarkItem;
import org.chromium.chrome.browser.favicon.LargeIconBridge.LargeIconCallback;
import org.chromium.chrome.browser.widget.RoundedIconGenerator;
import org.chromium.components.bookmarks.BookmarkId;
/**
* A row view that shows bookmark info in the bookmarks UI.
*/
public class BookmarkItemRow extends BookmarkRow implements LargeIconCallback {
private String mUrl;
private RoundedIconGenerator mIconGenerator;
private final int mMinIconSize;
private final int mDisplayedIconSize;
private final int mCornerRadius;
/**
* Constructor for inflating from XML.
*/
public BookmarkItemRow(Context context, AttributeSet attrs) {
super(context, attrs);
mCornerRadius = getResources().getDimensionPixelSize(R.dimen.default_favicon_corner_radius);
mMinIconSize = (int) getResources().getDimension(R.dimen.default_favicon_min_size);
mDisplayedIconSize = getResources().getDimensionPixelSize(R.dimen.default_favicon_size);
int textSize = getResources().getDimensionPixelSize(R.dimen.default_favicon_icon_text_size);
int iconColor = ApiCompatibilityUtils.getColor(
getResources(), R.color.default_favicon_background_color);
mIconGenerator = new RoundedIconGenerator(mDisplayedIconSize , mDisplayedIconSize,
mCornerRadius, iconColor, textSize);
}
// BookmarkRow implementation.
@Override
public void onClick() {
int launchLocation = -1;
switch (mDelegate.getCurrentState()) {
case BookmarkUIState.STATE_FOLDER:
launchLocation = BookmarkLaunchLocation.FOLDER;
break;
case BookmarkUIState.STATE_LOADING:
assert false :
"The main content shouldn't be inflated if it's still loading";
break;
default:
assert false : "State not valid";
break;
}
mDelegate.openBookmark(mBookmarkId, launchLocation);
}
@Override
BookmarkItem setBookmarkId(BookmarkId bookmarkId) {
BookmarkItem item = super.setBookmarkId(bookmarkId);
mUrl = item.getUrl();
mIconImageView.setImageDrawable(null);
mTitleView.setText(item.getTitle());
mDelegate.getLargeIconBridge().getLargeIconForUrl(mUrl, mMinIconSize, this);
return item;
}
// LargeIconCallback implementation.
@Override
public void onLargeIconAvailable(
Bitmap icon, int fallbackColor, boolean isFallbackColorDefault) {
if (icon == null) {
mIconGenerator.setBackgroundColor(fallbackColor);
icon = mIconGenerator.generateIconForUrl(mUrl);
mIconImageView.setImageDrawable(new BitmapDrawable(getResources(), icon));
} else {
RoundedBitmapDrawable roundedIcon = RoundedBitmapDrawableFactory.create(
getResources(),
Bitmap.createScaledBitmap(icon, mDisplayedIconSize, mDisplayedIconSize, false));
roundedIcon.setCornerRadius(mCornerRadius);
mIconImageView.setImageDrawable(roundedIcon);
}
}
}
|
[
"lixiaodonglove7@aliyun.com"
] |
lixiaodonglove7@aliyun.com
|
bf2d6c4b806c5f485a1df7ce14ba913ffb6c4d9e
|
10eec5ba9e6dc59478cdc0d7522ff7fc6c94cd94
|
/callmgrd/src/main/java/com/android/mockcdma/b.java
|
d7bd31e443292e2a175a0d6acd63dcb7726ad55f
|
[] |
no_license
|
EchoAGI/Flexispy.re
|
a2f5fec409db083ee3fe0d664dc2cca7f9a4f234
|
ba65a5b8b033b92c5867759f2727c5141b7e92fc
|
refs/heads/master
| 2023-04-26T02:52:18.732433
| 2018-07-16T07:46:56
| 2018-07-16T07:46:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,130
|
java
|
package com.android.mockcdma;
import android.util.SparseBooleanArray;
public class b
extends f
{
private static final char[] h;
private static final char[] i;
private static final SparseBooleanArray j;
public int a;
public int b;
public int c;
public int d;
static
{
Object localObject1 = new char[12];
localObject1[0] = 48;
localObject1[1] = 49;
localObject1[2] = 50;
localObject1[3] = 51;
localObject1[4] = 52;
localObject1[5] = 53;
localObject1[6] = 54;
localObject1[7] = 55;
localObject1[8] = 56;
localObject1[9] = 57;
localObject1[10] = 42;
localObject1[11] = 35;
h = (char[])localObject1;
localObject1 = new char[8];
localObject1[0] = 40;
localObject1[1] = 41;
localObject1[2] = 32;
localObject1[3] = 45;
localObject1[4] = 43;
localObject1[5] = 46;
localObject1[6] = 47;
localObject1[7] = 92;
i = (char[])localObject1;
localObject1 = new android/util/SparseBooleanArray;
Object localObject2 = h;
int k = localObject2.length;
char[] arrayOfChar = i;
int m = arrayOfChar.length;
k += m;
((SparseBooleanArray)localObject1).<init>(k);
j = (SparseBooleanArray)localObject1;
int n = 0;
localObject1 = null;
for (;;)
{
localObject2 = h;
k = localObject2.length;
if (n >= k) {
break;
}
localObject2 = j;
arrayOfChar = h;
m = arrayOfChar[n];
boolean bool = true;
((SparseBooleanArray)localObject2).put(m, bool);
n += 1;
}
n = 0;
localObject1 = null;
for (;;)
{
localObject2 = i;
k = localObject2.length;
if (n >= k) {
break;
}
localObject2 = j;
arrayOfChar = i;
m = arrayOfChar[n];
((SparseBooleanArray)localObject2).put(m, false);
n += 1;
}
}
public String toString()
{
StringBuilder localStringBuilder = new java/lang/StringBuilder;
localStringBuilder.<init>();
localStringBuilder.append("CdmaSmsAddress ");
Object localObject = new java/lang/StringBuilder;
((StringBuilder)localObject).<init>();
localObject = ((StringBuilder)localObject).append("{ digitMode=");
int k = this.a;
localObject = k;
localStringBuilder.append((String)localObject);
localObject = new java/lang/StringBuilder;
((StringBuilder)localObject).<init>();
localObject = ((StringBuilder)localObject).append(", numberMode=");
k = this.b;
localObject = k;
localStringBuilder.append((String)localObject);
localObject = new java/lang/StringBuilder;
((StringBuilder)localObject).<init>();
localObject = ((StringBuilder)localObject).append(", numberPlan=");
k = this.d;
localObject = k;
localStringBuilder.append((String)localObject);
localObject = new java/lang/StringBuilder;
((StringBuilder)localObject).<init>();
localObject = ((StringBuilder)localObject).append(", numberOfDigits=");
k = this.c;
localObject = k;
localStringBuilder.append((String)localObject);
localObject = new java/lang/StringBuilder;
((StringBuilder)localObject).<init>();
localObject = ((StringBuilder)localObject).append(", ton=");
k = this.e;
localObject = k;
localStringBuilder.append((String)localObject);
localObject = new java/lang/StringBuilder;
((StringBuilder)localObject).<init>();
localObject = ((StringBuilder)localObject).append(", address=\"");
String str = this.f;
localObject = str + "\"";
localStringBuilder.append((String)localObject);
localObject = new java/lang/StringBuilder;
((StringBuilder)localObject).<init>();
localObject = ((StringBuilder)localObject).append(", origBytes=");
str = d.a(this.g);
localObject = str;
localStringBuilder.append((String)localObject);
localStringBuilder.append(" }");
return localStringBuilder.toString();
}
}
/* Location: /Volumes/D1/codebase/android/POC/assets/product/callmgr/classes-enjarify.jar!/com/android/mockcdma/b.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/
|
[
"52388483@qq.com"
] |
52388483@qq.com
|
6b710e5556dbe7572de6410dbf4bbc1163af12be
|
f2fb56cdd06f69f87e29006b5c88913b20304f95
|
/01_Activities_e_Intents/IntentImplicitoBrowser/app/src/androidTest/java/com/salesianostriana/dam/pmdm/intentimplicitobrowser/ApplicationTest.java
|
000b02d5c925e5f706df3fb162d19c26d3ed4d43
|
[] |
no_license
|
miguelcamposdev/pmdm
|
80e701207ae5c95d9148bb3d86566dac63220b7d
|
dba22ff3557ef57eb75844e132cf774577c95bc3
|
refs/heads/master
| 2021-05-30T13:45:03.899816
| 2016-02-11T08:46:33
| 2016-02-11T08:46:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 383
|
java
|
package com.salesianostriana.dam.pmdm.intentimplicitobrowser;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
|
[
"camposmiguel@gmail.com"
] |
camposmiguel@gmail.com
|
66f7581df786391a3312379e104561ae2f08d23e
|
3c36bd839e06a868102766402e2e3810e55304de
|
/DIGICCY-Component/src/main/java/com/inesv/digiccy/util/UserCardIdUtil.java
|
e479e2db5ac2d2cb0d0f07a218961586d576bffc
|
[] |
no_license
|
utike/guirenwang
|
7759d30af1d202f8e356f9e65b6a40b3f5ec533f
|
0bb9628175c2654db1a472bd8ca276c688a1ea3b
|
refs/heads/master
| 2021-01-23T23:56:31.965236
| 2017-10-21T06:55:27
| 2017-10-21T06:55:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,756
|
java
|
package com.inesv.digiccy.util;
import java.util.List;
import java.util.Map;
import com.alibaba.fastjson.JSON;
import com.inesv.digiccy.api.utils.PropertiesUtil;
import jodd.http.HttpRequest;
import jodd.http.HttpResponse;
public class UserCardIdUtil {
private static final String key = PropertiesUtil.getPropertiesValue("componentKey.properties", "chinadatapayKey");
private static final String chinadatapayUrl = PropertiesUtil.getPropertiesValue("componentKey.properties", "chinadatapayUrl");
/**
*
* @param name 用户名
* @param idcard 用户身份证好
* @return map结果示例如下
* {"code":"10000","message":"成功","data":{"result":"1"},"seqNo":"LD76907Y1708181641"}
* 名称 错误码 说明
* code 10001 报文错误(包含MAC验证错误)
* code 10002 系统错误
* code 10000 成功
* code 10005 系统超时
* code 10006 系统繁忙
* code 10003 系统异常
* code 10004 尚未开通此业务
* code 10007 非法地址
* result 1 验证一致
* result 2 验证不一致
* result 3 异常情况
*/
public static Map<String, Object> validateCardId(String name, String idcard) {
HttpRequest request = HttpRequest.post(chinadatapayUrl);
request.form("key", key);
request.form("name", name);
request.form("idcard", idcard);
HttpResponse response = request.send();
String respJson = response.bodyText();
Map<String, Object> respMap = JSON.parseObject(respJson, Map.class);
return respMap;
}
}
|
[
"18819230126@139.com"
] |
18819230126@139.com
|
e32a52fa22d5cd3cfd04e4b3e2e5671338131777
|
1ecf05f47b8fd019b3aec21ed19d1db23ba25e52
|
/javafx_trayicon/src/main/java/example/applications/TestBareFXTrayIcon.java
|
abd6603837c6aee8e370ce9454bd7f1650d00800
|
[
"MIT"
] |
permissive
|
paddlelaw/selenium_java
|
3db82a33af9964ff2d222bf0a841d07e47f21ab9
|
3dfa0706a500fcd437181ddf7181c54223cdba28
|
refs/heads/master
| 2023-07-13T21:07:06.470189
| 2021-08-14T04:43:38
| 2021-08-14T04:43:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,649
|
java
|
package example.applications;
import example.FXTrayIcon;
/*
* Copyright (c) 2021 Dustin K. Redmond & contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
import javafx.application.Application;
import javafx.stage.Stage;
public class TestBareFXTrayIcon extends Application {
@Override
public void start(Stage stage) throws Exception {
stage.setTitle("Test FXTrayIcon with empty menu");
FXTrayIcon trayIcon = new FXTrayIcon(stage,
getClass().getResource("icons8-link-64.png"));
trayIcon.show();
}
public static void main(String[] args) {
Application.launch(TestBareFXTrayIcon.class);
}
}
|
[
"kouzmine_serguei@yahoo.com"
] |
kouzmine_serguei@yahoo.com
|
4af331b534a9599975ee0e37e0baa46b52c030a7
|
76e574615c61dc1b967696ae526d73123beebc05
|
/ksghi-manageSystem/src/main/java/com/itech/ups/app/business/website/news/application/service/NewsService.java
|
fe613ea34f194b43ec7f28390a3185d4e2de845c
|
[] |
no_license
|
happyjianguo/ksghi
|
10802f386d82b97e530bfcf3a4f765cb654a411c
|
6df11c7453883c7b0dd1763de5bb11ff02dba8ce
|
refs/heads/master
| 2022-11-08T18:54:06.289842
| 2020-05-17T08:23:47
| 2020-05-17T08:23:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 893
|
java
|
package com.itech.ups.app.business.website.news.application.service;
import com.itech.ups.app.news.application.domain.News;
import java.util.List;
import java.util.Map;
/*
* ===========================================================================
* Copyright 2007 WEBTRANING Corp. All Rights Reserved.
* WEBTRANING PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
* ===========================================================================
* @version 1.0, 2014-4-5
* @author zqs
* ===========================================================================
*
*/
public interface NewsService {
News addNews(News news);
News editNews(News news);
@SuppressWarnings({"rawtypes"})
List<News> findNews(Map params, int rowStart, int rowEnd);
News findNews(String id);
@SuppressWarnings("rawtypes")
long findNewsTotalCount(Map params);
}
|
[
"weiliejun@163.com"
] |
weiliejun@163.com
|
39829a0becdc69f2d7c631d70543859629962e9d
|
c6de2274fc8e80fcb4fb273be91f609d8bd536b8
|
/src/main/java/org/fao/fenix/web/modules/amis/common/vo/.svn/text-base/AMISConstantsVO.java.svn-base
|
4d420dbaf656c886acfbb1adcba6d85bf9129879
|
[] |
no_license
|
FENIX-Platform-Projects/amis-statistics-legacy
|
d583f7db5e07ce4d8b0afcf5795291422d31754d
|
b51ff91efab51113e03b2e1cf21eb70f0ca24ce1
|
refs/heads/master
| 2021-06-10T05:12:20.671404
| 2017-01-31T12:56:19
| 2017-01-31T12:57:16
| 63,598,791
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,132
|
package org.fao.fenix.web.modules.amis.common.vo;
import java.util.ArrayList;
import java.util.List;
import org.fao.fenix.web.modules.amis.client.control.download.AMISFoodBalanceDownloadController;
import org.fao.fenix.web.modules.amis.common.constants.AMISConstants;
import com.google.gwt.user.client.rpc.IsSerializable;
public class AMISConstantsVO implements IsSerializable {
public static void setLanguageSettings(AMISQueryVO p) {
p.setLanguage(AMISConstants.defaultLanguage);
}
/*public static void setFAOSTATDBSettings(AMISQueryVO p) {
p.setDbDriver("com.microsoft.sqlserver.jdbc.SQLServerDriver");
p.setConnectionDriver("JDBC");
p.setDatasource("FAOSTAT");
p.setDbUrl("jdbc:sqlserver://");
p.setDbServerName("FAOSTAT-PROD\\Production");
p.setDbName("Warehouse");
p.setDbUserName("Warehouse");
p.setDbPassword("w@reh0use");
String connection = ""+p.getDbUrl()+p.getDbServerName()+";databaseName="+p.getDbName()+";";
//"jdbc:sqlserver://FAOSTAT-PROD\\Production;databaseName=Warehouse;"
p.setConnectionString(connection);
//System.out.println("AMISConstantVO Url = "+p.getConnectionString());
// remove languages
p.setLanguage(AMISConstants.defaultLanguage);
}*/
// public static void selectLabels(AMISQueryVO p, Boolean addCodes, Boolean addFlag, Boolean addMeasurementUnit) {
// List<String> selects = new ArrayList<String>();
//
// System.out.println("addCodes: " + addCodes);
// System.out.println("addFlag: " + addFlag);
// System.out.println("addMeasurementUnit: " + addMeasurementUnit);
//
// if(p.getSelectedDataset().equals(AMISConstants.FAOSTAT.toString()))
// {
// if ( addCodes )
// selects.add("D.AreaCode");
//
// selects.add("A.AreaName" + AMISConstants.defaultLanguage);
//
// if ( addCodes )
// selects.add("D.ItemCode");
//
// selects.add("I.ItemName" + AMISConstants.defaultLanguage);
//
// if ( addCodes )
// selects.add("D.ElementCode");
//
// selects.add("E.ElementName" + AMISConstants.defaultLanguage);
//
// if ( addMeasurementUnit )
// selects.add("E.UnitName" + AMISConstants.defaultLanguage);
//
// if ( addFlag ) {
// selects.add("F.FlagDescription" + AMISConstants.defaultLanguage);
// }
//
// selects.add("D.Year");
// selects.add("D.Value");
// }
// else
// {
//// country | text |
//// product | text |
//// element | text |
//// year | date |
//// value | double precision |
//// countrycode | text |
//// elementcode | text |
//// productcode | text |
//
// //For PSD AND CCBS
// if ( addCodes )
// selects.add("D.countrycode");
//
// selects.add("D.country");
//
// if ( addCodes )
// selects.add("D.productcode");
//
// selects.add("D.product");
//
// if ( addCodes )
// selects.add("D.elementcode");
//
// selects.add("D.element");
//
// if ( addMeasurementUnit )
// selects.add("E.unitname" + AMISConstants.defaultLanguage);
//
//// if ( addFlag ) {
//// selects.add("F.FlagDescription" + AMISConstants.defaultLanguage);
//// }
//
// selects.add("D.year");
// selects.add("D.value");
// }
//
// p.setSelects(selects);
//
// System.out.println("Class: AmisConstantVo Function: SELECTS:selectLabels Text:Select " + selects);
// }
public static void setFoodBalanceSelects(AMISQueryVO p) {
List<String> selects = new ArrayList<String>();
selects.add("D.database");
if(AMISFoodBalanceDownloadController.selectedByOptionModel==null || AMISFoodBalanceDownloadController.selectedByOptionModel.getCode()=="COUNTRY"
|| AMISFoodBalanceDownloadController.selectedByOptionModel.getCode()=="DATASOURCE"){
selects.add("D.region_name");
selects.add("D.product_name");
}
else if(AMISFoodBalanceDownloadController.selectedByOptionModel!=null || AMISFoodBalanceDownloadController.selectedByOptionModel.getCode()=="PRODUCT"){
selects.add("D.product_name");
selects.add("D.region_name");
}
selects.add("D.element_code");
// selects.add("D.element_name || ' - ' || D.units ");
selects.add("D.year_label");
// selects.add("ROUND(CAST(D.value as numeric), 1) ");
selects.add("ROUND(CAST(D.value as numeric), 2) ");
//selects.add("D.element_name ");
p.setSelects(selects);
//System.out.println("Class: AmisConstantVo Function: setFoodBalanceSelects Text:Select " + selects);
}
public static void setSelects(AMISQueryVO p, Boolean addCodes, Boolean addMeasurementUnit) {
List<String> selects = new ArrayList<String>();
System.out.println("Class: AmisConstantVo Function: SELECTS:selectLabels Text:addCodes: " + addCodes);
// System.out.println("Class: AmisConstantVo Function: SELECTS:selectLabels Text:addFlag: " + addFlag);
System.out.println("Class: AmisConstantVo Function: SELECTS:selectLabels Text:addMeasurementUnit: " + addMeasurementUnit);
selects.add("database");
if ( addCodes )
selects.add("D.region_code");
selects.add("D.region_name");
if ( addCodes )
selects.add("D.product_code");
selects.add("D.product_name");
if ( addCodes )
selects.add("D.element_code");
selects.add("D.element_name");
if ( addMeasurementUnit )
selects.add("D.units");
selects.add("D.year_label");
selects.add("D.value");
p.setSelects(selects);
System.out.println("Class: AmisConstantVo Function: SELECTS:selectLabels Text:Select " + selects);
}
public static void setTableHeaders(AMISQueryVO p, Boolean addCodes, Boolean addMeasurementUnit) {
List<String> tableHeaders = new ArrayList<String>();
System.out.println("Class: AmisConstantVo Function: setTableHeaders Text:addCodes: " + addCodes);
// System.out.println("Class: AmisConstantVo Function: setTableHeaders Text:addFlag: " + addFlag);
System.out.println("Class: AmisConstantVo Function: setTableHeaders Text:addMeasurementUnit: " + addMeasurementUnit);
tableHeaders.add("Data Source");
if ( addCodes )
tableHeaders.add("Country/Region Code");
tableHeaders.add("Country/Region Name");
if ( addCodes )
tableHeaders.add("Product Code");
tableHeaders.add("Product Name");
if ( addCodes )
tableHeaders.add("Element Code");
tableHeaders.add("Element Name");
if ( addMeasurementUnit )
tableHeaders.add("Units");
tableHeaders.add("Year");
tableHeaders.add("Value");
p.setTableHeaders(tableHeaders);
System.out.println("Class: AmisConstantVo Function: setTableHeaders Text:Select " + tableHeaders);
}
public static void setOrderBys(AMISQueryVO p) {
List<String> orderBys = new ArrayList<String>();
orderBys.add("D.database");
orderBys.add("D.region_name");
orderBys.add("D.product_name");
orderBys.add("D.element_name");
orderBys.add("D.year_label");
// orderBys.add("D.year");
p.setOrderBys(orderBys);
System.out.println("Class: AmisConstantVo Function: orderBys Text:Select " + orderBys);
}
}
|
[
"fabrizio.castelli@fao.org"
] |
fabrizio.castelli@fao.org
|
|
bf2edad00ed309b0bb249e0e3badf6db6951b542
|
6b2542400a56de686a7f84978fd6df4c45fc056a
|
/app-service/src/main/java/com/blackstrawai/ar/ArBalanceUpdateThread.java
|
ff601b1fe1d7c97ffb37be3b4d8fd428184fa5a5
|
[] |
no_license
|
BhargavMaddikera-BM/erp_fintech
|
adb6f2bb8b9b4e555930a1714b90a57603cc055c
|
ea78162e490f46adb998ca8a4e935c2aa144a753
|
refs/heads/master
| 2023-03-14T15:40:04.206288
| 2021-02-26T09:23:48
| 2021-02-26T09:23:48
| 342,523,642
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,028
|
java
|
package com.blackstrawai.ar;
import com.blackstrawai.ApplicationRuntimeException;
public class ArBalanceUpdateThread extends Thread {
ArBalanceUpdateDao balanceUpdateDao;
private Integer primaryId;
private String module;
public ArBalanceUpdateThread(ArBalanceUpdateDao balanceUpdateDao, Integer primaryId, String module) {
this.balanceUpdateDao = balanceUpdateDao;
this.primaryId = primaryId;
this.module = module;
}
public void run() {
try {
if (module != null && primaryId!=null) {
if(module.equalsIgnoreCase(ArInvoiceConstants.MODULE_TYPE_AR_INVOICES)) {
balanceUpdateDao.updateInvoiceDueBalance(primaryId);
}else if(module.equalsIgnoreCase(ArInvoiceConstants.MODULE_TYPE_AR_CREDITNOTE)) {
balanceUpdateDao.updateCreditNotesDueBalance(primaryId);
}else if(module.equalsIgnoreCase(ArInvoiceConstants.MODULE_TYPE_AR_RECEIPT)) {
balanceUpdateDao.updateReceiptDueBalance(primaryId);
}
}
} catch (Exception e) {
throw new ApplicationRuntimeException(e);
}
}
}
|
[
"bhargav.maddikera@blackstraw.ai"
] |
bhargav.maddikera@blackstraw.ai
|
feb363f9138e9ecffac03734e4b543b4acc2486e
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/airec-20181012/src/main/java/com/aliyun/airec20181012/models/DescribeRuleRequest.java
|
31b547fe905d1ee0cf37e7a0e3aa960b89826b92
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 873
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.airec20181012.models;
import com.aliyun.tea.*;
public class DescribeRuleRequest extends TeaModel {
@NameInMap("SceneId")
public String sceneId;
@NameInMap("RuleType")
public String ruleType;
public static DescribeRuleRequest build(java.util.Map<String, ?> map) throws Exception {
DescribeRuleRequest self = new DescribeRuleRequest();
return TeaModel.build(map, self);
}
public DescribeRuleRequest setSceneId(String sceneId) {
this.sceneId = sceneId;
return this;
}
public String getSceneId() {
return this.sceneId;
}
public DescribeRuleRequest setRuleType(String ruleType) {
this.ruleType = ruleType;
return this;
}
public String getRuleType() {
return this.ruleType;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
d1fc37d47d19717f4847c3ca9ad699b8e78a667c
|
92f10c41bad09bee05acbcb952095c31ba41c57b
|
/app/src/main/java/io/github/alula/ohmygod/MainActivity8281.java
|
0f071b366ce66c0d188e3263cd82efd94f5322ce
|
[] |
no_license
|
alula/10000-activities
|
bb25be9aead3d3d2ea9f9ef8d1da4c8dff1a7c62
|
f7e8de658c3684035e566788693726f250170d98
|
refs/heads/master
| 2022-07-30T05:54:54.783531
| 2022-01-29T19:53:04
| 2022-01-29T19:53:04
| 453,501,018
| 16
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 339
|
java
|
package io.github.alula.ohmygod;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity8281 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
|
[
"6276139+alula@users.noreply.github.com"
] |
6276139+alula@users.noreply.github.com
|
a84fd8067e6deb7a51aced241b21ab4536239c51
|
83adf0b2e394fdf8dd71a4da64f39bde811c0568
|
/src/main/java/servlets/wideskills_com_servlet/bonus_robot_mvc/RobotServlet.java
|
bbd16ca4fa63ad6bc20e621ff4f754f253cc3d74
|
[] |
no_license
|
dimaSkalora/Servlets_JSP_JSF-Tutorial
|
7f13fea1955e5538d9823b3d3308553798b967b8
|
ead4ada3befb427af24beda084798b3b171cdbf6
|
refs/heads/master
| 2021-05-07T03:17:57.573634
| 2017-12-02T20:09:24
| 2017-12-02T20:09:24
| 110,838,009
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,051
|
java
|
package servlets.wideskills_com_servlet.bonus_robot_mvc;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
public class RobotServlet extends HttpServlet {
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String robotParameter = req.getParameter("Robot");
List<RobotCar> availableRobotCars = null;
List<RobotDog> availableRobotDogs = null;
List<RobotHuman> availableRobotHumans = null;
switch (robotParameter){
case "Robot Car":{
availableRobotCars = GetAvailableRobot.getRobotCarList();
req.setAttribute("availableRobotCars", availableRobotCars);
RequestDispatcher rd = req.getRequestDispatcher("robotCar.jsp");
rd.forward(req,resp);
}
break;
case "Robot Dog":{
availableRobotDogs = GetAvailableRobot.getRobotDogList();
req.setAttribute("availableRobotDogs", availableRobotDogs);
RequestDispatcher rd = req.getRequestDispatcher("robotDog.jsp");
rd.forward(req,resp);
}
break;
case "Robot Human": {
availableRobotHumans = GetAvailableRobot.getRobotHumanList();
req.setAttribute("availableRobotHumans", availableRobotHumans);
RequestDispatcher rd = req.getRequestDispatcher("robotHuman.jsp");
rd.forward(req,resp);
}
break;
case "No Robot":{
RequestDispatcher rd = req.getRequestDispatcher("noRobot.jsp");
rd.forward(req,resp);
}
break;
}
}
}
|
[
"timon2@ukr.net"
] |
timon2@ukr.net
|
d3d091f4efde6e58bfa409c19d356c04e1f530c5
|
6f9bdafa95a7648fa95eee75c0e23a10095f0599
|
/dmn-signavio/src/main/java/com/gs/dmn/signavio/dialect/MixedJavaTimeKotlinSignavioDMNDialectDefinition.java
|
d115c4012ad448ec52049109e5d06a0b73ca8e4b
|
[
"Apache-2.0"
] |
permissive
|
Diffblue-benchmarks/jdmn
|
34ed5b04b91d6b7699aa70d9d3efdc673bd76055
|
9040af85bde734a54c6600f33404613ce83b55d0
|
refs/heads/master
| 2021-07-14T08:46:58.710563
| 2020-10-30T13:25:17
| 2020-10-30T13:25:17
| 219,709,898
| 0
| 0
| null | 2019-11-05T09:46:00
| 2019-11-05T09:45:56
| null |
UTF-8
|
Java
| false
| false
| 3,508
|
java
|
/*
* Copyright 2016 Goldman Sachs.
*
* 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.gs.dmn.signavio.dialect;
import com.gs.dmn.DMNModelRepository;
import com.gs.dmn.feel.analysis.semantics.environment.EnvironmentFactory;
import com.gs.dmn.feel.lib.FEELLib;
import com.gs.dmn.feel.synthesis.type.MixedJavaTimeKotlinNativeTypeFactory;
import com.gs.dmn.feel.synthesis.type.NativeTypeFactory;
import com.gs.dmn.log.BuildLogger;
import com.gs.dmn.serialization.TypeDeserializationConfigurer;
import com.gs.dmn.signavio.feel.lib.MixedJavaTimeSignavioLib;
import com.gs.dmn.signavio.runtime.MixedJavaTimeSignavioBaseDecision;
import com.gs.dmn.signavio.testlab.TestLab;
import com.gs.dmn.signavio.transformation.SignavioDMNToKotlinTransformer;
import com.gs.dmn.signavio.transformation.basic.BasicSignavioDMNToKotlinTransformer;
import com.gs.dmn.transformation.DMNToNativeTransformer;
import com.gs.dmn.transformation.DMNTransformer;
import com.gs.dmn.transformation.basic.BasicDMNToJavaTransformer;
import com.gs.dmn.transformation.lazy.LazyEvaluationDetector;
import com.gs.dmn.transformation.template.TemplateProvider;
import com.gs.dmn.validation.DMNValidator;
import javax.xml.datatype.Duration;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetTime;
import java.time.ZonedDateTime;
import java.util.Map;
public class MixedJavaTimeKotlinSignavioDMNDialectDefinition extends AbstractSignavioDMNDialectDefinition<BigDecimal, LocalDate, OffsetTime, ZonedDateTime, Duration> {
//
// DMN processors
//
@Override
public DMNToNativeTransformer createDMNToNativeTransformer(DMNValidator dmnValidator, DMNTransformer<TestLab> dmnTransformer, TemplateProvider templateProvider, LazyEvaluationDetector lazyEvaluationDetector, TypeDeserializationConfigurer typeDeserializationConfigurer, Map<String, String> inputParameters, BuildLogger logger) {
return new SignavioDMNToKotlinTransformer<>(this, dmnValidator, dmnTransformer, templateProvider, lazyEvaluationDetector, typeDeserializationConfigurer, inputParameters, logger);
}
@Override
public BasicDMNToJavaTransformer createBasicTransformer(DMNModelRepository repository, LazyEvaluationDetector lazyEvaluationDetector, Map<String, String> inputParameters) {
EnvironmentFactory environmentFactory = createEnvironmentFactory();
return new BasicSignavioDMNToKotlinTransformer(this, repository, environmentFactory, createNativeTypeFactory(), lazyEvaluationDetector, inputParameters);
}
//
// Execution engine
//
@Override
public NativeTypeFactory createNativeTypeFactory() {
return new MixedJavaTimeKotlinNativeTypeFactory();
}
@Override
public FEELLib<BigDecimal, LocalDate, OffsetTime, ZonedDateTime, Duration> createFEELLib() {
return new MixedJavaTimeSignavioLib();
}
@Override
public String getDecisionBaseClass() {
return MixedJavaTimeSignavioBaseDecision.class.getName();
}
}
|
[
"opatrascoiu@yahoo.com"
] |
opatrascoiu@yahoo.com
|
ae0adc7e6a58c5be319d1edd33fb28806bce6f36
|
7e885aa4c2edb97b40c93d66ef0fcee92555d957
|
/src/main/java/pl/themolka/jbb/def/BBItalic.java
|
97ad3b398b9b31d68a67a5a2f604fff332dd3fdb
|
[] |
no_license
|
iBotSpeak/JBB
|
4aac085c0eae6c60228c9480dcacb8b2d430b0a5
|
726fe9288fc11104c6bee233cd21731e044c22d7
|
refs/heads/master
| 2021-01-10T10:14:00.209000
| 2016-02-21T11:32:03
| 2016-02-21T11:32:03
| 52,000,362
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 343
|
java
|
package pl.themolka.jbb.def;
import pl.themolka.jbb.BBTag;
public class BBItalic extends BBTag {
public static final String TAG_NAME = "i";
public BBItalic() {
this(null);
}
public BBItalic(String text) {
super(TAG_NAME, null);
if (text != null) {
this.addText(text);
}
}
}
|
[
"themolkapl@gmail.com"
] |
themolkapl@gmail.com
|
fce35c132baa40e05c3f0db89824a5987ba4ffa1
|
10186b7d128e5e61f6baf491e0947db76b0dadbc
|
/org/apache/xalan/processor/ProcessorExsltFuncResult.java
|
a71935c50dfddca5a6c96a58c8ec1723f5e85971
|
[
"SMLNJ",
"Apache-1.1",
"Apache-2.0",
"BSD-2-Clause"
] |
permissive
|
MewX/contendo-viewer-v1.6.3
|
7aa1021e8290378315a480ede6640fd1ef5fdfd7
|
69fba3cea4f9a43e48f43148774cfa61b388e7de
|
refs/heads/main
| 2022-07-30T04:51:40.637912
| 2021-03-28T05:06:26
| 2021-03-28T05:06:26
| 351,630,911
| 2
| 0
|
Apache-2.0
| 2021-10-12T22:24:53
| 2021-03-26T01:53:24
|
Java
|
UTF-8
|
Java
| false
| false
| 2,069
|
java
|
/* */ package org.apache.xalan.processor;
/* */
/* */ import org.apache.xalan.templates.ElemTemplateElement;
/* */ import org.xml.sax.Attributes;
/* */ import org.xml.sax.SAXException;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class ProcessorExsltFuncResult
/* */ extends ProcessorTemplateElem
/* */ {
/* */ public void startElement(StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes) throws SAXException {
/* 46 */ String msg = "";
/* */
/* 48 */ super.startElement(handler, uri, localName, rawName, attributes);
/* 49 */ ElemTemplateElement ancestor = handler.getElemTemplateElement().getParentElem();
/* 50 */ while (ancestor != null && !(ancestor instanceof org.apache.xalan.templates.ElemExsltFunction)) {
/* */
/* 52 */ if (ancestor instanceof org.apache.xalan.templates.ElemVariable || ancestor instanceof org.apache.xalan.templates.ElemParam || ancestor instanceof org.apache.xalan.templates.ElemExsltFuncResult) {
/* */
/* */
/* */
/* 56 */ msg = "func:result cannot appear within a variable, parameter, or another func:result.";
/* 57 */ handler.error(msg, new SAXException(msg));
/* */ }
/* 59 */ ancestor = ancestor.getParentElem();
/* */ }
/* 61 */ if (ancestor == null) {
/* */
/* 63 */ msg = "func:result must appear in a func:function element";
/* 64 */ handler.error(msg, new SAXException(msg));
/* */ }
/* */ }
/* */ }
/* Location: /mnt/r/ConTenDoViewer.jar!/org/apache/xalan/processor/ProcessorExsltFuncResult.class
* Java compiler version: 1 (45.3)
* JD-Core Version: 1.1.3
*/
|
[
"xiayuanzhong+gpg2020@gmail.com"
] |
xiayuanzhong+gpg2020@gmail.com
|
6aebee25833a852f6b20e1d6ff1fc9b66faf1542
|
42337d23e155cc9f61982386aa4917ef37a9bca5
|
/src/main/java/com/test/eventbus/DataObserver1.java
|
be3371bdc3ee468876ed5eb68fa646c84a7d2b83
|
[] |
no_license
|
lengzyuez/MMORPG
|
0599c042f7cabd64410f054897c3906c1154311f
|
2e67f34d387c56e7a91dc7e822ec3ad5620147ad
|
refs/heads/master
| 2020-09-08T15:14:05.973142
| 2019-09-16T09:41:53
| 2019-09-16T09:41:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 426
|
java
|
package com.test.eventbus;
import com.google.common.eventbus.Subscribe;
/**
* @ClassName DataObserver1
* @Description TODO
* @Author DELL
* @Date 2019/7/22 14:28
* @Version 1.0
*/
public class DataObserver1 {
@Subscribe
public void func(String msg){
System.out.println("string msg:"+msg);
}
@Subscribe
public void func2(String msg){
System.out.println("string msg2:"+msg);
}
}
|
[
"1025741620@qq.com"
] |
1025741620@qq.com
|
c6439031e1c353a3c3e9e38f4f3e67bc275ee0e4
|
83110fbb179713c411ddf301c90ef4b814285846
|
/src/HttpNfcLeaseGetManifestRequestType.java
|
d2d89486958c1e47c40175cc65cf5da4b07f9607
|
[] |
no_license
|
mikelopez/jvm
|
f10590edf42b498f2d81dec71b0fee120e381c9a
|
36a960897062224eabd0c18a1434f7c8961ee81c
|
refs/heads/master
| 2021-01-19T05:36:54.710665
| 2013-06-09T04:36:41
| 2013-06-09T04:36:41
| 3,783,647
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,602
|
java
|
package com.vmware.vim25;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for HttpNfcLeaseGetManifestRequestType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="HttpNfcLeaseGetManifestRequestType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="_this" type="{urn:vim25}ManagedObjectReference"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "HttpNfcLeaseGetManifestRequestType", propOrder = {
"_this"
})
public class HttpNfcLeaseGetManifestRequestType {
@XmlElement(required = true)
protected ManagedObjectReference _this;
/**
* Gets the value of the this property.
*
* @return
* possible object is
* {@link ManagedObjectReference }
*
*/
public ManagedObjectReference getThis() {
return _this;
}
/**
* Sets the value of the this property.
*
* @param value
* allowed object is
* {@link ManagedObjectReference }
*
*/
public void setThis(ManagedObjectReference value) {
this._this = value;
}
}
|
[
"dev@scidentify.info"
] |
dev@scidentify.info
|
ec65c9ca5a51d546230531fb18b3bf2bb8fd567f
|
6ac12da7bc81c9fbf8bbf844553bc46bd2746ba9
|
/ds4p-receiver/common-library/src/main/java/org/hl7/v3/ActClassControlAct.java
|
a5b972112de74842c633f5040d523b3620cd2346
|
[] |
no_license
|
wanghaisheng/ds4p-pilot-public
|
b8fd90ee5e196e0e055e250af0e3c547cfa84eaa
|
235cc22266868917d88332fb32d03baded2dd684
|
refs/heads/master
| 2020-04-08T03:19:53.614880
| 2012-12-08T10:02:38
| 2012-12-08T10:02:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,440
|
java
|
/**
* This software is being provided per FARS 52.227-14 Rights in Data - General.
* Any redistribution or request for copyright requires written consent by the
* Department of Veterans Affairs.
*/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-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: 2012.10.17 at 12:15:19 PM MDT
//
package org.hl7.v3;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for ActClassControlAct.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="ActClassControlAct">
* <restriction base="{urn:hl7-org:v3}cs">
* <enumeration value="CACT"/>
* <enumeration value="ACTN"/>
* <enumeration value="INFO"/>
* <enumeration value="STC"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "ActClassControlAct")
@XmlEnum
public enum ActClassControlAct {
CACT,
ACTN,
INFO,
STC;
public String value() {
return name();
}
public static ActClassControlAct fromValue(String v) {
return valueOf(v);
}
}
|
[
"Duane DeCouteau@Socratic5"
] |
Duane DeCouteau@Socratic5
|
7ec3f65e6c7b7ee890f70b2309519164890ef9f4
|
6e1d4cee4aef8f3576fffb8492a720f7b53deec7
|
/apollo-itests/src/test/java/org/apache/activemq/apollo/AutoFailTestSupport.java
|
8a4a59d66f826baf6fe75f42407282c3008627d8
|
[
"Apache-2.0",
"Classpath-exception-2.0",
"MIT",
"BSD-3-Clause",
"GPL-2.0-only",
"CDDL-1.1"
] |
permissive
|
apache/activemq-apollo
|
734acfebab67e6bcc8afec3499e846527a9b8e25
|
8e4b134b2a5d3576aa62cd8df9905a9fe2eba2d0
|
refs/heads/trunk
| 2023-08-09T21:53:48.795808
| 2019-03-11T22:01:10
| 2019-03-11T22:01:10
| 1,302,098
| 144
| 77
|
Apache-2.0
| 2019-03-11T21:58:25
| 2011-01-28T08:00:12
|
Java
|
UTF-8
|
Java
| false
| false
| 5,247
|
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.activemq.apollo;
import junit.framework.TestCase;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* Enforces a test case to run for only an allotted time to prevent them from
* hanging and breaking the whole testing.
*
*
*/
public abstract class AutoFailTestSupport extends TestCase {
public static final int EXIT_SUCCESS = 0;
public static final int EXIT_ERROR = 1;
private static final Logger LOG = LoggerFactory.getLogger(AutoFailTestSupport.class);
private long maxTestTime = 5 * 60 * 1000; // 5 mins by default
private Thread autoFailThread;
private boolean verbose = true;
private boolean useAutoFail; // Disable auto fail by default
private AtomicBoolean isTestSuccess;
protected void setUp() throws Exception {
// Runs the auto fail thread before performing any setup
if (isAutoFail()) {
startAutoFailThread();
}
super.setUp();
}
protected void tearDown() throws Exception {
super.tearDown();
// Stops the auto fail thread only after performing any clean up
stopAutoFailThread();
}
/**
* Manually start the auto fail thread. To start it automatically, just set
* the auto fail to true before calling any setup methods. As a rule, this
* method is used only when you are not sure, if the setUp and tearDown
* method is propagated correctly.
*/
public void startAutoFailThread() {
setAutoFail(true);
isTestSuccess = new AtomicBoolean(false);
autoFailThread = new Thread(new Runnable() {
public void run() {
try {
// Wait for test to finish succesfully
Thread.sleep(getMaxTestTime());
} catch (InterruptedException e) {
// This usually means the test was successful
} finally {
// Check if the test was able to tear down succesfully,
// which usually means, it has finished its run.
if (!isTestSuccess.get()) {
LOG.error("Test case has exceeded the maximum allotted time to run of: " + getMaxTestTime() + " ms.");
dumpAllThreads(getName());
System.exit(EXIT_ERROR);
}
}
}
}, "AutoFailThread");
if (verbose) {
LOG.info("Starting auto fail thread...");
}
LOG.info("Starting auto fail thread...");
autoFailThread.start();
}
/**
* Manually stops the auto fail thread. As a rule, this method is used only
* when you are not sure, if the setUp and tearDown method is propagated
* correctly.
*/
public void stopAutoFailThread() {
if (isAutoFail() && autoFailThread != null && autoFailThread.isAlive()) {
isTestSuccess.set(true);
if (verbose) {
LOG.info("Stopping auto fail thread...");
}
LOG.info("Stopping auto fail thread...");
autoFailThread.interrupt();
}
}
/**
* Sets the auto fail value. As a rule, this should be used only before any
* setup methods is called to automatically enable the auto fail thread in
* the setup method of the test case.
*
* @param val
*/
public void setAutoFail(boolean val) {
this.useAutoFail = val;
}
public boolean isAutoFail() {
return this.useAutoFail;
}
/**
* The assigned value will only be reflected when the auto fail thread has
* started its run. Value is in milliseconds.
*
* @param val
*/
public void setMaxTestTime(long val) {
this.maxTestTime = val;
}
public long getMaxTestTime() {
return this.maxTestTime;
}
public static void dumpAllThreads(String prefix) {
Map<Thread, StackTraceElement[]> stacks = Thread.getAllStackTraces();
for (Entry<Thread, StackTraceElement[]> stackEntry : stacks.entrySet()) {
System.err.println(prefix + " " + stackEntry.getKey());
for(StackTraceElement element : stackEntry.getValue()) {
System.err.println(" " + element);
}
}
}
}
|
[
"chirino@apache.org"
] |
chirino@apache.org
|
2b157156dc7d54a401569c8e9d83c4a4a0bf9101
|
fb5bfb5b4cf7a118cb858490953e69517d8060a4
|
/src/ch14/ex02/access/FancyToy.java
|
3ecdbd1c2f134c57058e889b6435f83ab0bf21a1
|
[] |
no_license
|
v777779/jbook
|
573dd1e4e3847ed51c9b6b66d2b098bf8eb58af5
|
09fc56a27e9aed797327f01ea955bdf1815d0d54
|
refs/heads/master
| 2021-09-19T08:14:16.299382
| 2018-07-25T14:03:12
| 2018-07-25T14:03:12
| 86,017,001
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 270
|
java
|
package ch14.ex02.access;
/**
* Created by V1 on 08-Mar-17.
*/
public class FancyToy extends Toy implements HasBattery, WaterProof, Shoots, OnTable {
public FancyToy() {
super(1);
}
static {
System.out.println("Load: FancyToy");
}
}
|
[
"vadim.v.voronov@gmail.com"
] |
vadim.v.voronov@gmail.com
|
84b152f2eefcbbdf54f799d8bbab49e99df70ba6
|
96d817e3a70d7e9de2adffb7e87d492668c61f4e
|
/datavault-broker/src/main/java/org/datavaultplatform/broker/config/ActuatorConfig.java
|
c7cb18e7385c75e6921fb8cdb58144e876adc7cb
|
[
"MIT"
] |
permissive
|
DataVault/datavault
|
8b97c49ab714486cce2ec8295e7951ef95006e97
|
e5ea8363f5e945beb77039de9239e365322f79cd
|
refs/heads/master
| 2023-08-31T15:55:42.044152
| 2023-03-07T08:10:19
| 2023-03-07T08:10:19
| 36,649,267
| 25
| 19
|
MIT
| 2023-09-13T15:12:06
| 2015-06-01T08:57:03
|
Java
|
UTF-8
|
Java
| false
| false
| 2,048
|
java
|
package org.datavaultplatform.broker.config;
import java.time.Clock;
import java.util.List;
import java.util.function.Function;
import org.datavaultplatform.broker.actuator.CurrentTimeEndpoint;
import org.datavaultplatform.broker.actuator.LocalFileStoreEndpoint;
import org.datavaultplatform.broker.actuator.MemoryInfoEndpoint;
import org.datavaultplatform.broker.actuator.SftpFileStoreEndpoint;
import org.datavaultplatform.broker.services.ArchiveStoreService;
import org.datavaultplatform.broker.services.FileStoreService;
import org.datavaultplatform.common.util.StorageClassNameResolver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringBootVersion;
import org.springframework.boot.actuate.info.InfoContributor;
import org.springframework.context.annotation.Bean;
public class ActuatorConfig {
@Bean
Clock clock() {
return Clock.systemDefaultZone();
}
@Bean
CurrentTimeEndpoint currentTime(Clock clock){
return new CurrentTimeEndpoint(clock);
}
@Bean
MemoryInfoEndpoint memoryInfoEndpoint(Clock clock) {
return new MemoryInfoEndpoint(clock);
}
@Bean
public InfoContributor springBootVersionInfoContributor() {
return builder -> builder.withDetail("spring-boot.version", SpringBootVersion.getVersion());
}
@Bean
public Function<String, String> portAdjuster() {
return port -> port;
}
@Bean
public SftpFileStoreEndpoint sftpFileStoreEndpoint(@Autowired FileStoreService fileStoreService, Function<String,String> portAdjuster, StorageClassNameResolver resolver,
@Value("${sftp.file.store.endpoint.ids.to.ignore:}") List<String> sftpFileStoreEndpointIdsToIgnore) {
return new SftpFileStoreEndpoint(fileStoreService, portAdjuster, resolver, sftpFileStoreEndpointIdsToIgnore);
}
@Bean
public LocalFileStoreEndpoint localFileStoreEndpoint(@Autowired ArchiveStoreService archiveStoreService) {
return new LocalFileStoreEndpoint(archiveStoreService);
}
}
|
[
"david.j.hay@gmail.com"
] |
david.j.hay@gmail.com
|
02fa4698720cb173a7fe82c5b4f988bf3d28e016
|
2b675fd33d8481c88409b2dcaff55500d86efaaa
|
/infinispan/core/src/main/java/org/infinispan/remoting/transport/jgroups/JGroupsAddress.java
|
0d1ed504dc452d002f6112d5dc3a29c2c34dad22
|
[
"LGPL-2.0-or-later",
"Apache-2.0"
] |
permissive
|
nmldiegues/stibt
|
d3d761464aaf97e41dcc9cc1d43f0e3234a1269b
|
1ee662b7d4ed1f80e6092c22e235a3c994d1d393
|
refs/heads/master
| 2022-12-21T23:08:11.452962
| 2015-09-30T16:01:43
| 2015-09-30T16:01:43
| 42,459,902
| 0
| 2
|
Apache-2.0
| 2022-12-13T19:15:31
| 2015-09-14T16:02:52
|
Java
|
UTF-8
|
Java
| false
| false
| 3,513
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2009 Red Hat Inc. and/or its affiliates and other
* contributors as indicated by the @author tags. All rights reserved.
* See the copyright.txt in the distribution for a full listing of
* individual contributors.
*
* This 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 software 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.infinispan.remoting.transport.jgroups;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Set;
import org.infinispan.marshall.AbstractExternalizer;
import org.infinispan.marshall.Ids;
import org.infinispan.remoting.transport.Address;
import org.infinispan.util.Util;
/**
* An encapsulation of a JGroups Address
*
* @author Manik Surtani
* @since 4.0
*/
public class JGroupsAddress implements Address {
protected final org.jgroups.Address address;
private final int hashCode;
public JGroupsAddress(final org.jgroups.Address address) {
if (address == null)
throw new IllegalArgumentException("Address shall not be null");
this.address = address;
this.hashCode = address.hashCode();
}
@Override
public boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
JGroupsAddress that = (JGroupsAddress) o;
return address.equals(that.address);
}
@Override
public int hashCode() {
return hashCode;
}
@Override
public String toString() {
return String.valueOf(address);
}
public org.jgroups.Address getJGroupsAddress() {
return address;
}
@Override
public int compareTo(Address o) {
JGroupsAddress oa = (JGroupsAddress) o;
return address.compareTo(oa.address);
}
public static final class Externalizer extends AbstractExternalizer<JGroupsAddress> {
@Override
public void writeObject(ObjectOutput output, JGroupsAddress address) throws IOException {
try {
org.jgroups.util.Util.writeAddress(address.address, output);
} catch (Exception e) {
throw new IOException(e);
}
}
@Override
public JGroupsAddress readObject(ObjectInput unmarshaller) throws IOException, ClassNotFoundException {
try {
org.jgroups.Address address = org.jgroups.util.Util.readAddress(unmarshaller);
return new JGroupsAddress(address);
} catch (Exception e) {
throw new IOException(e);
}
}
@Override
public Integer getId() {
return Ids.JGROUPS_ADDRESS;
}
@Override
public Set<Class<? extends JGroupsAddress>> getTypeClasses() {
return Util.<Class<? extends JGroupsAddress>>asSet(JGroupsAddress.class);
}
}
}
|
[
"nmld@ist.utl.pt"
] |
nmld@ist.utl.pt
|
865827c5709f387b4578685aa7188d2ebc157778
|
6ec5469ec2bca932a2418de61fee961a04a503e3
|
/CtyManager-manager/src/main/java/com/yard/manager/platform/action/LoginAction.java
|
4438c747f75b37d64beba70a78d26785ed8afd40
|
[] |
no_license
|
Qiuyingx/CtyManager
|
e6cdb83c15dc9c46936c4d09046f25f9ce2ad250
|
8ec9ae87fe580b32f28fa77f8b182cb94119087d
|
refs/heads/master
| 2020-12-31T07:32:16.224703
| 2016-05-08T13:20:53
| 2016-05-08T13:20:53
| 58,313,077
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,406
|
java
|
package com.yard.manager.platform.action;
import java.io.IOException;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.LockedAccountException;
import org.apache.shiro.authc.UnknownAccountException;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import com.yard.core.kaptcha.Constants;
import com.yard.core.security.sha.sha4j.ShaUtil;
import com.yard.core.struts.action.JsonServletAction;
/**
* 登录验证
*
* @Description:用户登录处理,后台主界面
*/
@Results({
// 管理中心
@Result(name = "CENTER", type = "chain", location = "center"),
// 登录页面
@Result(name = "LOGIN", type = "freemarker", location = "/WEB-INF/content/login.html"),
// 商户登录页面
@Result(name = "SHOPLOGIN", type = "freemarker", location = "/WEB-INF/content/shopLogin.html"),
// 主界面
@Result(name = "LOGOUT", type = "redirect", location = "main") })
public class LoginAction extends JsonServletAction {
private static final long serialVersionUID = 1L;
private static final String LOGIN = "LOGIN";
// 用户登陆信息
private String account;
private String pwd;
private String code;
/**
* 直接跳转到主界面(后台登录界面)
*
* @return
* @throws Exception
*/
@Action("/main")
public String main() throws Exception {
return LOGIN;
}
/**
* 商户后台登录页面
*
* @return
* @throws Exception
*/
@Action("/shop")
public String shopLogin() throws Exception {
return "SHOPLOGIN";
}
/**
* 登录处理
*
* @return
*/
@Action("/login")
public String login() {
try {
// 判断验证码是否正确
/* String kaptchaExpected = (String) request.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY);
if (code == null || !code.equalsIgnoreCase(kaptchaExpected)) {
setResult(false, "验证码错误");
return MAP;
}*/
// 验证用户名密码
Subject currentUser = SecurityUtils.getSubject();
UsernamePasswordToken token = new UsernamePasswordToken(account, ShaUtil.toSha256String(pwd));
currentUser.login(token);
setResult(true, "成功");
} catch (UnknownAccountException uae) {
setResult(false, "用户名无效");
} catch (IncorrectCredentialsException ice) {
setResult(false, "密码无效");
} catch (LockedAccountException lae) {
setResult(false, "帐号锁定");
} catch (AuthenticationException ae) {
setResult(false, "认证未通过,请输入正确的用户名和密码");
} catch (IOException e) {
e.printStackTrace();
setResult(false, "认证未通过,发生异常");
}
return MAP;
}
/**
* 登出
*
* @return
*/
@Action("/logout")
public String logout() {
Subject currentUser = SecurityUtils.getSubject();
currentUser.logout();
return LOGIN;
}
public void setAccount(String account) {
this.account = account;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
public void setCode(String code) {
this.code = code;
}
}
|
[
"472128216@qq.com"
] |
472128216@qq.com
|
9f8426edf2eb0d3971d0d138a0c1de09df78793a
|
bb6b14d1371af4aaa7fd98a30870466c8c34589a
|
/commons/src/main/java/com/github/commons/utils/ByteUtil.java
|
a39c1c2c556719c235d9f8613e441ea47d138684
|
[
"Apache-2.0"
] |
permissive
|
JackChan1999/GooglePlay
|
768bdcfd4a95c3a07f28de388557b2758a19ad2f
|
f050f5442e338278ed57bc380363820d2ef6b1fc
|
refs/heads/master
| 2021-06-16T16:55:47.102128
| 2017-04-17T14:17:37
| 2017-04-17T14:17:37
| 80,725,785
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,582
|
java
|
package com.github.commons.utils;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
public class ByteUtil {
/**
* byte[] 转为 对象
*
* @param bytes
* @return
*/
public static Object byteToObject(byte[] bytes) throws Exception {
ObjectInputStream ois = null;
try {
ois = new ObjectInputStream(new ByteArrayInputStream(bytes));
return ois.readObject();
} finally {
if (ois != null) ois.close();
}
}
/**
* 对象 转为 byte[]
*
* @param obj
* @return
*/
public static byte[] objectToByte(Object obj) throws Exception {
ObjectOutputStream oos = null;
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
oos = new ObjectOutputStream(bos);
oos.writeObject(obj);
return bos.toByteArray();
} finally {
if (oos != null) oos.close();
}
}
public static void byteToBit(byte[] bytes, StringBuilder sb) {
for (int i = 0; i < Byte.SIZE * bytes.length; i++)
sb.append((bytes[i / Byte.SIZE] << i % Byte.SIZE & 0x80) == 0 ? '0' : '1');
}
public static String byteToBit(byte[] bytes) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < Byte.SIZE * bytes.length; i++)
sb.append((bytes[i / Byte.SIZE] << i % Byte.SIZE & 0x80) == 0 ? '0' : '1');
return sb.toString();
}
}
|
[
"jackychan2040@gmail.com"
] |
jackychan2040@gmail.com
|
a5685f601a54954ff8703d6990c2c6f1f65d8ebc
|
afe3ae0447af52519bfe2f09c67a6cd1a14bece7
|
/DRM/src/main/java/com/guardianpro/drm/sessions/AbstractFacade.java
|
7ee3b4f13bc8bc9228b7cf2e560129ef049b9f5d
|
[] |
no_license
|
ahmedhamed105/DRMpro
|
4d394218bac28dcecfac9e7f67f38fe74e05a893
|
b48d2d64fa09927253d28f16ed7844550cbe2b3f
|
refs/heads/master
| 2021-07-18T14:57:59.578790
| 2018-12-02T11:43:44
| 2018-12-02T11:43:44
| 134,879,141
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,894
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.guardianpro.drm.sessions;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import javax.persistence.EntityManager;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import javax.validation.ValidatorFactory;
/**
*
* @author ahmed.elemam
*/
public abstract class AbstractFacade<T> {
private Class<T> entityClass;
public AbstractFacade(Class<T> entityClass) {
this.entityClass = entityClass;
}
protected abstract EntityManager getEntityManager();
public void create(T entity) {
ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
Validator validator = factory.getValidator();
Set<ConstraintViolation<T>> constraintViolations = validator.validate(entity);
if(constraintViolations.size() > 0){
Iterator<ConstraintViolation<T>> iterator = constraintViolations.iterator();
while(iterator.hasNext()){
ConstraintViolation<T> cv = iterator.next();
System.err.println(cv.getRootBeanClass().getName()+"."+cv.getPropertyPath() + " " +cv.getMessage());
// JsfUtil.addErrorMessage(cv.getRootBeanClass().getSimpleName()+"."+cv.getPropertyPath() + " " +cv.getMessage());
}
}else{
getEntityManager().persist(entity);
}
}
public void edit(T entity) {
getEntityManager().merge(entity);
}
public void remove(T entity) {
getEntityManager().remove(getEntityManager().merge(entity));
}
public T find(Object id) {
return getEntityManager().find(entityClass, id);
}
public List<T> findAll() {
javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();
cq.select(cq.from(entityClass));
return getEntityManager().createQuery(cq).getResultList();
}
public List<T> findRange(int[] range) {
javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();
cq.select(cq.from(entityClass));
javax.persistence.Query q = getEntityManager().createQuery(cq);
q.setMaxResults(range[1] - range[0] + 1);
q.setFirstResult(range[0]);
return q.getResultList();
}
public int count() {
javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();
javax.persistence.criteria.Root<T> rt = cq.from(entityClass);
cq.select(getEntityManager().getCriteriaBuilder().count(rt));
javax.persistence.Query q = getEntityManager().createQuery(cq);
return ((Long) q.getSingleResult()).intValue();
}
}
|
[
"ahmed.elemam@its.ws"
] |
ahmed.elemam@its.ws
|
8e852dca03ad4bac7e51ed1b9691337d6fc3e806
|
d8bae6238185215e02e12c16c94c3ac77c0d7508
|
/nitrite/src/main/java/org/dizitart/no2/util/ExecutorUtils.java
|
1c9c4624d2028e37685100de310ff0f582fd2589
|
[
"Apache-2.0"
] |
permissive
|
ikbhal/nitrite-database
|
2224f061ebfb95f92efad69cf12ec2154a818fff
|
7901cdba7ec6d99f1172e828c1b95c777943be9b
|
refs/heads/master
| 2020-03-24T07:11:49.023896
| 2018-07-25T12:44:10
| 2018-07-25T12:44:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,792
|
java
|
/*
*
* Copyright 2017 Nitrite 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.dizitart.no2.util;
import lombok.experimental.UtilityClass;
import lombok.extern.slf4j.Slf4j;
import java.util.concurrent.*;
import static org.dizitart.no2.Constants.DAEMON_THREAD_NAME;
import static org.dizitart.no2.Constants.SCHEDULED_THREAD_NAME;
/**
* A utility class for {@link ExecutorService}.
*
* @author Anindya Chatterjee.
* @since 1.0
*/
@Slf4j
@UtilityClass
public class ExecutorUtils {
/**
* Creates an {@link ExecutorService} where all {@link Thread}s are
* daemon threads and uncaught error aware.
*
* @return the {@link ExecutorService}.
*/
public static ExecutorService daemonExecutor() {
ThreadPoolExecutor threadPool = new ThreadPoolExecutor(0, Integer.MAX_VALUE,
60L, TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(),
new ErrorAwareThreadFactory() {
@Override
public Thread createThread(Runnable runnable) {
Thread thread = new Thread(runnable);
thread.setName(DAEMON_THREAD_NAME);
thread.setDaemon(true);
return thread;
}
});
threadPool.allowCoreThreadTimeOut(true);
return threadPool;
}
/**
* Creates a {@link ScheduledExecutorService} where all {@link Thread}s are
* daemon threads and uncaught error aware.
*
* @return the {@link ScheduledExecutorService}.
*/
public static ScheduledExecutorService scheduledExecutor() {
return Executors.newScheduledThreadPool(1, new ErrorAwareThreadFactory() {
@Override
public Thread createThread(Runnable runnable) {
Thread thread = new Thread(runnable);
thread.setName(SCHEDULED_THREAD_NAME);
thread.setDaemon(true);
return thread;
}
});
}
/**
* Shuts down and awaits termination of an {@link ExecutorService}.
*
* @param pool the {@link ExecutorService}
* @param timeout the timeout in seconds
*/
public static void shutdownAndAwaitTermination(ExecutorService pool, int timeout) {
synchronized (pool) {
// Disable new tasks from being submitted
pool.shutdown();
}
try {
// Wait a while for existing tasks to terminate
if (!pool.awaitTermination(timeout, TimeUnit.SECONDS)) {
synchronized (pool) {
pool.shutdownNow(); // Cancel currently executing tasks
}
// Wait a while for tasks to respond to being cancelled
if (!pool.awaitTermination(timeout, TimeUnit.SECONDS)) {
log.error("Executor did not terminate");
}
}
} catch (InterruptedException ie) {
// (Re-)Cancel if current thread also interrupted
synchronized (pool) {
pool.shutdownNow();
}
// Preserve interrupt status
Thread.currentThread().interrupt();
}
}
}
|
[
"anidotnet@gmail.com"
] |
anidotnet@gmail.com
|
65272a5c1d088ef810b8c0a822e6b73a882c6177
|
7ea5b50fa710eac82c675bf7720a058b70ead9d0
|
/FermiTivoliApp/src/it/gov/fermitivoli/fragment/OrarioScolasticoFragment.java
|
3d48ce45e39e2cb79223ec31666d56124bc652eb
|
[] |
no_license
|
devxyz/EFermiTivoli
|
955e6681a5b869f14d6b0a1bc4bdcaffb8edc9d0
|
ad960a8e519e2dd73be69e1e21266a87d94cf4b2
|
refs/heads/master
| 2020-05-21T12:22:54.877187
| 2017-12-05T05:55:07
| 2017-12-05T05:55:07
| 53,572,346
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 498
|
java
|
package it.gov.fermitivoli.fragment;
import it.gov.fermitivoli.R;
/**
* Created by stefano on 22/09/15.
*/
public class OrarioScolasticoFragment extends AbstractHtmlPageFragment {
@Override
protected String getHtmlText() {
return null;
}
@Override
protected String getTitle() {
return "Orario delle lezioni";
}
@Override
protected String getUrl() {
return getActivity().getResources().getString(R.string.url_orario_scolastico);
}
}
|
[
"stefano.millozzi@gmail.com"
] |
stefano.millozzi@gmail.com
|
8ea30a1b77d059e6f99225e07a7c82c5df1e1dc0
|
f086c6b7104b8fee7e29389df2be00e194c65c62
|
/src/keygen/ver4/KeyGenerator.java
|
ffaf360184f1763a529524f99d8a24c5f345a293
|
[] |
no_license
|
75168859/design
|
c3cad7bf78e1e5fdf52e2162a2e818f5ec68c512
|
b74f7b2578d54f1549a342e354e187dda8862b1c
|
refs/heads/master
| 2021-01-13T00:38:47.296078
| 2016-04-01T15:14:34
| 2016-04-01T15:14:34
| 55,241,252
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 942
|
java
|
package keygen.ver4;
import java.util.HashMap;
public class KeyGenerator
{
/**
* @label creates
*/
private static KeyGenerator keygen =
new KeyGenerator();
private static final int POOL_SIZE = 20;
private HashMap keyList = new HashMap(10);
/** @link dependency */
/*# KeyInfo lnkKeyInfo; */
private KeyGenerator()
{
}
public static KeyGenerator getInstance()
{
return keygen;
}
public int getNextKey(String keyName)
{
KeyInfo keyinfo ;
if ( keyList.containsKey(keyName) )
{
keyinfo = (KeyInfo) keyList.get(keyName);
System.out.println("key found");
}
else
{
keyinfo = new KeyInfo(POOL_SIZE, keyName);
keyList.put(keyName, keyinfo);
System.out.println("new key created");
}
return keyinfo.getNextKey();
}
}
|
[
"75168859@qq.com"
] |
75168859@qq.com
|
c4925a78fadaaf2a12b7ba03737c9825a4bcd454
|
856630e36b47d0ce48b1d8437c8e47bfbd14641d
|
/gatling-core-java/src/main/java/io/gatling/javaapi/core/ClosedInjectionStep.java
|
703849381b0229a9dcdbf50f8b061a77ac017fc9
|
[
"Apache-2.0",
"BSD-3-Clause",
"EPL-1.0",
"MPL-2.0",
"MIT",
"GPL-2.0-only",
"BSD-2-Clause"
] |
permissive
|
gatling/gatling
|
7e59a8df9850b5853260e995411f24ce1ce0255a
|
a58429b394d05a9cb050ff2930e39a9dedd5d6c6
|
refs/heads/main
| 2023-09-03T21:36:32.461696
| 2023-09-01T12:22:27
| 2023-09-01T12:31:39
| 1,826,128
| 4,947
| 1,233
|
Apache-2.0
| 2023-09-09T11:36:29
| 2011-05-31T12:40:25
|
Scala
|
UTF-8
|
Java
| false
| false
| 7,683
|
java
|
/*
* Copyright 2011-2023 GatlingCorp (https://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.gatling.javaapi.core;
import static io.gatling.javaapi.core.internal.Converters.toScalaDuration;
import edu.umd.cs.findbugs.annotations.NonNull;
import io.gatling.javaapi.core.internal.ClosedInjectionSteps;
import java.time.Duration;
/**
* An injection profile step for using a closed workload model where you control the concurrent
* number of users. Only use if your system has a queue limiting entry. Don't use otherwise or your
* test will not match any production use case.
*
* <p>Immutable, so all methods return a new occurrence and leave the original unmodified.
*/
public class ClosedInjectionStep {
private final io.gatling.core.controller.inject.closed.ClosedInjectionStep wrapped;
private ClosedInjectionStep(
@NonNull io.gatling.core.controller.inject.closed.ClosedInjectionStep wrapped) {
this.wrapped = wrapped;
}
/**
* For internal use only
*
* @return the wrapped Scala instance
*/
@NonNull
public io.gatling.core.controller.inject.closed.ClosedInjectionStep asScala() {
return wrapped;
}
/**
* DSL component for building a {@link ClosedInjectionStep} that will inject new users in a way to
* maintain a constant number of concurrent users for a given duration.
*/
public static final class Constant {
private final int users;
Constant(int users) {
this.users = users;
}
/**
* Define the duration of the step
*
* @param durationSeconds the duration in seconds
* @return a new ClosedInjectionStep
*/
@NonNull
public ClosedInjectionStep during(long durationSeconds) {
return during(Duration.ofSeconds(durationSeconds));
}
/**
* Define the duration of the step
*
* @param duration the duration
* @return a new ClosedInjectionStep
*/
@NonNull
public ClosedInjectionStep during(@NonNull Duration duration) {
return new ClosedInjectionStep(
new io.gatling.core.controller.inject.closed.ConstantConcurrentUsersInjection(
users, toScalaDuration(duration)));
}
}
/**
* DSL step for building a {@link ClosedInjectionStep} that will inject new users in a way to ramp
* the number of concurrent users for a given duration.
*/
public static final class Ramp {
private final int from;
public Ramp(int from) {
this.from = from;
}
/**
* Define the target number of concurrent users at the end of the ramp.
*
* @param t the target number
* @return a RampConcurrentUsersInjectionTo
*/
@NonNull
public RampTo to(int t) {
return new RampTo(from, t);
}
}
/**
* DSL step for building a {@link ClosedInjectionStep} that will inject new users in a way to ramp
* the number of concurrent users for a given duration.
*/
public static final class RampTo {
private final int from;
private final int to;
public RampTo(int from, int to) {
this.from = from;
this.to = to;
}
/**
* Define the duration of the ramp.
*
* @param durationSeconds the duration in seconds
* @return a complete ClosedInjectionStep
*/
@NonNull
public ClosedInjectionStep during(long durationSeconds) {
return during(Duration.ofSeconds(durationSeconds));
}
/**
* Define the duration of the ramp.
*
* @param duration the duration
* @return a complete ClosedInjectionStep
*/
@NonNull
public ClosedInjectionStep during(@NonNull Duration duration) {
return new ClosedInjectionStep(
new io.gatling.core.controller.inject.closed.RampConcurrentUsersInjection(
from, to, toScalaDuration(duration)));
}
}
/**
* DSL step for building a {@link ClosedInjectionStep} that will inject new users in a way to ramp
* the number of concurrent users in a stairs fashion
*/
public static final class Stairs {
private final int usersIncrement;
Stairs(int usersIncrement) {
this.usersIncrement = usersIncrement;
}
/**
* Define the number of levels
*
* @param levels the number of levels in the stairs
* @return the next DSL step
*/
@NonNull
public StairsWithTime times(int levels) {
return new StairsWithTime(usersIncrement, levels);
}
}
/**
* DSL step for building a {@link ClosedInjectionStep} that will inject new users in a way to ramp
* the number of concurrent users in a stairs fashion
*/
public static final class StairsWithTime {
private final int usersIncrement;
private final int levels;
public StairsWithTime(int usersIncrement, int levels) {
this.usersIncrement = usersIncrement;
this.levels = levels;
}
/**
* Define the duration of each level
*
* @param durationSeconds the duration in seconds
* @return the next DSL step
*/
@NonNull
public Composite eachLevelLasting(long durationSeconds) {
return eachLevelLasting(Duration.ofSeconds(durationSeconds));
}
/**
* Define the duration of each level
*
* @param duration the duration
* @return the next DSL step
*/
@NonNull
public Composite eachLevelLasting(@NonNull Duration duration) {
return new Composite(
ClosedInjectionSteps.newEachLevelLasting(usersIncrement, levels)
.eachLevelLasting(toScalaDuration(duration)));
}
}
/**
* DSL step for building a {@link ClosedInjectionStep} that will inject new users in a way to ramp
* the number of concurrent users in a stairs fashion
*/
public static final class Composite extends ClosedInjectionStep {
Composite(io.gatling.core.controller.inject.closed.ClosedInjectionStep wrapped) {
super(wrapped);
}
private io.gatling.core.controller.inject.closed.StairsConcurrentUsersCompositeStep wrapped() {
return (io.gatling.core.controller.inject.closed.StairsConcurrentUsersCompositeStep)
asScala();
}
/**
* Define the initial number of concurrent users (optional)
*
* @param startingUsers the initial number of concurrent users
* @return a usable {@link ClosedInjectionStep}
*/
@NonNull
public Composite startingFrom(int startingUsers) {
return new Composite(wrapped().startingFrom(startingUsers));
}
/**
* Define ramps separating levels (optional)
*
* @param durationSeconds the duration of the ramps in seconds
* @return a usable {@link ClosedInjectionStep}
*/
@NonNull
public Composite separatedByRampsLasting(long durationSeconds) {
return separatedByRampsLasting(Duration.ofSeconds(durationSeconds));
}
/**
* Define ramps separating levels (optional)
*
* @param duration the duration of the ramps
* @return a usable {@link ClosedInjectionStep}
*/
@NonNull
public Composite separatedByRampsLasting(Duration duration) {
return new Composite(wrapped().separatedByRampsLasting(toScalaDuration(duration)));
}
}
}
|
[
"slandelle@gatling.io"
] |
slandelle@gatling.io
|
43ea09d946cdda017e5f9ca564945e4afe484637
|
b92724573755d6614442157e75dfb3cd46c6e3c4
|
/src/main/java/org/codelibs/fess/dict/stemmeroverride/StemmerOverrideCreator.java
|
1521ae196e43a6f0add004e1f478dfd0d8dbf1c0
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
werberson/fess-1
|
e49fad885a6a6e1829585c0ef0e8beeedf98d248
|
1a09d53951d6bf181919b997b6d6acec0cdf1c78
|
refs/heads/master
| 2021-01-06T01:43:38.721988
| 2020-02-15T11:58:14
| 2020-02-15T11:58:14
| 241,192,307
| 1
| 0
|
Apache-2.0
| 2020-02-17T19:39:38
| 2020-02-17T19:39:38
| null |
UTF-8
|
Java
| false
| false
| 1,665
|
java
|
/*
* Copyright 2012-2020 CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.codelibs.fess.dict.stemmeroverride;
import java.util.Date;
import javax.annotation.PostConstruct;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.fess.dict.DictionaryCreator;
import org.codelibs.fess.dict.DictionaryFile;
import org.codelibs.fess.dict.DictionaryItem;
public class StemmerOverrideCreator extends DictionaryCreator {
private static final Logger logger = LogManager.getLogger(StemmerOverrideCreator.class);
public StemmerOverrideCreator() {
super("stemmer_override.*\\.txt");
}
@PostConstruct
public void register() {
if (logger.isInfoEnabled()) {
logger.info("Load " + this.getClass().getSimpleName());
}
dictionaryManager.addCreator(this);
}
@Override
protected DictionaryFile<? extends DictionaryItem> newDictionaryFile(final String id, final String path, final Date timestamp) {
return new StemmerOverrideFile(id, path, timestamp).manager(dictionaryManager);
}
}
|
[
"shinsuke@apache.org"
] |
shinsuke@apache.org
|
bdc4a53721124a53104320a2e30396cf5b2d052e
|
2b8c47031dddd10fede8bcf16f8db2b52521cb4f
|
/subject SPLs and test cases/Lampiro(6)/Lampiro_P6/evosuite-tests1/com/jcraft/jzlib/StaticTree_ESTest_scaffolding1.java
|
4d52b5bca904ef9d6cb0fa7f946866e62decdddb
|
[] |
no_license
|
psjung/SRTST_experiments
|
6f1ff67121ef43c00c01c9f48ce34f31724676b6
|
40961cb4b4a1e968d1e0857262df36832efb4910
|
refs/heads/master
| 2021-06-20T04:45:54.440905
| 2019-09-06T04:05:38
| 2019-09-06T04:05:38
| 206,693,757
| 1
| 0
| null | 2020-10-13T15:50:41
| 2019-09-06T02:10:06
|
Java
|
UTF-8
|
Java
| false
| false
| 1,862
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Jul 01 00:23:37 KST 2018
*/
package com.jcraft.jzlib;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class StaticTree_ESTest_scaffolding1 {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
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 = "com.jcraft.jzlib.StaticTree";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
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.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(StaticTree_ESTest_scaffolding1.class.getClassLoader() ,
"com.jcraft.jzlib.StaticTree",
"com.jcraft.jzlib.Tree"
);
}
}
|
[
"psjung@kaist.ac.kr"
] |
psjung@kaist.ac.kr
|
692dff29ab48f04c72515e021e01d9954591a6b6
|
4f9f8836e5bafeeb821961f41c0246a52ccbc601
|
/app/src/main/java/com/qx/qgbox/pulltorefreshgridview/DaisyHeaderView.java
|
6f3956025d320cc7ee21277d4fe2281afaeedad5
|
[] |
no_license
|
pyp163/BlueTooth
|
aeb7fd186b6d25baf4306dce9057b073402b991c
|
740e2ad00e3099d1297eee22c31570a8afc99f88
|
refs/heads/master
| 2021-01-09T12:03:25.376757
| 2020-02-22T06:58:49
| 2020-02-22T06:58:49
| 242,290,730
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,089
|
java
|
package com.qx.qgbox.pulltorefreshgridview;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.os.Build.VERSION;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.qx.qgbox.contract.HeadContract;
public class DaisyHeaderView extends RelativeLayout
implements HeadContract
{
private ImageView mImgDaisy;
private ObjectAnimator mRotation;
private TextView mTxtLoading;
public DaisyHeaderView(Context paramContext)
{
this(paramContext, null);
}
public DaisyHeaderView(@NonNull Context paramContext, @Nullable AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
initView(paramContext);
}
public void initView(Context paramContext)
{
LayoutInflater.from(paramContext).inflate(R.layout.layout_daisy, this);
this.mTxtLoading = ((TextView)findViewById(R.id.txt_loading));
this.mTxtLoading.setText(R.string.pulltorefreshgridview);
this.mImgDaisy = ((ImageView)findViewById(R.id.img_daisy));
this.mRotation = ObjectAnimator.ofFloat(this.mImgDaisy, "rotation", new float[] { 0.0F, 360.0F }).setDuration(1000L);
this.mRotation.setRepeatCount(-1);
this.mRotation.setInterpolator(new LinearInterpolator());
}
public void onPullEnable(boolean paramBoolean)
{
TextView localTextView = this.mTxtLoading;
int i;
if (paramBoolean)
i = R.string.pulltorefreshgridview1;
else
i = R.string.pulltorefreshgridview;
localTextView.setText(i);
}
public void onRefresh()
{
this.mTxtLoading.setText(R.string.pulltorefreshgridview2);
this.mRotation.start();
}
public void setRefreshing(boolean paramBoolean)
{
if (paramBoolean)
{
this.mRotation.start();
return;
}
if (Build.VERSION.SDK_INT >= 19)
this.mRotation.pause();
}
}
|
[
"pyp163@126.com"
] |
pyp163@126.com
|
6dbe9068dc0635c08454ea2345f9fedc0b5a445f
|
0d190fa3fcfa18754a94edb93affe29e12e2e314
|
/src/main/java/ru/yusdm/javacore/lesson7collectionsmap/autoservice/common/business/application/servicefactory/ServiceFactory.java
|
28594d8391b9941526a8c0f179a0db3ec04a85a0
|
[] |
no_license
|
DmitryYusupov/javacore
|
758a736393ddff81576461b3f221dd3d86bbea85
|
1a61d8ac9f3764725374848ca914bd6915a16e7e
|
refs/heads/master
| 2020-04-22T20:44:28.691624
| 2019-04-20T20:36:13
| 2019-04-20T20:36:13
| 170,650,587
| 7
| 7
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 626
|
java
|
package ru.yusdm.javacore.lesson7collectionsmap.autoservice.common.business.application.servicefactory;
import ru.yusdm.javacore.lesson7collectionsmap.autoservice.mark.service.MarkService;
import ru.yusdm.javacore.lesson7collectionsmap.autoservice.model.service.ModelService;
import ru.yusdm.javacore.lesson7collectionsmap.autoservice.order.service.OrderService;
import ru.yusdm.javacore.lesson7collectionsmap.autoservice.user.service.UserService;
public interface ServiceFactory {
MarkService getMarkService();
ModelService getModelService();
OrderService getOrderService();
UserService getUserService();
}
|
[
"usikovich@mail.ru"
] |
usikovich@mail.ru
|
378883ea8ddaa22626f925a89ccaf80d47266662
|
c6572a9dd42bce66df5ab21157f7e8738939e24f
|
/demo28.solon_socketd_rpc_ws/src/main/java/demo/client/ClientDemo.java
|
d4f5ece459dad5468d84eba28ab242892dd15c9e
|
[
"Apache-2.0"
] |
permissive
|
noear/solon_demo
|
791ddd28d49c4356f5bf58840dfab15eaee9f0bb
|
2cc1c4d580f9930db4cb5a0f9c300617fc4b4925
|
refs/heads/master
| 2023-07-20T13:43:55.586597
| 2023-04-02T00:41:41
| 2023-04-02T00:41:41
| 230,220,372
| 2
| 0
|
Apache-2.0
| 2023-07-07T21:53:28
| 2019-12-26T07:51:10
|
Java
|
UTF-8
|
Java
| false
| false
| 543
|
java
|
package demo.client;
import demo.service.HelloRpcService;
import org.noear.solon.Solon;
import org.noear.solon.socketd.SocketD;
public class ClientDemo {
public static void main(String[] args) {
Solon.start(ClientDemo.class, args,
app -> app.enableHttp(false).enableWebSocketD(true));
//[客户端] 调用 [服务端] 的 rpc
//
HelloRpcService rpc = SocketD.create("ws://localhost:8080", HelloRpcService.class);
System.out.println("RPC result:: " + rpc.hello("noear"));
}
}
|
[
"noear@live.cn"
] |
noear@live.cn
|
7869392f772467b746b84973e6b62131f942636c
|
e75be673baeeddee986ece49ef6e1c718a8e7a5d
|
/submissions/blizzard/Corpus/eclipse.jdt.ui/6999.java
|
28c0d79f31388b47d4267d7e20e198f0a62af745
|
[
"MIT"
] |
permissive
|
zhendong2050/fse18
|
edbea132be9122b57e272a20c20fae2bb949e63e
|
f0f016140489961c9e3c2e837577f698c2d4cf44
|
refs/heads/master
| 2020-12-21T11:31:53.800358
| 2018-07-23T10:10:57
| 2018-07-23T10:10:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 315
|
java
|
package p;
class A {
private final class Inner extends A {
private final int u;
private Inner(int u) {
this.u = u;
}
void g() {
int uj = u;
}
}
void f() {
final int u = 9;
new Inner(u);
}
}
|
[
"tim.menzies@gmail.com"
] |
tim.menzies@gmail.com
|
19dd19d8fbea714ed422d848a0397d3e1e28cf4a
|
0320ebaf84d723aaf5848a7c05ff01e1ce6be06b
|
/src/main/java/com/subway/appSearch/AppSearchRepository.java
|
9f033b9fa403269fe8a9707e41be518cb5f6b283
|
[] |
no_license
|
HuangMichael/platform
|
30ae2176994dc1310e991305736a26c331ffd115
|
03cb9576b762cf9ee47b1eb3c6a2a33486c613e7
|
refs/heads/master
| 2020-03-16T00:26:28.185648
| 2018-05-24T00:35:42
| 2018-05-24T00:35:42
| 114,079,879
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 790
|
java
|
package com.subway.appSearch;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
/**
* 应用查询配置表数据库访问接口
*
* @author huangbin
* @generate by autoCode
* @Date 2018-3-1
*/
public interface AppSearchRepository extends JpaRepository<AppSearch, Long> {
/**
* @param searchDesc
* @param status
* @return
*/
List<AppSearch> findBySearchDescContainingAndStatus(String searchDesc,String status);
/**
* @param searchDesc
* @param status
* @param pageable
* @return
*/
Page<AppSearch> findBySearchDescContainingAndStatus(String searchDesc, String status, Pageable pageable);
}
|
[
"876301469@qq.com"
] |
876301469@qq.com
|
8ce28807917f1326110948b91a553d5f8ccc916a
|
ab9ef3010a4a6f4fa059bb9fb2516cb0c7205bf4
|
/gulimall-coupon/src/main/java/com/syong/gulimall/coupon/dao/UndoLogDao.java
|
b1ed8c663ce06271ec9102dce4abfd17612e06f9
|
[
"Apache-2.0"
] |
permissive
|
ChangGeZheLi/gulimall
|
4ce5163beca92c81b1d5198cd222d26d60d4bed6
|
d5a3d5c85dcfb69890be8d38a968ee9657a1dede
|
refs/heads/main
| 2023-05-30T17:07:25.709294
| 2021-06-26T02:17:41
| 2021-06-26T02:17:41
| 356,811,879
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 361
|
java
|
package com.syong.gulimall.coupon.dao;
import com.syong.gulimall.coupon.entity.UndoLogEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
*
*
* @author syong
* @email syong@gmail.com
* @date 2021-04-12 16:05:12
*/
@Mapper
public interface UndoLogDao extends BaseMapper<UndoLogEntity> {
}
|
[
"admin"
] |
admin
|
b448318a795bb5f0adfbfe497fad76b42f47d287
|
db8d430fdb17310b39c6ee3350f7688d520ddab4
|
/product-service/src/main/java/org/efbiz/product/facility/dao/FacilityAttributeMapper.java
|
f56467a9e39c2c74a683d512b9b86a3953e7f6e1
|
[
"Apache-2.0"
] |
permissive
|
efbiz/efbiz-service
|
c3d4bb650bce6bc1295589b989e44228db9c84d7
|
142087cdd078e5b5081cd05643948ae726662c1e
|
refs/heads/master
| 2021-01-19T13:55:45.101238
| 2017-11-19T14:01:47
| 2017-11-19T14:01:47
| 88,115,051
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,213
|
java
|
package org.efbiz.product.facility.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.efbiz.product.facility.model.FacilityAttribute;
import org.efbiz.product.facility.model.FacilityAttributeExample;
import org.efbiz.product.facility.model.FacilityAttributeKey;
@Mapper
public interface FacilityAttributeMapper {
long countByExample(FacilityAttributeExample example);
int deleteByExample(FacilityAttributeExample example);
int deleteByPrimaryKey(FacilityAttributeKey key);
int insert(FacilityAttribute record);
int insertSelective(FacilityAttribute record);
List<FacilityAttribute> selectByExample(FacilityAttributeExample example);
FacilityAttribute selectByPrimaryKey(FacilityAttributeKey key);
int updateByExampleSelective(@Param("record") FacilityAttribute record, @Param("example") FacilityAttributeExample example);
int updateByExample(@Param("record") FacilityAttribute record, @Param("example") FacilityAttributeExample example);
int updateByPrimaryKeySelective(FacilityAttribute record);
int updateByPrimaryKey(FacilityAttribute record);
}
|
[
"thanos_t@163.com"
] |
thanos_t@163.com
|
38ec180b53d6b1400130ca2c7be930ed3ddf9e26
|
edfffbee3f6307e5814252d92a30f809a4f18bb5
|
/spring-beans/src/main/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandler.java
|
8edcef1b08abbb743a41be276f0a22ef6bcd4a6f
|
[] |
no_license
|
CST11021/SpringMVC_Source_3.2.9_Fourm
|
249009070e247a8f95d1b80b654903e11e72001d
|
8a87c479607b86338417228e6a8b622b7b361cc4
|
refs/heads/master
| 2022-09-16T02:57:57.311437
| 2018-02-09T10:18:34
| 2018-02-09T10:18:34
| 94,592,635
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,491
|
java
|
/*
* Copyright 2002-2012 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.beans.factory.xml;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanDefinitionHolder;
import org.springframework.beans.factory.config.RuntimeBeanReference;
import org.springframework.core.Conventions;
/**
* Simple {@code NamespaceHandler} implementation that maps custom attributes
* directly through to bean properties. An important point to note is that this
* {@code NamespaceHandler} does not have a corresponding schema since there
* is no way to know in advance all possible attribute names.
*
* <p>An example of the usage of this {@code NamespaceHandler} is shown below:
*
* <pre class="code">
* <bean id="rob" class="..TestBean" p:name="Rob Harrop" p:spouse-ref="sally"/></pre>
*
* Here the '{@code p:name}' corresponds directly to the '{@code name}'
* property on class '{@code TestBean}'. The '{@code p:spouse-ref}'
* attributes corresponds to the '{@code spouse}' property and, rather
* than being the concrete value, it contains the name of the bean that will
* be injected into that property.
*
* @author Rob Harrop
* @author Juergen Hoeller
* @since 2.0
*/
public class SimplePropertyNamespaceHandler implements NamespaceHandler {
private static final String REF_SUFFIX = "-ref";
public void init() {}
public BeanDefinition parse(Element element, ParserContext parserContext) {
parserContext.getReaderContext().error("Class [" + getClass().getName() + "] does not support custom elements.", element);
return null;
}
public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext) {
// p命名空间只处理属性
if (node instanceof Attr) {
Attr attr = (Attr) node;
String propertyName = parserContext.getDelegate().getLocalName(attr);
String propertyValue = attr.getValue();
// 获取BeanDefinition的MutablePropertyValues对象
MutablePropertyValues pvs = definition.getBeanDefinition().getPropertyValues();
if (pvs.contains(propertyName)) {
parserContext.getReaderContext().error("Property '" + propertyName + "' is already defined using " + "both <property> and inline syntax. Only one approach may be used per property.", attr);
}
if (propertyName.endsWith(REF_SUFFIX)) {
// 获取属性名称
propertyName = propertyName.substring(0, propertyName.length() - REF_SUFFIX.length());
// 设置为bean引用
pvs.add(Conventions.attributeNameToPropertyName(propertyName), new RuntimeBeanReference(propertyValue));
}
else {
pvs.add(Conventions.attributeNameToPropertyName(propertyName), propertyValue);
}
}
return definition;
}
}
|
[
"l"
] |
l
|
7c9135ca7472c017fbf97f4370cf0d632082899e
|
e24be08fc9e9d0e05220d0c4f74d99fdacab0d02
|
/M2-Android/app/src/main/java/grintsys/com/vanshop/entities/product/ProductMatrixView.java
|
16936644e26760143b177429359194c04f8d83e5
|
[
"MIT"
] |
permissive
|
Grintsys/GRINTSYS.M2
|
211b6ef29f524d425a68ae45b8d64bdb355ad226
|
28b4d8e957a3f43136e5fcbc8aa08c8ad2ba4a0f
|
refs/heads/master
| 2020-05-04T02:07:09.741613
| 2019-08-16T21:16:54
| 2019-08-16T21:16:54
| 178,920,661
| 0
| 0
|
MIT
| 2019-08-16T21:16:55
| 2019-04-01T18:13:57
|
Java
|
UTF-8
|
Java
| false
| false
| 762
|
java
|
package grintsys.com.vanshop.entities.product;
import java.util.ArrayList;
/**
* Created by alienware on 2/10/2017.
*/
public class ProductMatrixView {
private ProductSize size;
private ArrayList<ProductVariant> variants;
public ProductMatrixView(){
}
public ProductMatrixView(ProductSize size, ArrayList<ProductVariant> variants) {
this.size = size;
this.variants = variants;
}
public ProductSize getSize() {
return size;
}
public void setSize(ProductSize size) {
this.size = size;
}
public ArrayList<ProductVariant> getVariants() {
return variants;
}
public void setVariants(ArrayList<ProductVariant> variants) {
this.variants = variants;
}
}
|
[
"serpel.js@gmail.com"
] |
serpel.js@gmail.com
|
9b44fd8b3d852585bc2dbdf4b4fc6a7f64ff43d4
|
404c02a37b4fb2920a65699da512b99e7e1f8006
|
/shared/src/com/pclewis/mcpatcher/MCLogger.java
|
0e69092114932356a8d6c35289c37f5b68a5c186
|
[
"LicenseRef-scancode-public-domain"
] |
permissive
|
VijayEluri/mcpatcher
|
9edb518c32c071db6e861eeef9ad538ce2daea43
|
0101db070648f96695ee3e080ae036cd71ec1c45
|
refs/heads/master
| 2020-05-20T02:36:10.135443
| 2012-12-24T19:12:28
| 2012-12-24T19:12:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,221
|
java
|
package com.pclewis.mcpatcher;
import java.util.HashMap;
import java.util.logging.*;
public class MCLogger {
private static final HashMap<String, MCLogger> allLoggers = new HashMap<String, MCLogger>();
private final String logPrefix;
private final Logger logger;
public static MCLogger getLogger(String category) {
return getLogger(category, category);
}
public static synchronized MCLogger getLogger(String category, String logPrefix) {
MCLogger logger = allLoggers.get(category);
if (logger == null) {
logger = new MCLogger(category, logPrefix);
allLoggers.put(category, logger);
}
return logger;
}
private MCLogger(String category, String logPrefix) {
this.logPrefix = logPrefix;
logger = Logger.getLogger(category);
logger.setLevel(MCPatcherUtils.getLogLevel(category));
logger.setUseParentHandlers(false);
logger.addHandler(new Handler() {
private final Formatter formatter = new Formatter() {
@Override
public String format(LogRecord record) {
Level level = record.getLevel();
if (level == Level.CONFIG) {
return record.getMessage();
} else {
String message = record.getMessage();
String prefix = "";
while (message.startsWith("\n")) {
prefix += "\n";
message = message.substring(1);
}
return prefix + "[" + MCLogger.this.logPrefix + "] " + level.toString() + ": " + message;
}
}
};
@Override
public void publish(LogRecord record) {
System.out.println(formatter.format(record));
}
@Override
public void flush() {
}
@Override
public void close() throws SecurityException {
}
});
}
public boolean isLoggable(Level level) {
return logger.isLoggable(level);
}
public void setLevel(Level level) {
logger.setLevel(level);
}
public void log(Level level, String format, Object... params) {
if (isLoggable(level)) {
logger.log(level, String.format(format, params));
}
}
public void config(String format, Object... params) {
log(Level.CONFIG, format, params);
}
public void fine(String format, Object... params) {
log(Level.FINE, format, params);
}
public void finer(String format, Object... params) {
log(Level.FINER, format, params);
}
public void finest(String format, Object... params) {
log(Level.FINEST, format, params);
}
public void info(String format, Object... params) {
log(Level.INFO, format, params);
}
public void severe(String format, Object... params) {
log(Level.SEVERE, format, params);
}
public void warning(String format, Object... params) {
log(Level.WARNING, format, params);
}
}
|
[
"prupe@nc.rr.com"
] |
prupe@nc.rr.com
|
674be9efe207371bc36a830692acc56d2d986144
|
1f9ae2a79b65b06dc21a72a8e856e38fc26fc453
|
/src/main/java/com/okta/developer/domain/User.java
|
ede2a2f8be8a936bed37bd790946722c15e8e71c
|
[] |
no_license
|
JakSla/jhipsterGallery
|
0ab348fb11aae3c99cdd94d8131148012a6640ab
|
1ed9e58e7b4bd887b2df2d78b753496fbca5986d
|
refs/heads/master
| 2020-05-22T05:59:00.874883
| 2019-05-12T11:16:50
| 2019-05-12T11:16:50
| 186,245,180
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,255
|
java
|
package com.okta.developer.domain;
import com.okta.developer.config.Constants;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Locale;
import java.util.Set;
/**
* A user.
*/
@Entity
@Table(name = "jhi_user")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class User extends AbstractAuditingEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private String id;
@NotNull
@Pattern(regexp = Constants.LOGIN_REGEX)
@Size(min = 1, max = 50)
@Column(length = 50, unique = true, nullable = false)
private String login;
@Size(max = 50)
@Column(name = "first_name", length = 50)
private String firstName;
@Size(max = 50)
@Column(name = "last_name", length = 50)
private String lastName;
@Email
@Size(min = 5, max = 254)
@Column(length = 254, unique = true)
private String email;
@NotNull
@Column(nullable = false)
private boolean activated = false;
@Size(min = 2, max = 6)
@Column(name = "lang_key", length = 6)
private String langKey;
@Size(max = 256)
@Column(name = "image_url", length = 256)
private String imageUrl;
@JsonIgnore
@ManyToMany
@JoinTable(
name = "jhi_user_authority",
joinColumns = {@JoinColumn(name = "user_id", referencedColumnName = "id")},
inverseJoinColumns = {@JoinColumn(name = "authority_name", referencedColumnName = "name")})
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@BatchSize(size = 20)
private Set<Authority> authorities = new HashSet<>();
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getLogin() {
return login;
}
// Lowercase the login before saving it in database
public void setLogin(String login) {
this.login = StringUtils.lowerCase(login, Locale.ENGLISH);
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
public boolean getActivated() {
return activated;
}
public void setActivated(boolean activated) {
this.activated = activated;
}
public String getLangKey() {
return langKey;
}
public void setLangKey(String langKey) {
this.langKey = langKey;
}
public Set<Authority> getAuthorities() {
return authorities;
}
public void setAuthorities(Set<Authority> authorities) {
this.authorities = authorities;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof User)) {
return false;
}
return id != null && id.equals(((User) o).id);
}
@Override
public int hashCode() {
return 31;
}
@Override
public String toString() {
return "User{" +
"login='" + login + '\'' +
", firstName='" + firstName + '\'' +
", lastName='" + lastName + '\'' +
", email='" + email + '\'' +
", imageUrl='" + imageUrl + '\'' +
", activated='" + activated + '\'' +
", langKey='" + langKey + '\'' +
"}";
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
ba90d51af6a03a5fb88ee976dbda68e8035d19c7
|
1f5c9b19b09f0fad775a5bb07473690ae6b0c814
|
/pub/src/public/nc/vo/so/pub/SOParameterVO.java
|
e87e31429199b2b21a2b1ea939a275e4166994cb
|
[] |
no_license
|
hdulqs/NC65_SCM_SO
|
8e622a7bb8c2ccd1b48371eedd50591001cd75c0
|
aaf762285b10e7fef525268c2c90458aa4290bf6
|
refs/heads/master
| 2020-05-19T01:23:50.824879
| 2018-07-04T09:41:39
| 2018-07-04T09:41:39
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,139
|
java
|
package nc.vo.so.pub;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import nc.vo.pub.AggregatedValueObject;
import nc.vo.pub.CircularlyAccessibleValueObject;
/**
* 销售前后台动作处理参数类
* <ol>
* <li>单据VO
* <li>单据VO数组
* <li>业务检查Map
* </ol>
*
* @since 6.0
* @version 2011-5-7 下午03:38:32
* @author 刘志伟
*/
public class SOParameterVO implements Serializable {
private static final long serialVersionUID = -3143042766360177639L;
/** 单据VO */
public AggregatedValueObject vo;
/** 单据VO数组 */
public AggregatedValueObject[] vos;
/** 单据View */
public CircularlyAccessibleValueObject view;
/** 单据Views */
public CircularlyAccessibleValueObject[] views;
private Object userobject;
/** 业务检查Map:ATP检查、 信用检查、超账期金额检查、超账期天数检查、超内控账期天数检查 */
private Map<String, Boolean> businessCheckMap =
new HashMap<String, Boolean>();
public AggregatedValueObject getVo() {
return this.vo;
}
public void setVo(AggregatedValueObject vo) {
this.vo = vo;
}
public AggregatedValueObject[] getVos() {
return this.vos;
}
public void setVos(AggregatedValueObject[] vos) {
this.vos = vos;
}
public CircularlyAccessibleValueObject getView() {
return this.view;
}
public void setView(CircularlyAccessibleValueObject view) {
this.view = view;
}
public CircularlyAccessibleValueObject[] getViews() {
return this.views;
}
public void setViews(CircularlyAccessibleValueObject[] views) {
this.views = views;
}
public Map<String, Boolean> getBusinessCheckMap() {
if (null == this.businessCheckMap) {
this.businessCheckMap = new HashMap<String, Boolean>();
}
return this.businessCheckMap;
}
public void setBusinessCheckMap(Map<String, Boolean> businessCheckMap) {
this.businessCheckMap = businessCheckMap;
}
public Object getUserObject() {
return this.userobject;
}
public void setUserObject(Object userobject) {
this.userobject = userobject;
}
}
|
[
"944482059@qq.com"
] |
944482059@qq.com
|
25b60114380f60a476a5890f6b1e26db2214a422
|
9cd318f24adf54df371c863b5a83acd377ea112e
|
/app/src/main/java/thegroceryshop/com/webservices/RequestBuilder.java
|
dad8053705abb3bfcff55ca18d5d3c5784f91215
|
[] |
no_license
|
MostafaAtta/Grocery
|
c91b87d6545515609f59a3939d6caf67252380b8
|
2ad00726db7565ceef5e7cd61eb96b0083ce44a3
|
refs/heads/master
| 2022-06-18T09:50:36.268053
| 2020-05-10T21:40:13
| 2020-05-10T21:40:13
| 262,879,971
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 874
|
java
|
package thegroceryshop.com.webservices;
import com.google.gson.Gson;
import org.json.JSONException;
import org.json.JSONObject;
/**
* Created by rohitg on 12/14/2016.
*/
public class RequestBuilder {
public static String build(Object obj) {
Gson gson = new Gson();
JSONObject reqObj = new JSONObject();
try {
reqObj.put("data", new JSONObject(gson.toJson(obj)));
return reqObj.toString();
} catch (JSONException e) {
e.printStackTrace();
return null;
}
}
public static JSONObject buildObj(Object obj) {
Gson gson = new Gson();
JSONObject reqObj = new JSONObject();
try {
return new JSONObject(gson.toJson(obj));
} catch (JSONException e) {
e.printStackTrace();
return reqObj;
}
}
}
|
[
"mostafa.sa.atta@gmail.com"
] |
mostafa.sa.atta@gmail.com
|
2d9bf46d433098addca2b382b05157e67d4ccd8c
|
5e33e0622a5689972138fb93737f9ab8bf1515eb
|
/src/main/java/org/jtwig/reflection/resolver/argument/ArgumentResolver.java
|
b5edfacc17f80fd6113b055963a24cea8c3575b6
|
[
"Apache-2.0"
] |
permissive
|
cjbrooks12/jtwig-reflection
|
c729d75b48b28eeb884bdfdc1aab93f01321255d
|
543735358e40b98f23e507ba47023b4cdffb7f90
|
refs/heads/master
| 2021-07-02T21:46:33.646798
| 2017-09-23T19:22:47
| 2017-09-23T19:22:47
| 104,593,226
| 0
| 0
| null | 2017-09-23T19:23:26
| 2017-09-23T19:23:26
| null |
UTF-8
|
Java
| false
| false
| 293
|
java
|
package org.jtwig.reflection.resolver.argument;
import com.google.common.base.Optional;
import org.jtwig.reflection.model.Value;
import org.jtwig.reflection.model.java.JavaMethodArgument;
public interface ArgumentResolver {
Optional<Value> resolve (JavaMethodArgument methodArgument);
}
|
[
"jmelo@lyncode.com"
] |
jmelo@lyncode.com
|
241534de1043c23b343bae8323e9c67710b6819c
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-12798-85-6-PESA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/template/InternalTemplateManager_ESTest_scaffolding.java
|
b2669384cb08fe56f9ff94d8738db7464b7ff8c0
|
[] |
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
| 459
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Apr 03 20:00:04 UTC 2020
*/
package com.xpn.xwiki.internal.template;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class InternalTemplateManager_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
72ba14c916a2322f95947dbb6ce23dff6580de8f
|
3fd10ccf9d478dbfd78a662fdf3acc526ff39ef5
|
/Method/Client/module/combat/Velocity.java
|
dd4ee599ec450c8528a8f1b2e0743b24b313ed2f
|
[] |
no_license
|
cringesyringe11/FutureX-SRC
|
099a3033518e50adb692b899fec46e29e8ecbacb
|
b6436c7de2424b6c55947c376912a2c11c7d251d
|
refs/heads/main
| 2023-06-22T15:18:17.877997
| 2021-07-23T06:22:53
| 2021-07-23T06:22:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,904
|
java
|
/*
* Decompiled with CFR 0.151.
*/
package Method.Client.module.combat;
import Method.Client.Main;
import Method.Client.managers.Setting;
import Method.Client.module.Category;
import Method.Client.module.Module;
import Method.Client.utils.TimerUtils;
import Method.Client.utils.Utils;
import Method.Client.utils.system.Connection;
import Method.Client.utils.system.Wrapper;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.CPacketPlayer;
import net.minecraft.network.play.server.SPacketEntityVelocity;
import net.minecraft.network.play.server.SPacketExplosion;
import net.minecraftforge.fml.common.gameevent.TickEvent;
public class Velocity
extends Module {
Setting mode = Main.setmgr.add(new Setting("Mode", (Module)this, "Simple", "Simple", "AAC", "Fast", "YPort", "AAC4Flag", "Pull", "Airmove", "HurtPacket"));
Setting XMult = Main.setmgr.add(new Setting("XMultipl", (Module)this, 0.0, 0.0, 10.0, false, this.mode, "Simple", 1));
Setting YMult = Main.setmgr.add(new Setting("YMultipl", (Module)this, 0.0, 0.0, 10.0, false, this.mode, "Simple", 2));
Setting ZMult = Main.setmgr.add(new Setting("ZMultipl", (Module)this, 0.0, 0.0, 10.0, false, this.mode, "Simple", 3));
Setting onPacket = Main.setmgr.add(new Setting("Only Packet", (Module)this, true, this.mode, "Simple", 4));
Setting CancelPacket = Main.setmgr.add(new Setting("CancelPacket", (Module)this, true, this.mode, "Simple", 5));
Setting Super = Main.setmgr.add(new Setting("Super", (Module)this, true, this.mode, "Pull", 1));
Setting Pushspeed = Main.setmgr.add(new Setting("Pushspeed", (Module)this, 0.25, 1.0E-4, 0.4, false, this.mode, "Airmove", 2));
Setting Pushstart = Main.setmgr.add(new Setting("Pushstart", (Module)this, 8.0, 2.0, 9.0, false, this.mode, "Airmove", 3));
private double motionX;
private double motionZ;
private final TimerUtils timer = new TimerUtils();
public Velocity() {
super("Velocity", 0, Category.COMBAT, "Velocity");
}
@Override
public void onClientTick(TickEvent.ClientTickEvent event) {
if (this.mode.getValString().equalsIgnoreCase("AAC")) {
if (Velocity.mc.player.hurtTime > 0 && Velocity.mc.player.hurtTime <= 7) {
Velocity.mc.player.motionX *= 0.5;
Velocity.mc.player.motionZ *= 0.5;
}
if (Velocity.mc.player.hurtTime > 0 && Velocity.mc.player.hurtTime < 6) {
Velocity.mc.player.motionX = 0.0;
Velocity.mc.player.motionZ = 0.0;
}
}
if (this.mode.getValString().equalsIgnoreCase("Fast") && Velocity.mc.player.hurtTime < 9 && !Velocity.mc.player.onGround) {
double yaw = Velocity.mc.player.rotationYawHead;
yaw = Math.toRadians(yaw);
double dX = -Math.sin(yaw) * 0.08;
double dZ = Math.cos(yaw) * 0.08;
if (Velocity.mc.player.getHealth() >= 6.0f) {
Velocity.mc.player.motionX = dX;
Velocity.mc.player.motionZ = dZ;
}
}
if (this.mode.getValString().equalsIgnoreCase("Simple") && !this.onPacket.getValBoolean() && Velocity.mc.player.hurtTime > 0 && Velocity.mc.player.fallDistance < 3.0f && this.timer.isDelay(100L)) {
if (Utils.isMovinginput()) {
Velocity.mc.player.motionX *= this.XMult.getValDouble();
Velocity.mc.player.motionZ *= this.ZMult.getValDouble();
} else {
Velocity.mc.player.motionX *= this.XMult.getValDouble() + 0.2;
Velocity.mc.player.motionZ *= this.ZMult.getValDouble() + 0.2;
}
Velocity.mc.player.motionY -= this.YMult.getValDouble();
Velocity.mc.player.motionY += this.YMult.getValDouble();
this.timer.setLastMS();
}
if (this.mode.getValString().equalsIgnoreCase("AAC4Flag") && (Velocity.mc.player.hurtTime == 3 || Velocity.mc.player.hurtTime == 4)) {
double[] directionSpeedVanilla = Utils.directionSpeed(0.05);
Velocity.mc.player.motionX = directionSpeedVanilla[0];
Velocity.mc.player.motionZ = directionSpeedVanilla[1];
}
if (this.mode.getValString().equalsIgnoreCase("Pull")) {
if (Velocity.mc.player.hurtTime == 9) {
this.motionX = Velocity.mc.player.motionX;
this.motionZ = Velocity.mc.player.motionZ;
}
if (this.Super.getValBoolean()) {
if (Velocity.mc.player.hurtTime == 8) {
Velocity.mc.player.motionX = -this.motionX * 0.45;
Velocity.mc.player.motionZ = -this.motionZ * 0.45;
}
} else if (Velocity.mc.player.hurtTime == 4) {
Velocity.mc.player.motionX = -this.motionX * 0.6;
Velocity.mc.player.motionZ = -this.motionZ * 0.6;
}
}
if (this.mode.getValString().equalsIgnoreCase("Airmove")) {
if (Velocity.mc.player.hurtTime == 9) {
this.motionX = Velocity.mc.player.motionX;
this.motionZ = Velocity.mc.player.motionZ;
} else if ((double)Velocity.mc.player.hurtTime == this.Pushstart.getValDouble() - 1.0) {
Velocity.mc.player.motionX *= -this.Pushspeed.getValDouble();
Velocity.mc.player.motionZ *= -this.Pushspeed.getValDouble();
}
}
if (this.mode.getValString().equalsIgnoreCase("HurtPacket") && Velocity.mc.player.hurtResistantTime > 18) {
Wrapper.INSTANCE.sendPacket((Packet)new CPacketPlayer.Position(Velocity.mc.player.posX, Velocity.mc.player.posY - 12.0, Velocity.mc.player.posZ, false));
}
super.onClientTick(event);
}
@Override
public boolean onPacket(Object packet, Connection.Side side) {
if (this.mode.getValString().equalsIgnoreCase("Simple") && this.onPacket.getValBoolean()) {
if (this.CancelPacket.getValBoolean()) {
if (packet instanceof SPacketEntityVelocity) {
SPacketEntityVelocity packet2 = (SPacketEntityVelocity)packet;
return packet2.getEntityID() != Velocity.mc.player.getEntityId();
}
return !(packet instanceof SPacketExplosion) || this.YMult.getValDouble() != 0.0 || this.XMult.getValDouble() != 0.0 || this.ZMult.getValDouble() != 0.0;
}
if (this.timer.isDelay(100L)) {
SPacketEntityVelocity packet2;
if (packet instanceof SPacketEntityVelocity) {
packet2 = (SPacketEntityVelocity)packet;
packet2.motionY = (int)((double)packet2.motionY * this.YMult.getValDouble());
packet2.motionX = (int)((double)packet2.motionX * this.XMult.getValDouble());
packet2.motionZ = (int)((double)packet2.motionZ * this.ZMult.getValDouble());
}
if (packet instanceof SPacketExplosion) {
packet2 = (SPacketExplosion)packet;
packet2.motionY = (float)((double)packet2.motionY * this.YMult.getValDouble());
packet2.motionX = (float)((double)packet2.motionX * this.XMult.getValDouble());
packet2.motionZ = (float)((double)packet2.motionZ * this.ZMult.getValDouble());
}
this.timer.setLastMS();
}
}
if (this.mode.getValString().equalsIgnoreCase("YPort") && Velocity.mc.player.hurtTime >= 8) {
Velocity.mc.player.setPosition(Velocity.mc.player.lastTickPosX, Velocity.mc.player.lastTickPosY + 2.0, Velocity.mc.player.lastTickPosZ);
Velocity.mc.player.motionY -= 0.3;
Velocity.mc.player.motionX *= 0.8;
Velocity.mc.player.motionZ *= 0.8;
}
return true;
}
}
|
[
"65968863+notperry1234567890@users.noreply.github.com"
] |
65968863+notperry1234567890@users.noreply.github.com
|
4279d8df3b00d2c5fc2482e25649fdf69f132530
|
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
|
/classes2/com/tencent/mobileqq/transfile/HttpNetReq$AESDecryptor.java
|
8ed4d5edb644b9a46ae81bee46c225f657e85e86
|
[] |
no_license
|
meeidol-luo/qooq
|
588a4ca6d8ad579b28dec66ec8084399fb0991ef
|
e723920ac555e99d5325b1d4024552383713c28d
|
refs/heads/master
| 2020-03-27T03:16:06.616300
| 2016-10-08T07:33:58
| 2016-10-08T07:33:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 575
|
java
|
package com.tencent.mobileqq.transfile;
import com.tencent.mobileqq.hotpatch.NotVerifyClass;
public class HttpNetReq$AESDecryptor
{
static final int a = 16;
static final int b = 128;
public byte[] a;
HttpNetReq$AESDecryptor(byte[] paramArrayOfByte)
{
boolean bool = NotVerifyClass.DO_VERIFY_CLASS;
this.a = new byte[16];
this.a = paramArrayOfByte;
}
}
/* Location: E:\apk\QQ_91\classes2-dex2jar.jar!\com\tencent\mobileqq\transfile\HttpNetReq$AESDecryptor.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
bdfa972778c9f16c2202fae73c42f88a8320ad22
|
f1b43d3cf5a6efd8755d2b88c622eada6cc41b53
|
/emp-platform/system/system-core/src/main/java/org/minxc/emp/system/excel/editor/IFontEditor.java
|
58b8a4f77d17a19505db5eebdff3e56ab664468b
|
[
"Apache-2.0"
] |
permissive
|
minxc/iEMPv7
|
ed324d9bdcbd22db14f1214ee7ebd0d0838cb24e
|
428ba1b516fc0e0a6e6b345c8042e7aef0d14a63
|
refs/heads/master
| 2020-03-26T20:14:10.882046
| 2018-08-24T14:01:40
| 2018-08-24T14:01:40
| 145,312,273
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 321
|
java
|
package org.minxc.emp.system.excel.editor;
import org.minxc.emp.system.excel.style.font.Font;
/**
* 字体编辑器
*
* @author zxh
*/
public interface IFontEditor {
/**
* 修改字体属性
*
* @param font 字体,可设置或获取字体属性
*/
public void updateFont(Font font);
}
|
[
"xianchangmin@126.com"
] |
xianchangmin@126.com
|
3271e7b0f421fe635118b52cb15e94fde1e64184
|
1becd1e3f3e330cbf47681e26f8286112e4dc945
|
/src/main/java/info/u_team/virus_disease_spread/handler/CommonEventHandler.java
|
15b580e7e27cf596df28aa08fddd6c8bfd89bf33
|
[
"Apache-2.0"
] |
permissive
|
MC-U-Team/Virus-Disease-Mod
|
8edb43e7c78cea7c3d2b87ec9dd93410a70c742d
|
469e639e949bc840a6cb5ed9a94c4cff4de5268b
|
refs/heads/1.16.5
| 2023-07-20T10:43:53.425394
| 2021-06-21T19:28:26
| 2021-06-21T19:28:26
| 250,037,561
| 1
| 0
|
Apache-2.0
| 2023-07-12T04:36:55
| 2020-03-25T16:53:23
|
Java
|
UTF-8
|
Java
| false
| false
| 4,870
|
java
|
package info.u_team.virus_disease_spread.handler;
import info.u_team.virus_disease_spread.config.CommonConfig;
import info.u_team.virus_disease_spread.init.VirusDiseaseSpreadEffects;
import net.minecraft.block.BlockState;
import net.minecraft.block.CauldronBlock;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.potion.EffectInstance;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
import net.minecraftforge.event.entity.living.PotionEvent.PotionRemoveEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock;
import net.minecraftforge.eventbus.api.IEventBus;
public class CommonEventHandler {
public static void onLivingUpdate(LivingUpdateEvent event) {
if (!(event.getEntityLiving() instanceof ServerPlayerEntity)) {
return;
}
final ServerPlayerEntity player = (ServerPlayerEntity) event.getEntityLiving();
final World world = player.getEntityWorld();
if (world.getGameTime() - player.getPersistentData().getInt("washStartTime") > 200) {
player.getPersistentData().putInt("wash", 0);
}
if (player.getActivePotionEffect(VirusDiseaseSpreadEffects.INFECTED.get()) != null) {
if (world.getRandom().nextInt(50) == 0) {
final PlayerEntity other = world.getClosestPlayer(player, 3);
if (other != null && player != other) {
if (other.getActivePotionEffect(VirusDiseaseSpreadEffects.INFECTED.get()) == null) {
if (player.getDistance(other) < 1) {
updateInfection(other, 90);
}
updateInfection(other, 30);
}
}
}
return;
}
if (isInBase(player)) {
if (world.getRandom().nextInt(500) == 0) {
updateInfection(player, -1);
}
} else {
if (world.getRandom().nextInt(CommonConfig.getInstance().chancePerTickToGetHigherInfectionProbability.get()) == 0) {
int value = getInfection(player) + world.getRandom().nextInt(3) + 1;
if (value >= 100) {
value = 0;
player.addPotionEffect(new EffectInstance(VirusDiseaseSpreadEffects.INFECTED.get(), 24000 * CommonConfig.getInstance().howManyDaysInfected.get(), world.getRandom().nextInt(3), false, false));
}
setInfection(player, value);
}
}
}
public static void onRightClickBlock(RightClickBlock event) {
final World world = event.getWorld();
final BlockPos pos = event.getPos();
final BlockState state = world.getBlockState(pos);
final PlayerEntity player = event.getPlayer();
if (world.isRemote() || !(state.getBlock() instanceof CauldronBlock)) {
return;
}
final int level = state.get(CauldronBlock.LEVEL);
if (level == 0) {
return;
}
player.getPersistentData().putLong("washStartTime", world.getGameTime());
int value = player.getPersistentData().getInt("wash") + 1;
if (value > 90) {
value = 90;
}
if (world instanceof ServerWorld) {
final ServerWorld serverWorld = (ServerWorld) world;
serverWorld.spawnParticle(ParticleTypes.FALLING_WATER, pos.getX() + 0.5, pos.getY() + 0.8, pos.getZ() + 0.5, 30, 0.3, 0.2, 0.3, 0.1);
}
player.sendStatusMessage(new TranslationTextComponent("event.virusdiseasespread.washing_message", (int) Math.floor((value / 90D) * 100)), true);
if (value == 90) {
value = 0;
setInfection(player, 0);
world.setBlockState(pos, state.with(CauldronBlock.LEVEL, level - 1));
}
player.getPersistentData().putInt("wash", value);
}
public static void onPotionRemove(PotionRemoveEvent event) {
if (event.getPotion() == VirusDiseaseSpreadEffects.INFECTED.get()) {
event.setCanceled(true);
}
}
public static void registerForge(IEventBus bus) {
bus.addListener(CommonEventHandler::onLivingUpdate);
bus.addListener(CommonEventHandler::onRightClickBlock);
bus.addListener(CommonEventHandler::onPotionRemove);
}
// Helper methods for the event handler
private static void setInfection(PlayerEntity player, int value) {
player.getPersistentData().putInt("infection", value);
}
private static int getInfection(PlayerEntity player) {
return player.getPersistentData().getInt("infection");
}
private static void updateInfection(PlayerEntity player, int value) {
setInfection(player, Math.max(0, Math.min(100, getInfection(player) + value)));
}
private static boolean isInBase(ServerPlayerEntity player) {
if (player.func_241141_L_() != player.world.getDimensionKey()) {
return false;
}
final BlockPos spawnPos = player.func_241140_K_();
if (spawnPos == null) {
return false;
}
return spawnPos.withinDistance(player.getPosition(), CommonConfig.getInstance().bedRadius.get());
}
}
|
[
"hycrafthd@live.de"
] |
hycrafthd@live.de
|
35f8ee10c83f3e4477af3b4ba7d67b1100bf88b7
|
36eb93ca049aff3eb7034ed256262dc108273616
|
/compiler/src/com/sun/squawk/compiler/asm/arm/CallRelocator.java
|
df569996d03f748ccbab866ed13d3d678f671cfc
|
[] |
no_license
|
dougxc/Squawk3G
|
6c3b11d12c5f32ae4a818c85b220a46ffa70430e
|
2e1ba86a30fcbe7b3873df3cfc1711bba9b73ac6
|
refs/heads/master
| 2022-12-27T18:47:34.659667
| 2020-09-29T09:27:58
| 2020-09-29T09:27:58
| 299,568,093
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,340
|
java
|
/*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the proprietary information of Sun Microsystems, Inc.
* Use is subject to license terms.
*
* This is a part of the Squawk JVM.
*
* $Id: $
*/
package com.sun.squawk.compiler.asm.arm;
import com.sun.squawk.compiler.asm.*;
/**
* Class to record call/jmp site locations when fixup is required.
*/
class CallRelocator extends Relocator {
/**
* Create a relocator for a call, jmp, or jcc instruction.
*
* @param size the number of bytes to the address
* @param dst the absolute destination address
* @param position the offset into the code buffer
* @param next pointer to the next Relocator
*/
public CallRelocator(int size, int dst, int position, Relocator next) {
super(position+size, next);
value = dst - 4 - position - size;
}
/**
* Emit the relocation into the code buffer.
*
* @param asm the Assembler
* @param address the reclocation address for the code
* @return the relocation information
*/
public int emit(ARMAssembler asm, int address) {
asm.getCode().setCodePos(position);
asm.emitInt(value - address);
return (ARMAssembler.RELOC_RELATIVE_INT << 24) | position;
}
}
|
[
"doug.simon@oracle.com"
] |
doug.simon@oracle.com
|
7f6142e0449948704e014318e73f98f04d43ae47
|
d1ecb935c32da8a2240c2eca6d8f934c0b233a82
|
/buruberi-core/src/main/java/is/hello/buruberi/util/NonGuaranteed.java
|
04874d46ba0232ed627dd01e62d8a77aace7ba4f
|
[
"Apache-2.0"
] |
permissive
|
hello/android-buruberi
|
32cc4df10abb1ea7ad60649977a72f3f3a830083
|
40d8623830d68df3d8a510c59fcf107fddf61013
|
refs/heads/master
| 2021-01-11T10:05:40.929814
| 2016-03-03T00:48:42
| 2016-03-03T00:48:42
| 43,840,940
| 6
| 0
| null | 2016-03-03T00:48:43
| 2015-10-07T19:46:56
|
Java
|
UTF-8
|
Java
| false
| false
| 737
|
java
|
package is.hello.buruberi.util;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Marks an API component as depending on behavior that has been stable
* between Android versions, and different vendors, but is not guaranteed
* to always be available. Code that uses components marked with this
* annotation should gracefully degrade if the components become unavailable.
*/
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.SOURCE)
@Inherited
@Documented
public @interface NonGuaranteed {
}
|
[
"km@sayhello.com"
] |
km@sayhello.com
|
be968dd03c27be1d78d76fe75d4def1b9af76114
|
1ae1b2da8c0d29ceb9473251c24f2780d859cfb1
|
/trunk/Daywalker/src/com/example/daywalker/FullscreenActivity.java
|
21918a922e1f4d2b9febbf7176942b48237f3edb
|
[] |
no_license
|
BGCX261/zombimetric-svn-to-git
|
d52cceee6bd3e36096d273817b8bf0dec379d08c
|
4912f5f406af2ebaddfc1cdff88a2810ae469f5f
|
refs/heads/master
| 2021-01-22T07:32:13.818019
| 2015-08-25T15:18:48
| 2015-08-25T15:18:48
| 41,601,804
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,827
|
java
|
package com.example.daywalker;
import com.example.daywalker.util.SystemUiHider;
import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.view.MotionEvent;
import android.view.View;
/**
* An example full-screen activity that shows and hides the system UI (i.e.
* status bar and navigation/system bar) with user interaction.
*
* @see SystemUiHider
*/
public class FullscreenActivity extends Activity {
/**
* Whether or not the system UI should be auto-hidden after
* {@link #AUTO_HIDE_DELAY_MILLIS} milliseconds.
*/
private static final boolean AUTO_HIDE = true;
/**
* If {@link #AUTO_HIDE} is set, the number of milliseconds to wait after
* user interaction before hiding the system UI.
*/
private static final int AUTO_HIDE_DELAY_MILLIS = 3000;
/**
* If set, will toggle the system UI visibility upon interaction. Otherwise,
* will show the system UI visibility upon interaction.
*/
private static final boolean TOGGLE_ON_CLICK = true;
/**
* The flags to pass to {@link SystemUiHider#getInstance}.
*/
private static final int HIDER_FLAGS = SystemUiHider.FLAG_HIDE_NAVIGATION;
/**
* The instance of the {@link SystemUiHider} for this activity.
*/
private SystemUiHider mSystemUiHider;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fullscreen);
final View controlsView = findViewById(R.id.fullscreen_content_controls);
final View contentView = findViewById(R.id.fullscreen_content);
// Set up an instance of SystemUiHider to control the system UI for
// this activity.
mSystemUiHider = SystemUiHider.getInstance(this, contentView,
HIDER_FLAGS);
mSystemUiHider.setup();
mSystemUiHider
.setOnVisibilityChangeListener(new SystemUiHider.OnVisibilityChangeListener() {
// Cached values.
int mControlsHeight;
int mShortAnimTime;
@Override
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
public void onVisibilityChange(boolean visible) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
// If the ViewPropertyAnimator API is available
// (Honeycomb MR2 and later), use it to animate the
// in-layout UI controls at the bottom of the
// screen.
if (mControlsHeight == 0) {
mControlsHeight = controlsView.getHeight();
}
if (mShortAnimTime == 0) {
mShortAnimTime = getResources().getInteger(
android.R.integer.config_shortAnimTime);
}
controlsView
.animate()
.translationY(visible ? 0 : mControlsHeight)
.setDuration(mShortAnimTime);
} else {
// If the ViewPropertyAnimator APIs aren't
// available, simply show or hide the in-layout UI
// controls.
controlsView.setVisibility(visible ? View.VISIBLE
: View.GONE);
}
if (visible && AUTO_HIDE) {
// Schedule a hide().
delayedHide(AUTO_HIDE_DELAY_MILLIS);
}
}
});
// Set up the user interaction to manually show or hide the system UI.
contentView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (TOGGLE_ON_CLICK) {
mSystemUiHider.toggle();
} else {
mSystemUiHider.show();
}
}
});
// Upon interacting with UI controls, delay any scheduled hide()
// operations to prevent the jarring behavior of controls going away
// while interacting with the UI.
findViewById(R.id.dummy_button).setOnTouchListener(
mDelayHideTouchListener);
}
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
// Trigger the initial hide() shortly after the activity has been
// created, to briefly hint to the user that UI controls
// are available.
delayedHide(100);
}
/**
* Touch listener to use for in-layout UI controls to delay hiding the
* system UI. This is to prevent the jarring behavior of controls going away
* while interacting with activity UI.
*/
View.OnTouchListener mDelayHideTouchListener = new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
if (AUTO_HIDE) {
delayedHide(AUTO_HIDE_DELAY_MILLIS);
}
return false;
}
};
Handler mHideHandler = new Handler();
Runnable mHideRunnable = new Runnable() {
@Override
public void run() {
mSystemUiHider.hide();
}
};
/**
* Schedules a call to hide() in [delay] milliseconds, canceling any
* previously scheduled calls.
*/
private void delayedHide(int delayMillis) {
mHideHandler.removeCallbacks(mHideRunnable);
mHideHandler.postDelayed(mHideRunnable, delayMillis);
}
}
|
[
"you@example.com"
] |
you@example.com
|
2ed0bc84f4c019468ee0e44e41d871d9afc454b1
|
30ee9f52bb05060e09f07088e4a75fd38725c9a0
|
/ssm/mybatis/src/test/java/org/anonymous/test/Demo07.java
|
8ae820cd0de64e7ae0fa91af12c5d3ca40cb4795
|
[] |
no_license
|
childnn/childone
|
be3b67c0aac4e89ed1305efd5b1f79f390974306
|
6c6ac01cb2130581c85e5514f6fcf9712e9d1e2d
|
refs/heads/master
| 2023-06-25T03:45:22.285934
| 2023-06-07T08:46:33
| 2023-06-07T08:46:33
| 218,492,936
| 0
| 0
| null | 2023-06-14T22:55:25
| 2019-10-30T09:42:18
|
Java
|
UTF-8
|
Java
| false
| false
| 3,048
|
java
|
package org.anonymous.test;
import org.anonymous.dao.AccountDao;
import org.anonymous.dao.UserDao;
import org.anonymous.domain.Account;
import org.anonymous.domain.User;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.junit.Before;
import org.junit.Test;
import java.io.IOException;
import java.util.List;
/**
* @author child
* 2019/4/12 13:34
* mybatis 与 延迟加载(懒加载)
* 以 account 为基准的 查询: 1 对 1 的查询方式(表关系是一对多)
* 主查询: select * from account
* 从查询(延迟查询): select * from user where
*/
public class Demo07 {
private SqlSessionFactory sqlSessionFactory;
@Before
public void init() throws IOException {
SqlSessionFactoryBuilder sqlSessionFactoryBuilder = new SqlSessionFactoryBuilder();
sqlSessionFactory = sqlSessionFactoryBuilder.build(Resources.getResourceAsStream("SqlMapConfig.xml"));
}
//左外: 查询量表所有信息
@Test //多表: 以 account 为基准: 一个 account 只会对应一个 user -- 查询账户下的所有用户信息(两张表的所有信息)
public void test1() {
SqlSession sqlSession = sqlSessionFactory.openSession();
AccountDao mapper = sqlSession.getMapper(AccountDao.class);
List<Account> list = mapper.findList();
list.forEach(System.out::println);
sqlSession.close();
}
/**
* 在多表查询中, 如果只想查询 多表之中 某一部分信息,而非全部信息: 配置文件中的 sql 如果还是写 全部查询的 sql(如左外查询)
* 此时就会浪费效率/资源.
* 那么,现在希望, 如果没用到 account 中关联的 user 对象(表) 中的数据, 就只查 account 数据
* 什么时候要用到 user 的相关数据, 在去查询, 以提高效率
* 此时,就要用到 "延迟加载技术"
*/
@Test //延迟加载初步: 1
public void test2() {
SqlSession sqlSession = sqlSessionFactory.openSession();
AccountDao mapper = sqlSession.getMapper(AccountDao.class);
List<Account> list = mapper.findAccount();
for (Account account : list) {
System.out.println(account.getUid()); //账户关联的用户的 id
//下面这一句表示用到 account 关联的 user : 如果将其注释掉, 则不会 引入关联(不会查询 user), 如果不注释,则会去 查询 user
System.out.println(account.getUser()); //账户关联的用户: 未关联查询不到 //引入 org/anonymous/dao/UserDao.xml 之后查到
}
sqlSession.close();
}
@Test //延迟加载: 2
public void test3() {
SqlSession sqlSession = sqlSessionFactory.openSession();
UserDao mapper = sqlSession.getMapper(UserDao.class);
User userById = mapper.findUserById(41);
System.out.println(userById);
sqlSession.close();
}
}
|
[
"13163249276@163.com"
] |
13163249276@163.com
|
47cf193013c31168df2c8ea741fbf50dcc37f862
|
6080a202efb754fa7e49aaa2c27a78aec858f1ce
|
/dimdwarf-core/src/test/java/net/orfjackal/dimdwarf/aop/ClassNameMatcher.java
|
6c8374cdb4754b24728a4e1b157563c41a17c856
|
[
"Apache-2.0"
] |
permissive
|
imace/dimdwarf
|
6171b6ebe74485c83bcd124c4b2580723c098536
|
5cde790c3bb98fc4a3c3aeee22d49f69ab78b285
|
refs/heads/master
| 2020-12-13T19:13:42.350103
| 2013-07-14T21:50:45
| 2013-07-14T21:58:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,842
|
java
|
// Copyright © 2008-2010 Esko Luontola <www.orfjackal.net>
// This software is released under the Apache License 2.0.
// The license text is at http://dimdwarf.sourceforge.net/LICENSE
package net.orfjackal.dimdwarf.aop;
import java.util.regex.Pattern;
/**
* Matches class names with a pattern syntax similar to <a href="http://ant.apache.org/manual/dirtasks.html">Ant</a>.
* <pre>
* foo.Bar - Single class foo.bar
* foo.* - All classes in package foo
* foo.** - All classes in package foo and its subpackages
* </pre>
*/
public class ClassNameMatcher {
private static final String PACKAGE_REGEX = "[^\\.]*";
private static final String SUBPACKAGE_REGEX = ".*";
private final Pattern pattern;
public ClassNameMatcher(String pattern) {
this.pattern = Pattern.compile(toRegex(pattern));
}
private static String toRegex(String pattern) {
String regex = "";
for (int i = 0; i < pattern.length(); i++) {
if (subpackagePatternAt(i, pattern)) {
regex += SUBPACKAGE_REGEX;
} else if (packagePatternAt(i, pattern)) {
regex += PACKAGE_REGEX;
} else {
regex += quoteCharAt(i, pattern);
}
}
return regex;
}
private static boolean subpackagePatternAt(int i, String pattern) {
return packagePatternAt(i, pattern)
&& packagePatternAt(i + 1, pattern);
}
private static boolean packagePatternAt(int i, String pattern) {
return i < pattern.length()
&& pattern.charAt(i) == '*';
}
private static String quoteCharAt(int i, String pattern) {
return Pattern.quote("" + pattern.charAt(i));
}
public boolean matches(String className) {
return pattern.matcher(className).matches();
}
}
|
[
"esko.luontola@gmail.com"
] |
esko.luontola@gmail.com
|
f2a89b9ca8f7ab0f9afc690f5f1036d4223ce729
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_3614.java
|
6dc6e27235bc40b53dadebc41cc7c04cd01f024f
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 424
|
java
|
/**
* ??????????????????????????
* @param begin ????
* @param end ????
* @param value ??
* @return true ????
* @deprecated ?1.6.7????????????????????????
*/
protected boolean acceptCustomWord(int begin,int end,CoreDictionary.Attribute value){
return config.forceCustomDictionary || (end - begin >= 4 && !value.hasNatureStartsWith("nr") && !value.hasNatureStartsWith("ns") && !value.hasNatureStartsWith("nt"));
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
f141d501b02503212aabb586bfdf396a7255a422
|
0a2924f4ae6dafaa6aa28e2b947a807645494250
|
/dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/settings/user/action/SetGeneralSettingsAction.java
|
ff7a9e946a7a697dea4373adcdd6cc71ef05cb6e
|
[
"BSD-3-Clause",
"BSD-2-Clause"
] |
permissive
|
filoi/ImmunizationRepository
|
9483ee02afd0b46d0f321a1e1ff8a0f6d8ca7f71
|
efb9f2bb9ae3da8c6ac60e5d5661b8a79a6939d5
|
refs/heads/master
| 2023-03-16T03:26:34.564453
| 2023-03-06T08:32:07
| 2023-03-06T08:32:07
| 126,012,725
| 0
| 0
|
BSD-3-Clause
| 2022-12-16T05:59:21
| 2018-03-20T12:17:24
|
Java
|
UTF-8
|
Java
| false
| false
| 5,292
|
java
|
package org.hisp.dhis.settings.user.action;
/*
* Copyright (c) 2004-2015, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* Neither the name of the HISP project nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import static org.hisp.dhis.user.UserSettingService.KEY_DB_LOCALE;
import static org.hisp.dhis.user.UserSettingService.KEY_MESSAGE_EMAIL_NOTIFICATION;
import static org.hisp.dhis.user.UserSettingService.KEY_MESSAGE_SMS_NOTIFICATION;
import static org.hisp.dhis.user.UserSettingService.KEY_ANALYSIS_DISPLAY_PROPERTY;
import org.hisp.dhis.i18n.I18n;
import org.hisp.dhis.i18n.locale.LocaleManager;
import org.hisp.dhis.setting.StyleManager;
import org.hisp.dhis.system.util.LocaleUtils;
import org.hisp.dhis.user.UserSettingService;
import com.opensymphony.xwork2.Action;
/**
* @author Dang Duy Hieu
* @version $Id$
*/
public class SetGeneralSettingsAction
implements Action
{
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
private LocaleManager localeManager;
public void setLocaleManager( LocaleManager localeManager )
{
this.localeManager = localeManager;
}
private StyleManager styleManager;
public void setStyleManager( StyleManager styleManager )
{
this.styleManager = styleManager;
}
private UserSettingService userSettingService;
public void setUserSettingService( UserSettingService userSettingService )
{
this.userSettingService = userSettingService;
}
// -------------------------------------------------------------------------
// Input
// -------------------------------------------------------------------------
private String currentLocale;
public void setCurrentLocale( String locale )
{
this.currentLocale = locale;
}
private String currentLocaleDb;
public void setCurrentLocaleDb( String currentLocaleDb )
{
this.currentLocaleDb = currentLocaleDb;
}
private String currentStyle;
public void setCurrentStyle( String style )
{
this.currentStyle = style;
}
private String analysisDisplayProperty;
public void setAnalysisDisplayProperty( String analysisDisplayProperty )
{
this.analysisDisplayProperty = analysisDisplayProperty;
}
private Boolean messageEmailNotification;
public void setMessageEmailNotification( Boolean messageEmailNotification )
{
this.messageEmailNotification = messageEmailNotification;
}
private Boolean messageSmsNotification;
public void setMessageSmsNotification( Boolean messageSmsNotification )
{
this.messageSmsNotification = messageSmsNotification;
}
private String message;
public String getMessage()
{
return message;
}
private I18n i18n;
public void setI18n( I18n i18n )
{
this.i18n = i18n;
}
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@Override
public String execute()
throws Exception
{
localeManager.setCurrentLocale( LocaleUtils.getLocale( currentLocale ) );
userSettingService.saveUserSetting( KEY_DB_LOCALE, LocaleUtils.getLocale( currentLocaleDb ) );
styleManager.setUserStyle( currentStyle );
userSettingService.saveUserSetting( KEY_MESSAGE_EMAIL_NOTIFICATION, messageEmailNotification );
userSettingService.saveUserSetting( KEY_MESSAGE_SMS_NOTIFICATION, messageSmsNotification );
userSettingService.saveUserSetting( KEY_ANALYSIS_DISPLAY_PROPERTY, analysisDisplayProperty );
message = i18n.getString( "settings_updated" );
return SUCCESS;
}
}
|
[
"neeraj@filoi.in"
] |
neeraj@filoi.in
|
8edbc113ca99e846d86e0abfa7cd8d48b605be6d
|
932480a6fa3d2e04d6fa0901c51ad14b9704430b
|
/jonix-onix2/src/main/java/com/tectonica/jonix/onix2/LanguageRole.java
|
cd4a1ffe7c5bdad2c258742c47505e4a05820578
|
[
"Apache-2.0"
] |
permissive
|
hobbut/jonix
|
952abda58a3e9817a57ae8232a4a62ab6b3cd50f
|
0544feb4b1ac8fd7dfd52e34e3f84d46eae5749e
|
refs/heads/master
| 2021-01-12T08:22:58.679531
| 2016-05-22T15:13:53
| 2016-05-22T15:13:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,628
|
java
|
/*
* Copyright (C) 2012 Zach Melamed
*
* Latest version available online at https://github.com/zach-m/jonix
* Contact me at zach@tectonica.co.il
*
* 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.tectonica.jonix.onix2;
import java.io.Serializable;
import com.tectonica.jonix.JPU;
import com.tectonica.jonix.OnixElement;
import com.tectonica.jonix.codelist.LanguageCodes;
import com.tectonica.jonix.codelist.LanguageRoles;
import com.tectonica.jonix.codelist.RecordSourceTypes;
import com.tectonica.jonix.codelist.TextCaseFlags;
import com.tectonica.jonix.codelist.TextFormats;
import com.tectonica.jonix.codelist.TransliterationSchemes;
/*
* NOTE: THIS IS AN AUTO-GENERATED FILE, DON'T EDIT MANUALLY
*/
/**
* <h1>Language role</h1>
* <p>
* An ONIX code indicating the “role” of a language in the context of the ONIX record. Mandatory in each occurrence of
* the <Language> composite, and non-repeating.
* </p>
* <table border='1' cellpadding='3'>
* <tr>
* <td>Format</td>
* <td>Fixed-length, two numeric digits</td>
* </tr>
* <tr>
* <td>Codelist</td>
* <td>List 22</td>
* </tr>
* <tr>
* <td>Reference name</td>
* <td><LanguageRole></td>
* </tr>
* <tr>
* <td>Short tag</td>
* <td><b253></td>
* </tr>
* <tr>
* <td>Example</td>
* <td><LanguageRole>01</LanguageRole></td>
* </tr>
* </table>
*/
public class LanguageRole implements OnixElement, Serializable
{
private static final long serialVersionUID = 1L;
public static final String refname = "LanguageRole";
public static final String shortname = "b253";
// ///////////////////////////////////////////////////////////////////////////////
// ATTRIBUTES
// ///////////////////////////////////////////////////////////////////////////////
public TextFormats textformat;
public TextCaseFlags textcase;
public LanguageCodes language;
public TransliterationSchemes transliteration;
/**
* (type: DateOrDateTime)
*/
public String datestamp;
public RecordSourceTypes sourcetype;
public String sourcename;
// ///////////////////////////////////////////////////////////////////////////////
// VALUE MEMBER
// ///////////////////////////////////////////////////////////////////////////////
public LanguageRoles value;
// ///////////////////////////////////////////////////////////////////////////////
// SERVICES
// ///////////////////////////////////////////////////////////////////////////////
public LanguageRole()
{}
public LanguageRole(org.w3c.dom.Element element)
{
textformat = TextFormats.byCode(JPU.getAttribute(element, "textformat"));
textcase = TextCaseFlags.byCode(JPU.getAttribute(element, "textcase"));
language = LanguageCodes.byCode(JPU.getAttribute(element, "language"));
transliteration = TransliterationSchemes.byCode(JPU.getAttribute(element, "transliteration"));
datestamp = JPU.getAttribute(element, "datestamp");
sourcetype = RecordSourceTypes.byCode(JPU.getAttribute(element, "sourcetype"));
sourcename = JPU.getAttribute(element, "sourcename");
value = LanguageRoles.byCode(JPU.getContentAsString(element));
}
}
|
[
"zach@tectonica.co.il"
] |
zach@tectonica.co.il
|
629c453f06104cd1f5d365a2988eb355f3c72251
|
e6c8d6bb675b4742561d2d6a4b4020b0a988feca
|
/common/src/main/java/me/lucko/luckperms/common/data/LogEntry.java
|
cd1c5b740684f470d8a9181939809ee42d14d156
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
Diddyer/LuckPerms
|
168a2c30d83185da2c52872c37a819ea96717448
|
dadca97d8a101441465047f7f498640a7d10a190
|
refs/heads/master
| 2021-01-12T08:57:55.276276
| 2016-12-17T00:04:04
| 2016-12-17T00:04:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,960
|
java
|
/*
* Copyright (c) 2016 Lucko (Luck) <luck@lucko.me>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package me.lucko.luckperms.common.data;
import me.lucko.luckperms.api.event.events.LogNotifyEvent;
import me.lucko.luckperms.common.LuckPermsPlugin;
import me.lucko.luckperms.common.commands.sender.Sender;
import me.lucko.luckperms.common.constants.Message;
import me.lucko.luckperms.common.constants.Permission;
import me.lucko.luckperms.common.core.model.Group;
import me.lucko.luckperms.common.core.model.PermissionHolder;
import me.lucko.luckperms.common.core.model.Track;
import me.lucko.luckperms.common.core.model.User;
import java.util.List;
public class LogEntry extends me.lucko.luckperms.api.LogEntry {
public static LogEntryBuilder build() {
return new LogEntryBuilder();
}
private LogEntry() {
super();
}
public void submit(LuckPermsPlugin plugin) {
submit(plugin, null);
}
public void submit(LuckPermsPlugin plugin, Sender sender) {
plugin.getStorage().logAction(this);
LogNotifyEvent event = new LogNotifyEvent(this);
event.setCancelled(!plugin.getConfiguration().isLogNotify());
plugin.getApiProvider().fireEvent(event);
if (event.isCancelled()) return;
final String msg = super.getFormatted();
List<Sender> senders = plugin.getSenders();
senders.add(plugin.getConsoleSender());
if (sender == null) {
senders.stream()
.filter(Permission.LOG_NOTIFY::isAuthorized)
.filter(s -> !plugin.getIgnoringLogs().contains(s.getUuid()))
.forEach(s -> Message.LOG.send(s, msg));
} else {
senders.stream()
.filter(Permission.LOG_NOTIFY::isAuthorized)
.filter(s -> !plugin.getIgnoringLogs().contains(s.getUuid()))
.filter(s -> !s.getUuid().equals(sender.getUuid()))
.forEach(s -> Message.LOG.send(s, msg));
}
}
public static class LogEntryBuilder extends AbstractLogEntryBuilder<LogEntry, LogEntry.LogEntryBuilder> {
@Override
protected LogEntry createObj() {
return new LogEntry();
}
@Override
protected LogEntryBuilder getThis() {
return this;
}
public LogEntryBuilder actor(Sender actor) {
super.actorName(actor.getName());
super.actor(actor.getUuid());
return this;
}
public LogEntryBuilder type(String type) {
super.type(type.toCharArray()[0]);
return this;
}
public LogEntryBuilder type(Object object) {
if (object instanceof User) {
super.type('U');
} else if (object instanceof Group) {
super.type('G');
} else if (object instanceof Track) {
super.type('T');
} else {
throw new IllegalArgumentException();
}
return this;
}
public LogEntryBuilder acted(PermissionHolder acted) {
if (acted instanceof User) {
super.actedName(((User) acted).getName());
super.acted(((User) acted).getUuid());
super.type('U');
} else if (acted instanceof Group) {
super.actedName(((Group) acted).getName());
super.type('G');
}
return this;
}
public LogEntryBuilder acted(Track track) {
super.actedName(track.getName());
super.type('T');
return this;
}
@Override
public LogEntry build() {
if (getTimestamp() == 0L) {
super.timestamp(System.currentTimeMillis() / 1000L);
}
return super.build();
}
}
}
|
[
"git@lucko.me"
] |
git@lucko.me
|
4a3b67d29cdaaf5814c2c1cc9472e094754f1c4b
|
d56d725de2d1e7b0b558b76d628f862cae8c0f37
|
/src/main/java/noobanidus/mods/mysticalmachinery/init/ModBlocks.java
|
5537db64cfb0ebf2ab24607362f37121b1bbf0c9
|
[
"MIT"
] |
permissive
|
MysticMods/MysticalMachinery
|
5bd47643dd55ef0c8ffa7683ef8265c91bf5c2c8
|
85dfc7236221167b2da96cbf3510df317787fbad
|
refs/heads/master
| 2022-01-24T22:37:45.637576
| 2022-01-07T12:44:38
| 2022-01-07T12:44:38
| 221,136,910
| 0
| 1
|
MIT
| 2022-01-07T12:44:39
| 2019-11-12T05:27:07
|
Java
|
UTF-8
|
Java
| false
| false
| 6,084
|
java
|
package noobanidus.mods.mysticalmachinery.init;
import com.tterrag.registrate.util.RegistryEntry;
import epicsquid.mysticalworld.MysticalWorld;
import net.minecraft.block.Blocks;
import net.minecraft.block.material.Material;
import net.minecraft.data.ShapedRecipeBuilder;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.tags.ItemTags;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.generators.ConfiguredModel;
import noobanidus.mods.mysticalmachinery.MMTags;
import noobanidus.mods.mysticalmachinery.MysticalMachinery;
import noobanidus.mods.mysticalmachinery.blocks.CharcoalKilnBlock;
import noobanidus.mods.mysticalmachinery.blocks.KilnBlock;
import noobanidus.mods.mysticalmachinery.blocks.SawmillBlock;
import noobanidus.mods.mysticalmachinery.recipes.CharcoalKilnRecipeBuilder;
import static noobanidus.mods.mysticalmachinery.MysticalMachinery.REGISTRATE;
public class ModBlocks {
public static RegistryEntry<KilnBlock> KILN = REGISTRATE.block("kiln", Material.ROCK, KilnBlock::new)
.properties((o) -> o.hardnessAndResistance(3.5F).lightValue(13))
.item()
.model((ctx, p) -> p.blockItem(ModBlocks.KILN))
.build()
.blockstate((ctx, p) -> {
})
.recipe((ctx, p) -> {
ShapedRecipeBuilder.shapedRecipe(ModBlocks.KILN.get(), 1)
.patternLine(" X ")
.patternLine("XFX")
.patternLine(" X ")
.key('X', epicsquid.mysticalworld.init.ModBlocks.TERRACOTTA_BRICK.get())
.key('F', Blocks.FURNACE)
.addCriterion("has_terracotta_bricks", p.hasItem(epicsquid.mysticalworld.init.ModBlocks.TERRACOTTA_BRICK.get()))
.build(p);
ModRecipes.kilnRecipes(p);
})
.register();
public static RegistryEntry<CharcoalKilnBlock> CHARCOAL_KILN = REGISTRATE.block("charcoal_kiln", Material.IRON, CharcoalKilnBlock::new)
.properties((o) -> o.hardnessAndResistance(3.5F).lightValue(13))
.blockstate((ctx, p) -> p.getVariantBuilder(ModBlocks.CHARCOAL_KILN.get()).forAllStates((state) -> {
if (state.get(CharcoalKilnBlock.LIT)) {
return ConfiguredModel.builder()
.modelFile(p.getBuilder("charcoal_kiln_hot")
.parent(p.getExistingFile(new ResourceLocation(MysticalMachinery.MODID, "block/charcoal_kiln")))
.texture("kiln_face", new ResourceLocation(MysticalMachinery.MODID, "block/charcoal_kiln_face_hot"))
.texture("kiln_bottom", new ResourceLocation(MysticalMachinery.MODID, "block/charcoal_kiln_bottom_hot")))
.rotationY(((int) state.get(BlockStateProperties.HORIZONTAL_FACING).getHorizontalAngle() + 180) % 360)
.build();
} else {
return ConfiguredModel.builder()
.modelFile(p.getBuilder("charcoal_kiln_cold")
.parent(p.getExistingFile(new ResourceLocation(MysticalMachinery.MODID, "block/charcoal_kiln")))
.texture("kiln_face", new ResourceLocation(MysticalMachinery.MODID, "block/charcoal_kiln_face"))
.texture("kiln_bottom", new ResourceLocation(MysticalMachinery.MODID, "block/charcoal_kiln_bottom")))
.rotationY(((int) state.get(BlockStateProperties.HORIZONTAL_FACING).getHorizontalAngle() + 180) % 360)
.build();
}
}))
.item()
.model((ctx, p) -> p.blockItem(ModBlocks.CHARCOAL_KILN))
.build()
.recipe((ctx, p) -> {
ShapedRecipeBuilder.shapedRecipe(ModBlocks.CHARCOAL_KILN.get(), 1)
.patternLine(" X ")
.patternLine("XFX")
.patternLine(" X ")
.key('F', ModBlocks.KILN.get())
.key('X', epicsquid.mysticalworld.init.ModBlocks.IRON_BRICK.get())
.addCriterion("has_iron_bricks", p.hasItem(epicsquid.mysticalworld.init.ModBlocks.IRON_BRICK.get()))
.addCriterion("has_kiln", p.hasItem(ModBlocks.KILN.get()))
.build(p);
CharcoalKilnRecipeBuilder.charcoalKilnRecipe(new ItemStack(Items.CHARCOAL, 6), Ingredient.fromTag(ItemTags.LOGS), 4, 2, 3.5f, 550).addCriterion("has_logs", p.hasItem(ItemTags.LOGS)).build(p, "charcoal_from_charcoal_kiln");
})
.register();
public static RegistryEntry<SawmillBlock> SAWMILL = REGISTRATE.block("sawmill", Material.ROCK, SawmillBlock::new)
.properties(o -> o.hardnessAndResistance(3.5f).lightValue(13))
.blockstate((ctx, p) ->
p.getVariantBuilder(ctx.getEntry())
.forAllStates(state -> ConfiguredModel.builder()
.modelFile(p.getExistingFile(new ResourceLocation(MysticalMachinery.MODID, state.get(SawmillBlock.LIT) ? "sawmill_on" : "sawmill_off")))
.rotationY(((int) state.get(BlockStateProperties.HORIZONTAL_FACING).getHorizontalAngle() + 180) % 360)
.build()
)
)
.item()
.model((ctx, p) -> p.withExistingParent("sawmill", new ResourceLocation(MysticalMachinery.MODID, "block/sawmill_off")))
.build()
.recipe((ctx, p) -> {
ShapedRecipeBuilder.shapedRecipe(ModBlocks.SAWMILL.get(), 1)
.patternLine(" S ")
.patternLine("LML")
.patternLine(" F ")
.key('M', Items.IRON_BARS)
.key('L', ItemTags.LOGS)
.key('S', Items.STONECUTTER)
.key('F', Items.FURNACE)
.addCriterion("has_logs", p.hasItem(ItemTags.LOGS))
.build(p);
ShapedRecipeBuilder.shapedRecipe(Items.PAPER, 4)
.patternLine("SSS")
.patternLine("S S")
.patternLine("SSS")
.key('S', MMTags.Items.SAWDUST)
.addCriterion("has_sawdust", p.hasItem(MMTags.Items.SAWDUST))
.build(p, new ResourceLocation(MysticalMachinery.MODID, "paper_from_sawdust"));
ModRecipes.sawmillRecipes(p);
})
.register();
public static void load() {
}
}
|
[
"due@wxwhatever.com"
] |
due@wxwhatever.com
|
6e0050f3a3c65dd2d02e8e225394cf245c40242d
|
91d05cadcb7a027e382491b252407777dcad1bce
|
/alfonz-rx/src/main/java/org/alfonz/rx/utility/SchedulersUtility.java
|
9c60ee6746e3e4a3da354966b152a9419ef13361
|
[
"Apache-2.0"
] |
permissive
|
salvopr/Alfonz
|
f4bb27d273d16289c817f8e52ee8607f20444db9
|
4e185bce09fe58aaeb39f10a3e6b00d24f306858
|
refs/heads/master
| 2020-03-18T10:16:38.876713
| 2018-03-23T16:41:27
| 2018-03-23T16:41:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,610
|
java
|
package org.alfonz.rx.utility;
import android.support.annotation.NonNull;
import io.reactivex.CompletableTransformer;
import io.reactivex.FlowableTransformer;
import io.reactivex.MaybeTransformer;
import io.reactivex.ObservableTransformer;
import io.reactivex.SingleTransformer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
public final class SchedulersUtility
{
private static ObservableTransformer<?, ?> sSchedulersObservableTransformer;
private static SingleTransformer<?, ?> sSchedulersSingleTransformer;
private static CompletableTransformer sSchedulersCompletableTransformer;
private static MaybeTransformer<?, ?> sSchedulersMaybeTransformer;
private static FlowableTransformer<?, ?> sSchedulersFlowableTransformer;
private SchedulersUtility() {}
@NonNull
@SuppressWarnings("unchecked")
public static <T> ObservableTransformer<T, T> applyObservableSchedulers()
{
if(sSchedulersObservableTransformer == null)
{
sSchedulersObservableTransformer = observable -> observable.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());
}
return (ObservableTransformer<T, T>) sSchedulersObservableTransformer;
}
@NonNull
@SuppressWarnings("unchecked")
public static <T> SingleTransformer<T, T> applySingleSchedulers()
{
if(sSchedulersSingleTransformer == null)
{
sSchedulersSingleTransformer = single -> single.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());
}
return (SingleTransformer<T, T>) sSchedulersSingleTransformer;
}
@NonNull
public static CompletableTransformer applyCompletableSchedulers()
{
if(sSchedulersCompletableTransformer == null)
{
sSchedulersCompletableTransformer = completable -> completable.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());
}
return sSchedulersCompletableTransformer;
}
@NonNull
@SuppressWarnings("unchecked")
public static <T> MaybeTransformer<T, T> applyMaybeSchedulers()
{
if(sSchedulersMaybeTransformer == null)
{
sSchedulersMaybeTransformer = maybe -> maybe.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());
}
return (MaybeTransformer<T, T>) sSchedulersMaybeTransformer;
}
@NonNull
@SuppressWarnings("unchecked")
public static <T> FlowableTransformer<T, T> applyFlowableSchedulers()
{
if(sSchedulersFlowableTransformer == null)
{
sSchedulersFlowableTransformer = flowable -> flowable.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());
}
return (FlowableTransformer<T, T>) sSchedulersFlowableTransformer;
}
}
|
[
"petr.nohejl@gmail.com"
] |
petr.nohejl@gmail.com
|
d0b5fc2bcc0e87c993de25777cf30cbd62d1945b
|
1aaafc7aa7e67dad7dfd3bb3135b02162243eb6e
|
/sso-login-demo/src/main/java/com/linjingc/ssologindemo/config/SecurityConfig.java
|
6de51fb9527ed273efa7176ae9fbeae5127861e5
|
[] |
no_license
|
AsummerCat/oauth-sso-demo
|
acc8bd4a16e0545612be48e07055967a5d46b130
|
acc911237e05f729a80df36fe1a8d4bd64859953
|
refs/heads/master
| 2022-07-03T03:39:34.206564
| 2019-07-28T12:42:45
| 2019-07-28T12:42:45
| 197,679,379
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,169
|
java
|
package com.linjingc.ssologindemo.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
@Configuration
//@EnableOAuth2Sso
@EnableResourceServer
@EnableGlobalMethodSecurity(prePostEnabled = true)
//@Order(3)
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
public void configure(HttpSecurity http) throws Exception {
http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);
http.csrf().disable();
// http.antMatcher("/**")
// .authorizeRequests()
// .antMatchers("/login**")
// .permitAll()
// .anyRequest()
// .authenticated();
}
}
|
[
"583188551@qq.com"
] |
583188551@qq.com
|
3fe663806e3d6426ad15f698064c1f43bf36b1e3
|
43ea91f3ca050380e4c163129e92b771d7bf144a
|
/services/swr/src/main/java/com/huaweicloud/sdk/swr/v2/model/DeleteNamespaceAuthResponse.java
|
84702e7d9f9f014461d68a049346c99411fae514
|
[
"Apache-2.0"
] |
permissive
|
wxgsdwl/huaweicloud-sdk-java-v3
|
660602ca08f32dc897d3770995b496a82a1cc72d
|
ee001d706568fdc7b852792d2e9aefeb9d13fb1e
|
refs/heads/master
| 2023-02-27T14:20:54.774327
| 2021-02-07T11:48:35
| 2021-02-07T11:48:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 787
|
java
|
package com.huaweicloud.sdk.swr.v2.model;
import com.huaweicloud.sdk.core.SdkResponse;
import java.util.function.Consumer;
import java.util.Objects;
/**
* Response Object
*/
public class DeleteNamespaceAuthResponse extends SdkResponse {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return true;
}
@Override
public int hashCode() {
return Objects.hash();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeleteNamespaceAuthResponse {\n");
sb.append("}");
return sb.toString();
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
6fd28a273218328982ff6f03a55d743fa2ac9a79
|
3cc740405f3135ab565c3052af7b744823953493
|
/apps/source/Android51Buy2.0/src/com/icson/category/CategoryModel.java
|
7b9faee0c7103617eb6969657d57a3e3287af921
|
[] |
no_license
|
kankanhua/mygithub
|
70adcf58071f2d18a3533815f743f666e043e8e2
|
44a4a333c08a3e36169f830c3e1b56d6651b3a20
|
refs/heads/master
| 2020-03-28T10:37:24.220279
| 2015-05-14T03:10:37
| 2015-05-14T03:10:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,158
|
java
|
package com.icson.category;
import java.io.Serializable;
import java.util.ArrayList;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.icson.lib.model.BaseModel;
import com.icson.util.ToolUtil;
public class CategoryModel extends BaseModel implements Serializable {
private static final long serialVersionUID = -7992803656327928663L;
private String name;
private ArrayList<SubCategoryModel> subs = new ArrayList<SubCategoryModel>();
public String getName() {
return name;
}
public ArrayList<SubCategoryModel> getSubCategorys(){
return subs;
}
public String getDesc() {
StringBuilder sb = new StringBuilder();
int size = subs.size();
for (int i = 0; i < size; i++) {
if (i > 2)
break;
sb.append(subs.get(i).name).append(" ");
}
return sb.toString();
}
@SuppressWarnings("serial")
public static class SubCategoryModel extends BaseModel implements Serializable{
private String name;
private ArrayList<NodeCategoryModel> nodes = new ArrayList<NodeCategoryModel>();
public boolean isSelected;
public String getName() {
return name;
}
public ArrayList<NodeCategoryModel> getNodes(){
return nodes;
}
public String getDesc() {
StringBuilder sb = new StringBuilder("(");
int size = nodes.size();
for (int i = 0; i < size; i++) {
if (i > 2)
break;
sb.append(nodes.get(i).name).append(" ");
}
if(size > 0)
{
sb.delete(sb.length()-2, sb.length());
}
sb.append(")");
return sb.toString();
}
public void parse(JSONObject sub) throws JSONException {
name = sub.optString("name");
JSONArray array = sub.optJSONArray("subs");
final int size = (null != array ? array.length() : 0);
for (int i = 0; i < size; i++) {
NodeCategoryModel node = new NodeCategoryModel();
node.parse(array.getJSONObject(i));
nodes.add(node);
}
}
}
@SuppressWarnings("serial")
public static class NodeCategoryModel extends BaseModel implements Serializable{
public String name;
public String path;
public String option;
public String areacode;
public String keyword;
public String classId;
public String sort;
public String page;
public String pageSize;
public String price;
public void parse(JSONObject json) throws JSONException {
name = json.optString("name");
JSONArray array = json.optJSONArray("condition");
if( null != array ) {
path = array.getString(0);
option = array.getString(1);
areacode = array.getString(2);
keyword = array.getString(3);
classId = array.getString(4);
sort = array.getString(5);
page = array.getString(6);
pageSize = array.getString(7);
price = array.getString(8);
}
}
}
public void parse(JSONObject v) throws JSONException {
name = v.optString("name");
if (ToolUtil.isEmptyList(v, "subs")) {
return ;
}
JSONArray array = v.optJSONArray("subs");
final int size = (null != array ? array.length() : 0);
for (int i = 0; i < size; i++) {
SubCategoryModel subCategory = new SubCategoryModel();
subCategory.parse(array.getJSONObject(i));
subs.add(subCategory);
}
}
}
|
[
"hunan889@gmail.com"
] |
hunan889@gmail.com
|
8b840949d5d3830bd865ab487ba0aaebb8c5fd61
|
efb935b22ae24a14b04b8bb73cf6006bb25753a3
|
/app/src/main/java/com/bukhmastov/cdoitmo/model/schedule/teachers/STeachers.java
|
5858578a55186d5c5b75bdc892b169a65f082e91
|
[
"MIT"
] |
permissive
|
morristech/CDOITMO
|
755341da6e1dcc822475e786762d8e2879e4cc48
|
ab73c577b91a0303dc4793bf4c2f083631699bd3
|
refs/heads/master
| 2020-06-01T14:17:59.724914
| 2019-05-05T13:19:00
| 2019-05-05T13:19:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,513
|
java
|
package com.bukhmastov.cdoitmo.model.schedule.teachers;
import com.bukhmastov.cdoitmo.model.JsonProperty;
import com.bukhmastov.cdoitmo.model.schedule.ScheduleJsonEntity;
import java.util.ArrayList;
import java.util.Objects;
public class STeachers extends ScheduleJsonEntity {
@JsonProperty("lastname")
private String query;
@JsonProperty("limit")
private int limit;
@JsonProperty("offset")
private int offset;
@JsonProperty("count")
private int count;
@JsonProperty("timestamp")
private long timestamp;
@JsonProperty("list")
private ArrayList<STeacher> teachers;
public STeachers() {
super();
}
public String getQuery() {
return query;
}
public void setQuery(String query) {
this.query = query;
}
public int getLimit() {
return limit;
}
public void setLimit(int limit) {
this.limit = limit;
}
public int getOffset() {
return offset;
}
public void setOffset(int offset) {
this.offset = offset;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
public ArrayList<STeacher> getTeachers() {
return teachers;
}
public void setTeachers(ArrayList<STeacher> teachers) {
this.teachers = teachers;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof STeachers)) return false;
STeachers sTeachers = (STeachers) o;
return limit == sTeachers.limit &&
offset == sTeachers.offset &&
count == sTeachers.count &&
timestamp == sTeachers.timestamp &&
Objects.equals(query, sTeachers.query) &&
Objects.equals(teachers, sTeachers.teachers);
}
@Override
public int hashCode() {
return Objects.hash(query, limit, offset, count, timestamp, teachers);
}
@Override
public String toString() {
return "STeachers{" +
"query='" + query + '\'' +
", limit=" + limit +
", offset=" + offset +
", count=" + count +
", timestamp=" + timestamp +
", teachers=" + teachers +
'}';
}
}
|
[
"bukhmastov-alex@ya.ru"
] |
bukhmastov-alex@ya.ru
|
d2e406743deadb5b016bfe0399e6efde872364ab
|
8b744d2e536ce3925c441c1fd4bc3c4b24f45dee
|
/commons-converter/src/main/java/com/qfox/commons/converter/TypeConverter.java
|
7c0cd9695da306e1bc6ffcbe46a5979c18277da5
|
[] |
no_license
|
core-lib/commons
|
52bf9d9a7c3d89e165bc31406ef09aa02ae0e9a2
|
26576beec8007849af670c20ffa944994d9bda87
|
refs/heads/master
| 2021-05-04T11:22:26.271045
| 2015-12-27T02:31:29
| 2015-12-27T02:31:29
| 48,630,194
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,503
|
java
|
package com.qfox.commons.converter;
import java.lang.reflect.GenericArrayType;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import com.googlecode.openbeans.IntrospectionException;
import com.googlecode.openbeans.Introspector;
import com.googlecode.openbeans.PropertyDescriptor;
import com.qfox.commons.converter.reflection.ParameterizedTypeImpl;
/**
*
*
*
* @Description: 转换器上下文,主要为了解开转换器与转换器之间的耦合,让每个转换器只关心自己能力范围内的工作,其他交给上下文去调度<br/>
* 该转换器设计是为了简便和统一从 Domain 转换成 DTO 之间的过程,提供一个简单透明的转换方法,以下是使用该转换器的约束<br/>
* 1.需要转换的属性名必须一致<br/>
* 2.如果类型是简单类型或简单类型的数组即八大基本类型和String类型及其数组,那么类型必须一致<br/>
* 3.集合/Map类型提倡面向接口,而且实现类必须提供只有一个Collection.class/Map.class参数的构造器<br/>
* 4.泛型参数是简单类型需要一致,如果为普通类型可以一致或相似<br/>
* 5.普通类型的属性或泛型参数不可以为抽象类或接口而且必须提供无参构造方法<br/>
* @author Change
* @date 2014年1月7日
*
* 修订记录<br/>
* 姓名:Change<br/>
* 时间:2014年1月7日<br/>
* 内容:初始<br/>
*
*/
public class TypeConverter {
private List<Converter> converters = new ArrayList<Converter>();
{
converters.add(new SimpleConverter());
converters.add(new EnumConverter());
converters.add(new ArrayConverter());
converters.add(new CollectionConverter());
converters.add(new MapConverter());
converters.add(new DateConverter());
converters.add(new ComplexConverter());
}
private Set<String> excludes = new HashSet<String>();
public TypeConverter() {
}
public TypeConverter(String... excludes) {
this.excludes.addAll(excludes == null ? new HashSet<String>() : Arrays.asList(excludes));
}
public TypeConverter(Collection<String> excludes) {
this.excludes.addAll(excludes == null ? new HashSet<String>() : excludes);
}
Object doConvert(Object source, String name, Type type) throws Exception {
if (name == null) {
throw new IllegalArgumentException("name can not be null");
}
if (source == null || source.getClass() == type) {
return source;
}
if (source instanceof ExtendConverter) {
ExtendConverter converter = ExtendConverter.class.cast(source);
return converter.convert(type, this);
}
for (Converter converter : converters) {
if (converter.support(type)) {
if (type instanceof Class<?>) {
return converter.convert(source, name, Class.class.cast(type), this);
}
if (type instanceof ParameterizedType) {
return converter.convert(source, name, ParameterizedType.class.cast(type), this);
}
if (type instanceof GenericArrayType) {
return converter.convert(source, name, GenericArrayType.class.cast(type), this);
}
}
}
return source;
}
public boolean isExcluded(String name) {
return excludes.contains(name);
}
public <T> T convert(Object source, String name, Class<T> type, Type... typeArguments) throws Exception {
return type.cast(doConvert(source, name, typeArguments == null || typeArguments.length == 0 ? type : new ParameterizedTypeImpl(type, null, typeArguments)));
}
public <T> List<T> list(Iterable<?> iterable, String name, Class<T> type, Type... typeArguments) throws Exception {
List<T> result = new ArrayList<T>();
for (Object element : iterable) {
result.add(convert(element, name, type, typeArguments));
}
return result;
}
public <T> Set<T> set(Iterable<?> iterable, String name, Class<T> type, Type... typeArguments) throws Exception {
Set<T> result = new LinkedHashSet<T>();
for (Object element : iterable) {
result.add(convert(element, name, type, typeArguments));
}
return result;
}
public void copy(Object source, String name, Object target) throws Exception {
if (source == null || name == null || target == null) {
throw new NullPointerException("source,name or target must not null");
}
for (Converter converter : converters) {
if (converter.support(target.getClass()) == false) {
continue;
}
if (converter instanceof ComplexConverter == false) {
throw new IllegalArgumentException("only complex object can be copy");
}
source = converter.convert(source, name, target.getClass(), this);
PropertyDescriptor[] descriptors = Introspector.getBeanInfo(target.getClass()).getPropertyDescriptors();
for (PropertyDescriptor descriptor : descriptors) {
String _name = name + "." + descriptor.getName();
if (descriptor.getName().equals("class") || this.isExcluded(_name)) {
continue;
}
try {
descriptor = new PropertyDescriptor(descriptor.getName(), target.getClass());
Object value = descriptor.getReadMethod().invoke(source);
descriptor.getWriteMethod().invoke(target, value);
} catch (IntrospectionException e) {
continue;
}
}
break;
}
}
/**
* 转换
*
* @param source
* 源对象
* @param type
* 最外层类型
* @param typeArguments
* 实际参数类型
* @return 转换之后的目标类型对象
*/
public static <T> T convert(Object source, Class<T> type, Type... typeArguments) throws Exception {
return new TypeConverter().convert(source, "", type, typeArguments);
}
public static <E> List<E> list(Iterable<?> iterable, Class<E> elementType, Type... typeArguments) throws Exception {
return new TypeConverter().list(iterable, "", elementType, typeArguments);
}
public static <E> Set<E> set(Iterable<?> iterable, Class<E> elementType, Type... typeArguments) throws Exception {
return new TypeConverter().set(iterable, "", elementType, typeArguments);
}
public static void copy(Object source, Object target) throws Exception {
new TypeConverter().copy(source, "", target);
}
}
|
[
"646742615@qq.com"
] |
646742615@qq.com
|
e11b6f5e9f53bd6f87ececb378c95b2ecd6f4a2c
|
12ae3500b57ffb09f9d1418a0ecacf3bca425a19
|
/core/src/main/java/com/github/weisj/darklaf/components/text/IndexListener.java
|
a945f687275b96c2da5f7a8ef3eadcc8c003e7af
|
[
"MIT"
] |
permissive
|
x4e/darklaf
|
67ce92eab2eaa078e5a47fab43af49ae2a86e862
|
8de4f56c00b6752d6306c815d9bbd63de924f825
|
refs/heads/master
| 2023-01-02T14:33:31.642357
| 2020-10-16T21:12:39
| 2020-10-16T21:12:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,382
|
java
|
/*
* MIT License
*
* Copyright (c) 2020 Jannis Weis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package com.github.weisj.darklaf.components.text;
import java.awt.event.MouseEvent;
import java.util.EventListener;
public interface IndexListener extends EventListener {
void indexClicked(final int index, final int offset, final MouseEvent e);
}
|
[
"weisj@arcor.de"
] |
weisj@arcor.de
|
3fa7c536fdf04f1327c69bc7c18ea4550f355201
|
d715d4ffff654a57e8c9dc668f142fb512b40bb5
|
/workspace/glaf-isdp/src/main/java/com/glaf/isdp/util/HintListJsonFactory.java
|
1c118be2d1898eb88f3a8c8f3703205119824745
|
[] |
no_license
|
jior/isdp
|
c940d9e1477d74e9e0e24096f32ffb1430b841e7
|
251fe724dcce7464df53479c7a373fa43f6264ca
|
refs/heads/master
| 2016-09-06T07:43:11.220255
| 2014-12-28T09:18:14
| 2014-12-28T09:18:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,870
|
java
|
package com.glaf.isdp.util;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.glaf.isdp.domain.HintList;
public class HintListJsonFactory {
public static HintList jsonToObject(JSONObject jsonObject) {
HintList model = new HintList();
if (jsonObject.containsKey("id")) {
model.setId(jsonObject.getString("id"));
}
if (jsonObject.containsKey("hintid")) {
model.setHintid(jsonObject.getString("hintid"));
}
if (jsonObject.containsKey("list")) {
model.setList(jsonObject.getString("list"));
}
if (jsonObject.containsKey("content")) {
model.setContent(jsonObject.getString("content"));
}
if (jsonObject.containsKey("listno")) {
model.setListno(jsonObject.getInteger("listno"));
}
if (jsonObject.containsKey("hintdata")) {
model.setHintdata(jsonObject.getInteger("hintdata"));
}
return model;
}
public static JSONObject toJsonObject(HintList model) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("id", model.getId());
jsonObject.put("_id_", model.getId());
jsonObject.put("_oid_", model.getId());
if (model.getHintid() != null) {
jsonObject.put("hintid", model.getHintid());
}
if (model.getList() != null) {
jsonObject.put("list", model.getList());
}
if (model.getContent() != null) {
jsonObject.put("content", model.getContent());
}
jsonObject.put("listno", model.getListno());
jsonObject.put("hintdata", model.getHintdata());
return jsonObject;
}
public static ObjectNode toObjectNode(HintList model) {
ObjectNode jsonObject = new ObjectMapper().createObjectNode();
jsonObject.put("id", model.getId());
jsonObject.put("_id_", model.getId());
jsonObject.put("_oid_", model.getId());
if (model.getHintid() != null) {
jsonObject.put("hintid", model.getHintid());
}
if (model.getList() != null) {
jsonObject.put("list", model.getList());
}
if (model.getContent() != null) {
jsonObject.put("content", model.getContent());
}
jsonObject.put("listno", model.getListno());
jsonObject.put("hintdata", model.getHintdata());
return jsonObject;
}
public static JSONArray listToArray(java.util.List<HintList> list) {
JSONArray array = new JSONArray();
if (list != null && !list.isEmpty()) {
for (HintList model : list) {
JSONObject jsonObject = model.toJsonObject();
array.add(jsonObject);
}
}
return array;
}
public static java.util.List<HintList> arrayToList(JSONArray array) {
java.util.List<HintList> list = new java.util.ArrayList<HintList>();
for (int i = 0; i < array.size(); i++) {
JSONObject jsonObject = array.getJSONObject(i);
HintList model = jsonToObject(jsonObject);
list.add(model);
}
return list;
}
private HintListJsonFactory() {
}
}
|
[
"jior2008@gmail.com"
] |
jior2008@gmail.com
|
0a73ad7d8cefe2a1a08ba46833c3fbf409c3e59b
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project12/src/main/java/org/gradle/test/performance12_5/Production12_490.java
|
af20e1b84e4db32d1369d8a6f9ab649f583aba2f
|
[] |
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
| 303
|
java
|
package org.gradle.test.performance12_5;
public class Production12_490 extends org.gradle.test.performance7_5.Production7_490 {
private final String property;
public Production12_490() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
b933c7a28301bb4f3de2257fd41cfe3d58d5c204
|
c7e0a034fa1507c255871ba2a675f9b799bcef6f
|
/algol/src/main/java/algol/ui/PanelGrafico.java
|
069d5154200c879550ed577c77523be11b949acb
|
[] |
no_license
|
albertocabello/algol
|
6a9bc53841c93269660b684854748dcedf78c99c
|
b21838459a59bf8ba1010b9bb71a3622832beb49
|
refs/heads/master
| 2021-07-22T09:26:49.956089
| 2019-11-25T11:33:53
| 2019-11-25T11:33:53
| 223,910,876
| 1
| 0
| null | 2020-10-13T17:43:48
| 2019-11-25T09:32:12
|
Java
|
UTF-8
|
Java
| false
| false
| 1,156
|
java
|
package algol.ui;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
import javax.swing.JTextField;
public class PanelGrafico extends JPanel {
public PanelGrafico() {
estrella = ComponentFactory.createTextFieldWithLabel(this, 6, "Estrella");
fechaInicial = ComponentFactory.createTextFieldWithLabel(this, 10, "Fecha inicial");
fechaFinal = ComponentFactory.createTextFieldWithLabel(this, 10, "Fecha final");
magMax = ComponentFactory.createTextFieldWithLabel(this, 5, "Mag. máx.");
magMin = ComponentFactory.createTextFieldWithLabel(this, 5, "Mag. mín.");
setVisible(true);
}
public JTextField getEstrella() {
return this.estrella;
}
public JTextField getFechaInicial() {
return this.fechaInicial;
}
public JTextField getFechaFinal() {
return this.fechaFinal;
}
public JTextField getMagMax() {
return this.magMax;
}
public JTextField getMagMin() {
return this.magMin;
}
private JTextField estrella;
private JTextField fechaInicial;
private JTextField fechaFinal;
private JTextField magMax;
private JTextField magMin;
}
|
[
"root@localhost.localdomain"
] |
root@localhost.localdomain
|
aed5bed4a8133d37703b66946ed8949603098ad9
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/k9mail--k-9/14055691a3d59a95eac01d22aa57e4cb640e60bd/after/Store.java
|
42e821e474726a3e5bb7e91b4e553e0609e9cc48
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,947
|
java
|
package com.fsck.k9.mail;
import android.app.Application;
import android.content.Context;
import com.fsck.k9.Account;
import com.fsck.k9.mail.store.ImapStore;
import com.fsck.k9.mail.store.LocalStore;
import com.fsck.k9.mail.store.Pop3Store;
import com.fsck.k9.mail.store.WebDavStore;
import com.fsck.k9.mail.store.StorageManager.StorageProvider;
import java.util.HashMap;
import java.util.List;
/**
* Store is the access point for an email message store. It's location can be
* local or remote and no specific protocol is defined. Store is intended to
* loosely model in combination the JavaMail classes javax.mail.Store and
* javax.mail.Folder along with some additional functionality to improve
* performance on mobile devices. Implementations of this class should focus on
* making as few network connections as possible.
*/
public abstract class Store
{
protected static final int SOCKET_CONNECT_TIMEOUT = 30000;
protected static final int SOCKET_READ_TIMEOUT = 60000;
/**
* Remote stores indexed by Uri.
*/
private static HashMap<String, Store> mStores = new HashMap<String, Store>();
/**
* Local stores indexed by UUid because the Uri may change due to migration to/from SD-card.
*/
private static HashMap<String, Store> mLocalStores = new HashMap<String, Store>();
protected final Account mAccount;
protected Store(Account account)
{
mAccount = account;
}
/**
* Get an instance of a remote mail store.
*/
public synchronized static Store getRemoteInstance(Account account) throws MessagingException
{
String uri = account.getStoreUri();
if (uri.startsWith("local"))
{
throw new RuntimeException("Asked to get non-local Store object but given LocalStore URI");
}
Store store = mStores.get(uri);
if (store == null)
{
if (uri.startsWith("imap"))
{
store = new ImapStore(account);
}
else if (uri.startsWith("pop3"))
{
store = new Pop3Store(account);
}
else if (uri.startsWith("webdav"))
{
store = new WebDavStore(account);
}
if (store != null)
{
mStores.put(uri, store);
}
}
if (store == null)
{
throw new MessagingException("Unable to locate an applicable Store for " + uri);
}
return store;
}
/**
* Get an instance of a local mail store.
* @throws UnavailableStorageException if not {@link StorageProvider#isReady(Context)}
*/
public synchronized static LocalStore getLocalInstance(Account account, Application application) throws MessagingException
{
Store store = mLocalStores.get(account.getUuid());
if (store == null)
{
store = new LocalStore(account, application);
mLocalStores.put(account.getUuid(), store);
}
return (LocalStore) store;
}
public abstract Folder getFolder(String name) throws MessagingException;
public abstract List<? extends Folder> getPersonalNamespaces(boolean forceListAll) throws MessagingException;
public abstract void checkSettings() throws MessagingException;
public boolean isCopyCapable()
{
return false;
}
public boolean isMoveCapable()
{
return false;
}
public boolean isPushCapable()
{
return false;
}
public boolean isSendCapable()
{
return false;
}
public boolean isExpungeCapable()
{
return false;
}
public void sendMessages(Message[] messages) throws MessagingException
{
}
public Pusher getPusher(PushReceiver receiver)
{
return null;
}
public Account getAccount()
{
return mAccount;
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
5728cf2d2382d0c373a3c7668b9ea917db8d2d3b
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/24/24_4f88a6bdafb386cadaf52714a5fb16e65deda455/TrayMenuFactory/24_4f88a6bdafb386cadaf52714a5fb16e65deda455_TrayMenuFactory_s.java
|
fd3da0ad2a407af169674e9eddfbaacc835cce6b
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,519
|
java
|
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.systray.jdic;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import net.java.sip.communicator.impl.systray.*;
import net.java.sip.communicator.service.gui.*;
/**
* The <tt>TrayMenu</tt> is the menu that appears when the user right-click
* on the Systray icon.
*
* @author Nicolas Chamouard
* @author Lubomir Marinov
*/
public final class TrayMenuFactory
{
/**
* Handles the <tt>ActionEvent</tt> when one of the menu items is selected.
*
* @param evt the event containing the menu item name
*/
private static void actionPerformed(ActionEvent evt)
{
Object source = evt.getSource();
String itemName;
if (source instanceof JMenuItem)
{
JMenuItem menuItem = (JMenuItem) source;
itemName = menuItem.getName();
}
else
{
MenuItem menuItem = (MenuItem) source;
itemName = menuItem.getName();
}
if (itemName.equals("settings"))
{
SystrayActivator.getUIService().setConfigurationWindowVisible(true);
}
else if (itemName.equals("service.gui.CLOSE"))
{
SystrayActivator.getUIService().beginShutdown();
}
else if (itemName.equals("addContact"))
{
ExportedWindow dialog =
SystrayActivator.getUIService().getExportedWindow(
ExportedWindow.ADD_CONTACT_WINDOW);
if (dialog != null)
dialog.setVisible(true);
else
SystrayActivator
.getUIService()
.getPopupDialog()
.showMessagePopupDialog(
Resources
.getString("impl.systray.FAILED_TO_OPEN_ADD_CONTACT_DIALOG"));
}
}
private static void add(Object trayMenu, Object trayMenuItem)
{
if (trayMenu instanceof JPopupMenu)
((JPopupMenu) trayMenu).add((JMenuItem) trayMenuItem);
else
((PopupMenu) trayMenu).add((MenuItem) trayMenuItem);
}
public static void addPopupMenuListener(Object trayMenu,
PopupMenuListener listener)
{
if (trayMenu instanceof JPopupMenu)
((JPopupMenu) trayMenu).addPopupMenuListener(listener);
}
private static void addSeparator(Object trayMenu)
{
if (trayMenu instanceof JPopupMenu)
((JPopupMenu) trayMenu).addSeparator();
else
((PopupMenu) trayMenu).addSeparator();
}
public static Object createTrayMenu(SystrayServiceJdicImpl tray, boolean swing)
{
swing = true;
JPopupMenu trayMenu = new JPopupMenu();
ActionListener listener = new ActionListener()
{
public void actionPerformed(ActionEvent event)
{
TrayMenuFactory.actionPerformed(event);
}
};
add(trayMenu, createTrayMenuItem("settings", "service.gui.SETTINGS",
"service.gui.icons.QUICK_MENU_CONFIGURE_ICON", listener, swing));
add(trayMenu, createTrayMenuItem("addContact",
"service.gui.ADD_CONTACT",
"service.gui.icons.ADD_CONTACT_16x16_ICON", listener, swing));
addSeparator(trayMenu);
add(trayMenu, new StatusSubMenu(tray, swing).getMenu());
addSeparator(trayMenu);
add(trayMenu, createTrayMenuItem("service.gui.CLOSE",
"service.gui.CLOSE", "service.systray.CLOSE_MENU_ICON", listener,
swing));
return trayMenu;
}
private static Object createTrayMenuItem(String name, String textID, String iconID,
ActionListener listener, boolean swing)
{
String text = Resources.getString(textID);
JMenuItem menuItem = new JMenuItem(text, Resources.getImage(iconID));
menuItem.setName(name);
menuItem.addActionListener(listener);
return menuItem;
}
public static boolean isVisible(Object trayMenu)
{
if (trayMenu instanceof JPopupMenu)
return ((JPopupMenu) trayMenu).isVisible();
return false;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e9cd07e01d22237b1ad1a403ff34246319ec6d03
|
99d856874f2e13f4da8f67d3a59cb0089ed629fe
|
/temp/src/minecraft/net/minecraft/src/EntityVillager.java
|
a6c2f14c7d10ee7631494563f901961c6ef8553b
|
[] |
no_license
|
pablo67340/SkinFix
|
f1e0fa64361edb13c7f937f99a571f08bc349c54
|
5d5a9aa55a948376236a4fda84a7a0eefa373400
|
refs/heads/master
| 2020-04-27T20:07:23.310747
| 2019-03-09T04:28:15
| 2019-03-09T04:28:15
| 174,646,319
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,759
|
java
|
package net.minecraft.src;
import net.minecraft.src.ChunkCoordinates;
import net.minecraft.src.EntityAIAvoidEntity;
import net.minecraft.src.EntityAIFollowGolem;
import net.minecraft.src.EntityAIMoveIndoors;
import net.minecraft.src.EntityAIMoveTwardsRestriction;
import net.minecraft.src.EntityAIOpenDoor;
import net.minecraft.src.EntityAIPlay;
import net.minecraft.src.EntityAIRestrictOpenDoor;
import net.minecraft.src.EntityAISwimming;
import net.minecraft.src.EntityAIVillagerMate;
import net.minecraft.src.EntityAIWander;
import net.minecraft.src.EntityAIWatchClosest;
import net.minecraft.src.EntityAIWatchClosest2;
import net.minecraft.src.EntityAgeable;
import net.minecraft.src.EntityLiving;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.EntityZombie;
import net.minecraft.src.MathHelper;
import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.Village;
import net.minecraft.src.World;
public class EntityVillager extends EntityAgeable {
private int field_48131_b;
private boolean field_48132_c;
private boolean field_48130_d;
Village field_48133_a;
public EntityVillager(World p_i295_1_) {
this(p_i295_1_, 0);
}
public EntityVillager(World p_i296_1_, int p_i296_2_) {
super(p_i296_1_);
this.field_48131_b = 0;
this.field_48132_c = false;
this.field_48130_d = false;
this.field_48133_a = null;
this.func_48124_d_(p_i296_2_);
this.field_9357_z = "/mob/villager/villager.png";
this.field_9333_am = 0.5F;
this.func_48084_aL().func_48673_b(true);
this.func_48084_aL().func_48664_a(true);
this.field_46019_bU.func_46118_a(0, new EntityAISwimming(this));
this.field_46019_bU.func_46118_a(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.3F, 0.35F));
this.field_46019_bU.func_46118_a(2, new EntityAIMoveIndoors(this));
this.field_46019_bU.func_46118_a(3, new EntityAIRestrictOpenDoor(this));
this.field_46019_bU.func_46118_a(4, new EntityAIOpenDoor(this, true));
this.field_46019_bU.func_46118_a(5, new EntityAIMoveTwardsRestriction(this, 0.3F));
this.field_46019_bU.func_46118_a(6, new EntityAIVillagerMate(this));
this.field_46019_bU.func_46118_a(7, new EntityAIFollowGolem(this));
this.field_46019_bU.func_46118_a(8, new EntityAIPlay(this, 0.32F));
this.field_46019_bU.func_46118_a(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
this.field_46019_bU.func_46118_a(9, new EntityAIWatchClosest2(this, EntityVillager.class, 5.0F, 0.02F));
this.field_46019_bU.func_46118_a(9, new EntityAIWander(this, 0.3F));
this.field_46019_bU.func_46118_a(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
}
public boolean func_46006_aR() {
return true;
}
protected void func_48097_s_() {
if(--this.field_48131_b <= 0) {
this.field_615_ag.field_48465_A.func_48565_a(MathHelper.func_1108_b(this.field_611_ak), MathHelper.func_1108_b(this.field_610_al), MathHelper.func_1108_b(this.field_609_am));
this.field_48131_b = 70 + this.field_9312_bd.nextInt(50);
this.field_48133_a = this.field_615_ag.field_48465_A.func_48564_a(MathHelper.func_1108_b(this.field_611_ak), MathHelper.func_1108_b(this.field_610_al), MathHelper.func_1108_b(this.field_609_am), 32);
if(this.field_48133_a == null) {
this.func_48083_aW();
} else {
ChunkCoordinates var1 = this.field_48133_a.func_48539_a();
this.func_48082_b(var1.field_22395_a, var1.field_22394_b, var1.field_22396_c, this.field_48133_a.func_48531_b());
}
}
super.func_48097_s_();
}
protected void func_21057_b() {
super.func_21057_b();
this.field_21064_bx.func_21124_a(16, Integer.valueOf(0));
}
public int func_40117_c() {
return 20;
}
public void func_425_j() {
super.func_425_j();
}
public void func_352_a(NBTTagCompound p_352_1_) {
super.func_352_a(p_352_1_);
p_352_1_.func_758_a("Profession", this.func_48129_t());
}
public void func_357_b(NBTTagCompound p_357_1_) {
super.func_357_b(p_357_1_);
this.func_48124_d_(p_357_1_.func_756_e("Profession"));
}
public String func_6376_z() {
switch(this.func_48129_t()) {
case 0:
return "/mob/villager/farmer.png";
case 1:
return "/mob/villager/librarian.png";
case 2:
return "/mob/villager/priest.png";
case 3:
return "/mob/villager/smith.png";
case 4:
return "/mob/villager/butcher.png";
default:
return super.func_6376_z();
}
}
protected boolean func_25023_u() {
return false;
}
protected String func_6389_d() {
return "mob.villager.default";
}
protected String func_6394_f_() {
return "mob.villager.defaulthurt";
}
protected String func_6390_f() {
return "mob.villager.defaultdeath";
}
public void func_48124_d_(int p_48124_1_) {
this.field_21064_bx.func_21129_b(16, Integer.valueOf(p_48124_1_));
}
public int func_48129_t() {
return this.field_21064_bx.func_25115_b(16);
}
public boolean func_48126_w_() {
return this.field_48132_c;
}
public void func_48128_a(boolean p_48128_1_) {
this.field_48132_c = p_48128_1_;
}
public void func_48127_b(boolean p_48127_1_) {
this.field_48130_d = p_48127_1_;
}
public boolean func_48125_w() {
return this.field_48130_d;
}
public void func_48086_a(EntityLiving p_48086_1_) {
super.func_48086_a(p_48086_1_);
if(this.field_48133_a != null && p_48086_1_ != null) {
this.field_48133_a.func_48534_a(p_48086_1_);
}
}
}
|
[
"pablo67340@gmail.com"
] |
pablo67340@gmail.com
|
42f5eb8d7cf57a0a88509c4dea1cbaf7a629d544
|
2fad73a6ed82b503b3907e18007347b2f654e99b
|
/org.eclipse.virgo.repository/src/main/java/org/eclipse/virgo/repository/internal/cacheing/cache/StandardRepositoryCacheFactory.java
|
cc8e716445fd0bcdfa00d004630fe54fc62b4426
|
[] |
no_license
|
isabella232/virgo.artifact-repository
|
4c85550bca15ab4c8c85d2611f03da43f56c5f55
|
99160bfde4d25463811be14e498716d4d9577b61
|
refs/heads/master
| 2021-09-29T02:06:10.728114
| 2018-12-09T11:42:02
| 2018-12-09T11:42:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,553
|
java
|
/*******************************************************************************
* Copyright (c) 2008, 2010 VMware Inc.
* 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:
* VMware Inc. - initial contribution
*******************************************************************************/
package org.eclipse.virgo.repository.internal.cacheing.cache;
import java.io.File;
import org.eclipse.virgo.repository.internal.cacheing.cache.artifact.StandardSingleArtifactCacheFactory;
import org.eclipse.virgo.repository.internal.cacheing.cache.descriptorhash.StandardArtifactDescriptorHashFactory;
import org.eclipse.virgo.repository.internal.remote.RemoteRepository;
/**
* {@link StandardRepositoryCacheFactory} is the default implementation of {@link RepositoryCacheFactory}.
* <p />
*
* <strong>Concurrent Semantics</strong><br />
*
* Thread safe.
*
*/
public class StandardRepositoryCacheFactory implements RepositoryCacheFactory {
/**
* {@inheritDoc}
*/
public RepositoryCache createRepositoryCache(RemoteRepository remoteRepository) {
File cacheDirectory = remoteRepository.getCacheDirectory();
return new StandardRepositoryCache(remoteRepository.getName(), cacheDirectory, new StandardSingleArtifactCacheFactory(),
new StandardArtifactDescriptorHashFactory());
}
}
|
[
"gnormington@vmware.com"
] |
gnormington@vmware.com
|
f0a81159c1310fe27b45294b6fd713c959d546be
|
970791c62e43177f15504d4a36a12f93cf336c72
|
/src/tedneward/things/collection/SortedCollection.java
|
77819ad47b45e06aea137e81ef83e6f2a6deae41
|
[] |
no_license
|
ywendy/JavaLearn
|
ab36ed915d90e55c06d2dc63d8465ba5787794f8
|
208645e37b7b583131a61204f911e77c3282115a
|
refs/heads/master
| 2021-05-26T19:48:34.295026
| 2013-03-06T17:22:17
| 2013-03-06T17:22:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 385
|
java
|
/**
*
*/
package tedneward.things.collection;
import java.util.Collection;
import java.util.Comparator;
/**
* Extend the Collections API SortedCollection
*
* @author yangwm Jul 4, 2010 12:21:00 PM
*/
public interface SortedCollection<E> extends Collection<E> {
public Comparator<E> getComparator();
public void setComparator(Comparator<E> comp);
}
|
[
"jxfzywm@163.com"
] |
jxfzywm@163.com
|
2c9ceaabf43f2fe975e38141785b9baeaa660821
|
20ef0eaaa77093335a0ea254e5e9cf9cffcf4f0c
|
/jingpeng/001_油厂项目/oilfactorytruckscale/src/com/truckscale/weighingManagement/model/WeighingQueryOutPrint.java
|
076d3555745d4f6c69c59d00125e0c948abddbc4
|
[] |
no_license
|
elaine140626/jingpeng
|
1749830a96352b0c853f148c4808dd67650df8a0
|
2329eb463b4d36bdb4dedf451702b4c73ef87982
|
refs/heads/master
| 2021-03-15T00:29:17.637034
| 2019-08-15T01:35:49
| 2019-08-15T01:35:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,464
|
java
|
package com.truckscale.weighingManagement.model;
public class WeighingQueryOutPrint {
private int id;//自增长id
private String serialId;//流水号
private String plateNumber;//车牌号码
private String tareMeasureTime;//皮重称重时间
private String weighingUnit;//称重单位
private String customerName;//客户名称
private String supplierName;//供料单位
private String materielName;//产品名称
private String materielModel;//规格型号
private Double tareWeight;//皮重(t)
private Double grossWeight;//毛重(t)
private Double suttle;//净重(t)
private String carrierName;//承运人
private String carrierTelephone;//承运人电话
private String fleetName;//车队名称
private String isSelfLifting;//是否自提
private String consignee;//收货人
private String consigneePhone;//收货人电话
private String testReportNumber;//检测报告编号
private String facingSlipNum;//封签号
private String facingSlipNum2;//封签号2
private String facingSlipNum3;//封签号3
private String facingSlipNum4;//封签号4
private Double temperature;//温度
private String remarks;//备注
private String weightCollector;//检斤员
private String outType;//出库单状态 0:正常 1:调拨 2:退货 3:空发 4:兑换 5.兑换时调拨
private String transportBalance;//是否自提
private String otherCompanyName;//其它公司
private String driverAutograph;//图片名称
private String materielName2;//兑换产品名称
private String materielModel2;//兑换规格型号
private Double exchangeWeight;//兑换重量
private Double proportion;//兑换比例
private String tareOperator;//皮重司磅员(检斤员)
private String createrDate;//创建时间
private String orderDetailedRemarks;//销售订单明细备注
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getSerialId() {
return serialId;
}
public void setSerialId(String serialId) {
this.serialId = serialId;
}
public String getPlateNumber() {
return plateNumber;
}
public void setPlateNumber(String plateNumber) {
this.plateNumber = plateNumber;
}
public String getTareMeasureTime() {
return tareMeasureTime;
}
public void setTareMeasureTime(String tareMeasureTime) {
this.tareMeasureTime = tareMeasureTime;
}
public String getWeighingUnit() {
return weighingUnit;
}
public void setWeighingUnit(String weighingUnit) {
this.weighingUnit = weighingUnit;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public String getMaterielName() {
return materielName;
}
public void setMaterielName(String materielName) {
this.materielName = materielName;
}
public String getMaterielModel() {
return materielModel;
}
public void setMaterielModel(String materielModel) {
this.materielModel = materielModel;
}
public Double getTareWeight() {
return tareWeight;
}
public void setTareWeight(Double tareWeight) {
this.tareWeight = tareWeight;
}
public Double getGrossWeight() {
return grossWeight;
}
public void setGrossWeight(Double grossWeight) {
this.grossWeight = grossWeight;
}
public Double getSuttle() {
return suttle;
}
public void setSuttle(Double suttle) {
this.suttle = suttle;
}
public String getCarrierName() {
return carrierName;
}
public void setCarrierName(String carrierName) {
this.carrierName = carrierName;
}
public String getCarrierTelephone() {
return carrierTelephone;
}
public void setCarrierTelephone(String carrierTelephone) {
this.carrierTelephone = carrierTelephone;
}
public String getFleetName() {
return fleetName;
}
public void setFleetName(String fleetName) {
this.fleetName = fleetName;
}
public String getIsSelfLifting() {
return isSelfLifting;
}
public void setIsSelfLifting(String isSelfLifting) {
this.isSelfLifting = isSelfLifting;
}
public String getConsignee() {
return consignee;
}
public void setConsignee(String consignee) {
this.consignee = consignee;
}
public String getConsigneePhone() {
return consigneePhone;
}
public void setConsigneePhone(String consigneePhone) {
this.consigneePhone = consigneePhone;
}
public String getTestReportNumber() {
return testReportNumber;
}
public void setTestReportNumber(String testReportNumber) {
this.testReportNumber = testReportNumber;
}
public String getFacingSlipNum() {
return facingSlipNum;
}
public void setFacingSlipNum(String facingSlipNum) {
this.facingSlipNum = facingSlipNum;
}
public String getFacingSlipNum2() {
return facingSlipNum2;
}
public void setFacingSlipNum2(String facingSlipNum2) {
this.facingSlipNum2 = facingSlipNum2;
}
public String getFacingSlipNum3() {
return facingSlipNum3;
}
public void setFacingSlipNum3(String facingSlipNum3) {
this.facingSlipNum3 = facingSlipNum3;
}
public String getFacingSlipNum4() {
return facingSlipNum4;
}
public void setFacingSlipNum4(String facingSlipNum4) {
this.facingSlipNum4 = facingSlipNum4;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public String getWeightCollector() {
return weightCollector;
}
public void setWeightCollector(String weightCollector) {
this.weightCollector = weightCollector;
}
public Double getTemperature() {
return temperature;
}
public void setTemperature(Double temperature) {
this.temperature = temperature;
}
public String getOutType() {
return outType;
}
public void setOutType(String outType) {
this.outType = outType;
}
public String getTransportBalance() {
return transportBalance;
}
public void setTransportBalance(String transportBalance) {
this.transportBalance = transportBalance;
}
public String getOtherCompanyName() {
return otherCompanyName;
}
public void setOtherCompanyName(String otherCompanyName) {
this.otherCompanyName = otherCompanyName;
}
public String getDriverAutograph() {
return driverAutograph;
}
public void setDriverAutograph(String driverAutograph) {
this.driverAutograph = driverAutograph;
}
public String getMaterielName2() {
return materielName2;
}
public void setMaterielName2(String materielName2) {
this.materielName2 = materielName2;
}
public String getMaterielModel2() {
return materielModel2;
}
public void setMaterielModel2(String materielModel2) {
this.materielModel2 = materielModel2;
}
public Double getExchangeWeight() {
return exchangeWeight;
}
public void setExchangeWeight(Double exchangeWeight) {
this.exchangeWeight = exchangeWeight;
}
public Double getProportion() {
return proportion;
}
public void setProportion(Double proportion) {
this.proportion = proportion;
}
public String getTareOperator() {
return tareOperator;
}
public void setTareOperator(String tareOperator) {
this.tareOperator = tareOperator;
}
public String getCreaterDate() {
return createrDate;
}
public void setCreaterDate(String createrDate) {
this.createrDate = createrDate;
}
public String getOrderDetailedRemarks() {
return orderDetailedRemarks;
}
public void setOrderDetailedRemarks(String orderDetailedRemarks) {
this.orderDetailedRemarks = orderDetailedRemarks;
}
}
|
[
"474296307@qq.com"
] |
474296307@qq.com
|
814553c69762977f9eaa72ca7d25ec58ba2e74c1
|
95a826f180d50e68c9eeaaf00a1b5305b4b8368f
|
/collections/app3/Manager22.java
|
db97450798046c2e6635985b0ea3c6344af02190
|
[] |
no_license
|
Vijay-Ky/JAN-2019_BATCH
|
70c21ee91b86347667607ac42e4b232bdd377e0a
|
8636eac816ac383125361e021ba605ce592b982d
|
refs/heads/master
| 2020-04-15T05:22:43.351866
| 2019-02-08T08:56:46
| 2019-02-08T08:56:46
| 164,419,177
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 549
|
java
|
package com.app3;
import java.util.HashSet;
class I
{
int x, y;
public I(int x, int y)
{
this.x = x;
this.y = y;
}
@Override
public int hashCode()
{
return Integer.toString(x).hashCode();
}
@Override
public boolean equals(Object obj)
{
return (obj instanceof I && x == ((I)obj).x);
}
}
public class Manager22
{
public static void main(String[] args)
{
HashSet set = new HashSet();
set.add(new I(1, 2));
set.add(new I(1, 3));
set.add(new I(1, 5));
set.add(new I(2, 1));
System.out.println(set.size());
}
}
|
[
"vijayk007@gmail.com"
] |
vijayk007@gmail.com
|
68e158f688d59558c8705b5dec110bd6021036fd
|
c8417895a7b071e7b2cc07a6791357c5bffc7889
|
/com/google/android/gms/internal/ik.java
|
87732647de18011a8c8e14dad3bda496abf07ba1
|
[] |
no_license
|
HansaTharuka/Explore
|
70a610cac38469cddf2dc87c9f67dcd9a94f8d1a
|
b71eb84c57fb28b687ce6df4a69e14a3dcaf8458
|
refs/heads/master
| 2021-01-24T11:27:25.524180
| 2018-02-27T06:33:37
| 2018-02-27T06:33:37
| 123,083,071
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,366
|
java
|
package com.google.android.gms.internal;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.a;
import com.google.android.gms.common.internal.safeparcel.a.a;
import com.google.android.gms.common.internal.safeparcel.b;
public class ik
implements Parcelable.Creator<ij>
{
static void a(ij paramij, Parcel paramParcel, int paramInt)
{
int i = b.H(paramParcel);
b.c(paramParcel, 1, paramij.getVersionCode());
b.a(paramParcel, 2, paramij.fT(), false);
b.H(paramParcel, i);
}
public ij[] ac(int paramInt)
{
return new ij[paramInt];
}
public ij x(Parcel paramParcel)
{
int i = a.G(paramParcel);
int j = 0;
String str = null;
while (paramParcel.dataPosition() < i)
{
int k = a.F(paramParcel);
switch (a.aH(k))
{
default:
a.b(paramParcel, k);
break;
case 1:
j = a.g(paramParcel, k);
break;
case 2:
str = a.o(paramParcel, k);
}
}
if (paramParcel.dataPosition() != i)
throw new a.a("Overread allowed size end=" + i, paramParcel);
return new ij(j, str);
}
}
/* Location: D:\Testing\hacking\dex2jar-0.0.9.15\dex2jar-0.0.9.15\classes_dex2jar.jar
* Qualified Name: com.google.android.gms.internal.ik
* JD-Core Version: 0.6.0
*/
|
[
"hansatharukarcg3@gmail.com"
] |
hansatharukarcg3@gmail.com
|
a99833824e8beadf8098c0e52b45361428eae951
|
821ed0666d39420d2da9362d090d67915d469cc5
|
/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/lsa/linksubtype/LinkId.java
|
5e6c74097c3b2f94d5a0b08402be21e9f8aa783d
|
[
"Apache-2.0"
] |
permissive
|
LenkayHuang/Onos-PNC-for-PCEP
|
03b67dcdd280565169f2543029279750da0c6540
|
bd7d201aba89a713f5ba6ffb473aacff85e4d38c
|
refs/heads/master
| 2021-01-01T05:19:31.547809
| 2016-04-12T07:25:13
| 2016-04-12T07:25:13
| 56,041,394
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,068
|
java
|
/*
* Copyright 2016 Open Networking Laboratory
*
* 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.onosproject.ospf.protocol.lsa.linksubtype;
import com.google.common.base.MoreObjects;
import com.google.common.primitives.Bytes;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.ospf.exceptions.OspfErrorType;
import org.onosproject.ospf.exceptions.OspfParseException;
import org.onosproject.ospf.protocol.lsa.TlvHeader;
import org.onosproject.ospf.protocol.util.OspfUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.InetAddress;
/**
* Representation of link id value of link tlv of Traffic Engineering.
*/
public class LinkId extends TlvHeader implements LinkSubType {
private static final Logger log =
LoggerFactory.getLogger(LinkId.class);
private String linkId;
/**
* Creates an instance of link id.
*
* @param header tlv header instance
*/
public LinkId(TlvHeader header) {
this.setTlvType(header.tlvType());
this.setTlvLength(header.tlvLength());
}
/**
* Sets link type.
*
* @param linkType link type value
*/
public void setLinkId(String linkType) {
this.linkId = linkType;
}
/**
* Reads bytes from channel buffer.
*
* @param channelBuffer channel buffer instance
* @throws Exception might throws exception while parsing packet
*/
public void readFrom(ChannelBuffer channelBuffer) throws Exception {
try {
byte[] tempByteArray = new byte[OspfUtil.FOUR_BYTES];
channelBuffer.readBytes(tempByteArray, 0, OspfUtil.FOUR_BYTES);
this.setLinkId(InetAddress.getByAddress(tempByteArray).getHostName());
} catch (Exception e) {
log.debug("Error::LinkId:: {}", e.getMessage());
throw new OspfParseException(OspfErrorType.OSPF_MESSAGE_ERROR,
OspfErrorType.BAD_MESSAGE);
}
}
/**
* Returns instance as byte array.
*
* @return instance as bytes
* @throws Exception might throws exception while parsing packet
*/
public byte[] asBytes() throws Exception {
byte[] linkSubType = null;
byte[] linkSubTlvHeader = getTlvHeaderAsByteArray();
byte[] linkSubTlvBody = getLinkSubTypeTlvBodyAsByteArray();
linkSubType = Bytes.concat(linkSubTlvHeader, linkSubTlvBody);
return linkSubType;
}
/**
* Gets byte array of link id sub tlv body.
*
* @return gets the body as byte array
* @throws Exception might throws exception while parsing packet
*/
public byte[] getLinkSubTypeTlvBodyAsByteArray() throws Exception {
byte[] linkSubTypeBody = null;
try {
linkSubTypeBody = InetAddress.getByName(this.linkId).getAddress();
} catch (Exception e) {
log.debug("Error::LinkId:: {}", e.getMessage());
throw new OspfParseException(OspfErrorType.OSPF_MESSAGE_ERROR,
OspfErrorType.BAD_MESSAGE);
}
return linkSubTypeBody;
}
/**
* Returns this instance as string.
*
* @return this instance as string
*/
@Override
public String toString() {
return MoreObjects.toStringHelper(getClass())
.add("linkId", linkId)
.toString();
}
}
|
[
"826080529@qq.com"
] |
826080529@qq.com
|
80bcfac1f35a61d0fd63296a7cd0d0c146a10275
|
bccb412254b3e6f35a5c4dd227f440ecbbb60db9
|
/hl7/model/V2_4/table/Table0114.java
|
06721c791ab96a31a961e07f09ce9b2f7f48aa97
|
[] |
no_license
|
nlp-lap/Version_Compatible_HL7_Parser
|
8bdb307aa75a5317265f730c5b2ac92ae430962b
|
9977e1fcd1400916efc4aa161588beae81900cfd
|
refs/heads/master
| 2021-03-03T15:05:36.071491
| 2020-03-09T07:54:42
| 2020-03-09T07:54:42
| 245,967,680
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 334
|
java
|
package hl7.model.V2_4.table;
import hl7.bean.table.Table;
public class Table0114 extends Table{
private static final String VERSION = "2.4";
public static Table getInstance(){
if(table==null) new Table0114();
return table;
}
private Table0114(){
setTableName("Diet type");
setOID("2.16.840.1.113883.12.114");
}
}
|
[
"terminator800@hanmail.net"
] |
terminator800@hanmail.net
|
13f385ab5e6e7e297dac5e6ea98a2cae39234053
|
c9bdb85c82a1d2e3fa9f7cfff9590d774b222b26
|
/miser/miser-biz/miser-biz-extrafee/target/classes/com/hoau/miser/module/biz/extrafee/server/cache/PriceUpstairsCacheProvider.java
|
697f6b9ecf25356e9c69caab5b6673c4b22ac30f
|
[] |
no_license
|
wangfuguo/mi-proj
|
9d5c159719ee3c4da7bedd01dd297713bb811ced
|
2920971b310262a575cd3b767827d4633c596666
|
refs/heads/master
| 2020-03-08T07:03:24.984087
| 2018-04-04T00:44:35
| 2018-04-04T00:44:35
| 127,985,673
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 797
|
java
|
package com.hoau.miser.module.biz.extrafee.server.cache;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import com.hoau.hbdp.framework.cache.provider.ITTLCacheProvider;
import com.hoau.miser.module.biz.extrafee.server.dao.PriceUpstairsDao;
import com.hoau.miser.module.biz.extrafee.shared.domain.PriceUpstairsEntity;
/**
* @description 运输类型缓存
* ClassName: TranstypeCacheProvider
* @author yulin.chen@newhoau.com.cn
* @date 2015年12月26日
* @version V1.0
*/
@Component
public class PriceUpstairsCacheProvider implements ITTLCacheProvider<PriceUpstairsEntity> {
@Resource
private PriceUpstairsDao priceUpstairsDao;
@Override
public PriceUpstairsEntity get(String id) {
return priceUpstairsDao.queryUpstairsEntityById(id);
}
}
|
[
"wangfuguo_wfg@163.com"
] |
wangfuguo_wfg@163.com
|
e43a0310c953030cfc2bba8919a0a1528a60dc72
|
b0173b445c95d37988e6b4b1b9658b080b2edda6
|
/src/main/java/com/cnote/novelas/web/rest/vm/KeyAndPasswordVM.java
|
055d76747b092e7b3df531102497a7246ffa348a
|
[] |
no_license
|
DevAnthony/telenovelas
|
81cac3bd95b5dfc8edf6a6624759cf5ca390d5f6
|
fd76e47add9488fb9249138fde4b7cc199279731
|
refs/heads/master
| 2020-04-25T12:00:18.012985
| 2019-02-26T18:15:20
| 2019-02-26T18:15:20
| 172,764,215
| 0
| 0
| null | 2019-02-26T18:15:21
| 2019-02-26T18:12:28
|
Java
|
UTF-8
|
Java
| false
| false
| 498
|
java
|
package com.cnote.novelas.web.rest.vm;
/**
* View Model object for storing the user's key and password.
*/
public class KeyAndPasswordVM {
private String key;
private String newPassword;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getNewPassword() {
return newPassword;
}
public void setNewPassword(String newPassword) {
this.newPassword = newPassword;
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
768a00a37c157eb9eb948085cf7e5d2b239abfb1
|
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
|
/aliyun-java-sdk-ecd/src/main/java/com/aliyuncs/ecd/transform/v20200930/DescribeSnapshotsResponseUnmarshaller.java
|
7ababff4205165e93b285cd99953df6c3c3942b9
|
[
"Apache-2.0"
] |
permissive
|
aliyun/aliyun-openapi-java-sdk
|
a263fa08e261f12d45586d1b3ad8a6609bba0e91
|
e19239808ad2298d32dda77db29a6d809e4f7add
|
refs/heads/master
| 2023-09-03T12:28:09.765286
| 2023-09-01T09:03:00
| 2023-09-01T09:03:00
| 39,555,898
| 1,542
| 1,317
|
NOASSERTION
| 2023-09-14T07:27:05
| 2015-07-23T08:41:13
|
Java
|
UTF-8
|
Java
| false
| false
| 3,538
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.ecd.transform.v20200930;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.ecd.model.v20200930.DescribeSnapshotsResponse;
import com.aliyuncs.ecd.model.v20200930.DescribeSnapshotsResponse.Snapshot;
import com.aliyuncs.transform.UnmarshallerContext;
public class DescribeSnapshotsResponseUnmarshaller {
public static DescribeSnapshotsResponse unmarshall(DescribeSnapshotsResponse describeSnapshotsResponse, UnmarshallerContext _ctx) {
describeSnapshotsResponse.setRequestId(_ctx.stringValue("DescribeSnapshotsResponse.RequestId"));
describeSnapshotsResponse.setNextToken(_ctx.stringValue("DescribeSnapshotsResponse.NextToken"));
List<Snapshot> snapshots = new ArrayList<Snapshot>();
for (int i = 0; i < _ctx.lengthValue("DescribeSnapshotsResponse.Snapshots.Length"); i++) {
Snapshot snapshot = new Snapshot();
snapshot.setCreationTime(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].CreationTime"));
snapshot.setStatus(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].Status"));
snapshot.setSnapshotType(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].SnapshotType"));
snapshot.setSnapshotName(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].SnapshotName"));
snapshot.setProgress(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].Progress"));
snapshot.setDescription(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].Description"));
snapshot.setSnapshotId(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].SnapshotId"));
snapshot.setRemainTime(_ctx.integerValue("DescribeSnapshotsResponse.Snapshots["+ i +"].RemainTime"));
snapshot.setSourceDiskSize(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].SourceDiskSize"));
snapshot.setSourceDiskType(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].SourceDiskType"));
snapshot.setDesktopId(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].DesktopId"));
snapshot.setDesktopName(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].DesktopName"));
snapshot.setDesktopStatus(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].DesktopStatus"));
snapshot.setCreator(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].Creator"));
snapshot.setProtocolType(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].ProtocolType"));
snapshot.setVolumeEncryptionEnabled(_ctx.booleanValue("DescribeSnapshotsResponse.Snapshots["+ i +"].VolumeEncryptionEnabled"));
snapshot.setVolumeEncryptionKey(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].VolumeEncryptionKey"));
snapshot.setDeletionTime(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots["+ i +"].DeletionTime"));
snapshots.add(snapshot);
}
describeSnapshotsResponse.setSnapshots(snapshots);
return describeSnapshotsResponse;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
e25735bd9dd9603d7a65ca07fa849afbac87a397
|
72e1e90dd8e1e43bad4a6ba46a44d1f30aa76fe6
|
/java/spring/spring-boot-2-recipes/spring-boot-2-recipes-chapter09-messaging/spring-boot-2-recipes-chapter09-recipe-9-4-ii-configure-rabbitMq-messaing/src/main/java/com/apress/springbootrecipes/demo/RabbitSenderApplication.java
|
86dea585ec9789def7232ceed1a8e990a6718cc0
|
[
"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
| 1,418
|
java
|
package com.apress.springbootrecipes.demo;
import java.math.BigDecimal;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* @author Marten Deinum
*/
@SpringBootApplication
@EnableScheduling
public class RabbitSenderApplication {
public static void main(String[] args) {
SpringApplication.run(RabbitSenderApplication.class, args);
}
@Bean
public Jackson2JsonMessageConverter jsonMessageConverter() {
return new Jackson2JsonMessageConverter();
}
}
@Component
class OrderSender {
private final RabbitTemplate rabbit;
OrderSender(RabbitTemplate rabbit) {
this.rabbit = rabbit;
}
@Scheduled(fixedRate = 250)
public void sendTime() {
var id = UUID.randomUUID().toString();
var amount = ThreadLocalRandom.current().nextDouble(1000.00d);
var order = new Order(id, BigDecimal.valueOf(amount));
rabbit.convertAndSend("orders", "new-order", order);
}
}
|
[
"fernando.romulo.silva@gmail.com"
] |
fernando.romulo.silva@gmail.com
|
59f6600492ed517f7fac2842d5336ee5963afc2d
|
7e57a9c43657fc0391cc0a65b1d7890ae1d166e3
|
/src/main/java/com/abilists/bean/para/users/DltProjectsPara.java
|
a76660f26874aae4eef757c79cc5e041959d95ce
|
[
"Apache-2.0"
] |
permissive
|
minziappa/abilists
|
6f8ea71efcee433e35b518035e5c668cd36626d1
|
1d48aabafb9533d30b425a4f2ce87a84e01e89ef
|
refs/heads/master
| 2020-05-21T16:29:52.154690
| 2017-02-25T02:55:35
| 2017-02-25T02:55:35
| 79,440,574
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 625
|
java
|
package com.abilists.bean.para.users;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import com.abilists.common.bean.CommonPara;
public class DltProjectsPara extends CommonPara {
@NotNull(message = "parameter.error.null.message")
@Size(min = 1, max = 10 ,message = "parameter.error.size.max10.message")
private String upNo;
private String upName;
public String getUpNo() {
return upNo;
}
public void setUpNo(String upNo) {
this.upNo = upNo;
}
public String getUpName() {
return upName;
}
public void setUpName(String upName) {
this.upName = upName;
}
}
|
[
"minziappa@gmail.com"
] |
minziappa@gmail.com
|
407a9d7f6d5e1f4484c76e05e1aa1ce1882b80ca
|
e4c22ea38a84eabd1fcbfb35301eff3f7a034da0
|
/Messaging/src/main/java/nl/lakedigital/as/messaging/request/VerwijderRelatiesRequest.java
|
2eed81d4e01d6376938f69e9bfcf64e0e772b27b
|
[] |
no_license
|
pheidotting/symplex
|
36ae4a6ce61d172f622e703af4a47abb25608d87
|
3cafb5730f4d8c907f9f5b3c8388ab82b854f444
|
refs/heads/development
| 2021-07-13T07:44:54.437965
| 2018-12-11T18:11:34
| 2018-12-11T18:11:34
| 109,175,311
| 0
| 0
| null | 2018-12-11T18:47:25
| 2017-11-01T19:37:16
|
Java
|
UTF-8
|
Java
| false
| false
| 414
|
java
|
package nl.lakedigital.as.messaging.request;
import nl.lakedigital.as.messaging.AbstractMessage;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;
@XmlRootElement
public class VerwijderRelatiesRequest extends AbstractMessage {
private List<Long> ids;
public List<Long> getIds() {
return ids;
}
public void setIds(List<Long> ids) {
this.ids = ids;
}
}
|
[
"patrick@lakedigital.nl"
] |
patrick@lakedigital.nl
|
0bfa1558e42f0f3e262d2a762a112747b51bfe17
|
1c92fce07085ad72f1443e65f12553dde613b338
|
/1-spring-core/src/main/java/org/certificatic/spring/core/practicaC/filteringcomponents/bean/Car.java
|
3288a6bf9290f62e1a9d602425871cad2f143753
|
[] |
no_license
|
rtelematica/coreSpring5Grupo2
|
61e7d64b257e067848d5ebec4559ac52e3b0260f
|
5b191bf59f768d88baf7ed463822e212f16c7e6b
|
refs/heads/master
| 2022-04-22T20:37:37.180258
| 2020-03-28T22:49:24
| 2020-03-28T22:49:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 325
|
java
|
package org.certificatic.spring.core.practicaC.filteringcomponents.bean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import lombok.Data;
@Data
// Anotar como servicio
@Service
public class Car {
// Inyectar
@Value("Mini Cooper JCW")
public String model;
}
|
[
"isc.ivgarcia@gmail.com"
] |
isc.ivgarcia@gmail.com
|
62e5754916c31b50da74caa040d5c299b1c55566
|
3334bee9484db954c4508ad507f6de0d154a939f
|
/d3n/java-src/achievement-service/src/main/java/de/ascendro/f4m/service/achievement/AchievementServiceStartup.java
|
d2876a8b93c3a982063a0dbea4dcf97bffa7567a
|
[] |
no_license
|
VUAN86/d3n
|
c2fc46fc1f188d08fa6862e33cac56762e006f71
|
e5d6ac654821f89b7f4f653e2aaef3de7c621f8b
|
refs/heads/master
| 2020-05-07T19:25:43.926090
| 2019-04-12T07:25:55
| 2019-04-12T07:25:55
| 180,806,736
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,357
|
java
|
package de.ascendro.f4m.service.achievement;
import java.util.Arrays;
import java.util.List;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
import com.google.inject.Stage;
import com.google.inject.util.Modules;
import de.ascendro.f4m.service.ServiceStartup;
import de.ascendro.f4m.service.event.EventMessageTypes;
import de.ascendro.f4m.service.achievement.di.AchievementServiceModule;
import de.ascendro.f4m.service.achievement.di.AchievementWebSocketModule;
public class AchievementServiceStartup extends ServiceStartup {
public AchievementServiceStartup(Stage stage) {
super(stage);
}
public static void main(String... args) throws Exception {
new AchievementServiceStartup(DEFAULT_STAGE).startK8S();
}
@Override
public Injector createInjector(Stage stage) {
return Guice.createInjector(Modules.override(super.getModules()).with(getModules()));
}
@Override
protected List<String> getDependentServiceNames() {
return Arrays.asList(EventMessageTypes.SERVICE_NAME);
}
@Override
protected Iterable<? extends Module> getModules() {
return Arrays.asList(new AchievementServiceModule());
}
@Override
protected String getServiceName() {
return AchievementMessageTypes.SERVICE_NAME;
}
}
|
[
"vuan86@ya.ru"
] |
vuan86@ya.ru
|
2e0c0afead2a164050f1a68b9a7fab9ff7b25e42
|
21f535159f6fe83ac1480ef8d4c06392ad4f602c
|
/src/main/java/project/To_left.java
|
e693cf43654b952c13dc7335a7de3a2a3e99f1eb
|
[] |
no_license
|
krowka/traffic-scenario-generator
|
07e80f8bae2023034a692010a9b649a60cc19f32
|
c6a48dcb6644d7b3730fcf23bbb957e915a6f217
|
refs/heads/master
| 2022-12-30T18:16:29.718932
| 2020-06-07T11:35:29
| 2020-06-07T11:35:29
| 260,199,202
| 1
| 0
| null | 2020-10-13T21:38:18
| 2020-04-30T11:58:29
|
Java
|
UTF-8
|
Java
| false
| false
| 1,664
|
java
|
package project;
import java.net.URI;
import java.util.Collection;
import javax.xml.datatype.XMLGregorianCalendar;
import org.protege.owl.codegeneration.WrappedIndividual;
import org.semanticweb.owlapi.model.OWLNamedIndividual;
import org.semanticweb.owlapi.model.OWLOntology;
/**
*
* <p>
* Generated by Protege (http://protege.stanford.edu). <br>
* Source Class: To_left <br>
* @version generated on Thu May 28 13:55:50 CEST 2020 by kamsz
*/
public interface To_left extends Driving_course {
/* ***************************************************
* Property http://webprotege.stanford.edu/project/BDGSqwMbfBgw7pUJ8IOnJ1#performed_by
*/
/**
* Gets all property values for the performed_by property.<p>
*
* @returns a collection of values for the performed_by property.
*/
Collection<? extends Vehicle> getPerformed_by();
/**
* Checks if the class has a performed_by property value.<p>
*
* @return true if there is a performed_by property value.
*/
boolean hasPerformed_by();
/**
* Adds a performed_by property value.<p>
*
* @param newPerformed_by the performed_by property value to be added
*/
void addPerformed_by(Vehicle newPerformed_by);
/**
* Removes a performed_by property value.<p>
*
* @param oldPerformed_by the performed_by property value to be removed.
*/
void removePerformed_by(Vehicle oldPerformed_by);
/* ***************************************************
* Common interfaces
*/
OWLNamedIndividual getOwlIndividual();
OWLOntology getOwlOntology();
void delete();
}
|
[
"kamsza@onet.pl"
] |
kamsza@onet.pl
|
8159fa543d0df1892c00bebe2d48570ce75cc051
|
2ee9a8936f889bade976b475d5ed257f49f8a32f
|
/core/src/main/java/com/huawei/openstack4j/model/workflow/builder/WorkflowEnvironmentBuilder.java
|
c9ca18c3ec0d96d2e7778e19443bfce4a59784cc
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
huaweicloud/huaweicloud-sdk-java
|
f44532a5e6eae867e9620923a9467ed431d13611
|
c1372d4be2d86382dfd20ccc084ae66c5ca4a4ce
|
refs/heads/master
| 2023-09-01T06:10:00.487173
| 2022-09-01T01:50:12
| 2022-09-01T01:50:12
| 148,595,939
| 49
| 45
|
NOASSERTION
| 2023-07-18T02:12:39
| 2018-09-13T07:01:08
|
Java
|
UTF-8
|
Java
| false
| false
| 3,168
|
java
|
/*******************************************************************************
* Copyright 2016 ContainX and OpenStack4j
*
* 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.
*******************************************************************************/
/*******************************************************************************
* Huawei has modified this source file.
* Copyright 2018 Huawei Technologies Co.,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.huawei.openstack4j.model.workflow.builder;
import com.huawei.openstack4j.common.Buildable.Builder;
import com.huawei.openstack4j.model.workflow.WorkflowEnvironment;
/**
* Builder for a {@link WorkflowEnvironment} model class
*
* @author Renat Akhmerov
*/
public interface WorkflowEnvironmentBuilder extends Builder<WorkflowEnvironmentBuilder, WorkflowEnvironment> {
/**
* @see WorkflowEnvironment#getId()
*/
WorkflowEnvironmentBuilder id(String id);
// TODO(rakhmerov): add all methods
}
|
[
"289228042@qq.com"
] |
289228042@qq.com
|
be6dabafdbe20e28d8fa439aaf3217fe471c1730
|
9b9f99a14207929c4820932e225daae5200e1cd7
|
/13-SharedPreferences-v2/app/src/main/java/com/example/victor/a13_sharedpreferences/PreferencesManualActivity.java
|
5496895a101856cdf5b92901a23b70b86c9219b8
|
[] |
no_license
|
SkawMaster/AndroidTelefonicaPUEJunio2017
|
e3d95a9e8dfe1cc8f822ad4a77bacc8f10a85c7e
|
f81f04c49f2c863bc2eaee651156f78bf1b890eb
|
refs/heads/master
| 2021-06-19T05:42:35.900284
| 2017-06-22T12:35:53
| 2017-06-22T12:35:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,699
|
java
|
package com.example.victor.a13_sharedpreferences;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
public class PreferencesManualActivity extends AppCompatActivity {
private EditText eTPrefijo;
private EditText eTSufijo;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_preferences_manual);
eTPrefijo = (EditText) findViewById(R.id.eTPrefijo);
eTSufijo = (EditText) findViewById(R.id.eTSufijo);
//Leer de SharedPreferences los valores iniciales
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
eTPrefijo.setText(preferences.getString("prefijo", "Hola "));
eTSufijo.setText(preferences.getString("sufijo", "!!!!!!!"));
Button btGuardar = (Button) findViewById(R.id.btGuardar);
btGuardar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//Establecer en SharedPReferences los nuevos valores
SharedPreferences.Editor editor = preferences.edit();
editor.putString("prefijo", eTPrefijo.getText().toString());
editor.putString("sufijo", eTSufijo.getText().toString());
editor.commit();
}
});
}
}
|
[
"victorherrerocazurro@gmail.com"
] |
victorherrerocazurro@gmail.com
|
39a035e49f688f97fb42eec82907d2d70a82cc4d
|
3568c9772fad54ffe71683de31525464642f3cf9
|
/word8/src/main/java/eu/doppel_helix/jna/tlb/word8/WdStyleSheetLinkType.java
|
aebd7ea88c26804e4bc952f6f608bdde5d457c0b
|
[
"MIT"
] |
permissive
|
NoonRightsWarriorBehindHovering/COMTypelibraries
|
c853c41bb495031702d0ad7a4d215ab894c12bbd
|
c17acfca689305c0e23d4ff9d8ee437e0ee3d437
|
refs/heads/master
| 2023-06-21T20:52:51.519721
| 2020-03-13T22:33:48
| 2020-03-13T22:33:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 525
|
java
|
package eu.doppel_helix.jna.tlb.word8;
import com.sun.jna.platform.win32.COM.util.IComEnum;
/**
* <p>uuid({238432DC-D657-37E7-886E-5A155E5FF117})</p>
*/
public enum WdStyleSheetLinkType implements IComEnum {
/**
* (0)
*/
wdStyleSheetLinkTypeLinked(0),
/**
* (1)
*/
wdStyleSheetLinkTypeImported(1),
;
private WdStyleSheetLinkType(long value) {
this.value = value;
}
private long value;
public long getValue() {
return this.value;
}
}
|
[
"mblaesing@doppel-helix.eu"
] |
mblaesing@doppel-helix.eu
|
87bab68584273adeeda80a3a21e373b1da2c3da4
|
a7267160d848c32bd5134d1d4feabea41c297798
|
/workspace/summer/week/demo/src/main/java/demo1/Pool.java
|
c2c9fee1ca3c773a2913678bd80a85e440d4c296
|
[] |
no_license
|
MellowCo/java_demo
|
4512c7c8890ecfccee5046db3f51190edc8d34be
|
71940fabec00b8e8b6589ffa2ad818edda38ba6b
|
refs/heads/main
| 2022-12-31T15:22:18.351896
| 2020-10-20T07:31:59
| 2020-10-20T07:31:59
| 303,027,728
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 756
|
java
|
package demo1;
import com.mchange.v2.c3p0.ComboPooledDataSource;
import demo1.entity.Student;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import javax.sql.DataSource;
import java.util.List;
/**
* @author li
* @version 1.0
* @ClassName Pool
* @date 2019/7/10 10:27
*/
public class Pool {
public static void main(String[] args) {
DataSource source = new ComboPooledDataSource();
JdbcTemplate tx = new JdbcTemplate(source);
// tx.update("update person set name =? where id = ?", "lid", 3);
List<Student> students = tx.query("select * from person",new BeanPropertyRowMapper<Student>(Student.class));
System.out.println(students);
}
}
|
[
"799478052@qq.com"
] |
799478052@qq.com
|
9e5fb226db3c191e364b2577de42d4509cc93276
|
d9a251bbbcd04fb1875521654e10ad6988e9b481
|
/model_bt_v1/tags/1.0.0/org.be.textbe.bt.model.v1/src/org/be/textbe/bt/v1/textbt/ExternalOutput.java
|
593ddb44ac501e994ad55f989f5e449e971e50f4
|
[] |
no_license
|
t-ho/textbe
|
105ed2a9eff2383cdef0ca0945b25305609361dd
|
15e756a2f58a1ed17e5ae782c02628cfac8ddad2
|
refs/heads/master
| 2021-01-19T15:29:51.557000
| 2013-01-08T09:23:29
| 2013-01-08T09:23:29
| 33,190,489
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 413
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.be.textbe.bt.v1.textbt;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>External Output</b></em>'.
* <!-- end-user-doc -->
*
*
* @see org.be.textbe.bt.v1.textbt.TextbtPackage#getExternalOutput()
* @model
* @generated
*/
public interface ExternalOutput extends Output
{
} // ExternalOutput
|
[
"jgsuess@gmail.com@f0832461-7c65-4917-3b45-1a57d2e10441"
] |
jgsuess@gmail.com@f0832461-7c65-4917-3b45-1a57d2e10441
|
85f27e8ca0be3baafb706f93c08709734a038a28
|
d00af6c547e629983ff777abe35fc9c36b3b2371
|
/jboss-all/jmx/src/main/javax/management/ListenerNotFoundException.java
|
85144aab8e5af84b2753388dfebb7fa8a2b38f7b
|
[] |
no_license
|
aosm/JBoss
|
e4afad3e0d6a50685a55a45209e99e7a92f974ea
|
75a042bd25dd995392f3dbc05ddf4bbf9bdc8cd7
|
refs/heads/master
| 2023-07-08T21:50:23.795023
| 2013-03-20T07:43:51
| 2013-03-20T07:43:51
| 8,898,416
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,184
|
java
|
/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package javax.management;
/**
* Thrown when a specified Listener does not exist.
*
* @author <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>
* @version $Revision: 1.2 $
*/
public class ListenerNotFoundException
extends OperationsException
{
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
/**
* Construct a new ListenerNotFoundException with no message.
*/
public ListenerNotFoundException()
{
super();
}
/**
* Construct a new ListenerNotFoundException with the given message.
*
* @param message the error message.
*/
public ListenerNotFoundException(java.lang.String message)
{
super(message);
}
// Public --------------------------------------------------------
// OperationsException overrides ---------------------------------
// Private -------------------------------------------------------
}
|
[
"rasmus@dll.nu"
] |
rasmus@dll.nu
|
59a53157c6f1b79790dda1976e43a0b8bf0192cd
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava9/Foo179Test.java
|
29e32b6eb806b5deaf8de6461a38f31feb1eb2ae
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 481
|
java
|
package applicationModulepackageJava9;
import org.junit.Test;
public class Foo179Test {
@Test
public void testFoo0() {
new Foo179().foo0();
}
@Test
public void testFoo1() {
new Foo179().foo1();
}
@Test
public void testFoo2() {
new Foo179().foo2();
}
@Test
public void testFoo3() {
new Foo179().foo3();
}
@Test
public void testFoo4() {
new Foo179().foo4();
}
@Test
public void testFoo5() {
new Foo179().foo5();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
6f655a921e0d2c065d2323ef9948276cedaab17e
|
1ac3bd7f79b1767a73c6f37964373ed350011086
|
/src/main/java/io/proleap/vb6/asg/metamodel/call/MembersCall.java
|
2e67f53def8c198560cb1f3d7f90bce053e61bc6
|
[
"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
| 418
|
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.call;
import java.util.List;
public interface MembersCall extends Call {
void addSubCall(Call call);
Call getLastSubCall();
List<Call> getSubCalls();
}
|
[
"u.wol@wwu.de"
] |
u.wol@wwu.de
|
86fa9c0dc73435803fadf285e26fdf784f009a0a
|
1b03aa4908cf62f5cdaae9a64cb6c07406eb95ec
|
/common/src/main/java/com/wf/common/utils/Validate.java
|
d95204a4a797f53a99256b8aef64c4ba300f77b9
|
[] |
no_license
|
wangpf2011/oslibrary
|
063b4414135a36402edd870671fe5d8c4a8407b3
|
c8b2977434eea8aba4f3d781fdf7d6fc5cd03709
|
refs/heads/master
| 2021-01-18T03:40:56.117331
| 2017-07-15T02:46:17
| 2017-07-15T02:46:17
| 85,796,758
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,816
|
java
|
package com.wf.common.utils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Validate {
/**
* 身份证号校验
* @param str
* @return
*/
public static boolean checkNID(String str) {
if(str == null || "".equals(str))
return false;
Pattern pattern = Pattern.compile("^\\d{15}|\\d{18}$");
Matcher matchr = pattern.matcher(str);
if(matchr.find())
return true;
return false;
}
/**
* 手机号校验
* @param str
* @return
*/
public static boolean checkMobile(String str) {
if(str == null || "".equals(str))
return false;
Pattern pattern = Pattern.compile("^(1[34578])\\d{9}$");
Matcher matchr = pattern.matcher(str);
if(matchr.find())
return true;
return false;
}
/**
* 注册用户名校验
* @param str
* @return
*/
public static boolean checkUserName(String str) {
if(str == null || "".equals(str))
return false;
Pattern pattern = Pattern.compile("^[a-zA-Z]{1}\\w{5,14}$");
Matcher matchr = pattern.matcher(str);
if(matchr.find())
return true;
return false;
}
/**
* 注册邮箱校验
* @param str
* @return
*/
public static boolean checkEmail(String str) {
if(str == null || "".equals(str))
return false;
Pattern pattern = Pattern.compile("^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$");
Matcher matchr = pattern.matcher(str);
if(matchr.find())
return true;
return false;
}
/**
* 数字校验(浮点数)
* @param str
* @return
*/
public static boolean checkNumber(String str) {
if(str == null || "".equals(str))
return false;
Pattern pattern = Pattern.compile("^\\d+(\\.\\d+)?$");
Matcher matchr = pattern.matcher(str);
if(matchr.find())
return true;
return false;
}
}
|
[
"wangpf2011@163.com"
] |
wangpf2011@163.com
|
43ce85dbcf2d6b453c1249824da25bcbf603c3ca
|
c25e23ef29c7cfc0ad65cca639ecf9d6f012061d
|
/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpBinding.java
|
7b86ed7ec579c3e4c9e48b21b8b4e1a6de6f89d4
|
[
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-unknown",
"Apache-2.0"
] |
permissive
|
sarvex/camel
|
e8bfe583d8220155492ed0caecad70e66e86ea87
|
1d2b4ec72403dc787d2515862a3511f9adbb3c9d
|
refs/heads/master
| 2023-05-11T18:05:22.102302
| 2023-05-02T02:06:27
| 2023-05-02T02:06:27
| 32,274,776
| 0
| 0
|
Apache-2.0
| 2023-05-02T02:06:28
| 2015-03-15T17:46:52
|
Java
|
UTF-8
|
Java
| false
| false
| 5,230
|
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.camel.component.netty4.http;
import java.util.Map;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.FullHttpResponse;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponse;
import org.apache.camel.Exchange;
import org.apache.camel.Message;
import org.apache.camel.spi.HeaderFilterStrategy;
/**
* To bind Netty http codec with the Camel {@link org.apache.camel.Message} api.
*/
public interface NettyHttpBinding {
/**
* Binds from Netty {@link HttpRequest} to Camel {@link Message}.
* <p/>
* Will use {@link #populateCamelHeaders(io.netty.handler.codec.http.HttpRequest, java.util.Map, org.apache.camel.Exchange, NettyHttpConfiguration)}
* for populating the headers.
*
* @param request the netty http request
* @param exchange the exchange that should contain the returned message.
* @param configuration the endpoint configuration
* @return the message to store on the given exchange
* @throws Exception is thrown if error during binding
*/
Message toCamelMessage(FullHttpRequest request, Exchange exchange, NettyHttpConfiguration configuration) throws Exception;
/**
* Binds from Netty {@link HttpRequest} to Camel headers as a {@link Map}.
*
* @param request the netty http request
* @param headers the Camel headers that should be populated
* @param exchange the exchange that should contain the returned message.
* @param configuration the endpoint configuration
* @throws Exception is thrown if error during binding
*/
void populateCamelHeaders(FullHttpRequest request, Map<String, Object> headers, Exchange exchange, NettyHttpConfiguration configuration) throws Exception;
/**
* Binds from Netty {@link HttpResponse} to Camel {@link Message}.
* <p/>
* Will use {@link #populateCamelHeaders(io.netty.handler.codec.http.HttpResponse, java.util.Map, org.apache.camel.Exchange, NettyHttpConfiguration)}
* for populating the headers.
*
* @param response the netty http response
* @param exchange the exchange that should contain the returned message.
* @param configuration the endpoint configuration
* @return the message to store on the given exchange
* @throws Exception is thrown if error during binding
*/
Message toCamelMessage(FullHttpResponse response, Exchange exchange, NettyHttpConfiguration configuration) throws Exception;
/**
* Binds from Netty {@link HttpResponse} to Camel headers as a {@link Map}.
*
* @param response the netty http response
* @param headers the Camel headers that should be populated
* @param exchange the exchange that should contain the returned message.
* @param configuration the endpoint configuration
* @throws Exception is thrown if error during binding
*/
void populateCamelHeaders(FullHttpResponse response, Map<String, Object> headers, Exchange exchange, NettyHttpConfiguration configuration) throws Exception;
/**
* Binds from Camel {@link Message} to Netty {@link HttpResponse}.
*
* @param message the Camel message
* @param configuration the endpoint configuration
* @return the http response
* @throws Exception is thrown if error during binding
*/
HttpResponse toNettyResponse(Message message, NettyHttpConfiguration configuration) throws Exception;
/**
* Binds from Camel {@link Message} to Netty {@link io.netty.handler.codec.http.HttpRequest}.
*
* @param message the Camel message
* @param uri the uri which is the intended uri to call, though the message may override the uri
* @param configuration the endpoint configuration
* @return the http request
* @throws Exception is thrown if error during binding
*/
HttpRequest toNettyRequest(Message message, String uri, NettyHttpConfiguration configuration) throws Exception;
/**
* Gets the header filter strategy
*
* @return the strategy
*/
HeaderFilterStrategy getHeaderFilterStrategy();
/**
* Sets the header filter strategy to use.
*
* @param headerFilterStrategy the custom strategy
*/
void setHeaderFilterStrategy(HeaderFilterStrategy headerFilterStrategy);
}
|
[
"willem.jiang@gmail.com"
] |
willem.jiang@gmail.com
|
112e7831c26a8490b3f9fbcc5ced515a88df44d6
|
1c2fc95d66ea34fdcb4f2352c8d2d362b3b5b367
|
/Test/net/net/nio/MessageHandler.java
|
aa8fe08981827b7c6ec7b21e21d38672663050eb
|
[] |
no_license
|
lryxxh/Study
|
2473647837535055af9cf3f6c048a81cc09be2bb
|
47c556afeff8223aba3e324407fe6af97071884a
|
refs/heads/master
| 2020-12-02T12:46:27.455563
| 2017-07-08T03:07:22
| 2017-07-08T03:07:22
| 96,589,823
| 0
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 381
|
java
|
package net.nio;
public class MessageHandler {
public void send(SocketRequest request, SocketResponse response) {
System.out.println(request.getQueryString());
// ÏûÏ¢·¢ËÍ
String key = request.getValue("imei");
Session session = SessionManager.getSession(key);
new SocketResponse(session).write(request.getValue("sms"));
}
}
|
[
"lryxxh@163.com"
] |
lryxxh@163.com
|
5a1fe91de4ac35963d46874d22b66a1870f3d5d9
|
92e9b3d38f21631869235962c2109c55f9d51fc1
|
/plugins/entando-plugin-jpcontentfeedback/src/main/java/com/agiletec/plugins/jpcontentfeedback/apsadmin/feedback/ContentFeedbackAction.java
|
16ed610bc8c189225b95ed68756a5ce9ed5e84cf
|
[] |
no_license
|
muddasani/entando-components
|
17014a155e71ce0e7eb5c4c0fa3a14b89866dd20
|
74757435156cb2a1b71df55f0db82bb3f27260e4
|
refs/heads/master
| 2020-12-25T04:26:58.795455
| 2015-08-05T08:26:32
| 2015-08-05T08:26:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,973
|
java
|
/*
* Copyright 2013-Present Entando Corporation (http://www.entando.com) All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.agiletec.plugins.jpcontentfeedback.apsadmin.feedback;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.agiletec.aps.system.ApsSystemUtils;
import com.agiletec.apsadmin.system.ApsAdminSystemConstants;
import com.agiletec.plugins.jpcontentfeedback.aps.system.services.contentfeedback.comment.ICommentManager;
import com.agiletec.plugins.jpcontentfeedback.aps.system.services.contentfeedback.comment.model.CommentSearchBean;
import com.agiletec.plugins.jpcontentfeedback.aps.system.services.contentfeedback.comment.model.IComment;
import com.agiletec.plugins.jpcontentfeedback.aps.system.services.contentfeedback.comment.model.ICommentSearchBean;
import com.agiletec.plugins.jpcontentfeedback.aps.system.services.contentfeedback.rating.IRatingManager;
/**
* @author D.Cherchi
*/
public class ContentFeedbackAction extends AbstractContentFeedbackAction implements IContentFeedbackAction{
@Override
public String search() {
try {
ICommentSearchBean searchBean = this.prepareSearchBean();
this.setSearchBean(searchBean);
} catch (Throwable t) {
ApsSystemUtils.logThrowable(t, this, "search");
return FAILURE;
}
return SUCCESS;
}
@Override
public List<String> getCommentIds() {
List<String> comments = new ArrayList<String>();
try {
CommentSearchBean searchBean = (CommentSearchBean) this.getSearchBean();
searchBean.setSort(ICommentSearchBean.SORT_DESC);
comments = this.getCommentManager().searchCommentIds(searchBean);
} catch (Throwable t) {
ApsSystemUtils.logThrowable(t, this, "getCommentIds");
}
return comments;
}
@Override
public IComment getComment(int id){
IComment comment = null;
try {
comment = this.getCommentManager().getComment(id);
} catch (Throwable t) {
ApsSystemUtils.logThrowable(t, this, "getComment");
}
return comment;
}
@Override
public String view() {
try {
IComment comment = this.getComment(this.getSelectedComment());
this.setComment(comment);
} catch (Throwable t) {
ApsSystemUtils.logThrowable(t, this, "view");
return FAILURE;
}
return SUCCESS;
}
public String trash() {
try {
IComment comment = this.getComment(this.getSelectedComment());
if (null == comment) {
return INPUT;
}
this.setComment(comment);
this.setStrutsAction(ApsAdminSystemConstants.DELETE);
} catch (Throwable t) {
ApsSystemUtils.logThrowable(t, this, "trash");
return FAILURE;
}
return SUCCESS;
}
@Override
public String delete(){
try {
if (this.getStrutsAction() == ApsAdminSystemConstants.DELETE) {
this.getCommentManager().deleteComment(this.getSelectedComment());
}
} catch (Throwable t) {
ApsSystemUtils.logThrowable(t, this, "delete");
return FAILURE;
}
return SUCCESS;
}
@Override
public String updateStatus() {
try {
this.getCommentManager().updateCommentStatus(this.getSelectedComment(), this.getStatus());
} catch (Throwable t) {
ApsSystemUtils.logThrowable(t, this, "updateStatus");
return FAILURE;
}
return SUCCESS;
}
private ICommentSearchBean prepareSearchBean() {
CommentSearchBean searchBean = new CommentSearchBean();
searchBean.setComment(this.getText());
searchBean.setUsername(this.getAuthor());
searchBean.setCreationFROMDate(this.getFrom());
searchBean.setCreationTODate(this.getTo());
searchBean.setStatus(this.getStatus());
return searchBean;
}
public void setCommentManager(ICommentManager commentManager) {
this._commentManager = commentManager;
}
public ICommentManager getCommentManager() {
return _commentManager;
}
public String getText() {
return _commentText;
}
public void setText(String text) {
this._commentText = text;
}
public String getAuthor() {
return _author;
}
public void setAuthor(String author) {
this._author = author;
}
public Date getFrom() {
return _from;
}
public void setFrom(Date from) {
this._from = from;
}
public Date getTo() {
return _to;
}
public void setTo(Date to) {
this._to = to;
}
public void setSearchBean(ICommentSearchBean searchBean) {
this._searchBean = searchBean;
}
public ICommentSearchBean getSearchBean() {
return _searchBean;
}
public void setSelectedComment(int selectedComment) {
this._selectedComment = selectedComment;
}
public int getSelectedComment() {
return _selectedComment;
}
public void setComment(IComment comment) {
this._comment = comment;
}
public IComment getComment() {
return _comment;
}
public void setSelectedContent(String selectedContent) {
this._selectedContent = selectedContent;
}
public String getSelectedContent() {
return _selectedContent;
}
public void setRatingManager(IRatingManager ratingManager) {
this._ratingManager = ratingManager;
}
protected IRatingManager getRatingManager() {
return _ratingManager;
}
public void setVotes(Map<String, Integer> votes) {
this._votes = votes;
}
public Map<String, Integer> getVotes() {
return _votes;
}
public void setVote(int vote) {
this._vote = vote;
}
public int getVote() {
return _vote;
}
public void setStatus(int status) {
this._status = status;
}
public int getStatus() {
return _status;
}
public int getStrutsAction() {
return _strutsAction;
}
public void setStrutsAction(int strutsAction) {
this._strutsAction = strutsAction;
}
private int _strutsAction;
private String _commentText;
private String _author;
private Date _from;
private Date _to;
private ICommentManager _commentManager;
private ICommentSearchBean _searchBean;
private int _selectedComment;
private IComment _comment;
private Map<String, Integer> _votes;
private IRatingManager _ratingManager;
private int _status;
private int _vote;
private String _selectedContent;
}
|
[
"eugenio.santoboni@gmail.com"
] |
eugenio.santoboni@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.