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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a755b14e5cada8bb3a459d43bba7464c9e1937d4
|
3b43c420b0fc9c620f999a8cd1df8bb2031a8127
|
/EmpManagementSystem/src/com/org/moglix/controller/EmployeeController.java
|
babb8420ccaf50a711931bd9fa4993dbf0ecbe32
|
[] |
no_license
|
AmanMoglix/Dummy
|
3bbffb75285fc78d728b6426e9c4e554500cb04a
|
35c6ba5a88fa04410721c878de5cf1bd9b70f3ae
|
refs/heads/master
| 2023-08-06T01:26:08.396305
| 2021-09-30T05:57:23
| 2021-09-30T05:57:23
| 411,940,681
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 785
|
java
|
package com.org.moglix.controller;
import com.org.moglix.domain.Employee;
import com.org.moglix.service.EmployeeService;
import com.org.moglix.service.impl.EmployeeServiceImpl;
public class EmployeeController {
EmployeeService empService = EmployeeServiceImpl.getInstance();
public String addEmployee(Employee employee) {
return this.empService.addEmployee(employee);
}
public Employee getById(String empId) {
return this.empService.getById(empId);
}
public String updateEmployeeById(Employee employee, String empId) {
return this.empService.updateEmployeeById(employee, empId);
}
public Employee[] getList() {
return this.empService.getEmployeeList();
}
public String deleteEmployeeById(String empId) {
return this.empService.deleteEmployeeById(empId);
}
}
|
[
"[email protected]"
] | |
1aa4ee11c0c38087e0046721088988c0975fef2e
|
e9541bb45c48f2a8f0db14b4cf378cb1754e7d39
|
/app/src/main/java/chat/rocket/android/activity/business/UpdateGroupActivity.java
|
1fd58d5b2549cd11398c95b9b736b70b11ae73ba
|
[
"MIT"
] |
permissive
|
gangt/Rocket.Chat.Android-develop
|
31098204a8032074498b9ec9ccb366798b148d9c
|
6e12a07960841cf8df72c5a8b5bec78141985024
|
refs/heads/master
| 2020-03-21T04:43:03.480816
| 2018-06-21T05:58:36
| 2018-06-21T05:58:36
| 138,123,986
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,846
|
java
|
package chat.rocket.android.activity.business;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.view.View;
import android.view.WindowManager;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import bolts.Task;
import chat.rocket.android.R;
import chat.rocket.android.RocketChatCache;
import chat.rocket.android.ToastUtils;
import chat.rocket.android.api.MethodCallHelper;
import chat.rocket.android.log.RCLog;
/**
* Created by helloworld on 2018/2/2
*/
public class UpdateGroupActivity extends BusinessBaseActivity implements View.OnClickListener{
private TextView tv_title,tv_create;
private ImageView iv_back,iv_delete;
private EditText et_groupName;
private String roomId;
private String roomTopic;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_update_group);
roomId = getIntent().getStringExtra("roomId");
initView();
setListener();
}
private void setListener() {
iv_back.setOnClickListener(this);
tv_create.setOnClickListener(this);
iv_delete.setOnClickListener(this);
}
private void initView() {
tv_title = findViewById(R.id.tv_title);
iv_back = findViewById(R.id.iv_back);
tv_create = findViewById(R.id.tv_create);
iv_delete = findViewById(R.id.iv_delete);
et_groupName = findViewById(R.id.et_groupName);
tv_create.setText(R.string.finish);
tv_title.setText(R.string.update_group_name);
et_groupName.setFocusable(true);
et_groupName.setFocusableInTouchMode(true);
et_groupName.requestFocus();
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
String subscriptionDisplayName = getIntent().getStringExtra("subscriptionDisplayName");
roomTopic = getIntent().getStringExtra("roomTopic");
String name = subscriptionDisplayName == null ? roomTopic : subscriptionDisplayName;
et_groupName.setText(name);
et_groupName.setSelection(name.length());//将光标移至文字末尾
}
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.iv_back:
finish();
break;
case R.id.iv_delete:
et_groupName.setText("");
break;
case R.id.tv_create:
blockUserForMobile();
break;
}
}
private void blockUserForMobile(){
String hostname = RocketChatCache.INSTANCE.getSelectedServerHostname();
String name = et_groupName.getText().toString().trim();
if(TextUtils.isEmpty(name)){
ToastUtils.showToast(getResources().getString(R.string.please_input_content));
return;
}
showProgressDialog();
MethodCallHelper methodCallHelper = new MethodCallHelper(this, hostname);
if(roomTopic == null){
methodCallHelper.modifyRoomInfo(roomId, et_groupName.getText().toString())
.continueWithTask(task -> {
dismissProgressDialog();
if (task.isFaulted()) {
RCLog.e("blockUserForMobile: result=" + task.getError(), true);
return null;
}
ToastUtils.showToast(getResources().getString(R.string.update_finish));
Intent intent = new Intent();
intent.putExtra("updateName", name);
setResult(Activity.RESULT_OK, intent);
UpdateGroupActivity.this.finish();
return null;
}, Task.UI_THREAD_EXECUTOR);
}else {
methodCallHelper.modifyRoomInfo2(roomId, et_groupName.getText().toString())
.continueWithTask(task -> {
dismissProgressDialog();
if (task.isFaulted()) {
RCLog.e("blockUserForMobile: result=" + task.getError(), true);
return null;
}
ToastUtils.showToast(getResources().getString(R.string.update_finish));
Intent intent = new Intent();
intent.putExtra("updateName", name);
setResult(Activity.RESULT_OK, intent);
UpdateGroupActivity.this.finish();
return null;
}, Task.UI_THREAD_EXECUTOR);
}
}
}
|
[
"[email protected]"
] | |
831f1c25bbfe967e9f9f8b71a5ec0cf443a51836
|
4a8f456a7d08b918b0cdb668151486ce1bf5fb60
|
/keepalive/src/main/java/com/sdk/keepbackground/work/AbsWorkService.java
|
dde084164646dbf0fa65561ca10deebe2b99cf0c
|
[] |
no_license
|
ytl2009/KeepAlive
|
938f8dabd9dc7757084e03d2d9a55880018c0b86
|
382f3c4f85d38192f820070e9625c44fe9f9fef2
|
refs/heads/master
| 2020-11-23T19:45:56.057387
| 2019-10-08T07:52:34
| 2019-10-08T07:52:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,260
|
java
|
package com.sdk.keepbackground.work;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.os.IBinder;
import android.util.Log;
import com.sdk.keepbackground.watch.AbsServiceConnection;
import com.sdk.keepbackground.utils.ForegroundNotificationUtils;
import com.sdk.keepbackground.singlepixel.ScreenReceiverUtil;
import com.sdk.keepbackground.watch.WatchDogService;
import com.sdk.keepbackground.watch.WatchProcessPrefHelper;
/**
* 主要Service 用户继承该类用来处理自己业务逻辑
*
* 该类已经实现如何启动结束及保活的功能,用户无需关心。
*/
public abstract class AbsWorkService extends Service {
private StopBroadcastReceiver stopBroadcastReceiver;
private AbsServiceConnection mConnection = new AbsServiceConnection() {
@Override
public void onDisconnected(ComponentName name) {
if (needStartWorkService()) {
DaemonEnv.startServiceMayBind(AbsWorkService.this, WatchDogService.class, mConnection);
}
}
};
@Override
public void onCreate() {
super.onCreate();
if(DaemonEnv.app==null)return;
Log.d("sj_keep", this.getClass()+" onCreate 启动。。。。");
WatchProcessPrefHelper.mWorkServiceClass=this.getClass();
if (!needStartWorkService()) {
stopSelf();
}else {
Log.d("sj_keep", "AbsWorkService onCreate 启动。。。。");
startRegisterReceiver();
createScreenListener();
ForegroundNotificationUtils.startForegroundNotification(this);
getPackageManager().setComponentEnabledSetting(new ComponentName(getPackageName(), WatchDogService.class.getName()),
PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
}
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
return onStart();
}
/**
* 1.防止重复启动,可以任意调用 DaemonEnv.startServiceMayBind(Class serviceClass);
* 2.利用漏洞启动前台服务而不显示通知;
* 3.在子线程中运行定时任务,处理了运行前检查和销毁时保存的问题;
* 4.启动守护服务;
* 5.守护 Service 组件的启用状态, 使其不被 MAT 等工具禁用.
*/
protected int onStart() {
//启动守护服务,运行在:watch子进程中
//业务逻辑: 实际使用时,根据需求,将这里更改为自定义的条件,判定服务应当启动还是停止 (任务是否需要运行)
// 此处不比重复关闭服务。否则mConnection.mConnectedState的状态没有来得及改变,
// 再次unbindService(conn)服务会导致 Service not registered 异常抛出。 服务启动和关闭都需要耗时,段时间内不宜频繁开启和关闭。
//若还没有取消订阅,说明任务仍在运行,为防止重复启动,直接 return
DaemonEnv.startServiceMayBind(AbsWorkService.this, WatchDogService.class, mConnection);
Boolean workRunning = isWorkRunning();
if (!workRunning){
//业务逻辑
startWork();
}
return START_STICKY;
}
@Override
public IBinder onBind(Intent intent) {
return onBindService(intent, null);
}
/**
* 最近任务列表中划掉卡片时回调
*/
@Override
public void onTaskRemoved(Intent rootIntent) {
onEnd();
}
/**
* 设置-正在运行中停止服务时回调
*/
@Override
public void onDestroy() {
ForegroundNotificationUtils.deleteForegroundNotification(this);
stopRegisterReceiver();
stopScreenListener();
onEnd();
}
protected void onEnd() {
onServiceKilled();
// // 不同的进程,所有的静态和单例都会失效
if (needStartWorkService()){
DaemonEnv.startServiceSafely(AbsWorkService.this,WatchDogService.class);
}
}
/**
* 是否 任务完成, 不再需要服务运行?
* @return true 应当启动服务; false 应当停止服务; null 无法判断, 什么也不做.
*/
public abstract Boolean needStartWorkService();
/**
* 开启具体业务,实际调用与isWorkRunning方法返回值有关,当isWorkRunning返回false才会执行该方法
*/
public abstract void startWork();
/**
* 服务停止需要执行的操作
*/
public abstract void stopWork();
/**
* 任务是否正在运行? 由实现者处理
* @return 任务正在运行, true; 任务当前不在运行, false; 无法判断, 什么也不做, null.
*/
public abstract Boolean isWorkRunning();
/**
* 绑定远程service 可根据实际业务情况是否绑定自定义binder或者直接返回默认binder
* @param intent
* @param alwaysNull
* @return
*/
public abstract IBinder onBindService(Intent intent, Void alwaysNull);
public abstract void onServiceKilled();
/**
* 任务完成,停止服务并取消定时唤醒
*
* 停止服务使用取消订阅的方式实现,而不是调用 Context.stopService(Intent name)。因为:
* 1.stopService 会调用 Service.onDestroy(),而 AbsWorkService 做了保活处理,会把 Service 再拉起来;
* 2.我们希望 AbsWorkService 起到一个类似于控制台的角色,即 AbsWorkService 始终运行 (无论任务是否需要运行),
* 而是通过 onStart() 里自定义的条件,来决定服务是否应当启动或停止。
*/
private void stopService() {
// 给实现者处理业务逻辑
DaemonEnv.safelyUnbindService(this,mConnection);
stopWork();
stopSelf();
}
private ScreenReceiverUtil mScreenUtils;
private void createScreenListener(){
// 注册锁屏广播监听器
mScreenUtils = new ScreenReceiverUtil(this);
mScreenUtils.startScreenReceiverListener();
}
private void stopScreenListener(){
// 取消注册
if (mScreenUtils != null){
mScreenUtils.stopScreenReceiverListener();
mScreenUtils = null;
}
}
private void startRegisterReceiver(){
if (stopBroadcastReceiver == null){
stopBroadcastReceiver = new StopBroadcastReceiver();
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(DaemonEnv.ACTION_CANCEL_JOB_ALARM_SUB);
registerReceiver(stopBroadcastReceiver,intentFilter);
}
}
private void stopRegisterReceiver(){
if (stopBroadcastReceiver != null){
unregisterReceiver(stopBroadcastReceiver);
stopBroadcastReceiver = null;
}
}
class StopBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// 停止业务
stopService();
}
}
}
|
[
"[email protected]"
] | |
3105a20887d5103298f12b2e1cd95e360a65fb82
|
9d0517091fe2313c40bcc88a7c82218030d2075c
|
/apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/blobstore/integration/SwiftContainerIntegrationLiveTest.java
|
fcabb0ae52659dc6010f1ab6e9f470a780140533
|
[
"Apache-2.0"
] |
permissive
|
nucoupons/Mobile_Applications
|
5c63c8d97f48e1051049c5c3b183bbbaae1fa6e6
|
62239dd0f17066c12a86d10d26bef350e6e9bd43
|
refs/heads/master
| 2020-12-04T11:49:53.121041
| 2020-01-04T12:00:04
| 2020-01-04T12:00:04
| 231,754,011
| 0
| 0
|
Apache-2.0
| 2020-01-04T12:02:30
| 2020-01-04T11:46:54
|
Java
|
UTF-8
|
Java
| false
| false
| 2,402
|
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.jclouds.openstack.swift.v1.blobstore.integration;
import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE;
import static org.testng.Assert.assertTrue;
import java.util.Properties;
import org.jclouds.blobstore.integration.internal.BaseContainerIntegrationTest;
import org.testng.annotations.Test;
import org.testng.SkipException;
@Test(groups = "live", testName = "SwiftContainerIntegrationLiveTest")
public class SwiftContainerIntegrationLiveTest extends BaseContainerIntegrationTest {
public SwiftContainerIntegrationLiveTest() {
provider = "openstack-swift";
}
@Override
protected Properties setupProperties() {
Properties props = super.setupProperties();
setIfTestSystemPropertyPresent(props, CREDENTIAL_TYPE);
return props;
}
@Override
public void testListRootUsesDelimiter() throws InterruptedException {
try {
super.testListRootUsesDelimiter();
} catch (AssertionError e) {
// swift doesn't have the "common prefixes" in the response that s3
// does. If we wanted this to pass, we'd need to create
// pseudo-directories implicitly, which is costly and troublesome. It
// is better to fail this assertion.
assertTrue(e.getMessage().matches(".*16.* but .*15.*"), e.getMessage());
// ^^ squishy regex to deal with various formats of testng messages.
}
}
@Override
public void testDelimiter() throws Exception {
throw new SkipException("openstack-swift does not implement pseudo-directories");
}
}
|
[
"Administrator@fdp"
] |
Administrator@fdp
|
22fb7db356b6cbcdf743b72c1373e91ed6b97cf8
|
4f57aed823ff96ae43d95cf84cf439f6fa41cd7a
|
/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/ibm-igc-repository-connector/igc-rest-client-library/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/igc/clientlibrary/model/generated/v11701sp1/ChangedProperties.java
|
f9999c3cb38ef335f678bc28820f59a5d917944e
|
[
"CC-BY-4.0",
"Apache-2.0"
] |
permissive
|
ElshadV/egeria
|
2640607a332ca08dab9c3af0276ba509722a7a50
|
dd43bdff970e88c885a3002929b061c90a0796fe
|
refs/heads/master
| 2020-05-18T01:23:03.615663
| 2019-04-29T14:14:19
| 2019-04-29T14:14:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,705
|
java
|
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.adapters.repositoryservices.igc.clientlibrary.model.generated.v11701sp1;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonTypeName;
import javax.annotation.Generated;
import org.odpi.openmetadata.adapters.repositoryservices.igc.clientlibrary.model.common.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
/**
* POJO for the {@code changed_properties} asset type in IGC, displayed as '{@literal Changed Properties}' in the IGC UI.
* <br><br>
* (this code has been generated based on out-of-the-box IGC metadata types;
* if modifications are needed, eg. to handle custom attributes,
* extending from this class in your own custom class is the best approach.)
*/
@Generated("org.odpi.openmetadata.adapters.repositoryservices.igc.clientlibrary.model.IGCRestModelGenerator")
@JsonIgnoreProperties(ignoreUnknown=true)
@JsonTypeName("changed_properties")
public class ChangedProperties extends Reference {
public static String getIgcTypeDisplayName() { return "Changed Properties"; }
/**
* The {@code term_history} property, displayed as '{@literal Term History}' in the IGC UI.
* <br><br>
* Will be a {@link ReferenceList} of {@link TermHistory} objects.
*/
protected ReferenceList term_history;
/**
* The {@code property_name} property, displayed as '{@literal Property Name}' in the IGC UI.
*/
protected ArrayList<String> property_name;
/**
* The {@code previous_value} property, displayed as '{@literal Previous Value}' in the IGC UI.
*/
protected ArrayList<String> previous_value;
/**
* The {@code created_by} property, displayed as '{@literal Created By}' in the IGC UI.
*/
protected String created_by;
/**
* The {@code created_on} property, displayed as '{@literal Created On}' in the IGC UI.
*/
protected Date created_on;
/**
* The {@code modified_by} property, displayed as '{@literal Modified By}' in the IGC UI.
*/
protected String modified_by;
/**
* The {@code modified_on} property, displayed as '{@literal Modified On}' in the IGC UI.
*/
protected Date modified_on;
/** @see #term_history */ @JsonProperty("term_history") public ReferenceList getTermHistory() { return this.term_history; }
/** @see #term_history */ @JsonProperty("term_history") public void setTermHistory(ReferenceList term_history) { this.term_history = term_history; }
/** @see #property_name */ @JsonProperty("property_name") public ArrayList<String> getPropertyName() { return this.property_name; }
/** @see #property_name */ @JsonProperty("property_name") public void setPropertyName(ArrayList<String> property_name) { this.property_name = property_name; }
/** @see #previous_value */ @JsonProperty("previous_value") public ArrayList<String> getPreviousValue() { return this.previous_value; }
/** @see #previous_value */ @JsonProperty("previous_value") public void setPreviousValue(ArrayList<String> previous_value) { this.previous_value = previous_value; }
/** @see #created_by */ @JsonProperty("created_by") public String getCreatedBy() { return this.created_by; }
/** @see #created_by */ @JsonProperty("created_by") public void setCreatedBy(String created_by) { this.created_by = created_by; }
/** @see #created_on */ @JsonProperty("created_on") public Date getCreatedOn() { return this.created_on; }
/** @see #created_on */ @JsonProperty("created_on") public void setCreatedOn(Date created_on) { this.created_on = created_on; }
/** @see #modified_by */ @JsonProperty("modified_by") public String getModifiedBy() { return this.modified_by; }
/** @see #modified_by */ @JsonProperty("modified_by") public void setModifiedBy(String modified_by) { this.modified_by = modified_by; }
/** @see #modified_on */ @JsonProperty("modified_on") public Date getModifiedOn() { return this.modified_on; }
/** @see #modified_on */ @JsonProperty("modified_on") public void setModifiedOn(Date modified_on) { this.modified_on = modified_on; }
public static Boolean canBeCreated() { return false; }
public static Boolean includesModificationDetails() { return true; }
private static final List<String> NON_RELATIONAL_PROPERTIES = Arrays.asList(
"property_name",
"previous_value",
"created_by",
"created_on",
"modified_by",
"modified_on"
);
private static final List<String> STRING_PROPERTIES = Arrays.asList(
"property_name",
"previous_value",
"created_by",
"modified_by"
);
private static final List<String> PAGED_RELATIONAL_PROPERTIES = Arrays.asList(
"term_history"
);
private static final List<String> ALL_PROPERTIES = Arrays.asList(
"term_history",
"property_name",
"previous_value",
"created_by",
"created_on",
"modified_by",
"modified_on"
);
public static List<String> getNonRelationshipProperties() { return NON_RELATIONAL_PROPERTIES; }
public static List<String> getStringProperties() { return STRING_PROPERTIES; }
public static List<String> getPagedRelationshipProperties() { return PAGED_RELATIONAL_PROPERTIES; }
public static List<String> getAllProperties() { return ALL_PROPERTIES; }
public static Boolean isChangedProperties(Object obj) { return (obj.getClass() == ChangedProperties.class); }
}
|
[
"[email protected]"
] | |
107cec5e8deeb6465c25260c499b87b67dbd0f42
|
a919d96820e9b71cae21a7f7f5fd7ad2ed4045f5
|
/app/src/main/java/com/coolweather/android/util/Utility.java
|
07061f4f17fa319addb2accf497be3989401860b
|
[
"Apache-2.0"
] |
permissive
|
Yang-YuLin/coolweather
|
c7e0e8f7302d3b4987f1530fc56ca5acbbfbb291
|
060b6aa21ac48ba5cd77d0c37c5ea572fbe87a7c
|
refs/heads/master
| 2021-09-21T10:31:10.257430
| 2018-08-24T13:29:06
| 2018-08-24T13:29:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,545
|
java
|
package com.coolweather.android.util;
import android.text.TextUtils;
import com.coolweather.android.db.City;
import com.coolweather.android.db.County;
import com.coolweather.android.db.Province;
import com.coolweather.android.gson.Weather;
import com.google.gson.Gson;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/**
* Created by Yangyulin on 2018/8/20.
*/
//用来解析和处理json格式数据的工具类
public class Utility {
/**
* 解析和处理服务器返回的省级数据
*/
public static boolean handleProvinceResponse(String response){
if(!TextUtils.isEmpty(response)){
try{
JSONArray allProvinces = new JSONArray(response);
for(int i = 0; i < allProvinces.length(); i++){
JSONObject provinceObject = allProvinces.getJSONObject(i);
Province province = new Province();
province.setProvinceName(provinceObject.getString("name"));
province.setProvinceCode(provinceObject.getInt("id"));
province.save();
}
return true;
}catch (JSONException e){
e.printStackTrace();
}
}
return false;
}
/**
* 解析和处理服务器返回的市级数据
*/
public static boolean handleCityResponse(String response,int provinceId){
if(!TextUtils.isEmpty(response)){
try{
JSONArray allCities = new JSONArray(response);
for(int i = 0; i < allCities.length(); i++){
JSONObject cityObject = allCities.getJSONObject(i);
City city = new City();
city.setCityName(cityObject.getString("name"));
city.setCityCode(cityObject.getInt("id"));
city.setProvinceId(provinceId);
city.save();
}
return true;
}catch (JSONException e){
e.printStackTrace();
}
}
return false;
}
/**
* 解析和处理服务器返回的县级数据
*/
public static boolean handleCountyResponse(String response,int cityId){
if(!TextUtils.isEmpty(response)){
try{
JSONArray allCounties = new JSONArray(response);
for(int i = 0; i < allCounties.length(); i++){
JSONObject countyObject = allCounties.getJSONObject(i);
County county = new County();
county.setCountyName(countyObject.getString("name"));
county.setWeatherId(countyObject.getString("weather_id"));
county.setCityId(cityId);
county.save();
}
return true;
}catch (JSONException e){
e.printStackTrace();
}
}
return false;
}
/**
* 将返回的JSON数据解析成Weather实体类
*/
public static Weather handleWeatherResponse(String response){
try{
JSONObject jsonObject = new JSONObject(response);
JSONArray jsonArray = jsonObject.getJSONArray("HeWeather");
String weatherContent = jsonArray.getJSONObject(0).toString();
return new Gson().fromJson(weatherContent,Weather.class);
}catch (Exception e){
e.printStackTrace();
}
return null;
}
}
|
[
"[email protected]"
] | |
e4b4b5834b3fa729d0d39009d71ad74dcfb9b179
|
04406cd4df93f7b1e19953e359b17cd49e0bfd96
|
/sources/com.superking.ludo.star/java/com/unity3d/ads/api/Resolve.java
|
9e04460164232da62ed2be990795a490b6e32ee8
|
[] |
no_license
|
lancelot1337/Udo
|
97c2f2249518460960b6723940615a9665d77f43
|
2e42f9e37bc7cc47cdb95aaef1a678d20dc024b9
|
refs/heads/master
| 2021-01-25T12:01:26.726595
| 2018-03-01T15:22:22
| 2018-03-01T15:22:22
| 123,451,782
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,408
|
java
|
package com.unity3d.ads.api;
import com.unity3d.ads.request.IResolveHostListener;
import com.unity3d.ads.request.ResolveHostError;
import com.unity3d.ads.request.ResolveHostEvent;
import com.unity3d.ads.request.WebRequestThread;
import com.unity3d.ads.webview.WebViewApp;
import com.unity3d.ads.webview.WebViewEventCategory;
import com.unity3d.ads.webview.bridge.WebViewCallback;
import com.unity3d.ads.webview.bridge.WebViewExposed;
public class Resolve {
@WebViewExposed
public static void resolve(final String id, String host, WebViewCallback callback) {
if (WebRequestThread.resolve(host, new IResolveHostListener() {
public void onResolve(String host, String address) {
if (WebViewApp.getCurrentApp() != null) {
WebViewApp.getCurrentApp().sendEvent(WebViewEventCategory.RESOLVE, ResolveHostEvent.COMPLETE, id, host, address);
}
}
public void onFailed(String host, ResolveHostError error, String errorMessage) {
if (WebViewApp.getCurrentApp() != null) {
WebViewApp.getCurrentApp().sendEvent(WebViewEventCategory.RESOLVE, ResolveHostEvent.FAILED, id, host, error.name(), errorMessage);
}
}
})) {
callback.invoke(id);
return;
}
callback.error(ResolveHostError.INVALID_HOST, id);
}
}
|
[
"[email protected]"
] | |
c18fab009b5148e859d0e8c1b52aa073f599a3b5
|
d52fc86965764314eef5dc62cfca769c5ac4aac4
|
/pj4w/pj4w09filterasynch/src/main/java/learn/ee/pj4w09filterasync/NonAsyncServlet.java
|
441aea34e6acbf361da1a4291aab58944880c111
|
[] |
no_license
|
dpopkov/learnee
|
8980381fb0469e027fbea828b00a7b3b97fd38da
|
a4bea58ef59117e979cf2b23a1c706e1e554ecd7
|
refs/heads/master
| 2022-12-21T14:31:36.103328
| 2020-10-19T23:52:44
| 2020-10-19T23:52:44
| 231,949,360
| 0
| 0
| null | 2022-12-16T15:51:48
| 2020-01-05T17:03:46
|
Java
|
UTF-8
|
Java
| false
| false
| 802
|
java
|
package learn.ee.pj4w09filterasync;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebServlet(
name = "nonAsyncServlet",
urlPatterns = "/regular"
)
public class NonAsyncServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
System.out.println("Entering " + getClass().getSimpleName() + ".doGet()");
req.getRequestDispatcher("/WEB-INF/jsp/view/nonAsync.jsp").forward(req, resp);
System.out.println("Leaving " + getClass().getSimpleName() + ".doGet()");
}
}
|
[
"[email protected]"
] | |
3f8b932e8380b839e2686ef8d70372cc2b1f5e55
|
619acae0b93dc8f0402cacfe4c4689747df6774c
|
/src/main/java/com/tactfactory/ovg/entities/RendezVous.java
|
75d80a98f2a835b80255e4b1a48214fcc57b3ee9
|
[] |
no_license
|
jponcy/jdbc
|
7b88b03f169f706d4867e4dd310fbab1275ee284
|
b81d39fd3d6d5c4725034b5eaa460dbf6ef73a90
|
refs/heads/master
| 2022-07-16T23:32:05.305648
| 2019-11-29T14:26:46
| 2019-11-29T14:26:46
| 219,752,022
| 2
| 0
| null | 2022-06-21T02:10:40
| 2019-11-05T13:30:15
|
Java
|
UTF-8
|
Java
| false
| false
| 2,081
|
java
|
package com.tactfactory.ovg.entities;
import java.time.LocalDateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
@Table(name = "app_rdv")
public class RendezVous extends EntityBase {
private LocalDateTime startedAt;
/** Le livreur doit-il installer le materiel. */
@Column(nullable = false)
private boolean toInstall = false;
/** La personne livree. */
@ManyToOne(optional = false)
private Customer customer;
@ManyToOne(optional = false)
private Employee deliveryMan;
/** Le produit a livrer (une livraison = 1 produit). */
@ManyToOne(optional = false)
private Product product;
/**
* @return the startedAt
*/
public LocalDateTime getStartedAt() {
return startedAt;
}
/**
* @param startedAt the startedAt to set
*/
public void setStartedAt(LocalDateTime startedAt) {
this.startedAt = startedAt;
}
/**
* @return the customer
*/
public Customer getCustomer() {
return customer;
}
/**
* @param customer the customer to set
*/
public void setCustomer(Customer customer) {
this.customer = customer;
}
/**
* @return the deliveryMan
*/
public Employee getDeliveryMan() {
return deliveryMan;
}
/**
* @param deliveryMan the deliveryMan to set
*/
public void setDeliveryMan(Employee deliveryMan) {
this.deliveryMan = deliveryMan;
}
/**
* @return the toInstall
*/
public boolean isToInstall() {
return toInstall;
}
/**
* @param toInstall the toInstall to set
*/
public void setToInstall(boolean toInstall) {
this.toInstall = toInstall;
}
/**
* @return the product
*/
public Product getProduct() {
return product;
}
/**
* @param product the product to set
*/
public void setProduct(Product product) {
this.product = product;
}
}
|
[
"[email protected]"
] | |
ae7bb0f67b559fee026afbacad046e6ab18b728a
|
1ab269d72dd38dc7061ae3ed483f77bbd1f68fc8
|
/ssm/src/main/java/com/rectrl/repository/BookRepository.java
|
5d2db254b8dfcb5ccfa25304328d83ab64a97391
|
[] |
no_license
|
zhehongen/sshm
|
1049f88b3ecb1035d4d1b087f0499c6b4371d7c4
|
5a7b79242bd41a1d6cfd8148b91162a07fc62a01
|
refs/heads/master
| 2022-12-24T06:26:27.952629
| 2019-08-30T08:37:20
| 2019-08-30T08:37:20
| 201,916,284
| 0
| 0
| null | 2022-11-16T12:26:03
| 2019-08-12T11:22:18
|
Java
|
UTF-8
|
Java
| false
| false
| 693
|
java
|
package com.rectrl.repository;
import com.rectrl.entity.Book;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface BookRepository {
/**
* 通过ID查询单本图书
*
* @param bookId
* @return
*/
Book queryById(long bookId);
/**
* 查询所有图书
*
* @param offset 查询起始位置
* @param limit 查询条数
* @return
*/
List<Book> queryAll(@Param("offset") int offset, @Param("limit") int limit);
/**
* 减少馆藏数量
*
* @param bookId
* @return 如果影响行数等于>1,表示更新的记录行数
*/
int reduceNumber(long bookId);
}
|
[
"12345678"
] |
12345678
|
6e6b46ed2510c5ddafb29a531f7a9de21ea28387
|
95e944448000c08dd3d6915abb468767c9f29d3c
|
/sources/com/p280ss/android/ugc/aweme/net/corenet/C34062g.java
|
7adf623414c25d2c8c22c6fc2a2d17cfe837a719
|
[] |
no_license
|
xrealm/tiktok-src
|
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
|
90f305b5f981d39cfb313d75ab231326c9fca597
|
refs/heads/master
| 2022-11-12T06:43:07.401661
| 2020-07-04T20:21:12
| 2020-07-04T20:21:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 482
|
java
|
package com.p280ss.android.ugc.aweme.net.corenet;
import com.p280ss.android.ugc.aweme.legacy.download.C32331a.C32332a;
/* renamed from: com.ss.android.ugc.aweme.net.corenet.g */
final /* synthetic */ class C34062g implements C32332a {
/* renamed from: a */
private final C34052a f88833a;
C34062g(C34052a aVar) {
this.f88833a = aVar;
}
/* renamed from: a */
public final Object mo83541a() {
return C34061f.m109669a(this.f88833a);
}
}
|
[
"[email protected]"
] | |
4fc409abbc145925bf477b592757f1f3175906e2
|
40d844c1c780cf3618979626282cf59be833907f
|
/src/testcases/CWE113_HTTP_Response_Splitting/s02/CWE113_HTTP_Response_Splitting__getQueryString_Servlet_setHeaderServlet_81_bad.java
|
61196f9caad6a294ec3228ad5a4a03746736a63b
|
[] |
no_license
|
rubengomez97/juliet
|
f9566de7be198921113658f904b521b6bca4d262
|
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
|
refs/heads/master
| 2023-06-02T00:37:24.532638
| 2021-06-23T17:22:22
| 2021-06-23T17:22:22
| 379,676,259
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,283
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE113_HTTP_Response_Splitting__getQueryString_Servlet_setHeaderServlet_81_bad.java
Label Definition File: CWE113_HTTP_Response_Splitting.label.xml
Template File: sources-sinks-81_bad.tmpl.java
*/
/*
* @description
* CWE: 113 HTTP Response Splitting
* BadSource: getQueryString_Servlet Parse id param out of the URL query string (without using getParameter())
* GoodSource: A hardcoded string
* Sinks: setHeaderServlet
* GoodSink: URLEncode input
* BadSink : querystring to setHeader()
* Flow Variant: 81 Data flow: data passed in a parameter to an abstract method
*
* */
package testcases.CWE113_HTTP_Response_Splitting.s02;
import testcasesupport.*;
import javax.servlet.http.*;
import java.net.URLEncoder;
public class CWE113_HTTP_Response_Splitting__getQueryString_Servlet_setHeaderServlet_81_bad extends CWE113_HTTP_Response_Splitting__getQueryString_Servlet_setHeaderServlet_81_base
{
public void action(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
if (data != null)
{
/* POTENTIAL FLAW: Input not verified before inclusion in header */
response.setHeader("Location", "/author.jsp?lang=" + data);
}
}
}
|
[
"[email protected]"
] | |
c612d10ac224d73202413aa0496365a0461102b3
|
a5d01febfd8d45a61f815b6f5ed447e25fad4959
|
/Source Code/5.5.1/sources/com/google/firebase/iid/FirebaseInstanceIdService.java
|
625cea75b4d27f26f02e0c4f599b51e57c1248f5
|
[] |
no_license
|
kkagill/Decompiler-IQ-Option
|
7fe5911f90ed2490687f5d216cb2940f07b57194
|
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
|
refs/heads/master
| 2020-09-14T20:44:49.115289
| 2019-11-04T06:58:55
| 2019-11-04T06:58:55
| 223,236,327
| 1
| 0
| null | 2019-11-21T18:17:17
| 2019-11-21T18:17:16
| null |
UTF-8
|
Java
| false
| false
| 1,488
|
java
|
package com.google.firebase.iid;
import android.content.Intent;
import android.support.annotation.WorkerThread;
import android.util.Log;
import com.google.android.gms.common.internal.Hide;
public class FirebaseInstanceIdService extends f {
@WorkerThread
public void fM() {
}
@Hide
protected final Intent m(Intent intent) {
return (Intent) ac.wP().YZ.poll();
}
@Hide
public final void n(Intent intent) {
if ("com.google.firebase.iid.TOKEN_REFRESH".equals(intent.getAction())) {
fM();
return;
}
String stringExtra = intent.getStringExtra("CMD");
if (stringExtra != null) {
if (Log.isLoggable("FirebaseInstanceId", 3)) {
String valueOf = String.valueOf(intent.getExtras());
StringBuilder stringBuilder = new StringBuilder((String.valueOf(stringExtra).length() + 21) + String.valueOf(valueOf).length());
stringBuilder.append("Received command: ");
stringBuilder.append(stringExtra);
stringBuilder.append(" - ");
stringBuilder.append(valueOf);
Log.d("FirebaseInstanceId", stringBuilder.toString());
}
if ("RST".equals(stringExtra) || "RST_FULL".equals(stringExtra)) {
FirebaseInstanceId.wj().wr();
} else if ("SYNC".equals(stringExtra)) {
FirebaseInstanceId.wj().ws();
}
}
}
}
|
[
"[email protected]"
] | |
81d0a7dd512cdb8965eeef841d26300e9809d725
|
893bdc59bb8ff233ad4567182a04ff23a4ee13ae
|
/spring/spring3/SpringDev/src/com/rueggerllc/aop/MyAfterThrowingAspect.java
|
2d300ba6135c13700ea53b44adcc8ddf4c35e533
|
[] |
no_license
|
rueggerc/rueggerllc-public
|
33f5396f04a423a62f6c7e7124fa02c8f455c2c8
|
a86950de18c1d5ec23aaf1051268f297b4bc4f78
|
refs/heads/master
| 2021-01-13T14:38:17.480642
| 2017-10-10T22:14:30
| 2017-10-10T22:14:30
| 76,731,748
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 978
|
java
|
package com.rueggerllc.aop;
import org.apache.log4j.Logger;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import com.rueggerllc.exceptions.MyDataException;
@Aspect
public class MyAfterThrowingAspect {
private static Logger logger = Logger.getLogger(MyAfterThrowingAspect.class);
// Define our Pointcut and Advice
@AfterThrowing(value="execution(* com.rueggerllc.aop.access.*.*(..))", throwing="e")
public void runAfterThrowingAdvice(JoinPoint joinPoint, MyDataException e) throws Throwable {
try {
logger.info("After Throwing");
logger.info("class: " + joinPoint.getSignature().getDeclaringTypeName());
logger.info("method: " + joinPoint.getSignature().getName());
Object target = joinPoint.getTarget();
Object[] args = joinPoint.getArgs();
logger.info("Exception message=" + e.getMessage());
} catch (Exception e1) {
throw e1;
}
}
}
|
[
"[email protected]"
] | |
9ac4c2d5bb661eaa2b10cbfbeb091ddf523d53e0
|
75950d61f2e7517f3fe4c32f0109b203d41466bf
|
/modules/tags/fabric3-modules-parent-pom-0.7/kernel/impl/fabric3-pojo/src/main/java/org/fabric3/pojo/builder/PojoSourceWireAttacher.java
|
c540b7927a53823aa0db021a21b086b3ab492945
|
[] |
no_license
|
codehaus/fabric3
|
3677d558dca066fb58845db5b0ad73d951acf880
|
491ff9ddaff6cb47cbb4452e4ddbf715314cd340
|
refs/heads/master
| 2023-07-20T00:34:33.992727
| 2012-10-31T16:32:19
| 2012-10-31T16:32:19
| 36,338,853
| 0
| 0
| null | null | null | null |
MacCentralEurope
|
Java
| false
| false
| 6,204
|
java
|
/*
* Fabric3
* Copyright © 2008 Metaform Systems Limited
*
* This proprietary software may be used only connection with the Fabric3 license
* (the “License”), a copy of which is included in the software or may be
* obtained at: http://www.metaformsystems.com/licenses/license.html.
* Software distributed under the License is distributed on an “as is” basis,
* without warranties or conditions of any kind. See the License for the
* specific language governing permissions and limitations of use of the software.
* This software is distributed in conjunction with other software licensed under
* different terms. See the separate licenses for those programs included in the
* distribution for the permitted and restricted uses of such software.
*
* --- Original Apache License ---
*
* 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.fabric3.pojo.builder;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.net.URI;
import java.util.Map;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.fabric3.pojo.component.PojoComponent;
import org.fabric3.pojo.provision.PojoWireSourceDefinition;
import org.fabric3.model.type.service.DataType;
import org.fabric3.model.type.java.InjectableAttribute;
import org.fabric3.spi.model.physical.PhysicalWireTargetDefinition;
import org.fabric3.spi.model.type.JavaClass;
import org.fabric3.spi.model.type.JavaParameterizedType;
import org.fabric3.spi.model.type.XSDSimpleType;
import org.fabric3.spi.classloader.ClassLoaderRegistry;
import org.fabric3.spi.transform.PullTransformer;
import org.fabric3.spi.transform.TransformContext;
import org.fabric3.spi.transform.TransformationException;
import org.fabric3.spi.transform.TransformerRegistry;
/**
* @version $Revision$ $Date$
*/
public abstract class PojoSourceWireAttacher {
private static final XSDSimpleType SOURCE_TYPE = new XSDSimpleType(Node.class, XSDSimpleType.STRING);
protected TransformerRegistry<PullTransformer<?, ?>> transformerRegistry;
protected ClassLoaderRegistry classLoaderRegistry;
protected PojoSourceWireAttacher(TransformerRegistry<PullTransformer<?, ?>> transformerRegistry, ClassLoaderRegistry classLoaderRegistry) {
this.transformerRegistry = transformerRegistry;
this.classLoaderRegistry = classLoaderRegistry;
}
@SuppressWarnings("unchecked")
protected Object getKey(PojoWireSourceDefinition sourceDefinition,
PojoComponent<?> source,
PhysicalWireTargetDefinition targetDefinition,
InjectableAttribute referenceSource) throws PropertyTransformException {
if (!Map.class.isAssignableFrom(source.getMemberType(referenceSource))) {
return null;
}
Document keyDocument = sourceDefinition.getKey();
if (keyDocument == null) {
keyDocument = targetDefinition.getKey();
}
if (keyDocument != null) {
Element element = keyDocument.getDocumentElement();
Type formalType;
Type type = source.getGerenricMemberType(referenceSource);
if (type instanceof ParameterizedType) {
ParameterizedType genericType = (ParameterizedType) type;
formalType = genericType.getActualTypeArguments()[0];
if (formalType instanceof ParameterizedType && ((ParameterizedType) formalType).getRawType().equals(Class.class)) {
formalType = ((ParameterizedType) formalType).getRawType();
} else if (formalType instanceof Class<?> && Enum.class.isAssignableFrom((Class<?>) formalType)) {
Class<Enum> enumClass = (Class<Enum>) formalType;
return Enum.valueOf(enumClass, element.getTextContent());
}
} else {
formalType = String.class;
}
URI sourceId = sourceDefinition.getClassLoaderId();
URI targetId = targetDefinition.getClassLoaderId();
ClassLoader sourceClassLoader = classLoaderRegistry.getClassLoader(sourceId);
ClassLoader targetClassLoader = null;
if (targetId != null) {
targetClassLoader = classLoaderRegistry.getClassLoader(targetId);
}
TransformContext context = new TransformContext(sourceClassLoader, targetClassLoader, null, null);
return createKey(formalType, element, context);
}
return null;
}
@SuppressWarnings("unchecked")
private Object createKey(Type type, Element value, TransformContext context) throws PropertyTransformException {
DataType<?> targetType;
if (type instanceof Class<?>) {
targetType = new JavaClass((Class<?>) type);
} else {
targetType = new JavaParameterizedType((ParameterizedType) type);
}
PullTransformer<Node, ?> transformer = (PullTransformer<Node, ?>) transformerRegistry.getTransformer(SOURCE_TYPE, targetType);
if (transformer == null) {
throw new PropertyTransformException("No transformer for : " + type);
}
try {
return transformer.transform(value, context);
} catch (TransformationException e) {
throw new PropertyTransformException("Error transformatng property", e);
}
}
}
|
[
"meerajk@83866bfc-822f-0410-aa35-bd5043b85eaf"
] |
meerajk@83866bfc-822f-0410-aa35-bd5043b85eaf
|
fdad78b87a357c0ee06e951409731613caa24098
|
8a38d1fc0153edf6a87c0a6cf6f7fb6c93a99c74
|
/src/main/java/com/zx/platform/common/utils/SystemPath.java
|
ce142074d82f2edd0e56304f4e7ace5287201083
|
[
"Apache-2.0",
"BSD-2-Clause"
] |
permissive
|
iVayne/zt-platform
|
e1de06de9f619f1dc7b7b8ab2d7424eaa6115e5e
|
aeb1bf0ed8475d3432411bff56d57c008c104f47
|
refs/heads/master
| 2021-09-04T13:22:08.375132
| 2018-01-19T04:48:27
| 2018-01-19T04:48:27
| 118,077,909
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,391
|
java
|
/**
* Copyright © 2012-2016 邯郸市众翔信息科技有限公司 All rights reserved.
*/
package com.zx.platform.common.utils;
/**
* @author wanye
* @date Dec 14, 2008
* @version v 1.0
* @description 得到当前应用的系统路径
*/
public class SystemPath {
public static String getSysPath() {
String path = Thread.currentThread().getContextClassLoader()
.getResource("").toString();
String temp = path.replaceFirst("file:/", "").replaceFirst(
"WEB-INF/classes/", "");
String separator = System.getProperty("file.separator");
String resultPath = temp.replaceAll("/", separator + separator);
return resultPath;
}
public static String getClassPath() {
String path = Thread.currentThread().getContextClassLoader()
.getResource("").toString();
String temp = path.replaceFirst("file:/", "");
String separator = System.getProperty("file.separator");
String resultPath = temp.replaceAll("/", separator + separator);
return resultPath;
}
public static String getSystempPath() {
return System.getProperty("java.io.tmpdir");
}
public static String getSeparator() {
return System.getProperty("file.separator");
}
public static void main(String[] args) {
System.out.println(getSysPath());
System.out.println(System.getProperty("java.io.tmpdir"));
System.out.println(getSeparator());
System.out.println(getClassPath());
}
}
|
[
"[email protected]"
] | |
10a22cd120ff2103fe990e2c25943ba359e60edb
|
e6fa3964d7f41ae579cb1c93546e4a76c30cd914
|
/taobao-sdk-java-auto_1479188381469-20210114-source/DingTalk/com/dingtalk/api/response/CorpMessageCorpconversationSendmockResponse.java
|
5fb1025d4eb904feb707aef1b2cf051a9f4d9507
|
[] |
no_license
|
devops-utils/dingtalk-sdk-java
|
14c4eb565dc605e6a7469ea0a00416567278846d
|
6381d0a22fdc948cba20fa0fc88c5818742177b7
|
refs/heads/master
| 2023-02-17T04:46:14.429121
| 2021-01-14T03:41:39
| 2021-01-14T03:41:39
| 329,497,955
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 621
|
java
|
package com.dingtalk.api.response;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.TaobaoResponse;
/**
* TOP DingTalk-API: dingtalk.corp.message.corpconversation.sendmock response.
*
* @author top auto create
* @since 1.0, null
*/
public class CorpMessageCorpconversationSendmockResponse extends TaobaoResponse {
private static final long serialVersionUID = 3322569243433879716L;
/**
* 返回结果
*/
@ApiField("result")
private String result;
public void setResult(String result) {
this.result = result;
}
public String getResult( ) {
return this.result;
}
}
|
[
"[email protected]"
] | |
a640bcb2bd78c9eb9c94ab0d2ad30c8e145ab322
|
2bc2eadc9b0f70d6d1286ef474902466988a880f
|
/tags/mule-1.4.0/transports/vm/src/main/java/org/mule/providers/vm/VMConnector.java
|
bb3f376e1fe96bb190bdf8ebd02de584e6742d44
|
[] |
no_license
|
OrgSmells/codehaus-mule-git
|
085434a4b7781a5def2b9b4e37396081eaeba394
|
f8584627c7acb13efdf3276396015439ea6a0721
|
refs/heads/master
| 2022-12-24T07:33:30.190368
| 2020-02-27T19:10:29
| 2020-02-27T19:10:29
| 243,593,543
| 0
| 0
| null | 2022-12-15T23:30:00
| 2020-02-27T18:56:48
| null |
UTF-8
|
Java
| false
| false
| 7,992
|
java
|
/*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the MuleSource MPL
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.providers.vm;
import org.mule.MuleManager;
import org.mule.config.QueueProfile;
import org.mule.config.i18n.Message;
import org.mule.config.i18n.Messages;
import org.mule.impl.MuleMessage;
import org.mule.impl.endpoint.MuleEndpointURI;
import org.mule.providers.AbstractConnector;
import org.mule.routing.filters.WildcardFilter;
import org.mule.transaction.TransactionCoordination;
import org.mule.umo.MessagingException;
import org.mule.umo.TransactionException;
import org.mule.umo.UMOComponent;
import org.mule.umo.UMOException;
import org.mule.umo.UMOTransaction;
import org.mule.umo.endpoint.EndpointException;
import org.mule.umo.endpoint.UMOEndpoint;
import org.mule.umo.endpoint.UMOEndpointURI;
import org.mule.umo.lifecycle.InitialisationException;
import org.mule.umo.provider.MessageTypeNotSupportedException;
import org.mule.umo.provider.UMOMessageAdapter;
import org.mule.umo.provider.UMOMessageReceiver;
import org.mule.util.ClassUtils;
import org.mule.util.queue.QueueManager;
import org.mule.util.queue.QueueSession;
import java.util.Iterator;
/**
* <code>VMConnector</code> is a simple endpoint wrapper to allow a Mule component
* to be accessed from an endpoint
*/
public class VMConnector extends AbstractConnector
{
private boolean queueEvents = false;
private QueueProfile queueProfile;
private Class adapterClass = null;
private int queueTimeout = 1000;
/*
* (non-Javadoc)
*
* @see org.mule.providers.AbstractConnector#create()
*/
protected void doInitialise() throws InitialisationException
{
if (queueEvents)
{
if (queueProfile == null)
{
queueProfile = MuleManager.getConfiguration().getQueueProfile();
}
}
try
{
adapterClass = ClassUtils.loadClass(serviceDescriptor.getMessageAdapter(), getClass());
}
catch (ClassNotFoundException e)
{
throw new InitialisationException(new Message(Messages.FAILED_LOAD_X,
"Message Adapter: " + serviceDescriptor.getMessageAdapter()), e);
}
}
protected void doDispose()
{
// template method
}
protected void doConnect() throws Exception
{
// template method
}
protected void doDisconnect() throws Exception
{
// template method
}
protected void doStart() throws UMOException
{
// template method
}
protected void doStop() throws UMOException
{
// template method
}
/*
* (non-Javadoc)
*
* @see org.mule.umo.provider.UMOConnector#registerListener(org.mule.umo.UMOSession,
* org.mule.umo.endpoint.UMOEndpoint)
*/
public UMOMessageReceiver createReceiver(UMOComponent component, UMOEndpoint endpoint) throws Exception
{
if (queueEvents)
{
queueProfile.configureQueue(endpoint.getEndpointURI().getAddress());
}
return serviceDescriptor.createMessageReceiver(this, component, endpoint);
}
/*
* (non-Javadoc)
*
* @see org.mule.umo.provider.UMOConnector#getMessageAdapter(java.lang.Object)
*/
public UMOMessageAdapter getMessageAdapter(Object message) throws MessagingException
{
if (message == null)
{
throw new MessageTypeNotSupportedException(null, adapterClass);
}
else if (message instanceof MuleMessage)
{
return ((MuleMessage)message).getAdapter();
}
else if (message instanceof UMOMessageAdapter)
{
return (UMOMessageAdapter)message;
}
else
{
throw new MessageTypeNotSupportedException(message, adapterClass);
}
}
/*
* (non-Javadoc)
*
* @see org.mule.umo.provider.UMOConnector#getProtocol()
*/
public String getProtocol()
{
return "VM";
}
public boolean isQueueEvents()
{
return queueEvents;
}
public void setQueueEvents(boolean queueEvents)
{
this.queueEvents = queueEvents;
}
public QueueProfile getQueueProfile()
{
return queueProfile;
}
public void setQueueProfile(QueueProfile queueProfile)
{
this.queueProfile = queueProfile;
}
VMMessageReceiver getReceiver(UMOEndpointURI endpointUri) throws EndpointException
{
return (VMMessageReceiver)getReceiverByEndpoint(endpointUri);
}
QueueSession getQueueSession() throws InitialisationException
{
QueueManager qm = MuleManager.getInstance().getQueueManager();
UMOTransaction tx = TransactionCoordination.getInstance().getTransaction();
if (tx != null)
{
if (tx.hasResource(qm))
{
if (logger.isTraceEnabled())
{
logger.trace("Retrieving queue session from current transaction");
}
return (QueueSession)tx.getResource(qm);
}
}
if (logger.isTraceEnabled())
{
logger.trace("Retrieving new queue session from queue manager");
}
QueueSession session = qm.getQueueSession();
if (tx != null)
{
logger.debug("Binding queue session to current transaction");
try
{
tx.bindResource(qm, session);
}
catch (TransactionException e)
{
throw new RuntimeException("Could not bind queue session to current transaction", e);
}
}
return session;
}
protected UMOMessageReceiver getReceiverByEndpoint(UMOEndpointURI endpointUri) throws EndpointException
{
if (logger.isDebugEnabled())
{
logger.debug("Looking up vm receiver for address: " + endpointUri.toString());
}
UMOMessageReceiver receiver;
// If we have an exact match, use it
receiver = (UMOMessageReceiver)receivers.get(endpointUri.getAddress());
if (receiver != null)
{
if (logger.isDebugEnabled())
{
logger.debug("Found exact receiver match on endpointUri: " + endpointUri);
}
return receiver;
}
// otherwise check each one against a wildcard match
for (Iterator iterator = receivers.values().iterator(); iterator.hasNext();)
{
receiver = (UMOMessageReceiver)iterator.next();
String filterAddress = receiver.getEndpointURI().getAddress();
WildcardFilter filter = new WildcardFilter(filterAddress);
if (filter.accept(endpointUri.getAddress()))
{
receiver.getEndpoint().setEndpointURI(new MuleEndpointURI(endpointUri, filterAddress));
if (logger.isDebugEnabled())
{
logger.debug("Found receiver match on endpointUri: " + receiver.getEndpointURI()
+ " against " + endpointUri);
}
return receiver;
}
}
if (logger.isDebugEnabled())
{
logger.debug("No receiver found for endpointUri: " + endpointUri);
}
return null;
}
// @Override
public boolean isRemoteSyncEnabled()
{
return true;
}
public int getQueueTimeout()
{
return queueTimeout;
}
public void setQueueTimeout(int queueTimeout)
{
this.queueTimeout = queueTimeout;
}
}
|
[
"dirk.olmes@bf997673-6b11-0410-b953-e057580c5b09"
] |
dirk.olmes@bf997673-6b11-0410-b953-e057580c5b09
|
6545341805b0b727d201fa5bf3afb6b692605577
|
726218fea47b14fee05130b91771c0f0fb205122
|
/src/net/jotwiki/ctrl/AdminFileManager.java
|
8e36e5e68a8b5c8767d26ef5a3c05b1fbca7f81b
|
[] |
no_license
|
tcolar/JotWiki
|
eae382df4fc1e8424284e9121abbeb2762af4022
|
ed7f763ada00c25083c4a8c39162b91e7779d219
|
refs/heads/master
| 2021-01-01T06:33:28.546609
| 2013-09-06T03:56:16
| 2013-09-06T03:56:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,857
|
java
|
/**
------------------------------------
JOTWiki Thibaut Colar
tcolar-wiki AT colar DOT net
Licence at http://www.jotwiki.net
------------------------------------
*/
package net.jotwiki.ctrl;
import java.io.File;
import net.jot.web.filebrowser.JOTFileBrowserController;
import net.jot.web.filebrowser.JOTFileBrowserHelper;
import net.jot.web.filebrowser.JOTFileBrowserSession;
import net.jotwiki.WikiPreferences;
import net.jotwiki.db.WikiPermission;
/**
* This is an extension to the standard JOTFileBrowserController
* Customize for the Wiki Admin user with extra functionnality
* such as browse all files, delete, view all etc...
* @author tcolar
*/
public class AdminFileManager extends JOTFileBrowserController
{
/**
* Provides all the 'Admin' permissions
* @return
*/
public JOTFileBrowserSession createFbSession()
{
String rootFolder=WikiPreferences.getInstance().getDataFolder();
String startFolder=rootFolder;
JOTFileBrowserSession fbSession=new JOTFileBrowserSession(new File(rootFolder), new File(startFolder),JOTFileBrowserHelper.TYPE_BROWSE);
fbSession.setTitle("Administrator File Manager");
fbSession.setNbOfUploadFields(5);
fbSession.setMaxUploadSize(50000000);//50MB
fbSession.setAllowCreateFolders(true);
fbSession.setAllowUploadFile(true);
fbSession.setAllowDelete(true);
fbSession.setAllowDeleteFilledFolders(true);
fbSession.setAllowListHiddenFiles(true);
fbSession.setAllowPickRootFolder(true);
fbSession.setAllowRenaming(true);
fbSession.setAllowUpdateFile(true);
fbSession.setAllowDownloadFile(true);
fbSession.setAllowBrowsing(true);
fbSession.setAllowListFiles(true);
return fbSession;
}
public boolean validatePermissions()
{
return WikiPermission.hasPermission(request, WikiPermission.MANAGE_FILES);
}
}
|
[
"devnull@localhost"
] |
devnull@localhost
|
9b120acd0b0494688566c61a5a0ab2933c626e1b
|
4da340a6db0eb1d845fec6aaf6b75a6871987eea
|
/org.adichatz.generator/src/generator/org/adichatz/generator/xjc/ManagedToolBarType.java
|
e9b4b5819956cb8b5013a5f35e188ca210185897
|
[] |
no_license
|
YvesDrumbonnet/Adichatz-RCP-Eclipse
|
107bbf784407a6167729e9ed82c5546f3f8e3b5d
|
359c430f6daec55cab93a63d08c669fcd05dea84
|
refs/heads/master
| 2023-08-26T02:06:25.194503
| 2020-04-28T15:49:51
| 2020-04-28T15:49:51
| 256,515,394
| 0
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 3,118
|
java
|
//
// Ce fichier a été généré par l'implémentation de référence JavaTM Architecture for XML Binding (JAXB), v2.2.8-b130911.1802
// Voir <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Toute modification apportée à ce fichier sera perdue lors de la recompilation du schéma source.
// Généré le : 2020.01.22 à 11:02:17 AM CET
//
package org.adichatz.generator.xjc;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Classe Java pour managedToolBarType complex type.
*
* <p>Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe.
*
* <pre>
* <complexType name="managedToolBarType">
* <complexContent>
* <extension base="{}collectionType">
* <choice maxOccurs="unbounded" minOccurs="0">
* <element name="action" type="{}actionType"/>
* <element name="menuAction" type="{}menuActionType"/>
* <element name="separator" type="{}separatorType"/>
* </choice>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(factoryClass=WrapperFactory.class, factoryMethod="getManagedToolBarType", name = "managedToolBarType", propOrder = {
"actionOrMenuActionOrSeparator"
})
public class ManagedToolBarType
extends CollectionType
implements Serializable
{
private final static long serialVersionUID = 1L;
@XmlElements({
@XmlElement(name = "action", type = ActionType.class),
@XmlElement(name = "menuAction", type = MenuActionType.class),
@XmlElement(name = "separator", type = SeparatorType.class)
})
protected List<WidgetType> actionOrMenuActionOrSeparator;
/**
* Gets the value of the actionOrMenuActionOrSeparator property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the actionOrMenuActionOrSeparator property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getActionOrMenuActionOrSeparator().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ActionType }
* {@link MenuActionType }
* {@link SeparatorType }
*
*
*/
public List<WidgetType> getActionOrMenuActionOrSeparator() {
if (actionOrMenuActionOrSeparator == null) {
actionOrMenuActionOrSeparator = new ArrayList<WidgetType>();
}
return this.actionOrMenuActionOrSeparator;
}
}
|
[
"[email protected]"
] | |
2755dd4fbe8af5d574bf06604942f5761ee3abde
|
b6df476e8845c59d1a6f7e833cb3d6ba8b2f577d
|
/trade-rws-flow/src/test/java/com/midea/trade/rws/service/MShopService.java
|
ce67c0fdfa7826bb05018ab454129359b9143f07
|
[] |
no_license
|
chenjy16/xudanrw
|
e76a5975bda9b6aeeb6e646c86d0f75372512c4c
|
0e36093a195bd274ca99fd12d0806fe0e9311002
|
refs/heads/master
| 2021-01-09T20:52:30.468643
| 2018-03-26T02:22:42
| 2018-03-26T02:22:42
| 59,792,535
| 10
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 216
|
java
|
package com.midea.trade.rws.service;
public interface MShopService {
public void insert()throws Exception;
public void select();
public void update();
public void delete();
}
|
[
"[email protected]"
] | |
2e64b8f3e266d4587a3268faedaf193315a80061
|
f1bff65d5315eae7bfb2eb78a113a5d4f9e6bd2a
|
/springboot-rabbitmq-producer/src/test/java/ProducerTest.java
|
87594afcdf342134ac107f32798cfbaa3eb696f8
|
[] |
no_license
|
keepli/rabbitMQ
|
318e2b7bcf377f527d11a0fcc9d0999ac03a765d
|
4edb41926aeb22c517aa7b0d322950dcd194f454
|
refs/heads/master
| 2022-12-28T22:22:38.377093
| 2020-09-24T13:07:08
| 2020-09-24T13:07:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,492
|
java
|
import cn.itcast.ProducerApplication;
import cn.itcast.rabbitmq.drict.RabbitMQDirect;
import cn.itcast.rabbitmq.fanout.RabbitMQFanout;
import cn.itcast.rabbitmq.topic.RabbitMQTopic;
import cn.itcast.rabbitmq.smiple.RabbitMQSimple;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@SpringBootTest(classes = ProducerApplication.class)
@RunWith ( SpringRunner.class )
public class ProducerTest {
@Autowired
private RabbitTemplate rabbitTemplate;
@Test
public void send(){
rabbitTemplate.convertAndSend ( "", RabbitMQSimple.Queue_NAME,"简单模式!" );
}
@Test
public void sendTopic(){
rabbitTemplate.convertAndSend ( RabbitMQTopic.EXCHANGE_NAME,"itcast.good","Topic模式 itcast!" );
rabbitTemplate.convertAndSend ( RabbitMQTopic.EXCHANGE_NAME,"good.good","Topic模式 good!" );
}
@Test
public void sendFanout(){
rabbitTemplate.convertAndSend ( RabbitMQFanout.EXCHANGE_NAME,"","Fanout模式!" );
}
@Test
public void sendDirect(){
rabbitTemplate.convertAndSend ( RabbitMQDirect.EXCHANGE_NAME,"error","Direct模式 error!" );
rabbitTemplate.convertAndSend ( RabbitMQDirect.EXCHANGE_NAME,"info","Direct模式 info!" );
}
}
|
[
"[email protected]"
] | |
c5ddb782530794f1b08b831dec3da74b279b164b
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/8/8_34f0ac7b4aab1f81f1f7d5486f2ba9fb57527dea/EmbeddedEventVector/8_34f0ac7b4aab1f81f1f7d5486f2ba9fb57527dea_EmbeddedEventVector_s.java
|
60d7df6fb2ecfaab5c37f78a334d3a1c4d6c735f
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,204
|
java
|
package edu.sc.seis.sod.process.waveform.vector;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import edu.iris.Fissures.IfEvent.EventAccessOperations;
import edu.iris.Fissures.IfNetwork.Channel;
import edu.iris.Fissures.IfSeismogramDC.RequestFilter;
import edu.iris.Fissures.seismogramDC.LocalSeismogramImpl;
import edu.sc.seis.sod.ChannelGroup;
import edu.sc.seis.sod.ConfigurationException;
import edu.sc.seis.sod.CookieJar;
import edu.sc.seis.sod.SodUtil;
import edu.sc.seis.sod.status.StringTree;
import edu.sc.seis.sod.status.StringTreeBranch;
import edu.sc.seis.sod.status.StringTreeLeaf;
import edu.sc.seis.sod.subsetter.eventChannel.vector.EventVectorSubsetter;
import edu.sc.seis.sod.subsetter.eventStation.EventStationSubsetter;
/**
* @author crotwell
* Created on Oct 23, 2005
*/
public class EmbeddedEventVector implements WaveformVectorProcess {
public EmbeddedEventVector(Element config) throws ConfigurationException{
NodeList childNodes = config.getChildNodes();
for(int counter = 0; counter < childNodes.getLength(); counter++) {
Node node = childNodes.item(counter);
if(node instanceof Element) {
eventVector =
(EventVectorSubsetter) SodUtil.load((Element)node, "eventVector");
break;
}
}
}
EventVectorSubsetter eventVector;
public WaveformVectorResult process(EventAccessOperations event,
ChannelGroup channelGroup,
RequestFilter[][] original,
RequestFilter[][] available,
LocalSeismogramImpl[][] seismograms,
CookieJar cookieJar) throws Exception {
StringTree wrapped = eventVector.accept(event, channelGroup, cookieJar);
WaveformVectorResult result = new WaveformVectorResult(seismograms,
new StringTreeBranch(this, wrapped.isSuccess(), wrapped));
return result;
}
}
|
[
"[email protected]"
] | |
9dd21eefa317573776276caef80b4e5234f83c8b
|
b7f63b75dc0513791f8ffdb790be05caad0b7483
|
/src/main/java/org/brackit/xquery/expr/NodeCmpExpr.java
|
ebb969a5581c51b45a85e9fefd1e92dcee6a7022
|
[
"BSD-3-Clause"
] |
permissive
|
sebbae/brackit
|
69e13a3f54895f95b232dadd630265f70b38476a
|
c41c020f630f717ffcca0003d436014e2bbb383b
|
refs/heads/master
| 2020-12-04T00:05:32.271888
| 2018-05-01T23:12:32
| 2018-05-01T23:12:32
| 65,936,031
| 11
| 9
| null | 2018-05-01T23:07:07
| 2016-08-17T19:29:16
|
Java
|
UTF-8
|
Java
| false
| false
| 4,043
|
java
|
/*
* [New BSD License]
* Copyright (c) 2011-2012, Brackit Project Team <[email protected]>
* 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 Brackit Project Team 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 HOLDER 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.
*/
package org.brackit.xquery.expr;
import org.brackit.xquery.ErrorCode;
import org.brackit.xquery.QueryContext;
import org.brackit.xquery.QueryException;
import org.brackit.xquery.Tuple;
import org.brackit.xquery.atomic.Bool;
import org.brackit.xquery.xdm.Expr;
import org.brackit.xquery.xdm.Item;
import org.brackit.xquery.xdm.Node;
import org.brackit.xquery.xdm.Sequence;
/**
*
* @author Sebastian Baechle
*
*/
public class NodeCmpExpr implements Expr {
public enum NodeCmp {
is {
@Override
public Bool compare(QueryContext ctx, Node<?> left, Node<?> right)
throws QueryException {
return left.equals(right) ? Bool.TRUE : Bool.FALSE;
}
},
preceding {
@Override
public Bool compare(QueryContext ctx, Node<?> left, Node<?> right)
throws QueryException {
return left.isPrecedingOf(right) ? Bool.TRUE : Bool.FALSE;
}
},
following {
@Override
public Bool compare(QueryContext ctx, Node<?> left, Node<?> right)
throws QueryException {
return left.isFollowingOf(right) ? Bool.TRUE : Bool.FALSE;
}
};
public abstract Bool compare(QueryContext ctx, Node<?> left,
Node<?> right) throws QueryException;
}
protected final NodeCmp nodeCmp;
protected final Expr leftExpr;
protected final Expr rightExpr;
public NodeCmpExpr(NodeCmp nodeCmp, Expr leftExpr, Expr rightExpr) {
this.nodeCmp = nodeCmp;
this.leftExpr = leftExpr;
this.rightExpr = rightExpr;
}
@Override
public final Sequence evaluate(QueryContext ctx, Tuple tuple)
throws QueryException {
return evaluateToItem(ctx, tuple);
}
public Item evaluateToItem(QueryContext ctx, Tuple tuple)
throws QueryException {
Item left = leftExpr.evaluateToItem(ctx, tuple);
Item right = rightExpr.evaluateToItem(ctx, tuple);
if ((left == null) || (right == null)) {
return null;
}
if (!(left instanceof Node<?>)) {
throw new QueryException(ErrorCode.ERR_TYPE_INAPPROPRIATE_TYPE,
"Left argument is not a node: %s", left);
}
if (!(right instanceof Node<?>)) {
throw new QueryException(ErrorCode.ERR_TYPE_INAPPROPRIATE_TYPE,
"right argument is not a node: %s", right);
}
return nodeCmp.compare(ctx, (Node<?>) left, (Node<?>) right);
}
@Override
public boolean isUpdating() {
return ((leftExpr.isUpdating()) || (rightExpr.isUpdating()));
}
@Override
public boolean isVacuous() {
return false;
}
}
|
[
"devnull@localhost"
] |
devnull@localhost
|
6b797a57b6264f5df18505d2227694e424824aae
|
961016a614c6785e6fe8f6bfd7214676f0d91064
|
/Portlets/ProgateServiceBuilder-portlet/docroot/WEB-INF/service/larion/progate/service/persistence/ProgateOrganizationsStaffsFinderUtil.java
|
0243e6571811d959dbc6a0b5191242cd435d1a90
|
[] |
no_license
|
thaond/progate-lmis
|
f58c447c58c11217e2247c7ca3349a44ad7f3bbd
|
d143b7e7d56a22cc9ce6256ca6fb77a11459e6d6
|
refs/heads/master
| 2021-01-10T03:00:26.888869
| 2011-07-28T14:12:54
| 2011-07-28T14:12:54
| 44,992,742
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,380
|
java
|
/**
* Copyright (c) 2000-2009 Liferay, Inc. 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 larion.progate.service.persistence;
/**
* <a href="ProgateOrganizationsStaffsFinderUtil.java.html"><b><i>View Source</i></b></a>
*
* @author Brian Wing Shun Chan
*
*/
public class ProgateOrganizationsStaffsFinderUtil {
public static java.util.List<larion.progate.model.ProgateOrganizationsStaffs> getEmployeeInformations(
int rootId, int userId) throws com.liferay.portal.SystemException {
return getFinder().getEmployeeInformations(rootId, userId);
}
public static java.util.List<larion.progate.model.ProgateOrganizationsStaffs> getEmployeesInPermissions(
int rootId, int orgId)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException {
return getFinder().getEmployeesInPermissions(rootId, orgId);
}
public static java.util.List<larion.progate.model.ProgateOrganizationsStaffs> getBODInCompany(
int rootId)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException {
return getFinder().getBODInCompany(rootId);
}
public static ProgateOrganizationsStaffsFinder getFinder() {
return _finder;
}
public void setFinder(ProgateOrganizationsStaffsFinder finder) {
_finder = finder;
}
private static ProgateOrganizationsStaffsFinder _finder;
}
|
[
"[email protected]"
] | |
225271d1d10aab70bfb811f94f5d75bea41a6f79
|
c8e2e555c28ea54183bd06096eb0dff8c041abcb
|
/src/main/java/com/netsdk/lib/enumeration/CFG_EM_FACE_SNAP_POLICY.java
|
b3491dc6cc6bdbb0d9fabcc3ca202efdcc4e8834
|
[] |
no_license
|
STAR-ZQ/dahua
|
b2a1777a46589a39cc136d995e4947c554a3c44d
|
6ae7065f729897f4557a25ee664ab402dae68236
|
refs/heads/master
| 2023-06-29T03:26:42.679160
| 2021-07-31T09:17:04
| 2021-07-31T09:17:04
| 386,193,125
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,340
|
java
|
package com.netsdk.lib.enumeration;
/**
* @author 251823
* @description 人体检测及人体识别支持的脸部抓拍策略(定制)
* @date 2021/01/11
*/
public enum CFG_EM_FACE_SNAP_POLICY {
// 未知
CFG_EM_FACE_SNAP_POLICY_UNKNOWN(0, "未知"),
// 实时抓拍模式(当前的通用模式,实时性优先)
CFG_EM_FACE_SNAP_POLICY_REALTIME(1, "实时抓拍模式"),
// 优选抓拍模式,在设定的延时区间(OptimalTime)内挑选评分最高的抓图,准确性优先但延时较大
CFG_EM_FACE_SNAP_POLICY_OPTIMAL(2, "优选抓拍模式"),
// 质量抓拍模式,在Optimal的基础上,如果图片质量好于阈值提前结束优选,提高实时性
CFG_EM_FACE_SNAP_POLICY_QUALITY(3, "质量抓拍模式"),
// 识别优先抓拍模式,在优选时间内,以一定间隔帧数多次进行比对;一旦比对成功则立即结束优选,以提高对比成功率,取代质量优先模式
CFG_EM_FACE_SNAP_POLICY_RECOGNITION(4, "识别优先抓拍模式"),
// 快速优选,从检测到人脸/人体开始,抓拍一定帧数内的质量最好的人脸或人体,定制
CFG_EM_FACE_SNAP_POLICY_QUICK(5, "快速优选"),
// 全程优选,抓拍全程质量最好的人脸人体,定制
CFG_EM_FACE_SNAP_POLICY_FULLTRACK(6, "全程优选"),
// 间隔抓拍,定制
CFG_EM_FACE_SNAP_POLICY_INTERVAL(7, "间隔抓拍"),
// 单人模式,常用于门禁,定制
CFG_EM_FACE_SNAP_POLICY_SINGLE(8, "单人模式"),
// 高精度模式,增强人脸识别,定制,增强人脸识别,定制
CFG_EM_FACE_SNAP_POLICY_PRECISION(9, "高精度模式");
private int value;
private String note;
private CFG_EM_FACE_SNAP_POLICY(int givenValue, String note) {
this.value = givenValue;
this.note = note;
}
public String getNote() {
return note;
}
public int getValue() {
return value;
}
public static String getNoteByValue(int givenValue) {
for (CFG_EM_FACE_SNAP_POLICY enumType : CFG_EM_FACE_SNAP_POLICY.values()) {
if (givenValue == enumType.getValue()) {
return enumType.getNote();
}
}
return null;
}
public static int getValueByNote(String givenNote) {
for (CFG_EM_FACE_SNAP_POLICY enumType : CFG_EM_FACE_SNAP_POLICY.values()) {
if (givenNote.equals(enumType.getNote())) {
return enumType.getValue();
}
}
return -1;
}
}
|
[
"[email protected]"
] | |
8f1c1765c0849346392dc87b325fa4cfebac558b
|
5f82aae041ab05a5e6c3d9ddd8319506191ab055
|
/Projects/Math/37/src/test/java/org/apache/commons/math/ode/nonstiff/GillStepInterpolatorTest.java
|
fdf27dfd45093e27fcdac8b76e3350af611ad669
|
[] |
no_license
|
lingming/prapr_data
|
e9ddabdf971451d46f1ef2cdbee15ce342a6f9dc
|
be9ababc95df45fd66574c6af01122ed9df3db5d
|
refs/heads/master
| 2023-08-14T20:36:23.459190
| 2021-10-17T13:49:39
| 2021-10-17T13:49:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,326
|
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.commons.math.ode.nonstiff;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.Random;
import org.apache.commons.math.ode.ContinuousOutputModel;
import org.apache.commons.math.ode.TestProblem3;
import org.apache.commons.math.ode.sampling.StepHandler;
import org.apache.commons.math.ode.sampling.StepInterpolatorTestUtils;
import org.junit.Assert;
import org.junit.Test;
public class GillStepInterpolatorTest {
@Test
public void testDerivativesConsistency()
{
TestProblem3 pb = new TestProblem3();
double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.001;
GillIntegrator integ = new GillIntegrator(step);
StepInterpolatorTestUtils.checkDerivativesConsistency(integ, pb, 1.0e-10);
}
@Test
public void serialization()
throws IOException, ClassNotFoundException {
TestProblem3 pb = new TestProblem3(0.9);
double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.0003;
GillIntegrator integ = new GillIntegrator(step);
integ.addStepHandler(new ContinuousOutputModel());
integ.integrate(pb,
pb.getInitialTime(), pb.getInitialState(),
pb.getFinalTime(), new double[pb.getDimension()]);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
for (StepHandler handler : integ.getStepHandlers()) {
oos.writeObject(handler);
}
Assert.assertTrue(bos.size () > 880000);
Assert.assertTrue(bos.size () < 900000);
ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
ObjectInputStream ois = new ObjectInputStream(bis);
ContinuousOutputModel cm = (ContinuousOutputModel) ois.readObject();
Random random = new Random(347588535632l);
double maxError = 0.0;
for (int i = 0; i < 1000; ++i) {
double r = random.nextDouble();
double time = r * pb.getInitialTime() + (1.0 - r) * pb.getFinalTime();
cm.setInterpolatedTime(time);
double[] interpolatedY = cm.getInterpolatedState ();
double[] theoreticalY = pb.computeTheoreticalState(time);
double dx = interpolatedY[0] - theoreticalY[0];
double dy = interpolatedY[1] - theoreticalY[1];
double error = dx * dx + dy * dy;
if (error > maxError) {
maxError = error;
}
}
Assert.assertTrue(maxError < 0.003);
}
}
|
[
"[email protected]"
] | |
ffbf724f8226f7b4ac3c9b9ab856a1f266c15cab
|
3b91ed788572b6d5ac4db1bee814a74560603578
|
/com/tencent/mm/plugin/remittance/bankcard/model/a.java
|
5cdf73845afb897f9c914462077510c40a519733
|
[] |
no_license
|
linsir6/WeChat_java
|
a1deee3035b555fb35a423f367eb5e3e58a17cb0
|
32e52b88c012051100315af6751111bfb6697a29
|
refs/heads/master
| 2020-05-31T05:40:17.161282
| 2018-08-28T02:07:02
| 2018-08-28T02:07:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,938
|
java
|
package com.tencent.mm.plugin.remittance.bankcard.model;
import com.tencent.mm.platformtools.SpellMap;
import com.tencent.mm.sdk.platformtools.bi;
import com.tencent.mm.sdk.platformtools.x;
import java.math.BigDecimal;
public final class a {
public static long ek(String str, String str2) {
try {
return new BigDecimal(bi.getDouble(str.trim(), 0.0d) == 0.0d ? "0" : str.trim()).divide(new BigDecimal(str2.trim()), 0, 4).longValue();
} catch (Throwable e) {
x.printErrStackTrace("MicroMsg.BankRemitUtil", e, "", new Object[0]);
return 0;
}
}
public static double el(String str, String str2) {
try {
return new BigDecimal(bi.getDouble(str.trim(), 0.0d) == 0.0d ? "0" : str.trim()).divide(new BigDecimal(str2.trim()), 2, 4).doubleValue();
} catch (Throwable e) {
x.printErrStackTrace("MicroMsg.BankRemitUtil", e, "", new Object[0]);
return 0.0d;
}
}
public static double em(String str, String str2) {
try {
double d = bi.getDouble(str, 0.0d);
double d2 = bi.getDouble(str2, 0.0d);
if (d == 0.0d) {
str = "0";
}
BigDecimal bigDecimal = new BigDecimal(str);
if (d2 == 0.0d) {
str2 = "0";
}
return bigDecimal.multiply(new BigDecimal(str2)).doubleValue();
} catch (Throwable e) {
x.printErrStackTrace("MicroMsg.BankRemitUtil", e, "", new Object[0]);
return 0.0d;
}
}
public static double vp(int i) {
return el(String.valueOf(i), "100");
}
public static char Kv(String str) {
String g = SpellMap.g(str.charAt(0));
x.d("MicroMsg.BankRemitUtil", "pinyin: %s", new Object[]{g});
if (bi.oW(g)) {
return '#';
}
return g.toUpperCase().charAt(0);
}
}
|
[
"[email protected]"
] | |
4376f971b82fa474a97d84ea134a43c565c8df7f
|
781e2692049e87a4256320c76e82a19be257a05d
|
/all_data/cs61bl/lab17/cs61bl-ix/MyTreeMap.java
|
b530e04c48123fe03b7b7b086965af5822d55718
|
[] |
no_license
|
itsolutionscorp/AutoStyle-Clustering
|
54bde86fe6dbad35b568b38cfcb14c5ffaab51b0
|
be0e2f635a7558f56c61bc0b36c6146b01d1e6e6
|
refs/heads/master
| 2020-12-11T07:27:19.291038
| 2016-03-16T03:18:00
| 2016-03-16T03:18:42
| 59,454,921
| 4
| 0
| null | 2016-05-23T05:40:56
| 2016-05-23T05:40:56
| null |
UTF-8
|
Java
| false
| false
| 2,763
|
java
|
/* The "extends Comparable<K>" syntax just means that whatever K you use, it has to implement Comparable.
* Makes sense, right? Otherwise there would be no way to tell whether it should go on
* the left or right branch of the tree.
*/
public class MyTreeMap<K extends Comparable<K>, V> {
private int size; // the number of items that have been put into the map
// TODO You may declare new instance variables here
private BinarySearchTree<KVPair> tree;
/**
* Constructs an empty map.
*/
public MyTreeMap() {
// TODO Complete this!
tree = new BinarySearchTree<KVPair>();
size = 0;
}
/**
* Returns the number of items put into the map (and not subsequently
* removed).
*/
public int size() {
return size;
}
/**
* Returns whether the map contains the given key.
*/
public boolean containsKey(K key) {
// TODO Complete this!
return tree.contains(new KVPair(key, null));
}
/**
* Puts the key in the map with the given value. If the key is already in
* the map, replaces the value.
*
* Returns the previous value associated with the key, or null if there was
* no such value.
*/
public V put(K key, V value) {
// TODO Complete this!
V temp;
if(tree.contains(new KVPair(key, value))){
temp = tree.get(new KVPair(key, value)).value;}
else{
temp = null;
}
tree.add(new KVPair(key, value));
return temp;
}
/**
* Removes the key from the map.
*
* Returns the value associated with the key, or null if there was no key.
*/
public V remove(K key) {
// TODO Complete this!
V temp = tree.get(new KVPair(key,null)).value;
tree.delete(new KVPair(key, null));
return temp;
}
/**
* Returns the value associated with the key in the map, or null if there is
* no such value.
*/
public V get(K key) {
// TODO Complete this!
return tree.get(new KVPair(key, null)).value;
}
/**
* A class that can store a key and a value together. You can modify this
* class however you want.
*/
private class KVPair implements Comparable<KVPair>{
private K key;
private V value;
public KVPair(K k, V v) {
key = k;
value = v;
}
public void setValue(V v) {
value = v;
}
public int compareTo(KVPair O){
return key.compareTo(O.key);
}
}
public static void main(String[] args){
MyTreeMap<String, Integer> a = new MyTreeMap();
a.put("A", new Integer(1));
a.put("B", new Integer(2));
a.put("C", new Integer(3));
a.put("D", new Integer(4));
System.out.println(a.put("A", new Integer(2)));
System.out.println(a.containsKey("A"));
System.out.println(a.get("A"));
System.out.println(a.remove("D"));
}
}
|
[
"[email protected]"
] | |
d05159e6a98088cf190c8b9935c40eea95ce0fee
|
ab8d10f02716519aadd66ecef4d0c799e15aa517
|
/src/main/java/jxl/biff/drawing/SpContainer.java
|
c178f37e20ec0e805368de9f4d0813642b62dc34
|
[] |
no_license
|
caiqiqi/EngineerMode
|
cc767ddcde7ccaf0ef15ec7ef8837a70a671b183
|
09a87a94ceb0d38b97d3fbe0e03086e9ee53a0f3
|
refs/heads/master
| 2021-08-12T07:45:06.927619
| 2017-11-14T14:54:58
| 2017-11-14T14:54:58
| 110,684,973
| 0
| 0
| null | 2017-11-14T12:02:58
| 2017-11-14T12:02:58
| null |
UTF-8
|
Java
| false
| false
| 226
|
java
|
package jxl.biff.drawing;
class SpContainer extends EscherContainer {
public SpContainer() {
super(EscherRecordType.SP_CONTAINER);
}
public SpContainer(EscherRecordData erd) {
super(erd);
}
}
|
[
"[email protected]"
] | |
5eb371dfd214c5dfd75b7c4a070a2afaeb4ad6f1
|
59385a8fb8ac9f875f68bd41ee32f50c1c719b0f
|
/app/src/main/java/com/zzu/ehome/utils/NetUtils.java
|
3b5cb6e984baabc9c0c891dba854776178f1acc9
|
[] |
no_license
|
xtfgq/ehome
|
813d3417c6520026842c72e208ad17284915ee89
|
a957f77d9e7b18d497ac9417e09ebebb7910f778
|
refs/heads/master
| 2020-06-24T19:15:52.299080
| 2017-07-04T01:29:11
| 2017-07-04T01:29:11
| 74,626,333
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,101
|
java
|
package com.zzu.ehome.utils;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.location.LocationManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Build;
import android.text.TextUtils;
import com.zzu.ehome.DemoContext;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.cookie.Cookie;
import org.apache.http.impl.client.AbstractHttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class NetUtils {
private static HttpClient httpClient = new DefaultHttpClient();
private static final String BASE_URL = "http://webim.demo.rong.io/";
/**
* 发送GET请求方法
*
* @param requestUrl 请求的URL
* @return 响应的数据
*/
public static String sendGetRequest(String requestUrl) {
HttpGet httpGet = new HttpGet(BASE_URL + requestUrl);
if (DemoContext.getInstance().getSharedPreferences() != null) {
httpGet.addHeader("cookie", DemoContext.getInstance().getSharedPreferences().getString("DEMO_COOKIE", null));
}
try {
HttpResponse response = httpClient.execute(httpGet);
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
HttpEntity entity = response.getEntity();
getCookie(httpClient);
return EntityUtils.toString(entity); // 当返回的类型为Json数据时,调用此返回方法
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* 发送post请求
*
* @param requestUrl 请求的URL
* @param params 请求的参数
* @return 响应的数据
*/
public static String sendPostRequest(String requestUrl, Map<String, String> params) {
HttpPost httpPost = new HttpPost(BASE_URL + requestUrl);
if (DemoContext.getInstance().getSharedPreferences() != null) {
httpPost.addHeader("cookie", DemoContext.getInstance().getSharedPreferences().getString("DEMO_COOKIE", null));
}
try {
if (params != null && params.size() > 0) {
List<NameValuePair> paramLists = new ArrayList<NameValuePair>();
for (Map.Entry<String, String> map : params.entrySet()) {
paramLists.add(new BasicNameValuePair(map.getKey(), map.getValue()));
}
httpPost.setEntity(new UrlEncodedFormEntity(paramLists, "UTF-8"));
}
HttpResponse response = httpClient.execute(httpPost);
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
HttpEntity entity = response.getEntity();
getCookie(httpClient);
return EntityUtils.toString(entity);
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* 获得cookie
*
* @param httpClient
*/
public static void getCookie(HttpClient httpClient) {
List<Cookie> cookies = ((AbstractHttpClient) httpClient).getCookieStore().getCookies();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < cookies.size(); i++) {
Cookie cookie = cookies.get(i);
String cookieName = cookie.getName();
String cookieValue = cookie.getValue();
if (!TextUtils.isEmpty(cookieName)
&& !TextUtils.isEmpty(cookieValue)) {
sb.append(cookieName + "=");
sb.append(cookieValue + ";");
}
}
SharedPreferences.Editor edit = DemoContext.getInstance().getSharedPreferences().edit();
edit.putString("DEMO_COOKIE", sb.toString());
edit.apply();
}
// 判断网络连接状态
public static boolean isNetworkConnected(Context context) {
if (context != null) {
ConnectivityManager mConnectivityManager = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo mNetworkInfo = mConnectivityManager
.getActiveNetworkInfo();
if (mNetworkInfo != null) {
return mNetworkInfo.isAvailable();
}
}
return false;
}
// 判断wifi状态
public static boolean isWifiConnected(Context context) {
if (context != null) {
ConnectivityManager mConnectivityManager = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo mWiFiNetworkInfo = mConnectivityManager
.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
if (mWiFiNetworkInfo != null) {
return mWiFiNetworkInfo.isAvailable();
}
}
return false;
}
// 判断移动网络
public static boolean isMobileConnected(Context context) {
if (context != null) {
ConnectivityManager mConnectivityManager = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo mMobileNetworkInfo = mConnectivityManager
.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
if (mMobileNetworkInfo != null) {
return mMobileNetworkInfo.isAvailable();
}
}
return false;
}
// 获取连接类型
public static int getConnectedType(Context context) {
if (context != null) {
ConnectivityManager mConnectivityManager = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo mNetworkInfo = mConnectivityManager
.getActiveNetworkInfo();
if (mNetworkInfo != null && mNetworkInfo.isAvailable()) {
return mNetworkInfo.getType();
}
}
return -1;
}
/**
* 设置网络
*
* @param paramContext
*/
public static void startToSettings(Context paramContext) {
if (paramContext == null)
return;
try {
if (Build.VERSION.SDK_INT > 10) {
paramContext.startActivity(new Intent(
"android.settings.SETTINGS"));
return;
}
} catch (Exception localException) {
localException.printStackTrace();
return;
}
paramContext.startActivity(new Intent(
"android.settings.WIRELESS_SETTINGS"));
}
/**
* 判断GPS是否开启,GPS或者AGPS开启一个就认为是开启的
* @param context
* @return true 表示开启
*/
public static final boolean gPSIsOPen(final Context context) {
LocationManager locationManager
= (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
// 通过GPS卫星定位,定位级别可以精确到街(通过24颗卫星定位,在室外和空旷的地方定位准确、速度快)
boolean gps = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
// 通过WLAN或移动网络(3G/2G)确定的位置(也称作AGPS,辅助GPS定位。主要用于在室内或遮盖物(建筑群或茂密的深林等)密集的地方定位)
boolean network = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
if (gps || network) {
return true;
}
return false;
}
}
|
[
"[email protected]"
] | |
a0d77d20488f667c6cd3315ffa0f1c2e4f1a7755
|
b01332bd1b0eac2adb901ce121b0ba481e82a126
|
/beike/ops-member/src/main/java/com/meitianhui/member/dao/MemberDistributionDao.java
|
6c93fbff76f60a106ff2be99678f9335bdca7c9d
|
[] |
no_license
|
xlh198593/resin
|
5783690411bd23723c27f942b9ebaa6b992c4c3b
|
9632d32feaeeac3792118269552d3ff5ba976b39
|
refs/heads/master
| 2022-12-21T00:17:43.048802
| 2019-07-17T02:13:54
| 2019-07-17T02:13:54
| 81,401,320
| 0
| 2
| null | 2022-12-16T05:02:24
| 2017-02-09T02:49:12
|
Java
|
UTF-8
|
Java
| false
| false
| 1,939
|
java
|
package com.meitianhui.member.dao;
import java.util.List;
import java.util.Map;
import com.meitianhui.member.entity.MDMemberDistribution;
public interface MemberDistributionDao {
Integer insert(MDMemberDistribution mdMemberDistribution) throws Exception;
Integer update(MDMemberDistribution mdMemberDistribution) throws Exception;
MDMemberDistribution getMemberDistributionInfo(Map<String,Object> map);
List<Map<String,Object>> getSimpleMemberdistr(Map<String, Object> paramsMap);
/**
* 查询满足条件的分销memberId
* @param paramsMap
* @return
*/
List<String> getDistrMemberId();
/**
* 达到条件的会员的下面所有的memberId(除孙级和子级)
* @param paramsMap
* @return
*/
List<String> getDistrNextMemberId(Map<String,Object> map);
List<MDMemberDistribution> getSimpleMemberdistrByParentId(Map<String,Object> map);
/**
* 查询临时粉丝
* @param paramsMap
* @return
*/
List<Map<String,Object>> selectTempFans(Map<String,Object> map);
/**
* 查询直邀粉丝
* @param paramsMap
* @return
*/
List<Map<String,Object>> selectMemberDirectFans(Map<String, Object> paramsMap);
/**
* 查询间邀粉丝
* @param paramsMap
* @return
*/
List<Map<String,Object>> selectMemberIndirectFans(Map<String, Object> paramsMap);
/**
* 查询全部粉丝
* @param paramsMap
* @return
*/
List<Map<String,Object>> selectMemberFans(Map<String, Object> paramsMap);
Integer findMemberDistrCount(Map<String,Object> paramMap);
/**
* 查询上级的手机号
* @param paramsMap
* @return
*/
String selectConsumerMobile(Map<String,Object> paramMap);
/**
* 查询掌柜memberId
* @param paramsMap
* @return
*/
List<String> getMemberManagerId();
/**
* 查询掌柜下面的memberId
* @param paramsMap
* @return
*/
List<Map<String,Object>> getdistrMemberInfo(Map<String,Object> paramMap);
}
|
[
"[email protected]"
] | |
9af3cc1a8892437845bb02c7915b556f10c8b954
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_2c317f10211f95caeef78dace29eb529c8302bc9/AnnotationReaderTest/2_2c317f10211f95caeef78dace29eb529c8302bc9_AnnotationReaderTest_t.java
|
a7cd24beedad923b0e7249e547ebb35a222d08e4
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,858
|
java
|
// AnnotationReaderTest.java
/** Copyright (c) 2002 Institute for Systems Biology and the Whitehead Institute
**
** This library 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
** any later version.
**
** This library 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. The software and
** documentation provided hereunder is on an "as is" basis, and the
** Institute of Systems Biology and the Whitehead Institute
** have no obligations to provide maintenance, support,
** updates, enhancements or modifications. In no event shall the
** Institute of Systems Biology and the Whitehead Institute
** be liable to any party for direct, indirect, special,
** incidental or consequential damages, including lost profits, arising
** out of the use of this software and its documentation, even if the
** Institute of Systems Biology and the Whitehead Institute
** have been advised of the possibility of such damage. 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 library; if not, write to the Free Software Foundation,
** Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
**/
//------------------------------------------------------------------------------
// $Revision$
// $Date$
// $Author$
//--------------------------------------------------------------------------------------
package cytoscape.data.annotation.readers.unitTests;
//--------------------------------------------------------------------------------------
import junit.framework.*;
import java.io.*;
import java.util.*;
import cytoscape.data.readers.*;
//------------------------------------------------------------------------------
/**
* test the AnnotationReader class
*/
public class AnnotationReaderTest extends TestCase {
//------------------------------------------------------------------------------
public AnnotationReaderTest (String name)
{
super (name);
}
//------------------------------------------------------------------------------
public void setUp () throws Exception
{
}
//------------------------------------------------------------------------------
public void tearDown () throws Exception
{
}
//------------------------------------------------------------------------------
/**
* make sure that the ctor properly initializes all relevant data structures
* as seen through the standard getter methods
*/
public void testReadKeggAnnotation () throws Exception
{
System.out.println ("testReadKeggAnnotation");
String filename = "sampleData/keggSample.annotation";
AnnotationReader reader = new AnnotationReader (filename);
HashMap annotations = reader.getHashMap ();
assertTrue (annotations.size () == 5);
String [] names = reader.getNames ();
assertTrue (names.length == 5);
String [] expectedNames = {"VNG0006G", "VNG0008G", "VNG0009G", "VNG0046G", "VNG0047G"};
int [] expectedCounts = {2, 2, 2, 3, 1};
for (int i=0; i < 5; i++) {
int [] ids = reader.getAnnotationIDs (expectedNames [i]);
assertTrue (ids.length == expectedCounts [i]);
}
} // testReadKeggAnnotation
//-------------------------------------------------------------------------
public static void main (String [] args)
{
junit.textui.TestRunner.run (new TestSuite (AnnotationReaderTest.class));
} // main
//------------------------------------------------------------------------------
} // AnnotationReaderTest
|
[
"[email protected]"
] | |
ba0f2dbb6410009325c9ee65239826278e779a46
|
fdd4cc6f8b5a473c0081af5302cb19c34433a0cf
|
/src/modules/agrega/contenidosportal/src/main/java/es/pode/contenidos/negocio/generacionDinamica/dominio/ContenidoODEDaoImpl.java
|
cb9f25f15a0a24f38454c7dd3ac567549006ca55
|
[] |
no_license
|
nwlg/Colony
|
0170b0990c1f592500d4869ec8583a1c6eccb786
|
07c908706991fc0979e4b6c41d30812d861776fb
|
refs/heads/master
| 2021-01-22T05:24:40.082349
| 2010-12-23T14:49:00
| 2010-12-23T14:49:00
| null | 0
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 3,823
|
java
|
/* Agrega es una federación de repositorios de objetos digitales educativos formada por todas las Comunidades Autónomas propiedad de Red.es. Este código ha sido desarrollado por la Entidad Pública Empresarial red.es adscrita al Ministerio de Industria,Turismo y Comercio a través de la Secretaría de Estado de Telecomunicaciones y para la Sociedad de la Información, dentro del Programa Internet en el Aula, que se encuadra dentro de las actuaciones previstas en el Plan Avanza (Plan 2006-2010 para el desarrollo de la Sociedad de la Información y de Convergencia con Europa y entre Comunidades Autónomas y Ciudades Autónomas) y ha sido cofinanciado con fondos FEDER del Programa Operativo FEDER 2000-2006 “Sociedad de la Información”
This program is free software: you can redistribute it and/or modify it under the terms of the European Union Public Licence (EUPL v.1.0). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the European Union Public Licence (EUPL v.1.0). You should have received a copy of the EUPL licence along with this program. If not, see http://ec.europa.eu/idabc/en/document/7330.
*/
// license-header java merge-point
/**
* This is only generated once! It will never be overwritten.
* You can (and have to!) safely modify it by hand.
*/
package es.pode.contenidos.negocio.generacionDinamica.dominio;
/**
* @see es.pode.contenidos.negocio.generacionDinamica.dominio.ContenidoODE
*/
public class ContenidoODEDaoImpl
extends es.pode.contenidos.negocio.generacionDinamica.dominio.ContenidoODEDaoBase
{
/**
* @see es.pode.contenidos.negocio.generacionDinamica.dominio.ContenidoODEDao#toContenidoODEVO(es.pode.contenidos.negocio.generacionDinamica.dominio.ContenidoODE)
*/
public es.pode.contenidos.negocio.generacionDinamica.servicio.ContenidoODEVO toContenidoODEVO(final es.pode.contenidos.negocio.generacionDinamica.dominio.ContenidoODE entity)
{
//default mapping between entity and VO
//@todo verify or customize behaviour of this mapping
return (es.pode.contenidos.negocio.generacionDinamica.servicio.ContenidoODEVO)
this.getBeanMapper().map(entity, es.pode.contenidos.negocio.generacionDinamica.servicio.ContenidoODEVO.class, DEF_MAPPING_CONTENIDOODE_CONTENIDOODEVO);
}
/**
* Copy a VO to a new entity.
* @param vo The source bean (VO)
* @return A new entity created with the values extracted from the vo.
* @see es.pode.contenidos.negocio.generacionDinamica.dominio.ContenidoODEDao#fromContenidoODEVO(es.pode.contenidos.negocio.generacionDinamica.servicio.ContenidoODEVO)
*/
public es.pode.contenidos.negocio.generacionDinamica.dominio.ContenidoODE fromContenidoODEVO(final es.pode.contenidos.negocio.generacionDinamica.servicio.ContenidoODEVO vo) {
//default mapping between VO and entity
//@todo verify or customize behaviour of this mapping
return super.fromContenidoODEVO(vo);
}
/**
* Copy a VO to an existing entity.
* @param vo The source bean (VO)
* @param entity The destination bean (an existing entity)
* @see es.pode.contenidos.negocio.generacionDinamica.dominio.ContenidoODEDao#fromContenidoODEVO(es.pode.contenidos.negocio.generacionDinamica.servicio.ContenidoODEVO ,es.pode.contenidos.negocio.generacionDinamica.dominio.ContenidoODE)
*/
public void fromContenidoODEVO(es.pode.contenidos.negocio.generacionDinamica.servicio.ContenidoODEVO vo, es.pode.contenidos.negocio.generacionDinamica.dominio.ContenidoODE entity) {
//default mapping between VO and entity
//@todo verify or customize behaviour of this mapping
super.fromContenidoODEVO(vo, entity);
}
}
|
[
"[email protected]"
] | |
affe5e9df5808ea55441b8ada12529313c66a7eb
|
f715b1253b42bc618670f0a84ef6d116583d9eaa
|
/badugi-game-logic/src/main/java/com/badugi/game/logic/model/vo/api/shop/PresentTicketVo.java
|
4ed5215a59d5ec8da7e3afda060eb00a7c9a181d
|
[
"MIT"
] |
permissive
|
cietwwl/BadugiPokerServer
|
acf282544a2811be436f27abb52a1ace22712051
|
0b494f80d846fcb2e9db26721bd09add7d674783
|
refs/heads/master
| 2020-03-17T18:29:08.353095
| 2016-01-18T02:46:46
| 2016-01-18T02:46:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,396
|
java
|
package com.badugi.game.logic.model.vo.api.shop;
import java.io.Serializable;
public class PresentTicketVo implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
private Integer tid;//门票/物品编号
private String tn;//门票/物品名称
private Integer myticketid;//我的门票ID
private String tmn;//门票/物品图片(跟之前门票/物品路径一致)
private Integer tc;//门票总张数
private Integer tam;//门票价值
private String tst;//有效开始时间
private String tet;//有效结束时间
public Integer getTid() {
return tid;
}
public void setTid(Integer tid) {
this.tid = tid;
}
public String getTn() {
return tn;
}
public void setTn(String tn) {
this.tn = tn;
}
public String getTmn() {
return tmn;
}
public void setTmn(String tmn) {
this.tmn = tmn;
}
public Integer getTc() {
return tc;
}
public void setTc(Integer tc) {
this.tc = tc;
}
public String getTst() {
return tst;
}
public void setTst(String tst) {
this.tst = tst;
}
public String getTet() {
return tet;
}
public void setTet(String tet) {
this.tet = tet;
}
public Integer getTam() {
return tam;
}
public void setTam(Integer tam) {
this.tam = tam;
}
public Integer getMyticketid() {
return myticketid;
}
public void setMyticketid(Integer myticketid) {
this.myticketid = myticketid;
}
}
|
[
"[email protected]"
] | |
e9749692b085c68fa9c23056957395853c2868ba
|
55d16fed73d1e744fda0554e231c20a395d409a2
|
/wanxinp2p-api/src/main/java/com/wanxin/api/depository/DepositoryAgentAPI.java
|
3732d39b8ad4d6e790fb88c62a8dea97c0240857
|
[
"Apache-2.0"
] |
permissive
|
LionDevelop/wanxin-p2p
|
3032f0f81e9c1212eb3d485cb97914a91aad7d8b
|
c95671d7bdb4963165e4db8773578ab85832dafd
|
refs/heads/master
| 2023-04-01T21:46:24.527977
| 2021-04-01T08:55:35
| 2021-04-01T08:55:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,275
|
java
|
package com.wanxin.api.depository;
import com.wanxin.api.consumer.model.ConsumerRequest;
import com.wanxin.api.consumer.model.RechargeRequest;
import com.wanxin.api.consumer.model.WithdrawRequest;
import com.wanxin.api.depository.model.GatewayRequest;
import com.wanxin.api.depository.model.LoanRequest;
import com.wanxin.api.depository.model.UserAutoPreTransactionRequest;
import com.wanxin.api.repayment.model.RepaymentRequest;
import com.wanxin.api.transaction.model.ModifyProjectStatusDTO;
import com.wanxin.api.transaction.model.ProjectDTO;
import com.wanxin.common.domain.RestResponse;
/**
* <p>
* 银行存管系统代理服务API
* </p>
*
* @author yuelimin
* @version 1.0.0
* @since 1.8
*/
public interface DepositoryAgentAPI {
/**
* 还款确认
*
* @param repaymentRequest 还款信息
* @return
*/
RestResponse<String> confirmRepayment(RepaymentRequest repaymentRequest);
/**
* 修改标的状态
*
* @param modifyProjectStatusDTO
* @return
*/
RestResponse<String> modifyProjectStatus(ModifyProjectStatusDTO modifyProjectStatusDTO);
/**
* 审核标的满标放款
*
* @param loanRequest
* @return
*/
RestResponse<String> confirmLoan(LoanRequest loanRequest);
/**
* 预授权处理
*
* @param userAutoPreTransactionRequest 预授权处理信息
* @return
*/
RestResponse<String> userAutoPreTransaction(UserAutoPreTransactionRequest userAutoPreTransactionRequest);
/**
* 保存标的信息
*
* @param projectDTO 标的信息
* @return 返回提示信息
*/
RestResponse<String> createProject(ProjectDTO projectDTO);
/**
* 生成用户提现数据
*
* @param withdrawRequest
* @return
*/
RestResponse<GatewayRequest> createWithdrawRecord(WithdrawRequest withdrawRequest);
/**
* 生成用户充值数据
*
* @param rechargeRequest
* @return
*/
RestResponse<GatewayRequest> createRechargeRecord(RechargeRequest rechargeRequest);
/**
* 开通存管账户
*
* @param consumerRequest 开户信息
* @return
*/
RestResponse<GatewayRequest> createConsumer(ConsumerRequest consumerRequest);
}
|
[
"[email protected]"
] | |
778572ee1dcc222292c551f4e5230fa5fc6988a4
|
5d00b27e4022698c2dc56ebbc63263f3c44eea83
|
/gen/com/ah/xml/be/config/SsidRoamingCache.java
|
03884f93760e3ede660ce300ad1dbe47e63aa559
|
[] |
no_license
|
Aliing/WindManager
|
ac5b8927124f992e5736e34b1b5ebb4df566770a
|
f66959dcaecd74696ae8bc764371c9a2aa421f42
|
refs/heads/master
| 2020-12-27T23:57:43.988113
| 2014-07-28T17:58:46
| 2014-07-28T17:58:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,884
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6
// 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: 2014.07.01 at 11:29:17 AM CST
//
package com.ah.xml.be.config;
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 ssid-roaming-cache complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ssid-roaming-cache">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="AH-DELTA-ASSISTANT" type="{http://www.aerohive.com/configuration/general}ah-only-act" minOccurs="0"/>
* <element name="update-interval" type="{http://www.aerohive.com/configuration/ssid}ssid-cache-update-interval" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ssid-roaming-cache", namespace = "http://www.aerohive.com/configuration/ssid", propOrder = {
"ahdeltaassistant",
"updateInterval"
})
public class SsidRoamingCache {
@XmlElement(name = "AH-DELTA-ASSISTANT")
protected AhOnlyAct ahdeltaassistant;
@XmlElement(name = "update-interval")
protected SsidCacheUpdateInterval updateInterval;
/**
* Gets the value of the ahdeltaassistant property.
*
* @return
* possible object is
* {@link AhOnlyAct }
*
*/
public AhOnlyAct getAHDELTAASSISTANT() {
return ahdeltaassistant;
}
/**
* Sets the value of the ahdeltaassistant property.
*
* @param value
* allowed object is
* {@link AhOnlyAct }
*
*/
public void setAHDELTAASSISTANT(AhOnlyAct value) {
this.ahdeltaassistant = value;
}
/**
* Gets the value of the updateInterval property.
*
* @return
* possible object is
* {@link SsidCacheUpdateInterval }
*
*/
public SsidCacheUpdateInterval getUpdateInterval() {
return updateInterval;
}
/**
* Sets the value of the updateInterval property.
*
* @param value
* allowed object is
* {@link SsidCacheUpdateInterval }
*
*/
public void setUpdateInterval(SsidCacheUpdateInterval value) {
this.updateInterval = value;
}
}
|
[
"[email protected]"
] | |
810872dabf2ca4e12f643a31f5d6454791571f84
|
6d10fde3ca6b83434d9f038c8465ba8ab7c04708
|
/net/acomputerdog/BlazeLoader/proxy/ProfilerProxy.java
|
8a7c8f655301112fe8d7ed6d55cbf7a72bffd882
|
[
"BSD-2-Clause"
] |
permissive
|
Mumfrey/BlazeLoader
|
505678342776f05c32ed1f7cbe4d0e7456a66776
|
e86fa93426ef2c1697481db995f76c6319f07418
|
refs/heads/master
| 2021-01-18T01:43:56.176073
| 2013-10-24T01:33:03
| 2013-10-24T01:33:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 800
|
java
|
package net.acomputerdog.BlazeLoader.proxy;
import net.acomputerdog.BlazeLoader.main.fixes.BlockAir;
import net.acomputerdog.BlazeLoader.mod.ModList;
import net.minecraft.src.Profiler;
public class ProfilerProxy extends Profiler {
private boolean hasLoadedMods = false;
@Override
public void startSection(String par1Str) {
if("root".equals(par1Str)){
if(!hasLoadedMods){
BlockAir.injectBlockAir();
hasLoadedMods = true;
ModList.start();
}
}
ModList.startSection(par1Str);
super.startSection(par1Str);
}
@Override
public void endSection() {
super.endSection();
String section = super.getNameOfLastSection();
ModList.endSection(section);
}
}
|
[
"[email protected]"
] | |
c346d3dd9f6da32e6eed28783ef65df21d9aeb48
|
581f47bea807f07f458241a75d3dd4382dcdc32a
|
/推回输入流/PushbackTest.java
|
3dbf66415249991633ce0c45b25b9e3336e4b348
|
[] |
no_license
|
KronosOceanus/javaSE
|
dc30e4f20f02e39ba32b4e7056b95511e1cca648
|
43bd0660acf9e7488cd581c4e5907b3316c3ca0c
|
refs/heads/main
| 2021-06-15T02:11:19.604097
| 2021-05-01T02:57:35
| 2021-05-01T02:57:35
| 186,195,872
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 157
|
java
|
public class Main{
public static void main(String[] args){
System.out.println("HelloWorld!");
//qwq
new PushbackReader;
}
}
|
[
"[email protected]"
] | |
2f927aa1cbd355185689c56a38f4e66903f9b73b
|
345fedb01a883c98a55fbd2d96cfc89db161318d
|
/bin/custom/keyruspoc/keyruspocinitialdata/gensrc/br/com/keyrus/poc/initialdata/constants/GeneratedKeyruspocInitialDataConstants.java
|
7db02e3ee3de97845e6d39cd0e4180186496bd90
|
[] |
no_license
|
ironbats/keyrus-poc
|
81d695be0fabfb3db28eb14100a37f8e0118eeca
|
0f18b05c4c1aa02bb452e77ee7b366942058e9a9
|
refs/heads/master
| 2022-04-25T17:20:10.411146
| 2019-08-20T17:24:38
| 2019-08-20T17:24:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 666
|
java
|
/*
* ----------------------------------------------------------------
* --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! ---
* --- Generated at 15 de ago de 2019 11:26:17 ---
* ----------------------------------------------------------------
*/
package br.com.keyrus.poc.initialdata.constants;
/**
* @deprecated since ages - use constants in Model classes instead
*/
@Deprecated
@SuppressWarnings({"unused","cast"})
public class GeneratedKeyruspocInitialDataConstants
{
public static final String EXTENSIONNAME = "keyruspocinitialdata";
protected GeneratedKeyruspocInitialDataConstants()
{
// private constructor
}
}
|
[
"[email protected]"
] | |
78e767417d63b7fc2205fb9754e1f3ec7267f477
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/11/11_14bd825ee9babb62e7ff1bcab69f2bc5349809bd/Node/11_14bd825ee9babb62e7ff1bcab69f2bc5349809bd_Node_s.java
|
4d2490089cb3de9ead9eb6448450fccd955ad0a7
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,938
|
java
|
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is part of dcm4che, an implementation of DICOM(TM) in
* Java(TM), hosted at https://github.com/dcm4che.
*
* The Initial Developer of the Original Code is
* Agfa Healthcare.
* Portions created by the Initial Developer are Copyright (C) 2011
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* See @authors listed below
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
package org.dcm4che.jdbc.prefs.entity;
import java.util.Collection;
import java.util.HashSet;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.Index;
import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;
/**
* @author Michael Backhaus <[email protected]>
*/
@NamedQueries({
@NamedQuery(name = "Node.getChildren", query = "SELECT n from Node n LEFT JOIN FETCH n.attributes where n.parentNode = ?1"),
@NamedQuery(name = "Node.getRootNode", query = "SELECT n from Node n where n.name = 'rootNode'") })
@Entity
@Table(name = "node")
public class Node {
public static final String GET_CHILDREN = "Node.getChildren";
public static final String GET_ROOT_NODE = "Node.getRootNode";
@Id
@GeneratedValue
private int pk;
@Basic(optional = false)
@Index(name = "node_name_idx")
private String name;
@ManyToOne
@JoinColumn(name = "parent_pk")
@OnDelete(action = OnDeleteAction.CASCADE)
private Node parentNode;
@OneToMany(mappedBy = "node")
@OnDelete(action = OnDeleteAction.CASCADE)
private Collection<Attribute> attributes = new HashSet<Attribute>();
public int getPk() {
return pk;
}
public void setPk(int pk) {
this.pk = pk;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Node getParentNode() {
return parentNode;
}
public void setParentNode(Node parent) {
this.parentNode = parent;
}
public Collection<Attribute> getAttributes() {
return attributes;
}
}
|
[
"[email protected]"
] | |
d8aa5b102a7e10d015b315f32f000a9294e43045
|
6a2f63d971fd5ce988c10cdc2401aae3ba5e0fee
|
/net/minecraft/network/play/server/S19PacketEntityStatus.java
|
491622b623c57fe54b4ea290be59a3fce6c75ea7
|
[
"MIT"
] |
permissive
|
MikeWuang/hawk-client
|
22d0d723b70826f74d91f0928384513a419592c1
|
7f62687c62709c595e2945d71678984ba1b832ea
|
refs/heads/main
| 2023-04-05T19:50:35.459096
| 2021-04-28T00:52:19
| 2021-04-28T00:52:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,403
|
java
|
package net.minecraft.network.play.server;
import java.io.IOException;
import net.minecraft.entity.Entity;
import net.minecraft.network.INetHandler;
import net.minecraft.network.Packet;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.INetHandlerPlayClient;
import net.minecraft.world.World;
public class S19PacketEntityStatus implements Packet {
private int field_149164_a;
private static final String __OBFID = "CL_00001299";
private byte field_149163_b;
public void writePacketData(PacketBuffer var1) throws IOException {
var1.writeInt(this.field_149164_a);
var1.writeByte(this.field_149163_b);
}
public S19PacketEntityStatus(Entity var1, byte var2) {
this.field_149164_a = var1.getEntityId();
this.field_149163_b = var2;
}
public void readPacketData(PacketBuffer var1) throws IOException {
this.field_149164_a = var1.readInt();
this.field_149163_b = var1.readByte();
}
public S19PacketEntityStatus() {
}
public Entity func_149161_a(World var1) {
return var1.getEntityByID(this.field_149164_a);
}
public void func_180736_a(INetHandlerPlayClient var1) {
var1.handleEntityStatus(this);
}
public void processPacket(INetHandler var1) {
this.func_180736_a((INetHandlerPlayClient)var1);
}
public byte func_149160_c() {
return this.field_149163_b;
}
}
|
[
"[email protected]"
] | |
e73bb314ac01e27849db0d40e3e0ab534a75c1bf
|
17c30fed606a8b1c8f07f3befbef6ccc78288299
|
/P9_8_0_0/src/main/java/com/huawei/android/pushselfshow/richpush/tools/c.java
|
6eb8dd396f38f2b667a60b929505dd28e3218c32
|
[] |
no_license
|
EggUncle/HwFrameWorkSource
|
4e67f1b832a2f68f5eaae065c90215777b8633a7
|
162e751d0952ca13548f700aad987852b969a4ad
|
refs/heads/master
| 2020-04-06T14:29:22.781911
| 2018-11-09T05:05:03
| 2018-11-09T05:05:03
| 157,543,151
| 1
| 0
| null | 2018-11-14T12:08:01
| 2018-11-14T12:08:01
| null |
UTF-8
|
Java
| false
| false
| 5,693
|
java
|
package com.huawei.android.pushselfshow.richpush.tools;
import android.content.Context;
import com.huawei.android.pushselfshow.utils.a;
import java.io.File;
import java.io.FileOutputStream;
public class c {
private String a;
private Context b;
public c(Context context, String str) {
this.a = str;
this.b = context;
}
private String b() {
return "<!DOCTYPE html>\t\t<html>\t\t <head>\t\t <meta charset=\"utf-8\">\t\t <title></title>\t\t <style type=\"text/css\">\t\t\t\t html { height:100%;}\t\t\t\t body { height:100%; text-align:center;}\t \t .centerDiv { display:inline-block; zoom:1; *display:inline; vertical-align:top; text-align:left; width:200px; padding:10px;margin-top:100px;}\t\t\t .hiddenDiv { height:100%; overflow:hidden; display:inline-block; width:1px; overflow:hidden; margin-left:-1px; zoom:1; *display:inline; *margin-top:-1px; _margin-top:0; vertical-align:middle;}\t\t \t</style> \t </head>\t\t <body>\t\t\t<div id =\"container\" class=\"centerDiv\">";
}
private String c() {
return "\t\t</div> \t\t<div class=\"hiddenDiv\"></div>\t </body> </html>";
}
public String a() {
Throwable -l_7_R;
Object -l_10_R;
FileOutputStream -l_1_R = null;
if (this.b != null) {
Object -l_2_R = b() + this.a + c();
Object -l_3_R = this.b.getFilesDir().getPath() + File.separator + "PushService" + File.separator + "richpush";
Object -l_4_R = "error.html";
Object -l_5_R = new File(-l_3_R);
File -l_6_R = new File(-l_3_R + File.separator + -l_4_R);
try {
if (!-l_5_R.exists()) {
com.huawei.android.pushagent.a.a.c.a("PushSelfShowLog", "Create the path:" + -l_3_R);
if (!-l_5_R.mkdirs()) {
com.huawei.android.pushagent.a.a.c.a("PushSelfShowLog", "!path.mkdirs()");
if (-l_1_R != null) {
try {
-l_1_R.close();
} catch (Throwable -l_8_R) {
com.huawei.android.pushagent.a.a.c.a("PushSelfShowLog", "stream.close() error ", -l_8_R);
}
}
return null;
}
}
if (-l_6_R.exists()) {
a.a(-l_6_R);
}
com.huawei.android.pushagent.a.a.c.a("PushSelfShowLog", "Create the file:" + -l_4_R);
if (-l_6_R.createNewFile()) {
FileOutputStream -l_1_R2 = new FileOutputStream(-l_6_R);
try {
-l_1_R2.write(-l_2_R.getBytes("UTF-8"));
if (-l_1_R2 != null) {
try {
-l_1_R2.close();
} catch (Throwable -l_7_R2) {
com.huawei.android.pushagent.a.a.c.a("PushSelfShowLog", "stream.close() error ", -l_7_R2);
}
}
return -l_6_R.getAbsolutePath();
} catch (Exception e) {
-l_7_R2 = e;
-l_1_R = -l_1_R2;
try {
com.huawei.android.pushagent.a.a.c.a("PushSelfShowLog", "Create html error ", -l_7_R2);
if (-l_1_R != null) {
try {
-l_1_R.close();
} catch (Throwable -l_9_R) {
com.huawei.android.pushagent.a.a.c.a("PushSelfShowLog", "stream.close() error ", -l_9_R);
}
}
return null;
} catch (Throwable th) {
-l_10_R = th;
if (-l_1_R != null) {
try {
-l_1_R.close();
} catch (Throwable -l_11_R) {
com.huawei.android.pushagent.a.a.c.a("PushSelfShowLog", "stream.close() error ", -l_11_R);
}
}
throw -l_10_R;
}
} catch (Throwable th2) {
-l_10_R = th2;
-l_1_R = -l_1_R2;
if (-l_1_R != null) {
-l_1_R.close();
}
throw -l_10_R;
}
}
com.huawei.android.pushagent.a.a.c.a("PushSelfShowLog", "!file.createNewFile()");
if (-l_1_R != null) {
try {
-l_1_R.close();
} catch (Throwable -l_8_R2) {
com.huawei.android.pushagent.a.a.c.a("PushSelfShowLog", "stream.close() error ", -l_8_R2);
}
}
return null;
} catch (Exception e2) {
-l_7_R2 = e2;
com.huawei.android.pushagent.a.a.c.a("PushSelfShowLog", "Create html error ", -l_7_R2);
if (-l_1_R != null) {
-l_1_R.close();
}
return null;
}
}
com.huawei.android.pushagent.a.a.c.d("PushSelfShowLog", "CreateHtmlFile fail ,context is null");
return null;
}
}
|
[
"[email protected]"
] | |
3fabfb2222233b5e7b6efdfe96250041475f9b5e
|
7475ac6b7bcdfd0a86648ba1bd2f34f1d3d7ff09
|
/esshop/src/main/java/com/shopping/core/constant/Globals.java
|
a0b91844bbbfaa0ea2b6e1b0f5291279d13d41f0
|
[] |
no_license
|
K-Darker/esshop
|
736073adfdf828bfe069257ffaddac8cec0b1b7f
|
9cc1a11e13d265e6b78ec836232f726a41c21b7d
|
refs/heads/master
| 2021-09-08T05:04:41.067994
| 2018-03-07T09:47:16
| 2018-03-07T09:47:40
| 123,759,831
| 6
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,248
|
java
|
package com.shopping.core.constant;
public class Globals
{
public static final String DEFAULT_SYSTEM_TITLE = "shoppingV2.0";
public static final boolean SSO_SIGN = true;
public static final int DEFAULT_SHOP_VERSION = 20171018;
public static final String DEFAULT_SHOP_OUT_VERSION = "V4.0";
public static final String DEFAULT_WBESITE_NAME = "shopping";
public static final String DEFAULT_CLOSE_REASON = "系统维护中......";
public static final String DEFAULT_THEME = "default";
public static final String DERAULT_USER_TEMPLATE = "user_templates";
public static final String UPLOAD_FILE_PATH = "upload";
public static final String DEFAULT_SYSTEM_LANGUAGE = "zh_cn";
public static final String DEFAULT_SYSTEM_PAGE_ROOT = "WEB-INF/templates/";
public static final String SYSTEM_MANAGE_PAGE_PATH = "WEB-INF/templates/zh_cn/system/";
public static final String SYSTEM_FORNT_PAGE_PATH = "WEB-INF/templates/zh_cn/shop/";
public static final String SYSTEM_DATA_BACKUP_PATH = "data";
public static final Boolean SYSTEM_UPDATE = Boolean.valueOf(true);
public static final boolean SAVE_LOG = false;
public static final String SECURITY_CODE_TYPE = "normal";
public static final boolean STORE_ALLOW = true;
public static final boolean EAMIL_ENABLE = true;
public static final String DEFAULT_IMAGESAVETYPE = "sidImg";
public static final int DEFAULT_IMAGE_SIZE = 1024;
public static final String DEFAULT_IMAGE_SUFFIX = "gif|jpg|jpeg|bmp|png|tbi";
public static final int DEFAULT_IMAGE_SMALL_WIDTH = 160;
public static final int DEFAULT_IMAGE_SMALL_HEIGH = 160;
public static final int DEFAULT_IMAGE_MIDDLE_WIDTH = 300;
public static final int DEFAULT_IMAGE_MIDDLE_HEIGH = 300;
public static final int DEFAULT_IMAGE_BIG_WIDTH = 1024;
public static final int DEFAULT_IMAGE_BIG_HEIGH = 1024;
public static final int DEFAULT_COMPLAINT_TIME = 30;
public static final String DEFAULT_TABLE_SUFFIX = "shopping_";
public static final String THIRD_ACCOUNT_LOGIN = "shopping_thid_login_";
public static final String DEFAULT_SMS_URL = "http://service.winic.org/sys_port/gateway/";
public static final String DEFAULT_BIND_DOMAIN_CODE = "126A11D4BB76663E85078487393AB64897B9DCE99C5934CD589CFE4E769668CB";
}
|
[
"[email protected]"
] | |
b27a4fc3bd8e778259effcf933219ccf5f1fc2d2
|
c6f7fdb2cc85bd454e065962c1ab648bbd3b240e
|
/javatraining/src/com/training/java/enums/EError.java
|
d94696f6bc370f113673e3652a2c1455a3144f9b
|
[] |
no_license
|
osmanyaycioglu/in20210823
|
ee14d7a38a72f9790d88d49467fe1930473e8f18
|
fc37f05a401630684511fb696f27fa453f5acc46
|
refs/heads/master
| 2023-07-13T20:40:17.847403
| 2021-08-27T13:37:55
| 2021-08-27T13:37:55
| 399,081,910
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,738
|
java
|
package com.training.java.enums;
import com.training.java.calculator.IOperation;
public enum EError implements IOperation {
ERROR_PARAMETER(300, "Paramter hatası oluştu", ECategory.INPUT) {
@Override
public int execute(final int val1Param,
final int val2Param) {
return val1Param + val2Param;
}
},
ERROR_SYSTEM(500, "Sistem error oluştu", ECategory.SYSTEM) {
@Override
public int execute(final int val1Param,
final int val2Param) {
return super.execute(val1Param,
val2Param);
}
};
private final int cause;
private final String message;
private final ECategory category;
private EError(final int cause,
final String message,
final ECategory category) {
this.cause = cause;
this.message = message;
this.category = category;
}
public int getCause() {
return this.cause;
}
public String getMessage() {
return this.message;
}
public ECategory getCategory() {
return this.category;
}
public static EError getError(final int cause) {
EError[] valuesLoc = EError.values();
for (EError eErrorLoc : valuesLoc) {
int ordinalLoc = eErrorLoc.ordinal();
String nameLoc = eErrorLoc.name();
if (eErrorLoc.getCause() == cause) {
return eErrorLoc;
}
}
return null;
}
@Override
public int execute(final int val1Param,
final int val2Param) {
throw new IllegalStateException();
}
}
|
[
"[email protected]"
] | |
f21d88f79f0564db4b04530c420cd5b0fd4ebbcd
|
30debfb588d3df553019a29d761f53698564e8c8
|
/modules/dfp_axis/src/main/java/com/google/api/ads/dfp/axis/v201702/ListStringCreativeTemplateVariableVariableChoice.java
|
0ec55c1908f634758f7ea62c7734590eb47ea101
|
[
"Apache-2.0"
] |
permissive
|
jinhyeong/googleads-java-lib
|
8f7a5b9cad5189e45b5ddcdc215bbb4776b614f9
|
872c39ba20f30f7e52d3d4c789a1c5cbefaf80fc
|
refs/heads/master
| 2021-01-19T09:35:38.933267
| 2017-04-03T14:12:43
| 2017-04-03T14:12:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,844
|
java
|
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* ListStringCreativeTemplateVariableVariableChoice.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.dfp.axis.v201702;
/**
* Stores variable choices that users can select from
*/
public class ListStringCreativeTemplateVariableVariableChoice implements java.io.Serializable {
/* Label that users can select from. This is displayed to users
* when creating a
* {@link TemplateCreative}. This attribute is intended
* to be more descriptive than
* {@link #value}. This attribute is required and has
* a maximum length of 255 characters. */
private java.lang.String label;
/* Value that users can select from. When creating a {@link TemplateCreative},
* the value in
* {@link StringCreativeTemplateVariableValue} should
* match this value, if you intend to
* select this value. This attribute is required and
* has a maximum length of 255
* characters. */
private java.lang.String value;
public ListStringCreativeTemplateVariableVariableChoice() {
}
public ListStringCreativeTemplateVariableVariableChoice(
java.lang.String label,
java.lang.String value) {
this.label = label;
this.value = value;
}
/**
* Gets the label value for this ListStringCreativeTemplateVariableVariableChoice.
*
* @return label * Label that users can select from. This is displayed to users
* when creating a
* {@link TemplateCreative}. This attribute is intended
* to be more descriptive than
* {@link #value}. This attribute is required and has
* a maximum length of 255 characters.
*/
public java.lang.String getLabel() {
return label;
}
/**
* Sets the label value for this ListStringCreativeTemplateVariableVariableChoice.
*
* @param label * Label that users can select from. This is displayed to users
* when creating a
* {@link TemplateCreative}. This attribute is intended
* to be more descriptive than
* {@link #value}. This attribute is required and has
* a maximum length of 255 characters.
*/
public void setLabel(java.lang.String label) {
this.label = label;
}
/**
* Gets the value value for this ListStringCreativeTemplateVariableVariableChoice.
*
* @return value * Value that users can select from. When creating a {@link TemplateCreative},
* the value in
* {@link StringCreativeTemplateVariableValue} should
* match this value, if you intend to
* select this value. This attribute is required and
* has a maximum length of 255
* characters.
*/
public java.lang.String getValue() {
return value;
}
/**
* Sets the value value for this ListStringCreativeTemplateVariableVariableChoice.
*
* @param value * Value that users can select from. When creating a {@link TemplateCreative},
* the value in
* {@link StringCreativeTemplateVariableValue} should
* match this value, if you intend to
* select this value. This attribute is required and
* has a maximum length of 255
* characters.
*/
public void setValue(java.lang.String value) {
this.value = value;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof ListStringCreativeTemplateVariableVariableChoice)) return false;
ListStringCreativeTemplateVariableVariableChoice other = (ListStringCreativeTemplateVariableVariableChoice) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this.label==null && other.getLabel()==null) ||
(this.label!=null &&
this.label.equals(other.getLabel()))) &&
((this.value==null && other.getValue()==null) ||
(this.value!=null &&
this.value.equals(other.getValue())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getLabel() != null) {
_hashCode += getLabel().hashCode();
}
if (getValue() != null) {
_hashCode += getValue().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(ListStringCreativeTemplateVariableVariableChoice.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201702", "ListStringCreativeTemplateVariable.VariableChoice"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("label");
elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201702", "label"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("value");
elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201702", "value"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
|
[
"[email protected]"
] | |
b09eae7edfe3c9a7edd043850cabc6adc9fd7161
|
0eeb6a3c2030c4164ce1d18fd0a1698f2b669367
|
/src/main/java/bizseer/demik/letcode/easy/RemoveColumnCreateOrder944.java
|
0f891aa40b9ad5f68edf600563ec2fdb493b72cb
|
[] |
no_license
|
AthyLau/letcode
|
cbe5295144c1f7cf533576eb658bdb0e167e02da
|
b1209691ddd6f31091875ce550e7c4732ae7f4bb
|
refs/heads/master
| 2021-06-19T20:48:08.059869
| 2019-11-21T02:16:22
| 2019-11-21T02:16:22
| 203,784,741
| 0
| 0
| null | 2019-11-21T02:16:25
| 2019-08-22T11:52:14
|
Java
|
UTF-8
|
Java
| false
| false
| 2,310
|
java
|
package bizseer.demik.letcode.easy;
/**
* Function:
* 给定由 N 个小写字母字符串组成的数组 A,其中每个字符串长度相等。
* <p>
* 删除 操作的定义是:选出一组要删掉的列,删去 A 中对应列中的所有字符,形式上,第 n 列为 [A[0][n], A[1][n], ..., A[A.length-1][n]])。
* <p>
* 比如,有 A = ["abcdef", "uvwxyz"],
* <p>
* <p>
* <p>
* 要删掉的列为 {0, 2, 3},删除后 A 为["bef", "vyz"], A 的列分别为["b","v"], ["e","y"], ["f","z"]。
* <p>
* <p>
* <p>
* 你需要选出一组要删掉的列 D,对 A 执行删除操作,使 A 中剩余的每一列都是 非降序 排列的,然后请你返回 D.length 的最小可能值。
* <p>
*
* <p>
* 示例 1:
* <p>
* 输入:["cba", "daf", "ghi"]
* 输出:1
* 解释:
* 当选择 D = {1},删除后 A 的列为:["c","d","g"] 和 ["a","f","i"],均为非降序排列。
* 若选择 D = {},那么 A 的列 ["b","a","h"] 就不是非降序排列了。
* 示例 2:
* <p>
* 输入:["a", "b"]
* 输出:0
* 解释:D = {}
* 示例 3:
* <p>
* 输入:["zyx", "wvu", "tsr"]
* 输出:3
* 解释:D = {0, 1, 2}
*
* <p>
* 提示:
* <p>
* 1 <= A.length <= 100
* 1 <= A[i].length <= 1000
* <p>
* 来源:力扣(LeetCode)
* 链接:https://leetcode-cn.com/problems/delete-columns-to-make-sorted
* 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
*
* @author liubing
* Date: 2019/9/10 1:31 PM
* @since JDK 1.8
*/
public class RemoveColumnCreateOrder944 {
public static void main(String args[]){
System.out.println(minDeletionSize(new String[]{"cba", "daf", "ghi"}));
}
public static int minDeletionSize(String[] A) {
int ret = 0;
if (A == null || A.length == 0) {
return ret;
}else {
char c;
for(int i = 0; i < A[0].length(); i++){
c = 'a'-1;
for (String s : A) {
if (s.charAt(i) < c) {
ret++;
break;
}else {
c = s.charAt(i);
}
}
}
}
return ret;
}
}
|
[
"[email protected]"
] | |
8a9e144d708cff3a7e2d3d7f78a363b407f3371c
|
40d844c1c780cf3618979626282cf59be833907f
|
/src/testcases/CWE191_Integer_Underflow/s04/CWE191_Integer_Underflow__int_getQueryString_Servlet_postdec_31.java
|
03b9b29b1c6906a1809556a5677a3733536a56ea
|
[] |
no_license
|
rubengomez97/juliet
|
f9566de7be198921113658f904b521b6bca4d262
|
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
|
refs/heads/master
| 2023-06-02T00:37:24.532638
| 2021-06-23T17:22:22
| 2021-06-23T17:22:22
| 379,676,259
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,688
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE191_Integer_Underflow__int_getQueryString_Servlet_postdec_31.java
Label Definition File: CWE191_Integer_Underflow__int.label.xml
Template File: sources-sinks-31.tmpl.java
*/
/*
* @description
* CWE: 191 Integer Underflow
* BadSource: getQueryString_Servlet Parse id param out of the URL query string (without using getParameter())
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: decrement
* GoodSink: Ensure there will not be an underflow before decrementing data
* BadSink : Decrement data, which can cause an Underflow
* Flow Variant: 31 Data flow: make a copy of data within the same method
*
* */
package testcases.CWE191_Integer_Underflow.s04;
import testcasesupport.*;
import javax.servlet.http.*;
import java.util.StringTokenizer;
import java.util.logging.Level;
public class CWE191_Integer_Underflow__int_getQueryString_Servlet_postdec_31 extends AbstractTestCaseServlet
{
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int dataCopy;
{
int data;
data = Integer.MIN_VALUE; /* initialize data in case id is not in query string */
/* POTENTIAL FLAW: Parse id param out of the URL querystring (without using getParam) */
{
StringTokenizer tokenizer = new StringTokenizer(request.getQueryString(), "&");
while (tokenizer.hasMoreTokens())
{
String token = tokenizer.nextToken(); /* a token will be like "id=33" */
if(token.startsWith("id=")) /* check if we have the "id" parameter" */
{
try
{
data = Integer.parseInt(token.substring(3)); /* set data to the int 33 */
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception reading id from query string", exceptNumberFormat);
}
break; /* exit while loop */
}
}
}
dataCopy = data;
}
{
int data = dataCopy;
/* POTENTIAL FLAW: if data == Integer.MIN_VALUE, this will overflow */
data--;
int result = (int)(data);
IO.writeLine("result: " + result);
}
}
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
goodG2B(request, response);
goodB2G(request, response);
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int dataCopy;
{
int data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
dataCopy = data;
}
{
int data = dataCopy;
/* POTENTIAL FLAW: if data == Integer.MIN_VALUE, this will overflow */
data--;
int result = (int)(data);
IO.writeLine("result: " + result);
}
}
/* goodB2G() - use badsource and goodsink */
private void goodB2G(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int dataCopy;
{
int data;
data = Integer.MIN_VALUE; /* initialize data in case id is not in query string */
/* POTENTIAL FLAW: Parse id param out of the URL querystring (without using getParam) */
{
StringTokenizer tokenizer = new StringTokenizer(request.getQueryString(), "&");
while (tokenizer.hasMoreTokens())
{
String token = tokenizer.nextToken(); /* a token will be like "id=33" */
if(token.startsWith("id=")) /* check if we have the "id" parameter" */
{
try
{
data = Integer.parseInt(token.substring(3)); /* set data to the int 33 */
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception reading id from query string", exceptNumberFormat);
}
break; /* exit while loop */
}
}
}
dataCopy = data;
}
{
int data = dataCopy;
/* FIX: Add a check to prevent an underflow from occurring */
if (data > Integer.MIN_VALUE)
{
data--;
int result = (int)(data);
IO.writeLine("result: " + result);
}
else
{
IO.writeLine("data value is too small to decrement.");
}
}
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"[email protected]"
] | |
bcca3b96b239fd13c189972301f4702f1a9cce32
|
13663c831903d536ef2e2627f3b8b617982f31a7
|
/src/main/java/com/fisc/decletatfinanciertableau/security/jwt/JWTFilter.java
|
819861ea5c7ca092944d7421797084f38bb83c26
|
[] |
no_license
|
sandalothier/jhipster-decletatfinancierTableau
|
d9767c33cf7a8a43f5d3ebac033ed9207fac2760
|
1b06360df19e3361521d56e247faaeef60a3d40b
|
refs/heads/master
| 2022-12-23T16:11:43.313471
| 2019-12-19T11:43:58
| 2019-12-19T11:43:58
| 229,042,890
| 0
| 0
| null | 2022-12-16T04:42:29
| 2019-12-19T11:43:50
|
Java
|
UTF-8
|
Java
| false
| false
| 1,859
|
java
|
package com.fisc.decletatfinanciertableau.security.jwt;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.util.StringUtils;
import org.springframework.web.filter.GenericFilterBean;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
/**
* Filters incoming requests and installs a Spring Security principal if a header corresponding to a valid user is
* found.
*/
public class JWTFilter extends GenericFilterBean {
public static final String AUTHORIZATION_HEADER = "Authorization";
private TokenProvider tokenProvider;
public JWTFilter(TokenProvider tokenProvider) {
this.tokenProvider = tokenProvider;
}
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
throws IOException, ServletException {
HttpServletRequest httpServletRequest = (HttpServletRequest) servletRequest;
String jwt = resolveToken(httpServletRequest);
if (StringUtils.hasText(jwt) && this.tokenProvider.validateToken(jwt)) {
Authentication authentication = this.tokenProvider.getAuthentication(jwt);
SecurityContextHolder.getContext().setAuthentication(authentication);
}
filterChain.doFilter(servletRequest, servletResponse);
}
private String resolveToken(HttpServletRequest request){
String bearerToken = request.getHeader(AUTHORIZATION_HEADER);
if (StringUtils.hasText(bearerToken) && bearerToken.startsWith("Bearer ")) {
return bearerToken.substring(7);
}
return null;
}
}
|
[
"[email protected]"
] | |
e4e2f680d0b301936df9968d9d612d12cf451264
|
0a532b9d7ebc356ab684a094b3cf840b6b6a17cd
|
/java-source/src/main/com/sun/org/apache/xpath/internal/operations/Or.java
|
92716eee6977055c7465ba77169318e1630ba8ac
|
[
"Apache-2.0"
] |
permissive
|
XWxiaowei/JavaCode
|
ac70d87cdb0dfc6b7468acf46c84565f9d198e74
|
a7e7cd7a49c36db3ee479216728dd500eab9ebb2
|
refs/heads/master
| 2022-12-24T10:21:28.144227
| 2020-08-22T08:01:43
| 2020-08-22T08:01:43
| 98,070,624
| 10
| 4
|
Apache-2.0
| 2022-12-16T04:23:38
| 2017-07-23T02:51:51
|
Java
|
UTF-8
|
Java
| false
| false
| 2,360
|
java
|
/*
* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* Copyright 1999-2004 The Apache Software Foundation.
*
* 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.
*/
/*
* $Id: Or.java,v 1.2.4.1 2005/09/14 21:31:41 jeffsuttor Exp $
*/
package com.sun.org.apache.xpath.internal.operations;
import com.sun.org.apache.xpath.internal.XPathContext;
import com.sun.org.apache.xpath.internal.objects.XBoolean;
import com.sun.org.apache.xpath.internal.objects.XObject;
/**
* The 'or' operation expression executer.
*/
public class Or extends Operation
{
static final long serialVersionUID = -644107191353853079L;
/**
* OR two expressions and return the boolean result. Override
* superclass method for optimization purposes.
*
* @param xctxt The runtime execution context.
*
* @return {@link com.sun.org.apache.xpath.internal.objects.XBoolean#S_TRUE} or
* {@link com.sun.org.apache.xpath.internal.objects.XBoolean#S_FALSE}.
*
* @throws javax.xml.transform.TransformerException
*/
public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
{
XObject expr1 = m_left.execute(xctxt);
if (!expr1.bool())
{
XObject expr2 = m_right.execute(xctxt);
return expr2.bool() ? XBoolean.S_TRUE : XBoolean.S_FALSE;
}
else
return XBoolean.S_TRUE;
}
/**
* Evaluate this operation directly to a boolean.
*
* @param xctxt The runtime execution context.
*
* @return The result of the operation as a boolean.
*
* @throws javax.xml.transform.TransformerException
*/
public boolean bool(XPathContext xctxt)
throws javax.xml.transform.TransformerException
{
return (m_left.bool(xctxt) || m_right.bool(xctxt));
}
}
|
[
"[email protected]"
] | |
d3bed82f87a2cd6b3078114c707597aea43bd5bb
|
efd638c93ad741380ada689bd3c4dfb397cce8dd
|
/app/src/main/java/com/knwedu/ourschool/OfflineUpdater.java
|
d956a5f41c80822304954e7012160786373b6e2c
|
[] |
no_license
|
raisahab-ritwik/MY_CPS
|
fa6d69bf99aa1f6976318f767aa5e8a0aff3b6cf
|
eeb74e5604498d4d309846e03304fb9f30700800
|
refs/heads/master
| 2020-03-12T06:56:59.658729
| 2018-04-21T17:33:32
| 2018-04-21T17:33:32
| 130,496,725
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 699
|
java
|
package com.knwedu.ourschool;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.support.annotation.Nullable;
import android.util.Log;
/**
* Created by ddasgupta on 3/15/2016.
*/
public class OfflineUpdater extends Service {
static final String Tag="ServiceUpdater";
@Override
public void onCreate() {
super.onCreate();
Log.d(Tag, "Service Created");
}
@Override
public void onStart(Intent intent, int startId) {
Log.d(Tag,"Service Started");
super.onStart(intent, startId);
}
@Nullable
@Override
public IBinder onBind(Intent intent) {
return null;
}
}
|
[
"[email protected]"
] | |
be63cf5669f28de464e4783a29836772c6696d63
|
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
|
/bin/platform/bootstrap/gensrc/de/hybris/platform/validation/model/constraints/TypeConstraintModel.java
|
4c94109c0bb5682fb3d2926914792c72743c9b5f
|
[] |
no_license
|
jp-developer0/hybrisTrail
|
82165c5b91352332a3d471b3414faee47bdb6cee
|
a0208ffee7fee5b7f83dd982e372276492ae83d4
|
refs/heads/master
| 2020-12-03T19:53:58.652431
| 2020-01-02T18:02:34
| 2020-01-02T18:02:34
| 231,430,332
| 0
| 4
| null | 2020-08-05T22:46:23
| 2020-01-02T17:39:15
| null |
UTF-8
|
Java
| false
| false
| 2,967
|
java
|
/*
* ----------------------------------------------------------------
* --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! ---
* --- Generated at 2 ene. 2020 14:28:39 ---
* ----------------------------------------------------------------
*
* [y] hybris Platform
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.validation.model.constraints;
import de.hybris.platform.core.model.ItemModel;
import de.hybris.platform.servicelayer.model.ItemModelContext;
import de.hybris.platform.validation.model.constraints.AbstractConstraintModel;
/**
* Generated model class for type TypeConstraint first defined at extension validation.
* <p>
* Type constraint definition.
*/
@SuppressWarnings("all")
public class TypeConstraintModel extends AbstractConstraintModel
{
/**<i>Generated model type code constant.</i>*/
public static final String _TYPECODE = "TypeConstraint";
/**
* <i>Generated constructor</i> - Default constructor for generic creation.
*/
public TypeConstraintModel()
{
super();
}
/**
* <i>Generated constructor</i> - Default constructor for creation with existing context
* @param ctx the model context to be injected, must not be null
*/
public TypeConstraintModel(final ItemModelContext ctx)
{
super(ctx);
}
/**
* <i>Generated constructor</i> - Constructor with all mandatory attributes.
* @deprecated since 4.1.1 Please use the default constructor without parameters
* @param _annotation initial attribute declared by type <code>AbstractConstraint</code> at extension <code>validation</code>
* @param _id initial attribute declared by type <code>AbstractConstraint</code> at extension <code>validation</code>
*/
@Deprecated(since = "4.1.1", forRemoval = true)
public TypeConstraintModel(final Class _annotation, final String _id)
{
super();
setAnnotation(_annotation);
setId(_id);
}
/**
* <i>Generated constructor</i> - for all mandatory and initial attributes.
* @deprecated since 4.1.1 Please use the default constructor without parameters
* @param _annotation initial attribute declared by type <code>AbstractConstraint</code> at extension <code>validation</code>
* @param _id initial attribute declared by type <code>AbstractConstraint</code> at extension <code>validation</code>
* @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code>
*/
@Deprecated(since = "4.1.1", forRemoval = true)
public TypeConstraintModel(final Class _annotation, final String _id, final ItemModel _owner)
{
super();
setAnnotation(_annotation);
setId(_id);
setOwner(_owner);
}
}
|
[
"[email protected]"
] | |
08ea69a35504448366763533fab33cc7bffbdfa2
|
29acc5b6a535dfbff7c625f5513871ba55554dd2
|
/aws-java-sdk-logs/src/main/java/com/amazonaws/services/logs/model/InvalidParameterException.java
|
820f2ce5485365e5b66d643e9f41912745c8ff8f
|
[
"JSON",
"Apache-2.0"
] |
permissive
|
joecastro/aws-sdk-java
|
b2d25f6a503110d156853836b49390d2889c4177
|
fdbff1d42a73081035fa7b0f172b9b5c30edf41f
|
refs/heads/master
| 2021-01-21T16:52:46.982971
| 2016-01-11T22:55:28
| 2016-01-11T22:55:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,163
|
java
|
/*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.logs.model;
import com.amazonaws.AmazonServiceException;
/**
* <p>
* Returned if a parameter of the request is incorrectly specified.
* </p>
*/
public class InvalidParameterException extends AmazonServiceException {
private static final long serialVersionUID = 1L;
/**
* Constructs a new InvalidParameterException with the specified error
* message.
*
* @param message
* Describes the error encountered.
*/
public InvalidParameterException(String message) {
super(message);
}
}
|
[
"[email protected]"
] | |
58b89738a0a230103a9e42f3de4f46ef21b20b29
|
f82f8ddbba4f6e8f8d2a7d1339966398913968bb
|
/Lecher/형남/java03/Exxx.java
|
62a4cbc35a6941fd56023979c0dab6eaf4d3dc67
|
[] |
no_license
|
gunee7/workspace
|
66dd0e0151f1f1e3d316c38976fadded6da70398
|
c962907b6e0859062fc05078e9c9f43e6b62dcff
|
refs/heads/master
| 2021-05-07T15:14:04.814560
| 2018-02-20T09:07:17
| 2018-02-20T09:07:17
| 114,836,940
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 472
|
java
|
package java03;
import java.util.Scanner;
public class Exxx {
public static void main(String[] args){
Scanner keyboard = new Scanner(System.in);
System.out.print("k의 값을 입력하세요. : ");
int k = keyboard.nextInt();
if(k==0){
System.out.println("A");
} else if(k>3) {
System.out.println("B");
} else {
System.out.println("C");
}
}
}
|
[
"[email protected]"
] | |
37bc24c213c97ee186f1aad91b9fb13fd9b161fe
|
fb0fe0dd4947b34b377f12b9f3de0681d4dd590f
|
/src/main/java/com/redhat/emergency/response/incident/finder/rest/IncidentEndpoint.java
|
bfb13fe19ba3d7afbfe3734b14d793ed1e5aefff
|
[] |
no_license
|
btison/emergency-response-demo-incident-finder-service
|
ed64f11f7e07040c811e09f36f6ca8116fe7bad6
|
c363664730a35b4fe08dccdbcb6997c2da091c87
|
refs/heads/master
| 2020-12-03T04:45:25.783839
| 2020-06-30T21:40:14
| 2020-06-30T21:49:51
| 231,207,622
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,063
|
java
|
package com.redhat.emergency.response.incident.finder.rest;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import com.redhat.emergency.response.incident.finder.model.Incident;
import com.redhat.emergency.response.incident.finder.streams.InteractiveQueries;
@ApplicationScoped
@Path("/")
public class IncidentEndpoint {
@Inject
InteractiveQueries interactiveQueries;
@GET
@Path("/incident/{id}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response getIncident(@PathParam("id") String id) {
Incident result = interactiveQueries.getIncident(id);
if (result == null) {
return Response.status(Response.Status.NOT_FOUND.getStatusCode()).build();
} else {
return Response.ok(result).build();
}
}
}
|
[
"[email protected]"
] | |
b2929292c98f257cfc860578cb35a0e53b17b8b9
|
9623f83defac3911b4780bc408634c078da73387
|
/powercraft/temp/src/minecraft/net/minecraft/src/EnumOptionsHelper.java
|
21218d3e62bb0e439a14a48c13b2770d0b98b9df
|
[] |
no_license
|
BlearStudio/powercraft-legacy
|
42b839393223494748e8b5d05acdaf59f18bd6c6
|
014e9d4d71bd99823cf63d4fbdb65c1b83fde1f8
|
refs/heads/master
| 2021-01-21T21:18:55.774908
| 2015-04-06T20:45:25
| 2015-04-06T20:45:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,512
|
java
|
package net.minecraft.src;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.src.EnumOptions;
@SideOnly(Side.CLIENT)
// $FF: synthetic class
class EnumOptionsHelper {
// $FF: synthetic field
static final int[] field_74414_a = new int[EnumOptions.values().length];
static {
try {
field_74414_a[EnumOptions.INVERT_MOUSE.ordinal()] = 1;
} catch (NoSuchFieldError var15) {
;
}
try {
field_74414_a[EnumOptions.VIEW_BOBBING.ordinal()] = 2;
} catch (NoSuchFieldError var14) {
;
}
try {
field_74414_a[EnumOptions.ANAGLYPH.ordinal()] = 3;
} catch (NoSuchFieldError var13) {
;
}
try {
field_74414_a[EnumOptions.ADVANCED_OPENGL.ordinal()] = 4;
} catch (NoSuchFieldError var12) {
;
}
try {
field_74414_a[EnumOptions.AMBIENT_OCCLUSION.ordinal()] = 5;
} catch (NoSuchFieldError var11) {
;
}
try {
field_74414_a[EnumOptions.RENDER_CLOUDS.ordinal()] = 6;
} catch (NoSuchFieldError var10) {
;
}
try {
field_74414_a[EnumOptions.CHAT_COLOR.ordinal()] = 7;
} catch (NoSuchFieldError var9) {
;
}
try {
field_74414_a[EnumOptions.CHAT_LINKS.ordinal()] = 8;
} catch (NoSuchFieldError var8) {
;
}
try {
field_74414_a[EnumOptions.CHAT_LINKS_PROMPT.ordinal()] = 9;
} catch (NoSuchFieldError var7) {
;
}
try {
field_74414_a[EnumOptions.USE_SERVER_TEXTURES.ordinal()] = 10;
} catch (NoSuchFieldError var6) {
;
}
try {
field_74414_a[EnumOptions.SNOOPER_ENABLED.ordinal()] = 11;
} catch (NoSuchFieldError var5) {
;
}
try {
field_74414_a[EnumOptions.USE_FULLSCREEN.ordinal()] = 12;
} catch (NoSuchFieldError var4) {
;
}
try {
field_74414_a[EnumOptions.ENABLE_VSYNC.ordinal()] = 13;
} catch (NoSuchFieldError var3) {
;
}
try {
field_74414_a[EnumOptions.SHOW_CAPE.ordinal()] = 14;
} catch (NoSuchFieldError var2) {
;
}
try {
field_74414_a[EnumOptions.TOUCHSCREEN.ordinal()] = 15;
} catch (NoSuchFieldError var1) {
;
}
}
}
|
[
"[email protected]@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c"
] |
[email protected]@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c
|
a99d09e2542391d0044b3091dcdad371a3e3b9d7
|
bb448de9035032578768a9951ddd55f98ac3f5d9
|
/task-server/src/main/java/com/fuli/task/server/TaskApplication.java
|
6625708bbd761ad4ac5dfe8c7d4e38b6c45c9c32
|
[] |
no_license
|
zhangdongsheng1991/fuli-basic-platform1
|
61476969a74449f5f05452205044336844846cdd
|
ee7d7bdda01651a0ddb4507cd083e6af42266335
|
refs/heads/master
| 2022-06-22T12:56:38.025301
| 2020-01-13T10:14:53
| 2020-01-13T10:14:53
| 233,567,009
| 0
| 0
| null | 2022-06-17T02:51:13
| 2020-01-13T10:13:15
|
Java
|
UTF-8
|
Java
| false
| false
| 1,096
|
java
|
package com.fuli.task.server;
import com.fuli.logtrace.annotation.EnableLogTraceConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
/**
* 任务调度服务
* @Author create by XYJ
* @Date 2019/10/11 12:52
**/
@EnableLogTraceConfig //开启日志追踪
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
public class TaskApplication {
/**
* 开启 @LoadBalanced 与 Ribbon 的集成
* @return
*/
// @LoadBalanced
@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
}
public static void main(String[] args) {
SpringApplication.run(TaskApplication.class, args);
}
}
|
[
"[email protected]"
] | |
d3a880d52b26ecb0fdad8518b90ddf2822024afd
|
ecb8b37613fb3c41bb58e90a23c5383a0444e490
|
/clients-k8s/src/main/java/com/simplyti/service/clients/k8s/serviceaccounts/NamespacedServiceAccounts.java
|
cdb0a84ed874f607cadffdc976ab9be612789b8c
|
[] |
no_license
|
simplyti/simple-server
|
56d232ded25198a17c92c9b732b7a5986933aff8
|
edb32f6db6d3bb38ce3400a904f8e942817d385b
|
refs/heads/master
| 2022-12-22T10:38:54.273652
| 2022-04-10T19:31:25
| 2022-04-10T19:31:25
| 129,148,945
| 6
| 1
| null | 2022-12-12T21:44:11
| 2018-04-11T20:15:54
|
Java
|
UTF-8
|
Java
| false
| false
| 414
|
java
|
package com.simplyti.service.clients.k8s.serviceaccounts;
import com.simplyti.service.clients.k8s.common.NamespacedK8sApi;
import com.simplyti.service.clients.k8s.serviceaccounts.builder.ServiceAccountBuilder;
import com.simplyti.service.clients.k8s.serviceaccounts.domain.ServiceAccount;
public interface NamespacedServiceAccounts extends NamespacedK8sApi<ServiceAccount> {
ServiceAccountBuilder builder();
}
|
[
"[email protected]"
] | |
73547895dcb17792b4310b4f88e50c354ac01846
|
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
|
/src/testcases/CWE470_Unsafe_Reflection/CWE470_Unsafe_Reflection__console_readLine_07.java
|
766ebb12ea286a44d1c95dc903a55cd66b15b8f4
|
[] |
no_license
|
bqcuong/Juliet-Test-Case
|
31e9c89c27bf54a07b7ba547eddd029287b2e191
|
e770f1c3969be76fdba5d7760e036f9ba060957d
|
refs/heads/master
| 2020-07-17T14:51:49.610703
| 2019-09-03T16:22:58
| 2019-09-03T16:22:58
| 206,039,578
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,135
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE470_Unsafe_Reflection__console_readLine_07.java
Label Definition File: CWE470_Unsafe_Reflection.label.xml
Template File: sources-sink-07.tmpl.java
*/
/*
* @description
* CWE: 470 Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')
* BadSource: console_readLine Read data from the console using readLine()
* GoodSource: Set data to a hardcoded class name
* BadSink: Instantiate class named in data
* Flow Variant: 07 Control flow: if(privateFive==5) and if(privateFive!=5)
*
* */
package testcases.CWE470_Unsafe_Reflection;
import testcasesupport.*;
import javax.servlet.http.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.logging.Level;
public class CWE470_Unsafe_Reflection__console_readLine_07 extends AbstractTestCase
{
/* The variable below is not declared "final", but is never assigned
* any other value so a tool should be able to identify that reads of
* this will always give its initialized value.
*/
private int privateFive = 5;
/* uses badsource and badsink */
public void bad() throws Throwable
{
String data;
if (privateFive == 5)
{
data = ""; /* Initialize data */
{
InputStreamReader readerInputStream = null;
BufferedReader readerBuffered = null;
/* read user input from console with readLine */
try
{
readerInputStream = new InputStreamReader(System.in, "UTF-8");
readerBuffered = new BufferedReader(readerInputStream);
/* POTENTIAL FLAW: Read data from the console using readLine */
data = readerBuffered.readLine();
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO);
}
finally
{
try
{
if (readerBuffered != null)
{
readerBuffered.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO);
}
try
{
if (readerInputStream != null)
{
readerInputStream.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO);
}
}
}
/* NOTE: Tools may report a flaw here because buffread and isr are not closed. Unfortunately, closing those will close System.in, which will cause any future attempts to read from the console to fail and throw an exception */
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = null;
}
/* POTENTIAL FLAW: Instantiate object of class named in data (which may be from external input) */
Class<?> tempClass = Class.forName(data);
Object tempClassObject = tempClass.newInstance();
IO.writeLine(tempClassObject.toString()); /* Use tempClassObject in some way */
}
/* goodG2B1() - use goodsource and badsink by changing privateFive==5 to privateFive!=5 */
private void goodG2B1() throws Throwable
{
String data;
if (privateFive != 5)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = null;
}
else
{
/* FIX: Use a hardcoded class name */
data = "Testing.test";
}
/* POTENTIAL FLAW: Instantiate object of class named in data (which may be from external input) */
Class<?> tempClass = Class.forName(data);
Object tempClassObject = tempClass.newInstance();
IO.writeLine(tempClassObject.toString()); /* Use tempClassObject in some way */
}
/* goodG2B2() - use goodsource and badsink by reversing statements in if */
private void goodG2B2() throws Throwable
{
String data;
if (privateFive == 5)
{
/* FIX: Use a hardcoded class name */
data = "Testing.test";
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = null;
}
/* POTENTIAL FLAW: Instantiate object of class named in data (which may be from external input) */
Class<?> tempClass = Class.forName(data);
Object tempClassObject = tempClass.newInstance();
IO.writeLine(tempClassObject.toString()); /* Use tempClassObject in some way */
}
public void good() throws Throwable
{
goodG2B1();
goodG2B2();
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"[email protected]"
] | |
51610ed189253fa54bdf44580195394bc56c1075
|
01b098e4495d49cd7be48609e70b5d87c78b7023
|
/docker/LIME Testbench/LimeTB/source/limec/src/main/java/fi/hut/ics/lime/isl_c/frontend/DoxygenRunner.java
|
c15674435f0e5732f1357894ffd8ac2ea9b6b4b1
|
[] |
no_license
|
megamart2/integration
|
0d4f184f5aed44a3d78678a9813479d62709e9bb
|
7b6ee547f60493ab99f0e569f20c2024e6583041
|
refs/heads/master
| 2020-04-16T19:43:28.037748
| 2020-03-20T10:33:07
| 2020-03-20T10:33:07
| 165,871,359
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,676
|
java
|
/**
* This class is responsible for running the third-party Doxygen tool so
* it generates XML representations of C source files. In other parts
* of the program, we read the XML, convert it into a representation of
* the program and then create aspect(s) from the representation.
*
* @author lharpf
*/
package fi.hut.ics.lime.isl_c.frontend;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import fi.hut.ics.lime.isl_c.Settings;
public class DoxygenRunner {
public DoxygenRunner() {
}
/**
* Runs the Doxygen document generator in the path indicated by the File
* pathToUse. When run, Doxygen generates XML files representing the
* structure of the C source files in the directory specified by
* pathToUse.
*
* @param pathToUse a directory indicating the path to run Doxygen in
*/
public void run(File pathToUse) throws IOException {
//System.out.print("Test1\n");
if (Settings.isVerbose()) {
System.out.print("Running doxygen on " + pathToUse.getAbsolutePath() +
" ... ");
}
//System.out.print("Test2\n");
if (!pathToUse.exists()) {
throw new IOException("ERROR: Directory " +
pathToUse.getAbsolutePath() +
" doesn't exist.");
} else if(!pathToUse.isDirectory()) {
throw new IOException("ERROR: " + pathToUse.getAbsolutePath() +
" is not a directory. Please give a " +
"directory name rather than a file name.");
}
//System.out.print("Test3\n");
Runtime rt = Runtime.getRuntime();
//System.out.print("Test4\n");
// Read the Doxygen config file from the JAR and output it to our
// temporary directory
BufferedInputStream bis = new BufferedInputStream(
getClass().getResourceAsStream("/fi/hut/ics/lime/isl_c/frontend/Doxyfile"));
//System.out.print("Test5\n");
File output = new File(pathToUse.getCanonicalPath() + File.separator +
"Doxyfile");
//System.out.print("Test6\n");
BufferedOutputStream bos = new BufferedOutputStream(
new FileOutputStream(output));
//System.out.print("Test7\n");
byte[] b = new byte[bis.available()];
bis.read(b);
bos.write(b, 0, b.length);
bis.close();
bos.close();
//System.out.print("Test8\n");
String[] appNameAndParam = new String[]{"doxygen", output.getCanonicalPath()};
Process doxygen = rt.exec(appNameAndParam, null, pathToUse);
//System.out.print("Test9\n");
try {
doxygen.waitFor();
} catch (InterruptedException ie) {
// do nothing
}
if (Settings.isVerbose()) {
System.out.println("Done.");
}
}
}
|
[
"[email protected]"
] | |
203ff328523ba84e78ed7e068d6bb00d1840ba9f
|
9d32980f5989cd4c55cea498af5d6a413e08b7a2
|
/A92s_10_0_0/src/main/java/com/android/server/location/OppoLbsCustomize.java
|
e01de5c6b718aaf4b57e05abc5320bb23b9c4e55
|
[] |
no_license
|
liuhaosource/OppoFramework
|
e7cc3bcd16958f809eec624b9921043cde30c831
|
ebe39acabf5eae49f5f991c5ce677d62b683f1b6
|
refs/heads/master
| 2023-06-03T23:06:17.572407
| 2020-11-30T08:40:07
| 2020-11-30T08:40:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,619
|
java
|
package com.android.server.location;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.OppoMirrorProcess;
import android.os.SystemProperties;
import android.provider.Settings;
import android.util.Log;
import com.android.server.connectivity.networkrecovery.dnsresolve.StringUtils;
import com.android.server.location.interfaces.IPswLbsCustomize;
import java.text.SimpleDateFormat;
import java.util.Date;
public class OppoLbsCustomize implements IPswLbsCustomize {
private static final String CTS_VERSION_PROPERTIES = "persist.sys.cta";
public static final String GPS_OPCUSTOM_FEATURE = "persist.sys.gps_disable";
private static final int MAX_PID = 32768;
private static final String TAG = "OppoLbsCustomize";
private static OppoLbsCustomize mInstall = null;
private Context mContext = null;
private boolean mIsCtaVersion = false;
private boolean mIsDisableForSpec = false;
private PackageManager mPackageManager;
private OppoLbsCustomize(Context context) {
this.mContext = context;
this.mPackageManager = this.mContext.getPackageManager();
this.mIsDisableForSpec = SystemProperties.getInt(GPS_OPCUSTOM_FEATURE, 0) != 1 ? false : true;
if (this.mIsDisableForSpec) {
Settings.Secure.putInt(this.mContext.getContentResolver(), "location_mode", 0);
}
this.mIsCtaVersion = SystemProperties.getBoolean(CTS_VERSION_PROPERTIES, false);
}
public static OppoLbsCustomize getInstall(Context context) {
if (mInstall == null) {
mInstall = new OppoLbsCustomize(context);
}
return mInstall;
}
public boolean isForceGnssDisabled() {
return this.mIsDisableForSpec;
}
public void getAppInfoForTr(String methodName, String providerName, int pid, String packageName) {
if (this.mIsCtaVersion) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date currentTime = new Date(System.currentTimeMillis());
CharSequence appName = packageName;
try {
appName = this.mPackageManager.getApplicationLabel(this.mPackageManager.getApplicationInfo(packageName, 0));
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
if (pid <= 0 || pid > MAX_PID) {
Log.e(TAG, "getAppInfoForTr: pid out of range, pid:" + String.valueOf(pid));
return;
}
String processName = StringUtils.EMPTY;
if (OppoMirrorProcess.getProcessNameByPid != null) {
processName = (String) OppoMirrorProcess.getProcessNameByPid.call(new Object[]{Integer.valueOf(pid)});
}
Log.d("ctaifs", simpleDateFormat.format(currentTime) + " <" + ((Object) appName) + ">[" + "location" + "][" + processName + "]:[" + methodName + "." + providerName + "]" + "location" + "[" + providerName + "." + providerName + "]");
}
}
public void setDebug(boolean isDebug) {
FastNetworkLocation.setDebug(isDebug);
OppoCoarseToFine.setDebug(isDebug);
OppoGnssDiagnosticTool.setDebug(isDebug);
OppoGnssDuration.setDebug(isDebug);
OppoGnssWhiteListProxy.setDebug(isDebug);
OppoLbsRomUpdateUtil.setDebug(isDebug);
OppoLocationBlacklistUtil.setDebug(isDebug);
OppoLocationStatistics.setDebug(isDebug);
OppoNetworkUtil.setDebug(isDebug);
OppoNlpProxy.setDebug(isDebug);
OppoSuplController.setDebug(isDebug);
}
}
|
[
"[email protected]"
] | |
d6f3961d8676cc2e28106145a3af60c448736c91
|
56456387c8a2ff1062f34780b471712cc2a49b71
|
/com/google/android/gms/internal/zzhf$2.java
|
67206c39d277a43fe6a5ae8c337c79e0bda4d3d8
|
[] |
no_license
|
nendraharyo/presensimahasiswa-sourcecode
|
55d4b8e9f6968eaf71a2ea002e0e7f08d16c5a50
|
890fc86782e9b2b4748bdb9f3db946bfb830b252
|
refs/heads/master
| 2020-05-21T11:21:55.143420
| 2019-05-10T19:03:56
| 2019-05-10T19:03:56
| 186,022,425
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,446
|
java
|
package com.google.android.gms.internal;
import android.content.Context;
import java.util.Map;
class zzhf$2
implements zzdf
{
zzhf$2(zzhf paramzzhf) {}
public void zza(zzjp paramzzjp, Map paramMap)
{
Object localObject1 = this.zzJm;
for (;;)
{
Object localObject5;
boolean bool2;
synchronized (zzhf.zza((zzhf)localObject1))
{
localObject1 = this.zzJm;
localObject1 = zzhf.zzb((zzhf)localObject1);
boolean bool1 = ((zzjd)localObject1).isDone();
if (bool1) {
return;
}
localObject5 = new com/google/android/gms/internal/zzhi;
int i = -2;
((zzhi)localObject5).<init>(i, paramMap);
localObject1 = this.zzJm;
localObject1 = zzhf.zzc((zzhf)localObject1);
localObject6 = ((zzhi)localObject5).getRequestId();
bool2 = ((String)localObject1).equals(localObject6);
if (!bool2)
{
localObject1 = new java/lang/StringBuilder;
((StringBuilder)localObject1).<init>();
localObject5 = ((zzhi)localObject5).getRequestId();
localObject1 = ((StringBuilder)localObject1).append((String)localObject5);
localObject5 = " ==== ";
localObject1 = ((StringBuilder)localObject1).append((String)localObject5);
localObject5 = this.zzJm;
localObject5 = zzhf.zzc((zzhf)localObject5);
localObject1 = ((StringBuilder)localObject1).append((String)localObject5);
localObject1 = ((StringBuilder)localObject1).toString();
zzin.zzaK((String)localObject1);
}
}
Object localObject6 = ((zzhi)localObject5).getUrl();
Object localObject3;
if (localObject6 == null)
{
localObject3 = "URL missing in loadAdUrl GMSG.";
zzin.zzaK((String)localObject3);
}
else
{
localObject3 = "%40mediation_adapters%40";
bool2 = ((String)localObject6).contains((CharSequence)localObject3);
if (bool2)
{
Object localObject7 = paramzzjp.getContext();
localObject3 = "check_adapters";
localObject3 = paramMap.get(localObject3);
localObject3 = (String)localObject3;
Object localObject8 = this.zzJm;
localObject8 = zzhf.zzd((zzhf)localObject8);
localObject3 = zzil.zza((Context)localObject7, (String)localObject3, (String)localObject8);
localObject7 = "%40mediation_adapters%40";
localObject3 = ((String)localObject6).replaceAll((String)localObject7, (String)localObject3);
((zzhi)localObject5).setUrl((String)localObject3);
localObject6 = new java/lang/StringBuilder;
((StringBuilder)localObject6).<init>();
localObject7 = "Ad request URL modified to ";
localObject6 = ((StringBuilder)localObject6).append((String)localObject7);
localObject3 = ((StringBuilder)localObject6).append((String)localObject3);
localObject3 = ((StringBuilder)localObject3).toString();
zzin.v((String)localObject3);
}
localObject3 = this.zzJm;
localObject3 = zzhf.zzb((zzhf)localObject3);
((zzjd)localObject3).zzg(localObject5);
}
}
}
}
/* Location: C:\Users\haryo\Desktop\enjarify-master\presensi-enjarify.jar!\com\google\android\gms\internal\zzhf$2.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/
|
[
"[email protected]"
] | |
e4faea6c313b56d5c27987cbb65d98d53db1ca1b
|
56656ce6a15700cdd0108d3e94016da24433538b
|
/src/main/java/org/pentaho/ui/xul/components/XulScale.java
|
83fcb93329f62ac34ec98bb44f36cd7ed543495d
|
[] |
no_license
|
tlw-ray/one-kettle
|
6bc60574a936ee8e2b741fefe6060f8e40166637
|
d2763edbdf1463d7a6e770f5182ea66525e1da61
|
refs/heads/master
| 2020-07-25T07:43:28.989714
| 2019-10-19T00:28:20
| 2019-10-19T00:28:20
| 208,218,415
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,324
|
java
|
/*!
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software
* Foundation.
*
* You should have received a copy of the GNU Lesser General Public License along with this
* program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
* or from the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* Copyright (c) 2002-2017 Hitachi Vantara.. All rights reserved.
*/
package org.pentaho.ui.xul.components;
import org.pentaho.ui.xul.XulComponent;
public interface XulScale extends XulComponent {
void setOrient(String orient);
String getOrient();
void setMin(int min);
int getMin();
void setMax(int max);
int getMax();
void setPageincrement(int increment);
int getPageincrement();
void setInc(int increment);
int getInc();
void setValue(int value);
int getValue();
void setDir(String direction);
String getDir();
}
|
[
"[email protected]"
] | |
3c2a3755b3fcb812c5d6056eb2d0c1815d12d907
|
8b9190a8c5855d5753eb8ba7003e1db875f5d28f
|
/sources/com/facebook/react/common/ArrayUtils.java
|
1e3e9682c0473404a6ab77d1aa4cb3300a854385
|
[] |
no_license
|
stevehav/iowa-caucus-app
|
6aeb7de7487bd800f69cb0b51cc901f79bd4666b
|
e3c7eb39de0be6bbfa8b6b063aaa85dcbcee9044
|
refs/heads/master
| 2020-12-29T10:25:28.354117
| 2020-02-05T23:15:52
| 2020-02-05T23:15:52
| 238,565,283
| 21
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 520
|
java
|
package com.facebook.react.common;
import java.util.Arrays;
import java.util.List;
public class ArrayUtils {
public static float[] copyArray(float[] fArr) {
if (fArr == null) {
return null;
}
return Arrays.copyOf(fArr, fArr.length);
}
public static int[] copyListToArray(List<Integer> list) {
int[] iArr = new int[list.size()];
for (int i = 0; i < list.size(); i++) {
iArr[i] = list.get(i).intValue();
}
return iArr;
}
}
|
[
"[email protected]"
] | |
207481270e4f3d29288fbc703f05675c8285983b
|
abeb432f9ee60ee6d17373c492b1e506f360530e
|
/src/每日一题/x的平方根.java
|
c65bb4264924c87807b472a0c2cf290c2a319783
|
[] |
no_license
|
xiaotao1234/-xt-
|
f15e8cf743b182296a6a749aca9a9a8dea184cfb
|
f31ba40c37371254b869ea25d51a06ec969c5d08
|
refs/heads/master
| 2022-11-17T21:33:47.243151
| 2020-07-21T00:32:07
| 2020-07-21T00:32:07
| 265,557,263
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 482
|
java
|
package 每日一题;
/**
* @author xt
* @version 1.0
* @date 2020/5/9 21:37
*/
public class x的平方根 {
public int mySqrt(int x) {
long left = 0;
long right = x / 2 - 1;
while (left < right) {
long mid = (left + right + 1) >>> 1;
long seq = mid * mid;
if (seq > x) {
right = mid - 1;
} else {
left = mid;
}
}
return (int) left;
}
}
|
[
"[email protected]"
] | |
16173caf63d1139e7a1bcfb5dd142b24787e059c
|
7417d844ff6910b389303c552d9a0755986e6d19
|
/app/src/main/java/com/taa/videohd/MainActivity.java
|
371e4161dfc4b3cf07c161c88d2d0e82659463e5
|
[] |
no_license
|
trungptdhcn/VideoHD
|
52fee37f9d920445678595791cece807fe694630
|
b51eace89f1ea06d89ed150c73a168cd82cde1ac
|
refs/heads/master
| 2021-01-10T01:58:53.661529
| 2016-01-17T11:18:02
| 2016-01-17T11:18:02
| 49,814,215
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,705
|
java
|
package com.taa.videohd;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.util.Base64;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import butterknife.Bind;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
import com.ogaclejapan.smarttablayout.SmartTabLayout;
import com.ogaclejapan.smarttablayout.utils.v4.FragmentPagerItem;
import com.ogaclejapan.smarttablayout.utils.v4.FragmentPagerItemAdapter;
import com.ogaclejapan.smarttablayout.utils.v4.FragmentPagerItems;
import com.taa.videohd.base.BaseActivity;
import com.taa.videohd.ui.fragment.DailymotionFragment;
import com.taa.videohd.ui.fragment.DownloadTaskFragment;
import com.taa.videohd.ui.fragment.VimeoFragment;
import com.taa.videohd.ui.fragment.YoutubeFragment;
import com.trungpt.videodownloadmaster.R;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class MainActivity extends BaseActivity
{
@Bind(R.id.activity_main_viewpager)
ViewPager viewPager;
@Bind(R.id.activity_main_tab)
ViewGroup flTabContainer;
// @Bind(R.id.ivLogo)
// ImageView ivLogo;
// @Bind(R.id.toolbar)
// Toolbar toolbar;
FragmentPagerItems pages;
FragmentPagerItemAdapter adapter;
private Tracker mTracker;
@Override
public void setDataToView(Bundle savedInstanceState)
{
try
{
PackageInfo info = getPackageManager().getPackageInfo(
"com.taa.videohd",
PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures)
{
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Log.d("Your Tag", Base64.encodeToString(md.digest(), Base64.DEFAULT));
}
}
catch (PackageManager.NameNotFoundException e)
{
}
catch (NoSuchAlgorithmException e)
{
}
MyApplication application = (MyApplication) getApplication();
mTracker = application.getDefaultTracker();
flTabContainer.addView(LayoutInflater.from(this).inflate(R.layout.tab_main, flTabContainer, false));
final SmartTabLayout tabLayout = (SmartTabLayout) findViewById(R.id.tab_indicator_menu_viewpagertab);
viewPager.setOffscreenPageLimit(5);
pages = new FragmentPagerItems(this);
pages.add(FragmentPagerItem.of("Youtube", YoutubeFragment.class));
pages.add(FragmentPagerItem.of("Vimeo Video", VimeoFragment.class));
pages.add(FragmentPagerItem.of("Dailymotion Video", DailymotionFragment.class));
SharedPreferences prefs = this.getSharedPreferences(
"com.taa.videohd", Context.MODE_PRIVATE);
int config = prefs.getInt("key_isDisplay", -1);
if (config == 1)
{
pages.add(FragmentPagerItem.of("Download Task", DownloadTaskFragment.class));
}
adapter = new FragmentPagerItemAdapter(
getSupportFragmentManager(), pages);
viewPager.setAdapter(adapter);
tabLayout.setViewPager(viewPager);
}
@Override
public int getLayout()
{
return R.layout.activity_main;
}
public void otherFragment(int position)
{
viewPager.setCurrentItem(position);
}
@Override
public void onResume()
{
super.onResume();
}
}
|
[
"[email protected]"
] | |
7b8348aa07bff0b0c4965c3afefb60f9d85f1813
|
b29f59595bdff1e7fad71fb875da3e4cf5cf4310
|
/src/main/java/com/rar/deliveryauthuser/DeliveryAuthUserApplication.java
|
a24bddec687e354a1596203f9e3212b600cc5194
|
[] |
no_license
|
ricardoaruiz/delivery-auth-user
|
1db1edf1811a8410fbfd2e7fdf23556f844adbc3
|
8a3259ebb1b9e9564721b6cbd09460cd9f4e8427
|
refs/heads/master
| 2020-04-06T19:37:59.055594
| 2018-11-15T19:50:01
| 2018-11-15T19:50:01
| 157,743,768
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 924
|
java
|
package com.rar.deliveryauthuser;
//import org.h2.server.web.WebServlet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
@SpringBootApplication
@EnableEurekaClient
public class DeliveryAuthUserApplication {
public static void main(String[] args) {
SpringApplication.run(DeliveryAuthUserApplication.class, args);
}
// Para voltar a usar o H2, habilitar a dependencia no build.gradle e descomentar as linhas dessa classe
// @Bean
// public ServletRegistrationBean h2servletRegistration() {
// ServletRegistrationBean registration = new ServletRegistrationBean(new WebServlet());
// registration.addUrlMappings("/h2/*");
// return registration;
// }
}
|
[
"[email protected]"
] | |
d4c180319475e645ca7a77fca32f853da58681f4
|
01b23223426a1eb84d4f875e1a6f76857d5e8cd9
|
/icefaces3/tags/icefaces-3.1.0.ALPHA2/icefaces/tutorials/dateTimeEntry-yearRange-tutorial/src/main/java/com/icesoft/icefaces/tutorial/component/dateTimeEntry/yearRange/DateTimeEntryBean.java
|
56c9918da2c19f28d72dfc3f4f2ff3e401ea608e
|
[
"Apache-2.0"
] |
permissive
|
numbnet/icesoft
|
8416ac7e5501d45791a8cd7806c2ae17305cdbb9
|
2f7106b27a2b3109d73faf85d873ad922774aeae
|
refs/heads/master
| 2021-01-11T04:56:52.145182
| 2016-11-04T16:43:45
| 2016-11-04T16:43:45
| 72,894,498
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 917
|
java
|
package com.icesoft.icefaces.tutorial.component.dateTimeEntry.yearRange;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
@ManagedBean
@SessionScoped
public class DateTimeEntryBean {
private Date selectedDate;
private String yearRange = "c-5:c+5";
public DateTimeEntryBean() throws ParseException {
selectedDate = new SimpleDateFormat("yyyy-M-d H:m z").parse("2010-4-30 13:9 Pacific Daylight Time");
}
public Date getSelectedDate() {
return selectedDate;
}
public void setSelectedDate(Date selectedDate) {
this.selectedDate = selectedDate;
}
public String getYearRange() {
return yearRange;
}
public void setYearRange(String yearRange) {
this.yearRange = yearRange;
}
}
|
[
"ken.fyten@8668f098-c06c-11db-ba21-f49e70c34f74"
] |
ken.fyten@8668f098-c06c-11db-ba21-f49e70c34f74
|
d094fe9cabf3b6140b1fc9d33a9a5b1d1e86c365
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-new-fitness/results/XRENDERING-481-1-20-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/org/xwiki/rendering/internal/macro/toc/TreeParametersBuilder_ESTest.java
|
25ac4c43643fc8de707d068edb3d0666322de87f
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,848
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri Oct 29 13:17:17 UTC 2021
*/
package org.xwiki.rendering.internal.macro.toc;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.util.Map;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.ViolatedAssumptionAnswer;
import org.evosuite.runtime.javaee.injection.Injector;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.xwiki.component.embed.EmbeddableComponentManager;
import org.xwiki.properties.BeanManager;
import org.xwiki.rendering.block.MacroBlock;
import org.xwiki.rendering.internal.macro.toc.TreeParametersBuilder;
import org.xwiki.rendering.internal.transformation.macro.MacroTransformation;
import org.xwiki.rendering.listener.Listener;
import org.xwiki.rendering.macro.MacroManager;
import org.xwiki.rendering.macro.toc.TocMacroParameters;
import org.xwiki.rendering.transformation.MacroTransformationContext;
import org.xwiki.rendering.transformation.RenderingContext;
import org.xwiki.rendering.util.ErrorBlockGenerator;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class TreeParametersBuilder_ESTest extends TreeParametersBuilder_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
EmbeddableComponentManager embeddableComponentManager0 = new EmbeddableComponentManager();
MacroTransformationContext macroTransformationContext0 = new MacroTransformationContext();
EmbeddableComponentManager embeddableComponentManager1 = new EmbeddableComponentManager();
MacroTransformation macroTransformation0 = new MacroTransformation();
BeanManager beanManager0 = mock(BeanManager.class, new ViolatedAssumptionAnswer());
Injector.inject(macroTransformation0, (Class<?>) MacroTransformation.class, "beanManager", (Object) beanManager0);
ErrorBlockGenerator errorBlockGenerator0 = mock(ErrorBlockGenerator.class, new ViolatedAssumptionAnswer());
Map<String, String> map0 = Listener.EMPTY_PARAMETERS;
MacroBlock macroBlock0 = new MacroBlock(";2", map0, ";2", false);
macroTransformationContext0.setCurrentMacroBlock(macroBlock0);
Injector.inject(macroTransformation0, (Class<?>) MacroTransformation.class, "errorBlockGenerator", (Object) errorBlockGenerator0);
Logger logger0 = mock(Logger.class, new ViolatedAssumptionAnswer());
Injector.inject(macroTransformation0, (Class<?>) MacroTransformation.class, "logger", (Object) logger0);
MacroManager macroManager0 = mock(MacroManager.class, new ViolatedAssumptionAnswer());
Injector.inject(macroTransformation0, (Class<?>) MacroTransformation.class, "macroManager", (Object) macroManager0);
RenderingContext renderingContext0 = mock(RenderingContext.class, new ViolatedAssumptionAnswer());
Injector.inject(macroTransformation0, (Class<?>) MacroTransformation.class, "renderingContext", (Object) renderingContext0);
Injector.validateBean(macroTransformation0, (Class<?>) MacroTransformation.class);
macroTransformationContext0.setTransformation(macroTransformation0);
TocMacroParameters tocMacroParameters0 = new TocMacroParameters();
tocMacroParameters0.setNumbered(false);
TocMacroParameters.Scope tocMacroParameters_Scope0 = TocMacroParameters.Scope.LOCAL;
tocMacroParameters0.setScope(tocMacroParameters_Scope0);
TreeParametersBuilder treeParametersBuilder0 = new TreeParametersBuilder();
TocMacroParameters tocMacroParameters1 = new TocMacroParameters();
// Undeclared exception!
treeParametersBuilder0.build(macroBlock0, tocMacroParameters0, macroTransformationContext0);
}
}
|
[
"[email protected]"
] | |
899aa391b7da40c95a7b657e5f2d6c8baebec6b9
|
31c84ce527b46ea5b5143a26fb40e8488b503c6a
|
/GWT-Grundlagen-Maven/module1002/src/main/java/de/gishmo/gwt/example/module1002/client/ui/detail/DetailPlace.java
|
a11569f6044634c3ccf1985b56893d03bbb28226
|
[
"Apache-2.0"
] |
permissive
|
FrankHossfeld/Training
|
cdaa69610cc151380d6cea8919663a616cc73e7f
|
430db23d2859ce517ea7901393eda0d112b43c38
|
refs/heads/master
| 2022-11-23T05:03:29.882014
| 2022-06-23T15:40:06
| 2022-06-23T15:40:06
| 68,102,948
| 1
| 0
|
Apache-2.0
| 2022-11-16T03:16:44
| 2016-09-13T11:38:45
|
Java
|
UTF-8
|
Java
| false
| false
| 1,679
|
java
|
/*
* Copyright 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package de.gishmo.gwt.example.module1002.client.ui.detail;
import com.google.gwt.place.shared.Place;
import com.google.gwt.place.shared.PlaceTokenizer;
import com.google.gwt.place.shared.Prefix;
public class DetailPlace
extends Place {
private long id;
//------------------------------------------------------------------------------
public DetailPlace(long id) {
super();
this.id = id;
}
//------------------------------------------------------------------------------
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
//------------------------------------------------------------------------------
@Prefix("de")
public static class Tokenizer
implements PlaceTokenizer<DetailPlace> {
public DetailPlace getPlace(String token) {
try {
Long id = Long.parseLong(token);
return new DetailPlace(id);
} catch (Exception e) {
return new DetailPlace(0);
}
}
public String getToken(DetailPlace place) {
return Long.toString(place.getId());
}
}
}
|
[
"[email protected]"
] | |
2c90bb2b1d8d2147b6c9422fac0151889c85859e
|
9d1870a895c63f540937f04a6285dd25ada5e52a
|
/chromecast-app-reverse-engineering/src/from-androguard-dad-broken-but-might-help/cso.java
|
7c259b51294aed1f46843b275257de332d380720
|
[] |
no_license
|
Churritosjesus/Chromecast-Reverse-Engineering
|
572aa97eb1fd65380ca0549b4166393505328ed4
|
29fae511060a820f2500a4e6e038dfdb591f4402
|
refs/heads/master
| 2023-06-04T10:27:15.869608
| 2015-10-27T10:43:11
| 2015-10-27T10:43:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 179
|
java
|
cso()
{
return;
}
protected final synthetic Object initialValue()
{
String[] v0_1 = new String[4];
return v0_1;
}
|
[
"[email protected]"
] | |
7487a122cc9ce159c96cc8d7976913cbe1e623f2
|
07202104e1d91620105367ca8eb13e5af6b41653
|
/hw08-spring-orm-library/src/test/java/ru/geracimov/otus/spring/hw10libraryjpa/domain/AuthorTest.java
|
62fc98f5c844e46825d8a5b53f6799aaca14f861
|
[] |
no_license
|
geracimov/otus-spring-2018-2
|
691f55f2c0fbd2c4a1eb5b3f9fbb80afb01ba369
|
3152dadf71d21a1e960a0d4df9e41614f8fb2413
|
refs/heads/master
| 2022-10-15T13:29:48.404582
| 2019-10-02T20:07:51
| 2019-10-02T20:07:51
| 182,581,028
| 0
| 0
| null | 2022-09-08T01:02:59
| 2019-04-21T20:49:27
|
Java
|
UTF-8
|
Java
| false
| false
| 869
|
java
|
package ru.geracimov.otus.spring.hw10libraryjpa.domain;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManager;
import ru.geracimov.otus.spring.hw08libraryorm.domain.Author;
import java.time.LocalDate;
import java.util.UUID;
import static org.assertj.core.api.Assertions.assertThat;
//@RunWith(SpringRunner.class)
@DataJpaTest
public class AuthorTest {
@Autowired
TestEntityManager em;
@Test
public void saveAndGet() {
Author a = new Author("name", LocalDate.now());
UUID uuid = (UUID) em.persistAndGetId(a);
System.out.println(uuid);
Author aDb = em.find(Author.class, uuid);
assertThat(aDb).isEqualTo(a);
}
}
|
[
"[email protected]"
] | |
a5276f94889c116f1e2d71efb60c5fdd5cf5ac86
|
318f01d9c7d6d5615c32eaf3a48b38e72c89dec6
|
/thirdpp-trust-channel/src/main/java/com/zendaimoney/trust/channel/exception/PlatformErrorCode.java
|
4b723c7c9d3208a21c2ef36656b4e29b46007abc
|
[] |
no_license
|
ichoukou/thirdapp
|
dce52f5df2834f79a51895475b995a3e758be8c0
|
aae0a1596e06992b600a1a442723b833736240e3
|
refs/heads/master
| 2020-05-03T03:12:33.064089
| 2018-04-18T06:00:14
| 2018-04-18T06:00:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,119
|
java
|
package com.zendaimoney.trust.channel.exception;
/**
* 异常代码,加入默认说明,这样减少配置文件的写入了
*/
public enum PlatformErrorCode {
//检验错误,0开头
VALIDATE_ISNULL("000001","{0} 为空"),
VALIDATE_OVERLENGTH("000002","{0} 过长"),
VALIDATE_ILLEGAL_MULTIVALUE("000003","{0} 应该为 [{1}]"),
ERROR_CODE_MESSAGE_NULL("000004","{0} validate提示信息未配置"),
ERROR_CODE_MESSAGE_FORMAT_BAD("000005","{0} validate提示信息格式不对"),
//系统错误,1开头
DEFAULT("100001", "默认,无具体信息"),
UNKNOWN_ERROR("100002", "未知错误"),
DB_ERROR("100003", "数据库操作错误"),
PARAM_ERROR("100004", "参数错误"),
SYSTEM_BUSY("100005","系统忙,请稍后再试"),
XML_VALIDATE_ERROR("100006", "xml格式校验错误"),
TRUST_PROXY_ERROR("100007","代理器运行错误"),
//业务错误,3开头
CHANNEL_SOCKET_ERROR("300000","SOCKET通信异常"),
CMB_PARSE_ERROR("300001", "返回响应报文异常 解析错误"),
READ_CONFIG_ERROR("300002","读取配置文件错误"),
DTO_ENCODE_ERROR("300003","数据传递对象编码错误"),
DTO_DECODE_ERROR("300004","数据传递对象解码错误"),
CHANNEL_NOT_FOUND_ERROR("300005", "业务通道不存在或已关闭"),
CHANNEL_START_ERROR("300006", "通道初始化错误"),
CHANNEL_BIZ_NOT_FOUND_ERROR("300007", "业务通道类型不存在"),
CHANNEL_FILE_DOWNLOAD_ERROR("300008", "文件下载失败"),
CHANNEL_FILE_PARSE_ERROR("300009", "文件解析失败"),
CHANNEL_FILE_MKDIR_ERROR("300010","TPP创建文件异常"),
CHANNEL_FTP_MKDIR_ERROR("300011","FTP创建文件失败"),
CHANNEL_FTP_CHANGE_PATH_ERROR("300012","FTP切换目录失败"),
VO_2_DTO_ERROR("300013","VO转换 错误"),
BATCH_OPER_UPDATE_ERROR("300014","批量操作更新错误"),
;
private String code;
private String defaultMessage;
PlatformErrorCode(String code, String defaultMessage) {
this.code = code;
this.defaultMessage = defaultMessage;
}
public String getErrorCode() {
return this.code;
}
public String getDefaultMessage() {
return defaultMessage;
}
}
|
[
"[email protected]"
] | |
71397d70e9d4fa646f3602f2eeda891061844f28
|
c8664fc194971e6e39ba8674b20d88ccfa7663b1
|
/com/tencent/mm/plugin/backup/h/o.java
|
a7ad95041999946769019d796054b4b6f0e2b471
|
[] |
no_license
|
raochuan/wexin1120
|
b926bc8d4143c4b523ed43e265cd20ef0c89ad40
|
1eaa71e1e3e7c9f9b9f96db8de56db3dfc4fb4d3
|
refs/heads/master
| 2020-05-17T23:57:00.000696
| 2017-11-03T02:33:27
| 2017-11-03T02:33:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,366
|
java
|
package com.tencent.mm.plugin.backup.h;
import b.a.a.b;
import com.tencent.gmtrace.GMTrace;
import java.util.LinkedList;
public final class o
extends com.tencent.mm.bl.a
{
public String ID;
public long jXg;
public m jXj;
public int jXl;
public long jXm;
public long jXn;
public int jXo;
public int jXp;
public o()
{
GMTrace.i(14831730032640L, 110505);
GMTrace.o(14831730032640L, 110505);
}
protected final int a(int paramInt, Object... paramVarArgs)
{
GMTrace.i(14831864250368L, 110506);
if (paramInt == 0)
{
paramVarArgs = (b.a.a.c.a)paramVarArgs[0];
if (this.ID == null) {
throw new b("Not all required fields were included: ID");
}
if (this.ID != null) {
paramVarArgs.e(1, this.ID);
}
paramVarArgs.R(2, this.jXm);
paramVarArgs.R(3, this.jXn);
paramVarArgs.fd(4, this.jXo);
paramVarArgs.fd(5, this.jXp);
paramVarArgs.R(6, this.jXg);
if (this.jXj != null)
{
paramVarArgs.ff(7, this.jXj.aWM());
this.jXj.a(paramVarArgs);
}
paramVarArgs.fd(8, this.jXl);
GMTrace.o(14831864250368L, 110506);
return 0;
}
int i;
if (paramInt == 1)
{
paramInt = 0;
if (this.ID != null) {
paramInt = b.a.a.b.b.a.f(1, this.ID) + 0;
}
i = paramInt + b.a.a.a.Q(2, this.jXm) + b.a.a.a.Q(3, this.jXn) + b.a.a.a.fa(4, this.jXo) + b.a.a.a.fa(5, this.jXp) + b.a.a.a.Q(6, this.jXg);
paramInt = i;
if (this.jXj != null) {
paramInt = i + b.a.a.a.fc(7, this.jXj.aWM());
}
i = b.a.a.a.fa(8, this.jXl);
GMTrace.o(14831864250368L, 110506);
return paramInt + i;
}
if (paramInt == 2)
{
paramVarArgs = new b.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler);
for (paramInt = com.tencent.mm.bl.a.a(paramVarArgs); paramInt > 0; paramInt = com.tencent.mm.bl.a.a(paramVarArgs)) {
if (!super.a(paramVarArgs, this, paramInt)) {
paramVarArgs.cpJ();
}
}
if (this.ID == null) {
throw new b("Not all required fields were included: ID");
}
GMTrace.o(14831864250368L, 110506);
return 0;
}
if (paramInt == 3)
{
Object localObject1 = (b.a.a.a.a)paramVarArgs[0];
o localo = (o)paramVarArgs[1];
paramInt = ((Integer)paramVarArgs[2]).intValue();
switch (paramInt)
{
default:
GMTrace.o(14831864250368L, 110506);
return -1;
case 1:
localo.ID = ((b.a.a.a.a)localObject1).xSv.readString();
GMTrace.o(14831864250368L, 110506);
return 0;
case 2:
localo.jXm = ((b.a.a.a.a)localObject1).xSv.nn();
GMTrace.o(14831864250368L, 110506);
return 0;
case 3:
localo.jXn = ((b.a.a.a.a)localObject1).xSv.nn();
GMTrace.o(14831864250368L, 110506);
return 0;
case 4:
localo.jXo = ((b.a.a.a.a)localObject1).xSv.nm();
GMTrace.o(14831864250368L, 110506);
return 0;
case 5:
localo.jXp = ((b.a.a.a.a)localObject1).xSv.nm();
GMTrace.o(14831864250368L, 110506);
return 0;
case 6:
localo.jXg = ((b.a.a.a.a)localObject1).xSv.nn();
GMTrace.o(14831864250368L, 110506);
return 0;
case 7:
paramVarArgs = ((b.a.a.a.a)localObject1).FK(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
Object localObject2 = (byte[])paramVarArgs.get(paramInt);
localObject1 = new m();
localObject2 = new b.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (boolean bool = true; bool; bool = ((m)localObject1).a((b.a.a.a.a)localObject2, (com.tencent.mm.bl.a)localObject1, com.tencent.mm.bl.a.a((b.a.a.a.a)localObject2))) {}
localo.jXj = ((m)localObject1);
paramInt += 1;
}
GMTrace.o(14831864250368L, 110506);
return 0;
}
localo.jXl = ((b.a.a.a.a)localObject1).xSv.nm();
GMTrace.o(14831864250368L, 110506);
return 0;
}
GMTrace.o(14831864250368L, 110506);
return -1;
}
}
/* Location: /Users/xianghongyan/decompile/dex2jar/classes2-dex2jar.jar!/com/tencent/mm/plugin/backup/h/o.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"[email protected]"
] | |
1212489f3691d1a0be5ea8d1f573e6bcb4e7c12d
|
7fee790d4d50b25e17ad679346d0876783a121bd
|
/src/main/java/chap3/phaser_test6_2/extthread/PThreadC.java
|
60aeadaea9face24fedce1d98c1ba6a46629ed58
|
[] |
no_license
|
hjy628/concurrency-practice
|
e9523a2c941cbf27ca8c26d394bd370af946650b
|
ea2437e024e22efe7e1a38efdebb91931733088f
|
refs/heads/master
| 2021-05-07T03:10:30.509441
| 2017-11-23T08:12:33
| 2017-11-23T08:12:33
| 110,631,352
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 374
|
java
|
package chap3.phaser_test6_2.extthread;
import chap3.phaser_test6_2.service.MyService;
/**
* Created by hjy on 17-11-15.
*/
public class PThreadC extends Thread{
private MyService service;
public PThreadC(MyService service) {
super();
this.service = service;
}
@Override
public void run() {
service.testMethodB();
}
}
|
[
"[email protected]"
] | |
8d304424d3382f8623be51acf96b602f5a4f5f02
|
f8597d77251a459f91f49f662d11be4190f847f5
|
/src/main/java/io/github/socraticphoenix/jource/ast/value/JavaSourceLiteralArray.java
|
7a351958cea447cf09ad50d836e4423f48537145
|
[] |
no_license
|
SocraticPhoenix/Jource
|
630e6c369a04f720266516357a09a64c42506c5e
|
058fc2ed642e856c069872c097982c2fb83d622d
|
refs/heads/master
| 2022-04-24T03:57:34.357678
| 2020-04-23T03:46:54
| 2020-04-23T03:46:54
| 84,269,867
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,387
|
java
|
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 [email protected]
* Copyright (c) 2016 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.
*/
package io.github.socraticphoenix.jource.ast.value;
import io.github.socraticphoenix.jource.ast.JavaSourceContext;
import io.github.socraticphoenix.jource.ast.type.JavaSourceNamespace;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class JavaSourceLiteralArray<T extends JavaSourceLiteral> implements JavaSourceLiteral<Object[]> {
private List<T> literals;
private JavaSourceNamespace type;
public JavaSourceLiteralArray(JavaSourceNamespace component) {
this.literals = new ArrayList<>();
this.type = component.array(component.getArray() + 1);
}
public JavaSourceLiteralArray addElement(T element) {
this.literals.add(element);
return this;
}
public List<T> getLiterals() {
return this.literals;
}
@Override
public String write(int indent, JavaSourceContext context) {
StringBuilder builder = new StringBuilder();
builder.append("new ").append(this.type.write(indent + 1, context)).append("{");
for (int i = 0; i < this.literals.size(); i++) {
builder.append(this.literals.get(i).write(indent + 1, context));
if(i < this.literals.size() - 1) {
builder.append(", ");
}
}
builder.append("}");
return builder.toString();
}
@Override
public String writeConstant(JavaSourceContext context) {
StringBuilder builder = new StringBuilder();
builder.append("{");
for (int i = 0; i < this.literals.size(); i++) {
builder.append(this.literals.get(i).write(context));
if(i < this.literals.size() - 1) {
builder.append(", ");
}
}
builder.append("}");
return builder.toString();
}
@Override
public boolean usesIndents() {
return false;
}
@Override
public JavaSourceNamespace type() {
return this.type;
}
@Override
public List<JavaSourceNamespace> associatedTypes() {
return Collections.singletonList(this.type());
}
@Override
public Object[] value() {
return this.literals.toArray();
}
}
|
[
"[email protected]"
] | |
76a3ed6f7dce3fed525d9c2c6a3d91bb366ff4ad
|
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
|
/sources/com/facebook/react/modules/debug/FpsDebugFrameCallback.java
|
cdc433130101662bba8d0f4f6689daa83e337ba5
|
[] |
no_license
|
jasonnth/AirCode
|
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
|
d37db1baa493fca56f390c4205faf5c9bbe36604
|
refs/heads/master
| 2020-07-03T08:35:24.902940
| 2019-08-12T03:34:56
| 2019-08-12T03:34:56
| 201,842,970
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,991
|
java
|
package com.facebook.react.modules.debug;
import android.annotation.TargetApi;
import android.view.Choreographer;
import android.view.Choreographer.FrameCallback;
import com.facebook.infer.annotation.Assertions;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.uimanager.UIManagerModule;
import java.util.Map.Entry;
import java.util.TreeMap;
@TargetApi(16)
public class FpsDebugFrameCallback implements FrameCallback {
private static final double EXPECTED_FRAME_TIME = 16.9d;
private int m4PlusFrameStutters = 0;
private final Choreographer mChoreographer;
private final DidJSUpdateUiDuringFrameDetector mDidJSUpdateUiDuringFrameDetector;
private int mExpectedNumFramesPrev = 0;
private long mFirstFrameTime = -1;
private boolean mIsRecordingFpsInfoAtEachFrame = false;
private long mLastFrameTime = -1;
private int mNumFrameCallbacks = 0;
private int mNumFrameCallbacksWithBatchDispatches = 0;
private final ReactContext mReactContext;
private boolean mShouldStop = false;
private TreeMap<Long, FpsInfo> mTimeToFps;
private final UIManagerModule mUIManagerModule;
public static class FpsInfo {
public final double fps;
public final double jsFps;
public final int total4PlusFrameStutters;
public final int totalExpectedFrames;
public final int totalFrames;
public final int totalJsFrames;
public final int totalTimeMs;
public FpsInfo(int totalFrames2, int totalJsFrames2, int totalExpectedFrames2, int total4PlusFrameStutters2, double fps2, double jsFps2, int totalTimeMs2) {
this.totalFrames = totalFrames2;
this.totalJsFrames = totalJsFrames2;
this.totalExpectedFrames = totalExpectedFrames2;
this.total4PlusFrameStutters = total4PlusFrameStutters2;
this.fps = fps2;
this.jsFps = jsFps2;
this.totalTimeMs = totalTimeMs2;
}
}
public FpsDebugFrameCallback(Choreographer choreographer, ReactContext reactContext) {
this.mChoreographer = choreographer;
this.mReactContext = reactContext;
this.mUIManagerModule = (UIManagerModule) reactContext.getNativeModule(UIManagerModule.class);
this.mDidJSUpdateUiDuringFrameDetector = new DidJSUpdateUiDuringFrameDetector();
}
public void doFrame(long l) {
if (!this.mShouldStop) {
if (this.mFirstFrameTime == -1) {
this.mFirstFrameTime = l;
}
long lastFrameStartTime = this.mLastFrameTime;
this.mLastFrameTime = l;
if (this.mDidJSUpdateUiDuringFrameDetector.getDidJSHitFrameAndCleanup(lastFrameStartTime, l)) {
this.mNumFrameCallbacksWithBatchDispatches++;
}
this.mNumFrameCallbacks++;
int expectedNumFrames = getExpectedNumFrames();
if ((expectedNumFrames - this.mExpectedNumFramesPrev) - 1 >= 4) {
this.m4PlusFrameStutters++;
}
if (this.mIsRecordingFpsInfoAtEachFrame) {
Assertions.assertNotNull(this.mTimeToFps);
this.mTimeToFps.put(Long.valueOf(System.currentTimeMillis()), new FpsInfo(getNumFrames(), getNumJSFrames(), expectedNumFrames, this.m4PlusFrameStutters, getFPS(), getJSFPS(), getTotalTimeMS()));
}
this.mExpectedNumFramesPrev = expectedNumFrames;
this.mChoreographer.postFrameCallback(this);
}
}
public void start() {
this.mShouldStop = false;
this.mReactContext.getCatalystInstance().addBridgeIdleDebugListener(this.mDidJSUpdateUiDuringFrameDetector);
this.mUIManagerModule.setViewHierarchyUpdateDebugListener(this.mDidJSUpdateUiDuringFrameDetector);
this.mChoreographer.postFrameCallback(this);
}
public void startAndRecordFpsAtEachFrame() {
this.mTimeToFps = new TreeMap<>();
this.mIsRecordingFpsInfoAtEachFrame = true;
start();
}
public void stop() {
this.mShouldStop = true;
this.mReactContext.getCatalystInstance().removeBridgeIdleDebugListener(this.mDidJSUpdateUiDuringFrameDetector);
this.mUIManagerModule.setViewHierarchyUpdateDebugListener(null);
}
public double getFPS() {
if (this.mLastFrameTime == this.mFirstFrameTime) {
return 0.0d;
}
return (((double) getNumFrames()) * 1.0E9d) / ((double) (this.mLastFrameTime - this.mFirstFrameTime));
}
public double getJSFPS() {
if (this.mLastFrameTime == this.mFirstFrameTime) {
return 0.0d;
}
return (((double) getNumJSFrames()) * 1.0E9d) / ((double) (this.mLastFrameTime - this.mFirstFrameTime));
}
public int getNumFrames() {
return this.mNumFrameCallbacks - 1;
}
public int getNumJSFrames() {
return this.mNumFrameCallbacksWithBatchDispatches - 1;
}
public int getExpectedNumFrames() {
return (int) ((((double) getTotalTimeMS()) / EXPECTED_FRAME_TIME) + 1.0d);
}
public int get4PlusFrameStutters() {
return this.m4PlusFrameStutters;
}
public int getTotalTimeMS() {
return ((int) (((double) this.mLastFrameTime) - ((double) this.mFirstFrameTime))) / 1000000;
}
public FpsInfo getFpsInfo(long upToTimeMs) {
Assertions.assertNotNull(this.mTimeToFps, "FPS was not recorded at each frame!");
Entry<Long, FpsInfo> bestEntry = this.mTimeToFps.floorEntry(Long.valueOf(upToTimeMs));
if (bestEntry == null) {
return null;
}
return (FpsInfo) bestEntry.getValue();
}
public void reset() {
this.mFirstFrameTime = -1;
this.mLastFrameTime = -1;
this.mNumFrameCallbacks = 0;
this.m4PlusFrameStutters = 0;
this.mNumFrameCallbacksWithBatchDispatches = 0;
this.mIsRecordingFpsInfoAtEachFrame = false;
this.mTimeToFps = null;
}
}
|
[
"[email protected]"
] | |
bdb7059c7cef48117b73254479ab9a6ebf3d369b
|
dcfdbc7add93212f59ce7a11f1a518e90f152e24
|
/Spring-mvc-Anno2-GetEmp/src/main/java/com/spring/bo/BOimp.java
|
4ddf2079d9cef5b54f54d352b84148dc164fe1f6
|
[] |
no_license
|
deepndra9755/springmvc
|
5564a7793e73cafe323364b6cc28931e5dee211f
|
508cb209ec501e95b0067a17a380e8ff2cbf6fe8
|
refs/heads/master
| 2023-07-02T06:21:01.238739
| 2021-08-08T01:46:19
| 2021-08-08T01:46:19
| 393,670,802
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 538
|
java
|
package com.spring.bo;
public class BOimp {
//ID,NAME,LAST,ROLL
int id;
String Name;
String last;
int roll;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return Name;
}
public void setName(String name) {
Name = name;
}
public String getLast() {
return last;
}
public void setLast(String last) {
this.last = last;
}
public int getRoll() {
return roll;
}
public void setRoll(int roll) {
this.roll = roll;
}
}
|
[
"cotlin@DESKTOP-RNJ3PV0"
] |
cotlin@DESKTOP-RNJ3PV0
|
22dcafe51c6a1ce63ed45dcebf90e6652cac0bad
|
63152c4f60c3be964e9f4e315ae50cb35a75c555
|
/sql/core/target/java/org/apache/spark/sql/execution/streaming/MaxWatermark.java
|
cf1a4c0afc0482393caf550bfbe53c43e3a66365
|
[
"EPL-1.0",
"Classpath-exception-2.0",
"LicenseRef-scancode-unicode",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-free-unknown",
"GCC-exception-3.1",
"LGPL-2.0-or-later",
"CDDL-1.0",
"MIT",
"CC-BY-SA-3.0",
"NAIST-2003",
"LGPL-2.1-only",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-other-permissive",
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"CPL-1.0",
"CC-PDDC",
"EPL-2.0",
"CDDL-1.1",
"BSD-2-Clause",
"CC0-1.0",
"Python-2.0",
"LicenseRef-scancode-unknown"
] |
permissive
|
PowersYang/spark-cn
|
76c407d774e35d18feb52297c68c65889a75a002
|
06a0459999131ee14864a69a15746c900e815a14
|
refs/heads/master
| 2022-12-11T20:18:37.376098
| 2020-03-30T09:48:22
| 2020-03-30T09:48:22
| 219,248,341
| 0
| 0
|
Apache-2.0
| 2022-12-05T23:46:17
| 2019-11-03T03:55:17
|
HTML
|
UTF-8
|
Java
| false
| false
| 1,219
|
java
|
package org.apache.spark.sql.execution.streaming;
/**
* Policy to choose the *max* of the operator watermark values as the global watermark value. So the
* global watermark will advance if any of the individual operator watermarks has advanced.
* In other words, in a streaming query with multiple input streams and watermarks defined on all
* of them, the global watermark will advance as fast as the fastest input. So if there is watermark
* based state cleanup or late-data dropping, then this policy is the most aggressive one and
* may lead to unexpected behavior if the data of the slow stream is delayed.
*/
public class MaxWatermark {
static public long chooseGlobalWatermark (scala.collection.Seq<java.lang.Object> operatorWatermarks) { throw new RuntimeException(); }
static public abstract boolean canEqual (Object that) ;
static public abstract boolean equals (Object that) ;
static public abstract Object productElement (int n) ;
static public abstract int productArity () ;
static public scala.collection.Iterator<java.lang.Object> productIterator () { throw new RuntimeException(); }
static public java.lang.String productPrefix () { throw new RuntimeException(); }
}
|
[
"[email protected]"
] | |
8fe6a6112eca5e806e94c3cf29f2ecc43d5de8c4
|
ad0391faad8c4ea4890ca5807b914b2df68aa7fa
|
/src/main/java/de/sanandrew/mods/claysoldiers/api/entity/soldier/effect/ISoldierEffectInst.java
|
bc2f8772d6a1da0435c5045ae0e84151c34c51ce
|
[] |
no_license
|
Jorch72/ClaySoldiersMod
|
fab82edc0d32b9926aad1f408fde8a2140237bec
|
9fe0cc6f07a8e913ea2c63f66f8390eaa5dcb332
|
refs/heads/master
| 2020-03-27T19:11:17.140354
| 2018-07-27T11:58:29
| 2018-07-27T11:58:29
| 146,970,803
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 810
|
java
|
/* ******************************************************************************************************************
* Authors: SanAndreasP
* Copyright: SanAndreasP
* License: Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
* http://creativecommons.org/licenses/by-nc-sa/4.0/
*******************************************************************************************************************/
package de.sanandrew.mods.claysoldiers.api.entity.soldier.effect;
import net.minecraft.nbt.NBTTagCompound;
public interface ISoldierEffectInst
{
NBTTagCompound getNbtData();
void setNbtData(NBTTagCompound compound);
ISoldierEffect getEffect();
int getDurationLeft();
void decreaseDuration(int amount);
boolean stillActive();
}
|
[
"[email protected]"
] | |
685df484f7402cde54f7fa2fcdbc3baa7d437fe6
|
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
|
/src_cfr/com/google/security/zynamics/bindiff/gui/tabpanels/projecttabpanel/treenodepanels/charts/InstructionMatchesPie3dPanel$InternalFlowgraphCachedCountsListener.java
|
54c003e231c4e269507e3818bb8a1e5550c9088c
|
[] |
no_license
|
fjh658/bindiff
|
c98c9c24b0d904be852182ecbf4f81926ce67fb4
|
2a31859b4638404cdc915d7ed6be19937d762743
|
refs/heads/master
| 2021-01-20T06:43:12.134977
| 2016-06-29T17:09:03
| 2016-06-29T17:09:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,225
|
java
|
/*
* Decompiled with CFR 0_115.
*/
package com.google.security.zynamics.bindiff.gui.tabpanels.projecttabpanel.treenodepanels.charts;
import com.google.security.zynamics.bindiff.gui.tabpanels.projecttabpanel.treenodepanels.charts.InstructionMatchesPie3dPanel;
import com.google.security.zynamics.bindiff.gui.tabpanels.projecttabpanel.treenodepanels.charts.InstructionMatchesPie3dPanel$1;
import com.google.security.zynamics.bindiff.project.diff.DiffChangeAdapter;
class InstructionMatchesPie3dPanel$InternalFlowgraphCachedCountsListener
extends DiffChangeAdapter {
final /* synthetic */ InstructionMatchesPie3dPanel this$0;
private InstructionMatchesPie3dPanel$InternalFlowgraphCachedCountsListener(InstructionMatchesPie3dPanel instructionMatchesPie3dPanel) {
this.this$0 = instructionMatchesPie3dPanel;
}
@Override
public void instructionsCountsChanged() {
InstructionMatchesPie3dPanel.access$1000(this.this$0);
}
/* synthetic */ InstructionMatchesPie3dPanel$InternalFlowgraphCachedCountsListener(InstructionMatchesPie3dPanel instructionMatchesPie3dPanel, InstructionMatchesPie3dPanel$1 instructionMatchesPie3dPanel$1) {
this(instructionMatchesPie3dPanel);
}
}
|
[
"[email protected]"
] | |
8c78767a513bd8bc2e0541a88d67808037686c37
|
1eaaf8cabfc2fd7f7f562cc6d9ca168bb80e6b54
|
/app/src/main/java/com/hippo/ehviewer/client/data/FavListUrlBuilder.java
|
519b06c3d231ece349c077d9302eb270b5e8fea2
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"MIT",
"OFL-1.1",
"LicenseRef-scancode-unknown-license-reference",
"IJG",
"Zlib",
"EPL-1.0",
"Libpng",
"BSD-3-Clause"
] |
permissive
|
onlymash/EhViewer
|
9036365b0fb94251817cfde15f7b9a5c24154e20
|
49c51d001f7c048ae52e75854624fee4c6ac8063
|
refs/heads/master
| 2021-09-16T05:59:35.384177
| 2018-05-14T14:16:26
| 2018-05-14T14:16:26
| 121,543,695
| 18
| 1
|
Apache-2.0
| 2018-03-27T11:05:13
| 2018-02-14T18:07:09
|
Java
|
UTF-8
|
Java
| false
| false
| 3,318
|
java
|
/*
* Copyright 2016 Hippo Seven
*
* 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.hippo.ehviewer.client.data;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import android.util.Log;
import com.hippo.ehviewer.client.EhUrl;
import com.hippo.network.UrlBuilder;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
public class FavListUrlBuilder implements Parcelable {
private static final String TAG = FavListUrlBuilder.class.getSimpleName();
public static final int FAV_CAT_ALL = -1;
public static final int FAV_CAT_LOCAL = -2;
private int mIndex;
private String mKeyword;
private int mFavCat = FAV_CAT_ALL;
public void setIndex(int index) {
mIndex = index;
}
public void setKeyword(String keyword) {
mKeyword = keyword;
}
public void setFavCat(int favCat) {
mFavCat = favCat;
}
public String getKeyword() {
return mKeyword;
}
public int getFavCat() {
return mFavCat;
}
public static boolean isValidFavCat(int favCat) {
return favCat >= 0 && favCat <= 9;
}
public boolean isLocalFavCat() {
return mFavCat == FAV_CAT_LOCAL;
}
public String build() {
UrlBuilder ub = new UrlBuilder(EhUrl.getFavoritesUrl());
if (isValidFavCat(mFavCat)) {
ub.addQuery("favcat", Integer.toString(mFavCat));
}
if (!TextUtils.isEmpty(mKeyword)) {
try {
ub.addQuery("f_search", URLEncoder.encode(mKeyword, "UTF-8"));
ub.addQuery("f_apply", "Search+Favorites");
} catch (UnsupportedEncodingException e) {
Log.e(TAG, "Can't URLEncoder.encode " + mKeyword);
}
}
if (mIndex > 0) {
ub.addQuery("page", Integer.toString(mIndex));
}
return ub.build();
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(this.mIndex);
dest.writeString(this.mKeyword);
dest.writeInt(this.mFavCat);
}
public FavListUrlBuilder() {
}
protected FavListUrlBuilder(Parcel in) {
this.mIndex = in.readInt();
this.mKeyword = in.readString();
this.mFavCat = in.readInt();
}
public static final Parcelable.Creator<FavListUrlBuilder> CREATOR = new Parcelable.Creator<FavListUrlBuilder>() {
@Override
public FavListUrlBuilder createFromParcel(Parcel source) {
return new FavListUrlBuilder(source);
}
@Override
public FavListUrlBuilder[] newArray(int size) {
return new FavListUrlBuilder[size];
}
};
}
|
[
"[email protected]"
] | |
40cb7f07274f84751c50f693fbaa7602a0d53b06
|
8510169054c24a64a73013663a9aefa41c7f3047
|
/app/src/main/java/com/abcew/model/isp/lession2/IGreatTemperamentGirl.java
|
258721545d61ee69435e1c28e43c454dceede78e
|
[] |
no_license
|
joyoyao/Model
|
f06fb1006784072ff5fc3ad2b69f701d90b1586e
|
16b153bdd8013b487384058c4ed6f5a94ecef108
|
refs/heads/master
| 2020-03-22T10:10:03.469309
| 2016-12-04T08:30:31
| 2016-12-04T08:30:31
| 74,377,041
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 178
|
java
|
package com.abcew.model.isp.lession2;
/**
* Created by laputan on 16/11/26.
*/
public interface IGreatTemperamentGirl {
//要有气质
public void greatTemperament();
}
|
[
"[email protected]"
] | |
5e9ba52a70ce4e5ba93d147e7bf387d625b433ab
|
bb4bdd71c588e13d8b63980ea4f7252ad301d433
|
/samples/essential-java-demos/src/com/waylau/essentialjava/concurrency/HelloThread.java
|
20bdcf3ff5a977357d8422e2881c2f0056df7acc
|
[
"MIT"
] |
permissive
|
hakukata/essential-java
|
0ff63e7d728986f700ff0e9efd7cbdf34a47ad89
|
91433d643c3e6c48d107a7c8d49d62a19b45c98b
|
refs/heads/master
| 2021-09-04T21:52:03.329192
| 2018-01-22T13:39:07
| 2018-01-22T13:39:07
| 115,195,327
| 1
| 0
| null | 2017-12-23T12:52:45
| 2017-12-23T12:52:45
| null |
UTF-8
|
Java
| false
| false
| 378
|
java
|
/**
*
*/
package com.waylau.essentialjava.concurrency;
/**
* @author <a href="http://www.waylau.com">waylau.com</a>
* @date 2016年1月21日
*/
public class HelloThread extends Thread {
public void run() {
System.out.println("Hello from a thread!");
}
/**
* @param args
*/
public static void main(String[] args) {
(new HelloThread()).start();
}
}
|
[
"[email protected]"
] | |
307e57b9ceb441e006c98ef05da91b3176820616
|
56456387c8a2ff1062f34780b471712cc2a49b71
|
/com/google/android/gms/games/internal/game/Acls$OnGameplayAclUpdatedCallback.java
|
737e4d5a9f8543e96b7d744c24939e1d69e65ba7
|
[] |
no_license
|
nendraharyo/presensimahasiswa-sourcecode
|
55d4b8e9f6968eaf71a2ea002e0e7f08d16c5a50
|
890fc86782e9b2b4748bdb9f3db946bfb830b252
|
refs/heads/master
| 2020-05-21T11:21:55.143420
| 2019-05-10T19:03:56
| 2019-05-10T19:03:56
| 186,022,425
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 359
|
java
|
package com.google.android.gms.games.internal.game;
public abstract interface Acls$OnGameplayAclUpdatedCallback {}
/* Location: C:\Users\haryo\Desktop\enjarify-master\presensi-enjarify.jar!\com\google\android\gms\games\internal\game\Acls$OnGameplayAclUpdatedCallback.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/
|
[
"[email protected]"
] | |
974d0faf29dac942e569284550867d9b1e30cfde
|
508daa2513df51a472a2c5edb023c71cf830f18b
|
/monolito/src/main/java/br/com/spark/monolito/domain/repository/CartRepository.java
|
212abfe62c0a133ee174f0154703017955440c6d
|
[] |
no_license
|
fabriciolfj/microservices_ddd
|
c699e86ad2d0ebb2ce48b47ff6a2c561b8489415
|
b7114c4bb81ce897387fc98c3d1d6b41fded3933
|
refs/heads/master
| 2022-11-13T13:46:04.218334
| 2020-05-24T01:44:49
| 2020-05-24T01:44:49
| 264,552,237
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 442
|
java
|
package br.com.spark.monolito.domain.repository;
import br.com.spark.monolito.domain.model.Cart;
import br.com.spark.monolito.domain.model.enuns.CartStatus;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
public interface CartRepository extends JpaRepository<Cart, Long> {
List<Cart> findByStatus(CartStatus status);
List<Cart> findByStatusAndCustomerId(CartStatus status, Long customerId);
}
|
[
"[email protected]"
] | |
4b4e43425f482b821d302b9f413f453662cf0bc3
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_483/Testnull_48202.java
|
8354475dc6ddba8841c12ba52abcc278d16c172e
|
[] |
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
| 308
|
java
|
package org.gradle.test.performancenull_483;
import static org.junit.Assert.*;
public class Testnull_48202 {
private final Productionnull_48202 production = new Productionnull_48202("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"[email protected]"
] | |
9919604f1d6619062a485b9f32f2add8baa6b80e
|
17e8438486cb3e3073966ca2c14956d3ba9209ea
|
/dso/tags/4.1.2/dso-l2/src/main/java/com/tc/objectserver/persistence/ObjectIDSetMaintainer.java
|
868edafaaf16022f37a5c95cbfb36e2ee710835c
|
[] |
no_license
|
sirinath/Terracotta
|
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
|
00a7662b9cf530dfdb43f2dd821fa559e998c892
|
refs/heads/master
| 2021-01-23T05:41:52.414211
| 2015-07-02T15:21:54
| 2015-07-02T15:21:54
| 38,613,711
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,360
|
java
|
package com.tc.objectserver.persistence;
import com.tc.logging.TCLogger;
import com.tc.logging.TCLogging;
import com.tc.object.ObjectID;
import com.tc.properties.TCPropertiesConsts;
import com.tc.properties.TCPropertiesImpl;
import com.tc.util.ObjectIDSet;
import org.terracotta.corestorage.KeyValueStorageMutationListener;
import org.terracotta.corestorage.Retriever;
/**
* @author tim
*/
public class ObjectIDSetMaintainer implements KeyValueStorageMutationListener<Long, byte[]> {
private static final TCLogger logger = TCLogging.getLogger(ObjectIDSetMaintainer.class);
private final ObjectIDSet evictableObjectIDSet = new ObjectIDSet();
private final ObjectIDSet noReferencesObjectIDSet;
private final ObjectIDSet referencesObjectIDSet = new ObjectIDSet();
public ObjectIDSetMaintainer() {
String type = TCPropertiesImpl.getProperties().getProperty(TCPropertiesConsts.L2_OBJECTMANAGER_OIDSET_TYPE, true);
if (type == null) {
noReferencesObjectIDSet = new ObjectIDSet(ObjectIDSet.ObjectIDSetType.BITSET_BASED_SET);
} else {
noReferencesObjectIDSet = new ObjectIDSet(ObjectIDSet.ObjectIDSetType.valueOf(type));
logger.info("Using object id set of type " + type);
}
}
public synchronized ObjectIDSet objectIDSnapshot() {
ObjectIDSet oids = new ObjectIDSet(noReferencesObjectIDSet);
oids.addAll(referencesObjectIDSet);
return oids;
}
public synchronized ObjectIDSet evictableObjectIDSetSnapshot() {
return new ObjectIDSet(evictableObjectIDSet);
}
public synchronized boolean hasNoReferences(ObjectID id) {
return noReferencesObjectIDSet.contains(id);
}
@Override
public synchronized void added(Retriever<? extends Long> key, Retriever<? extends byte[]> value, byte metadata) {
ObjectID k = new ObjectID(key.retrieve());
if (PersistentCollectionsUtil.isEvictableMapType(metadata)) {
evictableObjectIDSet.add(k);
}
if (PersistentCollectionsUtil.isNoReferenceObjectType(metadata)) {
noReferencesObjectIDSet.add(k);
} else {
referencesObjectIDSet.add(k);
}
}
@Override
public synchronized void removed(Retriever<? extends Long> key) {
ObjectID oid = new ObjectID(key.retrieve());
evictableObjectIDSet.remove(oid);
if (!noReferencesObjectIDSet.remove(oid)) {
referencesObjectIDSet.remove(oid);
}
}
}
|
[
"cruise@7fc7bbf3-cf45-46d4-be06-341739edd864"
] |
cruise@7fc7bbf3-cf45-46d4-be06-341739edd864
|
228b328e64b9431e8b4ca8af05f6d0da1ac49ea3
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/autogen/a/ado.java
|
f9d697ddcf74b163f61c17b55e4a2d0b7b49f7ab
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 953
|
java
|
package com.tencent.mm.autogen.a;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.event.IEvent;
public final class ado
extends IEvent
{
public a ihJ;
public b ihK;
public ado()
{
this((byte)0);
}
private ado(byte paramByte)
{
AppMethodBeat.i(19848);
this.ihJ = new a();
this.ihK = new b();
this.order = false;
this.callback = null;
AppMethodBeat.o(19848);
}
public static final class a
{
public Context context;
public int hGz = 0;
public String ihL;
public Uri uri;
}
public static final class b
{
public Cursor hGA;
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes10.jar
* Qualified Name: com.tencent.mm.autogen.a.ado
* JD-Core Version: 0.7.0.1
*/
|
[
"[email protected]"
] | |
b5ec3dc2fb2b825d6f9ff417092c41746d76b6eb
|
db56dc7604b67e6e02284d42b23adaabdf2f6dd4
|
/practicas/Entrega/src/visitor/Visitor.java
|
d5fde9e315ae0134014e80b04e43877df326e322
|
[
"MIT"
] |
permissive
|
SantiMA10/DLP
|
b1a5c6c356bdeaf735e31fdaca504ff5e3311dc8
|
b2c3ae8da1d36f0e509a1459e7ebfc82f751ac4a
|
refs/heads/master
| 2021-05-01T00:12:26.039675
| 2018-01-28T11:58:39
| 2018-01-28T11:58:39
| 51,198,013
| 1
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,477
|
java
|
/**
* @generated VGen 1.3.3
*/
package visitor;
import ast.*;
public interface Visitor {
public Object visit(Programa node, Object param);
public Object visit(DefVar node, Object param);
public Object visit(Struct node, Object param);
public Object visit(Funcion node, Object param);
public Object visit(IntType node, Object param);
public Object visit(RealType node, Object param);
public Object visit(CharType node, Object param);
public Object visit(StructType node, Object param);
public Object visit(ArrayType node, Object param);
public Object visit(Parametro node, Object param);
public Object visit(If node, Object param);
public Object visit(While node, Object param);
public Object visit(Print node, Object param);
public Object visit(Read node, Object param);
public Object visit(Asignacion node, Object param);
public Object visit(Invocacion node, Object param);
public Object visit(Return node, Object param);
public Object visit(ExpresionLogica node, Object param);
public Object visit(ExpresionNumerica node, Object param);
public Object visit(AccesoArray node, Object param);
public Object visit(OperacionUnaria node, Object param);
public Object visit(AccesoStruct node, Object param);
public Object visit(Lintent node, Object param);
public Object visit(Lintreal node, Object param);
public Object visit(Lintchar node, Object param);
public Object visit(Cast node, Object param);
public Object visit(Var node, Object param);
}
|
[
"[email protected]"
] | |
9034e5ba0baacedce2c90e2edfe107777cddc979
|
f66e2ad3fc0f8c88278c0997b156f5c6c8f77f28
|
/DataStructure/Play-with-Data-Structures/src/main/java/structures/linked_recursion/Solution.java
|
891a035cba581c840200894329b89f1a711e76cc
|
[
"Apache-2.0"
] |
permissive
|
flyfire/Programming-Notes-Code
|
3b51b45f8760309013c3c0cc748311d33951a044
|
4b1bdd74c1ba0c007c504834e4508ec39f01cd94
|
refs/heads/master
| 2020-05-07T18:00:49.757509
| 2019-04-10T11:15:13
| 2019-04-10T11:15:13
| 180,750,568
| 1
| 0
|
Apache-2.0
| 2019-04-11T08:40:38
| 2019-04-11T08:40:38
| null |
UTF-8
|
Java
| false
| false
| 177
|
java
|
package structures.linked_recursion;
/**
* @author ztiany
* Email: [email protected]
*/
public interface Solution {
ListNode removeElements(ListNode head, int val);
}
|
[
"[email protected]"
] | |
4ee12d151205fd8f989e839059ee8ec13a7ddabd
|
17af0e21028783a84d8dec061e19c28268ef0a16
|
/pgql-lang/src/test/java/oracle/pgql/lang/completions/AbstractCompletionsTest.java
|
54f9924ca4e379ea8a461193c278a6a0b62854a5
|
[
"UPL-1.0",
"Apache-2.0"
] |
permissive
|
DGalstyan/pgql-lang
|
b859c5158e666b4336f9e462a9040b404b151670
|
a139b60d91ab68982d3b9c3452ba214a72a3a7c6
|
refs/heads/master
| 2021-07-04T08:43:16.457520
| 2017-09-21T03:12:45
| 2017-09-21T03:12:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,184
|
java
|
/**
* Copyright (C) 2013 - 2017 Oracle and/or its affiliates. All rights reserved.
*/
package oracle.pgql.lang.completions;
import static org.junit.Assert.assertEquals;
import java.util.List;
import java.util.stream.Collectors;
import org.junit.BeforeClass;
import oracle.pgql.lang.Pgql;
public abstract class AbstractCompletionsTest {
protected static Pgql pgql;
@BeforeClass
public static void setUp() throws Exception {
pgql = new Pgql();
}
protected abstract PgqlCompletionContext getCompletionContext();
protected void checkResult(String query, List<PgqlCompletion> expected) throws Exception {
int cursor = query.indexOf("???");
query = query.replaceAll("\\?\\?\\?", "");
List<PgqlCompletion> actual = pgql.generateCompletions(query, cursor, getCompletionContext());
String expectedAsString = expected.stream().map(c -> c.toString()).collect(Collectors.joining("\n"));
String actualAsString = actual.stream().map(c -> c.toString()).collect(Collectors.joining("\n"));
String errorMessage = "\nexpected\n\n" + expectedAsString + "\n\nactual\n\n" + actualAsString + "\n";
assertEquals(errorMessage, expected, actual);
}
}
|
[
"[email protected]"
] | |
7db46d69097b2bce53a31ff1937fd22ea3ee680d
|
82ada8f2b9753c7d97d720b396c6bda044fdf988
|
/base-framework/src/main/java/com/dingtai/android/library/video/model/VodProgramModel.java
|
5ca75d24ff26cb7c9d01cc5a9e69e352944fc0b0
|
[] |
no_license
|
xyyou123/dingtai-base-framework
|
f0dc377647b92df15c0d3f66942c5582eaefe506
|
c983c4d9c4e8456c5dec9681ee347f0f2cfb484c
|
refs/heads/master
| 2022-04-23T16:03:40.978218
| 2020-04-19T19:43:42
| 2020-04-19T19:44:12
| 257,085,196
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,686
|
java
|
package com.dingtai.android.library.video.model;
import android.os.Parcel;
import android.os.Parcelable;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
/**
* author:lnr
* date:2018/8/29
* 点播节目对象
*/
@Entity
public class VodProgramModel implements Parcelable {
@Id
private Long _id;
private String ID;
private String CreateTime;
private String ProgramContentName;
private String ProgramContentUrl;
private String ProgramDate;
private String ProgramContentLogo;
private String ProgramCommentNum;
private String VODName;
private String VODType;
private String GoodPoint;
private String VODCPID;
private String Status;
private String ReMark;
private String ReadNo;
private String authenticationflag;
public String getAuthenticationflag() {
return authenticationflag;
}
public void setAuthenticationflag(String authenticationflag) {
this.authenticationflag = authenticationflag;
}
@Generated(hash = 1787680320)
public VodProgramModel(Long _id, String ID, String CreateTime, String ProgramContentName,
String ProgramContentUrl, String ProgramDate, String ProgramContentLogo,
String ProgramCommentNum, String VODName, String VODType, String GoodPoint,
String VODCPID, String Status, String ReMark, String ReadNo,
String authenticationflag) {
this._id = _id;
this.ID = ID;
this.CreateTime = CreateTime;
this.ProgramContentName = ProgramContentName;
this.ProgramContentUrl = ProgramContentUrl;
this.ProgramDate = ProgramDate;
this.ProgramContentLogo = ProgramContentLogo;
this.ProgramCommentNum = ProgramCommentNum;
this.VODName = VODName;
this.VODType = VODType;
this.GoodPoint = GoodPoint;
this.VODCPID = VODCPID;
this.Status = Status;
this.ReMark = ReMark;
this.ReadNo = ReadNo;
this.authenticationflag = authenticationflag;
}
@Generated(hash = 1412841882)
public VodProgramModel() {
}
public String getProgramCommentNum() {
return ProgramCommentNum;
}
public void setProgramCommentNum(String programCommentNum) {
ProgramCommentNum = programCommentNum;
}
public String getVODName() {
return VODName;
}
public void setVODName(String VODName) {
this.VODName = VODName;
}
public String getVODType() {
return VODType;
}
public void setVODType(String VODType) {
this.VODType = VODType;
}
public String getGoodPoint() {
return GoodPoint;
}
public void setGoodPoint(String goodPoint) {
GoodPoint = goodPoint;
}
public Long get_id() {
return this._id;
}
public void set_id(Long _id) {
this._id = _id;
}
public String getID() {
return this.ID;
}
public void setID(String ID) {
this.ID = ID;
}
public String getCreateTime() {
return this.CreateTime;
}
public void setCreateTime(String CreateTime) {
this.CreateTime = CreateTime;
}
public String getProgramContentName() {
return this.ProgramContentName;
}
public void setProgramContentName(String ProgramContentName) {
this.ProgramContentName = ProgramContentName;
}
public String getProgramContentUrl() {
return this.ProgramContentUrl;
}
public void setProgramContentUrl(String ProgramContentUrl) {
this.ProgramContentUrl = ProgramContentUrl;
}
public String getProgramDate() {
return this.ProgramDate;
}
public void setProgramDate(String ProgramDate) {
this.ProgramDate = ProgramDate;
}
public String getProgramContentLogo() {
return this.ProgramContentLogo;
}
public void setProgramContentLogo(String ProgramContentLogo) {
this.ProgramContentLogo = ProgramContentLogo;
}
public String getVODCPID() {
return this.VODCPID;
}
public void setVODCPID(String VODCPID) {
this.VODCPID = VODCPID;
}
public String getStatus() {
return this.Status;
}
public void setStatus(String Status) {
this.Status = Status;
}
public String getReMark() {
return this.ReMark;
}
public void setReMark(String ReMark) {
this.ReMark = ReMark;
}
public String getReadNo() {
return this.ReadNo;
}
public void setReadNo(String ReadNo) {
this.ReadNo = ReadNo;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeValue(this._id);
dest.writeString(this.ID);
dest.writeString(this.CreateTime);
dest.writeString(this.ProgramContentName);
dest.writeString(this.ProgramContentUrl);
dest.writeString(this.ProgramDate);
dest.writeString(this.ProgramContentLogo);
dest.writeString(this.ProgramCommentNum);
dest.writeString(this.VODName);
dest.writeString(this.VODType);
dest.writeString(this.GoodPoint);
dest.writeString(this.VODCPID);
dest.writeString(this.Status);
dest.writeString(this.ReMark);
dest.writeString(this.ReadNo);
dest.writeString(this.authenticationflag);
}
protected VodProgramModel(Parcel in) {
this._id = (Long) in.readValue(Long.class.getClassLoader());
this.ID = in.readString();
this.CreateTime = in.readString();
this.ProgramContentName = in.readString();
this.ProgramContentUrl = in.readString();
this.ProgramDate = in.readString();
this.ProgramContentLogo = in.readString();
this.ProgramCommentNum = in.readString();
this.VODName = in.readString();
this.VODType = in.readString();
this.GoodPoint = in.readString();
this.VODCPID = in.readString();
this.Status = in.readString();
this.ReMark = in.readString();
this.ReadNo = in.readString();
this.authenticationflag = in.readString();
}
public static final Creator<VodProgramModel> CREATOR = new Creator<VodProgramModel>() {
@Override
public VodProgramModel createFromParcel(Parcel source) {
return new VodProgramModel(source);
}
@Override
public VodProgramModel[] newArray(int size) {
return new VodProgramModel[size];
}
};
}
|
[
"[email protected]"
] | |
b376f809a3e6171eef0520be3fa1f489ebee458a
|
9208ba403c8902b1374444a895ef2438a029ed5c
|
/sources/com/google/android/gms/cast/zzbc.java
|
88317f5bd35b29591248d5942cfd3b4e46fbd801
|
[] |
no_license
|
MewX/kantv-decompiled-v3.1.2
|
3e68b7046cebd8810e4f852601b1ee6a60d050a8
|
d70dfaedf66cdde267d99ad22d0089505a355aa1
|
refs/heads/main
| 2023-02-27T05:32:32.517948
| 2021-02-02T13:38:05
| 2021-02-02T13:44:31
| 335,299,807
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,491
|
java
|
package com.google.android.gms.cast;
import android.os.RemoteException;
import com.google.android.gms.common.api.Api.AnyClient;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.internal.cast.zzcn;
import org.json.JSONObject;
final class zzbc extends zzb {
private final /* synthetic */ int val$repeatMode;
private final /* synthetic */ RemoteMediaPlayer zzfd;
private final /* synthetic */ GoogleApiClient zzfe;
private final /* synthetic */ JSONObject zzfk;
zzbc(RemoteMediaPlayer remoteMediaPlayer, GoogleApiClient googleApiClient, GoogleApiClient googleApiClient2, int i, JSONObject jSONObject) {
this.zzfd = remoteMediaPlayer;
this.zzfe = googleApiClient2;
this.val$repeatMode = i;
this.zzfk = jSONObject;
super(googleApiClient);
}
/* access modifiers changed from: protected */
/* JADX WARNING: Can't wrap try/catch for region: R(4:10|11|12|13) */
/* JADX WARNING: Code restructure failed: missing block: B:11:?, code lost:
setResult((com.google.android.gms.cast.RemoteMediaPlayer.MediaChannelResult) createFailedResult(new com.google.android.gms.common.api.Status(2100)));
*/
/* JADX WARNING: Code restructure failed: missing block: B:16:0x0052, code lost:
r11.zzfd.zzey.zza(null);
*/
/* JADX WARNING: Code restructure failed: missing block: B:17:0x005b, code lost:
throw r1;
*/
/* JADX WARNING: Code restructure failed: missing block: B:9:0x0035, code lost:
r1 = move-exception;
*/
/* JADX WARNING: Failed to process nested try/catch */
/* JADX WARNING: Missing exception handler attribute for start block: B:10:0x0037 */
/* Code decompiled incorrectly, please refer to instructions dump. */
public final void zza(com.google.android.gms.internal.cast.zzcn r12) {
/*
r11 = this;
com.google.android.gms.cast.RemoteMediaPlayer r12 = r11.zzfd
java.lang.Object r12 = r12.lock
monitor-enter(r12)
com.google.android.gms.cast.RemoteMediaPlayer r0 = r11.zzfd // Catch:{ all -> 0x005c }
com.google.android.gms.cast.RemoteMediaPlayer$zza r0 = r0.zzey // Catch:{ all -> 0x005c }
com.google.android.gms.common.api.GoogleApiClient r1 = r11.zzfe // Catch:{ all -> 0x005c }
r0.zza(r1) // Catch:{ all -> 0x005c }
r0 = 0
com.google.android.gms.cast.RemoteMediaPlayer r1 = r11.zzfd // Catch:{ zzdk | IllegalStateException -> 0x0037 }
com.google.android.gms.internal.cast.zzdh r2 = r1.zzex // Catch:{ zzdk | IllegalStateException -> 0x0037 }
com.google.android.gms.internal.cast.zzdm r3 = r11.zzgd // Catch:{ zzdk | IllegalStateException -> 0x0037 }
r4 = 0
r5 = -1
r7 = 0
r8 = 0
int r1 = r11.val$repeatMode // Catch:{ zzdk | IllegalStateException -> 0x0037 }
java.lang.Integer r9 = java.lang.Integer.valueOf(r1) // Catch:{ zzdk | IllegalStateException -> 0x0037 }
org.json.JSONObject r10 = r11.zzfk // Catch:{ zzdk | IllegalStateException -> 0x0037 }
r2.zza(r3, r4, r5, r7, r8, r9, r10) // Catch:{ zzdk | IllegalStateException -> 0x0037 }
com.google.android.gms.cast.RemoteMediaPlayer r1 = r11.zzfd // Catch:{ all -> 0x005c }
com.google.android.gms.cast.RemoteMediaPlayer$zza r1 = r1.zzey // Catch:{ all -> 0x005c }
r1.zza(r0) // Catch:{ all -> 0x005c }
goto L_0x0050
L_0x0035:
r1 = move-exception
goto L_0x0052
L_0x0037:
com.google.android.gms.common.api.Status r1 = new com.google.android.gms.common.api.Status // Catch:{ all -> 0x0035 }
r2 = 2100(0x834, float:2.943E-42)
r1.<init>(r2) // Catch:{ all -> 0x0035 }
com.google.android.gms.common.api.Result r1 = r11.createFailedResult(r1) // Catch:{ all -> 0x0035 }
com.google.android.gms.cast.RemoteMediaPlayer$MediaChannelResult r1 = (com.google.android.gms.cast.RemoteMediaPlayer.MediaChannelResult) r1 // Catch:{ all -> 0x0035 }
r11.setResult(r1) // Catch:{ all -> 0x0035 }
com.google.android.gms.cast.RemoteMediaPlayer r1 = r11.zzfd // Catch:{ all -> 0x005c }
com.google.android.gms.cast.RemoteMediaPlayer$zza r1 = r1.zzey // Catch:{ all -> 0x005c }
r1.zza(r0) // Catch:{ all -> 0x005c }
L_0x0050:
monitor-exit(r12) // Catch:{ all -> 0x005c }
return
L_0x0052:
com.google.android.gms.cast.RemoteMediaPlayer r2 = r11.zzfd // Catch:{ all -> 0x005c }
com.google.android.gms.cast.RemoteMediaPlayer$zza r2 = r2.zzey // Catch:{ all -> 0x005c }
r2.zza(r0) // Catch:{ all -> 0x005c }
throw r1 // Catch:{ all -> 0x005c }
L_0x005c:
r0 = move-exception
monitor-exit(r12) // Catch:{ all -> 0x005c }
throw r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.cast.zzbc.zza(com.google.android.gms.internal.cast.zzcn):void");
}
/* access modifiers changed from: protected */
public final /* synthetic */ void doExecute(AnyClient anyClient) throws RemoteException {
doExecute((zzcn) anyClient);
}
}
|
[
"[email protected]"
] | |
a8254664f47218155fefa196a24fd0d9e81aead3
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/tests-without-trycatch/JacksonDatabind-111/com.fasterxml.jackson.databind.deser.impl.FieldProperty/BBC-F0-opt-70/9/com/fasterxml/jackson/databind/deser/impl/FieldProperty_ESTest.java
|
4007165c842f588d38f68a095bbfb62374060723
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 1,192
|
java
|
/*
* This file was automatically generated by EvoSuite
* Thu Oct 14 06:21:34 GMT 2021
*/
package com.fasterxml.jackson.databind.deser.impl;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import com.fasterxml.jackson.databind.deser.impl.FieldProperty;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class FieldProperty_ESTest extends FieldProperty_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
FieldProperty fieldProperty0 = null;
// try {
fieldProperty0 = new FieldProperty((FieldProperty) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase", e);
// }
}
}
|
[
"[email protected]"
] | |
c7b2b04417ed406bf13f9be3064a60d3a482dd66
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MATH-81b-3-1-SPEA2-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/linear/EigenDecompositionImpl_ESTest.java
|
68bc15f0642be3558dca6b36d408f1d4b5b0bbd1
|
[] |
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
| 1,021
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sun Apr 05 20:47:00 UTC 2020
*/
package org.apache.commons.math.linear;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.commons.math.linear.EigenDecompositionImpl;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class EigenDecompositionImpl_ESTest extends EigenDecompositionImpl_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
double[] doubleArray0 = new double[5];
double[] doubleArray1 = new double[4];
doubleArray1[0] = 24.900885576135753;
doubleArray1[1] = 2360.224331756;
doubleArray1[2] = 1924.200222535494;
EigenDecompositionImpl eigenDecompositionImpl0 = new EigenDecompositionImpl(doubleArray0, doubleArray1, 1924.200222535494);
}
}
|
[
"[email protected]"
] | |
059ad22b6091967cd3858d583bf12ee27a08e3fd
|
32155e5a4910c5d17615b3f291bbdc3c625cc4f9
|
/senpure-permission/src/main/java/com/senpure/demo/service/ClazzService.java
|
3096b90336e3c5e642b57b38921091a6082f1d74
|
[] |
no_license
|
senpure/senpure4
|
3c588a6615708f0444da5f1b5ce4afc7d92bc95c
|
e3a007320c7923b6bd59c769bc9b9d2b13338ab8
|
refs/heads/master
| 2020-03-21T05:15:12.371086
| 2018-06-21T09:52:45
| 2018-06-21T09:52:45
| 107,912,311
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,297
|
java
|
package com.senpure.demo.service;
import com.senpure.demo.model.Clazz;
import com.senpure.demo.criteria.ClazzCriteria;
import com.senpure.demo.mapper.ClazzMapper;
import com.senpure.base.exception.OptimisticLockingFailureException;
import com.senpure.base.service.BaseService;
import com.senpure.base.result.ResultMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.ArrayList;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
/**
* 该类对 [Clazz]的增删查改有本地缓存,只缓存主键,不缓存查询缓存
* <li>find(Long id):按主键缓存</li>
* <li>findAll():按主键缓存</li>
* <li>delete(Long id):按主键清除缓存</li>
* <li>delete(ClazzCriteria criteria):清除<strong>所有</strong>Clazz缓存</li>
* <li>update(Clazz clazz):按主键清除缓存</li>
* <li>update(ClazzCriteria criteria):有主键时按主键移除缓存,没有主键时清除<strong>所有</strong>Clazz缓存 </li>
*
* @author senpure-generator
* @version 2018-6-6 15:27:45
*/
@Service
public class ClazzService extends BaseService {
private ConcurrentMap<String, Clazz> localCache = new ConcurrentHashMap(128);
@Autowired
private ClazzMapper clazzMapper;
private String cacheKey(Long id) {
return "clazz:" + id;
}
public void clearCache(Long id) {
localCache.remove(cacheKey(id));
}
public void clearCache() {
localCache.clear();
}
/**
* 按主键本地缓存
*
* @return
*/
public Clazz find(Long id) {
String cacheKey = cacheKey(id);
Clazz clazz = localCache.get(cacheKey);
if (clazz == null) {
clazz = clazzMapper.find(id);
if (clazz != null) {
localCache.putIfAbsent(cacheKey, clazz);
return localCache.get(cacheKey);
}
}
return clazz;
}
public Clazz findOnlyCache(Long id) {
return localCache.get(cacheKey(id));
}
public Clazz findSkipCache(Long id) {
return clazzMapper.find(id);
}
public int count() {
return clazzMapper.count();
}
/**
* 每一个结果会按主键本地缓存
*
* @return
*/
public List<Clazz> findAll() {
List<Clazz> clazzs = clazzMapper.findAll();
for (Clazz clazz : clazzs) {
localCache.put(cacheKey(clazz.getId()), clazz);
}
return clazzs;
}
/**
* 按主键清除本地缓存
*
* @return
*/
@Transactional(rollbackFor = Exception.class)
public boolean delete(Long id) {
localCache.remove(cacheKey(id));
int result = clazzMapper.delete(id);
return result == 1;
}
/**
* 会清除<strong>所有<strong>Clazz缓存
*
* @return
*/
@Transactional(rollbackFor = Exception.class)
public int delete(ClazzCriteria criteria) {
int result = clazzMapper.deleteByCriteria(criteria);
if (result > 0) {
clearCache();
}
return result;
}
@Transactional(rollbackFor = Exception.class)
public boolean save(Clazz clazz) {
clazz.setId(idGenerator.nextId());
int result = clazzMapper.save(clazz);
return result == 1;
}
@Transactional(rollbackFor = Exception.class)
public int save(List<Clazz> clazzs) {
if (clazzs == null || clazzs.size() == 0) {
return 0;
}
for (Clazz clazz : clazzs) {
clazz.setId(idGenerator.nextId());
}
int size = clazzMapper.saveBatch(clazzs);
return size;
}
@Transactional(rollbackFor = Exception.class)
public boolean save(ClazzCriteria criteria) {
criteria.setId(idGenerator.nextId());
int result = clazzMapper.save(criteria.toClazz());
return result == 1;
}
/**
* 按主键移除缓存<br>
* 更新失败会抛出OptimisticLockingFailureException
*
* @return
*/
@Transactional(rollbackFor = Exception.class)
public boolean update(Clazz clazz) {
localCache.remove(cacheKey(clazz.getId()));
int updateCount = clazzMapper.update(clazz);
if (updateCount == 0) {
throw new OptimisticLockingFailureException(clazz.getClass() + ",[" + clazz.getId() + "],版本号冲突,版本号[" + clazz.getVersion() + "]");
}
return true;
}
/**
* 有主键时按主键移除缓存,没有主键时清空<strong>所有</strong>Clazz缓存<br>
* 当版本号,和主键不为空时,更新失败会抛出OptimisticLockingFailureException
*
* @return
*/
@Transactional(rollbackFor = Exception.class)
public int update(ClazzCriteria criteria) {
if (criteria.getId() != null) {
localCache.remove(cacheKey(criteria.getId()));
}
int updateCount = clazzMapper.updateByCriteria(criteria);
if (updateCount == 0 && criteria.getVersion() != null
&& criteria.getId() != null) {
throw new OptimisticLockingFailureException(criteria.getClass() + ",[" + criteria.getId() + "],版本号冲突,版本号[" + criteria.getVersion() + "]");
}
if (criteria.getId() != null && updateCount > 0) {
localCache.clear();
}
return updateCount;
}
@Transactional(readOnly = true)
public ResultMap findPage(ClazzCriteria criteria) {
ResultMap resultMap = ResultMap.success();
//是否是主键查找
if (criteria.getId() != null) {
Clazz clazz = clazzMapper.find(criteria.getId());
if (clazz != null) {
List<Clazz> clazzs = new ArrayList<>(16);
clazzs.add(clazz);
resultMap.putTotal(1);
resultMap.putItems(clazzs);
} else {
resultMap.putTotal(0);
}
return resultMap;
}
int total = clazzMapper.countByCriteria(criteria);
resultMap.putTotal(total);
if (total == 0) {
return resultMap;
}
//检查页数是否合法
checkPage(criteria, total);
List<Clazz> clazzs = clazzMapper.findByCriteria(criteria);
resultMap.putItems(clazzs);
return resultMap;
}
public List<Clazz> find(ClazzCriteria criteria) {
//是否是主键查找
if (criteria.getId() != null) {
List<Clazz> clazzs = new ArrayList<>(16);
Clazz clazz = clazzMapper.find(criteria.getId());
if (clazz != null) {
clazzs.add(clazz);
}
return clazzs;
}
return clazzMapper.findByCriteria(criteria);
}
public Clazz findOne(ClazzCriteria criteria) {
//是否是主键查找
if (criteria.getId() != null) {
return clazzMapper.find(criteria.getId());
}
List<Clazz> clazzs = clazzMapper.findByCriteria(criteria);
if (clazzs.size() == 0) {
return null;
}
return clazzs.get(0);
}
}
|
[
"[email protected]"
] | |
25af80192b8a7d94557d1d5b51f0c79e0e9d6494
|
80a6b8d1efa66efbb94f0df684eedb81a5cc552c
|
/assertj-core/src/test/java/org/assertj/core/internal/paths/Paths_assertIsExecutable_Test.java
|
2986c10f2affbd8cc6e467787a2e39f5b972093e
|
[
"Apache-2.0"
] |
permissive
|
AlHasan89/System_Re-engineering
|
43f232e90f65adc940af3bfa2b4d584d25ce076c
|
b80e6d372d038fd246f946e41590e07afddfc6d7
|
refs/heads/master
| 2020-03-27T05:08:26.156072
| 2019-01-06T17:54:59
| 2019-01-06T17:54:59
| 145,996,692
| 0
| 1
|
Apache-2.0
| 2019-01-06T17:55:00
| 2018-08-24T13:43:31
|
Java
|
UTF-8
|
Java
| false
| false
| 2,204
|
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.
*
* Copyright 2012-2017 the original author or authors.
*/
package org.assertj.core.internal.paths;
import static org.assertj.core.error.ShouldBeExecutable.shouldBeExecutable;
import static org.assertj.core.error.ShouldExist.shouldExist;
import static org.assertj.core.test.TestFailures.wasExpectingAssertionError;
import static org.assertj.core.util.FailureMessages.actualIsNull;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import org.junit.Test;
public class Paths_assertIsExecutable_Test extends MockPathsBaseTest {
@Test
public void should_fail_if_actual_is_null() {
thrown.expectAssertionError(actualIsNull());
paths.assertIsExecutable(info, null);
}
@Test
public void should_fail_with_should_exist_error_if_actual_does_not_exist() {
try {
when(nioFilesWrapper.exists(actual)).thenReturn(false);
paths.assertIsExecutable(info, actual);
wasExpectingAssertionError();
} catch (AssertionError e) {
verify(failures).failure(info, shouldExist(actual));
}
}
@Test
public void should_fail_if_actual_exists_but_is_not_executable() {
try {
when(nioFilesWrapper.exists(actual)).thenReturn(true);
when(nioFilesWrapper.isExecutable(actual)).thenReturn(false);
paths.assertIsExecutable(info, actual);
wasExpectingAssertionError();
} catch (AssertionError e) {
verify(failures).failure(info, shouldBeExecutable(actual));
}
}
@Test
public void should_succeed_if_actual_exist_and_is_executable() {
when(nioFilesWrapper.exists(actual)).thenReturn(true);
when(nioFilesWrapper.isExecutable(actual)).thenReturn(true);
paths.assertIsExecutable(info, actual);
}
}
|
[
"[email protected]"
] | |
ec9fda717fd7113b660df34661ba23254aa50f07
|
1357eb3856e334fdfdfa94c0cac08fa1b07f6cab
|
/ezyfox-server-core/src/test/java/com/tvd12/ezyfoxserver/testing/EzyZonesStarterTest.java
|
39d7acc3169848e3ab1a3d4134b7378be03768fb
|
[
"Apache-2.0"
] |
permissive
|
brock12121996/ezyfox-server
|
a22dc58884f68c94b6619688cd7f581527defa8e
|
e8d1ca08cd36a050d6fe310212e7e1ef4a2c7ab6
|
refs/heads/master
| 2021-05-17T02:20:00.363552
| 2020-03-14T17:38:14
| 2020-03-14T17:38:14
| 250,573,240
| 1
| 0
|
Apache-2.0
| 2020-03-27T15:37:29
| 2020-03-27T15:37:29
| null |
UTF-8
|
Java
| false
| false
| 4,663
|
java
|
package com.tvd12.ezyfoxserver.testing;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import org.testng.annotations.Test;
import com.tvd12.ezyfoxserver.EzySimpleApplication;
import com.tvd12.ezyfoxserver.EzySimplePlugin;
import com.tvd12.ezyfoxserver.EzySimpleServer;
import com.tvd12.ezyfoxserver.EzySimpleZone;
import com.tvd12.ezyfoxserver.EzyZonesStarter;
import com.tvd12.ezyfoxserver.ccl.EzyAppClassLoader;
import com.tvd12.ezyfoxserver.context.EzyAppContext;
import com.tvd12.ezyfoxserver.context.EzyPluginContext;
import com.tvd12.ezyfoxserver.context.EzyServerContext;
import com.tvd12.ezyfoxserver.context.EzyZoneContext;
import com.tvd12.ezyfoxserver.ext.EzyAppEntry;
import com.tvd12.ezyfoxserver.ext.EzyAppEntryLoader;
import com.tvd12.ezyfoxserver.ext.EzyPluginEntry;
import com.tvd12.ezyfoxserver.ext.EzyPluginEntryLoader;
import com.tvd12.ezyfoxserver.setting.EzySimpleAppSetting;
import com.tvd12.ezyfoxserver.setting.EzySimpleAppsSetting;
import com.tvd12.ezyfoxserver.setting.EzySimplePluginSetting;
import com.tvd12.ezyfoxserver.setting.EzySimplePluginsSetting;
import com.tvd12.ezyfoxserver.setting.EzySimpleSettings;
import com.tvd12.ezyfoxserver.setting.EzySimpleZoneSetting;
import com.tvd12.ezyfoxserver.setting.EzySimpleZonesSetting;
import com.tvd12.test.base.BaseTest;
public class EzyZonesStarterTest extends BaseTest {
@Test
public void normalCaseTest() {
EzySimpleSettings settings = new EzySimpleSettings();
EzySimpleZonesSetting zonesSetting = settings.getZones();
EzySimpleZoneSetting zoneSetting = new EzySimpleZoneSetting();
zoneSetting.setName("test");
zonesSetting.setItem(zoneSetting);
EzySimpleAppsSetting appsSetting = new EzySimpleAppsSetting();
EzySimpleAppSetting appSetting = new EzySimpleAppSetting();
appSetting.setName("apps");
appSetting.setFolder("apps");
appSetting.setEntryLoader(ExEntryLoader.class.getName());
appsSetting.setItem(appSetting);
zoneSetting.setApplications(appsSetting);
EzySimplePluginsSetting pluginsSetting = new EzySimplePluginsSetting();
EzySimplePluginSetting pluginSetting = new EzySimplePluginSetting();
pluginSetting.setName("plugins");
pluginSetting.setFolder("plugins");
pluginSetting.setEntryLoader(ExPluginEntryLoader.class.getName());
pluginsSetting.setItem(pluginSetting);
zoneSetting.setPlugins(pluginsSetting);
EzySimpleServer server = new EzySimpleServer();
server.setSettings(settings);
EzyServerContext serverContext = mock(EzyServerContext.class);
when(serverContext.getServer()).thenReturn(server);
EzySimpleZone zone = new EzySimpleZone();
zone.setSetting(zoneSetting);
EzyZoneContext zoneContext = mock(EzyZoneContext.class);
when(zoneContext.getZone()).thenReturn(zone);
when(serverContext.getZoneContext("test")).thenReturn(zoneContext);
EzySimpleApplication app = new EzySimpleApplication();
app.setSetting(appSetting);
EzyAppContext appContext = mock(EzyAppContext.class);
when(appContext.getApp()).thenReturn(app);
when(zoneContext.getAppContext("apps")).thenReturn(appContext);
EzySimplePlugin plugin = new EzySimplePlugin();
plugin.setSetting(pluginSetting);
EzyPluginContext pluginContext = mock(EzyPluginContext.class);
when(pluginContext.getPlugin()).thenReturn(plugin);
when(zoneContext.getPluginContext("plugins")).thenReturn(pluginContext);
Map<String, EzyAppClassLoader> appClassLoaders = new HashMap<>();
appClassLoaders.put("apps", new EzyAppClassLoader(new File("test-data"), getClass().getClassLoader()));
server.setAppClassLoaders(appClassLoaders);
EzyZonesStarter starter = EzyZonesStarter.builder()
.serverContext(serverContext)
.build();
starter.start();
}
public static class ExEntryLoader implements EzyAppEntryLoader {
@Override
public EzyAppEntry load() throws Exception {
EzyAppEntry enry = mock(EzyAppEntry.class);
return enry;
}
}
public static class ExPluginEntryLoader implements EzyPluginEntryLoader {
@Override
public EzyPluginEntry load() throws Exception {
EzyPluginEntry entry = mock(EzyPluginEntry.class);
return entry;
}
}
}
|
[
"[email protected]"
] | |
14b80c6f67e2489b51d6f25e007d3eaf0825b98b
|
06a41d3cffdacea1ee0d907fa346c854e01ab738
|
/src/main/java/com/yjfshop123/live/live/live/common/widget/gift/view/GiftPageViewPager.java
|
e2f3c0aea6c23adea0e355eb881559893b5950ce
|
[] |
no_license
|
yanbingyanjing/Demo
|
9c7c600295f9dc4996da5ff6e0803cfae0cfbdc2
|
dbe9b9f51c9e55038da849caf1322bfb1d546583
|
refs/heads/master
| 2023-04-08T18:11:08.182347
| 2021-04-21T07:20:04
| 2021-04-21T07:20:04
| 360,068,907
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 852
|
java
|
package com.yjfshop123.live.live.live.common.widget.gift.view;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
public class GiftPageViewPager extends ViewPager {
public GiftPageViewPager(@NonNull Context context) {
this(context, null);
}
public GiftPageViewPager(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int widthSize = MeasureSpec.getSize(widthMeasureSpec);
heightMeasureSpec = MeasureSpec.makeMeasureSpec(widthSize / 2, MeasureSpec.EXACTLY);
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
}
|
[
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.