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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7a4167822db2f006da72ad2580f665335729eb21
|
3330e3d67415866e13a0335c245f50e8237557e3
|
/src/main/java/test/lombok/ValueAnnotationEx01.java
|
85c6cd47637f93f195bcff09bb1db0e74375f101
|
[] |
no_license
|
kruart/lombok_use_cases
|
b2231990fdcc3d9d2aaf80f96834be423931bf7c
|
424f20b0c369796e58a4061c94d43daa2aa1ec56
|
refs/heads/master
| 2020-12-31T00:29:40.942040
| 2017-03-17T21:06:43
| 2017-03-17T21:06:43
| 85,354,752
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 759
|
java
|
package test.lombok;
import lombok.Value;
import lombok.experimental.NonFinal;
/**
* Created by kruart on 17.03.2017.
*
* @Value - generates a lot of code which fits with a class that is a representation of an immutable entity.
* Equivalent to @Getter @FieldDefaults(makeFinal=true, level=AccessLevel.PRIVATE) @AllArgsConstructor @ToString @EqualsAndHashCode.
*/
@Value(staticConstructor = "getInstance")
public class ValueAnnotationEx01 {
@NonFinal //override
private String name = "Buffon";
private Integer id;
private String address;
public static void main(String[] args) {
ValueAnnotationEx01 ex = ValueAnnotationEx01.getInstance("Gianluigi Buffon" ,1 , "Turin, Street 25");
System.out.println(ex);
}
}
|
[
"weoz@ukr.net"
] |
weoz@ukr.net
|
1ec88ff83331f5dd6e2c666f15efabd29f69391e
|
a0a47144c6995e949264e3728e81d72cba2bf3ef
|
/app/src/main/java/com/trade/rrenji/biz/setting/ui/SettingActivity.java
|
419b05b7ec333eec2015fc32f920e7f8fab410f8
|
[] |
no_license
|
11231943/RenRenJi
|
2d90e2217d1cc042fa367b58cde276923f93281f
|
e80026bafe1284908a60ae8d58addd18a04e2a67
|
refs/heads/master
| 2020-04-18T08:26:23.075874
| 2019-09-17T14:38:37
| 2019-09-17T14:38:37
| 167,396,475
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,992
|
java
|
package com.trade.rrenji.biz.setting.ui;
import android.content.DialogInterface;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AlertDialog;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.trade.rrenji.R;
import com.trade.rrenji.biz.base.BaseActivity;
import com.trade.rrenji.utils.SettingUtils;
import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;
import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class SettingActivity extends BaseActivity {
Handler mHandler = new Handler();
@Bind(R.id.icon_setting)
ImageView iconSetting;
@Bind(R.id.icon_go)
ImageView iconGo;
@Bind(R.id.bind_wchat)
RelativeLayout bindWchat;
@Bind(R.id.cache_size)
TextView cacheSize;
@Bind(R.id.clear_cache)
RelativeLayout clearCache;
@Bind(R.id.version_name)
TextView versionName;
@Bind(R.id.about_version)
RelativeLayout aboutVersion;
@Bind(R.id.login_out)
TextView login_out;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.setting_main_layout);
ButterKnife.bind(this);
setActionBarTitle("设置");
// if (!TextUtils.isEmpty(SettingUtils.getInstance().getSessionkey())) {
// login_out.setVisibility(View.VISIBLE);
// } else {
// login_out.setVisibility(View.GONE);
// }
}
@OnClick({R.id.login_out})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.login_out:
if (!TextUtils.isEmpty(SettingUtils.getInstance().getCurrentUid())) {
new AlertDialog.Builder(this)
.setMessage("是否退出人人机?")
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
SettingUtils.getInstance().clear();
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
finish();
}
}, 500);
}
})
.setNegativeButton(R.string.cancel, null)
.show();
}
break;
}
}
@Override
protected void attachPresenter() {
}
@Override
protected void detachPresenter() {
}
}
|
[
"11231943@qq.com"
] |
11231943@qq.com
|
79a1541621936693ef4b2ccf67d2435c243372ac
|
a1e49f5edd122b211bace752b5fb1bd5c970696b
|
/projects/org.springframework.context/src/main/java/org/springframework/remoting/RemoteInvocationFailureException.java
|
f7e8afb0a4440509381e62584e3050181eefe169
|
[
"Apache-2.0"
] |
permissive
|
savster97/springframework-3.0.5
|
4f86467e2456e5e0652de9f846f0eaefc3214cfa
|
34cffc70e25233ed97e2ddd24265ea20f5f88957
|
refs/heads/master
| 2020-04-26T08:48:34.978350
| 2019-01-22T14:45:38
| 2019-01-22T14:45:38
| 173,434,995
| 0
| 0
|
Apache-2.0
| 2019-03-02T10:37:13
| 2019-03-02T10:37:12
| null |
UTF-8
|
Java
| false
| false
| 1,268
|
java
|
/*
* Copyright 2002-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.remoting;
/**
* RemoteAccessException subclass to be thrown when the execution
* of the target method failed on the server side, for example
* when a method was not found on the target object.
*
* @author Juergen Hoeller
* @since 2.5
* @see RemoteProxyFailureException
*/
public class RemoteInvocationFailureException extends RemoteAccessException {
/**
* Constructor for RemoteInvocationFailureException.
* @param msg the detail message
* @param cause the root cause from the remoting API in use
*/
public RemoteInvocationFailureException(String msg, Throwable cause) {
super(msg, cause);
}
}
|
[
"taibi@sonar-scheduler.rd.tut.fi"
] |
taibi@sonar-scheduler.rd.tut.fi
|
c6745ae74c572642e3468e487557203b61aee964
|
2a3adbd1a8cba3434263381997206fa86593cca4
|
/toceansoft-audio-service/src/main/java/com/toceansoft/common/controller/AudioController.java
|
d45860d05ccb810d21ffd54b285bc0d340e261a7
|
[] |
no_license
|
narci2010/toceansoft-base
|
e4590bd190e281d785bc01f5c40840f40f58fdc0
|
1b5e439e788a13d7a097a0aae92f78c194d9fc46
|
refs/heads/master
| 2022-09-11T15:03:29.800126
| 2019-06-04T09:54:40
| 2019-06-04T09:54:40
| 183,211,461
| 0
| 0
| null | 2022-09-01T23:05:50
| 2019-04-24T11:04:36
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 3,684
|
java
|
/*
* Copyright 2010-2017 Tocean Group.
* 版权:商业代码,未经许可,禁止任何形式拷贝、传播及使用
* 文件名:AudioController.java
* 描述:
* 修改人:Narci.Lee
* 修改时间:2018年9月10日
* 跟踪单号:
* 修改单号:
* 修改内容:
*/
package com.toceansoft.common.controller;
import com.toceansoft.common.exception.RRException;
import com.toceansoft.common.model.AudioData;
import com.toceansoft.common.model.Engine;
import com.toceansoft.common.model.EngineParam;
import com.toceansoft.common.service.EngineParamService;
import com.toceansoft.common.service.EngineService;
import com.toceansoft.common.util.AudioUtils;
import com.toceansoft.common.util.FFmpegUtils;
import com.toceansoft.common.util.FileUtils;
import com.toceansoft.common.util.baidu.model.BaiduAudio;
import com.toceansoft.common.util.baidu.template.BaiduTemplate;
import com.toceansoft.common.util.xunfei.template.XunfeiTemplate;
import com.toceansoft.common.utils.R;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.Base64;
import java.util.List;
/**
* 接受并处理音频文件
* @author: zhaoq
* @date: 2019/2/26
*/
@Slf4j
@RestController
@RequestMapping("/AudioController")
public class AudioController {
@Autowired
private FileUtils fileUtils;
@Autowired
private FFmpegUtils ffmpegUtils;
@Autowired
private AudioUtils audioUtils;
@Autowired
private XunfeiTemplate xunfeiTemplate;
@Autowired
private BaiduTemplate baiduTemplate;
@Autowired
private EngineParamService engineParamService;
@Autowired
private EngineService engineService;
/**
* 音频转文字
* @param audioData 音频
* @return R
*/
@PostMapping("/audioConvertToText")
@ApiOperation(value = "音频转文字", httpMethod = "POST")
public R testAudioController(@RequestBody AudioData audioData) {
if (audioData == null) {
throw new RRException("获取上传音频文件为空");
}
// 获取引擎配置信息
List<EngineParam> sysConfig = engineParamService.findParam(audioData.getKey());
Engine engine = engineService.getEngineDetail(audioData.getKey());
// 检查引擎
if (sysConfig == null) {
throw new RRException("获取引擎配置信息为空,请先设置该引擎的配置信息");
}
// 获取base音频字节数组
byte[] bytes = audioData.getAudioBase64Bytes();
//保存到服务器本地文件
String fileUpload = fileUtils.save(bytes);
//转换音频文件为PCM编码格式
String pcmPath = ffmpegUtils.enCodeToPcm(fileUpload);
// 获取音频文件字节数组
byte[] audioBytes = audioUtils.readAudio(pcmPath);
// 获取音频文件base64编码
String audioBase64 = Base64.getEncoder().encodeToString(audioBytes);
// 调用讯飞Api 进行语音识别
String result = "";
if ("xunfei".equals(engine.getEngineName())) {
result = xunfeiTemplate.request(audioBase64, sysConfig);
} else {
BaiduAudio baiduAudio = new BaiduAudio(audioBase64, audioBytes.length);
result = baiduTemplate.request(baiduAudio, sysConfig);
}
return R.ok(result);
}
}
|
[
"narci.ltc@toceansoft.com"
] |
narci.ltc@toceansoft.com
|
e1a2415766bf6c3d4d6d232e5e8ec227bd81f74e
|
6c4e391046022177244aeade63b03fc0824a4c50
|
/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ProfileDataCache.java
|
b1bc86f2a270f3b7c563c7304a63c3bed935310e
|
[
"BSD-3-Clause"
] |
permissive
|
woshihoujinxin/chromium-2
|
d17cae43153d14673778bbdf0b739886d2461902
|
71aec55e801f801f89a81cfb219a219d953a5d5c
|
refs/heads/master
| 2022-11-15T00:18:39.821920
| 2017-07-14T19:59:33
| 2017-07-14T19:59:33
| 97,331,019
| 1
| 0
| null | 2017-07-15T17:16:35
| 2017-07-15T17:16:35
| null |
UTF-8
|
Java
| false
| false
| 6,092
|
java
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.firstrun;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff.Mode;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.support.v7.content.res.AppCompatResources;
import org.chromium.base.ObserverList;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.profiles.ProfileDownloader;
import java.util.HashMap;
import java.util.List;
/**
* Fetches and caches Google Account profile images and full names for the accounts on the device.
* ProfileDataCache doesn't observe account list changes by itself, so account list
* should be provided by calling {@link #update(List)}
*/
public class ProfileDataCache implements ProfileDownloader.Observer {
/**
* Observer to get notifications about changes in profile data.
*/
public interface Observer {
/**
* Notifies that an account's profile data has been updated.
* @param accountId An account ID.
*/
void onProfileDataUpdated(String accountId);
}
private static class CacheEntry {
public CacheEntry(Drawable picture, String fullName, String givenName) {
this.picture = picture;
this.fullName = fullName;
this.givenName = givenName;
}
public Drawable picture;
public String fullName;
public String givenName;
}
private final HashMap<String, CacheEntry> mCacheEntries = new HashMap<>();
private final Drawable mPlaceholderImage;
private final ObserverList<Observer> mObservers = new ObserverList<>();
private final Context mContext;
private Profile mProfile;
public ProfileDataCache(Context context, Profile profile) {
mContext = context;
mProfile = profile;
mPlaceholderImage =
AppCompatResources.getDrawable(context, R.drawable.logo_avatar_anonymous);
ProfileDownloader.addObserver(this);
}
/**
* Initiate fetching the user accounts data (images and the full name).
* Fetched data will be sent to observers of ProfileDownloader.
*/
public void update(List<String> accounts) {
int imageSizePx =
mContext.getResources().getDimensionPixelSize(R.dimen.signin_account_image_size);
for (int i = 0; i < accounts.size(); i++) {
if (mCacheEntries.get(accounts.get(i)) == null) {
ProfileDownloader.startFetchingAccountInfoFor(
mContext, mProfile, accounts.get(i), imageSizePx, true);
}
}
}
/**
* @param accountId Google account ID for the image that is requested.
* @return Returns the profile image for a given Google account ID if it's in
* the cache, otherwise returns a placeholder image.
*/
public Drawable getImage(String accountId) {
CacheEntry cacheEntry = mCacheEntries.get(accountId);
if (cacheEntry == null) return mPlaceholderImage;
return cacheEntry.picture;
}
/**
* @param accountId Google account ID for the full name that is requested.
* @return Returns the full name for a given Google account ID if it is
* the cache, otherwise returns null.
*/
public String getFullName(String accountId) {
CacheEntry cacheEntry = mCacheEntries.get(accountId);
if (cacheEntry == null) return null;
return cacheEntry.fullName;
}
/**
* @param accountId Google account ID for the full name that is requested.
* @return Returns the given name for a given Google account ID if it is in the cache, otherwise
* returns null.
*/
public String getGivenName(String accountId) {
CacheEntry cacheEntry = mCacheEntries.get(accountId);
if (cacheEntry == null) return null;
return cacheEntry.givenName;
}
public void destroy() {
ProfileDownloader.removeObserver(this);
mObservers.clear();
}
/**
* @param observer Observer that should be notified when new profile images are available.
*/
public void addObserver(Observer observer) {
mObservers.addObserver(observer);
}
/**
* @param observer Observer that was added by {@link #addObserver} and should be removed.
*/
public void removeObserver(Observer observer) {
mObservers.removeObserver(observer);
}
@Override
public void onProfileDownloaded(String accountId, String fullName, String givenName,
Bitmap bitmap) {
Drawable drawable = bitmap != null ? getCroppedAvatar(bitmap) : mPlaceholderImage;
mCacheEntries.put(accountId, new CacheEntry(drawable, fullName, givenName));
for (Observer observer : mObservers) {
observer.onProfileDataUpdated(accountId);
}
}
private Drawable getCroppedAvatar(Bitmap bitmap) {
Bitmap output = Bitmap.createBitmap(
bitmap.getWidth(), bitmap.getHeight(), Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0);
paint.setColor(Color.WHITE);
canvas.drawCircle(
bitmap.getWidth() / 2f, bitmap.getHeight() / 2f, bitmap.getWidth() / 2f, paint);
paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));
canvas.drawBitmap(bitmap, rect, rect, paint);
return new BitmapDrawable(mContext.getResources(), output);
}
}
|
[
"commit-bot@chromium.org"
] |
commit-bot@chromium.org
|
c664beae537cd3b8bdec29053ef784ac69efc84a
|
66d3122f8f031d6e8b27e8ead7aa5ae0d7e33b45
|
/net/minecraft/server/Whitelist.java
|
6b07f685d969176d509d2e3a32ffa27b04205b63
|
[] |
no_license
|
gurachan/minecraft1.14-dp
|
c10059787555028f87a4c8183ff74e6e1cfbf056
|
34daddc03be27d5a0ee2ab9bc8b1deb050277208
|
refs/heads/master
| 2022-01-07T01:43:52.836604
| 2019-05-08T17:18:13
| 2019-05-08T17:18:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,153
|
java
|
package net.minecraft.server;
import java.util.Iterator;
import com.google.gson.JsonObject;
import java.io.File;
import com.mojang.authlib.GameProfile;
public class Whitelist extends ServerConfigList<GameProfile, WhitelistEntry>
{
public Whitelist(final File file) {
super(file);
}
@Override
protected ServerConfigEntry<GameProfile> fromJson(final JsonObject jsonObject) {
return new WhitelistEntry(jsonObject);
}
public boolean isAllowed(final GameProfile profile) {
return ((ServerConfigList<GameProfile, V>)this).contains(profile);
}
@Override
public String[] getNames() {
final String[] arr1 = new String[((ServerConfigList<K, WhitelistEntry>)this).values().size()];
int integer2 = 0;
for (final ServerConfigEntry<GameProfile> serverConfigEntry4 : ((ServerConfigList<K, WhitelistEntry>)this).values()) {
arr1[integer2++] = serverConfigEntry4.getKey().getName();
}
return arr1;
}
@Override
protected String toString(final GameProfile gameProfile) {
return gameProfile.getId().toString();
}
}
|
[
"879139909@qq.com"
] |
879139909@qq.com
|
31cf13bd57c30a258a2f8937f3a4f7cf71f71e5f
|
8a98577c5995449677ede2cbe1cc408c324efacc
|
/Big_Clone_Bench_files_used/bcb_reduced/3/selected/544395.java
|
57af351eb4ff01d2f72699c8859abcab02ff9d00
|
[
"MIT"
] |
permissive
|
pombredanne/lsh-for-source-code
|
9363cc0c9a8ddf16550ae4764859fa60186351dd
|
fac9adfbd98a4d73122a8fc1a0e0cc4f45e9dcd4
|
refs/heads/master
| 2020-08-05T02:28:55.370949
| 2017-10-18T23:57:08
| 2017-10-18T23:57:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,428
|
java
|
package com.sns2Life.utils;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* MD5�����㷨
*/
public class Md5Encrypt {
/**
* ���ַ����MD5����
*
* @param text ����
*
* @return ����
*/
public static String md5(String text, String charset) {
MessageDigest msgDigest = null;
try {
msgDigest = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
throw new IllegalStateException("System doesn't support MD5 algorithm.");
}
msgDigest.update(text.getBytes());
byte[] bytes = msgDigest.digest();
byte tb;
char low;
char high;
char tmpChar;
String md5Str = new String();
for (int i = 0; i < bytes.length; i++) {
tb = bytes[i];
tmpChar = (char) ((tb >>> 4) & 0x000f);
if (tmpChar >= 10) {
high = (char) (('a' + tmpChar) - 10);
} else {
high = (char) ('0' + tmpChar);
}
md5Str += high;
tmpChar = (char) (tb & 0x000f);
if (tmpChar >= 10) {
low = (char) (('a' + tmpChar) - 10);
} else {
low = (char) ('0' + tmpChar);
}
md5Str += low;
}
return md5Str;
}
}
|
[
"nishima@mymail.vcu.edu"
] |
nishima@mymail.vcu.edu
|
0b5ab86675be2733495056d3eb663f9082560260
|
fd431c99a3cefebe3556fa30ce3768f904128496
|
/Little_video/src/com/system/handler/OrderInfoHttpHandler.java
|
338f72d24fdfb83667309ffde0451c01771a96e7
|
[] |
no_license
|
liushengmz/scpc
|
d2140cb24d0af16c39e4fef4c0cd1422b144e238
|
f760bf2c3b1ec45fd06d0d89018a3bfae3c9748c
|
refs/heads/master
| 2021-06-19T15:49:59.928248
| 2018-10-16T08:24:18
| 2018-10-16T08:24:18
| 95,423,982
| 2
| 4
| null | 2017-06-28T02:35:14
| 2017-06-26T08:13:22
| null |
UTF-8
|
Java
| false
| false
| 3,869
|
java
|
package com.system.handler;
import java.util.Calendar;
import java.util.Date;
import com.system.api.AppOrderRequestModel;
import com.system.api.AppOrderResponseModel;
import com.system.api.BaseRequest;
import com.system.api.baseResponse;
import com.system.cache.LvChannelCache;
import com.system.cache.LvLevelCache;
import com.system.model.LvChannelModel;
import com.system.model.LvLevelModel;
import com.system.model.LvRequestModel;
import com.system.model.LvUserModel;
import com.system.server.LvRequestServer;
import com.system.server.LvUserServer;
import com.system.util.StringUtil;
public class OrderInfoHttpHandler extends BaseFilter
{
private AppOrderResponseModel result;
static int loopId = 998;
@Override
protected baseResponse ProcessReuqest(String s)
{
AppOrderRequestModel m = BaseRequest.ParseJson(s,
AppOrderRequestModel.class);
result = new AppOrderResponseModel();
if (m.getMethod() == com.system.constant.Constant.ORDER_METHOD_CREATE)
{
CreateOrder(m);
return result;
}
else if (m
.getMethod() == com.system.constant.Constant.ORDER_METHOD_UPDATE)
{
UpdateOrder(m);
return new baseResponse();
}
return result;
}
private void UpdateOrder(AppOrderRequestModel m)
{
// if (m.getPayStatus() != 1)
// return;
String orderId = m.getOrderId();
new LvRequestServer().updateStatus(orderId, m.getPayStatus(), false);
}
private void CreateOrder(AppOrderRequestModel m)
{
String imei = m.getImei();
if (StringUtil.isNullOrEmpty(imei)
|| StringUtil.isNullOrEmpty(m.getAppkey())
|| StringUtil.isNullOrEmpty(m.getChannel()))
{
result.setStatus(com.system.constant.Constant.ERROR_MISS_PARAMETER);
return;
}
LvUserModel user = new LvUserServer().getUserByImsi(m.getImei());
if (user == null)
{
result.setStatus(com.system.constant.Constant.ERROR_UNKONW_USER);
return;
}
LvChannelModel channel = LvChannelCache
.getDataByChannelAndKey(m.getChannel(), m.getAppkey());
if (channel == null)
{
result.setStatus(com.system.constant.Constant.ERROR_NO_PAY_CHANNEL);
return;
}
// System.out.println(m.getLevelId() +" <--"+ user.getLevel());
if (m.getLevelId() <= user.getLevel())
{
result.setStatus(com.system.constant.Constant.ERROR_ALREADY_PAID);
return;
}
if (m.getLevelId() - user.getLevel() != 1)
{
result.setStatus(com.system.constant.Constant.ERROR_SKIP_LEVEL);
return;
}
LvLevelModel levelInfo = LvLevelCache
.getLvLevelByLevelId(m.getLevelId());
if (levelInfo == null)
{
result.setStatus(
com.system.constant.Constant.ERROR_UNKONW_PARAMETER);
return;
}
String orderId = CreateOrderId();
LvRequestModel order = new LvRequestModel();
order.setImei(m.getImei());
order.setOrderid(orderId);
order.setPayType(m.getPayType());
order.setPrice(levelInfo.getPrice());
order.setLevel(m.getLevelId());
order.setAppkey(m.getAppkey());
order.setChannel(m.getChannel());
order.setPayTypeId(
m.getPayType() == 1 ? channel.getWxPay() : channel.getAliPay());
new LvRequestServer().Insert(order);
if (order.getId() < 1)
{
result.setStatus(com.system.constant.Constant.ERROR_DBASE_BUSY);
return;
}
result.setCreateDate(new Date().getTime());
result.setLevelId(levelInfo.getLevel());
result.setPrice(levelInfo.getPrice());
result.setLevelName(levelInfo.getRemark());
result.setOrderId(orderId);
result.setSdkId(order.getPayTypeId());
result.setStatus(com.system.constant.Constant.ERROR_SUCCESS);
System.out.println("done!");
}
private synchronized static String CreateOrderId()
{ // 9999999
Calendar cal = Calendar.getInstance();
long ticks = (System.currentTimeMillis() % 100000000000L) * 100;
ticks += loopId++;
String order = String.format("%02d%X", cal.get(Calendar.MONTH) + 1,
ticks);
loopId = loopId % 100;
return order;
}
}
|
[
"liushengmz@163.com"
] |
liushengmz@163.com
|
28c5ad1b0abee6e38957e18d84604d1813e7f31e
|
6a9d8120fde2093a1f578f5835a42612c489772c
|
/c/deepa2/SUREKHA/n_prgs/LinkedListDemo.java
|
30bd7f71fe24e7daf8d558c8490771a6daadad96
|
[] |
no_license
|
nileshkadam222/C-AND-CPP
|
53b1dc64b8c8ab7c880ad95b5be2cd8f5f92d458
|
468b18ad81aa23865b2744eb0c35e890bf96b6d8
|
refs/heads/master
| 2020-11-27T16:29:39.220664
| 2019-12-22T06:46:33
| 2019-12-22T06:46:33
| 229,528,475
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 670
|
java
|
import java.util.*;
class LinkedListDemo{
public static void main(String args[])
{
LinkedList l1 = new LinkedList();
l1.add("one");
l1.add("two");
l1.add("three");
l1.add("four");
l1.add("five");
l1.addLast("six");
l1.addFirst("zero");
l1.add(1,"Tour") ;
System.out.println("Original contents of l1: "+l1);
l1.remove("One");
l1.remove(2);
System.out.println("Contents l1 after delete:"+l1);
l1.removeFirst();
l1.removeLast();
System.out.println("l1 after deleting first and last:"+l1);
Object val = l1.get(2);
l1.set(2,(String) val + "Changed");
System.out.println("l1 after change:"+l1);
}
}
|
[
"nilesh.kadam222@gmail.com"
] |
nilesh.kadam222@gmail.com
|
9ddf2ba99a261ddabd9c548861218d74a816c030
|
6811fd178ae01659b5d207b59edbe32acfed45cc
|
/jira-project/jira-func-tests/src/main/java/com/atlassian/jira/util/collect/CollectionBuilder.java
|
19786d995092e780782f339cda501471e97d316f
|
[] |
no_license
|
xiezhifeng/mysource
|
540b09a1e3c62614fca819610841ddb73b12326e
|
44f29e397a6a2da9340a79b8a3f61b3d51e331d1
|
refs/heads/master
| 2023-04-14T00:55:23.536578
| 2018-04-19T11:08:38
| 2018-04-19T11:08:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,546
|
java
|
package com.atlassian.jira.util.collect;
import static com.atlassian.jira.util.collect.CollectionUtil.toList;
import static com.atlassian.jira.util.dbc.Assertions.notNull;
import static java.util.Collections.unmodifiableList;
import static java.util.Collections.unmodifiableSet;
import static java.util.Collections.unmodifiableSortedSet;
import net.jcip.annotations.NotThreadSafe;
import com.google.common.collect.Ordering;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
/**
* Convenience class for creating collections ({@link Set} and {@link List}) instances or
* {@link EnclosedIterable enclosed iterables}.
* <p>
* The default methods {@link #asList()} and {@link #asSet()} and {@link #asSortedSet()} create immutable collections.
*
* @param <T> contained in the created collections.
* @deprecated use google quava eg. {@link com.google.common.collect.ImmutableList#builder()}
*/
@NotThreadSafe
@Deprecated
public final class CollectionBuilder<T>
{
private static final Ordering<?> NATURAL_ORDER = new NaturalOrdering();
public static <T> CollectionBuilder<T> newBuilder()
{
return new CollectionBuilder<T>(Collections.<T> emptyList());
}
public static <T> CollectionBuilder<T> newBuilder(final T... elements)
{
return new CollectionBuilder<T>(Arrays.asList(elements));
}
public static <T> List<T> list(final T... elements)
{
return unmodifiableList(Arrays.asList(elements));
}
static <T> Comparator<T> natural()
{
@SuppressWarnings("unchecked")
final Comparator<T> result = (Comparator<T>) NATURAL_ORDER;
return result;
}
private final List<T> elements = new LinkedList<T>();
CollectionBuilder(final Collection<? extends T> initialElements)
{
elements.addAll(initialElements);
}
public CollectionBuilder<T> add(final T element)
{
elements.add(element);
return this;
}
public <E extends T> CollectionBuilder<T> addAll(final E... elements)
{
this.elements.addAll(Arrays.asList(notNull("elements", elements)));
return this;
}
public CollectionBuilder<T> addAll(final Collection<? extends T> elements)
{
this.elements.addAll(notNull("elements", elements));
return this;
}
public CollectionBuilder<T> addAll(final Enumeration<? extends T> elements)
{
this.elements.addAll(toList(notNull("elements", elements)));
return this;
}
public Collection<T> asCollection()
{
return asList();
}
public Collection<T> asMutableCollection()
{
return asMutableList();
}
public List<T> asArrayList()
{
return new ArrayList<T>(elements);
}
public List<T> asLinkedList()
{
return new LinkedList<T>(elements);
}
public List<T> asList()
{
return unmodifiableList(new ArrayList<T>(elements));
}
public List<T> asMutableList()
{
return asArrayList();
}
public Set<T> asHashSet()
{
return new HashSet<T>(elements);
}
public Set<T> asListOrderedSet()
{
return new LinkedHashSet<T>(elements);
}
public Set<T> asImmutableListOrderedSet()
{
return unmodifiableSet(new LinkedHashSet<T>(elements));
}
public Set<T> asSet()
{
return unmodifiableSet(new HashSet<T>(elements));
}
public Set<T> asMutableSet()
{
return asHashSet();
}
public SortedSet<T> asTreeSet()
{
return new TreeSet<T>(elements);
}
/**
* Return a {@link SortedSet} of the elements of this builder in their natural order.
* Note, will throw an exception if the elements are not comparable.
*
* @return an immutable sorted set.
* @throws ClassCastException if the elements do not implement {@link Comparable}.
*/
public SortedSet<T> asSortedSet()
{
return unmodifiableSortedSet(new TreeSet<T>(elements));
}
public SortedSet<T> asSortedSet(final Comparator<? super T> comparator)
{
final SortedSet<T> result = new TreeSet<T>(comparator);
result.addAll(elements);
return unmodifiableSortedSet(result);
}
public SortedSet<T> asMutableSortedSet()
{
return asTreeSet();
}
public EnclosedIterable<T> asEnclosedIterable()
{
return CollectionEnclosedIterable.copy(elements);
}
@SuppressWarnings("unchecked")
static class NaturalOrdering extends Ordering<Comparable> implements Serializable
{
public int compare(final Comparable left, final Comparable right)
{
notNull("right", right); // left null is caught later
if (left == right)
{
return 0;
}
return left.compareTo(right);
}
// preserving singleton-ness gives equals()/hashCode() for free
private Object readResolve()
{
return NATURAL_ORDER;
}
@Override
public String toString()
{
return "Ordering.natural()";
}
private static final long serialVersionUID = 0;
}
}
|
[
"moink635@gmail.com"
] |
moink635@gmail.com
|
b4f2da3a133b9bace001fa9fc86883ace2497fcc
|
86b1fa21759a4f946e420d62ff0daed4b8138376
|
/src/mock/CombinationIterator_2.java
|
dca221e5f53d53d23f5ca8bbc448a6de7f8c0d41
|
[] |
no_license
|
pengkangzaia/leetcode
|
cf3830fdb98d3a18cb8ebb0229797b4593e277fd
|
87c440112b6679e461df579149d1c720247626d1
|
refs/heads/master
| 2021-12-08T10:00:28.572443
| 2021-08-24T13:58:42
| 2021-08-24T13:58:42
| 252,930,463
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,146
|
java
|
package mock;
import java.util.ArrayList;
import java.util.List;
/**
* @FileName: CombinationIterator_2.java
* @Description: CombinationIterator_2.java类说明
* @Author: admin
* @Date: 2021/3/5 11:33
*/
public class CombinationIterator_2 {
// 求全排列
ArrayList<String> list;
int idx;
public CombinationIterator_2(String characters, int combinationLength) {
list = new ArrayList<>();
StringBuilder path = new StringBuilder();
char[] chars = characters.toCharArray();
dfs(path, chars, 0, combinationLength);
idx = 0;
}
private void dfs(StringBuilder path, char[] chars, int idx, int n) {
if (path.length() == n) {
list.add(new String(path));
return;
}
for (int i = idx; i < chars.length; i++) {
path.append(chars[i]);
dfs(path, chars, i + 1, n);
path.deleteCharAt(path.length() - 1);
}
}
public String next() {
String s = list.get(idx);
idx++;
return s;
}
public boolean hasNext() {
return idx <= list.size() - 1;
}
}
|
[
"pengkangzaia@foxmail.com"
] |
pengkangzaia@foxmail.com
|
8cc596040d3236b45cc82800691a50711b3721e7
|
71caf2a8318e3c31753f91d395763dd29837d429
|
/src/com/juban/util/StatusBar.java
|
cc957808cd74653eb15c7ccf7f4a133bfc6b687f
|
[] |
no_license
|
renjie120/barcode
|
1d6abf1399f4f4910f93405f6f458bfd3fba8523
|
c052e01f060aa16222e90ca480113aa7923a6e6a
|
refs/heads/master
| 2020-04-04T00:38:25.946395
| 2014-04-18T03:36:35
| 2014-04-18T03:36:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,263
|
java
|
/*******************************************************************************
* Copyright 2011, 2012, 2013 fanfou.com, Xiaoke, Zhang
*
* 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.juban.util;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.juban.R;
/**
* 底部菜单栏的组件.
*/
public class StatusBar extends LinearLayout {
public static abstract class AbstractAction implements Action {
final private int mDrawable;
public AbstractAction(final int drawable) {
this.mDrawable = drawable;
}
@Override
public int getDrawable() {
return this.mDrawable;
}
}
public interface Action {
public int getDrawable();
public void performAction(View view);
}
public interface OnRefreshClickListener {
public void onRefreshClick();
}
public static final int TYPE_HOME = 0; // 左侧LOGO,中间标题文字,右侧编辑图标
public static final int TYPE_NORMAL = 1; // 左侧LOGO,中间标题文字,右侧编辑图标
// private boolean mRefreshable=false;
public static final int TYPE_EDIT = 2; // 左侧LOGO,中间标题文字,右侧发送图标
private Context mContext;
private LayoutInflater mInflater;
private ViewGroup mActionBar;// 标题栏
private LinearLayout status_bar;
private TextView status;// 居中标题
public StatusBar(final Context context) {
super(context);
initViews(context);
}
public StatusBar(final Context context, final AttributeSet attrs) {
super(context, attrs);
initViews(context);
}
private void initViews(final Context context) {
this.mContext = context;
this.mInflater = LayoutInflater.from(this.mContext);
this.mActionBar = (ViewGroup) this.mInflater.inflate(
R.layout.status_bar, null);
addView(this.mActionBar);
this.status_bar = (LinearLayout) this.mActionBar
.findViewById(R.id.status_bar);
this.status = (TextView) this.mActionBar.findViewById(R.id.status);
}
public void setWidthHeight(int width, int height) {
// 这里设置布局的参数,因为ActionBar是继承自LinearLayout,所以使用线性的布局.
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);
lp.width = width;
lp.height = height;
// lp.bottomMargin = 20;
// lp.topMargin = 20;
// lp.leftMargin = 120;
this.mActionBar.setLayoutParams(lp);
}
public void setTextWidthHeight(int width, int height) {
this.status.setWidth(width);
this.status.setHeight(height);
}
}
|
[
"lishuiqing110@163.com"
] |
lishuiqing110@163.com
|
467b26b7c5be729242020a0cf56603df47bf8237
|
5aac704e287e67c65124b15ea7a2182d34d6faba
|
/leopard-data/src/main/java/io/leopard/schema/SignatureBeanDefinitionParser.java
|
c85aebdbc95d5c798ca38033066722fb39c9d536
|
[] |
no_license
|
liaohongjun1984/leopard
|
529f2e4a5225a3268a1d2eab1b941f6d0feb8ec4
|
d6ae0f69a77593c07ed1cabb0c37ecb5c43dbb3d
|
refs/heads/master
| 2021-05-28T21:44:26.324886
| 2015-05-06T08:55:59
| 2015-05-06T08:55:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,448
|
java
|
package io.leopard.schema;
import io.leopard.data.signature.SignatureServiceImpl;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
import org.w3c.dom.Element;
public class SignatureBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
protected Class<?> getBeanClass(Element element) {
return SignatureServiceImpl.class;
}
protected void doParse(Element element, BeanDefinitionBuilder builder) {
// <leopard:signature id="newsSignatureService" redis-ref="signatureRedisLog4jImpl" redisKey="news_signature" publicKey="sha1.newsxxxxxxx232232"/>
String server = element.getAttribute("server");
String redisRef = element.getAttribute("redis-ref");
String redisKey = element.getAttribute("redisKey");
String publicKey = element.getAttribute("publicKey");
String useBase16 = element.getAttribute("useBase16");
String checkUsed = element.getAttribute("checkUsed");
String maxActive = element.getAttribute("maxActive");
String initialPoolSize = element.getAttribute("initialPoolSize");
String timeout = element.getAttribute("timeout");
if (StringUtils.isNotEmpty(server)) {
builder.addPropertyValue("server", server);
}
else if (StringUtils.isNotEmpty(redisRef)) {
builder.addPropertyReference("redis", redisRef);
}
else {
throw new IllegalArgumentException("<leopard:signature/>必须设置server或redis-ref属性.");
}
if (StringUtils.isNotEmpty(redisKey)) {
builder.addPropertyValue("redisKey", redisKey);
}
if (StringUtils.isNotEmpty(publicKey)) {
builder.addPropertyValue("publicKey", publicKey);
}
if (StringUtils.isNotEmpty(useBase16)) {
builder.addPropertyValue("useBase16", useBase16);
}
if (StringUtils.isNotEmpty(checkUsed)) {
builder.addPropertyValue("checkUsed", checkUsed);
}
if (StringUtils.isNotEmpty(maxActive)) {
builder.addPropertyValue("maxActive", Integer.valueOf(maxActive));
}
if (StringUtils.isNotEmpty(initialPoolSize)) {
builder.addPropertyValue("initialPoolSize", Integer.valueOf(initialPoolSize));
}
if (StringUtils.isNotEmpty(timeout)) {
builder.addPropertyValue("timeout", Integer.valueOf(timeout));
}
builder.setInitMethodName("init");
builder.setDestroyMethodName("destroy");
}
}
|
[
"tanhaichao@gmail.com"
] |
tanhaichao@gmail.com
|
4642e796e29838e7d64ad666dfadd8dd5929287c
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/69_lhamacaw-macaw.presentationLayer.SupportingDocumentSelectionDialog-1.0-10/macaw/presentationLayer/SupportingDocumentSelectionDialog_ESTest.java
|
e9c3667d6a48b1ae560c1bb83db79f14cb109e42
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 695
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sat Oct 26 02:06:21 GMT 2019
*/
package macaw.presentationLayer;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class SupportingDocumentSelectionDialog_ESTest extends SupportingDocumentSelectionDialog_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
e6e19ae4ccd25b484ba1af66c46b592bcde0153e
|
edf96b26a465a8ea463c2f2c588ffe7711323741
|
/app/src/main/java/www/jykj/com/jykj_zxyl/util/tencenUtil/models/IDCardOCRResponse.java
|
0d76aacb087d117abeb78ae5d8837e95b9d04d5c
|
[] |
no_license
|
GAndroidLibrary/JYKJ
|
a385586ea2dbeb6c3928a3e58385353780869608
|
8858e3965e41851e2be5804483b51a6dec815ef3
|
refs/heads/master
| 2022-11-27T18:28:18.484007
| 2020-08-07T02:35:14
| 2020-08-07T02:35:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 9,999
|
java
|
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package www.jykj.com.jykj_zxyl.util.tencenUtil.models;
import www.jykj.com.jykj_zxyl.util.tencenUtil.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class IDCardOCRResponse extends AbstractModel{
/**
* 姓名(人像面)
*/
@SerializedName("Name")
@Expose
private String Name;
/**
* 性别(人像面)
*/
@SerializedName("Sex")
@Expose
private String Sex;
/**
* 民族(人像面)
*/
@SerializedName("Nation")
@Expose
private String Nation;
/**
* 出生日期(人像面)
*/
@SerializedName("Birth")
@Expose
private String Birth;
/**
* 地址(人像面)
*/
@SerializedName("Address")
@Expose
private String Address;
/**
* 身份证号(人像面)
*/
@SerializedName("IdNum")
@Expose
private String IdNum;
/**
* 发证机关(国徽面)
*/
@SerializedName("Authority")
@Expose
private String Authority;
/**
* 证件有效期(国徽面)
*/
@SerializedName("ValidDate")
@Expose
private String ValidDate;
/**
* 扩展信息,根据请求的可选字段返回对应内容,不请求则不返回,具体输入参考示例3和示例4。
目前支持的扩展字段为:
IdCard,身份证照片,请求 CropIdCard 时返回;
Portrait,人像照片,请求 CropPortrait 时返回;
WarnInfos,告警信息(Code - 告警码),识别出以下告警内容时返回。
Code 告警码列表和释义:
-9100 身份证有效日期不合法告警,
-9101 身份证边框不完整告警,
-9102 身份证复印件告警,
-9103 身份证翻拍告警,
-9105 身份证框内遮挡告警,
-9104 临时身份证告警,
-9106 身份证 PS 告警。
*/
@SerializedName("AdvancedInfo")
@Expose
private String AdvancedInfo;
/**
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
@SerializedName("RequestId")
@Expose
private String RequestId;
/**
* Get 姓名(人像面)
* @return Name 姓名(人像面)
*/
public String getName() {
return this.Name;
}
/**
* Set 姓名(人像面)
* @param Name 姓名(人像面)
*/
public void setName(String Name) {
this.Name = Name;
}
/**
* Get 性别(人像面)
* @return Sex 性别(人像面)
*/
public String getSex() {
return this.Sex;
}
/**
* Set 性别(人像面)
* @param Sex 性别(人像面)
*/
public void setSex(String Sex) {
this.Sex = Sex;
}
/**
* Get 民族(人像面)
* @return Nation 民族(人像面)
*/
public String getNation() {
return this.Nation;
}
/**
* Set 民族(人像面)
* @param Nation 民族(人像面)
*/
public void setNation(String Nation) {
this.Nation = Nation;
}
/**
* Get 出生日期(人像面)
* @return Birth 出生日期(人像面)
*/
public String getBirth() {
return this.Birth;
}
/**
* Set 出生日期(人像面)
* @param Birth 出生日期(人像面)
*/
public void setBirth(String Birth) {
this.Birth = Birth;
}
/**
* Get 地址(人像面)
* @return Address 地址(人像面)
*/
public String getAddress() {
return this.Address;
}
/**
* Set 地址(人像面)
* @param Address 地址(人像面)
*/
public void setAddress(String Address) {
this.Address = Address;
}
/**
* Get 身份证号(人像面)
* @return IdNum 身份证号(人像面)
*/
public String getIdNum() {
return this.IdNum;
}
/**
* Set 身份证号(人像面)
* @param IdNum 身份证号(人像面)
*/
public void setIdNum(String IdNum) {
this.IdNum = IdNum;
}
/**
* Get 发证机关(国徽面)
* @return Authority 发证机关(国徽面)
*/
public String getAuthority() {
return this.Authority;
}
/**
* Set 发证机关(国徽面)
* @param Authority 发证机关(国徽面)
*/
public void setAuthority(String Authority) {
this.Authority = Authority;
}
/**
* Get 证件有效期(国徽面)
* @return ValidDate 证件有效期(国徽面)
*/
public String getValidDate() {
return this.ValidDate;
}
/**
* Set 证件有效期(国徽面)
* @param ValidDate 证件有效期(国徽面)
*/
public void setValidDate(String ValidDate) {
this.ValidDate = ValidDate;
}
/**
* Get 扩展信息,根据请求的可选字段返回对应内容,不请求则不返回,具体输入参考示例3和示例4。
目前支持的扩展字段为:
IdCard,身份证照片,请求 CropIdCard 时返回;
Portrait,人像照片,请求 CropPortrait 时返回;
WarnInfos,告警信息(Code - 告警码),识别出以下告警内容时返回。
Code 告警码列表和释义:
-9100 身份证有效日期不合法告警,
-9101 身份证边框不完整告警,
-9102 身份证复印件告警,
-9103 身份证翻拍告警,
-9105 身份证框内遮挡告警,
-9104 临时身份证告警,
-9106 身份证 PS 告警。
* @return AdvancedInfo 扩展信息,根据请求的可选字段返回对应内容,不请求则不返回,具体输入参考示例3和示例4。
目前支持的扩展字段为:
IdCard,身份证照片,请求 CropIdCard 时返回;
Portrait,人像照片,请求 CropPortrait 时返回;
WarnInfos,告警信息(Code - 告警码),识别出以下告警内容时返回。
Code 告警码列表和释义:
-9100 身份证有效日期不合法告警,
-9101 身份证边框不完整告警,
-9102 身份证复印件告警,
-9103 身份证翻拍告警,
-9105 身份证框内遮挡告警,
-9104 临时身份证告警,
-9106 身份证 PS 告警。
*/
public String getAdvancedInfo() {
return this.AdvancedInfo;
}
/**
* Set 扩展信息,根据请求的可选字段返回对应内容,不请求则不返回,具体输入参考示例3和示例4。
目前支持的扩展字段为:
IdCard,身份证照片,请求 CropIdCard 时返回;
Portrait,人像照片,请求 CropPortrait 时返回;
WarnInfos,告警信息(Code - 告警码),识别出以下告警内容时返回。
Code 告警码列表和释义:
-9100 身份证有效日期不合法告警,
-9101 身份证边框不完整告警,
-9102 身份证复印件告警,
-9103 身份证翻拍告警,
-9105 身份证框内遮挡告警,
-9104 临时身份证告警,
-9106 身份证 PS 告警。
* @param AdvancedInfo 扩展信息,根据请求的可选字段返回对应内容,不请求则不返回,具体输入参考示例3和示例4。
目前支持的扩展字段为:
IdCard,身份证照片,请求 CropIdCard 时返回;
Portrait,人像照片,请求 CropPortrait 时返回;
WarnInfos,告警信息(Code - 告警码),识别出以下告警内容时返回。
Code 告警码列表和释义:
-9100 身份证有效日期不合法告警,
-9101 身份证边框不完整告警,
-9102 身份证复印件告警,
-9103 身份证翻拍告警,
-9105 身份证框内遮挡告警,
-9104 临时身份证告警,
-9106 身份证 PS 告警。
*/
public void setAdvancedInfo(String AdvancedInfo) {
this.AdvancedInfo = AdvancedInfo;
}
/**
* Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public String getRequestId() {
return this.RequestId;
}
/**
* Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public void setRequestId(String RequestId) {
this.RequestId = RequestId;
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "Name", this.Name);
this.setParamSimple(map, prefix + "Sex", this.Sex);
this.setParamSimple(map, prefix + "Nation", this.Nation);
this.setParamSimple(map, prefix + "Birth", this.Birth);
this.setParamSimple(map, prefix + "Address", this.Address);
this.setParamSimple(map, prefix + "IdNum", this.IdNum);
this.setParamSimple(map, prefix + "Authority", this.Authority);
this.setParamSimple(map, prefix + "ValidDate", this.ValidDate);
this.setParamSimple(map, prefix + "AdvancedInfo", this.AdvancedInfo);
this.setParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
|
[
"m17600922812_1@163.com"
] |
m17600922812_1@163.com
|
b24feeb36db247c9dcc38bb2b8e4145f93f0662c
|
ad665d0a2f4ec26c13ac07c858eca0b5c3235a32
|
/Examples/src/main/java/com/aspose/cells/examples/articles/CopyPicturefromOneWorksheetToAnother.java
|
ad522476596ea5a9a6750ba65eae98f5548b8d01
|
[
"MIT"
] |
permissive
|
g29times/Aspose.Cells-for-Java
|
8683bf9cfd9cd011c6a02bf9fc58ee3d246536b4
|
8607aa1db706e5f890e17ae390758da7ff1a3ccc
|
refs/heads/master
| 2021-01-17T22:47:54.779124
| 2016-09-02T05:56:32
| 2016-09-02T05:56:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,270
|
java
|
package com.aspose.cells.examples.articles;
import java.io.ByteArrayInputStream;
import com.aspose.cells.Picture;
import com.aspose.cells.Workbook;
import com.aspose.cells.Worksheet;
import com.aspose.cells.WorksheetCollection;
import com.aspose.cells.examples.Utils;
public class CopyPicturefromOneWorksheetToAnother {
public static void main(String[] args) throws Exception {
// ExStart:CopyPicturefromOneWorksheetToAnother
// The path to the documents directory.
String dataDir = Utils.getDataDir(CopyPicturefromOneWorksheetToAnother.class);
// Instantiating a Workbook object
Workbook workbook = new Workbook(dataDir + "Shapes.xls");
WorksheetCollection ws = workbook.getWorksheets();
Worksheet sheet1 = ws.get("Picture");
Worksheet sheet2 = ws.get("Result");
// get the Picture from first worksheet
Picture pic = sheet1.getPictures().get(0);
ByteArrayInputStream bis = new ByteArrayInputStream(pic.getData());
// Copy the Picture to Second Worksheet
sheet2.getPictures().add(pic.getUpperLeftRow(), pic.getUpperLeftColumn(), pic.getWidthScale(),
pic.getHeightScale(), bis);
// Save the workbook
workbook.save(dataDir + "Shapes.xls");
// ExEnd:CopyPicturefromOneWorksheetToAnother
}
}
|
[
"fahadadeel@gmail.com"
] |
fahadadeel@gmail.com
|
90067a0dc063864aaba2054d36dd9d12fdba43c6
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/78_caloriecount-com.lts.pest.data.DataContainerAdaptor-0.5-10/com/lts/pest/data/DataContainerAdaptor_ESTest_scaffolding.java
|
5e166233dbd9adf155e102b4f0e3d7a8ac97fb0c
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 544
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Oct 29 18:38:08 GMT 2019
*/
package com.lts.pest.data;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class DataContainerAdaptor_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
ec0d9eec4e4b2cca8be677f0c344453747d835e6
|
a9349b7dd952a294103ffbc76bc51dde00ce65f8
|
/kettle-webapp/src/main/java/org/flhy/webapp/trans/steps/Common/CommonStepController.java
|
8561548b2fd32739620ba6fccf5bd26d5baeb9ee
|
[
"Apache-2.0"
] |
permissive
|
wolkai/webkettle
|
776ac9b0193288dcddc9aca685fce75b4f433e81
|
7b76dd845d5a5898cd26f6162cfc50d97ec60e62
|
refs/heads/master
| 2020-11-26T02:39:12.534704
| 2019-09-02T01:28:12
| 2019-09-02T01:28:12
| 228,940,145
| 2
| 5
|
Apache-2.0
| 2019-12-18T23:47:48
| 2019-12-18T23:47:47
| null |
UTF-8
|
Java
| false
| false
| 1,771
|
java
|
package org.flhy.webapp.trans.steps.Common;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
import java.nio.charset.Charset;
import java.util.Collection;
/**
* Created by cRAZY on 2017/5/25.
*/
@Controller
@RequestMapping(value="/commonStep")
public class CommonStepController {
//获取所有编码方式
@RequestMapping(value="/Encodings")
@ResponseBody
protected void getSlaveSelect(HttpServletResponse response,HttpServletRequest request) throws Exception{
try{
StringBuffer sbf=new StringBuffer("[");
Collection encodings=Charset.availableCharsets().values();
int i=0;
for(Object encoding:encodings){
String encodingJson="";
String encodingValue="\""+encoding.toString()+"\"";
String encodingName="\""+"encodingName"+"\"";
if(i!=encodings.size()-1){
encodingJson="{"+encodingName+":"+encodingValue+"},";
}else{
encodingJson="{"+encodingName+":"+encodingValue+"}";
}
sbf.append(encodingJson);
i++;
}
sbf.append("]");
response.setContentType("text/html;charset=utf-8");
PrintWriter out=response.getWriter();
out.write(sbf.toString());
out.flush();
out.close();
}catch(Exception e){
e.printStackTrace();
throw new Exception(e.getMessage());
}
}
}
|
[
"2434387555@qq.com"
] |
2434387555@qq.com
|
b49821524cb8341ae64c9679bc8ffd29748e1462
|
cca87c4ade972a682c9bf0663ffdf21232c9b857
|
/com/tencent/mm/plugin/luckymoney/b/v.java
|
e79992fca82d18f21a08eb8a0d89c02248866742
|
[] |
no_license
|
ZoranLi/wechat_reversing
|
b246d43f7c2d7beb00a339e2f825fcb127e0d1a1
|
36b10ef49d2c75d69e3c8fdd5b1ea3baa2bba49a
|
refs/heads/master
| 2021-07-05T01:17:20.533427
| 2017-09-25T09:07:33
| 2017-09-25T09:07:33
| 104,726,592
| 12
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,432
|
java
|
package com.tencent.mm.plugin.luckymoney.b;
import com.tencent.mm.plugin.luckymoney.a.a;
import com.tencent.mm.sdk.platformtools.w;
import com.tencent.mm.u.ap;
import com.tencent.mm.u.c;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
public final class v extends z {
public int kAM;
public String kAO;
public String nmb;
public String nmc;
public String nmh;
public ag nmx;
public String nnA;
public ag nnB;
public ag nnC;
public ag nnD;
public int nnE = 0;
public LinkedList<k> nnF;
public String nnx;
public boolean nny;
public int nnz;
public v(String str) {
Map hashMap = new HashMap();
hashMap.put("scene", "8");
hashMap.put("ver", str);
ap.yY();
hashMap.put("walletType", String.valueOf(c.vr().get(339975, null)));
x(hashMap);
}
public v(String str, byte b) {
Map hashMap = new HashMap();
hashMap.put("ver", str);
ap.yY();
hashMap.put("walletType", String.valueOf(c.vr().get(339975, null)));
x(hashMap);
}
public final int getType() {
return 1554;
}
public final String akf() {
return "/cgi-bin/mmpay-bin/operationwxhb";
}
public final void a(int i, String str, JSONObject jSONObject) {
if (i == 0) {
this.nnz = jSONObject.optInt("randomAmount");
this.nnx = jSONObject.optString("randomWishing");
this.kAO = jSONObject.optString("notice");
this.nnA = jSONObject.optString("notice_url");
this.nny = jSONObject.optInt("hasCanShareHongBao") == 1;
this.kAM = jSONObject.optInt("currency");
this.nmb = jSONObject.optString("currencyUint");
this.nmc = jSONObject.optString("currencyWording");
w.i("MicroMsg.NetSceneLuckyMoneyGetConfig", "currency=" + this.kAM + ";currencyUint=" + this.nmb + ";currencyWording=" + this.nmc);
c cVar = new c();
cVar.nlV = jSONObject.optString("groupHint");
cVar.nlW = jSONObject.optString("personalHint");
cVar.nlU = ((double) jSONObject.optLong("totalAmount", 200000)) / 100.0d;
cVar.nlT = jSONObject.optInt("totalNum", 100);
cVar.nlX = ((double) jSONObject.optLong("perPersonMaxValue", 20000)) / 100.0d;
cVar.nlY = ((double) jSONObject.optLong("perGroupMaxValue", 20000)) / 100.0d;
cVar.nlZ = ((double) jSONObject.optLong("perMinValue", 1)) / 100.0d;
cVar.nma = jSONObject.optInt("payShowBGFlag");
cVar.kAM = this.kAM;
cVar.nmb = this.nmb;
cVar.nmc = this.nmc;
a.aHG();
d aHH = a.aHH();
aHH.nmd = cVar;
w.i("MicroMsg.LuckyMoneyConfigManager", "setConfig maxTotalAmount:" + aHH.nmd.nlU + " maxTotalNum:" + aHH.nmd.nlT + " perGroupMaxValue:" + aHH.nmd.nlY + " perMinValue:" + aHH.nmd.nlZ + " perPersonMaxValue:" + aHH.nmd.nlX);
try {
String str2 = new String(aHH.nmd.toByteArray(), "ISO-8859-1");
ap.yY();
c.vr().set(356355, str2);
ap.yY();
c.vr().jY(true);
} catch (UnsupportedEncodingException e) {
w.w("MicroMsg.LuckyMoneyConfigManager", "save config exp, " + e.getLocalizedMessage());
} catch (IOException e2) {
w.w("MicroMsg.LuckyMoneyConfigManager", "save config exp, " + e2.getLocalizedMessage());
}
this.nnB = l.B(jSONObject.optJSONObject("operationHeader"));
this.nmx = l.B(jSONObject.optJSONObject("operationTail"));
this.nnC = l.B(jSONObject.optJSONObject("operationNext"));
this.nnD = l.B(jSONObject.optJSONObject("operationMiddle"));
int optInt = jSONObject.optInt("sceneSwitch");
ap.yY();
c.vr().a(com.tencent.mm.storage.w.a.uAa, Integer.valueOf(optInt));
w.i("MicroMsg.NetSceneLuckyMoneyGetConfig", "sceneSwitch:" + optInt);
this.nnE = jSONObject.optInt("scenePicSwitch");
w.i("MicroMsg.NetSceneLuckyMoneyGetConfig", "scenePicSwitch:" + this.nnE);
this.nmh = jSONObject.optString("wishing");
w.i("MicroMsg.NetSceneLuckyMoneyGetConfig", "wishing: %s", new Object[]{this.nmh});
JSONArray optJSONArray = jSONObject.optJSONArray("yearMess");
if (optJSONArray == null || optJSONArray.length() <= 0) {
w.i("MicroMsg.NetSceneLuckyMoneyGetConfig", "yearMessJson is empty!");
return;
}
w.i("MicroMsg.NetSceneLuckyMoneyGetConfig", "yearMessJson length:" + optJSONArray.length());
this.nnF = new LinkedList();
for (optInt = 0; optInt < optJSONArray.length(); optInt++) {
JSONObject optJSONObject = optJSONArray.optJSONObject(optInt);
k kVar = new k();
kVar.nmV = optJSONObject.optInt("yearAmount", 0);
kVar.nmW = optJSONObject.optString("yearWish");
this.nnF.add(kVar);
}
return;
}
w.e("MicroMsg.NetSceneLuckyMoneyGetConfig", "hongbao operation fail, errCode:" + i + ", errMsg:" + str);
}
}
|
[
"lizhangliao@xiaohongchun.com"
] |
lizhangliao@xiaohongchun.com
|
1ade7d04711ad57fd6a4c1d7443d578bd59baca4
|
df8e54ff5fbd5942280e3230123494a401c57730
|
/code/on-the-way/pre-way/src/main/java/com/vika/way/pre/algorithm/leetcode/easy/S001_100/S088MergeSortedArray.java
|
500efbe6500a3a1e7357777d71954d8c41b66877
|
[] |
no_license
|
kabitonn/cs-note
|
255297a0a0634335eefba79882f7314f7b97308f
|
1235bb56a40bce7e2056f083ba8cda0cd08e39b4
|
refs/heads/master
| 2022-06-09T23:46:02.145680
| 2022-05-13T10:44:53
| 2022-05-13T10:44:53
| 224,864,415
| 0
| 1
| null | 2022-05-13T07:25:09
| 2019-11-29T13:58:19
|
Java
|
UTF-8
|
Java
| false
| false
| 2,150
|
java
|
package com.vika.way.pre.algorithm.leetcode.easy.S001_100;
public class S088MergeSortedArray {
public static void main(String[] args) {
}
public void merge(int[] nums1, int m, int[] nums2, int n) {
int i = m - 1;
int j = n - 1;
int k = m + n - 1;
while (j >= 0) {
if (i >= 0 && nums1[i] > nums2[j]) {
nums1[k--] = nums1[i--];
} else {
nums1[k--] = nums2[j--];
}
}
}
public void merge1(int[] nums1, int m, int[] nums2, int n) {
//将 nums1 的数字全部移动到末尾
for (int i = 1; i <= m; i++) {
nums1[m + n - i] = nums1[m - i];
}
int i = n;
int j = 0;
int k = 0;
//遍历 nums2
while (j < n) {
//如果 nums1 遍历结束,将 nums2 直接加入
if (i == m + n) {
while (j < n) {
nums1[k++] = nums2[j++];
}
return;
}
//哪个数小就对应的添加哪个数
if (nums2[j] < nums1[i]) {
nums1[k++] = nums2[j++];
} else {
nums1[k++] = nums1[i++];
}
}
}
public void merge2(int[] nums1, int m, int[] nums2, int n) {
int i = 0, j = 0;
//遍历 nums2
while (j < n) {
//判断 nums1 是否遍历完
//(nums1 原有的数和当前已经插入的数相加)和 i 进行比较
if (i == m + j) {
//将剩余的 nums2 插入
while (j < n) {
nums1[m + j] = nums2[j];
j++;
}
return;
}
//判断当前 nums2 是否小于 nums1
if (nums2[j] < nums1[i]) {
//nums1 后移数组,空出位置以便插入
for (int k = m + j; k > i; k--) {
nums1[k] = nums1[k - 1];
}
nums1[i++] = nums2[j++];
} else {
i++;
}
}
}
}
|
[
"chenwei.tjw@alibaba-inc.com"
] |
chenwei.tjw@alibaba-inc.com
|
168d2b95e14875e5f9cbe241c9f8eb5467a99a67
|
b8b7e7f84e5dd812bbd70a72e9bc38c97f93950a
|
/plugins/org.polymap.rhei.data/src-test/org/polymap/rhei/data/entitystore/test/RepositoryAssembler.java
|
d33d233a895770aea64009ba5062f2396d949a59
|
[] |
no_license
|
Polymap3/polymap3-rhei
|
8125d4d18aabd3bd065cfa15915d3accee28ec66
|
c60d3c715074b0eee071bc9f5656a0c80baa8a89
|
refs/heads/master
| 2021-01-18T22:36:46.223268
| 2016-06-29T16:37:00
| 2016-06-29T16:37:00
| 31,905,076
| 0
| 2
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 3,541
|
java
|
/*
* polymap.org
* Copyright 2011, Falko Bräutigam, and other contributors as
* indicated by the @authors tag. All rights reserved.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package org.polymap.rhei.data.entitystore.test;
import org.qi4j.api.entity.EntityComposite;
import org.qi4j.api.structure.Application;
import org.qi4j.api.structure.Module;
import org.qi4j.api.unitofwork.UnitOfWorkFactory;
import org.qi4j.api.value.ValueComposite;
import org.qi4j.bootstrap.ApplicationAssembly;
import org.qi4j.bootstrap.AssemblyException;
import org.qi4j.bootstrap.LayerAssembly;
import org.qi4j.bootstrap.ModuleAssembly;
import org.polymap.core.qi4j.QiModule;
import org.polymap.core.qi4j.QiModuleAssembler;
import org.polymap.core.qi4j.idgen.HRIdentityGeneratorService;
import org.polymap.rhei.data.entitystore.lucene.LuceneEntityStoreInfo;
import org.polymap.rhei.data.entitystore.lucene.LuceneEntityStoreQueryService;
import org.polymap.rhei.data.entitystore.lucene.LuceneEntityStoreService;
/**
*
*
* @author <a href="http://www.polymap.de">Falko Bräutigam</a>
*/
public class RepositoryAssembler
extends QiModuleAssembler {
Application app;
UnitOfWorkFactory uowf;
Module module;
private Class<? extends EntityComposite>[] entities;
private Class<? extends ValueComposite>[] values;
public RepositoryAssembler( Class<? extends EntityComposite>... entities ) {
this.entities = entities;
}
public void setValues( Class<? extends ValueComposite>... values ) {
this.values = values;
}
@Override
public Module getModule() {
return module;
}
@Override
public void createInitData() throws Exception {
}
@Override
public QiModule newModule() {
return new QiModule( this ) {
};
}
protected void setApp( Application app ) {
this.app = app;
this.module = app.findModule( "application-layer", "test-module" );
this.uowf = module.unitOfWorkFactory();
}
public void assemble( ApplicationAssembly _app )
throws AssemblyException {
// project layer / module
LayerAssembly domainLayer = _app.layerAssembly( "application-layer" );
ModuleAssembly domainModule = domainLayer.moduleAssembly( "test-module" );
domainModule.addEntities( entities );
if (values != null) {
domainModule.addValues( values );
}
domainModule.addServices( LuceneEntityStoreService.class )
.setMetaInfo( new LuceneEntityStoreInfo() )
.instantiateOnStartup()
.identifiedBy( "lucene-repository" );
// indexer
domainModule.addServices( LuceneEntityStoreQueryService.class )
//.visibleIn( indexingVisibility )
//.setMetaInfo( namedQueries )
.instantiateOnStartup();
domainModule.addServices( HRIdentityGeneratorService.class );
}
}
|
[
"falko@polymap.de"
] |
falko@polymap.de
|
8196ac4c8c677094e92021200ef3b16e6dc36cc9
|
56d1c5242e970ca0d257801d4e627e2ea14c8aeb
|
/src/com/csms/leetcode/number/n800/n840/Leetcode859.java
|
3101c1ec11e4dacea7d2fa0422bf515aed9954f7
|
[] |
no_license
|
dai-zi/leetcode
|
e002b41f51f1dbd5c960e79624e8ce14ac765802
|
37747c2272f0fb7184b0e83f052c3943c066abb7
|
refs/heads/master
| 2022-12-14T11:20:07.816922
| 2020-07-24T03:37:51
| 2020-07-24T03:37:51
| 282,111,073
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,065
|
java
|
package com.csms.leetcode.number.n800.n840;
//亲密字符串
//简单
public class Leetcode859 {
public boolean buddyStrings(String A, String B) {
if (A.length() != B.length()) return false;
if (A.equals(B)) {
int[] count = new int[26];
for (int i = 0; i < A.length(); ++i)
count[A.charAt(i) - 'a']++;
for (int c: count)
if (c > 1) return true;
return false;
} else {
int first = -1, second = -1;
for (int i = 0; i < A.length(); ++i) {
if (A.charAt(i) != B.charAt(i)) {
if (first == -1)
first = i;
else if (second == -1)
second = i;
else
return false;
}
}
return (second != -1 && A.charAt(first) == B.charAt(second) &&
A.charAt(second) == B.charAt(first));
}
}
public static void main(String[] args) {
}
}
|
[
"liuxiaotongdaizi@sina.com"
] |
liuxiaotongdaizi@sina.com
|
bc40ef16c0fe3978bae3a5563bff1c33cae8bce7
|
5d1e1c5bc45ce22bda971992a917931d28240e53
|
/dutil-basic/src/main/java/com/dwarfeng/dutil/basic/cna/model/obs/SetObserver.java
|
54fa707f1ac737bb49f5bae5872d2cee9300d98c
|
[
"Apache-2.0"
] |
permissive
|
DwArFeng/dutil
|
cb032516387707c8e69b7965a6f4bdcf244cf7d9
|
40ddc86d93d3c5c3b225f603ff4a3e446ba9fbbd
|
refs/heads/master
| 2022-12-02T11:38:42.295013
| 2022-11-15T08:59:42
| 2022-11-15T08:59:42
| 63,686,897
| 1
| 0
|
Apache-2.0
| 2022-04-15T02:31:10
| 2016-07-19T11:08:08
|
Java
|
UTF-8
|
Java
| false
| false
| 883
|
java
|
package com.dwarfeng.dutil.basic.cna.model.obs;
import com.dwarfeng.dutil.basic.cna.model.SetModel;
import com.dwarfeng.dutil.basic.prog.Observer;
/**
* 集合模型观察器。
*
* @author DwArFeng
* @since 0.3.0-beta
*/
public interface SetObserver<E> extends Observer {
/**
* 通知模型中指定的元素被添加。
*
* @param element 指定的元素。
*/
void fireAdded(E element);
/**
* 通知模型中指定的元素被移除。
*
* @param element 指定的元素。
*/
void fireRemoved(E element);
/**
* 通知模型中所有元素被清除。
* <p> 该方法是为了优化效率而定义的,因此,在模型执行 {@link SetModel#clear()}的时候,
* 会调用该方法进行通知,而不是 一条条地调用 {@link #fireRemoved(Object)}。
*/
void fireCleared();
}
|
[
"915724865@qq.com"
] |
915724865@qq.com
|
cb87861a57a5f3f7fee973654aaa04053011c7e4
|
2597eaf2c898d82b2e907538dc806ed3ca60c049
|
/src/company/LinkedIn/medium/PartitionToKEqualSumSubsets.java
|
12b9ce233ce81c926bb12966c213ec8f49790ef2
|
[] |
no_license
|
LeeGerry/LeetCodeJava
|
595983ce1a102483f4abda462594f166c267d661
|
350c376563ee87f167f58acee5b438d9602e0cac
|
refs/heads/master
| 2021-09-11T09:56:24.634935
| 2018-04-06T16:41:24
| 2018-04-06T16:41:24
| 125,871,146
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,609
|
java
|
package company.LinkedIn.medium;
/**
* LeetCode 698
* Given an array of integers nums and a positive integer k,
find whether it's possible to divide this array into k non-empty subsets whose sums are all equal.
Example 1:
Input: nums = [4, 3, 2, 3, 5, 2, 1], k = 4
Output: True
Explanation: It's possible to divide it into 4 subsets (5), (1, 4), (2,3), (2,3) with equal sums.
Note:
1 <= k <= len(nums) <= 16.
0 < nums[i] < 10000.
*/
public class PartitionToKEqualSumSubsets {
public boolean canPartitionKSubsets(int[] nums, int k) {
int sum = 0;
for (int n: nums) sum += n;
if (k <= 0 || sum % k != 0) return false;
boolean[] visited = new boolean[nums.length];
return helper(nums, visited, 0, k, 0, 0, sum / k);
}
private boolean helper(int[] nums, boolean[] visited,
int start, int k, int curSum, int curNum,int target) {
if (k == 1) return true;
if (curSum == target && curNum > 0)
return helper(nums, visited, 0, k - 1, 0, 0, target);
for (int i = start; i < nums.length; i++) {
if (!visited[i]) {
visited[i] = true;
if (helper(nums, visited, i + 1, k, curSum + nums[i], curNum++, target))
return true;
visited[i] = false;
}
}
return false;
}
public static void main(String[] args) {
int[] nums = {4, 3, 2, 3, 5, 2, 1};
int target = 4;
System.out.println(new PartitionToKEqualSumSubsets().canPartitionKSubsets(nums, target));
}
}
|
[
"proheart123@gmail.com"
] |
proheart123@gmail.com
|
209ea19c2ada62b7f1ad8685e80efb6f171b6a75
|
06d22cf1b57cb34f1e499fad7c59f7db4a400cac
|
/src/main/java/com/estsoft/guestbook/dao/GuestbookDao.java
|
4c7359925f9ea67d3a78477cf2634e7efe7f60a9
|
[] |
no_license
|
donkrazy/Week8-spring-solution
|
b67339e8a276e83bb875249f89337736d15a707e
|
d78fd340baef5fb2a2807fbcbe4b37cb9337abec
|
refs/heads/master
| 2021-01-21T06:18:07.389854
| 2016-05-13T04:36:49
| 2016-05-13T04:36:49
| 56,827,587
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,054
|
java
|
package com.estsoft.guestbook.dao;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.estsoft.db.DBConnection;
import com.estsoft.guestbook.vo.GuestbookVo;
@Repository
public class GuestbookDao {
@Autowired
private DBConnection dbConnection;
public void insert( GuestbookVo vo ) {
Connection conn = null;
PreparedStatement pstmt = null;
try{
conn = dbConnection.getConnection();
String sql = "INSERT INTO guestbook VALUES( null, ?, now(), ?, password(?) )";
pstmt = conn.prepareStatement( sql );
pstmt.setString( 1, vo.getName() );
pstmt.setString( 2, vo.getMessage() );
pstmt.setString( 3, vo.getPassword() );
pstmt.executeUpdate();
} catch( SQLException ex ) {
System.out.println( "error:" + ex );
} finally {
try{
if( pstmt != null ) {
pstmt.close();
}
if( conn != null ) {
conn.close();
}
}catch( SQLException ex ) {
ex.printStackTrace();
}
}
}
public void delete( GuestbookVo vo ) {
Connection conn = null;
PreparedStatement pstmt = null;
try{
conn = dbConnection.getConnection();
String sql = "DELETE FROM guestbook WHERE no = ? AND passwd = password(?)";
pstmt = conn.prepareStatement( sql );
pstmt.setLong( 1, vo.getNo() );
pstmt.setString( 2, vo.getPassword() );
pstmt.executeUpdate();
} catch( SQLException ex ) {
System.out.println( "error:" + ex );
} finally {
try{
if( pstmt != null ) {
pstmt.close();
}
if( conn != null ) {
conn.close();
}
}catch( SQLException ex ) {
ex.printStackTrace();
}
}
}
public List<GuestbookVo> getList() {
List<GuestbookVo> list = new ArrayList<GuestbookVo>();
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
try {
conn = dbConnection.getConnection();
stmt = conn.createStatement();
String sql = "SELECT no, name, DATE_FORMAT( reg_date, '%Y-%m-%d %p %h:%i:%s' ), message from guestbook ORDER BY reg_date desc";
rs = stmt.executeQuery( sql );
while( rs.next() ) {
Long no = rs.getLong( 1 );
String name = rs.getString( 2 );
String regDate = rs.getString( 3 );
String message = rs.getString( 4 );
GuestbookVo vo = new GuestbookVo();
vo.setNo( no );
vo.setName( name );
vo.setRegDate( regDate );
vo.setMessage( message );
list.add( vo );
}
} catch( SQLException ex ) {
System.out.println( "error: " + ex);
} finally {
try{
if( rs != null ) {
rs.close();
}
if( stmt != null ) {
stmt.close();
}
if( conn != null ) {
conn.close();
}
}catch( SQLException ex ) {
ex.printStackTrace();
}
}
return list;
}
}
|
[
"kickscar@gmail.com"
] |
kickscar@gmail.com
|
b630557bb64ea94511511a9df2b4cb2ad189bb42
|
166b6f4d0a2a391b7d05f6ddd245f1eb9dbce9f4
|
/spring/userguide/src/main/java/com/ashish/poc/config/H2DataSource.java
|
b6e47992551aade8d400db2d496a6a236bb48a34
|
[] |
no_license
|
ashismo/repositoryForMyBlog
|
72690495fb5357e5235776d143e60582881cb99a
|
f6bc2f6b57382fdc732ac477733aa0e7feb69cbb
|
refs/heads/master
| 2023-03-11T17:28:41.943846
| 2023-02-27T12:59:08
| 2023-02-27T12:59:08
| 35,325,045
| 2
| 27
| null | 2022-12-16T04:26:05
| 2015-05-09T10:47:17
|
Java
|
UTF-8
|
Java
| false
| false
| 5,025
|
java
|
package com.ashish.poc.config;
import java.sql.SQLException;
import javax.sql.DataSource;
import org.h2.tools.Server;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.core.io.ClassPathResource;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.jdbc.datasource.init.DatabasePopulator;
import org.springframework.jdbc.datasource.init.DatabasePopulatorUtils;
import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import com.ashish.poc.security.config.SecurityConfig;
//@Profile("h2")
@Configuration
@EnableAspectJAutoProxy
@EnableTransactionManagement
@PropertySource("classpath:config.properties")
@Import(SecurityConfig.class)
public class H2DataSource {
// jdbc:h2:mem:testdb
@Autowired
private Environment env;
@Bean
public DataSource dataSource() {
DriverManagerDataSource dmDataSource = new DriverManagerDataSource();
dmDataSource.setDriverClassName(env.getProperty("h2db.driver"));
dmDataSource.setUsername(env.getProperty("h2db.user"));
dmDataSource.setPassword(env.getProperty("h2db.password"));
/**
* Below line uses the testdb.h2.db file as database.
*/
String inMemoryInd = env.getProperty("h2db.inmemory.active");
if(!"true".equalsIgnoreCase(inMemoryInd)) {
if("true".equalsIgnoreCase(env.getProperty("h2db.prod.environment"))) { // Production environment is unix server
dmDataSource.setUrl(env.getProperty("h2db.file.url.unix.path"));
} else {
dmDataSource.setUrl(env.getProperty("h2db.file.url"));
}
if(!"true".equalsIgnoreCase(env.getProperty("h2db.prod.environment")) &&
"true".equalsIgnoreCase(env.getProperty("h2db.file.loadFromFile"))) {
if("true".equalsIgnoreCase(env.getProperty("h2db.file.dropAllTables"))) {
DatabasePopulatorUtils.execute(dropAllTables(), dmDataSource);
}
DatabasePopulatorUtils.execute(createAllTables(), dmDataSource);
if("true".equalsIgnoreCase(env.getProperty("h2db.file.dropAllTables"))) { // If tables are not dropped then there is no point in inserting data again
DatabasePopulatorUtils.execute(populateDatabase(), dmDataSource);
}
}else if("true".equalsIgnoreCase(env.getProperty("h2db.prod.environment"))) { // For production environment
DatabasePopulatorUtils.execute(createAllTables(), dmDataSource);
}
} else {
/**
* Below commented line loads database with the scripts used in createDatabasePopulator() function.
* Once loaded then it uses in-memory database
*/
dmDataSource.setUrl(env.getProperty("h2db.inmemory.url"));
DatabasePopulatorUtils.execute(createAllTables(), dmDataSource);
DatabasePopulatorUtils.execute(populateDatabase(), dmDataSource);
}
return dmDataSource;
}
private DatabasePopulator populateDatabase() {
ResourceDatabasePopulator databasePopulator = new ResourceDatabasePopulator();
databasePopulator.setContinueOnError(true);
databasePopulator.addScript(new ClassPathResource("db/sql/insert-data.sql"));
return databasePopulator;
}
private DatabasePopulator dropAllTables() {
ResourceDatabasePopulator databasePopulator = new ResourceDatabasePopulator();
databasePopulator.setContinueOnError(true);
databasePopulator.addScript(new ClassPathResource("db/sql/drop-all-tables.sql"));
return databasePopulator;
}
private DatabasePopulator createAllTables() {
ResourceDatabasePopulator databasePopulator = new ResourceDatabasePopulator();
databasePopulator.setContinueOnError(true);
databasePopulator.addScript(new ClassPathResource("db/sql/create-db.sql"));
return databasePopulator;
}
@Bean
public NamedParameterJdbcTemplate namedParameterJdbcTemplate() {
System.out.println("Initialize jdbcTemplate");
NamedParameterJdbcTemplate jdbcTemplate = new NamedParameterJdbcTemplate(dataSource());
return jdbcTemplate;
}
@Bean
public DataSourceTransactionManager transactionManager() {
DataSourceTransactionManager transactionManager = new DataSourceTransactionManager();
transactionManager.setDataSource(dataSource());
return transactionManager;
}
// Start WebServer, access http://localhost:8082
// @Bean(initMethod = "start", destroyMethod = "stop")
// public Server startDBManager() throws SQLException {
// return Server.createWebServer();
// }
}
|
[
"ashishkrmondal@gmail.com"
] |
ashishkrmondal@gmail.com
|
11cf72bb8c2bd0dcadda69b4da5449ec5422d763
|
39b7e86a2b5a61a1f7befb47653f63f72e9e4092
|
/src/main/java/com/alipay/api/response/KoubeiMerchantOperatorSearchQueryResponse.java
|
8180eebbf354123efee9dc9cd4e6995f46fc83d0
|
[
"Apache-2.0"
] |
permissive
|
slin1972/alipay-sdk-java-all
|
dbec0604c2d0b76d8a1ebf3fd8b64d4dd5d21708
|
63095792e900bbcc0e974fc242d69231ec73689a
|
refs/heads/master
| 2020-08-12T14:18:07.203276
| 2019-10-13T09:00:11
| 2019-10-13T09:00:11
| 214,782,009
| 0
| 0
|
Apache-2.0
| 2019-10-13T07:56:34
| 2019-10-13T07:56:34
| null |
UTF-8
|
Java
| false
| false
| 1,167
|
java
|
package com.alipay.api.response;
import java.util.List;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
import com.alipay.api.domain.OperatorBaseInfo;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.merchant.operator.search.query response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class KoubeiMerchantOperatorSearchQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 3391813833414317236L;
/**
* 根据不同条件查询返回的口碑商家中心操作员列表
*/
@ApiListField("operator_list")
@ApiField("operator_base_info")
private List<OperatorBaseInfo> operatorList;
/**
* 操作员列表查询结果总数
*/
@ApiField("total")
private Long total;
public void setOperatorList(List<OperatorBaseInfo> operatorList) {
this.operatorList = operatorList;
}
public List<OperatorBaseInfo> getOperatorList( ) {
return this.operatorList;
}
public void setTotal(Long total) {
this.total = total;
}
public Long getTotal( ) {
return this.total;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
23866aad1f5eda96898c902c0111c8081cbb3ddd
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/1/1_533c2f53e95551cc4092f3ec3a0923b5864636aa/Subreddits/1_533c2f53e95551cc4092f3ec3a0923b5864636aa_Subreddits_t.java
|
c15c966b27dc187dc37b1de549ce471bdf789094
|
[] |
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
| 5,968
|
java
|
/*
* Copyright (C) 2012 Brian Muramatsu
*
* 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.btmura.android.reddit.database;
import java.util.ArrayList;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.provider.BaseColumns;
import android.text.TextUtils;
import com.btmura.android.reddit.R;
import com.btmura.android.reddit.util.Array;
public class Subreddits implements BaseColumns {
public static final String TABLE_NAME = "subreddits";
public static final String COLUMN_ACCOUNT = "account";
public static final String COLUMN_NAME = "name";
public static final String COLUMN_STATE = "state";
public static final String COLUMN_EXPIRATION = "expiration";
public static final String SELECT_BY_ACCOUNT = Subreddits.COLUMN_ACCOUNT + "= ?";
public static final String SELECT_BY_ACCOUNT_NOT_DELETED = SELECT_BY_ACCOUNT + " AND "
+ Subreddits.COLUMN_STATE + "!= " + Subreddits.STATE_DELETING;
public static final String SELECT_BY_ACCOUNT_AND_NAME = SELECT_BY_ACCOUNT + " AND "
+ Subreddits.COLUMN_NAME + "= ?";
public static final String SORT_BY_NAME = Subreddits.COLUMN_NAME + " COLLATE NOCASE ASC";
public static final String ACCOUNT_NONE = "";
public static final String NAME_FRONT_PAGE = "";
public static final String NAME_ALL = "all";
public static final String NAME_RANDOM = "random";
public static final int STATE_NORMAL = 0;
public static final int STATE_INSERTING = 1;
public static final int STATE_DELETING = 2;
public static boolean isFrontPage(String subreddit) {
return TextUtils.isEmpty(subreddit);
}
public static boolean isRandom(String subreddit) {
return NAME_RANDOM.equalsIgnoreCase(subreddit);
}
public static boolean isSyncable(String subreddit) {
return !isFrontPage(subreddit)
&& !NAME_ALL.equalsIgnoreCase(subreddit)
&& !NAME_RANDOM.equalsIgnoreCase(subreddit);
}
public static String getTitle(Context c, String subreddit) {
return isFrontPage(subreddit) ? c.getString(R.string.front_page) : subreddit;
}
static void createSubredditsV2(SQLiteDatabase db) {
db.execSQL("CREATE TABLE " + Subreddits.TABLE_NAME + " ("
+ Subreddits._ID + " INTEGER PRIMARY KEY, "
+ Subreddits.COLUMN_ACCOUNT + " TEXT DEFAULT '', "
+ Subreddits.COLUMN_NAME + " TEXT NOT NULL, "
+ Subreddits.COLUMN_STATE + " INTEGER DEFAULT 0, "
+ Subreddits.COLUMN_EXPIRATION + " INTEGER DEFAULT 0, "
+ "UNIQUE (" + Subreddits.COLUMN_ACCOUNT + "," + Subreddits.COLUMN_NAME + "))");
}
static void createSubredditsV1(SQLiteDatabase db) {
db.execSQL("CREATE TABLE " + Subreddits.TABLE_NAME + " ("
+ Subreddits._ID + " INTEGER PRIMARY KEY, "
+ Subreddits.COLUMN_NAME + " TEXT UNIQUE NOT NULL)");
db.execSQL("CREATE UNIQUE INDEX " + Subreddits.COLUMN_NAME
+ " ON " + Subreddits.TABLE_NAME + " ("
+ Subreddits.COLUMN_NAME + " ASC)");
}
static void insertDefaultSubreddits(SQLiteDatabase db) {
String[] defaultSubreddits = {
"AdviceAnimals",
"announcements",
"AskReddit",
"askscience",
"atheism",
"aww",
"blog",
"funny",
"gaming",
"IAmA",
"movies",
"Music",
"pics",
"politics",
"science",
"technology",
"todayilearned",
"videos",
"worldnews",
"WTF",};
for (int i = 0; i < defaultSubreddits.length; i++) {
ContentValues values = new ContentValues(1);
values.put(Subreddits.COLUMN_NAME, defaultSubreddits[i]);
db.insert(Subreddits.TABLE_NAME, null, values);
}
}
static void upgradeSubredditsV2(SQLiteDatabase db) {
// 1. Back up the old subreddit rows into ContentValues.
ArrayList<ContentValues> rows = getSubredditNames(db);
// 2. Drop the old table and index.
db.execSQL("DROP INDEX " + Subreddits.COLUMN_NAME);
db.execSQL("DROP TABLE " + Subreddits.TABLE_NAME);
// 3. Create the new table and import the backed up subreddits.
createSubredditsV2(db);
int count = rows.size();
for (int i = 0; i < count; i++) {
db.insert(Subreddits.TABLE_NAME, null, rows.get(i));
}
}
private static ArrayList<ContentValues> getSubredditNames(SQLiteDatabase db) {
Cursor c = db.query(Subreddits.TABLE_NAME, Array.of(Subreddits.COLUMN_NAME),
null, null, null, null, null);
ArrayList<ContentValues> rows = new ArrayList<ContentValues>(c.getCount());
while (c.moveToNext()) {
ContentValues values = new ContentValues(1);
values.put(Subreddits.COLUMN_NAME, c.getString(0));
rows.add(values);
}
c.close();
return rows;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
18efdf35d3a6ac40ddada761bd4afd188bffed7f
|
7b48b1908f2e23b1d594c3fb0c175364cad8ac6d
|
/edu.pdx.svl.coDoc.cdt.core/src/edu/pdx/svl/coDoc/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespace.java
|
3027c75eb8fcf0bceceb3e36310fe5be05289230
|
[] |
no_license
|
hellozt/coDoc
|
89bd3928a289dc5a1a53ef81d8048c82eb0cdf46
|
7015c431c9b903a19c0785631c7eb76d857e23cf
|
refs/heads/master
| 2021-01-17T18:23:57.253024
| 2013-05-04T16:09:52
| 2013-05-04T16:09:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,882
|
java
|
/*******************************************************************************
* Copyright (c) 2006 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX - Initial API and implementation
*******************************************************************************/
package edu.pdx.svl.coDoc.cdt.internal.core.pdom.dom.cpp;
import edu.pdx.svl.coDoc.cdt.core.CCorePlugin;
import edu.pdx.svl.coDoc.cdt.core.dom.IPDOMVisitor;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.DOMException;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.IASTFunctionCallExpression;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.IASTIdExpression;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.IASTName;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.IASTNamedTypeSpecifier;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.IASTNode;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.IBinding;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.IScope;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.cpp.ICPPASTQualifiedName;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.cpp.ICPPNamespace;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.cpp.ICPPNamespaceScope;
import edu.pdx.svl.coDoc.cdt.internal.core.pdom.PDOM;
import edu.pdx.svl.coDoc.cdt.internal.core.pdom.db.BTree;
import edu.pdx.svl.coDoc.cdt.internal.core.pdom.db.IBTreeVisitor;
import edu.pdx.svl.coDoc.cdt.internal.core.pdom.dom.PDOMBinding;
import edu.pdx.svl.coDoc.cdt.internal.core.pdom.dom.PDOMNamedNode;
import edu.pdx.svl.coDoc.cdt.internal.core.pdom.dom.PDOMNode;
import edu.pdx.svl.coDoc.cdt.internal.core.pdom.dom.PDOMNotImplementedError;
import org.eclipse.core.runtime.CoreException;
/**
* @author Doug Schaefer
*
*/
public class PDOMCPPNamespace extends PDOMBinding implements ICPPNamespace,
ICPPNamespaceScope {
private static final int INDEX_OFFSET = PDOMBinding.RECORD_SIZE + 0;
protected static final int RECORD_SIZE = PDOMBinding.RECORD_SIZE + 4;
public PDOMCPPNamespace(PDOM pdom, PDOMNode parent, IASTName name)
throws CoreException {
super(pdom, parent, name);
}
public PDOMCPPNamespace(PDOM pdom, int record) {
super(pdom, record);
}
protected int getRecordSize() {
return RECORD_SIZE;
}
public int getNodeType() {
return PDOMCPPLinkage.CPPNAMESPACE;
}
public BTree getIndex() throws CoreException {
return new BTree(pdom.getDB(), record + INDEX_OFFSET);
}
public void accept(final IPDOMVisitor visitor) throws CoreException {
super.accept(visitor);
getIndex().accept(new IBTreeVisitor() {
public int compare(int record) throws CoreException {
return 1;
};
public boolean visit(int record) throws CoreException {
PDOMBinding binding = pdom.getBinding(record);
if (binding != null) {
if (visitor.visit(binding))
binding.accept(visitor);
}
return true;
};
});
}
public void addChild(PDOMNamedNode child) throws CoreException {
getIndex().insert(child.getRecord(), child.getIndexComparator());
}
public String[] getQualifiedName() throws DOMException {
throw new PDOMNotImplementedError();
}
public char[][] getQualifiedNameCharArray() throws DOMException {
throw new PDOMNotImplementedError();
}
public boolean isGloballyQualified() throws DOMException {
throw new PDOMNotImplementedError();
}
public IBinding[] getMemberBindings() throws DOMException {
throw new PDOMNotImplementedError();
}
public ICPPNamespaceScope getNamespaceScope() throws DOMException {
return this;
}
public void addUsingDirective(IASTNode directive) throws DOMException {
throw new PDOMNotImplementedError();
}
public IASTNode[] getUsingDirectives() throws DOMException {
// TODO
return new IASTNode[0];
}
public void addBinding(IBinding binding) throws DOMException {
throw new PDOMNotImplementedError();
}
public void addName(IASTName name) throws DOMException {
throw new PDOMNotImplementedError();
}
public IBinding[] find(String name) throws DOMException {
throw new PDOMNotImplementedError();
}
public void flushCache() throws DOMException {
throw new PDOMNotImplementedError();
}
private static final class FindBinding extends PDOMNamedNode.NodeFinder {
PDOMBinding pdomBinding;
final int[] desiredType;
public FindBinding(PDOM pdom, char[] name, int desiredType) {
this(pdom, name, new int[] { desiredType });
}
public FindBinding(PDOM pdom, char[] name, int[] desiredType) {
super(pdom, name);
this.desiredType = desiredType;
}
public boolean visit(int record) throws CoreException {
if (record == 0)
return true;
PDOMBinding tBinding = pdom.getBinding(record);
if (!tBinding.hasName(name))
// no more bindings with our desired name
return false;
int nodeType = tBinding.getNodeType();
for (int i = 0; i < desiredType.length; ++i)
if (nodeType == desiredType[i]) {
// got it
pdomBinding = tBinding;
return false;
}
// wrong type, try again
return true;
}
}
public IBinding getBinding(IASTName name, boolean resolve)
throws DOMException {
try {
if (name instanceof ICPPASTQualifiedName) {
IASTName lastName = ((ICPPASTQualifiedName) name).getLastName();
return lastName != null ? lastName.resolveBinding() : null;
}
IASTNode parent = name.getParent();
if (parent instanceof ICPPASTQualifiedName) {
IASTName[] names = ((ICPPASTQualifiedName) parent).getNames();
if (name == names[names.length - 1]) {
parent = parent.getParent();
} else {
IASTName nsname = null;
for (int i = 0; i < names.length - 2; ++i) {
if (name != names[i])
nsname = names[i];
}
// make sure we're the namespace they're talking about
if (nsname != null && !equals(pdom.resolveBinding(nsname)))
return null;
// Look up the name
FindBinding visitor = new FindBinding(pdom, name
.toCharArray(), new int[] {
PDOMCPPLinkage.CPPCLASSTYPE,
PDOMCPPLinkage.CPPNAMESPACE,
PDOMCPPLinkage.CPPFUNCTION,
PDOMCPPLinkage.CPPVARIABLE });
getIndex().accept(visitor);
return visitor.pdomBinding;
}
}
if (parent instanceof IASTIdExpression) {
// reference
IASTNode eParent = parent.getParent();
if (eParent instanceof IASTFunctionCallExpression) {
FindBinding visitor = new FindBinding(pdom, name
.toCharArray(), PDOMCPPLinkage.CPPFUNCTION);
getIndex().accept(visitor);
return visitor.pdomBinding;
} else {
FindBinding visitor = new FindBinding(
pdom,
name.toCharArray(),
(name.getParent() instanceof ICPPASTQualifiedName && ((ICPPASTQualifiedName) name
.getParent()).getLastName() != name) ? PDOMCPPLinkage.CPPNAMESPACE
: PDOMCPPLinkage.CPPVARIABLE);
getIndex().accept(visitor);
return visitor.pdomBinding;
}
} else if (parent instanceof IASTNamedTypeSpecifier) {
FindBinding visitor = new FindBinding(pdom, name.toCharArray(),
PDOMCPPLinkage.CPPCLASSTYPE);
getIndex().accept(visitor);
return visitor.pdomBinding;
}
return null;
} catch (CoreException e) {
CCorePlugin.log(e);
return null;
}
}
public IScope getParent() throws DOMException {
// TODO
return null;
}
public IASTNode getPhysicalNode() throws DOMException {
throw new PDOMNotImplementedError();
}
public IASTName getScopeName() throws DOMException {
throw new PDOMNotImplementedError();
}
public boolean isFullyCached() throws DOMException {
return true;
}
public void removeBinding(IBinding binding) throws DOMException {
throw new PDOMNotImplementedError();
}
public void setFullyCached(boolean b) throws DOMException {
throw new PDOMNotImplementedError();
}
}
|
[
"electronseu@gmail.com"
] |
electronseu@gmail.com
|
73d554bae0f46e688633b3bcc6a7a016cd9ed8cf
|
35d105d4e23bd5e5e58221c3d07625e32f2ad052
|
/hadrumaths/hadrumaths-java/src/main/java/net/vpc/scholar/hadrumaths/derivation/formal/ExpDifferentiator.java
|
c5e47855809b29f883200e8bd830398cfc0e7cba
|
[] |
no_license
|
imenk1986/scholar-mw
|
a7f9478bd2a56dbcb442217da5429a15030cdd6c
|
d649ed0b00d7982bf0e537c2bb582eaeeff3df96
|
refs/heads/master
| 2021-06-23T07:24:23.828936
| 2017-08-14T21:20:03
| 2017-08-14T21:20:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 681
|
java
|
package net.vpc.scholar.hadrumaths.derivation.formal;
import net.vpc.scholar.hadrumaths.Axis;
import net.vpc.scholar.hadrumaths.Expr;
import net.vpc.scholar.hadrumaths.derivation.FunctionDifferentiator;
import net.vpc.scholar.hadrumaths.derivation.FunctionDifferentiatorManager;
import net.vpc.scholar.hadrumaths.symbolic.*;
/**
* @author Taha Ben Salah (taha.bensalah@gmail.com)
* @creationtime 6 juil. 2007 10:04:00
*/
public class ExpDifferentiator implements FunctionDifferentiator {
public Expr derive(Expr f, Axis varIndex, FunctionDifferentiatorManager d) {
Exp c = (Exp) f;
return new Mul(
d.derive(f,varIndex),c
);
}
}
|
[
"canard77"
] |
canard77
|
7717bfbcdf9ce76efb8debb9506c6ec566343f51
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/64/org/apache/commons/math/linear/EigenDecompositionImpl_getRealEigenvalue_203.java
|
b239b2710afd5a5e9540bc9fa3b52bf2292e5021
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,461
|
java
|
org apach common math linear
calcul eigen decomposit real strong symmetr strong
matrix
eigen decomposit matrix set matric
time matric
support strong symmetr strong matric
comput real real eigenvalu realeigenvalu impli matrix return
link getd diagon imaginari valu return
link imag eigenvalu getimageigenvalu link imag eigenvalu getimageigenvalu
call link real matrix realmatrix argument implement
upper part matrix part diagon access
implement base paper drubrul martin
wilkinson 'the implicit algorithm' wilksinson reinsch
handbook automat comput vol linear algebra springer verlag
york
version revis date
eigen decomposit impl eigendecompositionimpl eigen decomposit eigendecomposit
inherit doc inheritdoc
real eigenvalu getrealeigenvalu invalid matrix except invalidmatrixexcept
arrai index bound except arrayindexoutofboundsexcept
real eigenvalu realeigenvalu
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
f2f28cb0a7aca35836f1354ad6974cfa402faee1
|
72f6573f05194d264e496a9f4065a9e93f4f777d
|
/authorityManagement/src/com/lanyuan/security/MyAuthenticationFilter.java
|
855b562adef82a3149b966d9e5fece52ec9ca6ec
|
[
"BSD-2-Clause"
] |
permissive
|
zhangjunfang/eclipse-dir
|
66c87159c3d95e129b0b8cfd89fdfc87a63570dd
|
6a6a4a8114f07e850ed2efd2b7049fcebbd63032
|
refs/heads/master
| 2016-09-05T17:55:03.981020
| 2014-07-06T03:41:36
| 2014-07-06T03:41:36
| 21,530,444
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,932
|
java
|
package com.lanyuan.security;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationServiceException;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import com.lanyuan.dao.UserDao;
import com.lanyuan.entity.User;
import com.lanyuan.entity.UserLoginList;
import com.lanyuan.service.UserLoginListService;
import com.lanyuan.util.Common;
/**
* 这个类主要是用户登录验证
*
* @author lanyuan 2013-11-19
* @Email: mmm333zzz520@163.com
* @version 1.0v
*/
public class MyAuthenticationFilter extends
UsernamePasswordAuthenticationFilter {
private static final String USERNAME = "username";
private static final String PASSWORD = "password";
/**
* 登录成功后跳转的地址
*/
private String successUrl = "/background/index.html";
/**
* 登录失败后跳转的地址
*/
private String errorUrl = "/background/login.html";
@Autowired
private UserDao userDao;
@Autowired
private UserLoginListService userLoginListService;
/**
* 自定义表单参数的name属性,默认是 j_username 和 j_password
* 定义登录成功和失败的跳转地址
* @author LJN
* Email: mmm333zzz520@163.com
* @date 2013-12-5 下午7:02:32
*/
public void init() {
// System.err.println(" --------------- MyAuthenticationFilter init--------------- ");
this.setUsernameParameter(USERNAME);
this.setPasswordParameter(PASSWORD);
// 验证成功,跳转的页面
SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
successHandler.setDefaultTargetUrl(successUrl);
this.setAuthenticationSuccessHandler(successHandler);
// 验证失败,跳转的页面
SimpleUrlAuthenticationFailureHandler failureHandler = new SimpleUrlAuthenticationFailureHandler();
failureHandler.setDefaultFailureUrl(errorUrl);
this.setAuthenticationFailureHandler(failureHandler);
}
@Override
public Authentication attemptAuthentication(HttpServletRequest request,
HttpServletResponse response) throws AuthenticationException {
// System.err.println(" --------------- MyAuthenticationFilter attemptAuthentication--------------- ");
if (!request.getMethod().equals("POST")) {
throw new AuthenticationServiceException(
"Authentication method not supported: "
+ request.getMethod());
}
String username = obtainUsername(request).trim();
String password = obtainPassword(request).trim();
// System.out.println(">>>>>>>>>>000<<<<<<<<<< username is " +
// username);
if (Common.isEmpty(username) || Common.isEmpty(password)) {
BadCredentialsException exception = new BadCredentialsException(
"用户名或密码不能为空!");// 在界面输出自定义的信息!!
throw exception;
}
// 验证用户账号与密码是否正确
User users = this.userDao.querySingleUser(username);
if (users == null || !users.getUserPassword().equals(password)) {
BadCredentialsException exception = new BadCredentialsException(
"用户名或密码不匹配!");// 在界面输出自定义的信息!!
// request.setAttribute(WebAttributes.AUTHENTICATION_EXCEPTION,
// exception);
throw exception;
}
// 当验证都通过后,把用户信息放在session里
request.getSession().setAttribute("userSession", users);
// 记录登录信息
UserLoginList userLoginList = new UserLoginList();
userLoginList.setUserId(users.getUserId());
System.out.println("userId----" + users.getUserId() + "---ip--"
+ Common.toIpAddr(request));
userLoginList.setLoginIp(Common.toIpAddr(request));
userLoginListService.add(userLoginList);
// 实现 Authentication
UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(
username, password);
// 允许子类设置详细属性
setDetails(request, authRequest);
// 运行UserDetailsService的loadUserByUsername 再次封装Authentication
return this.getAuthenticationManager().authenticate(authRequest);
}
public String getSuccessUrl() {
return successUrl;
}
public void setSuccessUrl(String successUrl) {
this.successUrl = successUrl;
}
public String getErrorUrl() {
return errorUrl;
}
public void setErrorUrl(String errorUrl) {
this.errorUrl = errorUrl;
}
}
|
[
"zhangjunfang0505@163.com"
] |
zhangjunfang0505@163.com
|
c06038fb77f1244ae81e28cf6d8cdf2f2db53c4d
|
4537423a5e50edf77bf48b2e52b1b73c3fc5d696
|
/tokamak-util/src/main/java/com/wrmsr/tokamak/util/sql/SqlFunctions.java
|
93a9ae34bace80ea02a1d09acec7bdb9b091dd2c
|
[
"Apache-2.0"
] |
permissive
|
wrmsr/tokamak
|
5a662ec6ee2b34321f772a881d3bfe4f413da82a
|
3ebf3395c5bb78b80e0445199958cb81f4cf9be8
|
refs/heads/master
| 2022-12-22T13:27:58.158522
| 2021-03-29T21:03:00
| 2021-03-29T21:03:00
| 191,827,182
| 3
| 0
|
Apache-2.0
| 2022-12-12T21:43:15
| 2019-06-13T20:14:55
|
Java
|
UTF-8
|
Java
| false
| false
| 2,554
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.wrmsr.tokamak.util.sql;
import java.io.IOException;
import java.sql.SQLException;
import java.util.function.Function;
import java.util.function.Supplier;
public final class SqlFunctions
{
private SqlFunctions()
{
}
@FunctionalInterface
public interface SqlRunnable
{
void run()
throws SQLException, IOException;
}
public static Runnable withSqlExceptions(SqlRunnable runnable)
{
return () -> {
try {
runnable.run();
}
catch (SQLException | IOException e) {
throw new RuntimeException(e);
}
};
}
public static void runWithSqlExceptions(SqlRunnable runnable)
{
withSqlExceptions(runnable).run();
}
@FunctionalInterface
public interface SqlSupplier<T>
{
T get()
throws SQLException, IOException;
}
public static <T> Supplier<T> withSqlExceptions(SqlSupplier<T> supplier)
{
return () -> {
try {
return supplier.get();
}
catch (SQLException | IOException e) {
throw new RuntimeException(e);
}
};
}
public static <T> T getWithSqlExceptions(SqlSupplier<T> supplier)
{
return withSqlExceptions(supplier).get();
}
@FunctionalInterface
public interface SqlFunction<T, R>
{
R apply(T t)
throws SQLException, IOException;
}
public static <T, R> Function<T, R> withSqlExceptions(SqlFunction<T, R> function)
{
return (t) -> {
try {
return function.apply(t);
}
catch (SQLException | IOException e) {
throw new RuntimeException(e);
}
};
}
public static <T, R> R applyWithSqlExceptions(SqlFunction<T, R> function, T t)
{
return withSqlExceptions(function).apply(t);
}
}
|
[
"timwilloney@gmail.com"
] |
timwilloney@gmail.com
|
cfac004b8685db118c0c32928f48cf268772be02
|
bba1ebf0b3023e1827deaec37ec593e6d3e23af3
|
/catalogo-web/src/main/java/br/com/vivo/catalogoPRS/ws/catalogoFrequencia/sn/ResultadoCriarTipoFrequencia.java
|
d18f75216cbd2f532979ff43a6e45e116bc7557d
|
[] |
no_license
|
douglasikoshima/teste-repositorio
|
91a2844c2b8a7cc4f5d423ed25bfd24bfd1eff28
|
c85512ec57b9a1fd450bba950b6e71c019ca14c3
|
refs/heads/master
| 2021-01-19T09:00:23.590328
| 2017-02-15T19:46:02
| 2017-02-15T19:46:02
| 82,079,552
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,476
|
java
|
/**
* ResultadoCriarTipoFrequencia.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package br.com.vivo.catalogoPRS.ws.catalogoFrequencia.sn;
public class ResultadoCriarTipoFrequencia implements java.io.Serializable {
private br.com.vivo.catalogoPRS.ws.catalogoFrequencia.sn.ResultadoCriarTipoFrequenciaVlFrequenciaCriacao_KEY vlFrequenciaCriacao_KEY;
public ResultadoCriarTipoFrequencia() {
}
public ResultadoCriarTipoFrequencia(
br.com.vivo.catalogoPRS.ws.catalogoFrequencia.sn.ResultadoCriarTipoFrequenciaVlFrequenciaCriacao_KEY vlFrequenciaCriacao_KEY) {
this.vlFrequenciaCriacao_KEY = vlFrequenciaCriacao_KEY;
}
/**
* Gets the vlFrequenciaCriacao_KEY value for this ResultadoCriarTipoFrequencia.
*
* @return vlFrequenciaCriacao_KEY
*/
public br.com.vivo.catalogoPRS.ws.catalogoFrequencia.sn.ResultadoCriarTipoFrequenciaVlFrequenciaCriacao_KEY getVlFrequenciaCriacao_KEY() {
return vlFrequenciaCriacao_KEY;
}
/**
* Sets the vlFrequenciaCriacao_KEY value for this ResultadoCriarTipoFrequencia.
*
* @param vlFrequenciaCriacao_KEY
*/
public void setVlFrequenciaCriacao_KEY(br.com.vivo.catalogoPRS.ws.catalogoFrequencia.sn.ResultadoCriarTipoFrequenciaVlFrequenciaCriacao_KEY vlFrequenciaCriacao_KEY) {
this.vlFrequenciaCriacao_KEY = vlFrequenciaCriacao_KEY;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof ResultadoCriarTipoFrequencia)) return false;
ResultadoCriarTipoFrequencia other = (ResultadoCriarTipoFrequencia) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this.vlFrequenciaCriacao_KEY==null && other.getVlFrequenciaCriacao_KEY()==null) ||
(this.vlFrequenciaCriacao_KEY!=null &&
this.vlFrequenciaCriacao_KEY.equals(other.getVlFrequenciaCriacao_KEY())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getVlFrequenciaCriacao_KEY() != null) {
_hashCode += getVlFrequenciaCriacao_KEY().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(ResultadoCriarTipoFrequencia.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.vivo.com.br/SN/CatalogoFrequencia", ">ResultadoCriarTipoFrequencia"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("vlFrequenciaCriacao_KEY");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.vivo.com.br/SN/CatalogoFrequencia", "VlFrequenciaCriacao_KEY"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.vivo.com.br/SN/CatalogoFrequencia", ">>ResultadoCriarTipoFrequencia>VlFrequenciaCriacao_KEY"));
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);
}
}
|
[
"vfabio@indracompany.com"
] |
vfabio@indracompany.com
|
26d77523850c44c33b811a935326c8e6cf969c2e
|
59745d24897559feeb07000c1c7fe412d9fe60b0
|
/src/main/java/Galaxy/GalaxyServlet/TestoviyVariat/Spring/Spring.java
|
e3eabe6a6ac92e33bb9e86bf5374576cc97931e8
|
[] |
no_license
|
jokerboga111/MySocialNetWork
|
14c379a4e9dbe870f46c80d51743c3bccb041ef0
|
af7a6b8255763907741183f08428d2c4082db3ee
|
refs/heads/master
| 2021-01-19T07:06:23.456274
| 2016-07-15T17:21:34
| 2016-07-15T17:21:34
| 63,438,874
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 470
|
java
|
package Galaxy.GalaxyServlet.TestoviyVariat.Spring;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* Created by Admin on 07.02.2016.
*/
public class Spring {
public static AbstractApplicationContext ctx;
public static AbstractApplicationContext springContext(){
ctx=new ClassPathXmlApplicationContext("config.xml");
return ctx;
}
}
|
[
"a"
] |
a
|
e0278188303437024cf942a1950249e9b71f5c1a
|
1aaa5edaf072b239ba2dcbd250ab64199058d83f
|
/discovery-server/src/main/java/app/metatron/discovery/domain/workbook/configurations/widget/shelf/GraphShelf.java
|
b41e2fe34567f57cbb1ee2eba4cb600c8a328fac
|
[
"Apache-2.0"
] |
permissive
|
ucrystal/metatron-discovery
|
c53d9cdb318c6598be3a79930ee13c30f00f4e02
|
5864eab9783f993394ef1747f428e95aa9c8abf0
|
refs/heads/master
| 2020-03-26T04:45:26.186606
| 2018-08-13T02:52:49
| 2018-08-13T02:52:49
| 144,521,272
| 1
| 0
|
Apache-2.0
| 2018-08-13T02:47:02
| 2018-08-13T02:47:02
| null |
UTF-8
|
Java
| false
| false
| 1,601
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package app.metatron.discovery.domain.workbook.configurations.widget.shelf;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import app.metatron.discovery.domain.workbook.configurations.field.Field;
public class GraphShelf implements Shelf {
/**
* 연결 주체가 되는 컬럼
*/
List<Field> sources;
/**
* 연결 대상에 컬럼
*/
List<Field> targets;
/**
* 연결 관계 정보 컬럼
*/
Field link;
public GraphShelf() {
// Empty Constructor
}
@JsonCreator
public GraphShelf(@JsonProperty("sources") List<Field> sources,
@JsonProperty("targets") List<Field> targets,
@JsonProperty("link") Field link) {
this.sources = sources;
this.targets = targets;
this.link = link;
}
public List<Field> getSources() {
return sources;
}
public List<Field> getTargets() {
return targets;
}
public Field getLink() {
return link;
}
}
|
[
"kyungtaak@sk.com"
] |
kyungtaak@sk.com
|
a05fdcd5a68de2814ff16dae73d781959126845d
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_18/Testnull_1724.java
|
aca614cc9124178a2516bd8759dc95793b6830bc
|
[] |
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
| 304
|
java
|
package org.gradle.test.performancenull_18;
import static org.junit.Assert.*;
public class Testnull_1724 {
private final Productionnull_1724 production = new Productionnull_1724("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
000a1f0f60145955253454a47647a78c907bd133
|
a195050e35f71f9d08b2c753748429c25ac02f7c
|
/app/src/androidTest/java/cubesquaretech/com/pushdatabase/ExampleInstrumentedTest.java
|
ab8767293873362df2ce419279fcb4e39e438c9a
|
[] |
no_license
|
anandgaur22/PushNotificationFirebase
|
2e01da760d0768ca90bfbbf3fc460fb7fc3fdecc
|
f9b251f61cb31723aadb66d08f315e02e003ab5b
|
refs/heads/master
| 2021-07-04T17:42:21.799038
| 2017-09-26T08:19:56
| 2017-09-26T08:19:56
| 104,856,641
| 6
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 766
|
java
|
package cubesquaretech.com.pushdatabase;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("cubesquaretech.com.pushdatabase", appContext.getPackageName());
}
}
|
[
"anandgaur22@gmail.com"
] |
anandgaur22@gmail.com
|
79fa2c4cdf38fb6cb953b72dcd9a4d7af50b234b
|
d5786bf0335010f7de9bb2cea6bb0a9536ff73af
|
/aliyun-java-sdk-sofa/src/main/java/com/aliyuncs/sofa/model/v20190815/SetLinkeBahamutTenantRequest.java
|
13d49eb02d94cf5d444268e6cda85341ebec1e5c
|
[
"Apache-2.0"
] |
permissive
|
1203802276/aliyun-openapi-java-sdk
|
8066c546f0177cbbebb7b1178fe6ccaeb6f1da09
|
e3f89f2ef8542055e3990401a94edccd1bbca410
|
refs/heads/master
| 2023-04-15T07:09:27.195262
| 2021-03-19T06:22:51
| 2021-03-19T06:22:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,658
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.sofa.model.v20190815;
import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.sofa.Endpoint;
/**
* @author auto create
* @version
*/
public class SetLinkeBahamutTenantRequest extends RpcAcsRequest<SetLinkeBahamutTenantResponse> {
private String tenantName;
public SetLinkeBahamutTenantRequest() {
super("SOFA", "2019-08-15", "SetLinkeBahamutTenant", "sofacafedeps");
setMethod(MethodType.POST);
try {
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
} catch (Exception e) {}
}
public String getTenantName() {
return this.tenantName;
}
public void setTenantName(String tenantName) {
this.tenantName = tenantName;
if(tenantName != null){
putBodyParameter("TenantName", tenantName);
}
}
@Override
public Class<SetLinkeBahamutTenantResponse> getResponseClass() {
return SetLinkeBahamutTenantResponse.class;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
77bbb652f3cf0d506ca0d19e27a9901e73a3da86
|
69307bbf7b20d62db2de6fe1d7bf8384bc9940ec
|
/Scan_File_Processor_Importer/src/main/java/org/yeastrc/spectral_storage/scan_file_processor/input_scan_file/constants_enums/DataConversionType.java
|
ca94b8508ab23d73bc3bf5d0a7a62c705f75741d
|
[
"Apache-2.0"
] |
permissive
|
yeastrc/Spectral_Storage_Service
|
7c13da8fd94154a26e4386aeedb6104863f7719c
|
44845b072f4716c8e374a9ee8bb6a43301df078d
|
refs/heads/master
| 2023-07-26T14:35:16.982485
| 2023-07-25T18:51:02
| 2023-07-25T18:51:02
| 111,468,841
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 273
|
java
|
/**
* DataConversionType.java
* @author Vagisha Sharma
* Aug 14, 2008
* @version 1.0
*/
package org.yeastrc.spectral_storage.scan_file_processor.input_scan_file.constants_enums;
/**
*
*/
public enum DataConversionType {
CENTROID, NON_CENTROID, UNKNOWN;
}
|
[
"djaschob@uw.edu"
] |
djaschob@uw.edu
|
95dc055990079f31812d0cf3cd1356e3815500f0
|
dff1127ec023fa044a90eb6a2134e8d93b25d23a
|
/sandbox/coconut-aio/coconut-aio-examples/src/main/java/coconut/aio/examples/helloworld/AioClient.java
|
4f1c253b1bb2e5ab218348640d4102ff9b923eb9
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
codehaus/coconut
|
54d98194e401bd98659de4bb72e12b7e24ba71e4
|
f2bc1fc516c65a9d0fd76ffb3bb148309ef1ba76
|
refs/heads/master
| 2023-08-31T00:18:48.501510
| 2008-04-24T09:28:52
| 2008-04-24T09:28:52
| 36,364,856
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 804
|
java
|
/* Copyright 2004 - 2007 Kasper Nielsen <kasper@codehaus.org> Licensed under
* the Apache 2.0 License, see http://coconut.codehaus.org/license.
*/
// START SNIPPET: aio-client
package coconut.aio.examples.helloworld;
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import org.coconut.aio.AsyncSocket;
public class AioClient {
public static void main(String[] args) throws IOException {
AsyncSocket socket = AsyncSocket.open();
InetSocketAddress adr = new InetSocketAddress(InetAddress.getLocalHost(), 12345);
socket.connect(adr).getIO();
socket.writeAsync(ByteBuffer.wrap("Helloworld".getBytes())).getIO();
socket.close();
}
}
//END SNIPPET: aio-client
|
[
"kasper@0b154b62-a015-0410-9c24-a35e082c6f94"
] |
kasper@0b154b62-a015-0410-9c24-a35e082c6f94
|
a49821f2a01dc645c93e325604725ce3ec092a15
|
23289109c2aca0223cf72b2d11e0a4efc5355e21
|
/app/src/main/java/com/lh/hermeseventbus/bean/Friend.java
|
ccb60e9475d1c7641d91722393bd7e0fc79d43b1
|
[] |
no_license
|
yehuijifeng/HermesEventbus-master
|
0ee64d16ecfa7b33b1101b87422cdc25f50d19cc
|
4f56af8e65e9814b17dc37f9b1e20e7ada7c42a6
|
refs/heads/master
| 2020-07-05T14:42:06.128787
| 2019-08-26T09:42:32
| 2019-08-26T09:42:32
| 202,675,734
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 527
|
java
|
package com.lh.hermeseventbus.bean;
/**
* User: LuHao
* Date: 2019/8/21 20:28
* Describe:我的好友
*/
public class Friend {
private String name;
private int age;
public Friend(String name, int age) {
this.name = name;
this.age = age;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
}
|
[
"928186846@qq.com"
] |
928186846@qq.com
|
368c5fcffbf45771e637acbe10cae822caf175a2
|
896c39c14831c93457476671fdda540a3ef990fa
|
/kubernetes-model/src/model/java/com/marcnuri/yakc/model/io/k8s/api/autoscaling/v2/PodsMetricSource.java
|
cd8d8aeb73f90ba5c4cbdaeb2d1fc8282dc4e5de
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
manusa/yakc
|
341e4b86e7fd4fa298f255c69dd26d7e3e3f3463
|
7e7ac99aa393178b9d0d86db22039a6dada5107c
|
refs/heads/master
| 2023-07-20T04:53:42.421609
| 2023-07-14T10:09:48
| 2023-07-14T10:09:48
| 252,927,434
| 39
| 15
|
Apache-2.0
| 2023-07-13T15:01:10
| 2020-04-04T06:37:03
|
Java
|
UTF-8
|
Java
| false
| false
| 1,514
|
java
|
/*
* Copyright 2020 Marc Nuri
*
* 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.marcnuri.yakc.model.io.k8s.api.autoscaling.v2;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.marcnuri.yakc.model.Model;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.ToString;
/**
* PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.
*/
@SuppressWarnings({"squid:S1192", "WeakerAccess", "unused"})
@Builder(toBuilder = true, builderClassName = "Builder")
@AllArgsConstructor
@NoArgsConstructor
@Data
@ToString
public class PodsMetricSource implements Model {
@NonNull
@JsonProperty("metric")
private MetricIdentifier metric;
@NonNull
@JsonProperty("target")
private MetricTarget target;
}
|
[
"marc@marcnuri.com"
] |
marc@marcnuri.com
|
76643bd617b0729c67653beb4c317e2d735379ab
|
013bb407ffadcb2bf2641b8fec506e492cb5632e
|
/swim-system-java/swim-core-java/swim.ws/src/main/java/module-info.java
|
36f17ff90a452df291f1c842c0da92adad809c85
|
[
"Apache-2.0"
] |
permissive
|
j-shaver/swim
|
1c3af9debf392e25b6741596a69673e2b7665ab8
|
c317e70a24f4cebe28eb1a99f03ab1396e696704
|
refs/heads/master
| 2020-07-05T20:37:03.321218
| 2019-08-16T16:26:46
| 2019-08-16T16:26:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 935
|
java
|
// Copyright 2015-2019 SWIM.AI 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.
/**
* WebSocket wire protocol model, decoders, and encoders.
*/
module swim.ws {
requires swim.util;
requires transitive swim.codec;
requires transitive swim.structure;
requires transitive swim.collections;
requires transitive swim.uri;
requires transitive swim.deflate;
requires transitive swim.http;
exports swim.ws;
}
|
[
"chris@swim.ai"
] |
chris@swim.ai
|
ea414e6e5d8d43ce16a0314a36e6a69b8a64d543
|
3348ffc337a5122629112ee82b0a2135b53b36eb
|
/obj/Debug/android/src/mono/android/support/v4/view/accessibility/AccessibilityManagerCompat_TouchExplorationStateChangeListenerImplementor.java
|
b02ad0a2809b2390777716cea652e7bb99ae6505
|
[] |
no_license
|
eddydn/XamarinChatApp
|
eae8092957496ee1ac254d190f40e8298c043b39
|
35ab92b711335aec2940e6ae4cff10fb1541c034
|
refs/heads/master
| 2020-07-03T16:39:57.895787
| 2016-11-23T06:28:20
| 2016-11-23T06:28:20
| 74,246,728
| 6
| 15
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,940
|
java
|
package mono.android.support.v4.view.accessibility;
public class AccessibilityManagerCompat_TouchExplorationStateChangeListenerImplementor
extends java.lang.Object
implements
mono.android.IGCUserPeer,
android.support.v4.view.accessibility.AccessibilityManagerCompat.TouchExplorationStateChangeListener
{
/** @hide */
public static final String __md_methods;
static {
__md_methods =
"n_onTouchExplorationStateChanged:(Z)V:GetOnTouchExplorationStateChanged_ZHandler:Android.Support.V4.View.Accessibility.AccessibilityManagerCompat/ITouchExplorationStateChangeListenerInvoker, Xamarin.Android.Support.Compat\n" +
"";
mono.android.Runtime.register ("Android.Support.V4.View.Accessibility.AccessibilityManagerCompat+ITouchExplorationStateChangeListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", AccessibilityManagerCompat_TouchExplorationStateChangeListenerImplementor.class, __md_methods);
}
public AccessibilityManagerCompat_TouchExplorationStateChangeListenerImplementor () throws java.lang.Throwable
{
super ();
if (getClass () == AccessibilityManagerCompat_TouchExplorationStateChangeListenerImplementor.class)
mono.android.TypeManager.Activate ("Android.Support.V4.View.Accessibility.AccessibilityManagerCompat+ITouchExplorationStateChangeListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", "", this, new java.lang.Object[] { });
}
public void onTouchExplorationStateChanged (boolean p0)
{
n_onTouchExplorationStateChanged (p0);
}
private native void n_onTouchExplorationStateChanged (boolean p0);
private java.util.ArrayList refList;
public void monodroidAddReference (java.lang.Object obj)
{
if (refList == null)
refList = new java.util.ArrayList ();
refList.add (obj);
}
public void monodroidClearReferences ()
{
if (refList != null)
refList.clear ();
}
}
|
[
"eddydn@gmail.com"
] |
eddydn@gmail.com
|
cda8faf5cbef25b2b066d80225318bd97e7a40b7
|
43eb759f66530923dfe1c6e191ec4f350c097bd9
|
/projects/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TrailingCommentCheck.java
|
cc45e62dc66c5ce801d7d609859d78abff19e9f1
|
[
"MIT",
"Apache-2.0",
"LGPL-2.1-only"
] |
permissive
|
hayasam/lightweight-effectiveness
|
fe4bd04f8816c6554e35c8c9fc8489c11fc8ce0b
|
f6ef4c98b8f572a86e42252686995b771e655f80
|
refs/heads/master
| 2023-08-17T01:51:46.351933
| 2020-09-03T07:38:35
| 2020-09-03T07:38:35
| 298,672,257
| 0
| 0
|
MIT
| 2023-09-08T15:33:03
| 2020-09-25T20:23:43
| null |
UTF-8
|
Java
| false
| false
| 7,914
|
java
|
////////////////////////////////////////////////////////////////////////////////
// checkstyle: Checks Java source code for adherence to a set of rules.
// Copyright (C) 2001-2018 the original author or authors.
//
// 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 (at your option) 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. 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
////////////////////////////////////////////////////////////////////////////////
package com.puppycrawl.tools.checkstyle.checks;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;
import com.puppycrawl.tools.checkstyle.StatelessCheck;
import com.puppycrawl.tools.checkstyle.api.AbstractCheck;
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.TextBlock;
import com.puppycrawl.tools.checkstyle.utils.CommonUtil;
/**
* <p>
* The check to ensure that comments are the only thing on a line.
* For the case of {@code //} comments that means that the only thing that should
* precede it is whitespace.
* It doesn't check comments if they do not end line, i.e. it accept
* the following:
* </p>
* <pre><code>Thread.sleep( 10 /*some comment here*/ );</code></pre>
* <p>Format property is intended to deal with the <code>} // while</code> example.
* </p>
*
* <p>Rationale: Steve McConnell in "Code Complete" suggests that endline
* comments are a bad practice. An end line comment would
* be one that is on the same line as actual code. For example:
* <pre>
* a = b + c; // Some insightful comment
* d = e / f; // Another comment for this line
* </pre>
* Quoting "Code Complete" for the justification:
* <ul>
* <li>
* "The comments have to be aligned so that they do not
* interfere with the visual structure of the code. If you don't
* align them neatly, they'll make your listing look like it's been
* through a washing machine."
* </li>
* <li>
* "Endline comments tend to be hard to format...It takes time
* to align them. Such time is not spent learning more about
* the code; it's dedicated solely to the tedious task of
* pressing the spacebar or tab key."
* </li>
* <li>
* "Endline comments are also hard to maintain. If the code on
* any line containing an endline comment grows, it bumps the
* comment farther out, and all the other endline comments will
* have to bumped out to match. Styles that are hard to
* maintain aren't maintained...."
* </li>
* <li>
* "Endline comments also tend to be cryptic. The right side of
* the line doesn't offer much room and the desire to keep the
* comment on one line means the comment must be short.
* Work then goes into making the line as short as possible
* instead of as clear as possible. The comment usually ends
* up as cryptic as possible...."
* </li>
* <li>
* "A systemic problem with endline comments is that it's hard
* to write a meaningful comment for one line of code. Most
* endline comments just repeat the line of code, which hurts
* more than it helps."
* </li>
* </ul>
* His comments on being hard to maintain when the size of
* the line changes are even more important in the age of
* automated refactorings.
*
* <p>To configure the check so it enforces only comment on a line:
* <pre>
* <module name="TrailingComment">
* <property name="format" value="^\\s*$"/>
* </module>
* </pre>
*
* @noinspection HtmlTagCanBeJavadocTag
*/
@StatelessCheck
public class TrailingCommentCheck extends AbstractCheck {
/**
* A key is pointing to the warning message text in "messages.properties"
* file.
*/
public static final String MSG_KEY = "trailing.comments";
/** Pattern for legal trailing comment. */
private Pattern legalComment;
/** The regexp to match against. */
private Pattern format = Pattern.compile("^[\\s});]*$");
/**
* Sets patter for legal trailing comments.
* @param legalComment pattern to set.
*/
public void setLegalComment(final Pattern legalComment) {
this.legalComment = legalComment;
}
/**
* Set the format for the specified regular expression.
* @param pattern a pattern
*/
public final void setFormat(Pattern pattern) {
format = pattern;
}
@Override
public int[] getDefaultTokens() {
return getRequiredTokens();
}
@Override
public int[] getAcceptableTokens() {
return getRequiredTokens();
}
@Override
public int[] getRequiredTokens() {
return CommonUtil.EMPTY_INT_ARRAY;
}
@Override
public void visitToken(DetailAST ast) {
throw new IllegalStateException("visitToken() shouldn't be called.");
}
@Override
public void beginTree(DetailAST rootAST) {
final Map<Integer, TextBlock> cppComments = getFileContents()
.getSingleLineComments();
final Map<Integer, List<TextBlock>> cComments = getFileContents()
.getBlockComments();
final Set<Integer> lines = new HashSet<>();
lines.addAll(cppComments.keySet());
lines.addAll(cComments.keySet());
for (Integer lineNo : lines) {
final String line = getLines()[lineNo - 1];
final String lineBefore;
final TextBlock comment;
if (cppComments.containsKey(lineNo)) {
comment = cppComments.get(lineNo);
lineBefore = line.substring(0, comment.getStartColNo());
}
else {
final List<TextBlock> commentList = cComments.get(lineNo);
comment = commentList.get(commentList.size() - 1);
lineBefore = line.substring(0, comment.getStartColNo());
// do not check comment which doesn't end line
if (comment.getText().length == 1
&& !CommonUtil.isBlank(line
.substring(comment.getEndColNo() + 1))) {
continue;
}
}
if (!format.matcher(lineBefore).find()
&& !isLegalComment(comment)) {
log(lineNo, MSG_KEY);
}
}
}
/**
* Checks if given comment is legal (single-line and matches to the
* pattern).
* @param comment comment to check.
* @return true if the comment if legal.
*/
private boolean isLegalComment(final TextBlock comment) {
final boolean legal;
// multi-line comment can not be legal
if (legalComment == null || comment.getStartLineNo() != comment.getEndLineNo()) {
legal = false;
}
else {
String commentText = comment.getText()[0];
// remove chars which start comment
commentText = commentText.substring(2);
// if this is a C-style comment we need to remove its end
if (commentText.endsWith("*/")) {
commentText = commentText.substring(0, commentText.length() - 2);
}
commentText = commentText.trim();
legal = legalComment.matcher(commentText).find();
}
return legal;
}
}
|
[
"granogiovanni90@gmail.com"
] |
granogiovanni90@gmail.com
|
6f9950db13fa1f0d5637f25f670ca99324d49fb4
|
3c6f4bb030a42d19ce8c25a931138641fb6fd495
|
/finance-roster/finance-roster-model/src/main/java/com/hongkun/finance/roster/model/RosNotice.java
|
849f17f759c639044528d45de44f2b86766226e5
|
[] |
no_license
|
happyjianguo/finance-hkjf
|
93195df26ebb81a8b951a191e25ab6267b73aaca
|
0389a6eac966ee2e4887b6db4f99183242ba2d4e
|
refs/heads/master
| 2020-07-28T13:42:40.924633
| 2019-08-03T00:22:19
| 2019-08-03T00:22:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,814
|
java
|
package com.hongkun.finance.roster.model;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.yirun.framework.core.model.BaseModel;
/**
* @Project : finance
* @Program Name : com.hongkun.finance.roster.model.RosNotice.java
* @Class Name : RosNotice.java
* @Description : GENERATOR VO类
* @Author : generator
*/
public class RosNotice extends BaseModel {
private static final long serialVersionUID = 1L;
/**
* 描述: id
* 字段: id INT(10)
*/
private Integer id;
/**
* 描述: 功能模块:1对账 2 发送现金红包 3、发送加息券 4、发送投资红包
* 字段: type TINYINT(3)
*/
private Integer type;
/**
* 描述: 提醒方式:1邮件,2短信,3站内信
* 字段: notice_way TINYINT(3)
*/
private Integer noticeWay;
/**
* 描述: 接收邮箱
* 字段: receive_email VARCHAR(100)
*/
private String receiveEmail;
/**
* 描述: 接收手机号
* 字段: receive_tel VARCHAR(100)
*/
private String receiveTel;
/**
* 描述: 接收手机短信时间
* 字段: receive_tel_time DATETIME(19)
*/
private java.util.Date receiveTelTime;
//【非数据库字段,查询时使用】
private java.util.Date receiveTelTimeBegin;
//【非数据库字段,查询时使用】
private java.util.Date receiveTelTimeEnd;
/**
* 描述: 创建时间
* 字段: create_time TIMESTAMP(19)
* 默认值: 0000-00-00 00:00:00
*/
private java.util.Date createTime;
//【非数据库字段,查询时使用】
private java.util.Date createTimeBegin;
//【非数据库字段,查询时使用】
private java.util.Date createTimeEnd;
/**
* 描述: 修改时间
* 字段: modify_time TIMESTAMP(19)
* 默认值: 0000-00-00 00:00:00
*/
private java.util.Date modifyTime;
//【非数据库字段,查询时使用】
private java.util.Date modifyTimeBegin;
//【非数据库字段,查询时使用】
private java.util.Date modifyTimeEnd;
/**
* 描述: 备注
* 字段: note VARCHAR(200)
*/
private String note;
public RosNotice(){
}
public RosNotice(Integer id){
this.id = id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getId() {
return this.id;
}
public void setType(Integer type) {
this.type = type;
}
public Integer getType() {
return this.type;
}
public void setNoticeWay(Integer noticeWay) {
this.noticeWay = noticeWay;
}
public Integer getNoticeWay() {
return this.noticeWay;
}
public void setReceiveEmail(String receiveEmail) {
this.receiveEmail = receiveEmail;
}
public String getReceiveEmail() {
return this.receiveEmail;
}
public void setReceiveTel(String receiveTel) {
this.receiveTel = receiveTel;
}
public String getReceiveTel() {
return this.receiveTel;
}
public void setReceiveTelTime(java.util.Date receiveTelTime) {
this.receiveTelTime = receiveTelTime;
}
public java.util.Date getReceiveTelTime() {
return this.receiveTelTime;
}
public void setReceiveTelTimeBegin(java.util.Date receiveTelTimeBegin) {
this.receiveTelTimeBegin = receiveTelTimeBegin;
}
public java.util.Date getReceiveTelTimeBegin() {
return this.receiveTelTimeBegin;
}
public void setReceiveTelTimeEnd(java.util.Date receiveTelTimeEnd) {
this.receiveTelTimeEnd = receiveTelTimeEnd;
}
public java.util.Date getReceiveTelTimeEnd() {
return this.receiveTelTimeEnd;
}
public void setCreateTime(java.util.Date createTime) {
this.createTime = createTime;
}
public java.util.Date getCreateTime() {
return this.createTime;
}
public void setCreateTimeBegin(java.util.Date createTimeBegin) {
this.createTimeBegin = createTimeBegin;
}
public java.util.Date getCreateTimeBegin() {
return this.createTimeBegin;
}
public void setCreateTimeEnd(java.util.Date createTimeEnd) {
this.createTimeEnd = createTimeEnd;
}
public java.util.Date getCreateTimeEnd() {
return this.createTimeEnd;
}
public void setModifyTime(java.util.Date modifyTime) {
this.modifyTime = modifyTime;
}
public java.util.Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTimeBegin(java.util.Date modifyTimeBegin) {
this.modifyTimeBegin = modifyTimeBegin;
}
public java.util.Date getModifyTimeBegin() {
return this.modifyTimeBegin;
}
public void setModifyTimeEnd(java.util.Date modifyTimeEnd) {
this.modifyTimeEnd = modifyTimeEnd;
}
public java.util.Date getModifyTimeEnd() {
return this.modifyTimeEnd;
}
public void setNote(String note) {
this.note = note;
}
public String getNote() {
return this.note;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE);
}
}
|
[
"zc.ding@foxmail.com"
] |
zc.ding@foxmail.com
|
7336aa331884b76c506088b1b7de65e0f665cc3e
|
b6f0618096b05a10a7507e391ca837a5ee126736
|
/src/day54/AnimalShow.java
|
33293b403fe9ba3ede201c41f18e5977a5de5aed
|
[] |
no_license
|
toyligb/JavaProgramming
|
572687ff0532b1eb5992c8035e1339d0ad25b7ad
|
6a1d04487bf614c47939d34cb3fd8405cf1c467d
|
refs/heads/master
| 2021-01-07T20:23:17.006616
| 2020-02-23T21:54:19
| 2020-02-23T21:54:19
| 241,811,088
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 927
|
java
|
package day54;
public class AnimalShow {
public static void main(String[] args) {
// Dog IS-A Dog
// Dog IS-A Animal
// Dog IS-A Object
// Dog IS-A IndoorPet
// refer a dog object as a dog
// it can do everything a dog can do (including Animal, IndoorPet stuff)
Dog d1 = new Dog();
System.out.println(d1.name);
d1.speak();
d1.play();
// refer a dog object as a Animal
// it can do only those thing Animal can do
// only the speak method in this case
Animal a1 = d1;
a1.speak();
// refer a dog object as a Object
// it can do only those thing Object can do
// for example toString, hasCode and others
Object o1 = d1;
// o1.speak();
// refer a dog object as a IndoorPet
// it can only play
IndoorPet p1 = d1;
p1.play();
}
}
|
[
"toyligb@gmail.com"
] |
toyligb@gmail.com
|
e12dbff977f91617002abf9f47485850ffb8b88a
|
6da648bfa9724e974f28a6c43e0178649daa300f
|
/app/src/main/java/takjxh/android/com/taapp/activityui/bean/ZjsbtxBean.java
|
c6ac123ef18573198c6e5825fbf8c49cf345b57d
|
[] |
no_license
|
Bingoliallen/takjxhApp
|
2ca44409a4e38f4ca6a4055eb347997fd755efa0
|
4fab96e53bad1806b5e48301a75b798b9beaca25
|
refs/heads/master
| 2023-06-16T17:23:30.364111
| 2021-07-15T07:28:35
| 2021-07-15T07:28:35
| 246,971,816
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 265
|
java
|
package takjxh.android.com.taapp.activityui.bean;
/**
* 类名称:
*
* @Author: libaibing
* @Date: 2019-10-16 10:15
* @Description:
**/
public class ZjsbtxBean {
public int type = 0;
public ZjsbtxBean(int type) {
this.type = type;
}
}
|
[
"1241903717@qq.com"
] |
1241903717@qq.com
|
af745b3fe1174ed2e97d76635abb29bddaa86c35
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/29/29_1d6b8d1900501d998f070da5aa3476592cee3960/NativeSql/29_1d6b8d1900501d998f070da5aa3476592cee3960_NativeSql_t.java
|
28b7645c789756ca00b828d1152aa80f121134cc
|
[] |
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
| 1,543
|
java
|
/*
* Copyright 2011 Objectos, Fábrica de Software LTDA.
*
* 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 br.com.objectos.comuns.relational.jdbc;
import java.util.Iterator;
import java.util.List;
import br.com.objectos.comuns.relational.search.Page;
import br.com.objectos.comuns.relational.search.ResultSetLoader;
/**
* @author marcio.endo@objectos.com.br (Marcio Endo)
*/
public interface NativeSql {
interface AddIf {
NativeSql isTrue(boolean param);
NativeSql paramNotNull(Object param);
}
NativeSql add(String string);
NativeSql add(String template, Object... args);
AddIf addIf(String string);
AddIf addIf(String template, Object... args);
NativeSql andLoadWith(ResultSetLoader<?> loader);
NativeSql onGeneratedKey(GeneratedKeyCallback callback);
NativeSql param(Object value);
int execute();
void insert();
<T> Iterator<T> iterate();
<T> List<T> list();
<T> List<T> listPage(Page page);
<T> T single();
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
07542b63321f7d34a9a03c482b830dce68b30370
|
07f2fa83cafb993cc107825223dc8279969950dd
|
/game_common/src/main/java/com/xgame/framework/executer/MapExecutor.java
|
5bc6c62cf17b1d037c684f929de80b54a97b53ee
|
[] |
no_license
|
hw233/x2-slg-java
|
3f12a8ed700e88b81057bccc7431237fae2c0ff9
|
03dcdab55e94ee4450625404f6409b1361794cbf
|
refs/heads/master
| 2020-04-27T15:42:10.982703
| 2018-09-27T08:35:27
| 2018-09-27T08:35:27
| 174,456,389
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 914
|
java
|
package com.xgame.framework.executer;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import org.springframework.stereotype.Component;
/**
* 世界地图线程
* @author jacky.jiang
*
*/
public class MapExecutor {
private ExecutorService service;
public MapExecutor( ) {
}
public MapExecutor(final String name) {
service = Executors.newSingleThreadExecutor(new ThreadFactory() {
@Override
public Thread newThread(Runnable r) {
return new Thread(r, name);
}
});
}
public void execute(Runnable command) {
service.execute(command);
}
public synchronized void shutdown() {
if (service.isTerminated()) {
return;
}
service.shutdownNow();
}
public ExecutorService getService() {
return service;
}
public void setService(ExecutorService service) {
this.service = service;
}
}
|
[
"ityuany@126.com"
] |
ityuany@126.com
|
fa605f44098ae1850d9957c7e09b2aa7597ada24
|
a9c49599ea73378e4eff08367ee4db5fc1f558f8
|
/src/main/java/com/super_bits/modulosSB/webPaginas/JSFManagedBeans/declarados/util/ContainerResponsivo.java
|
2ff3c8f6ec1fc0f7c7a73d03cb36419b8c0f3ff8
|
[
"Apache-2.0"
] |
permissive
|
salviof/SBWebPaginas
|
c48e2c650c6ef0d091fc527cfc7a318bcf4e3915
|
9ce13da1f6c0d2be134446d71b185f5a5bb8928d
|
refs/heads/master
| 2023-09-04T03:08:34.671666
| 2023-08-28T12:11:44
| 2023-08-28T12:11:44
| 157,914,778
| 0
| 0
|
Apache-2.0
| 2023-02-22T08:10:34
| 2018-11-16T19:54:41
|
HTML
|
UTF-8
|
Java
| false
| false
| 1,501
|
java
|
/*
* Desenvolvido pela equipe Super-Bits.com CNPJ 20.019.971/0001-90
*/
package com.super_bits.modulosSB.webPaginas.JSFManagedBeans.declarados.util;
import com.super_bits.modulosSB.SBCore.modulos.view.telas.ItfTelaUsuario;
/**
*
* @author desenvolvedor
*/
public class ContainerResponsivo {
private final ItfTelaUsuario tela;
public ContainerResponsivo(ItfTelaUsuario pTela) {
tela = pTela;
}
public int numeroColunasParaComponente(double pPesoComponente, int pContainerPai) {
return calcularNumeroMaximoColunasPorPesoComponente(pPesoComponente, pContainerPai);
}
// 9
public int numeroColunasParaComponente2p2(int pContainerPai) {
return calcularNumeroMaximoColunasPorPesoComponente(2.2, pContainerPai);
}
private int calcularNumeroMaximoColunasPorPesoComponente(double peso, int pContainerPai) {
int colunasNaTela = tela.getNumeroMaximoColunas();
int containerPaiTransformado = colunasNaTela;
if (colunasNaTela < 12) {
double porcentagem = 100 / colunasNaTela * pContainerPai; // 12/ 9
Double novoValor = (containerPaiTransformado / 100D) * porcentagem;
containerPaiTransformado = novoValor.intValue();
}
Double valor = containerPaiTransformado / peso;
return valor.intValue();
}
public int numeroColunasParaComponente3(int pContainerPai) {
return calcularNumeroMaximoColunasPorPesoComponente(3, pContainerPai);
}
}
|
[
"salviof@gmail.com"
] |
salviof@gmail.com
|
06b1f7d138e7f7397d55d92c8c3f8e377f0bbcd0
|
f045bd8718eecdd3209290f3c94477c9a869f9af
|
/sources/org/apache/http/conn/params/ConnConnectionParamBean.java
|
4cc64a8933ee7fabc8a88a193f80fae3f7a31912
|
[] |
no_license
|
KswCarProject/Launcher3-PX6
|
ba6c44c150649ba2f8ea40eb49fde1c2dc6bee5e
|
56eab00443667f38622a94975f69011e56d6dc27
|
refs/heads/master
| 2022-06-18T02:41:27.553573
| 2020-05-13T02:05:40
| 2020-05-13T02:05:40
| 259,748,185
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 498
|
java
|
package org.apache.http.conn.params;
import org.apache.http.params.HttpAbstractParamBean;
import org.apache.http.params.HttpParams;
@Deprecated
public class ConnConnectionParamBean extends HttpAbstractParamBean {
public ConnConnectionParamBean(HttpParams params) {
super(params);
}
@Deprecated
public void setMaxStatusLineGarbage(int maxStatusLineGarbage) {
this.params.setIntParameter(ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE, maxStatusLineGarbage);
}
}
|
[
"nicholas@prjkt.io"
] |
nicholas@prjkt.io
|
bba788fca915429a68d3852bcb68fe19d92c5b60
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-13031-3-23-SPEA2-WeightedSum:TestLen:CallDiversity/org/xwiki/search/solr/internal/reference/SolrEntityReferenceResolver_ESTest.java
|
8ad523a0f61e6f7a91bff18796908d4e6770ae2f
|
[] |
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
| 2,091
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sat Jan 18 23:00:06 UTC 2020
*/
package org.xwiki.search.solr.internal.reference;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.solr.common.SolrDocument;
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.xwiki.model.EntityType;
import org.xwiki.model.internal.reference.DefaultStringEntityReferenceResolver;
import org.xwiki.model.reference.EntityReferenceResolver;
import org.xwiki.search.solr.internal.reference.SolrEntityReferenceResolver;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class SolrEntityReferenceResolver_ESTest extends SolrEntityReferenceResolver_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
SolrEntityReferenceResolver solrEntityReferenceResolver0 = new SolrEntityReferenceResolver();
EntityReferenceResolver<DefaultStringEntityReferenceResolver> entityReferenceResolver0 = (EntityReferenceResolver<DefaultStringEntityReferenceResolver>) mock(EntityReferenceResolver.class, new ViolatedAssumptionAnswer());
Injector.inject(solrEntityReferenceResolver0, (Class<?>) SolrEntityReferenceResolver.class, "explicitReferenceEntityReferenceResolver", (Object) entityReferenceResolver0);
Injector.validateBean(solrEntityReferenceResolver0, (Class<?>) SolrEntityReferenceResolver.class);
SolrDocument solrDocument0 = new SolrDocument();
EntityType entityType0 = EntityType.CLASS_PROPERTY;
Object[] objectArray0 = new Object[7];
objectArray0[1] = (Object) solrEntityReferenceResolver0;
solrDocument0.put("wiki", objectArray0[1]);
// Undeclared exception!
solrEntityReferenceResolver0.resolve(solrDocument0, entityType0, objectArray0);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
d259ac0b11136299c469ad50aab3fdf69ae1a806
|
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
|
/JFreeChart/rev91-1012/left-branch-1012/source/org/jfree/chart/renderer/category/IntervalBarRenderer.java
|
5e7fbd0ec4f6256580d23997a2c51cc5c0ff69c5
|
[] |
no_license
|
joliebig/featurehouse_fstmerge_examples
|
af1b963537839d13e834f829cf51f8ad5e6ffe76
|
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
|
refs/heads/master
| 2016-09-05T10:24:50.974902
| 2013-03-28T16:28:47
| 2013-03-28T16:28:47
| 9,080,611
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,921
|
java
|
package org.jfree.chart.renderer.category;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Stroke;
import java.awt.geom.Rectangle2D;
import java.io.Serializable;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.entity.EntityCollection;
import org.jfree.chart.labels.CategoryItemLabelGenerator;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.category.CategoryDataset;
import org.jfree.data.category.IntervalCategoryDataset;
import org.jfree.ui.RectangleEdge;
import org.jfree.util.PublicCloneable;
public class IntervalBarRenderer extends BarRenderer
implements CategoryItemRenderer, Cloneable, PublicCloneable,
Serializable {
private static final long serialVersionUID = -5068857361615528725L;
public IntervalBarRenderer() {
super();
}
public void drawItem(Graphics2D g2,
CategoryItemRendererState state,
Rectangle2D dataArea,
CategoryPlot plot,
CategoryAxis domainAxis,
ValueAxis rangeAxis,
CategoryDataset dataset,
int row,
int column,
int pass) {
if (dataset instanceof IntervalCategoryDataset) {
IntervalCategoryDataset d = (IntervalCategoryDataset) dataset;
drawInterval(g2, state, dataArea, plot, domainAxis, rangeAxis,
d, row, column);
}
else {
super.drawItem(g2, state, dataArea, plot, domainAxis, rangeAxis,
dataset, row, column, pass);
}
}
protected void drawInterval(Graphics2D g2,
CategoryItemRendererState state,
Rectangle2D dataArea,
CategoryPlot plot,
CategoryAxis domainAxis,
ValueAxis rangeAxis,
IntervalCategoryDataset dataset,
int row,
int column) {
int seriesCount = getRowCount();
int categoryCount = getColumnCount();
PlotOrientation orientation = plot.getOrientation();
double rectX = 0.0;
double rectY = 0.0;
RectangleEdge domainAxisLocation = plot.getDomainAxisEdge();
RectangleEdge rangeAxisLocation = plot.getRangeAxisEdge();
Number value0 = dataset.getEndValue(row, column);
if (value0 == null) {
return;
}
double java2dValue0 = rangeAxis.valueToJava2D(value0.doubleValue(),
dataArea, rangeAxisLocation);
Number value1 = dataset.getStartValue(row, column);
if (value1 == null) {
return;
}
double java2dValue1 = rangeAxis.valueToJava2D(
value1.doubleValue(), dataArea, rangeAxisLocation);
if (java2dValue1 < java2dValue0) {
double temp = java2dValue1;
java2dValue1 = java2dValue0;
java2dValue0 = temp;
Number tempNum = value1;
value1 = value0;
value0 = tempNum;
}
double rectWidth = state.getBarWidth();
double rectHeight = Math.abs(java2dValue1 - java2dValue0);
if (orientation == PlotOrientation.HORIZONTAL) {
rectY = domainAxis.getCategoryStart(column, getColumnCount(),
dataArea, domainAxisLocation);
if (seriesCount > 1) {
double seriesGap = dataArea.getHeight() * getItemMargin()
/ (categoryCount * (seriesCount - 1));
rectY = rectY + row * (state.getBarWidth() + seriesGap);
}
else {
rectY = rectY + row * state.getBarWidth();
}
rectX = java2dValue0;
rectHeight = state.getBarWidth();
rectWidth = Math.abs(java2dValue1 - java2dValue0);
}
else if (orientation == PlotOrientation.VERTICAL) {
rectX = domainAxis.getCategoryStart(column, getColumnCount(),
dataArea, domainAxisLocation);
if (seriesCount > 1) {
double seriesGap = dataArea.getWidth() * getItemMargin()
/ (categoryCount * (seriesCount - 1));
rectX = rectX + row * (state.getBarWidth() + seriesGap);
}
else {
rectX = rectX + row * state.getBarWidth();
}
rectY = java2dValue0;
}
Rectangle2D bar = new Rectangle2D.Double(rectX, rectY, rectWidth,
rectHeight);
Paint seriesPaint = getItemPaint(row, column);
g2.setPaint(seriesPaint);
g2.fill(bar);
if (state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
Stroke stroke = getItemOutlineStroke(row, column);
Paint paint = getItemOutlinePaint(row, column);
if (stroke != null && paint != null) {
g2.setStroke(stroke);
g2.setPaint(paint);
g2.draw(bar);
}
}
CategoryItemLabelGenerator generator = getItemLabelGenerator(row,
column);
if (generator != null && isItemLabelVisible(row, column)) {
drawItemLabel(g2, dataset, row, column, plot, generator, bar,
false);
}
EntityCollection entities = state.getEntityCollection();
if (entities != null) {
addItemEntity(entities, dataset, row, column, bar);
}
}
}
|
[
"joliebig@fim.uni-passau.de"
] |
joliebig@fim.uni-passau.de
|
a5f3ea5eef49f39211822a4fba0f4a1657731daf
|
24c357728109459a59232c90cdd03fce606d813f
|
/src/main/java/br/acme/estoque/service/EstoqueService.java
|
778fb37fdb4552f06c6cc13af99e60af21bb6ae1
|
[] |
no_license
|
MateusGomesCabana/estoque
|
7f8e276c78cb8e4044144fe5d50240e2b770592f
|
505f5d87c1f4a27c4f7e68b44a951943588d9851
|
refs/heads/master
| 2022-11-21T07:28:21.924671
| 2020-07-25T20:34:36
| 2020-07-25T20:34:36
| 282,519,858
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,200
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package br.acme.estoque.service;
import br.acme.estoque.configuration.RabbitConfigure;
import br.acme.estoque.model.Product;
import br.acme.estoque.model.Venda;
import br.acme.estoque.repository.ProdutoRepository;
import java.util.List;
import java.util.Optional;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.core.env.Environment;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* @author Mateus
*/
@Service
public class EstoqueService {
Logger logger = LoggerFactory.getLogger(EstoqueService.class);
ProdutoRepository produtoRepository;
Environment environment;
public EstoqueService(ProdutoRepository produtoRepository, Environment environment) {
this.produtoRepository = produtoRepository;
this.environment = environment;
}
public List<Product> getProdutos() {
logger.info("StockService.getProducts= " + environment.getProperty("local.server.port"));
return produtoRepository.findAll();
}
public void updateStock(Venda venda) {
Optional<Product> produto = produtoRepository.findById(venda.getId());
if (produto.isPresent()) {
Product produtoCadastrado = produto.get();
produtoCadastrado.setStock(produtoCadastrado.getStock() - venda.getQuantidade());
produtoRepository.save(produtoCadastrado);
}
}
@RabbitListener(queues = RabbitConfigure.SALE_QUEUE)
public void consumer(Venda venda) {
Optional<Product> produto = produtoRepository.findById(venda.getId());
if (produto.isPresent()) {
Product produtoCadastrado = produto.get();
produtoCadastrado.setStock(produtoCadastrado.getStock() - venda.getQuantidade());
produtoRepository.save(produtoCadastrado);
}
}
}
|
[
"you@example.com"
] |
you@example.com
|
9699178af665c8b9c787947cef7213761b856fd4
|
000e9ddd9b77e93ccb8f1e38c1822951bba84fa9
|
/java/classes/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java
|
50cd0533ce049e70f4218d79630c8d0b0ac09e76
|
[
"Apache-2.0"
] |
permissive
|
Paladin1412/house
|
2bb7d591990c58bd7e8a9bf933481eb46901b3ed
|
b9e63db1a4975b614c422fed3b5b33ee57ea23fd
|
refs/heads/master
| 2021-09-17T03:37:48.576781
| 2018-06-27T12:39:38
| 2018-06-27T12:41:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,340
|
java
|
package org.apache.http.impl.conn.tsccm;
import java.util.concurrent.TimeUnit;
import org.apache.http.conn.ClientConnectionManager;
import org.apache.http.conn.ClientConnectionOperator;
import org.apache.http.conn.ClientConnectionRequest;
import org.apache.http.conn.ManagedClientConnection;
import org.apache.http.conn.routing.HttpRoute;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.params.HttpParams;
@Deprecated
public class ThreadSafeClientConnManager
implements ClientConnectionManager
{
protected ClientConnectionOperator connOperator;
protected final AbstractConnPool connectionPool;
protected SchemeRegistry schemeRegistry;
public ThreadSafeClientConnManager(HttpParams paramHttpParams, SchemeRegistry paramSchemeRegistry)
{
throw new RuntimeException("Stub!");
}
public void closeExpiredConnections()
{
throw new RuntimeException("Stub!");
}
public void closeIdleConnections(long paramLong, TimeUnit paramTimeUnit)
{
throw new RuntimeException("Stub!");
}
protected ClientConnectionOperator createConnectionOperator(SchemeRegistry paramSchemeRegistry)
{
throw new RuntimeException("Stub!");
}
protected AbstractConnPool createConnectionPool(HttpParams paramHttpParams)
{
throw new RuntimeException("Stub!");
}
protected void finalize()
throws Throwable
{
throw new RuntimeException("Stub!");
}
public int getConnectionsInPool()
{
throw new RuntimeException("Stub!");
}
public int getConnectionsInPool(HttpRoute paramHttpRoute)
{
throw new RuntimeException("Stub!");
}
public SchemeRegistry getSchemeRegistry()
{
throw new RuntimeException("Stub!");
}
public void releaseConnection(ManagedClientConnection paramManagedClientConnection, long paramLong, TimeUnit paramTimeUnit)
{
throw new RuntimeException("Stub!");
}
public ClientConnectionRequest requestConnection(HttpRoute paramHttpRoute, Object paramObject)
{
throw new RuntimeException("Stub!");
}
public void shutdown()
{
throw new RuntimeException("Stub!");
}
}
/* Location: /Users/gaoht/Downloads/zirom/classes-dex2jar.jar!/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"ght163988@autonavi.com"
] |
ght163988@autonavi.com
|
db6091fb4b92689546bb8a1e041eef3ad173328a
|
416ed26975cc93982e9895da5f2f447383bc5d9f
|
/integration/boofcv-swing/src/boofcv/gui/d2/PlaneView2D.java
|
59704af7a831b6f9f9e1b86fa9d61d9e23409f09
|
[
"LicenseRef-scancode-takuya-ooura",
"Apache-2.0"
] |
permissive
|
jmankhan/BoofCV
|
4cb99fbe19afcd35197003fc967c998e9c4875de
|
afbb6b1bf360092b3ee6e3ed5d0d2f9710d0e2da
|
refs/heads/SNAPSHOT
| 2021-01-20T03:29:46.088886
| 2017-05-06T18:13:40
| 2017-05-06T18:13:40
| 89,549,111
| 1
| 0
| null | 2017-04-27T02:54:45
| 2017-04-27T02:54:45
| null |
UTF-8
|
Java
| false
| false
| 4,433
|
java
|
/*
* Copyright (c) 2011-2017, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
* 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 boofcv.gui.d2;
import georegression.struct.point.Point2D_F64;
import georegression.struct.se.Se2_F64;
import georegression.transform.se.SePointOps_F64;
import org.ddogleg.struct.FastQueue;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
/**
* Used to display a 2D point cloud.
*
* @author Peter Abeles
*/
public class PlaneView2D extends JPanel implements MouseMotionListener, MouseListener, MouseWheelListener, KeyListener {
FastQueue<Point2D_F64> points = new FastQueue<>(Point2D_F64.class, true);
Se2_F64 transform = new Se2_F64();
double scale = 1;
Point2D_F64 a = new Point2D_F64();
// previous mouse location
int prevX;
int prevY;
double pixelToUnit;
public PlaneView2D( double pixelToUnit ) {
this.pixelToUnit = pixelToUnit;
addKeyListener(this);
addMouseListener(this);
addMouseMotionListener(this);
addMouseWheelListener(this);
}
public void reset() {
SwingUtilities.invokeLater( new Runnable() {
@Override
public void run() {
points.reset();
}
});
}
public void addPoint( final double x , final double y ) {
SwingUtilities.invokeLater( new Runnable() {
@Override
public void run() {
points.grow().set(x, y);
}
});
}
@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;
int offsetX = getWidth()/2;
int offsetY = getHeight()/2;
int H = getHeight()-1;
int r = 2;
int w =2*r+1;
for( Point2D_F64 p : points.toList() ) {
SePointOps_F64.transform(transform,p,a);
a.x *= scale/pixelToUnit;
a.y *= scale/pixelToUnit;
g2.fillOval(offsetX+(int)a.x,H-(offsetY+(int)a.y),w,w);
}
}
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
if( e.getWheelRotation() > 0 ) {
scale *= e.getWheelRotation()*1.2;
} else {
scale *= -e.getWheelRotation()*0.8;
}
if( scale < 0.001 )
scale = 0.001;
else if( scale > 1000 )
scale = 1000;
repaint();
}
@Override
public void mouseClicked(MouseEvent e) {
grabFocus();
}
@Override
public void mousePressed(MouseEvent e) {
prevX = e.getX();
prevY = e.getY();
}
@Override
public void mouseReleased(MouseEvent e) {}
@Override
public void mouseEntered(MouseEvent e) {}
@Override
public void mouseExited(MouseEvent e) {}
@Override
public void mouseDragged(MouseEvent e) {
final int deltaX = e.getX()-prevX;
final int deltaY = e.getY()-prevY;
// if( SwingUtilities.isRightMouseButton(e) ) {
// offsetZ -= deltaY*pixelToDistance;
// } else if( e.isShiftDown() || SwingUtilities.isMiddleMouseButton(e)) {
// tiltAngle += deltaY;
// } else {
transform.T.x += deltaX*pixelToUnit/scale;
transform.T.y -= deltaY*pixelToUnit/scale;
// }
prevX = e.getX();
prevY = e.getY();
repaint();
}
@Override
public void mouseMoved(MouseEvent e) {}
@Override
public void keyTyped(KeyEvent e) {
if( e.getKeyChar() == 'w' ) {
transform.T.y -= pixelToUnit/scale;
} else if( e.getKeyChar() == 's' ) {
transform.T.y += pixelToUnit/scale;
} else if( e.getKeyChar() == 'a' ) {
transform.T.x += pixelToUnit/scale;
} else if( e.getKeyChar() == 'd' ) {
transform.T.x -= pixelToUnit/scale;
} else if( e.getKeyChar() == 'q' ) {
scale *= 1.05;
} else if( e.getKeyChar() == 'e' ) {
scale *= 0.95;
} else if( e.getKeyChar() == 'h' ) {
transform.reset();
scale = 1;
}
if( scale < 0.001 )
scale = 0.001;
else if( scale > 1000 )
scale = 1000;
repaint();
}
@Override
public void keyPressed(KeyEvent e) {
//To change body of implemented methods use File | Settings | File Templates.
}
@Override
public void keyReleased(KeyEvent e) {
//To change body of implemented methods use File | Settings | File Templates.
}
}
|
[
"peter.abeles@gmail.com"
] |
peter.abeles@gmail.com
|
f8753fc0925c9d71bd7eee7cfcc4cf322a32b24b
|
d15803d5b16adab18b0aa43d7dca0531703bac4a
|
/com/google/c8.java
|
6831b3efd2070fa4d968eef2b0cd5a6a10767322
|
[] |
no_license
|
kenuosec/Decompiled-Whatsapp
|
375c249abdf90241be3352aea38eb32a9ca513ba
|
652bec1376e6cd201d54262cc1d4e7637c6334ed
|
refs/heads/master
| 2021-12-08T15:09:13.929944
| 2016-03-23T06:04:08
| 2016-03-23T06:04:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,840
|
java
|
package com.google;
import com.whatsapp.arj;
import java.util.Collections;
import java.util.Map;
import org.v;
import org.whispersystems.at;
public abstract class c8 extends bL implements cT {
private static final String[] z;
private final iI e;
static {
int i;
String[] strArr = new String[4];
char[] toCharArray = "\u001b]8%\u0002\u0019Q.*\u00144D)&\u0014}P2,\u0015}Z2=F0U)*\u000e}Y8:\u0015<S8i\u0012$D8g".toCharArray();
int length = toCharArray.length;
char[] cArr = toCharArray;
for (i = 0; length > i; i++) {
int i2;
char c = cArr[i];
switch (i % 5) {
case v.m /*0*/:
i2 = 93;
break;
case at.g /*1*/:
i2 = 52;
break;
case at.i /*2*/:
i2 = 93;
break;
case at.o /*3*/:
i2 = 73;
break;
default:
i2 = arj.Theme_checkboxStyle;
break;
}
cArr[i] = (char) (i2 ^ c);
}
strArr[0] = new String(cArr).intern();
toCharArray = "\u0018L),\b.]2'F4G}/\t/\u0014)0\u00168\u0014\u007f".toCharArray();
length = toCharArray.length;
cArr = toCharArray;
for (i = 0; length > i; i++) {
char c2 = cArr[i];
switch (i % 5) {
case v.m /*0*/:
i2 = 93;
break;
case at.g /*1*/:
i2 = 52;
break;
case at.i /*2*/:
i2 = 93;
break;
case at.o /*3*/:
i2 = 73;
break;
default:
i2 = arj.Theme_checkboxStyle;
break;
}
cArr[i] = (char) (i2 ^ c2);
}
strArr[1] = new String(cArr).intern();
toCharArray = "\u007f\u001a".toCharArray();
length = toCharArray.length;
cArr = toCharArray;
for (i = 0; length > i; i++) {
c2 = cArr[i];
switch (i % 5) {
case v.m /*0*/:
i2 = 93;
break;
case at.g /*1*/:
i2 = 52;
break;
case at.i /*2*/:
i2 = 93;
break;
case at.o /*3*/:
i2 = 73;
break;
default:
i2 = arj.Theme_checkboxStyle;
break;
}
cArr[i] = (char) (i2 ^ c2);
}
strArr[2] = new String(cArr).intern();
toCharArray = "\u007f\u0014*!\u000f>\\}-\t8G}'\t)\u00140(\u0012>\\}$\u0003.G<.\u0003}@$9\u0003}\u0016".toCharArray();
int length2 = toCharArray.length;
cArr = toCharArray;
for (length = 0; length2 > length; length++) {
c = cArr[length];
switch (length % 5) {
case v.m /*0*/:
i2 = 93;
break;
case at.g /*1*/:
i2 = 52;
break;
case at.i /*2*/:
i2 = 93;
break;
case at.o /*3*/:
i2 = 73;
break;
default:
i2 = arj.Theme_checkboxStyle;
break;
}
cArr[length] = (char) (i2 ^ c);
}
strArr[3] = new String(cArr).intern();
z = strArr;
}
public int m326a(e0 e0Var) {
try {
if (!e0Var.m()) {
return super.a(e0Var);
}
a(e0Var);
return this.e.a((dH) e0Var);
} catch (IllegalArgumentException e) {
throw e;
}
}
static iI a(c8 c8Var) {
return c8Var.e;
}
public Map m328a() {
Map a = bL.a((bL) this);
a.putAll(d());
return Collections.unmodifiableMap(a);
}
public Object a(e0 e0Var, int i) {
try {
if (!e0Var.m()) {
return super.a(e0Var, i);
}
a(e0Var);
return this.e.a((dH) e0Var, i);
} catch (IllegalArgumentException e) {
throw e;
}
}
protected int a() {
return this.e.a();
}
public Object m327a(e0 e0Var) {
if (!e0Var.m()) {
return super.a(e0Var);
}
a(e0Var);
Object c = this.e.c((dH) e0Var);
if (c != null) {
return c;
}
try {
if (e0Var.h() == fD.MESSAGE) {
return bb.b(e0Var.d());
}
return e0Var.c();
} catch (IllegalArgumentException e) {
throw e;
}
}
protected Map d() {
return this.e.i();
}
protected f2 c() {
return new f2(this, true, null);
}
protected f2 e() {
return new f2(this, false, null);
}
protected boolean a(ad adVar, c6 c6Var, h hVar, int i) {
return c3.a(adVar, c6Var, hVar, getDescriptorForType(), null, this.e, i);
}
protected c8() {
this.e = iI.g();
}
protected int b() {
return this.e.b();
}
public final Object a(gL gLVar) {
d(gLVar);
dH a = gLVar.a();
Object c = this.e.c(a);
if (c != null) {
return gL.b(gLVar, c);
}
try {
if (a.c()) {
return Collections.emptyList();
}
try {
if (a.h() == fD.MESSAGE) {
return gLVar.b();
}
return gL.b(gLVar, a.c());
} catch (IllegalArgumentException e) {
throw e;
}
} catch (IllegalArgumentException e2) {
throw e2;
}
}
protected boolean f() {
return this.e.h();
}
public final int c(gL gLVar) {
d(gLVar);
return this.e.a(gLVar.a());
}
private void a(e0 e0Var) {
try {
if (e0Var.f() != getDescriptorForType()) {
throw new IllegalArgumentException(z[0]);
}
} catch (IllegalArgumentException e) {
throw e;
}
}
protected void m329b() {
this.e.e();
}
public boolean b(e0 e0Var) {
try {
if (!e0Var.m()) {
return super.b(e0Var);
}
a(e0Var);
return this.e.b((dH) e0Var);
} catch (IllegalArgumentException e) {
throw e;
}
}
protected c8(c_ c_Var) {
super(c_Var);
this.e = c_.a(c_Var);
}
public final Object a(gL gLVar, int i) {
d(gLVar);
return gL.a(gLVar, this.e.a(gLVar.a(), i));
}
private void d(gL gLVar) {
try {
if (gLVar.a().f() != getDescriptorForType()) {
throw new IllegalArgumentException(z[1] + gLVar.a().f().a() + z[3] + getDescriptorForType().a() + z[2]);
}
} catch (IllegalArgumentException e) {
throw e;
}
}
public final boolean b(gL gLVar) {
d(gLVar);
return this.e.b(gLVar.a());
}
public boolean isInitialized() {
try {
if (super.isInitialized()) {
if (f()) {
return true;
}
}
return false;
} catch (IllegalArgumentException e) {
throw e;
} catch (IllegalArgumentException e2) {
throw e2;
}
}
}
|
[
"gigalitelk@gmail.com"
] |
gigalitelk@gmail.com
|
bf559de58a6be12c11687459454245a7c56306f7
|
96f50632c678f7a6232e9fdb5ccd9b5de2288279
|
/app/src/main/java/com/tshang/peipei/model/request/RequestGoGirlGroupChat.java
|
1a3a4b7a12cab6e198fc779b7fd9119fb5bb1d53
|
[] |
no_license
|
iuvei/peipei
|
629c17c2f8ddee98d4747d2cbec37b2209e78af4
|
0497dc9389287664e96e9d14381cd6078e114979
|
refs/heads/master
| 2020-11-26T22:20:32.990823
| 2019-03-16T07:19:40
| 2019-03-16T07:19:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,938
|
java
|
package com.tshang.peipei.model.request;
import java.math.BigInteger;
import java.util.Random;
import android.util.Log;
import com.tshang.peipei.protocol.asn.AsnBase;
import com.tshang.peipei.protocol.asn.gogirl.GoGirlChatData;
import com.tshang.peipei.protocol.asn.gogirl.GoGirlPkt;
import com.tshang.peipei.protocol.asn.gogirl.ReqGoGirlGroupChat;
import com.tshang.peipei.protocol.asn.gogirl.RspGoGirlGroupChat;
import com.tshang.peipei.protocol.asn.ydmxall.PKTS;
import com.tshang.peipei.protocol.asn.ydmxall.YdmxMsg;
import com.tshang.peipei.model.interfaces.ISocketMsgCallBack;
import com.tshang.peipei.network.socket.AppQueueManager;
import com.tshang.peipei.network.socket.PeiPeiRequest;
import com.tshang.peipei.storage.SharedPreferencesTools;
import com.tshang.peipei.storage.database.entity.ChatDatabaseEntity;
/**
* @Title: RequestGoGirlGroupChat.java
*
* @Description: 发送群聊信息
*
* @author Jeff
*
* @date 2014-9-22 上午9:59:25
*
* @version V1.3.0
*/
public class RequestGoGirlGroupChat extends AsnBase implements ISocketMsgCallBack {
private IGroupChat addblack;
private ChatDatabaseEntity chatDatabaseEntity;
private int groupid;
public void reqSendGroupChat(byte[] auth, int ver, int uid, int groupid, GoGirlChatData chatData, ChatDatabaseEntity chatDatabaseEntity,
IGroupChat callback) {
YdmxMsg ydmxMsg = super.createYdmx(auth, ver);
ReqGoGirlGroupChat req = new ReqGoGirlGroupChat();
req.chatdata = chatData;
req.fromuid = BigInteger.valueOf(uid);
req.togroupid = BigInteger.valueOf(groupid);
// 整合成完整消息体
GoGirlPkt goGirlPkt = new GoGirlPkt();
goGirlPkt.choiceId = GoGirlPkt.REQGOGIRLGROUPCHAT_CID;
goGirlPkt.reqgogirlgroupchat = req;
PKTS body = new PKTS();
body.choiceId = PKTS.GOGIRLPKT_CID;
body.gogirlpkt = goGirlPkt;
ydmxMsg.body = body;
byte[] msg = encode(ydmxMsg);
PeiPeiRequest request = new PeiPeiRequest(msg, this, false);
this.addblack = callback;
this.chatDatabaseEntity = chatDatabaseEntity;
this.groupid = groupid;
AppQueueManager.getInstance().addRequest(request);
}
@Override
public void succuess(byte[] msg) {
// 解包
YdmxMsg ydmxMsg = (YdmxMsg) AsnBase.decode(msg);
GoGirlPkt pkt = ydmxMsg.body.gogirlpkt;
if (null != addblack) {
RspGoGirlGroupChat rsp = pkt.rspgogirlgroupchat;
int retCode = rsp.retcode.intValue();
long chatTime = rsp.chattime.longValue();
if (checkRetCode(retCode))
addblack.callBackGroupChat(retCode, chatTime, groupid, chatDatabaseEntity);
}
}
@Override
public void error(int resultCode) {
if (null != addblack) {
addblack.callBackGroupChat(resultCode, 0, groupid, chatDatabaseEntity);
}
}
public interface IGroupChat {
public void callBackGroupChat(int retCode, long chatTime, int groupid, ChatDatabaseEntity chatDatabaseEntity);
}
}
|
[
"xumin2@evergrande.com"
] |
xumin2@evergrande.com
|
e1d5c3775f213001bf3bef5ec0c006f67448ba23
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/airbnb--epoxy/abe17d0f5bd23cb7d6f6066cb579c0e4b795ceb4/before/AdapterWithAutoModel.java
|
470fe897b206b9901a30d4da51075f517499b127
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 395
|
java
|
package com.airbnb.epoxy.adapter;
import com.airbnb.epoxy.AutoModel;
import com.airbnb.epoxy.BasicModelWithAttribute_;
import com.airbnb.epoxy.AutoEpoxyAdapter;
public class AdapterWithAutoModel extends AutoEpoxyAdapter {
@AutoModel BasicModelWithAttribute_ modelWithAttribute1;
@AutoModel BasicModelWithAttribute_ modelWithAttribute2;
@Override
protected void buildModels() {
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
e57487b4b24113d9c00ba2774a2a143892d1d8ae
|
e70abc02efbb8a7637eb3655f287b0a409cfa23b
|
/hyjf-mybatis/src/main/java/com/hyjf/mybatis/model/auto/SpreadsUsers.java
|
7e85d717e91065ffa21004f5b8d6a08e525ffef3
|
[] |
no_license
|
WangYouzheng1994/hyjf
|
ecb221560460e30439f6915574251266c1a49042
|
6cbc76c109675bb1f120737f29a786fea69852fc
|
refs/heads/master
| 2023-05-12T03:29:02.563411
| 2020-05-19T13:49:56
| 2020-05-19T13:49:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,920
|
java
|
package com.hyjf.mybatis.model.auto;
import java.io.Serializable;
public class SpreadsUsers implements Serializable {
private Integer id;
private Integer userId;
private Integer spreadsUserid;
private String type;
private String opernote;
private String operation;
private String addtime;
private String addip;
private String set;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getSpreadsUserid() {
return spreadsUserid;
}
public void setSpreadsUserid(Integer spreadsUserid) {
this.spreadsUserid = spreadsUserid;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type == null ? null : type.trim();
}
public String getOpernote() {
return opernote;
}
public void setOpernote(String opernote) {
this.opernote = opernote == null ? null : opernote.trim();
}
public String getOperation() {
return operation;
}
public void setOperation(String operation) {
this.operation = operation == null ? null : operation.trim();
}
public String getAddtime() {
return addtime;
}
public void setAddtime(String addtime) {
this.addtime = addtime == null ? null : addtime.trim();
}
public String getAddip() {
return addip;
}
public void setAddip(String addip) {
this.addip = addip == null ? null : addip.trim();
}
public String getSet() {
return set;
}
public void setSet(String set) {
this.set = set == null ? null : set.trim();
}
}
|
[
"heshuying@hyjf.com"
] |
heshuying@hyjf.com
|
ffa0d60bf6350c404747065adae2c3802ffd102b
|
d8c2c008c892d76464732adbda14e6d709d039dc
|
/src/main/java/org/koushik/javabrains/rest/ShortDateMessageBodyWriter.java
|
ddeae2a62ae81a0de049ed4dd3d670dfd5a17198
|
[] |
no_license
|
alamnr/Advance-JAX-RS
|
53f030f0df389e58758d0b41e54f167e01d88cbc
|
39fca2c8f9c366ede4f8979a066aab8ed079e846
|
refs/heads/master
| 2020-03-16T11:25:43.293858
| 2018-05-13T10:00:53
| 2018-05-13T10:00:53
| 132,648,092
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,258
|
java
|
package org.koushik.javabrains.rest;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.Date;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ext.MessageBodyWriter;
import javax.ws.rs.ext.Provider;
@Provider
@Produces("text/shortdate")
public class ShortDateMessageBodyWriter implements MessageBodyWriter<Date>{
@Override
public long getSize(Date arg0, Class<?> arg1, Type arg2, Annotation[] arg3, MediaType arg4) {
return -1;
}
@Override
public boolean isWriteable(Class<?> arg0, Type arg1, Annotation[] arg2, MediaType arg3) {
return Date.class.isAssignableFrom(arg0);
}
@Override
public void writeTo(Date date, Class<?> type, Type type1,
Annotation[] annotations, MediaType mt,
MultivaluedMap<String, Object> mm, OutputStream out) throws IOException, WebApplicationException {
// Here using depricated methods, Thi is for illustration only,
// Ideally use the Calender class whenever possible and not date
String shortDate = date.getDate()+"-"+date.getMonth()+"-"+date.getYear();
out.write(shortDate.getBytes());
}
}
|
[
"alamnr@gmail.com"
] |
alamnr@gmail.com
|
1b6c708721ed0bd8c07843c17cdd079b59615f49
|
a2c798936c7c2205a014460e4c8fad87a13353f0
|
/Uri1035.java
|
20496c51ad6aff060948dbf3c96ad2a4f42c5928
|
[] |
no_license
|
ACMELLO2021/java_17
|
4f4bf6a369415aaa7f2c6bd44ac51adadf1fcdd1
|
6bae4b94acb7e615997c77445dabd25fcee463ea
|
refs/heads/master
| 2023-04-02T14:47:41.240517
| 2021-04-15T16:39:13
| 2021-04-15T16:39:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 945
|
java
|
/*
Leia 4 valores inteiros A, B, C e D.
A seguir,
(1) se B for maior do que C e
(2) se D for maior do que A, e
(3) a soma de C com D for maior que a soma de A e B e
(4) se C e D, ambos, forem positivos e
(5) se a variável A for par
escrever a mensagem "Valores aceitos", senão escrever "Valores nao aceitos".
*/
import java.util.Scanner;
public class Uri1035{
public static void main(String args[]){
Scanner teclado = new Scanner(System.in);
int A,B,C,D;
A = teclado.nextInt();
B = teclado.nextInt();
C = teclado.nextInt();
D = teclado.nextInt();
// --1-- --2-- -------3------- -------4-------- -----5------
if ( (B > C) && (D > A) && (C + D > A + B) && (C > 0 && D > 0) && (A % 2 == 0) ) {
System.out.println("Valores aceitos");
}
else {
System.out.println("Valores nao aceitos");
}
}
}
|
[
"isidro@professorisidro.com.br"
] |
isidro@professorisidro.com.br
|
5e6e355f9ff5bbbd96f634900b9f016cd305d649
|
47bf37af89e6db89791e73a5e1a5ee743be52912
|
/src/main/java/lottery/domains/content/biz/UserGameReportService.java
|
02c54f2f7dd9502e9c4f765f520bdb0e4237b241
|
[] |
no_license
|
changsha136/testAdminManager
|
814d9dec3f4dd5e054cd6b140a3be4195e8fad0e
|
c062d3a785bc876e333a5775e899e3d863dca388
|
refs/heads/master
| 2022-12-24T09:29:53.222876
| 2019-06-27T15:43:00
| 2019-06-27T15:43:01
| 194,052,599
| 2
| 0
| null | 2022-12-16T04:28:46
| 2019-06-27T08:14:54
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 787
|
java
|
package lottery.domains.content.biz;
import lottery.domains.content.vo.bill.HistoryUserGameReportVO;
import lottery.domains.content.vo.bill.UserGameReportVO;
import java.util.List;
/**
* Created by Nick on 2016/12/28.
*/
public interface UserGameReportService {
boolean update(int userId, int platformId, double billingOrder, double prize, double waterReturn, double proxyReturn, String time);
List<UserGameReportVO> report(String sTime, String eTime);
List<UserGameReportVO> report(int userId, String sTime, String eTime);
List<HistoryUserGameReportVO> historyReport(String sTime, String eTime);
List<HistoryUserGameReportVO> historyReport(int userId, String sTime, String eTime);
List<UserGameReportVO> reportByUser(String sTime, String eTime);
}
|
[
"11111111"
] |
11111111
|
79a9e35dff8df1483e220a1b097b0d4651bb3b6b
|
967502523508f5bb48fdaac93b33e4c4aca20a4b
|
/aws-java-sdk-devicefarm/src/main/java/com/amazonaws/services/devicefarm/model/transform/CreateUploadRequestMarshaller.java
|
f495d1d3271502d3114263aba20da50dfc932cbc
|
[
"Apache-2.0",
"JSON"
] |
permissive
|
hanjk1234/aws-sdk-java
|
3ac0d8a9bf6f7d9bf1bc5db8e73a441375df10c0
|
07da997c6b05ae068230401921860f5e81086c58
|
refs/heads/master
| 2021-01-17T18:25:34.913778
| 2015-10-23T03:20:07
| 2015-10-23T03:20:07
| 44,951,249
| 1
| 0
| null | 2015-10-26T06:53:25
| 2015-10-26T06:53:24
| null |
UTF-8
|
Java
| false
| false
| 3,662
|
java
|
/*
* Copyright 2010-2015 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.devicefarm.model.transform;
import static com.amazonaws.util.StringUtils.UTF8;
import static com.amazonaws.util.StringUtils.COMMA_SEPARATOR;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.OutputStreamWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import java.util.regex.Pattern;
import com.amazonaws.AmazonClientException;
import com.amazonaws.Request;
import com.amazonaws.DefaultRequest;
import com.amazonaws.http.HttpMethodName;
import com.amazonaws.services.devicefarm.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.BinaryUtils;
import com.amazonaws.util.StringUtils;
import com.amazonaws.util.StringInputStream;
import com.amazonaws.util.json.*;
/**
* CreateUploadRequest Marshaller
*/
public class CreateUploadRequestMarshaller implements
Marshaller<Request<CreateUploadRequest>, CreateUploadRequest> {
public Request<CreateUploadRequest> marshall(
CreateUploadRequest createUploadRequest) {
if (createUploadRequest == null) {
throw new AmazonClientException(
"Invalid argument passed to marshall(...)");
}
Request<CreateUploadRequest> request = new DefaultRequest<CreateUploadRequest>(
createUploadRequest, "AWSDeviceFarm");
request.addHeader("X-Amz-Target", "DeviceFarm_20150623.CreateUpload");
request.setHttpMethod(HttpMethodName.POST);
request.setResourcePath("");
try {
StringWriter stringWriter = new StringWriter();
JSONWriter jsonWriter = new JSONWriter(stringWriter);
jsonWriter.object();
if (createUploadRequest.getProjectArn() != null) {
jsonWriter.key("projectArn").value(
createUploadRequest.getProjectArn());
}
if (createUploadRequest.getName() != null) {
jsonWriter.key("name").value(createUploadRequest.getName());
}
if (createUploadRequest.getType() != null) {
jsonWriter.key("type").value(createUploadRequest.getType());
}
if (createUploadRequest.getContentType() != null) {
jsonWriter.key("contentType").value(
createUploadRequest.getContentType());
}
jsonWriter.endObject();
String snippet = stringWriter.toString();
byte[] content = snippet.getBytes(UTF8);
request.setContent(new StringInputStream(snippet));
request.addHeader("Content-Length",
Integer.toString(content.length));
request.addHeader("Content-Type", "application/x-amz-json-1.1");
} catch (Throwable t) {
throw new AmazonClientException(
"Unable to marshall request to JSON: " + t.getMessage(), t);
}
return request;
}
}
|
[
"aws@amazon.com"
] |
aws@amazon.com
|
c70d9a77554d52399fe9312d6973fbe5a02f1bed
|
2eb1eca7774c652e61ad9c3717bf6bc2d13a103c
|
/src/main/java/com/eigenbaumarkt/aop/logging/LoggingAspect.java
|
43a98e391772643faf005effbd7fcd4d3692a278
|
[] |
no_license
|
Mesqualito/Taskplaner
|
7d308bf0c3b918ced6def59607073bb42559b363
|
0abc026b1f1581f791598838681dea26be4f8f7c
|
refs/heads/master
| 2023-05-12T09:00:24.736766
| 2019-10-21T13:09:15
| 2019-10-21T13:09:15
| 214,999,664
| 0
| 0
| null | 2023-05-07T00:39:59
| 2019-10-14T09:17:04
|
Java
|
UTF-8
|
Java
| false
| false
| 3,889
|
java
|
package com.eigenbaumarkt.aop.logging;
import io.github.jhipster.config.JHipsterConstants;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.env.Environment;
import org.springframework.core.env.Profiles;
import java.util.Arrays;
/**
* Aspect for logging execution of service and repository Spring components.
*
* By default, it only runs with the "dev" profile.
*/
@Aspect
public class LoggingAspect {
private final Logger log = LoggerFactory.getLogger(this.getClass());
private final Environment env;
public LoggingAspect(Environment env) {
this.env = env;
}
/**
* Pointcut that matches all repositories, services and Web REST endpoints.
*/
@Pointcut("within(@org.springframework.stereotype.Repository *)" +
" || within(@org.springframework.stereotype.Service *)" +
" || within(@org.springframework.web.bind.annotation.RestController *)")
public void springBeanPointcut() {
// Method is empty as this is just a Pointcut, the implementations are in the advices.
}
/**
* Pointcut that matches all Spring beans in the application's main packages.
*/
@Pointcut("within(com.eigenbaumarkt.repository..*)"+
" || within(com.eigenbaumarkt.service..*)"+
" || within(com.eigenbaumarkt.web.rest..*)")
public void applicationPackagePointcut() {
// Method is empty as this is just a Pointcut, the implementations are in the advices.
}
/**
* Advice that logs methods throwing exceptions.
*
* @param joinPoint join point for advice.
* @param e exception.
*/
@AfterThrowing(pointcut = "applicationPackagePointcut() && springBeanPointcut()", throwing = "e")
public void logAfterThrowing(JoinPoint joinPoint, Throwable e) {
if (env.acceptsProfiles(Profiles.of(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT))) {
log.error("Exception in {}.{}() with cause = \'{}\' and exception = \'{}\'", joinPoint.getSignature().getDeclaringTypeName(),
joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL", e.getMessage(), e);
} else {
log.error("Exception in {}.{}() with cause = {}", joinPoint.getSignature().getDeclaringTypeName(),
joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL");
}
}
/**
* Advice that logs when a method is entered and exited.
*
* @param joinPoint join point for advice.
* @return result.
* @throws Throwable throws {@link IllegalArgumentException}.
*/
@Around("applicationPackagePointcut() && springBeanPointcut()")
public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable {
if (log.isDebugEnabled()) {
log.debug("Enter: {}.{}() with argument[s] = {}", joinPoint.getSignature().getDeclaringTypeName(),
joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs()));
}
try {
Object result = joinPoint.proceed();
if (log.isDebugEnabled()) {
log.debug("Exit: {}.{}() with result = {}", joinPoint.getSignature().getDeclaringTypeName(),
joinPoint.getSignature().getName(), result);
}
return result;
} catch (IllegalArgumentException e) {
log.error("Illegal argument: {} in {}.{}()", Arrays.toString(joinPoint.getArgs()),
joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName());
throw e;
}
}
}
|
[
"jochen@gebsattel.rocks"
] |
jochen@gebsattel.rocks
|
c8785973bae8253d3c8870905c51da5b1ad205c9
|
c5813babc1fac1905934e5219cf2141719a5bb02
|
/editor/plugins/org.fusesource.ide.camel.editor/src/org/fusesource/ide/camel/editor/genericEndpoint/SelectEndpointWizard.java
|
cee5d927d94e7a3165d61cb9c0fb83d8d399e9d7
|
[] |
no_license
|
kmanav/jbosstools-fuse
|
a8a7133ba9fb4093d93cce7cbf9739664bbfbae6
|
66c89f58ac4dd932172082db5538b6d9ca36c818
|
refs/heads/master
| 2020-12-07T15:21:44.569048
| 2017-06-26T07:45:35
| 2017-06-26T07:45:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,157
|
java
|
/*******************************************************************************
* Copyright (c) 2016 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.fusesource.ide.camel.editor.genericEndpoint;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.jface.wizard.Wizard;
import org.fusesource.ide.camel.editor.component.wizard.SelectComponentWizardPage;
import org.fusesource.ide.camel.editor.internal.UIMessages;
import org.fusesource.ide.camel.model.service.core.catalog.components.Component;
import org.fusesource.ide.camel.model.service.core.catalog.components.ComponentModel;
import org.fusesource.ide.camel.model.service.core.model.AbstractCamelModelElement;
/**
* @author Aurelien Pupier
*
*/
public class SelectEndpointWizard extends Wizard {
private ComponentModel componentModel;
private SelectComponentWizardPage page;
private AbstractCamelModelElement parent;
/**
* @param camelFile
* @param componentModel
*/
public SelectEndpointWizard(AbstractCamelModelElement parent, ComponentModel componentModel) {
this.componentModel = componentModel;
this.parent = parent;
setWindowTitle(UIMessages.SelectEndpointWizard_windowTitle);
}
@Override
public void addPages() {
super.addPages();
page = new SelectComponentWizardPage(new DataBindingContext(), componentModel, UIMessages.SelectEndpointWizard_pageSelectionComponentTitle,
UIMessages.SelectEndpointWizard_pageSelectionComponentDescription, parent);
addPage(page);
}
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#performFinish()
*/
@Override
public boolean performFinish() {
return true;
}
public Component getComponent() {
return page.getComponentSelected();
}
public String getId() {
return page.getId();
}
}
|
[
"apupier@redhat.com"
] |
apupier@redhat.com
|
627f7a72a21e676dfec1b0a86c4d183090c628f5
|
2e966a890a65ee54dbd1f0722d6c5d98a7831d3e
|
/JudgeV2/src/main/java/softuni/judge_v2/services/UserService.java
|
9ae6935aa73df0ed4e5e88fc403c731c9ab28ca1
|
[] |
no_license
|
Andrey-V-Georgiev/SPRING_FUNDAMENTALS
|
cb97ac728c9edb3aa22d65f42985fbe37ba3aaf2
|
2a5e4f25c4bc24a74e9f9ed57bea3f9a0e8970ea
|
refs/heads/master
| 2023-03-10T03:54:40.185889
| 2021-02-21T11:55:20
| 2021-02-21T11:55:20
| 325,343,463
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 522
|
java
|
package softuni.judge_v2.services;
import softuni.judge_v2.models.service.UserServiceModel;
import softuni.judge_v2.models.view.UserViewModel;
import javax.servlet.http.HttpSession;
import java.util.List;
public interface UserService {
UserServiceModel registerUser(UserServiceModel userServiceModel);
UserServiceModel findByUsername(String username);
List<String> findAllUsernames();
void changeUserRole(String username, String role);
UserViewModel findSessionUser(HttpSession httpSession);
}
|
[
"andrey.v.georgiev@gmail.com"
] |
andrey.v.georgiev@gmail.com
|
623cbde7e67704a5410fa1f0731013fd6acec99a
|
1f1e1ca9c1c50993ca28618889e6a031016be440
|
/MobileBase/src/main/java/com/github/ignition/support/IgnitedDiagnostics.java
|
8de2b31398d638763bbf5eeaf1722c90aa15c323
|
[
"Apache-2.0"
] |
permissive
|
yangjiandong/MobileBase.G
|
9d49bd306ee9321cac875af03605d0f93d95a342
|
71ecbae44d8d09b9f26a643f11f195b9f7732ed2
|
refs/heads/master
| 2020-05-18T00:44:08.808744
| 2013-09-12T03:31:43
| 2013-09-12T03:31:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,285
|
java
|
/* Copyright (c) 2009-2011 Matthias Kaeppler
*
* 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.github.ignition.support;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Locale;
import android.app.Activity;
import android.content.ContentResolver;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Build;
import android.provider.Settings;
import android.provider.Settings.Secure;
import android.provider.Settings.SettingNotFoundException;
public class IgnitedDiagnostics {
public static final int ANDROID_API_LEVEL;
public static final int JELLY_BEAN_MR1 = 17;
public static final int JELLY_BEAN = 16;
public static final int ICS_MR1 = 15;
public static final int ICS = 14;
public static final int HONEYCOMB_MR2 = 13;
public static final int HONEYCOMB_MR1 = 12;
public static final int HONEYCOMB = 11;
public static final int GINGERBREAD_MR1 = 10;
public static final int GINGERBREAD = 9;
public static final int FROYO = 8;
public static final int ECLAIR = 7;
public static final int DONUT = 4;
public static final int CUPCAKE = 3;
public static final boolean SUPPORTS_JELLY_BEAN_MR1, SUPPORTS_JELLY_BEAN, SUPPORTS_ICS_MR1,
SUPPORTS_ICS, SUPPORTS_HONEYCOMB_MR2, SUPPORTS_HONEYCOMB_MR1, SUPPORTS_HONEYCOMB,
SUPPORTS_GINGERBREAD, SUPPORTS_GINGERBREAD_MR1, SUPPORTS_FROYO, SUPPORTS_ECLAIR,
SUPPORTS_DONUT, SUPPORTS_CUPCAKE;
private static boolean test = false;
private static int testAndroidApiLevel;
static {
int apiLevel = -1;
try {
apiLevel = Build.VERSION.class.getField("SDK_INT").getInt(null);
} catch (Exception e) {
apiLevel = Integer.parseInt(Build.VERSION.SDK);
}
ANDROID_API_LEVEL = apiLevel;
SUPPORTS_JELLY_BEAN_MR1 = ANDROID_API_LEVEL >= JELLY_BEAN_MR1;
SUPPORTS_JELLY_BEAN = ANDROID_API_LEVEL >= JELLY_BEAN;
SUPPORTS_ICS_MR1 = ANDROID_API_LEVEL >= ICS_MR1;
SUPPORTS_ICS = ANDROID_API_LEVEL >= ICS;
SUPPORTS_HONEYCOMB_MR2 = ANDROID_API_LEVEL >= HONEYCOMB_MR2;
SUPPORTS_HONEYCOMB_MR1 = ANDROID_API_LEVEL >= HONEYCOMB_MR1;
SUPPORTS_HONEYCOMB = ANDROID_API_LEVEL >= HONEYCOMB;
SUPPORTS_GINGERBREAD_MR1 = ANDROID_API_LEVEL >= GINGERBREAD_MR1;
SUPPORTS_GINGERBREAD = ANDROID_API_LEVEL >= GINGERBREAD;
SUPPORTS_FROYO = ANDROID_API_LEVEL >= FROYO;
SUPPORTS_ECLAIR = ANDROID_API_LEVEL >= ECLAIR;
SUPPORTS_DONUT = ANDROID_API_LEVEL >= DONUT;
SUPPORTS_CUPCAKE = ANDROID_API_LEVEL >= CUPCAKE;
}
public static boolean isTest() {
return test;
}
public static void setTestApiLevel(int androidApiLevel) {
testAndroidApiLevel = androidApiLevel;
test = true;
}
public static boolean supportsApiLevel(int apiLevel) {
if (test) {
return testAndroidApiLevel >= apiLevel;
} else {
return ANDROID_API_LEVEL >= apiLevel;
}
}
/**
* Returns the ANDROID_ID unique device ID for the current device. Reading that ID has changed
* between platform versions, so this method takes care of attempting to read it in different
* ways, if one failed.
*
* @param context
* the context
* @return the device's ANDROID_ID, or null if it could not be determined
* @see Secure#ANDROID_ID
*/
public static String getAndroidId(Context context) {
String androidId = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);
if (androidId == null) {
// this happens on 1.6 and older
androidId = android.provider.Settings.System.getString(context.getContentResolver(),
android.provider.Settings.System.ANDROID_ID);
}
return androidId;
}
/**
* Same as {@link #getAndroidId(Context)}, but never returns null.
*
* @param context
* the context
* @param fallbackValue
* the fallback value
* @return the device's ANDROID_ID, or the fallback value if it could not be determined
* @see Secure#ANDROID_ID
*/
public static String getAndroidId(Context context, String fallbackValue) {
String androidId = getAndroidId(context);
if (androidId == null) {
androidId = fallbackValue;
}
return androidId;
}
public static String getApplicationVersionString(Context context) {
try {
PackageManager pm = context.getPackageManager();
PackageInfo info = pm.getPackageInfo(context.getPackageName(), 0);
return "v" + info.versionName;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static String createDiagnosis(Activity context, Exception error) {
StringBuilder sb = new StringBuilder();
sb.append("Application version: " + getApplicationVersionString(context) + "\n");
sb.append("Device locale: " + Locale.getDefault().toString() + "\n\n");
sb.append("Android ID: " + getAndroidId(context, "n/a"));
// phone information
sb.append("PHONE SPECS\n");
sb.append("model: " + Build.MODEL + "\n");
sb.append("brand: " + Build.BRAND + "\n");
sb.append("product: " + Build.PRODUCT + "\n");
sb.append("device: " + Build.DEVICE + "\n\n");
// android information
sb.append("PLATFORM INFO\n");
sb.append("Android " + Build.VERSION.RELEASE + " " + Build.ID + " (build "
+ Build.VERSION.INCREMENTAL + ")\n");
sb.append("build tags: " + Build.TAGS + "\n");
sb.append("build type: " + Build.TYPE + "\n\n");
// settings
sb.append("SYSTEM SETTINGS\n");
String networkMode = null;
ContentResolver resolver = context.getContentResolver();
try {
if (Settings.Secure.getInt(resolver, Settings.Secure.WIFI_ON) == 0) {
networkMode = "DATA";
} else {
networkMode = "WIFI";
}
sb.append("network mode: " + networkMode + "\n");
sb.append("HTTP proxy: "
+ Settings.Secure.getString(resolver, Settings.Secure.HTTP_PROXY) + "\n\n");
} catch (SettingNotFoundException e) {
e.printStackTrace();
}
sb.append("STACK TRACE FOLLOWS\n\n");
StringWriter stackTrace = new StringWriter();
error.printStackTrace(new PrintWriter(stackTrace));
sb.append(stackTrace.toString());
return sb.toString();
}
}
|
[
"young.jiandong@gmail.com"
] |
young.jiandong@gmail.com
|
5534e18fbaf7f55575a549bd117e1aad2c555922
|
da3b91e93dacd51d54c6c45a3ceaee3a0fcc9729
|
/bosphorus-core/src/main/java/org/bosphorus/stream/pipe/IfElse.java
|
ed9f263388cc247a0ca0d670a8f3bc795b6f9581
|
[
"Apache-2.0"
] |
permissive
|
elvis121193/bosphorus
|
e119778e8bad646e48d130c695af6cecded343a8
|
d1818f093eebffa422b011be18864c0ea914ff95
|
refs/heads/master
| 2020-12-28T23:15:24.187919
| 2014-12-01T21:07:49
| 2014-12-01T21:07:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 623
|
java
|
package org.bosphorus.stream.pipe;
import java.util.List;
import org.bosphorus.expression.scalar.executor.IScalarExecutor;
public class IfElse<TInput> implements IPipe<TInput> {
private IScalarExecutor<TInput, Boolean> condition;
private IPipe<TInput> truePipe;
private IPipe<TInput> falsePipe;
@Override
public void writeOne(TInput input) throws Exception {
if(condition.execute(input)) {
truePipe.writeOne(input);
}
else if(falsePipe != null) {
falsePipe.writeOne(input);
}
}
@Override
public void writeMulti(List<TInput> input) throws Exception {
// TODO Auto-generated method stub
}
}
|
[
"unluonur@gmail.com"
] |
unluonur@gmail.com
|
7dfecb7c1058630365936d9d68b4a38f310fecec
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/alibaba--druid/9a02c925b424cead5d38d805a14cf4372597de05/after/MockPreparedStatement.java
|
5d866c2ef666c8bd3db17702eddbba4b201ae675
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,044
|
java
|
/*
* Copyright 1999-2011 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.druid.mock;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import com.alibaba.druid.util.jdbc.PreparedStatementBase;
public class MockPreparedStatement extends PreparedStatementBase implements PreparedStatement {
private final String sql;
public MockPreparedStatement(MockConnection conn, String sql){
super(conn);
this.sql = sql;
}
public String getSql() {
return sql;
}
public MockConnection getConnection() throws SQLException {
return (MockConnection) super.getConnection();
}
@Override
public ResultSet executeQuery() throws SQLException {
checkOpen();
MockConnection conn = getConnection();
if (conn != null && conn.getDriver() != null) {
return getConnection().getDriver().createResultSet(this);
}
if (conn != null) {
conn.handleSleep();
}
return new MockResultSet(this);
}
@Override
public int executeUpdate() throws SQLException {
checkOpen();
if (getConnection() != null) {
getConnection().handleSleep();
}
return 0;
}
@Override
public boolean execute() throws SQLException {
checkOpen();
if (getConnection() != null) {
getConnection().handleSleep();
}
return false;
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
376d95e12d7d48e510d319300b449032c613328f
|
4a93f26f8299aa7f01d5a1432beea419a9ee2285
|
/jstarcraft-ai-model/src/test/java/com/jstarcraft/ai/model/neuralnetwork/activation/SigmoidActivationFunctionTestCase.java
|
d8c2492544eb0961d55c77b029702daa414c619a
|
[
"Apache-2.0"
] |
permissive
|
zzdzzdzzdzzd/jstarcraft-ai
|
32eeff98a84543309cf19a6a7bb99a143e12197f
|
e59181f52a560885c9beadd9542ec2af6f3297f1
|
refs/heads/master
| 2020-07-06T19:19:38.468285
| 2019-08-17T09:53:51
| 2019-08-17T09:53:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 632
|
java
|
package com.jstarcraft.ai.model.neuralnetwork.activation;
import org.nd4j.linalg.activations.IActivation;
import org.nd4j.linalg.activations.impl.ActivationSigmoid;
import com.jstarcraft.ai.model.neuralnetwork.activation.ActivationFunction;
import com.jstarcraft.ai.model.neuralnetwork.activation.SigmoidActivationFunction;
public class SigmoidActivationFunctionTestCase extends ActivationFunctionTestCase {
@Override
protected IActivation getOldFunction() {
return new ActivationSigmoid();
}
@Override
protected ActivationFunction getNewFunction() {
return new SigmoidActivationFunction();
}
}
|
[
"Birdy@LAPTOP-QRG8T75T"
] |
Birdy@LAPTOP-QRG8T75T
|
42d72da0ac8c0875a82caec5a2d42e6cadffa952
|
d39ccf65250d04d5f7826584a06ee316babb3426
|
/wb-mmb/wb-api/src/main/java/org/dwfa/ace/task/svn/AddSubversionEntryFromDirectoryBeanInfo.java
|
7540e9146c8330d9aadec5d24c3d5809cfce73e2
|
[] |
no_license
|
va-collabnet-archive/workbench
|
ab4c45504cf751296070cfe423e39d3ef2410287
|
d57d55cb30172720b9aeeb02032c7d675bda75ae
|
refs/heads/master
| 2021-01-10T02:02:09.685099
| 2012-01-25T19:15:44
| 2012-01-25T19:15:44
| 47,691,158
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,219
|
java
|
/**
* Copyright (c) 2009 International Health Terminology Standards Development
* Organisation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dwfa.ace.task.svn;
import java.beans.BeanDescriptor;
import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;
import org.dwfa.bpa.tasks.editor.JTextFieldEditor;
import org.dwfa.bpa.tasks.editor.JTextFieldEditorOneLine;
public class AddSubversionEntryFromDirectoryBeanInfo extends SimpleBeanInfo {
public PropertyDescriptor[] getPropertyDescriptors() {
try {
PropertyDescriptor repoUrl = new PropertyDescriptor("repoUrl", getBeanDescriptor().getBeanClass());
repoUrl.setBound(true);
repoUrl.setPropertyEditorClass(JTextFieldEditor.class);
repoUrl.setDisplayName("<html><font color='green'>repoUrl:");
repoUrl.setShortDescription("The URL of the repository to checkout.");
PropertyDescriptor workingCopy = new PropertyDescriptor("workingCopy", getBeanDescriptor().getBeanClass());
workingCopy.setBound(true);
workingCopy.setPropertyEditorClass(JTextFieldEditor.class);
workingCopy.setDisplayName("<html><font color='green'>working copy:");
workingCopy.setShortDescription("The local directory to hold the working copy.");
PropertyDescriptor prompt = new PropertyDescriptor("prompt", getBeanDescriptor().getBeanClass());
prompt.setBound(true);
prompt.setPropertyEditorClass(JTextFieldEditor.class);
prompt.setDisplayName("<html><font color='green'>prompt:");
prompt.setShortDescription("The prompt to tell the user what type of subversion entry they are making.");
PropertyDescriptor keyName = new PropertyDescriptor("keyName", getBeanDescriptor().getBeanClass());
keyName.setBound(true);
keyName.setPropertyEditorClass(JTextFieldEditorOneLine.class);
keyName.setDisplayName("<html><font color='green'>profile key:");
keyName.setShortDescription("The key for the subversion entry.");
PropertyDescriptor rv[] = { prompt, keyName, repoUrl, workingCopy };
return rv;
} catch (IntrospectionException e) {
throw new Error(e.toString());
}
}
/**
* @see java.beans.BeanInfo#getBeanDescriptor()
*/
public BeanDescriptor getBeanDescriptor() {
BeanDescriptor bd = new BeanDescriptor(AddSubversionEntryFromDirectory.class);
bd.setDisplayName("<html><font color='green'><center>add subversion entry<br>from selected directory");
return bd;
}
}
|
[
"wsmoak"
] |
wsmoak
|
e63ef1cda1e8ee78cd0da9afd07f812b366ad0f1
|
73266ea6be2de149a4700798b221bd4c79525604
|
/wip/matcha/backend/src/main/java/ft/framework/orm/mapping/naming/NamingStrategy.java
|
d63ec3b91fec1ea2d2b18387384d19d856e8de23
|
[] |
no_license
|
Caceresenzo/42
|
de90b0262b573d4056102ad04ed0f6fbef169858
|
df1e14c019994202da0abbe221455f1a6ee291e4
|
refs/heads/master
| 2023-08-15T06:14:08.625075
| 2023-08-13T17:19:00
| 2023-08-13T17:19:00
| 220,007,175
| 92
| 36
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 516
|
java
|
package ft.framework.orm.mapping.naming;
import org.apache.commons.lang3.StringUtils;
public interface NamingStrategy {
String convertName(String camelCase);
default String convertNameIfEmpty(String value, String camelCase) {
if (StringUtils.isNotEmpty(value)) {
return value;
}
return convertName(camelCase);
}
default String convertIdNameIfEmpty(String value, String camelCase) {
if (StringUtils.isNotEmpty(value)) {
return value;
}
return convertName(camelCase) + "_id";
}
}
|
[
"caceresenzo1502@gmail.com"
] |
caceresenzo1502@gmail.com
|
a0a6631fa7bce10d83a8a16834437a786d553cd3
|
7016cec54fb7140fd93ed805514b74201f721ccd
|
/ui/web/main/src/java/com/echothree/ui/web/main/action/item/harmonizedtariffschedulecodeunit/DescriptionAction.java
|
6b2eeddb0b3b3ea5cc9d94b5de6b6cd59bf13d97
|
[
"MIT",
"Apache-1.1",
"Apache-2.0"
] |
permissive
|
echothreellc/echothree
|
62fa6e88ef6449406d3035de7642ed92ffb2831b
|
bfe6152b1a40075ec65af0880dda135350a50eaf
|
refs/heads/master
| 2023-09-01T08:58:01.429249
| 2023-08-21T11:44:08
| 2023-08-21T11:44:08
| 154,900,256
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,193
|
java
|
// --------------------------------------------------------------------------------
// Copyright 2002-2023 Echo Three, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// --------------------------------------------------------------------------------
package com.echothree.ui.web.main.action.item.harmonizedtariffschedulecodeunit;
import com.echothree.control.user.item.common.ItemUtil;
import com.echothree.control.user.item.common.form.GetHarmonizedTariffScheduleCodeUnitDescriptionsForm;
import com.echothree.control.user.item.common.result.GetHarmonizedTariffScheduleCodeUnitDescriptionsResult;
import com.echothree.model.control.item.common.transfer.HarmonizedTariffScheduleCodeUnitTransfer;
import com.echothree.ui.web.main.framework.AttributeConstants;
import com.echothree.ui.web.main.framework.ForwardConstants;
import com.echothree.ui.web.main.framework.MainBaseAction;
import com.echothree.ui.web.main.framework.ParameterConstants;
import com.echothree.util.common.command.CommandResult;
import com.echothree.util.common.command.ExecutionResult;
import com.echothree.view.client.web.struts.sprout.annotation.SproutAction;
import com.echothree.view.client.web.struts.sprout.annotation.SproutForward;
import com.echothree.view.client.web.struts.sprout.annotation.SproutProperty;
import com.echothree.view.client.web.struts.sslext.config.SecureActionMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
@SproutAction(
path = "/Item/HarmonizedTariffScheduleCodeUnit/Description",
mappingClass = SecureActionMapping.class,
properties = {
@SproutProperty(property = "secure", value = "true")
},
forwards = {
@SproutForward(name = "Display", path = "/item/harmonizedtariffschedulecodeunit/description.jsp")
}
)
public class DescriptionAction
extends MainBaseAction<ActionForm> {
@Override
public ActionForward executeAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception {
String forwardKey;
String harmonizedTariffScheduleCodeUnitName = request.getParameter(ParameterConstants.HARMONIZED_TARIFF_SCHEDULE_CODE_UNIT_NAME);
GetHarmonizedTariffScheduleCodeUnitDescriptionsForm commandForm = ItemUtil.getHome().getGetHarmonizedTariffScheduleCodeUnitDescriptionsForm();
commandForm.setHarmonizedTariffScheduleCodeUnitName(harmonizedTariffScheduleCodeUnitName);
CommandResult commandResult = ItemUtil.getHome().getHarmonizedTariffScheduleCodeUnitDescriptions(getUserVisitPK(request), commandForm);
if(!commandResult.hasErrors()) {
ExecutionResult executionResult = commandResult.getExecutionResult();
GetHarmonizedTariffScheduleCodeUnitDescriptionsResult result = (GetHarmonizedTariffScheduleCodeUnitDescriptionsResult) executionResult.getResult();
HarmonizedTariffScheduleCodeUnitTransfer harmonizedTariffScheduleCodeUnitTransfer = result.getHarmonizedTariffScheduleCodeUnit();
request.setAttribute(AttributeConstants.HARMONIZED_TARIFF_SCHEDULE_CODE_UNIT, harmonizedTariffScheduleCodeUnitTransfer);
request.setAttribute(AttributeConstants.HARMONIZED_TARIFF_SCHEDULE_CODE_UNIT_DESCRIPTIONS, result.getHarmonizedTariffScheduleCodeUnitDescriptions());
forwardKey = ForwardConstants.DISPLAY;
} else {
forwardKey = ForwardConstants.ERROR_404;
}
return mapping.findForward(forwardKey);
}
}
|
[
"rich@echothree.com"
] |
rich@echothree.com
|
1e95004ea28676a96beb099f23f09611303f70a3
|
08bf6954d919e053a20bfe807baf3254e5551574
|
/src/main/java/com/tangkuo/cn/pay/kmtk/task/ScheduleExecuteTask.java
|
fe124e4579e56da9561dd74d7e02de6e96b18992
|
[
"Apache-2.0"
] |
permissive
|
TANGKUO/mavenDemo
|
5fb7559af4f3983cabffe0a8cd19f247eee5d8f0
|
90fa079d433fe09239375310949156e03eabb6ec
|
refs/heads/master
| 2021-01-20T07:35:44.982825
| 2017-07-16T10:13:18
| 2017-07-16T10:13:18
| 83,890,439
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 886
|
java
|
package com.tangkuo.cn.pay.kmtk.task;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
/**
*
* @ClassName: ScheduleExecuteTask
* @Description: (这里用一句话描述这个类的作用)
* @author tangkuo
* @date 2017年7月16日 下午5:47:44
*
*/
public class ScheduleExecuteTask {
public ScheduledExecutorService scheduExecutor = Executors.newScheduledThreadPool(10);
// 启动计时器
public void lanuchTimer() {
Runnable command = new Runnable() {
public void run() {
System.out.println("========gogogogogogogogogogogogogogo========");
}
};
scheduExecutor.schedule(command, 1, TimeUnit.SECONDS);
}
public static void main(String[] args) {
ScheduleExecuteTask task = new ScheduleExecuteTask();
task.lanuchTimer();
}
}
|
[
"616507752@qq.com"
] |
616507752@qq.com
|
e4d0fd14b764b2a3e4020936236418f4e12c62c7
|
fe2ef5d33ed920aef5fc5bdd50daf5e69aa00ed4
|
/jbpm.3/jpdl/jar/src/test/java/org/jbpm/jpdl/exe/JpdlExeDbTests.java
|
44cf6b1640c9589fdc335e474c658cdb258a06ea
|
[] |
no_license
|
sensui74/legacy-project
|
4502d094edbf8964f6bb9805be88f869bae8e588
|
ff8156ae963a5c61575ff34612c908c4ccfc219b
|
refs/heads/master
| 2020-03-17T06:28:16.650878
| 2016-01-08T03:46:00
| 2016-01-08T03:46:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,332
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jbpm.jpdl.exe;
import junit.framework.Test;
import junit.framework.TestSuite;
public class JpdlExeDbTests {
public static Test suite() {
TestSuite suite = new TestSuite("org.jbpm.jpdl.exe");
//$JUnit-BEGIN$
suite.addTestSuite(JoinDbTest.class);
//$JUnit-END$
return suite;
}
}
|
[
"wow_fei@163.com"
] |
wow_fei@163.com
|
3a0d73d21b7965686eec0031af39a2e70bd46866
|
13e434822fb83242af2d0e76c403eb9753cf9282
|
/log-persister/src/test/java/org/moten/david/log/persister/UtilTest.java
|
d37320ff614a1a7bfaedf23701bef1f5a0fda924
|
[] |
no_license
|
davidmoten/log-analysis
|
747cd3d73912eb68d57f9b8f1de92e6d941be4ff
|
771fedfd5e9315e49adef0bdd482882aa24299c1
|
refs/heads/master
| 2023-03-24T15:40:10.953762
| 2013-08-16T07:29:08
| 2013-08-16T07:29:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,350
|
java
|
package org.moten.david.log.persister;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.logging.Logger;
import org.junit.Test;
import com.google.common.collect.Sets;
public class UtilTest {
private static final Logger log = Logger
.getLogger(UtilTest.class.getName());
@Test
public void testGetLogsNoWildcardsRelativePath() {
List<File> files = Util
.getFilesFromPathWithRegexFilename("src/test/resources/test.log");
assertEquals("test.log", files.get(0).getName());
assertEquals(1, files.size());
}
@Test
public void testGetLogsNoWildcardsAbsolutePath() {
File file = new File("src/test/resources/test.log");
List<File> files = Util.getFilesFromPathWithRegexFilename(file
.getAbsolutePath());
Set<String> set = toSet(files);
assertTrue(set.contains("test.log"));
assertEquals(1, set.size());
}
@Test
public void testGetDirectoriesUsingRelativePath() {
List<File> list = Util
.getDirectories("src/test/resources/matching-test/**");
Set<String> set = toSet(list);
System.out.println(set);
assertTrue(set.contains("test1"));
assertTrue(set.contains("test2"));
assertEquals(7, set.size());
}
@Test
public void testGetDirectoriesUsingAbsolutePath() {
File file = new File("src/test/resources/matching-test/**");
List<File> list = Util.getDirectories(file.getAbsolutePath());
Set<String> set = toSet(list);
System.out.println(set);
assertTrue(set.contains("test1"));
assertTrue(set.contains("test2"));
assertEquals(7, set.size());
}
@Test
public void testStringContains() {
assertEquals(1, "abc".indexOf("bc"));
}
@Test
public void testGetMatchingFiles() {
List<File> files = Util
.getFilesFromPathWithRegexFilename("src/test/resources/test(2|3)\\.log");
Set<String> paths = Sets.newHashSet();
paths.add(files.get(0).getName());
paths.add(files.get(1).getName());
log.info("paths=" + paths);
assertTrue(paths.contains("test2.log"));
assertTrue(paths.contains("test3.log"));
assertEquals(2, files.size());
}
@Test
public void testGetMatchingFilesWithDirectoryWildcard() {
List<File> files = Util
.getFilesFromPathWithRegexFilename("src/test/resources/matching-test/**/.*\\.log");
Set<String> set = toSet(files);
assertEquals(7, set.size());
assertTrue(set.contains("a.log"));
assertTrue(set.contains("b.log"));
assertTrue(set.contains("c.log"));
assertTrue(set.contains("d.log"));
assertTrue(set.contains("e.log"));
assertTrue(set.contains("f.log"));
assertTrue(set.contains("g.log"));
}
@Test
public void testGetMatchingFilesWithDirectoryWildcardPrefixed() {
List<File> files = Util
.getFilesFromPathWithRegexFilename("src/test/resources/matching-test/test**/.*\\.log");
Set<String> set = toSet(files);
assertEquals(4, set.size());
assertTrue(set.contains("a.log"));
assertTrue(set.contains("b.log"));
assertTrue(set.contains("c.log"));
assertTrue(set.contains("d.log"));
}
@Test
public void testGetMatchingFilesWithDirectoryWildcardPrefixedWithFullDirectoryName() {
List<File> files = Util
.getFilesFromPathWithRegexFilename("src/test/resources/matching-test/test1**/.*\\.log");
Set<String> set = toSet(files);
assertEquals(2, set.size());
assertTrue(set.contains("a.log"));
assertTrue(set.contains("b.log"));
}
// TODO add unit tests for when directory wildcard is followed by another
// directory
// for example src/test/resources/matching-test-2/apps/**/logs/.*\\.log
private static Set<String> toSet(Collection<File> files) {
Set<String> set = Sets.newHashSet();
for (File file : files)
set.add(file.getName());
return set;
}
@Test
public void testGetPath() {
assertEquals("/src/test/resources/",
Util.getDirectory("/src/test/resources/a\\.[0-9]?\\.log"));
}
@Test
public void testGetFilename() {
assertEquals("a\\.[0-9]?\\.log",
Util.getFilename("/src/test/resources/a\\.[0-9]?\\.log"));
}
@Test
public void testParsePath() {
assertEquals("/ausdev/container/logs/cts/",
Util.getDirectory("/ausdev/container/logs/cts/cts.log.*"));
}
@Test
public void testParseFilename() {
assertEquals("cts.log.*",
Util.getFilename("/ausdev/container/logs/cts/cts.log.*"));
}
}
|
[
"davidmoten@gmail.com"
] |
davidmoten@gmail.com
|
554d9212df62999f101fefec271a630188d41d43
|
9665f5ffb9d7940cdacf074b9a047b2b431ba0ca
|
/app/src/main/java/me/weyye/todaynews/utils/MyDialog.java
|
7622c46c20b019c8743185be3e2b9d2b6de10dc1
|
[] |
no_license
|
guoxuliang/qfnews2
|
583a91985de74e4c4d2d04130b94eeeb831cad8b
|
4782c5ad79d2982a6d3a0027ee14f83a01021494
|
refs/heads/master
| 2020-03-07T02:45:46.880295
| 2018-03-29T00:58:09
| 2018-03-29T00:58:09
| 127,216,651
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 761
|
java
|
package me.weyye.todaynews.utils;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
/**
* @类名称: MyDialog
* @类描述: TODO(自定义Dialog)
* @作者 fengxian
* @日期 2013-9-6 下午1:20:44
*
*/
public class MyDialog extends Dialog {
Context context;
public MyDialog(Context context) {
super(context);
this.context = context;
}
public MyDialog(Context context, int theme) {
super(context, theme);
this.context = context;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
// this.setContentView(R.layout.addcase_sending_dialog);
}
}
|
[
"632977592@qq.com"
] |
632977592@qq.com
|
ba32cefbc9a7c0c34861ceb6b84d7895598c0ad9
|
876eaaf79ce68a3bd8df8f698fa79c0c6aa5ef63
|
/workspaces-itcast/template/ch11_prj/src/cn/gdcp/controller/UserController4.java
|
c0324ef41322311b0fc3386818807321bae44d89
|
[] |
no_license
|
lcz-sys/Java_prj
|
cb89207419aebfa6d7df43123a1ae536e0afaed1
|
ae4e112d6473af59d969932f2ad540a7db347461
|
refs/heads/master
| 2022-12-13T03:42:27.550388
| 2020-09-03T08:56:23
| 2020-09-03T08:56:23
| 292,516,809
| 1
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 815
|
java
|
package cn.gdcp.controller;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import cn.gdcp.po.User;
import cn.gdcp.vo.UserVo;
@Controller
public class UserController4 {
@RequestMapping(value="/toUserEdit")
public String toUserEdit() {
return "user_edit";
}
@RequestMapping(value = "/editUsers")
public String editUsers(UserVo userList) {
List<User> users = userList.getUsers();
for (User user : users) {
if (user.getId() != null) {
System.out.println("修改了id为" + user.getId() + "的用户名为" + user.getUsername());
}
}
return "success";
}
}
|
[
"212065370@qq.com"
] |
212065370@qq.com
|
fd2729af1ff51fd39387abb881025e2f60b206fc
|
905d5958f8ab6e5cc879b9599d9eae6d8ea2f8d7
|
/com/vencillio/rs2/entity/player/net/out/impl/SendGlobalSound.java
|
9ec651078629802fdc6f900de7ed4427999eb907
|
[] |
no_license
|
capohf/server
|
61d66d1d184b70b3dcca3a69b9ab8df8d1807cd0
|
91ef9383eed77e1cdf93ec16ce6c03f4371cf306
|
refs/heads/master
| 2021-01-22T19:53:56.330491
| 2017-03-16T23:41:11
| 2017-03-16T23:41:11
| 85,251,003
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,136
|
java
|
package com.vencillio.rs2.entity.player.net.out.impl;
import com.vencillio.core.network.StreamBuffer;
import com.vencillio.core.util.Utility;
import com.vencillio.rs2.entity.World;
import com.vencillio.rs2.entity.player.Player;
import com.vencillio.rs2.entity.player.net.Client;
import com.vencillio.rs2.entity.player.net.out.OutgoingPacket;
public class SendGlobalSound extends OutgoingPacket {
private final int id;
private final int type;
private final int delay;
public SendGlobalSound(int id, int type, int delay) {
super();
this.id = id;
this.type = type;
this.delay = delay;
}
@Override
public void execute(Client client) {
StreamBuffer.OutBuffer out = StreamBuffer.newOutBuffer(18);
out.writeHeader(client.getEncryptor(), getOpcode());
out.writeShort(id);
out.writeByte(type);
out.writeShort(delay);
for (Player player : World.getPlayers()) {
if (player != null) {
if (Utility.getExactDistance(client.getPlayer().getLocation(),
player.getLocation()) < 10) {
player.getClient().send(out.getBuffer());
}
}
}
}
@Override
public int getOpcode() {
return 174;
}
}
|
[
"tonyj7433@gmail.com"
] |
tonyj7433@gmail.com
|
52bf36c1481080db2604c17813df6496c4c99605
|
dd413e42aa6d67cc57898201831ebb104a9efdd4
|
/src/main/java/org/rapidpm/vaadin/nano/VaadinFlowResourceManager.java
|
c1ee5e3a7621e8fa7e4d493a35c6ca4e66e4e1f5
|
[
"Apache-2.0"
] |
permissive
|
Fork-World/flow-helloworld-maven-undertow
|
7fab7d178bdb58c28fc299e3e5eabc8acb4a1b27
|
46700255fe03d7330d91ae76884f29de25f918fc
|
refs/heads/master
| 2020-05-09T11:29:43.268116
| 2019-04-12T21:48:40
| 2019-04-12T21:48:40
| 181,082,654
| 0
| 0
|
Apache-2.0
| 2019-04-12T21:14:52
| 2019-04-12T20:58:51
|
Java
|
UTF-8
|
Java
| false
| false
| 2,297
|
java
|
package org.rapidpm.vaadin.nano;
import java.io.IOException;
import java.net.URL;
import io.undertow.UndertowMessages;
import io.undertow.server.handlers.resource.Resource;
import io.undertow.server.handlers.resource.ResourceChangeListener;
import io.undertow.server.handlers.resource.ResourceManager;
import io.undertow.server.handlers.resource.URLResource;
public class VaadinFlowResourceManager implements ResourceManager {
/**
* The class loader that is used to load resources
*/
private final ClassLoader classLoader;
/**
* The prefix that is appended to resources that are to be loaded.
*/
private final String prefix;
public VaadinFlowResourceManager(final ClassLoader loader , final Package p) {
this(loader , p.getName().replace("." , "/"));
}
public VaadinFlowResourceManager(final ClassLoader classLoader , final String prefix) {
this.classLoader = classLoader;
if (prefix.isEmpty()) {
this.prefix = "";
} else if (prefix.endsWith("/")) {
this.prefix = prefix;
} else {
this.prefix = prefix + "/";
}
}
public VaadinFlowResourceManager(final ClassLoader classLoader) {
this(classLoader , "");
}
@Override
public Resource getResource(final String path) throws IOException {
String modPath = path;
if (modPath.startsWith("/")) {
modPath = path.substring(1);
}
if (modPath.startsWith("webjars")) {
modPath = "META-INF/resources/" + modPath;
}
if (modPath.startsWith("VAADIN/static/client")) {
modPath = "META-INF/resources/" + modPath;
}
final String realPath = prefix + modPath;
final URL resource = classLoader.getResource(realPath);
if (resource == null) {
return null;
} else {
return new URLResource(resource , path);
}
}
@Override
public boolean isResourceChangeListenerSupported() {
return false;
}
@Override
public void registerResourceChangeListener(ResourceChangeListener listener) {
throw UndertowMessages.MESSAGES.resourceChangeListenerNotSupported();
}
@Override
public void removeResourceChangeListener(ResourceChangeListener listener) {
throw UndertowMessages.MESSAGES.resourceChangeListenerNotSupported();
}
@Override
public void close() throws IOException {
}
}
|
[
"sven.ruppert@gmail.com"
] |
sven.ruppert@gmail.com
|
966bcbe0dd293fe82a20d9172699685b04cdc274
|
413a584d7123872cc04b2d1bb1141310cefa7b48
|
/gradebook/service/hibernate/src/java/org/sakaiproject/tool/gradebook/PassNotPassMapping.java
|
7b95598149e7fe65776a6d445b19f82cede7b716
|
[
"ECL-1.0",
"Apache-2.0"
] |
permissive
|
etudes-inc/etudes-lms
|
31bc2b187cafc629c8b2b61be92aa16bb78aca99
|
38a938e2c74d86fc3013642b05914068a3a67af3
|
refs/heads/master
| 2020-06-03T13:49:45.997041
| 2017-10-25T21:25:58
| 2017-10-25T21:25:58
| 94,132,665
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,240
|
java
|
/**********************************************************************************
*
* $Id: PassNotPassMapping.java 5185 2013-06-13 17:54:57Z mallikamt $
*
***********************************************************************************
*
* Copyright (c) 2005 The Regents of the University of California, The MIT Corporation
*
* Licensed under the Educational Community License Version 1.0 (the "License");
* By obtaining, using and/or copying this Original Work, you agree that you have read,
* understand, and will comply with the terms and conditions of the Educational Community License.
* You may obtain a copy of the License at:
*
* http:cvs.sakaiproject.org/licenses/license_1_0.html
*
* 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 org.sakaiproject.tool.gradebook;
import java.util.*;
/**
* A PassNotPassMapping defines the set of grades available to a
* gradebook as "P", "NP", each of which can be mapped to a minimum percentage
* value.
*
* @deprecated
*/
public class PassNotPassMapping extends GradeMapping {
private List grades;
private List defaultValues;
public Collection getGrades() {
return grades;
}
public List getDefaultValues() {
return defaultValues;
}
public PassNotPassMapping() {
setGradeMap(new LinkedHashMap());
grades = new ArrayList();
grades.add("P");
grades.add("NP");
grades.add("I");
defaultValues = new ArrayList();
defaultValues.add(new Double(75));
defaultValues.add(new Double(0));
defaultValues.add(new Double(0));
}
/**
* @see org.sakaiproject.tool.gradebook.GradeMapping#getName()
*/
public String getName() {
return "Pass / Not Pass";
}
}
|
[
"ggolden@etudes.org"
] |
ggolden@etudes.org
|
e2a30c6d888c45c6aadbba3ee1a8cf0ffe02fa3e
|
4fbe6f1e53152c851608994358fa4ddd92d1f883
|
/mlert/android/com.wizzer.mle.runtime.unittest/src/com/wizzer/mle/runtime/unittest/PQTest.java
|
a22e97dd688bfa0332f8894852307eae2d749005
|
[
"MIT"
] |
permissive
|
magic-lantern-studio/mle-core-mlert
|
f362fd5d64e21893156301db772456c246420af2
|
e874535a3871e8d791e41b7836a9d11665035966
|
refs/heads/master
| 2022-12-21T11:21:11.137220
| 2022-12-11T23:44:33
| 2022-12-11T23:44:33
| 128,475,217
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,343
|
java
|
/*
* PQTest.java
* Created on Dec 9, 2004
*/
// COPYRIGHT_BEGIN
//
// Copyright (C) 2000-2007 Wizzer Works
//
// Wizzer Works makes available all content in this file ("Content").
// Unless otherwise indicated below, the Content is provided to you
// under the terms and conditions of the Common Public License Version 1.0
// ("CPL"). A copy of the CPL is available at
//
// http://opensource.org/licenses/cpl1.0.php
//
// For purposes of the CPL, "Program" will mean the Content.
//
// For information concerning this Makefile, contact Mark S. Millard,
// of Wizzer Works at msm@wizzerworks.com.
//
// More information concerning Wizzer Works may be found at
//
// http://www.wizzerworks.com
//
// COPYRIGHT_END
// Declare package.
package com.wizzer.mle.runtime.unittest;
// Import JUnit classes.
import junit.framework.TestCase;
//Import Android classes.
import android.util.Log;
// Import Magic Lantern classes.
import com.wizzer.mle.runtime.MleTitle;
import com.wizzer.mle.runtime.util.IMleElement;
import com.wizzer.mle.runtime.util.MleElementArray;
import com.wizzer.mle.runtime.util.MlePQ;
import com.wizzer.mle.runtime.util.MlePQElement;
/**
* This class is a unit test for com.wizzer.mle.runtime.util.MlePQ.
*
* @author Mark S. Millard
*/
public class PQTest extends TestCase
{
/**
* Set up the test case.
*
* @see TestCase#setUp()
*/
protected void setUp() throws Exception
{
super.setUp();
}
/**
* Tear down the test case.
*
* @see TestCase#tearDown()
*/
protected void tearDown() throws Exception
{
super.tearDown();
}
/**
* Constructor for PQTest.
*
* @param name The name of the unit test.
*/
public PQTest(String name)
{
super(name);
}
/**
* Test element insertion/removal.
*/
public void testInsertionRemoval()
{
MlePQ pq = new MlePQ(10);
Log.i(MleTitle.DEBUG_TAG,"Test 1: Simple Test");
//System.out.println("Expected / Received");
pq.addElement(new MlePQElement(3,null));
IMleElement n3 = pq.getMaxElement();
//System.out.println("3 /" + n3);
TestCase.assertEquals(new Integer(3).toString(),n3.toString());
pq.addElement(new MlePQElement(5,null));
pq.addElement(new MlePQElement(2,null));
MlePQElement n5 = (MlePQElement)pq.getMaxElement();
//System.out.println("5 / " + n5);
TestCase.assertEquals(new Integer(5).toString(),n5.toString());
MlePQElement n2 = (MlePQElement)pq.getMaxElement();
//System.out.println("2 / " + n2);
TestCase.assertEquals(new Integer(2).toString(),n2.toString());
pq.addElement(new MlePQElement(4,null));
pq.addElement(new MlePQElement(7,null));
//System.out.println("7 / " + pq.getMaxElement());
//System.out.println("4 / " + pq.getMaxElement());
MlePQElement n7 = (MlePQElement)pq.getMaxElement();
MlePQElement n4 = (MlePQElement)pq.getMaxElement();
TestCase.assertEquals(new Integer(7).toString(),n7.toString());
TestCase.assertEquals(new Integer(4).toString(),n4.toString());
}
/**
* Test queue growth.
*/
public void testQueueGrowth()
{
MlePQ pq = new MlePQ(MleElementArray.MLE_INC_QSIZE);
Log.i(MleTitle.DEBUG_TAG,"Test 2: Queue Growth");
//System.out.println("Expected / Received");
for (int i = 0; i < MleElementArray.MLE_INC_QSIZE; i++)
{
pq.addElement(new MlePQElement(i,null));
}
pq.addElement(new MlePQElement(MleElementArray.MLE_INC_QSIZE,null));
for (int i = MleElementArray.MLE_INC_QSIZE; i >= 0; i--)
{
IMleElement element = pq.getMaxElement();
//System.out.println(i + " / " + element.toString());
TestCase.assertEquals(new Integer(i).toString(),element.toString());
}
}
/**
* Test the clear() method.
*/
public void testClear()
{
MlePQ pq = new MlePQ(MleElementArray.MLE_INC_QSIZE);
Log.i(MleTitle.DEBUG_TAG,"Test 3: Clear Queue");
//System.out.println("Expected / Received");
for (int i = 0; i < MleElementArray.MLE_INC_QSIZE; i++)
{
pq.addElement(new MlePQElement(i,null));
}
pq.clear();
TestCase.assertEquals(0,pq.getNumElements());
}
/**
* Test the destroyItem() method.
*/
public void testDestroyItem()
{
MlePQ pq = new MlePQ(MleElementArray.MLE_INC_QSIZE);
Log.i(MleTitle.DEBUG_TAG,"Test 4: Destroy Item");
//System.out.println("Expected / Received");
for (int i = 0; i < MleElementArray.MLE_INC_QSIZE; i++)
{
pq.addElement(new MlePQElement(i,null));
}
pq.destroyItem(pq.findItem(10));
pq.destroyItem(pq.findItem(20));
pq.destroyItem(pq.findItem(30));
pq.destroyItem(pq.findItem(40));
TestCase.assertEquals(60,pq.getNumElements());
int k = pq.findItem(10);
TestCase.assertEquals(-1,k);
k = pq.findItem(20);
TestCase.assertEquals(-1,k);
k = pq.findItem(30);
TestCase.assertEquals(-1,k);
k = pq.findItem(40);
TestCase.assertEquals(-1,k);
}
/**
* Test the remove() methods.
*/
public void testRemove()
{
MlePQ pq = new MlePQ(10);
Log.i(MleTitle.DEBUG_TAG,"Test 5: Remove Item.");
for (int i = 0; i < 10; i++)
pq.insert(new MlePQElement(i,null));
pq.insert(new MlePQElement(5,null));
pq.insert(new MlePQElement(5,null));
pq.insert(new MlePQElement(5,null));
pq.insert(new MlePQElement(5,null));
IMleElement element = pq.remove();
TestCase.assertEquals(new Integer(9).toString(),element.toString());
IMleElement[] elements = pq.remove(5);
for (int i = 0; i < 5; i++)
TestCase.assertEquals(new Integer(5).toString(),elements[i].toString());
}
/**
* Test the join() method.
*/
public void testJoin()
{
MlePQ pq1 = new MlePQ();
MlePQ pq2 = new MlePQ();
MlePQ result;
Log.i(MleTitle.DEBUG_TAG,"Test 5: Join Queues.");
for (int i = 0; i < 10; i++)
{
pq1.insert(new MlePQElement(i,null));
pq2.insert(new MlePQElement(i+25,null));
}
result = MlePQ.join(pq1,pq2);
IMleElement element = result.remove();
TestCase.assertEquals(new Integer(34).toString(),element.toString());
}
/**
* Test the changeItem() method.
*/
public void testChangeItem()
{
MlePQ pq = new MlePQ(10);
Log.i(MleTitle.DEBUG_TAG,"Test 6: Change Item.");
for (int i = 0; i < 10; i++)
pq.insert(new MlePQElement(i,null));
pq.changeItem(pq.findItem(5),56);
IMleElement element = pq.remove();
TestCase.assertEquals(new Integer(56).toString(),element.toString());
}
/**
* Test the destroy() methods.
*/
public void testDestroy()
{
MlePQ pq = new MlePQ(10);
Log.i(MleTitle.DEBUG_TAG,"Test 7: Destroy Item.");
for (int i = 0; i < 10; i++)
pq.insert(new MlePQElement(i,null));
// Destroy item with priority 5.
pq.destroy(5);
int k = pq.findItem(5);
TestCase.assertEquals(-1,k);
// Destroy the top 3 priority items.
pq.destroy();
pq.destroy();
pq.destroy();
IMleElement element = pq.remove();
TestCase.assertEquals(new Integer(6).toString(),element.toString());
}
}
|
[
"msm@wizzerworks.com"
] |
msm@wizzerworks.com
|
711b9626bcb440acd0f7fa4adac622e6f2b8296c
|
8229884a9bd15286a34cbd2e7b4624ee158be378
|
/app/src/k4/java/com.mili.smarthome.tkj/base/K4BaseFragment.java
|
3ca453b937cc3026f2451ca16a08cda151bd1383
|
[] |
no_license
|
chengcdev/smarthome
|
5ae58bc0ba8770598f83a36355b557c46f37b90c
|
4edb33dcdfcab39a3bc6e5342a7973ac703f1344
|
refs/heads/master
| 2022-12-03T18:04:39.172431
| 2020-08-20T05:22:57
| 2020-08-20T05:22:57
| 288,909,136
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,953
|
java
|
package com.mili.smarthome.tkj.base;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import com.mili.smarthome.tkj.call.CallMonitorBean;
import com.mili.smarthome.tkj.main.activity.MainActivity;
import com.mili.smarthome.tkj.utils.LogUtils;
import com.mili.smarthome.tkj.widget.InputView;
public abstract class K4BaseFragment extends BaseFragment implements KeyboardCtrl.IKeyboardListener {
public static final int MSG_MAIN_HINT = 1;
public static final int MSG_CALL_HINT = 2;
public static final int MSG_TIME_HINT = 3;
public static final int MSG_REQUEST_EXIT = 4;
public static final int MSG_SET_OK = 5;
public static final int MSG_SET_ERROR = 6;
public static final int MSG_SET_SHOW = 7;
private KeyboardCtrl keyboardCtrl;
private FragmentProxy.FragmentListener mFragmentListener;
@Override
protected void bindData() {
super.bindData();
KeyboardProxy.getInstance().addKeyboardListener(this);
keyboardCtrl = KeyboardProxy.getInstance().getKeyboard();
mFragmentListener = FragmentProxy.getInstance().getFragmentListener();
}
// @Override
// public void onResume() {
// super.onResume();
// KeyboardProxy.getInstance().addKeyboardListener(this);
// keyboardCtrl = KeyboardProxy.getInstance().getKeyboard();
// mFragmentListener = FragmentProxy.getInstance().getFragmentListener();
// }
@Override
public void onPause() {
super.onPause();
KeyboardProxy.getInstance().removeKeyboardListener(this);
mMainHandler.removeCallbacksAndMessages(0);
}
/**
* 退出fragment
*/
public void exitFragment() {
if (mFragmentListener != null) {
mFragmentListener.onExitFragment();
}
}
public void setFragmentClickable(boolean clickable) {
if (mFragmentListener != null) {
mFragmentListener.setClickable(clickable);
}
}
/**
* 控制主activity的控件点击状态
* @param mode 0-功能键和键盘 1-功能键
* @param clickable 是否可以点击
*/
public void setMainClickable(int mode, boolean clickable) {
FragmentActivity activity = getActivity();
if (activity != null) {
MainActivity mainActivity = (MainActivity) activity;
if (mode == 0) {
mainActivity.setMainEnable(clickable);
} else if (mode == 1){
mainActivity.setRadioButtonEnable(clickable);
}
}
}
/**
* 呼叫或通话时刷卡等提示处理
* @param action 动作类型
* @param roomNo 房号
*/
public void actionCallback(String action, String roomNo) {
}
/**
* 呼叫住户和呼叫中心界面,处理开锁和监视功能
* @param callMonitorBean 呼叫监视参数
*/
public void onMonitor(CallMonitorBean callMonitorBean) {
}
public void setKeboardListener() {
KeyboardProxy.getInstance().addKeyboardListener(this);
}
@Override
public boolean onKeyCancel() {
return false;
}
@Override
public boolean onKeyConfirm() {
return false;
}
@Override
public boolean onKey(int code) {
return false;
}
@Override
public boolean onKeyText(String text) {
return false;
}
@Override
public boolean onTextChanged(String text) {
return false;
}
protected void setKeyboardMaxlen(int len) {
if (keyboardCtrl != null) {
keyboardCtrl.setTextMaxLen(len);
} else {
LogUtils.e(" keyboard is null. ");
}
}
/**
* 设置键盘当前文本内容
* @param text 键盘内容
*/
protected void setKeyboardText(String text) {
if (keyboardCtrl != null) {
keyboardCtrl.setText(text);
}
}
/**
* 设置键盘模式
* @param mode 键盘模式, 参考KeyboardCtrl.KEYMODE_PASSWORD
*/
protected void setKeyboardMode(int mode) {
if (keyboardCtrl != null) {
keyboardCtrl.setMode(mode);
}
}
/**
* 动态键盘
*/
protected void shuffleKeyboard() {
if (keyboardCtrl != null) {
keyboardCtrl.shuffleKeyboard();
}
}
/**
* 恢复默认键盘
*/
protected void resetKeyboard() {
if (keyboardCtrl != null) {
keyboardCtrl.resetKeyboard();
}
}
/**
* 编辑框退格
*/
protected void backspaceExit() {
View root = getView();
if (root != null) {
View focus = root.findFocus();
if (focus instanceof InputView) {
InputView iptView = (InputView) focus;
if (iptView.backspace())
return;
}
}
exitFragment();
}
}
|
[
"1508592785@qq.com"
] |
1508592785@qq.com
|
6f187e0180052ce2959d4e15dfa9176db491ad47
|
6661ff2b2b2ff4dc1dd99922b5c16d4298b808bb
|
/src/org/osdg/ajs/tests/socket/rcvmsg/RecMsg.java
|
121ae40785cb3145f96d90498ede255134db7ada
|
[] |
no_license
|
osdg/ajs
|
1f66e7e1192e2ec9bc1d8299f401e9c3d61e494c
|
d61c5947c09708aae050926d40d7311e399f238a
|
refs/heads/master
| 2021-01-02T09:01:48.385100
| 2015-09-13T00:20:42
| 2015-09-13T00:20:42
| 42,295,084
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 610
|
java
|
package org.osdg.ajs.tests.socket.rcvmsg;
import org.osdg.ajs.socket.AjsServer;
import java.io.IOException;
import java.util.concurrent.ExecutionException;
/**
* Created by plter on 9/11/15.
*/
public class RecMsg {
public static void main(String[] args){
AjsServer server = new AjsServer(8000);
server.getFilterChain().addFilter(new Handler());
try {
System.out.println("Server will start at port 8000");
server.start();
} catch (IOException | ExecutionException | InterruptedException e) {
e.printStackTrace();
}
}
}
|
[
"xtiqin@163.com"
] |
xtiqin@163.com
|
445f58c2ec679f6532bb9df68c3a84c54312de31
|
21a471406f141943d541077dbb03a35200d9a0d1
|
/spring-stress/src/main/java/com/clemble/test/spring/cleaners/context/CleanerContext.java
|
40daaf8bb9987e3d677f720d0957ad563027b98d
|
[
"Apache-2.0"
] |
permissive
|
jalona/clemble-test
|
616604bcfb379a4e16e68aa3936b4ddcf2db3d20
|
45006379e0e6c0ae46db853dd0ecadbcb04bbdc9
|
refs/heads/master
| 2021-01-17T08:00:26.188207
| 2015-03-06T08:13:48
| 2015-03-06T08:13:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,019
|
java
|
package com.clemble.test.spring.cleaners.context;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import com.clemble.test.spring.cleaners.Cleanable;
import com.clemble.test.spring.cleaners.CleanableFactory;
public class CleanerContext {
private BlockingQueue<Cleanable> cleanableObjects = new LinkedBlockingQueue<Cleanable>();
public boolean contains(Object value) {
return cleanableObjects.contains(value);
}
public void add(Object cleanableInstance) {
// Step 0. Sanity check
if (cleanableInstance == null)
return;
// Step 1. Converting to cleanable
Cleanable convertedCleanable = CleanableFactory.toCleanable(cleanableInstance);
if (convertedCleanable == null)
return;
cleanableObjects.add(convertedCleanable);
}
public void clean() {
Cleanable processed = null;
while ((processed = cleanableObjects.poll()) != null) {
try {
processed.clean();
} catch (Throwable throwable) {
throwable.printStackTrace();
}
}
}
}
|
[
"mavarazy@gmail.com"
] |
mavarazy@gmail.com
|
f0f1f818b976a4735a290dc42514e5490de14561
|
b89d6fdfca0fbd67ec966adb96fa424a46d6281e
|
/src/structural_patterns/facade_pattern/model/SubSystemOne.java
|
dd48356487bcfac4ee7290155b1d51f6189f52ae
|
[] |
no_license
|
GeniusDSY/DesignPatterns
|
6dbd0a9dcb6aa3d76038f33e7425a419f8b4efda
|
679de181200d9de9a00a27ecb34c846276e9f417
|
refs/heads/master
| 2020-04-29T23:03:44.597880
| 2019-04-10T15:00:05
| 2019-04-10T15:00:05
| 176,466,068
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 244
|
java
|
package structural_patterns.facade_pattern.model;
/**
* @author :DengSiYuan
* @date :2019/3/26 9:59
* @desc : 子系统1
*/
public class SubSystemOne {
public void methodOne(){
System.out.println("子系统方法1");
}
}
|
[
"genius_dsy@foxmail.com"
] |
genius_dsy@foxmail.com
|
2446326e4fab49992fbf0523b14f8058acf905c6
|
8540ade77520bfe490b3e748969abb967995ba80
|
/MyJavaFX/src/chapter14/Exercise_14_21.java
|
0f02e85671b651801096ef5839adcbf37529880b
|
[] |
no_license
|
mariamiawad/JavaExercises
|
c0c9ead7c0e4dab8e12eef2a4ddc1774920a82e4
|
aac4c5c34c936bb24b11159a7baa9006b1393f73
|
refs/heads/master
| 2023-08-06T07:42:30.613631
| 2021-09-26T17:16:43
| 2021-09-26T17:16:43
| 193,220,093
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,616
|
java
|
package chapter14;
import java.util.Random;
import java.util.concurrent.ThreadLocalRandom;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Line;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class Exercise_14_21 extends Application {
private Text txtPoint;
private Line line;
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
Circle circle1 = new Circle(15);
Circle circle2 = new Circle(15);
Pane pane = new Pane();
Scene scene = new Scene(pane, 300, 400);
primaryStage.setScene(scene);
int x = ThreadLocalRandom.current().nextInt(1, 41);
int y = ThreadLocalRandom.current().nextInt(1, 41);
int x2 =ThreadLocalRandom.current().nextInt(41, 121);
int y2 = ThreadLocalRandom.current().nextInt(41, 126);
circle1.setCenterX(x);
circle1.setCenterY(y);
circle2.setCenterX(x2);
circle2.setCenterY(y2);
line = new Line(x+7, y+7, x2-7, y2-7);
txtPoint = new Text();
updateText();
pane.getChildren().addAll(circle1, circle2,line, txtPoint);
primaryStage.show();
}
private void updateText() {
txtPoint.setX((line.getStartX() + line.getEndX()) / 2);
txtPoint.setY((line.getStartY() + line.getEndY())/ 2);
txtPoint.setText(String.format("%.2f", distance(line.getStartX(), line.getEndX(), line.getStartY(), line.getEndY())));
}
public double distance(double x1, double y1, double x2, double y2) {
return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
}
}
|
[
"mariam.i.awad@gmail.com"
] |
mariam.i.awad@gmail.com
|
ad199ecab9acd73a7e6d46b6f70d675a8a77bd2b
|
b81d1df0562de9d4ff5c30bec90647402972f478
|
/src/test/java/pl/pancordev/leak/eight/three/DummyControllerTest3.java
|
50301c5d8cf8d78afb72be494a0a230a5473032e
|
[] |
no_license
|
Pancor/leak
|
eea9fe401a7c9b543bf95a929f0bbf7ee6113dc9
|
f060ff6a1a8c829b287cffb35b9d63040ca3c7ec
|
refs/heads/master
| 2023-01-30T17:14:38.463089
| 2020-12-14T12:01:00
| 2020-12-14T12:01:00
| 321,322,490
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,970
|
java
|
package pl.pancordev.leak.eight.three;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import pl.pancordev.leak.services.Service3;
import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.springSecurity;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@SpringBootTest
@WebAppConfiguration
@RunWith(SpringRunner.class)
public class DummyControllerTest3 {
@Autowired
private WebApplicationContext webApplicationContext;
@MockBean
private Service3 service3;
private MockMvc mvc;
@Before
public void setUp() {
mvc = MockMvcBuilders.webAppContextSetup(webApplicationContext)
.defaultRequest(delete("/").contentType(MediaType.APPLICATION_JSON))
.alwaysDo(print())
.apply(springSecurity())
.build();
}
@Test
public void shouldReturnProperResponseFromIndexPage() throws Exception {
mvc.perform(delete("/"))
.andExpect(status().isOk())
.andExpect(content().string("It's dummy response from server"));
}
}
|
[
"pancordev@gmail.com"
] |
pancordev@gmail.com
|
3ae0ec0cc09f1fcaf455bc4a65b01ff2fc9df730
|
ea3ca859c0abaa38a385df2b123a15f99f1a1145
|
/src/main/java/com/leetcode/_154_FindMinimumInRotatedSortedArrayII.java
|
78e1e823de803e02733a0f12e2df4f74e1e94b64
|
[] |
no_license
|
Maecenas/LeetCode
|
191f12eb2f653352ca8fd58ded56631a97713ac5
|
1ea1b037b847b20cbbf021318bd42b61cb0cad9d
|
refs/heads/main
| 2022-10-10T07:17:57.902671
| 2022-09-26T22:21:13
| 2022-09-26T22:21:13
| 185,592,499
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,547
|
java
|
package com.leetcode;
/*
https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/
Hard. Array, Binary Search.
Suppose an array sorted in ascending order is rotated at some pivot
unknown to you beforehand.
(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).
Find the minimum element.
The array may contain duplicates.
Example 1:
Input: [1,3,5]
Output: 1
Example 2:
Input: [2,2,2,0,1]
Output: 0
Note:
This is a follow up problem to Find Minimum in Rotated Sorted Array.
Would allow duplicates affect the run-time complexity? How and why?
*/
/**
* @see _153_FindMinimumInRotatedSortedArray
* @see _33_SearchInRotatedSortedArray
* @see _81_SearchInRotatedSortedArrayII
*/
class _154_FindMinimumInRotatedSortedArrayII {
public static int findMin(int[] nums) {
if (nums == null || nums.length == 0) return Integer.MIN_VALUE;
else if (nums.length == 1) return nums[0];
int lo = 0, hi = nums.length - 1, mid;
while (lo <= hi) {
mid = lo + ((hi - lo) >> 1);
if (nums[lo] == nums[mid] && nums[mid] == nums[hi]) {
// Switch to O(n) sequential search
for (int i = lo; i < hi; i++) {
if (nums[i] > nums[i + 1]) {
return nums[i + 1];
}
}
return nums[lo];
} else if (nums[mid] <= nums[hi]) {
hi = mid;
} else {
lo = mid + 1;
}
}
return nums[lo];
}
}
|
[
"lx70716@gmail.com"
] |
lx70716@gmail.com
|
3681ff1bcc2bca8244d4c304d8a348bffa327f0a
|
fe5d86481efdfe242d90398ecb98986286d55e17
|
/data/search/APIzator15052349.java
|
f2748149ee1955dfe659dac902c3292329f8eb9d
|
[
"CC-BY-4.0"
] |
permissive
|
pasqualesalza/apization
|
0923a438ac3b963d6efa8d779cce614e04bc0193
|
941ae03b2a9177875d00feec651dd27e7bdd5e29
|
refs/heads/main
| 2022-07-30T04:33:10.078103
| 2021-08-23T14:08:35
| 2021-08-23T14:08:35
| 399,110,560
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 451
|
java
|
package com.stackoverflow.api;
/**
* Formatting Java Output Like a Table
*
* @author APIzator
* @see <a href="https://stackoverflow.com/a/15052349">https://stackoverflow.com/a/15052349</a>
*/
public class APIzator15052349 {
public static void formatOutput() throws Exception {
System.out.format(
"%10s%15s%15s%15s%20s",
"Grade",
"Last Name",
"First Name",
"Student Number",
"Parent Email"
);
}
}
|
[
"pasquale.salza@gmail.com"
] |
pasquale.salza@gmail.com
|
17637eeb41e5f6d1985aa2dcf89b94847236bcfc
|
02a087e8de0a7d0cfed9dba60e8cff5be4ae3be1
|
/Research_Bucket/Completed_Archived/ConcolicProcess/oracles/Bellon/bellon_benchmark/sourcecode/eclipse-jdtcore/src/internal/core/index/impl/IndexInput.java
|
8a80967bf7b2b7ed9036a90acc6e3dda0be78d14
|
[] |
no_license
|
dan7800/Research
|
7baf8d5afda9824dc5a53f55c3e73f9734e61d46
|
f68ea72c599f74e88dd44d85503cc672474ec12a
|
refs/heads/master
| 2021-01-23T09:50:47.744309
| 2018-09-01T14:56:01
| 2018-09-01T14:56:01
| 32,521,867
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,718
|
java
|
package org.eclipse.jdt.internal.core.index.impl;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.io.*;
import org.eclipse.jdt.internal.core.index.*;
/**
* This class provides an input on an index, after it has been generated.<br>
* You can access all the files of an index via getNextFile(), getCurrentFile()
* and moveToNextFile() (idem for the word entries). <br>
* The usage is the same for every subclass: creation (constructor), opening
* (the open() method), usage, and closing (the close() method), to release the
* data source used by this input.
*/
public abstract class IndexInput {
protected int filePosition;
protected WordEntry currentWordEntry;
protected int wordPosition;
public IndexInput() {
super();
wordPosition= 1;
filePosition= 1; }
/**
* clears the cache of this indexInput, if it keeps track of the information already read.
*/
public abstract void clearCache();
/**
* Closes the IndexInput. For example, if the input is on a RandomAccessFile,
* it calls the close() method of RandomAccessFile.
*/
public abstract void close() throws IOException;
/**
* Returns the current file the indexInput is pointing to in the index.
*/
public abstract IndexedFile getCurrentFile() throws IOException;
/**
* Returns the current file the indexInput is pointing to in the index.
*/
public WordEntry getCurrentWordEntry() throws IOException {
if (!hasMoreWords())
return null;
return currentWordEntry; }
/**
* Returns the position of the current file the input is pointing to in the index.
*/
public int getFilePosition() {
return filePosition; }
/**
* Returns the indexedFile corresponding to the given document number in the index the input
* reads in, or null if such indexedFile does not exist.
*/
public abstract IndexedFile getIndexedFile(int fileNum) throws IOException;
/**
* Returns the indexedFile corresponding to the given document in the index the input
* reads in (e.g. the indexedFile with the same path in this index), or null if such
* indexedFile does not exist.
*/
public abstract IndexedFile getIndexedFile(IDocument document) throws IOException;
/**
* Returns the number of files in the index.
*/
public abstract int getNumFiles();
/**
* Returns the number of unique words in the index.
*/
public abstract int getNumWords();
/**
* Returns the Object the input is reading from. It can be an IIndex,
* a File, ...
*/
public abstract Object getSource();
/**
* Returns true if the input has not reached the end of the index for the files.
*/
public boolean hasMoreFiles() {
return getFilePosition() <= getNumFiles(); }
/**
* Returns true if the input has not reached the end of the index for the files.
*/
public boolean hasMoreWords() {
return wordPosition <= getNumWords(); }
/**
* Moves the pointer on the current file to the next file in the index.
*/
public abstract void moveToNextFile() throws IOException;
/**
* Moves the pointer on the current word to the next file in the index.
*/
public abstract void moveToNextWordEntry() throws IOException;
/**
* Open the Source where the input gets the information from.
*/
public abstract void open() throws IOException;
/**
* Returns the list of the files containing the given word in the index.
*/
public abstract IQueryResult[] query(String word) throws IOException;
public abstract IEntryResult[] queryEntriesPrefixedBy(char[] prefix /*, boolean isCaseSensitive*/) throws IOException;
public abstract IQueryResult[] queryFilesReferringToPrefix(char[] prefix) throws IOException;
/**
* Returns the list of the files whose name contain the given word in the index.
*/
public abstract IQueryResult[] queryInDocumentNames(String word) throws IOException;
/**
* Set the pointer on the current file to the first file of the index.
*/
protected abstract void setFirstFile() throws IOException;
/**
* Set the pointer on the current word to the first word of the index.
*/
protected abstract void setFirstWord() throws IOException; }
|
[
"dxkvse@rit.edu"
] |
dxkvse@rit.edu
|
4c6b5f820e8ed9984e373469e9c864326b94eaec
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/11/11_d9b8e693deea70096cec7eda2727ea8dd093352f/ModuleIdentifier/11_d9b8e693deea70096cec7eda2727ea8dd093352f_ModuleIdentifier_s.java
|
70dbf866e1e1a6832d6cf88fbbf4048c3f7a99a3
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,991
|
java
|
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.modules;
import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
/**
* @author <a href="mailto:jbailey@redhat.com">John Bailey</a>
* @author <a href="mailto:david.lloyd@redhat.com">David M. Lloyd</a>
*/
public final class ModuleIdentifier implements Serializable {
private static final long serialVersionUID = 118533026624827995L;
private final String group;
private final String artifact;
private final String version;
public ModuleIdentifier(final String group, final String artifact, final String version) {
if (group == null) {
throw new IllegalArgumentException("group is null");
}
if (artifact == null) {
throw new IllegalArgumentException("artifact is null");
}
this.group = group;
this.artifact = artifact;
this.version = version;
}
public String getGroup() {
return group;
}
public String getArtifact() {
return artifact;
}
public String getVersion() {
return version;
}
public boolean hasVersion() {
return version != null;
}
@Override
public boolean equals(final Object o) {
return o instanceof ModuleIdentifier && equals((ModuleIdentifier) o);
}
public boolean equals(final ModuleIdentifier o) {
return this == o || o != null && group.equals(o.group) && artifact.equals(o.artifact) && version.equals(o.version);
}
@Override
public int hashCode() {
int result = group.hashCode();
result = 31 * result + artifact.hashCode();
result = 31 * result + (version != null ? version.hashCode() : 0);
return result;
}
@Override
public String toString() {
if (version == null) {
return String.format("module:%s:%s", group, artifact);
} else {
return String.format("module:%s:%s:%s", group, artifact, version);
}
}
public static ModuleIdentifier fromURL(URL url) throws MalformedURLException {
if (url.getAuthority() != null) {
throw new MalformedURLException("Modules cannot have an authority part");
}
final String moduleRootSpec = url.getFile();
final int si = moduleRootSpec.indexOf('/');
final String moduleSpec;
if (si == -1) {
moduleSpec = moduleRootSpec;
} else {
moduleSpec = moduleRootSpec.substring(0, si);
}
if (moduleSpec.length() == 0) {
throw new MalformedURLException("Empty module URL");
}
final int c1 = moduleSpec.indexOf(':');
if (c1 == -1) {
throw new MalformedURLException("Module URL requires a group ID");
}
final int c2 = moduleSpec.indexOf(':', c1 + 1);
if (c2 == -1) {
return new ModuleIdentifier(moduleSpec.substring(0, c1), moduleSpec.substring(c1 + 1), null);
}
final int c3 = moduleSpec.indexOf(':', c2 + 1);
return new ModuleIdentifier(moduleSpec.substring(0, c1), moduleSpec.substring(c1 + 1, c2), c3 == -1 ? moduleSpec.substring(c2 + 1) : moduleSpec.substring(c2 + 1, c3));
}
public static ModuleIdentifier fromURI(URI uri) throws URISyntaxException {
final String scheme = uri.getScheme();
if (scheme == null || ! scheme.equals("module")) {
throw new URISyntaxException(uri.toString(), "Module URIs must start with \"module:\"");
}
if (uri.getAuthority() != null) {
throw new URISyntaxException(uri.toString(), "Modules cannot have an authority part");
}
final String moduleFullSpec = uri.getSchemeSpecificPart();
final int sli = moduleFullSpec.indexOf('/');
final int qi = moduleFullSpec.indexOf('?');
final int si = qi == -1 ? sli == -1 ? -1 : sli : sli == -1 ? qi : Math.min(sli, qi);
final String moduleSpec;
if (si == -1) {
moduleSpec = moduleFullSpec;
} else {
moduleSpec = moduleFullSpec.substring(0, si);
}
if (moduleSpec.length() == 0) {
throw new URISyntaxException(uri.toString(), "Empty module URI");
}
final int c1 = moduleSpec.indexOf(':');
if (c1 == -1) {
throw new URISyntaxException(uri.toString(), "Module URI requires a group ID");
}
final int c2 = moduleSpec.indexOf(':', c1 + 1);
if (c2 == -1) {
return new ModuleIdentifier(moduleSpec.substring(0, c1), moduleSpec.substring(c1 + 1), null);
}
final int c3 = moduleSpec.indexOf(':', c2 + 1);
return new ModuleIdentifier(moduleSpec.substring(0, c1), moduleSpec.substring(c1 + 1, c2), c3 == -1 ? moduleSpec.substring(c2 + 1) : moduleSpec.substring(c2 + 1, c3));
}
public static ModuleIdentifier fromString(String moduleSpec) throws IllegalArgumentException {
if (moduleSpec.length() == 0) {
throw new IllegalArgumentException("Empty module specification");
}
final int c1 = moduleSpec.indexOf(':');
if (c1 == -1) {
throw new IllegalArgumentException("Module specification requires a group ID");
}
final int c2 = moduleSpec.indexOf(':', c1 + 1);
if (c2 == -1) {
return new ModuleIdentifier(moduleSpec.substring(0, c1), moduleSpec.substring(c1 + 1), null);
}
final int c3 = moduleSpec.indexOf(':', c2 + 1);
return new ModuleIdentifier(moduleSpec.substring(0, c1), moduleSpec.substring(c1 + 1, c2), c3 == -1 ? moduleSpec.substring(c2 + 1) : moduleSpec.substring(c2 + 1, c3));
}
private String toSpecString() {
if (version == null) {
return group + ":" + artifact;
} else {
return group + ":" + artifact + ":" + version;
}
}
public URL toURL() throws MalformedURLException {
return new URL("module", null, -1, toSpecString());
}
public URL toURL(String resourceRoot) throws MalformedURLException {
if (resourceRoot == null) {
return toURL();
} else {
return new URL("module", null, -1, toSpecString() + "/" + resourceRoot);
}
}
public URL toURL(String resourceRoot, String resourceName) throws MalformedURLException {
if (resourceName == null) {
return toURL(resourceRoot);
} else if (resourceRoot == null) {
return new URL("module", null, -1, toSpecString() + "?" + resourceName);
} else {
return new URL("module", null, -1, toSpecString() + "/" + resourceRoot + "?" + resourceName);
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
bcc75a87cb91a248acec9f5d3927ffe6fdede6e1
|
e8a572f7601d6c8ce260b9db6c5738238b1aff35
|
/customer-api/src/main/java/io/eventuate/examples/tram/sagas/ordersandcustomers/customers/api/replies/CustomerCreditReserved.java
|
6de35b71827c2fa762b2b1501f4b0246fec7cdc3
|
[
"Apache-2.0"
] |
permissive
|
bmadhu44555/eventuate-tram-sagas-micronaut-examples-customers-and-orders
|
d4c4b39ceaa81d603c08c843d438f69054ed99b1
|
0a3685a8831ee46f1accee3b87ca3ad51ecad356
|
refs/heads/master
| 2022-09-06T19:32:02.460279
| 2020-05-12T14:32:15
| 2020-05-12T14:32:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 154
|
java
|
package io.eventuate.examples.tram.sagas.ordersandcustomers.customers.api.replies;
public class CustomerCreditReserved implements ResultCreditResult {
}
|
[
"artem.sidorkin@digitalarrowtech.com"
] |
artem.sidorkin@digitalarrowtech.com
|
852df058d789657baa5384c363c567b78c959caf
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/1/1_f882100685c5d28252a35e66b3cebd45a0765987/GraphActivity/1_f882100685c5d28252a35e66b3cebd45a0765987_GraphActivity_t.java
|
e35ecf30220b0afcc755aeebad19a9ddde08ede3
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,171
|
java
|
package edu.colorado.trackers.HealthMetrics;
import java.util.ArrayList;
import java.util.List;
import org.achartengine.model.TimeSeries;
import org.achartengine.model.XYMultipleSeriesDataset;
import edu.colorado.trackers.R;
import edu.colorado.trackers.db.Database;
import edu.colorado.trackers.db.ResultSet;
import edu.colorado.trackers.db.Selector;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout.LayoutParams;
import android.widget.PopupWindow;
import edu.colorado.trackers.graph.LineGraph;
public class GraphActivity extends Activity {
private Database db;
List<Integer> yDB = new ArrayList<Integer>();
List<String> dateDB = new ArrayList<String>();
int yMin = 0, yMax = 0, xMax = 0;
String title;
PopupWindow popupWindow;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_graph);
db = new Database(this, "healthmetric15.db");
}
public void CholesterolGraph (View view)
{
LineGraph line = new LineGraph();
title = "Cholesterol";
if(getDBValues() == 1)
{
//display graph
Intent lineIntent = line.getIntent(this, title, dateDB, yMin, yMax, xMax, yDB );
startActivity(lineIntent);
}
else
{
//no data popup
LayoutInflater layoutInflater = (LayoutInflater)getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);
View popupView = layoutInflater.inflate(R.layout.activity_popup, null);
popupWindow = new PopupWindow(popupView, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
popupWindow.showAtLocation(this.findViewById(R.id.hrGraph), Gravity.CENTER, 0, 0);
Button b = (Button) findViewById(R.id.chGraph);
b.setEnabled(false);
}
}
public void BloodPressureGraph (View view)
{
LineGraph line = new LineGraph();
title = "BloodPressure";
if(getDBValues() == 1)
{
//display graph
Intent lineIntent = line.getIntent(this, title, dateDB, yMin, yMax, xMax, yDB );
startActivity(lineIntent);
}
else
{
//no data popup
LayoutInflater layoutInflater = (LayoutInflater)getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);
View popupView = layoutInflater.inflate(R.layout.activity_popup, null);
popupWindow = new PopupWindow(popupView, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
popupWindow.showAtLocation(this.findViewById(R.id.hrGraph), Gravity.CENTER, 0, 0);
Button b = (Button) findViewById(R.id.bpGraph);
b.setEnabled(false);
}
}
public void SugarGraph (View view)
{
LineGraph line = new LineGraph();
title = "Sugar";
if(getDBValues() == 1)
{
//display graph
Intent lineIntent = line.getIntent(this, title, dateDB, yMin, yMax, xMax, yDB );
startActivity(lineIntent);
}
else
{
//no data popup
LayoutInflater layoutInflater = (LayoutInflater)getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);
View popupView = layoutInflater.inflate(R.layout.activity_popup, null);
popupWindow = new PopupWindow(popupView, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
popupWindow.showAtLocation(this.findViewById(R.id.hrGraph), Gravity.CENTER, 0, 0);
Button b = (Button) findViewById(R.id.suGraph);
b.setEnabled(false);
}
}
public void TemperatureGraph (View view)
{
LineGraph line = new LineGraph();
title = "Temperature";
if(getDBValues() == 1)
{
//display graph
Intent lineIntent = line.getIntent(this, title, dateDB, yMin, yMax, xMax, yDB );
startActivity(lineIntent);
}
else
{
//no data popup
LayoutInflater layoutInflater = (LayoutInflater)getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);
View popupView = layoutInflater.inflate(R.layout.activity_popup, null);
popupWindow = new PopupWindow(popupView, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
popupWindow.showAtLocation(this.findViewById(R.id.hrGraph), Gravity.CENTER, 0, 0);
Button b = (Button) findViewById(R.id.tmGraph);
b.setEnabled(false);
}
}
public void HeartRateGraph (View view)
{
LineGraph line = new LineGraph();
title = "HeartRate";
if(getDBValues() == 1)
{
//display graph
Intent lineIntent = line.getIntent(this, title, dateDB, yMin, yMax, xMax, yDB );
startActivity(lineIntent);
}
else
{
//no data popup
Button b = (Button) findViewById(R.id.hrGraph);
b.setEnabled(false);
LayoutInflater layoutInflater = (LayoutInflater)getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);
View popupView = layoutInflater.inflate(R.layout.activity_popup, null);
popupWindow = new PopupWindow(popupView, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
popupWindow.showAtLocation(this.findViewById(R.id.hrGraph), Gravity.CENTER, 0, 0);
}
}
/** Called when the user clicks the done button */
public void done(View view) {
Intent intent = new Intent(this, HealthMetrics.class);
String message = "more data";
intent.putExtra("from Graph", message);
startActivity(intent);
}
/** Called when the user clicks the close button on popup window*/
public void popupClose(View view) {
popupWindow.dismiss();
}
/*get db value to be displayed on graph*/
public int getDBValues()
{
yDB.clear();
yMin = 0; yMax = 0; xMax = 0;
dateDB.clear();
Selector selector = db.selector("healthMetrics15"); //give your table name here
selector.addColumns(new String[] { "reading", "date"});
if(!title.equals(null))
selector.where("type = ?", new String[] {title});
int count = selector.execute();
System.out.println("Selected (" + count + ") items");
ResultSet cursor = selector.getResultSet();
if(cursor.getCount() != 0)
{
cursor.moveToLast();
while (!cursor.isBeforeFirst())
{
Integer reading = cursor.getInt(0);
String date = cursor.getString(1);
if(yMin == 0) //set the ymin, ymax values to be displayed on graph
yMin = reading;
if(reading < yMin)
yMin = reading;
if(reading > yMax)
yMax = reading;
yDB.add(reading); //add reading and date value to the dataset
dateDB.add(date);
System.out.println("GraphActivity: Data: "+ reading);
cursor.moveToPrevious();
}
cursor.close();
return 1;
}
else
return 0;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
3e62bc4594099a320aa4b43e483a132f2c7c3dc1
|
611cfce373910ac6ef1c49d82cbed15a7a4dc5fc
|
/app/src/main/java/com/hollamohalla2/Utility/MyUtil.java
|
fe5993cdccd4f0221336c457a06aa6137b378d00
|
[] |
no_license
|
charanVeer123/Hola-Mohalla
|
73e4f2fdc2784b95c34973211f182774437b4e33
|
d0e3a5711d75c49808a47fd3f67809c7c3846475
|
refs/heads/master
| 2020-06-25T22:16:28.598184
| 2019-07-29T11:09:28
| 2019-07-29T11:09:28
| 199,437,114
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,586
|
java
|
package com.hollamohalla2.Utility;
import android.app.Activity;
import android.content.Context;
import android.location.Location;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
public class MyUtil {
//18.217.234.39:8080
public static final String URLCATEGORY = "http://18.217.234.39:8080/api/category/findall";
public static final String URLSUBCATEGORY = "http://18.217.234.39:8080/api/place/categorywise3";
private static Location myLocation = null;
// http://192.168.0.72:33000
public static void hideKeyboard(Activity activity) {
InputMethodManager imm = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);
//Find the currently focused view, so we can grab the correct window token from it.
View view = activity.getCurrentFocus();
//If no view currently has focus, create a new one, just so we can grab a window token from it
if (view == null) {
view = new View(activity);
}
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
public static void hideKeyboardFrom(Context context, View view) {
InputMethodManager imm = (InputMethodManager) context.getSystemService(Activity.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
public static void setCurrentLocation(Context currentLocation, Location location) {
myLocation = location;
}
public static Location getCurrentLocation(Context currentLocation) {
return myLocation;
}
}
|
[
"example@example.com"
] |
example@example.com
|
bbf050504c102f28f78b7a5c500d018fba5ba294
|
790b934cb3945e64e65c267703394e6b39135a2d
|
/Back End Technologies/jpawithhibernate/src/main/java/com/capgemini/jpawithhibernateonetoonedto/EmployeeInfo.java
|
75850129c7099cbeb252d0522bc654646578f1aa
|
[] |
no_license
|
Omkarnaik571/TY_CG_HTD_BangloreNovember_JFS_OmkarNaik
|
af1f515dd34abe1f79d81a88422cd1f668d18ed4
|
c460ff715036e843138ef4e43e0e9a664d944664
|
refs/heads/master
| 2023-01-12T01:42:37.720261
| 2020-02-17T09:36:46
| 2020-02-17T09:36:46
| 225,846,042
| 1
| 0
| null | 2023-01-07T21:26:24
| 2019-12-04T11:00:48
|
Java
|
UTF-8
|
Java
| false
| false
| 618
|
java
|
package com.capgemini.jpawithhibernateonetoonedto;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import lombok.Data;
import lombok.ToString.Exclude;
@Data
@Entity
@Table(name="employee_info")
public class EmployeeInfo {
@Id
@Column
private int eid;
@Column
private String name;
@Column
private String email;
@Column
private String password;
@Exclude
@OneToOne(cascade = CascadeType.ALL,mappedBy = "enf" )
private EmployeeOtherIfo eoi;
}
|
[
"omkarnaik571@gmail.com"
] |
omkarnaik571@gmail.com
|
4286b7e85d7dd565246a63644373fa7fe50e8179
|
d35b70036f2deecab61681270c458db8a65dc271
|
/java-microservice/medicine-shop-inventory/src/main/java/com/unloadbrain/medicineshopinventory/dto/response/ProductResponse.java
|
3829c524168af395bd1c5173d8411960278058f3
|
[
"MIT"
] |
permissive
|
ihsonnet/technical-workshops
|
6fa540f3658e17f351255a5256148fbaf039b55d
|
ac539cdb0ae8561f77849ec2af80fd6a6853338f
|
refs/heads/master
| 2022-05-28T18:34:03.725247
| 2020-05-04T19:12:32
| 2020-05-04T19:12:32
| 261,647,527
| 1
| 0
|
MIT
| 2020-05-06T03:59:54
| 2020-05-06T03:59:53
| null |
UTF-8
|
Java
| false
| false
| 537
|
java
|
package com.unloadbrain.medicineshopinventory.dto.response;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.math.BigDecimal;
import java.time.LocalDate;
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ProductResponse {
private String id;
private String name;
private String description;
private BigDecimal purchasePrice;
private LocalDate expire;
private BigDecimal stock;
}
|
[
"mmahmood.ict.bd@gmail.com"
] |
mmahmood.ict.bd@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.