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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4bdc328e986255fddf9aaa7aafb9f23308cc4821 | 18afc5c0c75d89190dd6e75d7419aba9cc22b3a1 | /app/src/main/java/cn/huaxunchina/cloud/location/app/activity/stt/crawl/ControlView.java | 4499565e8e65c6abc1aa48145245853492865ed6 | [] | no_license | tanpangzi/huaxun | 38ee432241ad7b4dd392c6648f8bc08aa7fa998f | 0f0396958be96c599f74062bab43ecb235067263 | refs/heads/master | 2020-09-12T13:09:53.084839 | 2019-11-18T11:43:47 | 2019-11-18T11:43:47 | 222,435,692 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,763 | java | package cn.huaxunchina.cloud.location.app.activity.stt.crawl;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import cn.huaxunchina.cloud.app.common.Constant.ResultCode;
import cn.huaxunchina.cloud.app.view.ContactsDialog;
import cn.huaxunchina.cloud.location.app.model.MarkerInfo;
import cn.huaxunchina.cloud.location.app.model.post.Circle;
import cn.huaxunchina.cloud.location.app.model.post.FencesettingModel;
import cn.huaxunchina.cloud.location.app.network.HttpHandler;
import cn.huaxunchina.cloud.location.app.network.HttpHandler.HttpHandlerCallBack;
public class ControlView {
public Button add_crawl;
public Button det_crawl;
public Button del_crawl;
private MarkerInfo markerInfo;
private FencingActivity activitys;
private FencingView fencingView;
public ControlView(FencingActivity activity,Button add_crawl,Button det_crawl,Button del_crawl){
this.add_crawl=add_crawl;
this.det_crawl=det_crawl;
this.del_crawl=del_crawl;
this.activitys=activity;
add_crawl.setVisibility(View.GONE);
det_crawl.setVisibility(View.GONE);
del_crawl.setVisibility(View.GONE);
add_crawl.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
addCrawl();
}
});
det_crawl.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
detCrawl();
}
});
del_crawl.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
Circle circle = markerInfo.circle;
ContactsDialog dialog = new ContactsDialog(activitys);
dialog.show();
dialog.setTitle("提示!");
dialog.setMessage("确定要删除"+circle.getPositionName()+"围栏?");
dialog.setNegativeButton("取消");
dialog.setPositiveButton("确定");
dialog.setOkOnClickListener(new ContactsDialog.OnClickListener(){
@Override
public void onClick() {
delCrawl();
}});
}
});
}
public void setFencingView(FencingView fencingView){
this.fencingView=fencingView;
}
public void hideOperationView(){
add_crawl.setVisibility(View.GONE);
det_crawl.setVisibility(View.GONE);
del_crawl.setVisibility(View.GONE);
}
public void operation(MarkerInfo markerInfo){
if(markerInfo.datatype==0){
add_crawl.setVisibility(View.VISIBLE);
det_crawl.setVisibility(View.GONE);
del_crawl.setVisibility(View.GONE);
}else{
add_crawl.setVisibility(View.GONE);
det_crawl.setVisibility(View.VISIBLE);
del_crawl.setVisibility(View.VISIBLE);
}
this.markerInfo=markerInfo;
}
private void addCrawl(){
if(markerInfo!=null){
Circle circle = markerInfo.circle;
Intent intent = new Intent(activitys,AddElectronicFence.class);
Bundle bundle = new Bundle();
bundle.putSerializable("data", circle);
intent.putExtras(bundle);
activitys.startActivityForResult(intent, ResultCode.FEN_DEL_CODE);
}
}
private void delCrawl(){
if(markerInfo!=null){
FencesettingModel fen = new FencesettingModel();//删除
fen.setType(4);
fen.setCircle_id(markerInfo.circle.getCircle_id());
new HttpHandler(activitys.loadingDialog,activitys.applicationController.httpUtils_lbs,fen,new HttpHandlerCallBack(){
@Override
public void onCallBack(String json) {
if(fencingView!=null){
fencingView.hide();
fencingView.remove(markerInfo);
}
}
@Override
public void onErro() {
}});
}
}
private void detCrawl(){
if(markerInfo!=null){
Circle circle = markerInfo.circle;
Intent intent = new Intent(activitys,AddElectronicFence.class);
Bundle bundle = new Bundle();
bundle.putSerializable("data", circle);
intent.putExtras(bundle);
activitys.startActivityForResult(intent, ResultCode.FEN_DEL_CODE);
}
}
}
| [
"hbtanjun2012@126.com"
] | hbtanjun2012@126.com |
050942e127f1fc954e3444fb2c963312f5f484bd | 0d6800f311072bbd3ee0de305b1145d1040521e8 | /src/main/java/org/bukkit/entity/Horse.java | cbd56bdf13f5f40ee60a6ed8111eb90e453d85f6 | [] | no_license | MisterSandFR/LunchBox | 52ddc560721f71b5c593f1f53f350bf8c24a42ad | 70ddc5432c56668d0e4ad1add9a0742263934dc7 | refs/heads/master | 2020-12-25T05:03:03.642668 | 2016-06-09T00:39:43 | 2016-06-09T00:39:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,042 | java | package org.bukkit.entity;
import org.bukkit.inventory.HorseInventory;
import org.bukkit.inventory.InventoryHolder;
public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable {
Horse.Variant getVariant();
void setVariant(Horse.Variant horse_variant);
Horse.Color getColor();
void setColor(Horse.Color horse_color);
Horse.Style getStyle();
void setStyle(Horse.Style horse_style);
boolean isCarryingChest();
void setCarryingChest(boolean flag);
int getDomestication();
void setDomestication(int i);
int getMaxDomestication();
void setMaxDomestication(int i);
double getJumpStrength();
void setJumpStrength(double d0);
HorseInventory getInventory();
public static enum Color {
WHITE, CREAMY, CHESTNUT, BROWN, BLACK, GRAY, DARK_BROWN;
}
public static enum Style {
NONE, WHITE, WHITEFIELD, WHITE_DOTS, BLACK_DOTS;
}
public static enum Variant {
HORSE, DONKEY, MULE, UNDEAD_HORSE, SKELETON_HORSE;
}
}
| [
"pturchan@yahoo.com"
] | pturchan@yahoo.com |
07c8768f96fa7848bcf87913e8420869125ae273 | 57abc8ae87ae03c202a386fba9aa0e3bb8b2f452 | /orchestrator-salt/src/main/java/com/sequenceiq/cloudbreak/orchestrator/salt/domain/FingerprintRequest.java | 3d65e02aa3217d03dcbe86b707ab52a0ea296146 | [
"LicenseRef-scancode-warranty-disclaimer",
"ANTLR-PD",
"CDDL-1.0",
"bzip2-1.0.6",
"Zlib",
"BSD-3-Clause",
"MIT",
"EPL-1.0",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-jdbm-1.00",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | hortonworks/cloudbreak | 11c03bb7b90b49d1d57250ee1691f2484bc686ab | cab154694f43e27e8c429b53a9400fe8cc19d07b | refs/heads/master | 2023-07-26T16:42:10.127709 | 2023-07-04T08:11:17 | 2023-07-12T10:56:54 | 19,638,422 | 199 | 211 | Apache-2.0 | 2023-09-14T20:54:32 | 2014-05-10T10:03:07 | Java | UTF-8 | Java | false | false | 450 | java | package com.sequenceiq.cloudbreak.orchestrator.salt.domain;
import java.util.List;
public class FingerprintRequest {
private List<Minion> minions;
public FingerprintRequest() {
}
public FingerprintRequest(List<Minion> minions) {
this.minions = minions;
}
public List<Minion> getMinions() {
return minions;
}
public void setMinions(List<Minion> minions) {
this.minions = minions;
}
}
| [
"keyki.kk@gmail.com"
] | keyki.kk@gmail.com |
66b4298c481c5e1c266a8f1a2959f9d3180f959a | b5c58560a5df73fa8ce97879631bd3296dd026fb | /src/jsortie/quicksort/expander/branchavoiding/LeftTunedExpander.java | a4a2d257fbfd77030ce217f42d86259f52541bd5 | [
"MIT"
] | permissive | JamesBarbetti/jsortie | 272669c2fbe35acf05a2656268ab609537ab8e19 | 8086675235a598f6b081a4edd591012bf5408abf | refs/heads/main | 2023-04-13T08:50:56.132423 | 2021-04-18T04:57:14 | 2021-04-18T04:57:14 | 358,776,751 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,284 | java | package jsortie.quicksort.expander.branchavoiding;
public class LeftTunedExpander
extends TunedExpander {
//
//This class is (very loosely) based on the code
//for lean_partition(), page 27 of:
//Sorting programs executing fewer branches
//(from: CPH STL Report) Jyrki Katajainen, 2014
//Department of Computer Science,
//University of Copenhagen
//
//http://manualzz.com/doc/20257290
// /sorting-programs-executing-fewer-branches
//
//This is *not* part of the CPH STL
//
public int expandPartitionToRight
( int[] vArray, int hole, int startRight, int stop) {
//items that compare equal to the pivot
//all go to the *left* child partition
if (stop<=startRight) {
return hole;
}
int vPivot = vArray[hole];
int oldHole = hole;
for (int scan=startRight; scan<stop; ++scan) {
int v = vArray[scan];
int less = ( v < vPivot) ? 1 : 0;
hole += less;
int delta = less * ( scan - hole );
int s = hole + delta;
int t = scan - delta;
vArray[s] = vArray[hole];
vArray[t] = v;
}
vArray[oldHole] = vArray[hole];
vArray[hole] = vPivot;
return hole;
}
}
| [
"james_barbetti@yahoo.com"
] | james_barbetti@yahoo.com |
0c9afef9302dd49e503c9508b22c5df7ae9bcd9e | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.qqlite/assets/exlibs.1.jar/classes.jar/QQService/SvcRspBindUin.java | 6b1e70bc2f9855a9ee650abbd1fe1dd3297d76ba | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 1,122 | java | package QQService;
import com.qq.taf.jce.JceInputStream;
import com.qq.taf.jce.JceOutputStream;
import com.qq.taf.jce.JceStruct;
import java.util.ArrayList;
public final class SvcRspBindUin
extends JceStruct
{
static ArrayList cache_vecResult;
public ArrayList vecResult = null;
public SvcRspBindUin() {}
public SvcRspBindUin(ArrayList paramArrayList)
{
this.vecResult = paramArrayList;
}
public void readFrom(JceInputStream paramJceInputStream)
{
if (cache_vecResult == null)
{
cache_vecResult = new ArrayList();
BindUinResult localBindUinResult = new BindUinResult();
cache_vecResult.add(localBindUinResult);
}
this.vecResult = ((ArrayList)paramJceInputStream.read(cache_vecResult, 0, true));
}
public void writeTo(JceOutputStream paramJceOutputStream)
{
paramJceOutputStream.write(this.vecResult, 0);
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.qqlite\assets\exlibs.1.jar\classes.jar
* Qualified Name: QQService.SvcRspBindUin
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
2e9fcb8bbdda06fb50e8279694094c9cbdd3f0e8 | b214f96566446763ce5679dd2121ea3d277a9406 | /modules/base/language-api/src/main/java/consulo/language/icon/IconDescriptor.java | 432aef44e5553086e652c25c044ca1e83ff9c415 | [
"Apache-2.0",
"LicenseRef-scancode-jgraph"
] | permissive | consulo/consulo | aa340d719d05ac6cbadd3f7d1226cdb678e6c84f | d784f1ef5824b944c1ee3a24a8714edfc5e2b400 | refs/heads/master | 2023-09-06T06:55:04.987216 | 2023-09-01T06:42:16 | 2023-09-01T06:42:16 | 10,116,915 | 680 | 54 | Apache-2.0 | 2023-06-05T18:28:51 | 2013-05-17T05:48:18 | Java | UTF-8 | Java | false | false | 2,245 | java | /*
* Copyright 2013-2016 consulo.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package consulo.language.icon;
import consulo.ui.image.Image;
import consulo.ui.image.ImageEffects;
import consulo.util.collection.ArrayUtil;
import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
/**
* @author VISTALL
* @since 0:07/19.07.13
*/
public class IconDescriptor {
private Image[] myLayerIcons = Image.EMPTY_ARRAY;
private Image myRightIcon;
private Image myMainIcon;
public IconDescriptor(@Nullable Image mainIcon) {
myMainIcon = mainIcon;
}
@Nullable
public Image getMainIcon() {
return myMainIcon;
}
public IconDescriptor setMainIcon(@Nullable Image mainIcon) {
myMainIcon = mainIcon;
return this;
}
public IconDescriptor addLayerIcon(@Nonnull Image icon) {
myLayerIcons = ArrayUtil.append(myLayerIcons, icon);
return this;
}
public IconDescriptor removeLayerIcon(@Nonnull Image icon) {
myLayerIcons = ArrayUtil.remove(myLayerIcons, icon);
return this;
}
public IconDescriptor clearLayerIcons() {
myLayerIcons = Image.EMPTY_ARRAY;
return this;
}
@Nullable
public Image getRightIcon() {
return myRightIcon;
}
public void setRightIcon(@Nullable Image rightIcon) {
myRightIcon = rightIcon;
}
@Nonnull
public Image toIcon() {
Image mainIcon;
if(myLayerIcons.length == 0) {
mainIcon = myMainIcon;
}
else {
mainIcon = ImageEffects.layered(ArrayUtil.mergeArrays(new Image[]{myMainIcon}, myLayerIcons));
}
if(myRightIcon == null) {
return mainIcon == null ? Image.empty(16) : mainIcon;
}
else {
return ImageEffects.appendRight(mainIcon, myRightIcon);
}
}
}
| [
"vistall.valeriy@gmail.com"
] | vistall.valeriy@gmail.com |
18f02d680872a6e7da0cacd7f74af4e744f397a4 | 6225daa34f9a6385f9612716fabb0b6917f2759c | /src/automation-test/java/au/com/cgu/harvest/automation/scenario/farmmotor/LapseFarmMotorCoverNoteScenario.java | 363d277acf63e85a717d7946d52a08addf85ca35 | [] | no_license | vemuvpk/test-automation-insurance | 134c398cb48f70c0be96f537534af26654565969 | bf8270fc6f9bcd4b44a81cc4420646f61aca89e0 | refs/heads/master | 2021-01-23T01:26:25.970823 | 2017-03-23T04:35:45 | 2017-03-23T04:35:45 | 85,907,516 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,773 | java | package au.com.cgu.harvest.automation.scenario.farmmotor;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.Wait;
import org.openqa.selenium.support.ui.WebDriverWait;
import au.com.cgu.harvest.automation.ParallelScenarioRunner;
import au.com.cgu.harvest.automation.activity.farmmotor.CreateAgriculturalVehicleActivity;
import au.com.cgu.harvest.automation.activity.farmmotor.FinishPolicyAsCoverNoteActivity;
import au.com.cgu.harvest.automation.activity.farmmotor.InsuranceHistoryActivity;
import au.com.cgu.harvest.automation.activity.farmmotor.NavigateToFinishPageActivity;
import au.com.cgu.harvest.automation.activity.farmmotor.PolicyDetailsActivity;
import au.com.cgu.harvest.automation.activity.farmmotor.ViewPremiumActivity;
import au.com.cgu.harvest.automation.activity.sunrise.AssertPolicyStateFromSunriseActivity;
import au.com.cgu.harvest.automation.activity.sunrise.GetAcceptanceActivity;
import au.com.cgu.harvest.automation.activity.sunrise.LaunchFarmMotorActivity;
import au.com.cgu.harvest.automation.activity.sunrise.LoginToExecutiveActivity;
import au.com.cgu.harvest.automation.activity.sunrise.TerminatePolicyActivity;
import au.com.cgu.harvest.automation.activity.sunrise.ViewRiskDetailsActivity;
import au.com.cgu.harvest.automation.scenario.AbstractScenario;
import au.com.cgu.harvest.automation.scenario.Scenario;
import au.com.cgu.harvest.pages.Element;
import au.com.cgu.harvest.pages.InsuranceHistoryPage;
import au.com.cgu.harvest.pages.PolicyDetailPage;
import au.com.cgu.harvest.pages.PremiumPage;
import au.com.cgu.harvest.pages.ReadOnlyChecker;
import au.com.cgu.harvest.pages.farmmotor.AgriculturalVehiclePage;
import au.com.cgu.harvest.pages.farmmotor.FinishPage;
import au.com.cgu.harvest.pages.farmmotor.FinishPageXpath;
import au.com.cgu.harvest.pages.sunrise.NewBusinessPage;
import au.com.cgu.harvest.pages.sunrise.WelcomePage;
@RunWith( ParallelScenarioRunner.class )
@Scenario( "Lapse a CoverNote for Farm Motor Policy Scenario" )
public class LapseFarmMotorCoverNoteScenario extends
AbstractScenario
{
@Test
public void execute()
{
WelcomePage welcomePage =
performActivity( new LoginToExecutiveActivity() );
PolicyDetailPage policyDetailPage =
performActivity( new LaunchFarmMotorActivity( welcomePage ) );
policyDetailPage =
performActivity( new PolicyDetailsActivity( policyDetailPage ) );
InsuranceHistoryPage insuranceHistoryPage =
performActivity( new InsuranceHistoryActivity( policyDetailPage ) );
AgriculturalVehiclePage agriculturalVehicle =
performActivity( new CreateAgriculturalVehicleActivity( insuranceHistoryPage ) );
NewBusinessPage newBusinessPage =
performActivity( new FinishPolicyAsCoverNoteActivity( agriculturalVehicle ) );
newBusinessPage =
performActivity( new AssertPolicyStateFromSunriseActivity( newBusinessPage,
"New Business Unclosed Complete" ) );
newBusinessPage = performActivity( new GetAcceptanceActivity( newBusinessPage ) );
newBusinessPage =
performActivity( new AssertPolicyStateFromSunriseActivity( newBusinessPage,
"New Business Unclosed Accepted" ) );
PremiumPage premiumPage =
performActivity( new TerminatePolicyActivity( newBusinessPage ) );
FinishPage finishPage =
performActivity( new NavigateToFinishPageActivity( premiumPage ) );
finishPage.finish();
newBusinessPage =
performActivity( new AssertPolicyStateFromSunriseActivity( newBusinessPage,
"New Business Lapsed Complete" ) );
newBusinessPage = performActivity( new GetAcceptanceActivity( newBusinessPage ) );
newBusinessPage =
performActivity( new AssertPolicyStateFromSunriseActivity( newBusinessPage,
"New Business Lapsed Accepted" ) );
policyDetailPage = performActivity( new ViewRiskDetailsActivity( newBusinessPage ) );
ReadOnlyChecker.checkReadOnly( getWebDriver(), policyDetailPage );
premiumPage =
performActivity( new ViewPremiumActivity( policyDetailPage ) );
ReadOnlyChecker.checkReadOnly( getWebDriver(), premiumPage );
finishPage = performActivity( new NavigateToFinishPageActivity( premiumPage ) );
Wait< WebDriver > wait = new WebDriverWait( getWebDriver(), Element.MAX_WAIT_SECS );
wait.until( Element.buttonIsDisabled( By.xpath( FinishPageXpath.FINISH_BUTTON ) ) );
}
}
| [
"vemuvpk@outlook.com"
] | vemuvpk@outlook.com |
81b82ca92067e0ee30226c165fb2371befbc2c05 | 88d807db877e2a91cd6b78a78a735e30177ac424 | /src/main/java/com/baigehuidi/demo/weixin4j/model/pay/Reverse.java | a20185fae70ee5eef5f5a112c57080679712c14c | [] | no_license | moocstudent/weixin4j-spring-demo | 562d7301a48a48ff9572a4c0c0ce9dafa8f973f7 | ab94dc35d114c7bc5a40d1776537b4ce9022745b | refs/heads/master | 2021-10-09T23:07:05.423300 | 2019-01-04T10:02:46 | 2019-01-04T10:02:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,707 | java | package com.baigehuidi.demo.weixin4j.model.pay;
import java.util.HashMap;
import java.util.Map;
/**
* [撤销订单请求参数] https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=9_11
* 支付交易返回失败或支付系统超时,调用该接口撤销交易. 如果此订单用户支付失败,
* 微信支付系统会将此订单关闭;如果用户支付成功,微信支付系统会将此订单资金退还给用户.
* 注意: <<<, 7天以内的交易单可调用撤销,其它正常支付的单如需实现相同功能请调用申请退款API.
* 提交支付交易后调用[查询订单API(OrderQuery)],没有明确的支付结果再调用[撤销订单API].
* >>>>>调用支付接口后请勿立即调用撤销订单API,建议支付后至少15s后再调用撤销订单接口.
* 接口链接: https://api.mch.weixin.qq.com/secapi/pay/reverse
* 是否需要证书: 需要双向证书 : 证书使用: https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=4_3
*/
public class Reverse {
//发送的请求撤销订单的参数
//公众账号ID
private String appid;
//商户号
private String mch_id;
//微信订单号
private String transaction_id;
//商户订单号
private String out_trade_no;
//随机字符串
private String nonce_str;
//签名
private String sign;
//签名类型
private String sign_type;
public Map<String,String> toMap(){
Map<String,String> map = new HashMap<String,String>();
map.put("appid",appid);
map.put("mch_id",mch_id);
map.put("transaction_id",transaction_id);
map.put("out_trade_no",out_trade_no);
map.put("nonce_str",nonce_str);
map.put("sign",sign);
map.put("sign_type",sign_type);
return map;
}
public String toXML(){
StringBuilder sb = new StringBuilder();
sb.append("<xml>");
sb.append("<appid><![CDATA[").append(appid).append("]]</appid>");
sb.append("<mch_id><![CDATA[").append(mch_id).append("]]</mch_id>");
sb.append("<transaction_id><![CDATA[").append(transaction_id).append("]]</transaction_id>");
sb.append("<out_trade_no><![CDATA[").append(out_trade_no).append("]]</out_trade_no>");
sb.append("<nonce_str><![CDATA[").append(nonce_str).append("]]</nonce_str>");
sb.append("<sign><![CDATA[").append(sign).append("]]</sign>");
sb.append("<sign_type><![CDATA[").append(sign_type).append("]]</sign_type>");
sb.append("</xml>");
return sb.toString();
}
//get&set 好像只应该设置set,不过无妨
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid;
}
public String getMch_id() {
return mch_id;
}
public void setMch_id(String mch_id) {
this.mch_id = mch_id;
}
public String getTransaction_id() {
return transaction_id;
}
public void setTransaction_id(String transaction_id) {
this.transaction_id = transaction_id;
}
public String getOut_trade_no() {
return out_trade_no;
}
public void setOut_trade_no(String out_trade_no) {
this.out_trade_no = out_trade_no;
}
public String getNonce_str() {
return nonce_str;
}
public void setNonce_str(String nonce_str) {
this.nonce_str = nonce_str;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
public String getSign_type() {
return sign_type;
}
public void setSign_type(String sign_type) {
this.sign_type = sign_type;
}
}
| [
"deadzq@qq.com"
] | deadzq@qq.com |
c5df959d51978e46817088bdc6c68cffaeb2a033 | 0ec58ba6a8c42f1a10f8b67e6cfbc0bbb904ff9d | /src/main/java/com/pyb/interceptor/RequestBiz.java | b2aa60d02d05d4386dae6aee17ef807a233f10d5 | [] | no_license | jingxiaohu/adver_task | 9c6be47ecd52f476b6592ba2bf199383972a9a48 | 0fd3ffd58e88760799df990b69660cf338541e9a | refs/heads/master | 2021-01-02T22:27:57.016503 | 2018-03-18T07:45:04 | 2018-03-18T07:45:04 | 99,323,216 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,431 | java | package com.pyb.interceptor;
import com.pyb.bean.Request_params_log;
import com.pyb.dao.Request_params_logDao;
import java.sql.SQLException;
import java.util.Date;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@Service
public class RequestBiz {
private Logger log = LoggerFactory.getLogger(RequestBiz.class);
@Autowired
Request_params_logDao request_params_logDao;
/**
* 记录客户端请求日志和服务器端写回的数据
*/
@Async
public void insertRequestParams(long duration, String RequestURI, String requestParam,
String responseData, String ip) {
/**
* 这里记录该次请求参数
*/
try {
if (log.isDebugEnabled()) {
log.debug("记录该次请求参数---");
}
Request_params_log request_params_log = new Request_params_log();
request_params_log.setCtime(new Date());
request_params_log.setDuration(duration);
request_params_log.setMethod_name(RequestURI);
request_params_log.setParams_json(requestParam);
request_params_log.setReponse_json(responseData);
request_params_log.setNote(ip);
request_params_logDao.insert(request_params_log);
} catch (SQLException e) {
// TODO Auto-generated catch block
}
}
}
| [
"251878350@qq.com"
] | 251878350@qq.com |
a5b5b03c8a3c0203e2006d777e4826647f716203 | ef7ae15c606931e05cb5085d40939fd7510fb3a4 | /src/main/java/com/nuvola/gxpenses/security/SecurityUtils.java | 284a5be3cc14a4ca27bdd4c392873e898d40d6ae | [] | no_license | imrabti/gxpensesAndroid | e2ee03012e3def87fd45792b4ae2e6814e6c2b18 | 5d17d39073464e5222bfb8ec9ee20eb86fc72f7f | refs/heads/master | 2021-01-01T19:14:59.985146 | 2013-01-02T10:02:11 | 2013-01-02T10:02:11 | 7,380,866 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,974 | java | package com.nuvola.gxpenses.security;
import android.content.SharedPreferences;
import javax.inject.Inject;
public class SecurityUtils {
private final SharedPreferences sharedPreferences;
@Inject
public SecurityUtils(final SharedPreferences sharedPreferences) {
this.sharedPreferences = sharedPreferences;
}
public void setCredentials(String username, String password) {
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putString(Credentials.USERNAME.name(), username);
editor.putString(Credentials.PASSWORD.name(), password);
editor.commit();
}
public void clearCredentials() {
if (isLoggedIn()) {
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.remove(Credentials.USERNAME.name());
editor.remove(Credentials.PASSWORD.name());
editor.commit();
}
}
public void updateUsername(String username) {
if (sharedPreferences.contains(Credentials.USERNAME.name())) {
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putString(Credentials.USERNAME.name(), username);
editor.commit();
}
}
public void updatePassword(String password) {
if (sharedPreferences.contains(Credentials.USERNAME.name())) {
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putString(Credentials.PASSWORD.name(), password);
editor.commit();
}
}
public String getUsername() {
return sharedPreferences.getString(Credentials.USERNAME.name(), null);
}
public String getPassword() {
return sharedPreferences.getString(Credentials.PASSWORD.name(), null);
}
public Boolean isLoggedIn() {
return sharedPreferences.contains(Credentials.USERNAME.name()) &&
sharedPreferences.contains(Credentials.PASSWORD.name());
}
}
| [
"imrabti@gmail.com"
] | imrabti@gmail.com |
4c1d5e959d1ecc9951a04ef758848da28dbbd884 | e2c187d4b75c24cb5506744efcf5e15a91afc652 | /com.osgi.example1/src-algorithm/LC438_find_all_anagrams_in_a_string/Solution.java | 3022b7182cee8a28b626d3cf7853869084f26e38 | [] | no_license | mineralstation/dev | 22ff884cfd1aa8e0ab86a4b59c8ee7c126521159 | 737c98e655fa433b5acbf9a65c5156c85bf781fb | refs/heads/master | 2021-06-17T22:12:55.677927 | 2021-01-08T22:22:18 | 2021-01-08T22:22:18 | 140,325,659 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,474 | java | package LC438_find_all_anagrams_in_a_string;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Solution {
public static class Window {
Map<Character, Integer> map = new HashMap<Character, Integer>();
boolean match = false;
int length = 0;
int matchedLength = 0;
public Window(String p) {
for (char c : p.toCharArray()) {
this.map.put(c, new Integer(0));
}
this.length = this.map.size();
}
public void add(char c) {
if (!this.map.containsKey(c)) {
return;
}
int oldCount = this.map.get(c);
int newCount = oldCount + 1;
this.map.put(c, newCount);
if (newCount == 1) {
this.matchedLength++;
}
this.match = (this.matchedLength == this.length) ? true : false;
}
public void remove(char c) {
if (!this.map.containsKey(c)) {
return;
}
int oldCount = this.map.get(c);
int newCount = oldCount - 1;
if (newCount < 0) {
newCount = 0;
}
this.map.put(c, newCount);
if (newCount == 0) {
this.matchedLength--;
}
this.match = (this.matchedLength == this.length) ? true : false;
}
public boolean match() {
return this.match;
}
}
/**
*
* @param s
* @param p
* @return
*/
public static List<Integer> findAnagrams(String s, String p) {
List<Integer> results = new ArrayList<Integer>();
Window win = new Window(p);
int lIndex = 0;
int rIndex = p.length() - 1;
for (int i = 0; i < rIndex; i++) {
win.add(s.charAt(i));
}
while (rIndex < s.length()) {
win.add(s.charAt(rIndex));
if (win.match()) {
results.add(lIndex);
}
win.remove(s.charAt(lIndex));
lIndex++;
rIndex++;
}
return results;
}
public static void main(String[] args) {
{
// Input:
// s: "cbaebabacd" p: "abc"
// Output:
// [0, 6]
String s = "cbaebabacd";
String p = "abc";
List<Integer> results = findAnagrams(s, p);
System.out.println("s = " + s);
System.out.println("p = " + p);
System.out.println("results = " + Arrays.toString(results.toArray(new Integer[results.size()])));
}
{
// Input:
// s: "abab" p: "ab"
// Output:
// [0, 1, 2]
String s = "abab";
String p = "ab";
List<Integer> results = findAnagrams(s, p);
System.out.println("s = " + s);
System.out.println("p = " + p);
System.out.println("results = " + Arrays.toString(results.toArray(new Integer[results.size()])));
}
}
}
| [
"yangyang4cs@gmail.com"
] | yangyang4cs@gmail.com |
8219e1182dab44f86c00ba8f549f7844c43542d8 | 92dd6bc0a9435c359593a1f9b309bb58d3e3f103 | /src/Warmup/_38anagram.java | f601e7f0571e5c46f96a6617c9165d3516c7f866 | [
"MIT"
] | permissive | darshanhs90/Java-Coding | bfb2eb84153a8a8a9429efc2833c47f6680f03f4 | da76ccd7851f102712f7d8dfa4659901c5de7a76 | refs/heads/master | 2023-05-27T03:17:45.055811 | 2021-06-16T06:18:08 | 2021-06-16T06:18:08 | 36,981,580 | 3 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,243 | java | package Warmup;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
public class _38anagram {
public static void main(String[] args) throws Exception {
BufferedReader scanner=new BufferedReader(new InputStreamReader(System.in));
int noOfTestCases=Integer.parseInt(scanner.readLine());
for (int i = 0; i < noOfTestCases; i++) {
String input=scanner.readLine();
if(input.length()%2!=0)
{
System.out.println("-1");
}
else{
String firstLine=input.substring(0, input.length()/2);
String secondLine=input.substring(input.length()/2);
char[] chars = firstLine.toCharArray();
Arrays.sort(chars);
StringBuilder firstPart = new StringBuilder(new String(chars));
chars = secondLine.toCharArray();
Arrays.sort(chars);
StringBuilder secondPart = new StringBuilder(new String(chars));
int counter=0;
while(firstPart.length()!=0){
String second=secondPart.toString();
if(second.indexOf(firstPart.charAt(0))!=-1){
secondPart.deleteCharAt(second.indexOf(firstPart.charAt(0)));
firstPart.deleteCharAt(0);
}
else{
firstPart.deleteCharAt(0);
counter++;
}
}
System.out.println(counter);
}
}
}
}
| [
"hsdars@gmail.com"
] | hsdars@gmail.com |
72b484a22196b797f5d6501a29bcdf07a452ddff | 19e0c09023de5884fc5917df70760f678fb650aa | /src/main/java/com/google/devtools/build/lib/actions/SpawnExecutedEvent.java | 0ba2be04b80927e7528b7f96240f562a883ba3fe | [
"Apache-2.0"
] | permissive | thii/bazel | 636de7822c9630d69d3ccb9af858b0a88e7b490f | 0a475055759a62d9865c986d9e53b447fd83fda5 | refs/heads/master | 2023-05-01T09:26:16.914328 | 2018-12-19T13:35:56 | 2018-12-19T13:38:13 | 162,444,104 | 1 | 1 | Apache-2.0 | 2023-04-19T21:19:59 | 2018-12-19T13:49:41 | Java | UTF-8 | Java | false | false | 1,495 | java | // Copyright 2018 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.devtools.build.lib.actions;
import com.google.devtools.build.lib.events.ExtendedEventHandler;
/** This event is fired during the build, when a subprocess is executed. */
public class SpawnExecutedEvent implements ExtendedEventHandler.ProgressLike {
private final Spawn spawn;
private final SpawnResult result;
public SpawnExecutedEvent(
Spawn spawn,
SpawnResult result) {
this.spawn = spawn;
this.result = result;
}
/** Returns the Spawn. */
public Spawn getSpawn() {
return spawn;
}
/** Returns the action. */
public ActionAnalysisMetadata getActionMetadata() {
return spawn.getResourceOwner();
}
/** Returns the action exit code. */
public int getExitCode() {
return result.exitCode();
}
/** Returns the distributor reply. */
public SpawnResult getSpawnResult() {
return result;
}
}
| [
"copybara-piper@google.com"
] | copybara-piper@google.com |
17f49124e97c59933e39fda21e985123ee8d8e01 | 4a5b8d37d70aff90d9c3e4d6d53239c12726f88e | /lib-rxjava/src/main/java/cn/ollyice/library/rxjava/internal/operators/single/SingleFlatMap.java | a2c4c695c9ee4db81543d8cc0346f7fb5493ae52 | [] | no_license | paqxyz/AndGameDemo | 29dfad61e371cf6db833107d903acffb8502e647 | 53271818ffff94564ec4e3337ebf4af13956d5de | refs/heads/master | 2020-03-21T04:29:11.037764 | 2018-06-20T06:06:50 | 2018-06-20T06:06:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,013 | java | /**
* Copyright (c) 2016-present, RxJava Contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
* the License for the specific language governing permissions and limitations under the License.
*/
package cn.ollyice.library.rxjava.internal.operators.single;
import cn.ollyice.library.rxjava.*;
import cn.ollyice.library.rxjava.disposables.Disposable;
import cn.ollyice.library.rxjava.exceptions.Exceptions;
import cn.ollyice.library.rxjava.functions.Function;
import cn.ollyice.library.rxjava.internal.disposables.DisposableHelper;
import cn.ollyice.library.rxjava.internal.functions.ObjectHelper;
import java.util.concurrent.atomic.AtomicReference;
public final class SingleFlatMap<T, R> extends Single<R> {
final SingleSource<? extends T> source;
final Function<? super T, ? extends SingleSource<? extends R>> mapper;
public SingleFlatMap(SingleSource<? extends T> source, Function<? super T, ? extends SingleSource<? extends R>> mapper) {
this.mapper = mapper;
this.source = source;
}
@Override
protected void subscribeActual(SingleObserver<? super R> actual) {
source.subscribe(new SingleFlatMapCallback<T, R>(actual, mapper));
}
static final class SingleFlatMapCallback<T, R>
extends AtomicReference<Disposable>
implements SingleObserver<T>, Disposable {
private static final long serialVersionUID = 3258103020495908596L;
final SingleObserver<? super R> actual;
final Function<? super T, ? extends SingleSource<? extends R>> mapper;
SingleFlatMapCallback(SingleObserver<? super R> actual,
Function<? super T, ? extends SingleSource<? extends R>> mapper) {
this.actual = actual;
this.mapper = mapper;
}
@Override
public void dispose() {
DisposableHelper.dispose(this);
}
@Override
public boolean isDisposed() {
return DisposableHelper.isDisposed(get());
}
@Override
public void onSubscribe(Disposable d) {
if (DisposableHelper.setOnce(this, d)) {
actual.onSubscribe(this);
}
}
@Override
public void onSuccess(T value) {
SingleSource<? extends R> o;
try {
o = ObjectHelper.requireNonNull(mapper.apply(value), "The single returned by the mapper is null");
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
actual.onError(e);
return;
}
if (!isDisposed()) {
o.subscribe(new FlatMapSingleObserver<R>(this, actual));
}
}
@Override
public void onError(Throwable e) {
actual.onError(e);
}
static final class FlatMapSingleObserver<R> implements SingleObserver<R> {
final AtomicReference<Disposable> parent;
final SingleObserver<? super R> actual;
FlatMapSingleObserver(AtomicReference<Disposable> parent, SingleObserver<? super R> actual) {
this.parent = parent;
this.actual = actual;
}
@Override
public void onSubscribe(final Disposable d) {
DisposableHelper.replace(parent, d);
}
@Override
public void onSuccess(final R value) {
actual.onSuccess(value);
}
@Override
public void onError(final Throwable e) {
actual.onError(e);
}
}
}
}
| [
"289776839@qq.com"
] | 289776839@qq.com |
f2680966d36494c41098e94a95ae189cf1795470 | eeb50e718d07116f4f0c8b6a6f79a5649bc896ca | /qidao-api-service-model/src/main/java/com/qidao/application/model/easemob/EasemobRemoveSuperAdminFromChatRoomReq.java | 54a594e0fde081bcffb766fae5fd3c53944bbe90 | [] | no_license | tzbgithub/keqidao2 | b161c3f7edc578bc9d70dd74a69785d150e048b1 | 6d3bc986a81b732b55d30e961773fd87b7dead14 | refs/heads/master | 2023-04-22T09:19:43.860468 | 2021-05-10T05:12:02 | 2021-05-10T05:12:02 | 365,924,451 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,234 | java | package com.qidao.application.model.easemob;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
/**
* @author : Ashiamd email: ashiamd@foxmail.com
* @date : 2021/3/15 10:41 AM
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "EasemobRemoveSuperAdminFromChatRoomReq", description = "[请求]移除超级管理员")
public class EasemobRemoveSuperAdminFromChatRoomReq implements Serializable {
@JsonIgnore
private static final long serialVersionUID = 1L;
@NotNull(message = "superAdmin,会员ID,不能为空")
@Min(value = 1,message = "superAdmin,会员ID,不正确")
@ApiModelProperty(name = "superAdmin", value = "超级管理员的会员ID", required = true, example = "139715821633537")
private Long superAdmin;
}
| [
"564858834@qq.com"
] | 564858834@qq.com |
793a9119365e7a9b03a3dd0b27735d30a415e379 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/18/18_6ac66a42425bdada85bc3d5aed2494cd020a475b/Properties/18_6ac66a42425bdada85bc3d5aed2494cd020a475b_Properties_t.java | 3edfff3d4d9e59319b4b5cb46abd0fad85548616 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 3,519 | java | package com.herocraftonline.dev.heroes.util;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.CreatureType;
import org.bukkit.entity.Player;
public class Properties {
// Debug Mode //
public boolean debug;
// Leveling//
public double power;
public int maxExp;
public int maxLevel;
public int[] levels;
public double expLoss;
public boolean levelsViaExpLoss = false;
public boolean masteryLoss = false;
// Experience//
public double partyBonus = 0;
public boolean resetExpOnClassChange = true;
public int blockTrackingDuration;
public int maxTrackedBlocks;
public double playerKillingExp = 0;
public boolean noSpawnCamp = false;
public int spawnCampRadius;
public Map<CreatureType, Double> creatureKillingExp = new HashMap<CreatureType, Double>();
public Map<Material, Double> miningExp = new HashMap<Material, Double>();
public Map<Material, Double> loggingExp = new HashMap<Material, Double>();
public Map<Material, Double> craftingExp = new HashMap<Material, Double>();
public Map<String, String> skillInfo = new HashMap<String, String>();
public Map<Player, Location> playerDeaths = new HashMap<Player, Location>();
// Default//
public String defClass;
public int defLevel;
public boolean resetOnDeath;
public int globalCooldown = 0;
public int pvpLevelRange = 50;
// Properties//
public boolean iConomy;
public ChatColor cColor;
public String prefix;
public int swapCost;
public boolean firstSwitchFree;
public boolean swapMasteryCost;
public boolean damageSystem;
// Bed Stuffs
public boolean bedHeal;
public int healInterval;
public int healPercent;
// Mana stuff
public int manaRegenPercent;
public int manaRegenInterval;
// Map Stuffs
public boolean mapUI;
public byte mapID;
public int mapPacketInterval;
// Worlds
public Set<String> disabledWorlds = new HashSet<String>();
// Stupid Hats...
public boolean allowHats;
// Prefix ClassName
public boolean prefixClassName;
/**
* Generate experience for the level ArrayList<Integer>
*/
public void calcExp() {
levels = new int[maxLevel + 1];
double A = maxExp * Math.pow(maxLevel - 1, -(power + 1));
for (int i = 0; i < maxLevel; i++) {
levels[i] = (int) (A * Math.pow(i, power + 1));
}
levels[maxLevel - 1] = maxExp;
levels[maxLevel] = (int) (A * Math.pow(maxLevel, power + 1));
}
public int getExperience(int level) {
if (level >= levels.length) {
return levels[levels.length - 1];
} else if (level < 1) {
return levels[0];
}
return levels[level - 1];
}
/**
* Convert the given Exp into the correct Level.
*
* @param exp
* @return
*/
public int getLevel(double exp) {
for (int i = maxLevel - 1; i >= 0; i--) {
if (exp >= levels[i]) {
return i + 1;
}
}
return -1;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
4d45dee8c9d19add81be63ad18840db6c16294d6 | 398524f05c72da98d29e927831e191ace556be7e | /smile/src/main/java/com/ning/metrics/serialization/smile/SmileEnvelopeEventsToSmileBucketEvents.java | 99b61990baa1c2d2054795c52a55ae4c4b1526f8 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | cott/serialization | a4152d246b23fb80efa50b8cc8c43486dfb37cdb | ebcd4f265f3449d4b2552db01b3413978b188067 | refs/heads/master | 2021-01-18T08:53:21.954336 | 2011-05-10T19:45:45 | 2011-05-10T19:45:45 | 1,583,546 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,218 | java | /*
* Copyright 2010-2011 Ning, Inc.
*
* Ning licenses this file to you under the Apache License, version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package com.ning.metrics.serialization.smile;
import com.ning.metrics.serialization.event.SmileBucketEvent;
import com.ning.metrics.serialization.event.SmileEnvelopeEvent;
import org.codehaus.jackson.JsonNode;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
public class SmileEnvelopeEventsToSmileBucketEvents
{
/**
* Given a list of SmileEnvelopeEvents, create the equivalent SmileBucketEvents.
* This utility function groups the events by name and output path.
* <p/>
* We return a list here as there may be multiple event types in the list.
* TODO This assumes that all events of same type share the same granularity. This is generally
* true in practice but isn't explicitly enforced generally (but here).
*
* @param events Json events to extracts
* @return a list of SmileBucketEvent, fully populated and ready to be shipped to the collector
*/
public static Collection<SmileBucketEvent> extractEvents(List<SmileEnvelopeEvent> events)
{
// MyEvent => {
// /2010/01/02/10/00 => SmileBucketEvent
// /2010/01/02/10/01 => SmileBucketEvent
// }
HashMap<String, HashMap<String, SmileBucketEvent>> finalEvents = new HashMap<String, HashMap<String, SmileBucketEvent>>();
String eventName;
String outputDir;
HashMap<String, SmileBucketEvent> eventsByPath;
SmileBucketEvent event;
for (SmileEnvelopeEvent envelope : events) {
eventName = envelope.getName();
// New event type?
if (finalEvents.get(eventName) == null) {
finalEvents.put(eventName, new HashMap<String, SmileBucketEvent>());
}
eventsByPath = finalEvents.get(eventName);
// New path?
// TODO This assumes same granularity for same event types
outputDir = envelope.getOutputDir("");
if (eventsByPath.get(outputDir) == null) {
eventsByPath.put(outputDir, new SmileBucketEvent(eventName, envelope.getGranularity(), envelope.getOutputDir(""), new SmileBucket()));
}
event = eventsByPath.get(outputDir);
event.getBucket().add((JsonNode) envelope.getData());
}
Collection<SmileBucketEvent> results = new ArrayList<SmileBucketEvent>();
for (HashMap<String, SmileBucketEvent> finalEventsByPath : finalEvents.values()) {
results.addAll(finalEventsByPath.values());
}
return results;
}
}
| [
"pierre@ning.com"
] | pierre@ning.com |
fdac21a3f89e904acb2a8311671dd7319bb51788 | d6ff89ae061592fee66873a62834409b9b096bcc | /mini-pms-21-f-client/app/src/main/java/com/eomcs/pms/handler/ProjectDetailHandler.java | 414ca3c0cade79bdd5aa609b6db7b89402aec0ad | [] | no_license | eomcs/eomcs-java-project-2021 | a2f7dbffc78b2112769a2c8a0a29eccf6184a040 | 5a592d4e95c302b2a0da98ef10f3cb6c70511464 | refs/heads/master | 2023-06-12T20:13:09.070353 | 2021-07-08T07:01:06 | 2021-07-08T07:01:06 | 314,989,117 | 3 | 4 | null | null | null | null | UTF-8 | Java | false | false | 834 | java | package com.eomcs.pms.handler;
import com.eomcs.driver.Statement;
import com.eomcs.util.Prompt;
public class ProjectDetailHandler implements Command {
Statement stmt;
public ProjectDetailHandler(Statement stmt) {
this.stmt = stmt;
}
@Override
public void service() throws Exception {
System.out.println("[프로젝트 상세보기]");
int no = Prompt.inputInt("번호? ");
String[] fields = stmt.executeQuery("project/select", Integer.toString(no)).next().split(",");
System.out.printf("프로젝트명: %s\n", fields[1]);
System.out.printf("내용: %s\n", fields[2]);
System.out.printf("시작일: %s\n", fields[3]);
System.out.printf("종료일: %s\n", fields[4]);
System.out.printf("관리자: %s\n", fields[5]);
System.out.printf("팀원: %s\n", fields[6]);
}
}
| [
"jinyoung.eom@gmail.com"
] | jinyoung.eom@gmail.com |
b865de037fd8c302b580d5bc847c2818246e330b | fa9c7cc793458184aab612536fb30d1df62010e0 | /Util/src/com/xuexiang/util/imageloader/lru/LruImageLoader.java | 3094fe24ec3d1e0c3df6dc2c748eb4f34f8d86b1 | [] | no_license | xdcs100/UtilXX | 1056e62b7b25af023b6a42b0f5b2826f1fd56f4d | 62ba9e5a5fef09ec5328bf624ab6c5c2c7522e39 | refs/heads/master | 2021-07-11T14:28:44.729444 | 2017-10-10T15:57:07 | 2017-10-10T15:57:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,511 | java | package com.xuexiang.util.imageloader.lru;
import android.graphics.Bitmap;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.target.BitmapImageViewTarget;
/**
* @author xx
* @Date 2017-5-25 上午11:30:55
*/
public class LruImageLoader {
/**
* 加载网络图片
* @param url
* @param imageView
*/
public static void loadImage(String url, ImageView imageView){
Bitmap bitmap = LruCacheUtils.getInstance().getBitmapFromMemCache(url);
if (bitmap != null) {
imageView.setImageBitmap(bitmap);
} else {
displayImageTarget(imageView, url, getTarget(imageView, url));
}
}
/**
* 加载图片 Target
*
* @param imageView
* @param target
* @param url
*/
public static void displayImageTarget(final ImageView imageView, final String url, BitmapImageViewTarget target) {
Glide.get(imageView.getContext()).with(imageView.getContext()).load(url).asBitmap()// 强制转换Bitmap
.diskCacheStrategy(DiskCacheStrategy.NONE).into(target);
}
/**
* 获取BitmapImageViewTarget
*/
private static BitmapImageViewTarget getTarget(ImageView imageView, final String url) {
return new BitmapImageViewTarget(imageView) {
@Override
protected void setResource(Bitmap resource) {
super.setResource(resource);
// 缓存Bitmap,以便于在没有用到时,自动回收
LruCacheUtils.getInstance().addBitmapToMemoryCache(url, resource);
}
};
}
}
| [
"xuexiangjys@163.com"
] | xuexiangjys@163.com |
ac69c5bcc598e5894be9c93aaa8b1d0dc7588244 | b47511b6df1eab637903215485c613be5b3c69f6 | /musci-manger/src/main/java/com/example/muscimanger/model/Security.java | ea7cf5eec01ea5fa58f10cfbbccaf179971ef17f | [] | no_license | wjk5342311/Music | 3bf49f40c1ff25beb88e248298a780b7b67c569b | 138b465a8a9bbf3049940b501da6aa740dba8772 | refs/heads/master | 2020-04-17T07:35:33.213129 | 2019-01-18T09:07:27 | 2019-01-18T09:07:27 | 166,376,430 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,118 | java | package com.example.muscimanger.model;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
@Component
@ConfigurationProperties(prefix = "music")
public class Security {
// 开关
private String enable;
// 允许地址
private String allowUrl;
// 用户允许功能
private String loginAllows;
// 服务器域名
private String domain;
public String getEnable() {
return enable;
}
public void setEnable(String enable) {
this.enable = enable;
}
public String getAllowUrl() {
return allowUrl;
}
public void setAllowUrl(String allowUrl) {
this.allowUrl = allowUrl;
}
public String getLoginAllows() {
return loginAllows;
}
public void setLoginAllows(String loginAllows) {
this.loginAllows = loginAllows;
}
public String getDomain() {
return domain;
}
public void setDomain(String domain) {
this.domain = domain;
}
}
| [
"your email"
] | your email |
8aaa0a6a46a1346c37ed6f33e7c7bb7d203fa82e | 9e9610df2de50fe3bc16d1865d7d503e0b4277a0 | /common/src/main/java/cn/sohu/jack/thinking/java/chapter14TypeInformation/Factory.java | 097dc4da98d0046aaa74536d1e7ec05c7a8b80c2 | [] | no_license | JackAbel/voyage | aba80e324dce768b212bffab747cca8f7e0a46ed | e7acbb4d3645a5e5bdbf05eb741f4e53561010de | refs/heads/master | 2022-12-01T21:26:16.392513 | 2020-09-28T11:49:03 | 2020-09-28T11:49:03 | 173,219,466 | 0 | 0 | null | 2022-11-16T05:51:51 | 2019-03-01T02:14:50 | Java | UTF-8 | Java | false | false | 187 | java | package cn.sohu.jack.thinking.java.chapter14TypeInformation;
/**
* @description:
* @author: Xiangbao Jin
* @since 2019/6/2 9:53 PM
*/
public interface Factory<T> {
T create();
}
| [
"xiangbaojin215867@sohu-inc.com"
] | xiangbaojin215867@sohu-inc.com |
ea894bbc5aad59f6d15569e94524a928b4b9fbcf | 0ccc52da246de44dfa85dbb3ecf40d3a948ebe7d | /banner/src/main/java/com/zsj/banner/transformer/BackgroundToForegroundTransformer.java | ace536ad78a5df72dcb3f3121704f7f88ae5f034 | [] | no_license | zsj6102/3dbanner | 6207c4dfa4979ec8d7178456b82db8ed8fc69855 | 8f531a47e6f2861e114dcd28ce46d687e245f202 | refs/heads/master | 2020-06-04T07:20:28.186994 | 2019-06-14T10:09:32 | 2019-06-14T10:09:32 | 191,921,678 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,171 | java | /*
* Copyright 2014 Toxic Bakery
*
* 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.zsj.banner.transformer;
import android.view.View;
public class BackgroundToForegroundTransformer extends ABaseTransformer {
@Override
protected void onTransform(View view, float position) {
final float height = view.getHeight();
final float width = view.getWidth();
final float scale = min(position < 0 ? 1f : Math.abs(1f - position), 0.5f);
view.setScaleX(scale);
view.setScaleY(scale);
view.setPivotX(width * 0.5f);
view.setPivotY(height * 0.5f);
view.setTranslationX(position < 0 ? width * position : -width * position * 0.25f);
}
}
| [
"610257110@qq.com"
] | 610257110@qq.com |
dead9e78cd157ed8f2227be14a427e3ae6c7be00 | a5333893a238e7c11c725decba5a6c2c0ddca652 | /app/src/main/java/lins/com/qz/utils/share/QShareUtil.java | 034459aa4366ae207ce24e57c44d093ed8a2e16c | [] | no_license | huohehuo/QZ | b45bc170f70d55be8070a8d0ae07e1437eb33367 | 13a6fb7347397888b83efbb2529560f86994e691 | refs/heads/master | 2020-06-02T21:57:40.473200 | 2018-04-04T14:37:53 | 2018-04-04T14:37:53 | 94,107,469 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 921 | java | package lins.com.qz.utils.share;
import android.os.Bundle;
import com.tencent.connect.share.QzoneShare;
import java.util.ArrayList;
import lins.com.qz.App;
/**
* Created by LINS on 2017/6/17.
*/
public class QShareUtil {
public void share(){
final Bundle params2 = new Bundle();
ArrayList<String> aa = new ArrayList<>();
aa.add("http://imgcache.qq.com/qzone/space_item/pre/0/66768.gif");
params2.putString(QzoneShare.SHARE_TO_QZONE_KEY_TYPE,"heheh");
params2.putString(QzoneShare.SHARE_TO_QQ_TITLE, "要分享的标题");
params2.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, "要分享的摘要");
params2.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, "http://www.baidu.com");
params2.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, aa);
// App.getTencent().shareToQzone(App.getContext(), params2, new QLoginListener(dataIO));
}
}
| [
"753392431@qq.com"
] | 753392431@qq.com |
df97ed9bfdf773353c8df0e7deb6331b91f0b8f2 | e47575168c4aa0d9c779f75fcb66a01c249324d2 | /spring_javabegin_ru/robot_spring_12/src/main/java/com/trl/main/Start.java | 26410fc946930b9a43854b63f290a412e44f1bf6 | [] | no_license | spring-framework-practices/spring-framework | bcc5ff37af0880b3c3ab0890b4573cbef57f049c | e699c6b081954a94f82dd378b69032d979bf01c2 | refs/heads/master | 2022-12-19T14:57:53.050824 | 2020-09-19T09:07:22 | 2020-09-19T09:07:22 | 296,826,271 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 641 | java | package com.trl.main;
import com.trl.impls.robot.ModelT1000;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Start {
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("ApplicationContext.xml");
ModelT1000 t1000 = (ModelT1000) context.getBean("t1000");
t1000.action();
((ConfigurableApplicationContext) context).close();// закрытие контекста вручную
}
}
| [
"tsyupryk.roman@gmail.com"
] | tsyupryk.roman@gmail.com |
22b3888fefc221096cc8d6f5eb5638dc4f01a8c1 | 066dcf95d870eb4537f148c2ff74fbed6820630b | /src/API/amazon/mws/xml/JAXB/FreeLengthString.java | 1f4f3d4130d3b210d2799ebd29782633eef68491 | [
"MIT"
] | permissive | VDuda/SyncRunner-Pub | 0e24f864d24aa9d6112ba225156b7c765596186b | ab6b291178c08754b84f60d39e54b3ae889d476b | refs/heads/master | 2022-11-17T03:43:38.054868 | 2022-08-11T15:02:11 | 2022-08-11T15:02:11 | 28,209,628 | 3 | 5 | MIT | 2022-10-22T16:10:55 | 2014-12-19T01:45:41 | Java | UTF-8 | Java | false | false | 4,665 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.05.03 at 03:15:27 PM EDT
//
package API.amazon.mws.xml.JAXB;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="value" minOccurs="0">
* <complexType>
* <simpleContent>
* <extension base="<>MeasurementType">
* <attribute name="unitValue" use="required" type="{}DimensionType" />
* </extension>
* </simpleContent>
* </complexType>
* </element>
* </sequence>
* <attribute name="delete" type="{}BooleanType" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"value"
})
@XmlRootElement(name = "free_length_string")
public class FreeLengthString {
protected FreeLengthString.Value value;
@XmlAttribute(name = "delete")
protected BooleanType delete;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link FreeLengthString.Value }
*
*/
public FreeLengthString.Value getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link FreeLengthString.Value }
*
*/
public void setValue(FreeLengthString.Value value) {
this.value = value;
}
/**
* Gets the value of the delete property.
*
* @return
* possible object is
* {@link BooleanType }
*
*/
public BooleanType getDelete() {
return delete;
}
/**
* Sets the value of the delete property.
*
* @param value
* allowed object is
* {@link BooleanType }
*
*/
public void setDelete(BooleanType value) {
this.delete = value;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <simpleContent>
* <extension base="<>MeasurementType">
* <attribute name="unitValue" use="required" type="{}DimensionType" />
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"value"
})
public static class Value {
@XmlValue
protected String value;
@XmlAttribute(name = "unitValue", required = true)
protected String unitValue;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the unitValue property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUnitValue() {
return unitValue;
}
/**
* Sets the value of the unitValue property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUnitValue(String value) {
this.unitValue = value;
}
}
}
| [
"volod2010@gmail.com"
] | volod2010@gmail.com |
a737333c7e622efe2432b8d3dd4fa710aa9268a1 | 542f352614185ea134355b61a8ee11d5e7d713af | /dlfc-zfgj-V1.5.0/dlfc-zfgj-sign/src/main/java/com/housecenter/dlfc/modules/sign/entity/UsrSignInfo.java | 62ce03ee303da30afa49581ddc73d34f0a752e3d | [] | no_license | iversonwuwei/zfgj-spring-boot-1.0.0 | 1798d3af99bd8a658e206f12627deef04d016ec9 | 2a28568290edd17ac557b878e095e824d8b5d1ed | refs/heads/master | 2021-01-25T09:31:51.563362 | 2017-06-09T10:08:33 | 2017-06-09T10:10:08 | 93,845,536 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,865 | java | package com.housecenter.dlfc.modules.sign.entity;
import com.dlfc.admin.common.persistence.MyDataEntity;
import java.io.Serializable;
import java.util.Date;
public class UsrSignInfo extends MyDataEntity<UsrSignInfo> implements Serializable {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column usr_sign_info.PINDEX
*
* @mbggenerated Mon Dec 05 17:53:56 CST 2016
*/
private Integer pindex;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column usr_sign_info.UEID
*
* @mbggenerated Mon Dec 05 17:53:56 CST 2016
*/
private String ueid;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column usr_sign_info.SDATE
*
* @mbggenerated Mon Dec 05 17:53:56 CST 2016
*/
private Date sdate;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table usr_sign_info
*
* @mbggenerated Mon Dec 05 17:53:56 CST 2016
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column usr_sign_info.PINDEX
*
* @return the value of usr_sign_info.PINDEX
*
* @mbggenerated Mon Dec 05 17:53:56 CST 2016
*/
public Integer getPindex() {
return pindex;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column usr_sign_info.PINDEX
*
* @param pindex the value for usr_sign_info.PINDEX
*
* @mbggenerated Mon Dec 05 17:53:56 CST 2016
*/
public void setPindex(Integer pindex) {
this.pindex = pindex;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column usr_sign_info.UEID
*
* @return the value of usr_sign_info.UEID
*
* @mbggenerated Mon Dec 05 17:53:56 CST 2016
*/
public String getUeid() {
return ueid;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column usr_sign_info.UEID
*
* @param ueid the value for usr_sign_info.UEID
*
* @mbggenerated Mon Dec 05 17:53:56 CST 2016
*/
public void setUeid(String ueid) {
this.ueid = ueid == null ? null : ueid.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column usr_sign_info.SDATE
*
* @return the value of usr_sign_info.SDATE
*
* @mbggenerated Mon Dec 05 17:53:56 CST 2016
*/
public Date getSdate() {
return sdate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column usr_sign_info.SDATE
*
* @param sdate the value for usr_sign_info.SDATE
*
* @mbggenerated Mon Dec 05 17:53:56 CST 2016
*/
public void setSdate(Date sdate) {
this.sdate = sdate;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table usr_sign_info
*
* @mbggenerated Mon Dec 05 17:53:56 CST 2016
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", pindex=").append(pindex);
sb.append(", ueid=").append(ueid);
sb.append(", sdate=").append(sdate);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
} | [
"wuwei@housecenter.cn"
] | wuwei@housecenter.cn |
d9e29276afdeafcb046769aa7b0fc278c682c130 | 082e26b011e30dc62a62fae95f375e4f87d9e99c | /docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/protocal/protobuf/boo.java | b5de918288656ed1c74627dbb739982811a4f635 | [] | no_license | xsren/AndroidReverseNotes | 9631a5aabc031006e795a112b7ac756a8edd4385 | 9202c276fe9f04a978e4e08b08e42645d97ca94b | refs/heads/master | 2021-04-07T22:50:51.072197 | 2019-07-16T02:24:43 | 2019-07-16T02:24:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,113 | java | package com.tencent.mm.protocal.protobuf;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.bt.a;
public final class boo extends a {
public String info;
public int wcL;
public int wcM;
public final int op(int i, Object... objArr) {
AppMethodBeat.i(94551);
int bs;
if (i == 0) {
e.a.a.c.a aVar = (e.a.a.c.a) objArr[0];
aVar.iz(1, this.wcL);
aVar.iz(2, this.wcM);
if (this.info != null) {
aVar.e(3, this.info);
}
AppMethodBeat.o(94551);
return 0;
} else if (i == 1) {
bs = (e.a.a.b.b.a.bs(1, this.wcL) + 0) + e.a.a.b.b.a.bs(2, this.wcM);
if (this.info != null) {
bs += e.a.a.b.b.a.f(3, this.info);
}
AppMethodBeat.o(94551);
return bs;
} else if (i == 2) {
e.a.a.a.a aVar2 = new e.a.a.a.a((byte[]) objArr[0], unknownTagHandler);
for (bs = a.getNextFieldNumber(aVar2); bs > 0; bs = a.getNextFieldNumber(aVar2)) {
if (!super.populateBuilderWithField(aVar2, this, bs)) {
aVar2.ems();
}
}
AppMethodBeat.o(94551);
return 0;
} else if (i == 3) {
e.a.a.a.a aVar3 = (e.a.a.a.a) objArr[0];
boo boo = (boo) objArr[1];
switch (((Integer) objArr[2]).intValue()) {
case 1:
boo.wcL = aVar3.BTU.vd();
AppMethodBeat.o(94551);
return 0;
case 2:
boo.wcM = aVar3.BTU.vd();
AppMethodBeat.o(94551);
return 0;
case 3:
boo.info = aVar3.BTU.readString();
AppMethodBeat.o(94551);
return 0;
default:
AppMethodBeat.o(94551);
return -1;
}
} else {
AppMethodBeat.o(94551);
return -1;
}
}
}
| [
"alwangsisi@163.com"
] | alwangsisi@163.com |
1f9e8280a717e7d05b02196fbe883a94e1b987ed | 097df92ce1bfc8a354680725c7d10f0d109b5b7d | /com/amazon/ws/emr/hadoop/fs/shaded/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBVersionAttribute.java | 0edb12511f2d45ee49be0c568a4957b4c5fca5e9 | [] | no_license | cozos/emrfs-hadoop | 7a1a1221ffc3aa8c25b1067cf07d3b46e39ab47f | ba5dfa631029cb5baac2f2972d2fdaca18dac422 | refs/heads/master | 2022-10-14T15:03:51.500050 | 2022-10-06T05:38:49 | 2022-10-06T05:38:49 | 233,979,996 | 2 | 2 | null | 2022-10-06T05:41:46 | 2020-01-15T02:24:16 | Java | UTF-8 | Java | false | false | 701 | java | package com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.dynamodbv2.datamodeling;
import java.lang.annotation.Annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@DynamoDB
@DynamoDBVersioned
@Retention(RetentionPolicy.RUNTIME)
@Target({java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD})
public @interface DynamoDBVersionAttribute
{
String attributeName() default "";
}
/* Location:
* Qualified Name: com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBVersionAttribute
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"Arwin.tio@adroll.com"
] | Arwin.tio@adroll.com |
f5cde5739f0e7680789de141249ea19da9a3e56d | 5089694edc6ac28236c08d313f9c1cf499f4937a | /chapter_007/src/main/java/ru/job4j/servletpool/servlets/RolesServlet.java | 5a706fa9e7c1fcf019c455b727e6e76719736a59 | [
"Apache-2.0"
] | permissive | vaticorp/ssabirov | b69bda554beb0181e2a5090dcbe32ae410eabaa9 | 6e46e4b92328b70964a2e4ff920e7f0dc1148913 | refs/heads/master | 2021-07-16T19:10:52.133809 | 2018-12-02T18:18:13 | 2018-12-02T18:18:13 | 118,024,232 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 740 | java | package ru.job4j.servletpool.servlets;
import ru.job4j.servletpool.db.UserStore;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* This class represents servlet for edit roles.
* @author Svyatoslav Sabirov.
* @since 11.04.2018
* @version 9.
*/
public class RolesServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
req.setAttribute("roles", UserStore.INSTANCE.getRoles());
req.getRequestDispatcher("/WEB-INF/views/rules.jsp").forward(req, resp);
}
}
| [
"vaticorp@mail.ru"
] | vaticorp@mail.ru |
e153a5f1f1621772086f10a076aa4459607d4844 | 20eb62855cb3962c2d36fda4377dfd47d82eb777 | /IntroClassJava/dataset/smallest/3b2376ab97bb5d1a5dbbf2b45cf062db320757549c761936d19df05e856de894e45695014cd8063cdc22148b13fa1803b3c9e77356931d66f4fbec0efacf7829/006/mutations/197/smallest_3b2376ab_006.java | ab8d7c2c0ec2cf2f4035e4745e732abb9c39ceeb | [] | no_license | ozzydong/CapGen | 356746618848065cce4e253e5d3c381baa85044a | 0ba0321b6b1191443276021f1997833342f02515 | refs/heads/master | 2023-03-18T20:12:02.923428 | 2020-08-21T03:08:28 | 2020-08-21T03:08:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,104 | java | package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class smallest_3b2376ab_006 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
smallest_3b2376ab_006 mainClass = new smallest_3b2376ab_006 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj n1 = new IntObj (), n2 = new IntObj (), n3 = new IntObj (), n4 =
new IntObj (), small = new IntObj ();
output +=
(String.format ("Please enter 4 numbers seperated by spaces > "));
n1.value = scanner.nextInt ();
n2.value = scanner.nextInt ();
n3.value = scanner.nextInt ();
n4.value = scanner.nextInt ();
small.value = n1.value;
if (n2.value < n1.value) {
if (true) return ;
small.value = n2.value;
}
if (n3.value < n2.value) {
small.value = n3.value;
}
if (n4.value < n3.value) {
small.value = n4.value;
} else if (n4.value < n1.value) {
small.value = n4.value;
}
output += (String.format ("%d is the smallest", small.value));
if (true)
return;;
}
}
| [
"justinwm@163.com"
] | justinwm@163.com |
939506c40725a00ad0f7d691ad28554133b4e5e4 | 1748053ae0229c37da6eec429b9f47fc9d836f54 | /shengka-media-common/src/main/java/com/geek/shengka/common/exception/BaseException.java | 4e51e3c6e1389d25aadab8948b67b213f9c4b07e | [] | no_license | chaochaoGT/shangka | 54d2a436a2a0348b7d4f2a994dc657dd3a3e8fa2 | e43f7d7c26db15974e0ddc612a3ee16c9360b36a | refs/heads/master | 2023-02-28T03:37:11.085305 | 2021-02-05T13:15:36 | 2021-02-05T13:15:36 | 336,273,377 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 892 | java | package com.geek.shengka.common.exception;
/**
* Created by ace on 2017/9/8.
*/
public class BaseException extends RuntimeException {
private int status = 200;
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public BaseException() {
}
public BaseException(String message,int status) {
super(message);
this.status = status;
}
public BaseException(String message) {
super(message);
}
public BaseException(String message, Throwable cause) {
super(message, cause);
}
public BaseException(Throwable cause) {
super(cause);
}
public BaseException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}
| [
"952904879@qq.com"
] | 952904879@qq.com |
7a1fca0c4c0ef0fac140fad8e9cacee8457027ac | b6298b6427aa127dc0195e8532bcc1595b5d2634 | /rights/rights-client/src/main/java/com/iwhalecloud/retail/rights/dto/CouponApplyObjectDTO.java | 68c4340da29e165ae9167cdf3f1855f710fa4bc3 | [] | no_license | chenmget/spring-cloud-demo | 2ecbdeeb5102dc7523ef9fc59a405fc5c77bf6ad | 0b4100973d2f6525883e0e73f000ac6e9c0b9060 | refs/heads/release | 2022-07-17T13:41:20.595393 | 2020-04-02T07:40:19 | 2020-04-02T07:40:19 | 249,857,665 | 1 | 3 | null | 2022-06-29T18:02:22 | 2020-03-25T01:23:07 | Java | UTF-8 | Java | false | false | 2,515 | java | package com.iwhalecloud.retail.rights.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 记录优惠券与能优惠的对象,如商品、销售品、产品、积分等。
* @author generator
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "对应模型COUPON_APPLY_OBJECT, 对应实体CouponApplyObject类")
public class CouponApplyObjectDTO implements Serializable {
private static final long serialVersionUID = 1L;
//属性 begin
/**
* 优惠券适用对象标识
*/
@ApiModelProperty(value = "优惠券适用对象标识")
private java.lang.String applyObjectId;
/**
* 优惠券标识
*/
@ApiModelProperty(value = "优惠券标识")
private java.lang.String mktResId;
/**
* 适用对象类型LOVB=RES-C-0044
商品、销售品、积分等
*/
@ApiModelProperty(value = "适用对象类型LOVB=RES-C-0044商品、销售品、积分等")
private java.lang.String objType;
/**
* 适用对象标识
兑换关系:记录A端营销资源能够兑换的Z端营销资源,如优惠券适用兑换的商品。
*/
@ApiModelProperty(value = "适用对象标识兑换关系:记录A端营销资源能够兑换的Z端营销资源,如优惠券适用兑换的商品。")
private java.lang.String objId;
/**
* 记录状态。LOVB=PUB-C-0001。
*/
@ApiModelProperty(value = "记录状态。LOVB=PUB-C-0001。")
private java.lang.String statusCd;
/**
* 记录状态变更的时间。
*/
@ApiModelProperty(value = "记录状态变更的时间。")
private java.util.Date statusDate;
/**
* 记录首次创建的员工标识。
*/
@ApiModelProperty(value = "记录首次创建的员工标识。")
private java.lang.String createStaff;
/**
* 记录首次创建的时间。
*/
@ApiModelProperty(value = "记录首次创建的时间。")
private java.util.Date createDate;
/**
* 记录每次修改的员工标识。
*/
@ApiModelProperty(value = "记录每次修改的员工标识。")
private java.lang.String updateStaff;
/**
* 记录每次修改的时间。
*/
@ApiModelProperty(value = "记录每次修改的时间。")
private java.util.Date updateDate;
/**
* 备注
*/
@ApiModelProperty(value = "备注")
private java.lang.String remark;
} | [
"0027007822@iwhalecloud.com"
] | 0027007822@iwhalecloud.com |
dd230ac849bed00be2394f8fbb6edf7372d5c0aa | 49173cbef50edadc5ef33f9baf7939d4df9b063f | /distribute-paxos/src/main/java/com/abin/lee/distribute/algorithm/classic/impl/ProposerImpl.java | a95cfcaeb10a3bce46987af67aebd528481bbd80 | [] | no_license | ywendy/distribute-algorithm | d45ee3af360ff9856f54dfa1f71d81ee87b8063e | 46ad78f56b39aa7e894ab9880a481c00954acaf4 | refs/heads/master | 2020-06-11T16:39:10.498719 | 2018-04-25T14:55:49 | 2018-04-25T14:55:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,169 | java | package com.abin.lee.distribute.algorithm.classic.impl;
import com.abin.lee.distribute.algorithm.classic.*;
import com.abin.lee.distribute.algorithm.classic.message.*;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference;
public class ProposerImpl implements Proposer {
private final int totalAcceptors;
private final NetworkDelivery delivery;
private final String id;
private AtomicLong currentProposalNumber = new AtomicLong(0);
private AtomicLong highestProposalNumberAccepted = new AtomicLong(Long.MIN_VALUE);
private AtomicReference<String> valueOfHigestProper = new AtomicReference<String>();
private AtomicInteger numberOfResponseSeenSoFar = new AtomicInteger(0);
private Set<String> acceptsToSend = new HashSet<String>();
public ProposerImpl(int totalAcceptors, NetworkDelivery delivery, String id){
this.totalAcceptors = totalAcceptors;
this.delivery = delivery;
this.id = id;
}
@Override
public String getId(){
return id;
}
@Override
public void receiveMessage(SourceDestination sd, Message m) {
if(MessageType.PrepareResponse.equals(m.getMessageType())){
receivePrepare((PrepareResponse)m);
}
}
@Override
public void propose(String proposedValue) {
Set<Component> acceptors = delivery.getComponents(ComponentType.ACCEPTOR);
currentProposalNumber.set(generateUniqueProposalNumber());
// System.out.println("Size of acceptors " + acceptors.size());
Set<Component> randomMajorityAcceptors = new HashSet<Component>();
while(randomMajorityAcceptors.size() <= acceptors.size()/2){
for(Component acceptor : acceptors){
if(Math.random() > 0.5){
randomMajorityAcceptors.add(acceptor);
}
}
}
// System.out.println("Proposer Sending proposal to " + randomMajorityAcceptors.size());
for(Component acceptor : randomMajorityAcceptors){
String destinationId = acceptor.getId();
// System.out.println("Sending proposal number " + currentProposalNumber + " " + destinationId);
PrepareRequest pr = new PrepareRequest(currentProposalNumber.get(), id);
delivery.deliverMessage(new SourceDestination(id, destinationId), pr);
}
int retry = 0;
while(numberOfResponseSeenSoFar.get() <= totalAcceptors/2){
try {
// System.out.println("Proposer " + id + " sleeping and waiting for majority of acceptors");
Thread.sleep(2000);
} catch (InterruptedException e) {
}
retry++;
if(retry > 10){
reset();
return;
}
}
// System.out.println("Proposer Sending accepts to " + acceptsToSend);
for(String destinationId : acceptsToSend){
AcceptRequest r = new AcceptRequest();
r.setProposalNumber(currentProposalNumber.get());
if(valueOfHigestProper.get() != null){
r.setValue(valueOfHigestProper.get());
}
r.setValue(proposedValue);
// System.out.println("Proposer Sending accept request to " + r);
delivery.deliverMessage(new SourceDestination(id, destinationId), r);
}
reset();
}
private synchronized void reset(){
acceptsToSend.clear();
numberOfResponseSeenSoFar.getAndSet(0);
valueOfHigestProper.getAndSet(null);
currentProposalNumber.getAndSet(0);
highestProposalNumberAccepted.getAndSet(Long.MIN_VALUE);
}
@Override
public synchronized void receivePrepare(PrepareResponse r) {
// System.out.println("Proposer Received response " + r + " " + currentProposalNumber.get());
if(currentProposalNumber.get() != r.getProposalNumberInPrepare()){
// System.out.println("Proposer Rejecting response from older request " + r);
return;
}
if(acceptsToSend.contains(r.getSourceId())){
// System.out.println("Proposer Duplicate message from " + r.getSourceId());
return;
}
if(numberOfResponseSeenSoFar.get() > totalAcceptors/2){
// System.out.println("Proposer Rejecting request since we have majority already spoken");
return;
}
if(r.getProposalValue() != null){
if(highestProposalNumberAccepted.get() < r.getProposalNumber()){
highestProposalNumberAccepted.getAndSet(r.getProposalNumber());
valueOfHigestProper.getAndSet(r.getProposalValue());
}
}else{
acceptsToSend.add(r.getSourceId());
}
numberOfResponseSeenSoFar.incrementAndGet();
}
private long generateUniqueProposalNumber(){
long currentTime = System.currentTimeMillis()*10000;
int random = (int)(Math.random()*10000);
return currentTime + random;
}
}
| [
"zondahuman@gmail.com"
] | zondahuman@gmail.com |
9d1689d4d710f979569e00d33092e47381416020 | 2ea1ca34b31d73d1ca8732cc3ed45668e8cdaab0 | /permission/permission-component/src/main/java/com/qcloud/component/permission/dao/mysql/ResourcesDaoMysqlImpl.java | 152ad84c1783adccdc2d9c9d9481613b0a751841 | [] | no_license | ChiRain/snaker | 07008c6aa07f10ac79f1787b4969f5e45a9c19e5 | 808945ca4fe5e7b11a969531fd0801a571c21c17 | refs/heads/master | 2021-01-18T01:48:44.523645 | 2016-07-26T06:04:15 | 2016-07-26T06:04:15 | 65,979,224 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,538 | java | package com.qcloud.component.permission.dao.mysql;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Resource;
import org.springframework.stereotype.Repository;
import org.apache.commons.lang.NotImplementedException;
import com.qcloud.pirates.data.Page;
import com.qcloud.pirates.data.sql.mybatis.SqlOperator;
import com.qcloud.component.permission.dao.ResourcesDao;
import com.qcloud.component.permission.model.Resources;
@Repository
public class ResourcesDaoMysqlImpl implements ResourcesDao {
@Resource(name = "sqlOperator-permission")
private SqlOperator sqlOperator;
@Override
public boolean add(Resources resources) {
return sqlOperator.insert("com.qcloud.component.permission.dao.mysql.mapper.ResourcesMapper.insert", resources) == 1;
}
@Override
public Resources get(Long id) {
return sqlOperator.selectOne("com.qcloud.component.permission.dao.mysql.mapper.ResourcesMapper.get", id);
}
@Override
public boolean delete(Long id) {
return sqlOperator.delete("com.qcloud.component.permission.dao.mysql.mapper.ResourcesMapper.delete", id) > 0;
}
@Override
public boolean update(Resources resources) {
return sqlOperator.update("com.qcloud.component.permission.dao.mysql.mapper.ResourcesMapper.update", resources) > 0;
}
@Override
public List<Resources> list(List<Long> idList) {
throw new NotImplementedException();
}
@Override
public Map<Long, Resources> map(Set<Long> idSet) {
throw new NotImplementedException();
}
@Override
public Page<Resources> page(int start, int count) {
Map<String, Object> param = new HashMap<String, Object>();
param.put("start", start);
param.put("count", count);
List<Resources> list = sqlOperator.selectList("com.qcloud.component.permission.dao.mysql.mapper.ResourcesMapper.list4page", param);
int total = sqlOperator.selectOne("com.qcloud.component.permission.dao.mysql.mapper.ResourcesMapper.count4page", param);
Page<Resources> page = new Page<Resources>();
page.setCount(total);
page.setData(list);
return page;
}
@Override
public Resources getByClassifyId(long classifyId) {
return sqlOperator.selectOne("com.qcloud.component.permission.dao.mysql.mapper.ResourcesMapper.getByClassifyId", classifyId);
}
}
| [
"lihuashan@ed19df75-bd51-b445-9863-9e54940520a8"
] | lihuashan@ed19df75-bd51-b445-9863-9e54940520a8 |
39573dab6d785ed7f0165ce058f20d921f193593 | 4ccf3b2ccfdbb49130bcf35ee6bdbc8fa6598862 | /src/main/java/com/clownfish7/adapter/classadapter/VoltageAdapter.java | 5b064bb5ca7f9a0be5d3e6782dcf1700448b8e28 | [] | no_license | shenjiachun/DesignPattern-1 | 112d2a535f1c8cefcdf9026616046234759ef25c | 0cbd13875c6b23b1a60ebfbaab74fdda29a38bc6 | refs/heads/master | 2020-07-11T17:27:01.991359 | 2019-07-27T16:45:34 | 2019-07-27T16:45:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 354 | java | package com.clownfish7.adapter.classadapter;
/**
* @author yzy
* @classname VoltageAdapter
* @description TODO
* @create 2019-07-26 10:04
*/
public class VoltageAdapter extends Voltage220V implements IVoltage5V {
@Override
public int output5V() {
int srcV = output220V();
int dstV = srcV / 44;
return dstV;
}
}
| [
"279505647@qq.com"
] | 279505647@qq.com |
1ab766a4461f7a2937de18cc0fb7a5f87ed50dd8 | 3a3c5f2225905f0f249deeabd3f439acd61ae000 | /greetgo.mvc.war.example/src/kz/greetgo/mvc/war/example/controllers/RootController.java | 552167c063e7c2e67c355aa7ce991a9563c850b0 | [] | no_license | boschliuye/greetgo.mvc | d370b84d31b1ccf367d9c5deafb95fba1941bfc4 | 7be1c3b8f5e501ab31837a635fefc6033cbe4fed | refs/heads/master | 2020-07-10T00:47:06.878501 | 2019-06-28T04:23:00 | 2019-06-28T04:23:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 692 | java | package kz.greetgo.mvc.war.example.controllers;
import kz.greetgo.mvc.annotations.on_methods.OnGet;
import kz.greetgo.mvc.annotations.Par;
import kz.greetgo.mvc.model.MvcModel;
import kz.greetgo.mvc.model.Redirect;
public class RootController {
@OnGet({"/", ""})
public Redirect root() {
return Redirect.to("/");
}
@OnGet("/index")
public String index() {
return "index.jsp";
}
@OnGet("/asd")
public String asd(
@Par("param1") String requestParam1,
@Par("param2") Long requestParam2,
MvcModel model
) {
model.setParam("param1", "param 1 value : " + requestParam1);
model.setParam("param2", 234L + requestParam2);
return "asd.jsp";
}
}
| [
"ekolpakov@greet-go.com"
] | ekolpakov@greet-go.com |
49238faa19287a8ccb3812a2c885661cf6fdbc83 | 8f94a20418f259e5062f3e4b2b45ebe67bd45af5 | /src/test/java/org/elasticsearch/hadoop/integration/pig/PigSearchJsonTest.java | 6b20245a9d9c84913340a85962362bf8337effa6 | [
"Apache-2.0"
] | permissive | w2ogroup/elasticsearch-hadoop | 5ee5f215ab701bfed87e23dfb7a3334c6bcf8a7c | 476d1c51e13f476cff11a1feb96b2f0be403a1de | refs/heads/master | 2021-01-21T08:32:39.578350 | 2014-02-04T12:55:18 | 2014-02-04T12:55:18 | 16,517,963 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,535 | java | /*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.hadoop.integration.pig;
import java.util.Collection;
import org.elasticsearch.hadoop.integration.Provisioner;
import org.elasticsearch.hadoop.integration.QueryTestParams;
import org.elasticsearch.hadoop.util.RestUtils;
import org.elasticsearch.hadoop.util.StringUtils;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class PigSearchJsonTest {
static PigWrapper pig;
@Parameters
public static Collection<Object[]> queries() {
return QueryTestParams.params();
}
private final String query;
public PigSearchJsonTest(String query) {
this.query = query;
}
@BeforeClass
public static void startup() throws Exception {
pig = new PigWrapper();
pig.start();
}
@AfterClass
public static void shutdown() {
pig.stop();
}
@Test
public void testNestedField() throws Exception {
String data = "{ \"data\" : { \"map\" : { \"key\" : 10 } } }";
RestUtils.putData("json-pig/nestedmap", StringUtils.toUTF(data));
//RestUtils.waitForYellow("json-hive");
RestUtils.refresh("json-pig");
String script =
"REGISTER "+ Provisioner.ESHADOOP_TESTING_JAR + ";" +
"DEFINE EsStorage org.elasticsearch.hadoop.pig.EsStorage('es.mapping.names=nested:data.map.key');" +
//"A = LOAD 'json-pig/nestedmap' USING EsStorage() AS (nested:tuple(key:int));" +
"A = LOAD 'json-pig/nestedmap' USING EsStorage() AS (nested:chararray);" +
"DESCRIBE A;" +
"X = LIMIT A 3;" +
"DUMP X;";
pig.executeScript(script);
// script =
// "REGISTER "+ Provisioner.ESHADOOP_TESTING_JAR + ";" +
// "DEFINE EsStorage org.elasticsearch.hadoop.pig.EsStorage('es.query=" + query + "','es.mapping.names=nested:data.map');" +
// "A = LOAD 'json-pig/nestedmap' USING EsStorage() AS (key:chararray, value:);" +
// "DESCRIBE A;" +
// "X = LIMIT A 3;" +
// "DUMP X;";
// pig.executeScript(script);
}
@Test
public void testTuple() throws Exception {
String script =
"REGISTER "+ Provisioner.ESHADOOP_TESTING_JAR + ";" +
"DEFINE EsStorage org.elasticsearch.hadoop.pig.EsStorage('es.query=" + query + "');" +
"A = LOAD 'json-pig/tupleartists' USING EsStorage();" +
"X = LIMIT A 3;" +
//"DESCRIBE A;";
"DUMP X;";
pig.executeScript(script);
}
@Test
public void testTupleWithSchema() throws Exception {
String script =
"REGISTER "+ Provisioner.ESHADOOP_TESTING_JAR + ";" +
"DEFINE EsStorage org.elasticsearch.hadoop.pig.EsStorage('es.query=" + query + "');" +
"A = LOAD 'json-pig/tupleartists' USING EsStorage() AS (name:chararray);" +
//"DESCRIBE A;" +
"X = LIMIT A 3;" +
"DUMP X;";
pig.executeScript(script);
}
@Test
public void testFieldAlias() throws Exception {
String script =
"REGISTER "+ Provisioner.ESHADOOP_TESTING_JAR + ";" +
"DEFINE EsStorage org.elasticsearch.hadoop.pig.EsStorage('es.query="+ query + "');"
+ "A = LOAD 'json-pig/fieldalias' USING EsStorage();"
+ "X = LIMIT A 3;"
+ "DUMP X;";
pig.executeScript(script);
}
@Test
public void testMissingIndex() throws Exception {
String script =
"REGISTER "+ Provisioner.ESHADOOP_TESTING_JAR + ";" +
"DEFINE EsStorage org.elasticsearch.hadoop.pig.EsStorage('es.index.read.missing.as.empty=true','es.query=" + query + "');"
+ "A = LOAD 'foo/bar' USING EsStorage();"
+ "X = LIMIT A 3;"
+ "DUMP X;";
pig.executeScript(script);
}
@Test
public void testParentChild() throws Exception {
String script =
"REGISTER "+ Provisioner.ESHADOOP_TESTING_JAR + ";" +
"DEFINE EsStorage org.elasticsearch.hadoop.pig.EsStorage('es.index.read.missing.as.empty=true','es.query=" + query + "');"
+ "A = LOAD 'json-pig/child' USING EsStorage();"
+ "X = LIMIT A 3;"
+ "DUMP X;";
pig.executeScript(script);
}
} | [
"costin.leau@gmail.com"
] | costin.leau@gmail.com |
60d1c7dc473b228a1822ed2ef648ea8d600029c9 | b7fd78c84aaee5c396be7ec16e096ffcf60942bc | /Exercise JSON Processing/produtcsShop/src/main/java/app/repository/ProductRepository.java | 6aacaa5dd4f567da2a6f8ac41b34ff96e4ca348d | [] | no_license | BalioFVFX/Databases-Frameworks-Hibernate-Spring-Data-October-2018 | 163917808acaedb7d99fd1941c96696a261bc01d | 00c5fcc1d1fa1ca991c41f8cb88732906283bb68 | refs/heads/master | 2020-04-02T18:36:38.774589 | 2018-12-15T12:47:27 | 2018-12-15T12:47:27 | 154,706,567 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 630 | java | package app.repository;
import app.entity.Product;
import app.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import java.math.BigDecimal;
import java.util.List;
@Repository
public interface ProductRepository extends JpaRepository<Product, Long> {
List<Product> findAllByPriceGreaterThanEqualAndPriceLessThanEqualOrderByPriceAsc(BigDecimal lowerPrice, BigDecimal greaterPrice);
@Query(value = "SELECT u FROM app.entity.Product as p join app.entity.User as u")
List<User> query2();
}
| [
"vfxbaliof@gmail.com"
] | vfxbaliof@gmail.com |
6394a7ba89a997aa2f9bee2bf86f0a414dd21f79 | e75be673baeeddee986ece49ef6e1c718a8e7a5d | /submissions/blizzard/Corpus/eclipse.jdt.ui/2966.java | 01d5119cd904708ff6559973a3794d0df199cfce | [
"MIT"
] | permissive | zhendong2050/fse18 | edbea132be9122b57e272a20c20fae2bb949e63e | f0f016140489961c9e3c2e837577f698c2d4cf44 | refs/heads/master | 2020-12-21T11:31:53.800358 | 2018-07-23T10:10:57 | 2018-07-23T10:10:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 157 | java | //rename to: k
package p;
class A {
int k;
void m() {
/*[*/
A /*]*/
i = new A();
i.k = i.k;
}
}
| [
"tim.menzies@gmail.com"
] | tim.menzies@gmail.com |
29da0c726c5f7233e60a3261409b04324de0e02d | ac592e6431b66f34f3219656176d52c22a0e41cc | /network_monitoring_sd/src/main/java/com/gw/firePower/controller/FirePowerController.java | c514c9606bb036b19125637032c1327f36d64088 | [] | no_license | leijie-git/project | a19b7beab3982912ea45ae3eecc18953b59c5642 | dcac5819341c5712efb8201c61dfc3629d7f9a3b | refs/heads/master | 2022-07-10T23:19:36.331798 | 2019-10-17T02:58:38 | 2019-10-17T02:58:38 | 215,679,145 | 1 | 0 | null | 2022-06-29T17:43:00 | 2019-10-17T01:43:31 | JavaScript | UTF-8 | Java | false | false | 630 | java | package com.gw.firePower.controller;
import com.gw.myAnnotation.PassToken;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping("/firePower")
public class FirePowerController {
@PassToken
@RequestMapping("/firePowerManage")
public String firePowerManage(){
return "/firePower/firePowerManage";
}
@PassToken
@RequestMapping("/fireStationManage")
public String fireStationManage(){
return "/firePower/fireStationManage";
}
@PassToken
@RequestMapping("/squadron")
public String squadron(){
return "/firePower/squadron";
}
}
| [
"574335745@qq.com"
] | 574335745@qq.com |
154fce99df8ec7976597097c641cfb35422af431 | ddf58c9a9d0323a2466d8df47a802810c4cbde4c | /src/test/java/io/github/jhipster/application/web/rest/AuditResourceIT.java | 1147d971b1044a87c31355b52cc241fbe3947dfd | [] | no_license | BulkSecurityGeneratorProject/testSuivi | 44f2805818ba02922ea77156a016a7976ad4fc44 | 75780a1ff3dcd6eb997e9e427f3cc6163d95a4be | refs/heads/master | 2022-12-11T23:34:24.508546 | 2019-06-05T08:11:37 | 2019-06-05T08:11:37 | 296,590,244 | 0 | 0 | null | 2020-09-18T10:33:39 | 2020-09-18T10:33:38 | null | UTF-8 | Java | false | false | 6,697 | java | package io.github.jhipster.application.web.rest;
import io.github.jhipster.application.TestSuiviApp;
import io.github.jhipster.application.config.audit.AuditEventConverter;
import io.github.jhipster.application.domain.PersistentAuditEvent;
import io.github.jhipster.application.repository.PersistenceAuditEventRepository;
import io.github.jhipster.application.service.AuditEventService;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.MockitoAnnotations;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.web.PageableHandlerMethodArgumentResolver;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.MediaType;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.transaction.annotation.Transactional;
import java.time.Instant;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static org.hamcrest.Matchers.hasItem;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
/**
* Integration tests for the {@link AuditResource} REST controller.
*/
@SpringBootTest(classes = TestSuiviApp.class)
@Transactional
public class AuditResourceIT {
private static final String SAMPLE_PRINCIPAL = "SAMPLE_PRINCIPAL";
private static final String SAMPLE_TYPE = "SAMPLE_TYPE";
private static final Instant SAMPLE_TIMESTAMP = Instant.parse("2015-08-04T10:11:30Z");
private static final long SECONDS_PER_DAY = 60 * 60 * 24;
@Autowired
private PersistenceAuditEventRepository auditEventRepository;
@Autowired
private AuditEventConverter auditEventConverter;
@Autowired
private MappingJackson2HttpMessageConverter jacksonMessageConverter;
@Autowired
@Qualifier("mvcConversionService")
private FormattingConversionService formattingConversionService;
@Autowired
private PageableHandlerMethodArgumentResolver pageableArgumentResolver;
private PersistentAuditEvent auditEvent;
private MockMvc restAuditMockMvc;
@BeforeEach
public void setup() {
MockitoAnnotations.initMocks(this);
AuditEventService auditEventService =
new AuditEventService(auditEventRepository, auditEventConverter);
AuditResource auditResource = new AuditResource(auditEventService);
this.restAuditMockMvc = MockMvcBuilders.standaloneSetup(auditResource)
.setCustomArgumentResolvers(pageableArgumentResolver)
.setConversionService(formattingConversionService)
.setMessageConverters(jacksonMessageConverter).build();
}
@BeforeEach
public void initTest() {
auditEventRepository.deleteAll();
auditEvent = new PersistentAuditEvent();
auditEvent.setAuditEventType(SAMPLE_TYPE);
auditEvent.setPrincipal(SAMPLE_PRINCIPAL);
auditEvent.setAuditEventDate(SAMPLE_TIMESTAMP);
}
@Test
public void getAllAudits() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Get all the audits
restAuditMockMvc.perform(get("/management/audits"))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL)));
}
@Test
public void getAudit() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Get the audit
restAuditMockMvc.perform(get("/management/audits/{id}", auditEvent.getId()))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.principal").value(SAMPLE_PRINCIPAL));
}
@Test
public void getAuditsByDate() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Generate dates for selecting audits by date, making sure the period will contain the audit
String fromDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10);
String toDate = SAMPLE_TIMESTAMP.plusSeconds(SECONDS_PER_DAY).toString().substring(0, 10);
// Get the audit
restAuditMockMvc.perform(get("/management/audits?fromDate="+fromDate+"&toDate="+toDate))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL)));
}
@Test
public void getNonExistingAuditsByDate() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Generate dates for selecting audits by date, making sure the period will not contain the sample audit
String fromDate = SAMPLE_TIMESTAMP.minusSeconds(2*SECONDS_PER_DAY).toString().substring(0, 10);
String toDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10);
// Query audits but expect no results
restAuditMockMvc.perform(get("/management/audits?fromDate=" + fromDate + "&toDate=" + toDate))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(header().string("X-Total-Count", "0"));
}
@Test
public void getNonExistingAudit() throws Exception {
// Get the audit
restAuditMockMvc.perform(get("/management/audits/{id}", Long.MAX_VALUE))
.andExpect(status().isNotFound());
}
@Test
@Transactional
public void testPersistentAuditEventEquals() throws Exception {
TestUtil.equalsVerifier(PersistentAuditEvent.class);
PersistentAuditEvent auditEvent1 = new PersistentAuditEvent();
auditEvent1.setId(1L);
PersistentAuditEvent auditEvent2 = new PersistentAuditEvent();
auditEvent2.setId(auditEvent1.getId());
assertThat(auditEvent1).isEqualTo(auditEvent2);
auditEvent2.setId(2L);
assertThat(auditEvent1).isNotEqualTo(auditEvent2);
auditEvent1.setId(null);
assertThat(auditEvent1).isNotEqualTo(auditEvent2);
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
26fe45c3f88819ea40d30b143b44e800fe2a6462 | 5e6129e548d33e2124212aa2a1803184f49dd6fb | /catf/src/com/seven/asimov/it/utils/logcat/wrappers/FailoverStopWrapper.java | 139573f90b9a94e47f4bcd336394e2fedb874b5c | [] | no_license | yonger1516/asimov-yagu2 | 9160c8282b850c6f4be1cc4dab20ad3e6fe70c93 | 1d24e49c1b65989a285f0e8a41b700ab0155a0eb | refs/heads/master | 2016-09-11T02:47:59.489513 | 2014-05-07T03:15:48 | 2014-05-07T03:15:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 533 | java | package com.seven.asimov.it.utils.logcat.wrappers;
public class FailoverStopWrapper extends LogEntryWrapper {
private String failoverType;
public FailoverStopWrapper() {
}
public String getFailoverType() {
return failoverType;
}
public void setFailoverType(String failoverType) {
this.failoverType = failoverType;
}
@Override
public String toString() {
return "FailoverStopWrapper{timestamp= " + getTimestamp() +
" type= " + failoverType + '}';
}
} | [
"sum2000@live.cn"
] | sum2000@live.cn |
3c875ad70d673c0a0c7a85744433273c95d72733 | 5f70c11d35381877bccf53980d5f2ffec56a9806 | /PPT project/forestmanagementspring/src/main/java/com/capgemini/forestmanagementspring/bean/ProductResponce.java | 7308d58056137eb344e2a6a2dd2b8763f5a82c59 | [] | no_license | ramanagouda1001/TY_CG_HTD_BangaloreNovember_JFS_RamanagoudaB | a38b0467bf6aa1cc09d1bc0dfba96bacf79f9c6e | 5a463d90535b7d8e56a3976ad9c2ffacd59e3cd1 | refs/heads/master | 2023-01-11T13:07:33.291138 | 2020-02-10T16:25:27 | 2020-02-10T16:25:27 | 225,846,017 | 0 | 0 | null | 2023-01-07T14:41:23 | 2019-12-04T11:00:45 | JavaScript | UTF-8 | Java | false | false | 246 | java | package com.capgemini.forestmanagementspring.bean;
import java.util.List;
import lombok.Data;
@Data
public class ProductResponce {
private int statusCode;
private String message;
private String descrption;
private List<Product> list;
}
| [
"ramanagouda1001@gmail.com"
] | ramanagouda1001@gmail.com |
d45c7408187d346ae048fa23ac28845bc494e1ed | a26ec63279caad0dd0f57120f10440bbd3645ba4 | /takeoutbundle/src/main/java/com/yunos/tvtaobao/takeoutbundle/view/SkuRecyclerView.java | 9a00ea77469a85e149553083c60bcf9e976acf35 | [] | no_license | P79N6A/tvtao | 6b0af50a878e882ad2c0da399a0a8c0304394dff | 4943116ec8cfb946b85cbfea9641e87834e675ed | refs/heads/master | 2020-04-25T15:27:50.798979 | 2019-02-27T08:55:16 | 2019-02-27T08:55:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,075 | java | package com.yunos.tvtaobao.takeoutbundle.view;
import android.content.Context;
import android.graphics.Rect;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
/**
* Created by chenjiajuan on 17/12/20.
*
* @describe sku属性
*/
public class SkuRecyclerView extends RecyclerView {
private boolean canFocus=false;
public SkuRecyclerView(Context context) {
super(context);
}
public SkuRecyclerView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
public SkuRecyclerView(Context context, @Nullable AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
protected void onMeasure(int widthSpec, int heightSpec) {
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
MeasureSpec.AT_MOST);
super.onMeasure(widthSpec, expandSpec);
}
public void setCanFocus(boolean canFocus){
this.canFocus=canFocus;
}
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
// Log.e("TAG","event= "+event.getAction());
// if (!canFocus){
// return true;
// }
return super.dispatchKeyEvent(event);
}
@Override
public View focusSearch(int direction) {
// Log.e("TAG","direction......"+direction);
// if (!canFocus){
// return null;
// }
return super.focusSearch(direction);
}
@Override
public boolean requestFocus(int direction, Rect previouslyFocusedRect) {
// if (!canFocus){
// return true;
// }
// Log.e("TAG","requestFocus.......");
return super.requestFocus(direction, previouslyFocusedRect);
}
@Override
public void requestChildFocus(View child, View focused) {
// Log.e("TAG","requestChildFocus.......");
super.requestChildFocus(child, focused);
}
}
| [
"wb-wht434871@alibaba-inc.com"
] | wb-wht434871@alibaba-inc.com |
83dcc8f7f8324ebf0a5038067ef88160759e0785 | 5db11b0c9098351480c57de617336ab7dff483e1 | /data/scripts/system/handlers/quest/gelkmaros/_21296PadmarashkaLegacy.java | f62e1c89b5dfc39525a86e1163354ad1fe734f41 | [] | no_license | VictorManKBO/aion_gserver_4_0 | d7c6383a005f1a716fcee5e4bd0c33df30a0e0c5 | ed24bf40c9fcff34cd0c64243b10ab44e60bb258 | refs/heads/master | 2022-11-15T19:52:47.654179 | 2020-07-13T10:16:04 | 2020-07-13T10:16:04 | 277,644,635 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,641 | java | /*
* This file is part of aion-lightning <aion-lightning.com>.
*
* aion-lightning is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* aion-lightning is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with aion-lightning. If not, see <http://www.gnu.org/licenses/>.
*/
package quest.gelkmaros;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.questEngine.handlers.QuestHandler;
import com.aionemu.gameserver.model.DialogAction;
import com.aionemu.gameserver.questEngine.model.QuestEnv;
import com.aionemu.gameserver.questEngine.model.QuestState;
import com.aionemu.gameserver.questEngine.model.QuestStatus;
/**
* @author Cheatkiller
*
*/
public class _21296PadmarashkaLegacy extends QuestHandler {
private final static int questId = 21296;
public _21296PadmarashkaLegacy() {
super(questId);
}
public void register() {
qe.registerQuestNpc(799444).addOnQuestStart(questId);
qe.registerQuestNpc(799318).addOnTalkEvent(questId);
qe.registerQuestNpc(799225).addOnTalkEvent(questId);
}
@Override
public boolean onDialogEvent(QuestEnv env) {
Player player = env.getPlayer();
QuestState qs = player.getQuestStateList().getQuestState(questId);
DialogAction dialog = env.getDialog();
int targetId = env.getTargetId();
if (qs == null || qs.getStatus() == QuestStatus.NONE) {
if (targetId == 799444) {
if (dialog == DialogAction.QUEST_SELECT) {
return sendQuestDialog(env, 1011);
}
else {
return sendQuestStartDialog(env, 182213039, 1);
}
}
}
else if (qs.getStatus() == QuestStatus.START) {
if (targetId == 799318) {
if (dialog == DialogAction.QUEST_SELECT) {
if(qs.getQuestVarById(0) == 0)
return sendQuestDialog(env, 1352);
}
else if (dialog == DialogAction.SETPRO1) {
removeQuestItem(env, 182213039, 1);
qs.setQuestVar(2);
return defaultCloseDialog(env, 2, 2, true, false);
}
}
}
else if (qs.getStatus() == QuestStatus.REWARD) {
if (targetId == 799225) {
if (dialog == DialogAction.USE_OBJECT) {
return sendQuestDialog(env, 2375);
}
return sendQuestEndDialog(env);
}
}
return false;
}
}
| [
"Vitek.agl@yandex.ru"
] | Vitek.agl@yandex.ru |
e2b938371445da2f538898a20e82d6ac35d156cd | 35016cb55dcbebef7393c8751ec3d2c9b260d5f6 | /MongoDBExample/src/main/java/com/antra/sergeymsg/FindWithFilterTest.java | 4f53fe78b707a3fae135a3d0b6171c2a4f898cf2 | [] | no_license | chaosssliu/practice | 6a5f13448d113260b9b08c42e132a4a3808c043d | da091688dfeb125fed06e031195ab76d9707e54e | refs/heads/master | 2022-06-24T14:20:38.213285 | 2022-06-10T21:40:50 | 2022-06-10T21:40:50 | 96,723,079 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,850 | java | package com.antra.sergeymsg;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import org.bson.Document;
import org.bson.conversions.Bson;
import com.mongodb.MongoClient;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoDatabase;
import com.mongodb.client.model.Projections;
import static com.mongodb.client.model.Filters.*;
public class FindWithFilterTest {
public static void main(String[] args) {
// TODO Auto-generated method stub
MongoClient client = new MongoClient();
MongoDatabase db = client.getDatabase("db");
MongoCollection<Document> collection = db.getCollection("findWithFilterTest");
collection.drop();
for (int i = 0; i < 10; i++) {
collection.insertOne(new Document()
.append("x", new Random().nextInt(2))
.append("y", new Random().nextInt(100))
.append("i", i));
}
// Bson filter = new Document("x", 0)
// .append("y", new Document("$gt", 10).append("$lt", 90));
// include x = 0
Bson filter = and(eq("x", 0), gt("y", 10), lt("y", 90));
// exclude x = 0 and "_id"
// don't show "x" and "_id"
Bson projection = new Document("x", 0)
.append("_id", 0);
// Bson projection = Projections.exclude("x", "_id");
// include "y" and "i", but exclude "_id"
// since "_id" will be shown by default
// Bson projection = Projections.fields(Projections.include("y", "i"), Projections.exclude("_id"));
// Bson projection = new Document("y", 1)
// .append("i", 1)
// .append("_id", 0);
// since "_id" will be shown by default
List<Document> all = collection.find(filter)
.projection(projection)
.into(new ArrayList<Document>());
for (Document cur : all) {
// printJson(cur);
}
long count = collection.count(filter);
System.out.println();
System.out.println(count);
}
}
| [
"liushashiwr@gmail.com"
] | liushashiwr@gmail.com |
121079de4fc26008d99760713b6b65f02d155427 | a709bdbee8bd72d6b8f3478bfcca37f31d24057f | /samples/src/main/java/com/greenpepper/samples/application/phonebook/HibernateDatabase.java | 7c7d9ee7a10148968d05afa919241eee523e4ea8 | [
"Apache-2.0"
] | permissive | greenpeppersoftware/greenpepper3-java | 0a2953aef0ef32f977f1e53ada49fbfc7ebbd901 | 225914c9a85ce3681b328f26bb26b76077503c1f | refs/heads/master | 2021-01-19T04:52:06.282822 | 2015-04-15T11:35:02 | 2015-04-15T11:35:02 | 16,312,032 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,619 | java | package com.greenpepper.samples.application.phonebook;
import java.net.URL;
import java.util.Properties;
import org.hibernate.HibernateException;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
public class HibernateDatabase
{
private static final String HIBERNATE_CONFIG_FILE = "hibernate.cfg.xml";
private final AnnotationConfiguration cfg;
public HibernateDatabase(Properties properties) throws HibernateException
{
cfg = new AnnotationConfiguration();
cfg.setProperties(properties);
setAnnotadedClasses();
loadConfig();
}
public void createDatabase() throws HibernateException
{
new SchemaExport(cfg).create(false, true);
}
public void dropDatabase() throws HibernateException
{
new SchemaExport(cfg).drop(false, true);
}
public Configuration getConfiguration()
{
return cfg;
}
public SessionFactory getSessionFactory() throws HibernateException
{
return cfg.buildSessionFactory();
}
private void setAnnotadedClasses()
{
cfg.addAnnotatedClass(Country.class)
.addAnnotatedClass(State.class)
.addAnnotatedClass(PhoneBook.class)
.addAnnotatedClass(PhoneBookEntry.class);
}
private void loadConfig()
{
URL xmlConfig = HibernateDatabase.class.getClassLoader().getResource(HIBERNATE_CONFIG_FILE);
if (xmlConfig != null) cfg.configure(xmlConfig);
}
}
| [
"clapointe@pyxis-tech.com"
] | clapointe@pyxis-tech.com |
cdf3abbe01b4d9b08eea6d4bfe3dc147291467c2 | 492ab60eaa5619551af16c79c569bdb704b4d231 | /src/net/sourceforge/plantuml/preproc/ReadLine.java | a03910f2eb326b9b55f1ac225f7c6c4ad5f973cb | [] | no_license | ddcjackm/plantuml | 36b89d07401993f6cbb109c955db4ab10a47ac78 | 4638f93975a0af9374cec8200d16e1fa180dafc2 | refs/heads/master | 2021-01-12T22:34:56.588483 | 2016-07-25T19:25:28 | 2016-07-25T19:25:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,483 | java | /* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2017, Arnaud Roques
*
* Project Info: http://plantuml.com
*
* This file is part of PlantUML.
*
* PlantUML is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlantUML distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
* License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* [Java is a trademark or registered trademark of Sun Microsystems, Inc.
* in the United States and other countries.]
*
* Original Author: Arnaud Roques
*
* Revision $Revision: 19109 $
*
*/
package net.sourceforge.plantuml.preproc;
import java.io.Closeable;
import java.io.IOException;
import net.sourceforge.plantuml.CharSequence2;
public interface ReadLine extends Closeable {
public CharSequence2 readLine() throws IOException;
}
| [
"plantuml@gmail.com"
] | plantuml@gmail.com |
1972089b183e1f20863321303f56b554e56d0257 | ef44d044ff58ebc6c0052962b04b0130025a102b | /com.freevisiontech.fvmobile_source_from_JADX/sources/android/support/p001v4/app/FragmentStatePagerAdapter.java | 8c329087048322e0ba8f135a5825137781c14fca | [] | no_license | thedemoncat/FVShare | e610bac0f2dc394534ac0ccec86941ff523e2dfd | bd1e52defaec868f0d1f9b4f2039625c8ff3ee4a | refs/heads/master | 2023-08-06T04:11:16.403943 | 2021-09-25T10:11:13 | 2021-09-25T10:11:13 | 410,232,121 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,824 | java | package android.support.p001v4.app;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.p001v4.app.Fragment;
import android.support.p001v4.view.PagerAdapter;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
/* renamed from: android.support.v4.app.FragmentStatePagerAdapter */
public abstract class FragmentStatePagerAdapter extends PagerAdapter {
private static final boolean DEBUG = false;
private static final String TAG = "FragmentStatePagerAdapt";
private FragmentTransaction mCurTransaction = null;
private Fragment mCurrentPrimaryItem = null;
private final FragmentManager mFragmentManager;
private ArrayList<Fragment> mFragments = new ArrayList<>();
private ArrayList<Fragment.SavedState> mSavedState = new ArrayList<>();
public abstract Fragment getItem(int i);
public FragmentStatePagerAdapter(FragmentManager fm) {
this.mFragmentManager = fm;
}
public void startUpdate(ViewGroup container) {
if (container.getId() == -1) {
throw new IllegalStateException("ViewPager with adapter " + this + " requires a view id");
}
}
public Object instantiateItem(ViewGroup container, int position) {
Fragment.SavedState fss;
Fragment f;
if (this.mFragments.size() > position && (f = this.mFragments.get(position)) != null) {
return f;
}
if (this.mCurTransaction == null) {
this.mCurTransaction = this.mFragmentManager.beginTransaction();
}
Fragment fragment = getItem(position);
if (this.mSavedState.size() > position && (fss = this.mSavedState.get(position)) != null) {
fragment.setInitialSavedState(fss);
}
while (this.mFragments.size() <= position) {
this.mFragments.add((Object) null);
}
fragment.setMenuVisibility(false);
fragment.setUserVisibleHint(false);
this.mFragments.set(position, fragment);
this.mCurTransaction.add(container.getId(), fragment);
return fragment;
}
public void destroyItem(ViewGroup container, int position, Object object) {
Fragment.SavedState savedState;
Fragment fragment = (Fragment) object;
if (this.mCurTransaction == null) {
this.mCurTransaction = this.mFragmentManager.beginTransaction();
}
while (this.mSavedState.size() <= position) {
this.mSavedState.add((Object) null);
}
ArrayList<Fragment.SavedState> arrayList = this.mSavedState;
if (fragment.isAdded()) {
savedState = this.mFragmentManager.saveFragmentInstanceState(fragment);
} else {
savedState = null;
}
arrayList.set(position, savedState);
this.mFragments.set(position, (Object) null);
this.mCurTransaction.remove(fragment);
}
public void setPrimaryItem(ViewGroup container, int position, Object object) {
Fragment fragment = (Fragment) object;
if (fragment != this.mCurrentPrimaryItem) {
if (this.mCurrentPrimaryItem != null) {
this.mCurrentPrimaryItem.setMenuVisibility(false);
this.mCurrentPrimaryItem.setUserVisibleHint(false);
}
if (fragment != null) {
fragment.setMenuVisibility(true);
fragment.setUserVisibleHint(true);
}
this.mCurrentPrimaryItem = fragment;
}
}
public void finishUpdate(ViewGroup container) {
if (this.mCurTransaction != null) {
this.mCurTransaction.commitNowAllowingStateLoss();
this.mCurTransaction = null;
}
}
public boolean isViewFromObject(View view, Object object) {
return ((Fragment) object).getView() == view;
}
public Parcelable saveState() {
Bundle state = null;
if (this.mSavedState.size() > 0) {
state = new Bundle();
Fragment.SavedState[] fss = new Fragment.SavedState[this.mSavedState.size()];
this.mSavedState.toArray(fss);
state.putParcelableArray("states", fss);
}
for (int i = 0; i < this.mFragments.size(); i++) {
Fragment f = this.mFragments.get(i);
if (f != null && f.isAdded()) {
if (state == null) {
state = new Bundle();
}
this.mFragmentManager.putFragment(state, "f" + i, f);
}
}
return state;
}
public void restoreState(Parcelable state, ClassLoader loader) {
if (state != null) {
Bundle bundle = (Bundle) state;
bundle.setClassLoader(loader);
Parcelable[] fss = bundle.getParcelableArray("states");
this.mSavedState.clear();
this.mFragments.clear();
if (fss != null) {
for (Parcelable parcelable : fss) {
this.mSavedState.add((Fragment.SavedState) parcelable);
}
}
for (String key : bundle.keySet()) {
if (key.startsWith("f")) {
int index = Integer.parseInt(key.substring(1));
Fragment f = this.mFragmentManager.getFragment(bundle, key);
if (f != null) {
while (this.mFragments.size() <= index) {
this.mFragments.add((Object) null);
}
f.setMenuVisibility(false);
this.mFragments.set(index, f);
} else {
Log.w(TAG, "Bad fragment at key " + key);
}
}
}
}
}
}
| [
"nl.ruslan@yandex.ru"
] | nl.ruslan@yandex.ru |
a038ae596c8bbbba0bc3de4d0e804c57cd0085f2 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/google--closure-compiler/4c6e1039b80859f17de5f3cbcfeba61ed8ea0485/before/NodeNameExtractor.java | b2a8dc60e8fe73e230933a09dc1b2f1bb26dd7d0 | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,398 | java | /*
* Copyright 2004 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.javascript.jscomp;
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.Token;
import com.google.javascript.rhino.TokenStream;
/**
* Utility class that extracts the qualified name out of a node.
* Useful when trying to get a human-friendly string representation of
* a property node that can be used to describe the node or name
* related nodes based on it (as done by the NameAnonymousFunctions
* compiler pass).
*
*
*/
class NodeNameExtractor {
private final char delimiter;
private int nextUniqueInt = 0;
NodeNameExtractor(char delimiter) {
this.delimiter = delimiter;
}
/**
* Returns a qualified name of the specified node. Dots and brackets
* are changed to the delimiter passed in when constructing the
* NodeNameExtractor object. We also replace ".prototype" with the
* delimiter to keep names short, while still differentiating them
* from static properties. (Prototype properties will end up
* looking like "a$b$$c" if this.delimiter = '$'.)
*/
String getName(Node node) {
switch (node.getType()) {
case Token.FUNCTION:
Node functionNameNode = node.getFirstChild();
return functionNameNode.getString();
case Token.GETPROP:
Node lhsOfDot = node.getFirstChild();
Node rhsOfDot = lhsOfDot.getNext();
String lhsOfDotName = getName(lhsOfDot);
String rhsOfDotName = getName(rhsOfDot);
if ("prototype".equals(rhsOfDotName)) {
return lhsOfDotName + delimiter;
} else {
return lhsOfDotName + delimiter + rhsOfDotName;
}
case Token.GETELEM:
Node outsideBrackets = node.getFirstChild();
Node insideBrackets = outsideBrackets.getNext();
String nameOutsideBrackets = getName(outsideBrackets);
String nameInsideBrackets = getName(insideBrackets);
if ("prototype".equals(nameInsideBrackets)) {
return nameOutsideBrackets + delimiter;
} else {
return nameOutsideBrackets + delimiter + nameInsideBrackets;
}
case Token.NAME:
return node.getString();
case Token.STRING:
return TokenStream.isJSIdentifier(node.getString()) ?
node.getString() : ("__" + nextUniqueInt++);
case Token.NUMBER:
return NodeUtil.getStringValue(node);
case Token.THIS:
return "this";
case Token.CALL:
return getName(node.getFirstChild());
default:
StringBuilder sb = new StringBuilder();
for (Node child = node.getFirstChild(); child != null;
child = child.getNext()) {
if (sb.length() > 0) {
sb.append(delimiter);
}
sb.append(getName(child));
}
return sb.toString();
}
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
05d050caf8553f3d66fc5e0f086de3bfba04ac2e | b3ab5ce8a42d3cb6f9d329fcc8f352cc524ce626 | /src/com/syntax/class08/RecapDoWhile.java | 1b250bb66a3cf1db468a148361531ecbe19a676e | [] | no_license | qasimwardak/MyJavaCodes | be096994446bebc3c53072aa6711aa241b3b4ec9 | 133e50c081024195de89fa3ba13f3ab52cd1fcb2 | refs/heads/main | 2023-02-13T09:05:15.247340 | 2021-01-24T19:41:42 | 2021-01-24T19:41:42 | 332,538,578 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 783 | java | package com.syntax.class08;
import java.util.Scanner;
public class RecapDoWhile {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input=new Scanner (System.in);
int money;
int waterPrice=5;
System.out.println("Plese pay for your water");
do {
money=input.nextInt();
if (money>waterPrice) {
System.out.println("This is too much, you need to enter more money");
}else if (money<waterPrice) {
System.out.println("The water is expensive, please insert more money");
}
//money=input.nextInt();
}while (money!=waterPrice);
System.out.println("Enjoy your water");
}
}
| [
"qasim.wardak2020@gmail.com"
] | qasim.wardak2020@gmail.com |
1da2551669a454e69704c7da591b175bc9385357 | c81963cab526c4dc24bee21840f2388caf7ff4cf | /com/google/api/DocumentationOrBuilder.java | a822c72cdd0b040137cfb3b84184d7f2640348bb | [] | no_license | ryank231231/jp.co.penet.gekidanprince | ba2f38e732828a4454402aa7ef93a501f8b7541e | d76db01eeadf228d31006e4e71700739edbf214f | refs/heads/main | 2023-02-19T01:38:54.459230 | 2021-01-16T10:04:22 | 2021-01-16T10:04:22 | 329,815,191 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 794 | java | package com.google.api;
import com.google.protobuf.ByteString;
import com.google.protobuf.MessageLiteOrBuilder;
import java.util.List;
public interface DocumentationOrBuilder extends MessageLiteOrBuilder {
String getDocumentationRootUrl();
ByteString getDocumentationRootUrlBytes();
String getOverview();
ByteString getOverviewBytes();
Page getPages(int paramInt);
int getPagesCount();
List<Page> getPagesList();
DocumentationRule getRules(int paramInt);
int getRulesCount();
List<DocumentationRule> getRulesList();
String getSummary();
ByteString getSummaryBytes();
}
/* Location: Y:\classes-dex2jar.jar!\com\google\api\DocumentationOrBuilder.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/ | [
"ryank231231@gmail.com"
] | ryank231231@gmail.com |
d499244cc5257dd277d4cf423ac8bbdb83e09da3 | 1a283757330c2a6c15c4dff319c1746c666c7f4e | /org.smeup.sys.os.pgm/src/org/smeup/sys/os/pgm/QProgramStatus.java | 1f979a3ff38511c992ba9e735df6401a7eeb22d6 | [] | no_license | smeup/asup | b1aba55f13ab950901abab343ceb4f159b27a2d4 | e7f79af4a1d1e753803175b34364062c77ba8c3b | refs/heads/master | 2021-04-12T03:59:41.611091 | 2017-07-11T17:35:04 | 2017-07-11T17:35:04 | 37,124,794 | 4 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,874 | java | /**
* Copyright (c) 2012, 2016 Sme.UP 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
*/
package org.smeup.sys.os.pgm;
import org.smeup.sys.il.data.QCharacter;
import org.smeup.sys.il.data.QDataStruct;
import org.smeup.sys.il.data.QDecimal;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Program Status</b></em>'. <!-- end-user-doc -->
*
*
* @see org.smeup.sys.os.pgm.QOperatingSystemProgramPackage#getProgramStatus()
* @model interface="true" abstract="true"
* @generated
*/
public interface QProgramStatus extends QDataStruct {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @model kind="operation" required="true"
* @generated
*/
QCharacter getProgramName();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @model kind="operation" required="true"
* @generated
*/
QCharacter getProgramLibrary();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @model kind="operation" required="true"
* @generated
*/
QCharacter getUserName();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @model kind="operation" required="true"
* @generated
*/
QDecimal getJobNumber();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @model kind="operation" required="true"
* @generated
*/
QCharacter getJobName();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @model kind="operation" required="true"
* @generated
*/
QDecimal getParametersNumber();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @model kind="operation" required="true"
* @generated
*/
QDecimal getStatusCode();
} // QProgramStatus
| [
"mattiarocchi@gmail.com"
] | mattiarocchi@gmail.com |
a8588a72020c32ab9fa65557d2f1312b8b67e7bc | 6b2d99ee4d1b80b284d665d0da11bd9be89d4532 | /app/src/main/java/com/ricardo/controlasistenciaipd/pojos/Asistencia.java | 1bd03ebba6df8962c1e1cc5e6edc59a987df652a | [] | no_license | Ricindigus/ControlAsistenciaIPD | 26263fb6ca5f66d90ec363bf83842ce896112a40 | 9fa5d108f6ee5fdcbbc2a49d01363316f318a50f | refs/heads/master | 2021-01-11T21:03:24.892109 | 2017-04-17T21:01:05 | 2017-04-17T21:01:05 | 79,235,421 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 585 | java | package com.ricardo.controlasistenciaipd.pojos;
/**
* Created by apoyo03-ui on 17/03/2017.
*/
public class Asistencia {
private String fecha;
private String asistio;
public Asistencia(String fecha, String asistio) {
this.fecha = fecha;
this.asistio = asistio;
}
public String getFecha() {
return fecha;
}
public void setFecha(String fecha) {
this.fecha = fecha;
}
public String getAsistio() {
return asistio;
}
public void setAsistio(String asistio) {
this.asistio = asistio;
}
}
| [
"ricindigus@gmail.com"
] | ricindigus@gmail.com |
bb3ee3c8b0ef9dd26f63b4416ec370bb89de06ae | bfac99890aad5f43f4d20f8737dd963b857814c2 | /reg3/v1/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-client/src/test/java/org/xwiki/gwt/wysiwyg/client/syntax/AbstractSyntaxValidatorManagerTest.java | c0fbefdbc6105f0e8a20d6ae529321faac68294f | [] | no_license | STAMP-project/dbug | 3b3776b80517c47e5cac04664cc07112ea26b2a4 | 69830c00bba4d6b37ad649aa576f569df0965c72 | refs/heads/master | 2021-01-20T03:59:39.330218 | 2017-07-12T08:03:40 | 2017-07-12T08:03:40 | 89,613,961 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,103 | java | /*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* 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.xwiki.gwt.wysiwyg.client.syntax;
import org.xwiki.gwt.wysiwyg.client.WysiwygTestCase;
import org.xwiki.gwt.wysiwyg.client.syntax.internal.DefaultSyntaxValidator;
/**
* Unit test for any concrete implementation of {@link SyntaxValidatorManager}.
*
* @version $Id: c2fa2363d78c32562a874a7b100578fcb09ef2bb $
*/
public abstract class AbstractSyntaxValidatorManagerTest extends WysiwygTestCase
{
/**
* @return A new instance of the concrete implementation of {@link SyntaxValidatorManager} being tested.
*/
protected abstract SyntaxValidatorManager newSyntaxValidatorManager();
/**
* Tests the basic operations: add, get and remove a {@link SyntaxValidator}.
*/
public void testAddGetRemove()
{
SyntaxValidatorManager svm = newSyntaxValidatorManager();
DefaultSyntaxValidator xsv = new DefaultSyntaxValidator("mock");
assertNull(svm.getSyntaxValidator(xsv.getSyntax()));
assertNull(svm.addSyntaxValidator(xsv));
assertEquals(xsv, svm.getSyntaxValidator(xsv.getSyntax()));
assertEquals(xsv, svm.removeSyntaxValidator(xsv.getSyntax()));
assertNull(svm.getSyntaxValidator(xsv.getSyntax()));
}
}
| [
"caroline.landry@inria.fr"
] | caroline.landry@inria.fr |
2db2ecdf1f75d850560356702ffc713f58acb1c2 | 4e660ecd8dfea06ba2f530eb4589bf6bed669c0c | /src/org/tempuri/GetMzzhxxbResponse.java | a44861bae50b401b946acccc451eb148628fca39 | [] | no_license | zhangity/SANMEN | 58820279f6ae2316d972c1c463ede671b1b2b468 | 3f5f7f48709ae8e53d66b30f9123aed3bcc598de | refs/heads/master | 2020-03-07T14:16:23.069709 | 2018-03-31T15:17:50 | 2018-03-31T15:17:50 | 127,522,589 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,015 | java | /**
* GetMzzhxxbResponse.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package org.tempuri;
public class GetMzzhxxbResponse implements java.io.Serializable {
private org.tempuri.GetMzzhxxbResponseGetMzzhxxbResult getMzzhxxbResult;
public GetMzzhxxbResponse() {
}
public GetMzzhxxbResponse(
org.tempuri.GetMzzhxxbResponseGetMzzhxxbResult getMzzhxxbResult) {
this.getMzzhxxbResult = getMzzhxxbResult;
}
/**
* Gets the getMzzhxxbResult value for this GetMzzhxxbResponse.
*
* @return getMzzhxxbResult
*/
public org.tempuri.GetMzzhxxbResponseGetMzzhxxbResult getGetMzzhxxbResult() {
return getMzzhxxbResult;
}
/**
* Sets the getMzzhxxbResult value for this GetMzzhxxbResponse.
*
* @param getMzzhxxbResult
*/
public void setGetMzzhxxbResult(org.tempuri.GetMzzhxxbResponseGetMzzhxxbResult getMzzhxxbResult) {
this.getMzzhxxbResult = getMzzhxxbResult;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof GetMzzhxxbResponse)) return false;
GetMzzhxxbResponse other = (GetMzzhxxbResponse) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this.getMzzhxxbResult==null && other.getGetMzzhxxbResult()==null) ||
(this.getMzzhxxbResult!=null &&
this.getMzzhxxbResult.equals(other.getGetMzzhxxbResult())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getGetMzzhxxbResult() != null) {
_hashCode += getGetMzzhxxbResult().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(GetMzzhxxbResponse.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("http://tempuri.org/", ">GetMzzhxxbResponse"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("getMzzhxxbResult");
elemField.setXmlName(new javax.xml.namespace.QName("http://tempuri.org/", "GetMzzhxxbResult"));
elemField.setXmlType(new javax.xml.namespace.QName("http://tempuri.org/", ">>GetMzzhxxbResponse>GetMzzhxxbResult"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
| [
"dzyuting@163.com"
] | dzyuting@163.com |
43280fd55be0482f2e20ee84fed8c7df6ad40ad3 | 634c5a737d23f1d601cdd9a378c3dec9fb96b4da | /src/main/java/com/bergerkiller/bukkit/tc/debug/DebugToolType.java | a905743939983f18d2dda7f37d9bf2637f58b785 | [
"MIT",
"LicenseRef-scancode-other-permissive"
] | permissive | 56738/TrainCarts | 31d6abf1b84b101f10552fae14ce2594d0feb0cf | caa64bf9392f53155b022b9ed2e8bedab051b795 | refs/heads/master | 2023-06-25T04:39:42.532717 | 2023-06-23T12:45:08 | 2023-06-23T12:45:08 | 135,711,842 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,862 | java | package com.bergerkiller.bukkit.tc.debug;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import com.bergerkiller.bukkit.common.utils.ItemUtil;
import com.bergerkiller.bukkit.tc.TrainCarts;
/**
* Debug tool instance
*/
public interface DebugToolType {
/**
* Gets the identifier token stored inside the item to uniquely
* identify this debug tool type
*
* @return identifier
*/
String getIdentifier();
/**
* Gets the text displayed as a tooltip for the debug tool item
*
* @return title
*/
String getTitle();
/**
* Gets a short description of this debug tool type. This is displayed
* when the debug tool is hovered over as a lore.
*
* @return description
*/
String getDescription();
/**
* Gets short instructions of how to use the debug tool item. This is
* displayed as a message to the player when the item is given.
*
* @return instructions
*/
String getInstructions();
/**
* Whether this tool type handles left-click interaction
*
* @return True if left-click is handled
*/
default boolean handlesLeftClick() {
return false;
}
/**
* Called when a player interacts with a block
*
* @param trainCarts TrainCarts main plugin instance
* @param player Player that interacted
* @param clickedBlock Block that was interacted with
* @param item The debug tool item player is holding while interacting
* @param isRightClick Whether this is a right-click (true) or left-click (false)
*/
void onBlockInteract(TrainCarts trainCarts, Player player, Block clickedBlock, ItemStack item, boolean isRightClick);
/**
* Gives this debug tool type as an item to a player
*
* @param player
*/
default void giveToPlayer(Player player) {
ItemStack item = ItemUtil.createItem(Material.STICK, 1);
ItemUtil.getMetaTag(item, true).putValue("TrainCartsDebug", this.getIdentifier());
ItemUtil.setDisplayName(item, this.getTitle());
ItemUtil.addLoreName(item, this.getDescription());
// Update item in main hand, if it is a debug item
if (DebugTool.updateToolItem(player, item)) {
player.sendMessage(ChatColor.GREEN + "Debug tool updates to a " + this.getTitle());
player.sendMessage(ChatColor.YELLOW + this.getDescription());
return;
}
// Give new item
player.getInventory().addItem(item);
// Display a message to the player to explain what it is
player.sendMessage(ChatColor.GREEN + "Given a " + this.getTitle());
player.sendMessage(ChatColor.YELLOW + this.getDescription());
}
}
| [
"irmo.vandenberge@ziggo.nl"
] | irmo.vandenberge@ziggo.nl |
3176a831c10705d4669931c4031eeae9a951b79d | ded66847c447fe9b10e5e86ff11babf60ddddc14 | /LBaseTool/src/main/java/com/lgame/util/http/Http302.java | f7b72c4b1a0d68ba47ded430da868de83c13f369 | [] | no_license | leroyBoys/LCommPack | a33d2ae7724667c5eaf4643401583ea9e17d5280 | 22a8566820576f7bb58483ff019dc57d8b373ad4 | refs/heads/master | 2022-10-21T20:40:20.505598 | 2020-01-06T03:49:55 | 2020-01-06T03:49:55 | 85,775,682 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,693 | java | package com.lgame.util.http;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* Created by Administrator on 2018/3/18.
*/
public class Http302 {
public static void main(String[] args) {
String location = get302("https://s.click.taobao.com/t?e=m%3D2%26s%3DvfDGbdOUB8yw%2Bv2O2yX1MeeEDrYVVa64LKpWJ%2Bin0XLjf2vlNIV67q4f%2FAzrd3UB18u9BjgaVz6FRVQo%2BDh00kJUHyd2dIQcYUJOPaqG8lgBUnXF4FHWjDerllUiS3naG6Ta2zz3Zu1pTbn5pyQbtKKYbEGbWAlocSpj5qSCmbA%3D&pvid=26_117.136.0.42_1265_1521347779324&ut_sk=1.utdid_null_1521347799180.TaoPassword-Outside.lianmeng-app&spm=a211b4.24823497&visa=13a09278fde22a2e&disablePopup=true&disableSJ=1");
System.out.println(location);
System.out.println(HttpTool.httpGet(location));
}
public static String get302(String url){
try {
System.out.println("访问地址:" + url);
URL serverUrl = new URL(url);
HttpURLConnection conn = (HttpURLConnection) serverUrl
.openConnection();
conn.setRequestMethod("GET");
// 必须设置false,否则会自动redirect到Location的地址
conn.setInstanceFollowRedirects(false);
conn.addRequestProperty("Accept-Charset", "UTF-8;");
conn.addRequestProperty("User-Agent",
"Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.8) Firefox/3.6.8");
conn.connect();
String location = conn.getHeaderField("Location");
System.out.println("===>"+location);
return location;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}
| [
"wlvxiaohui@163.com"
] | wlvxiaohui@163.com |
247db227d3318fd3fc2877706a339cd3ff2c6dd8 | f1949331662182ce74fbfc4799f734d677858de7 | /no.ion.jhms/src/test/java/no/ion/jhms/HybridModuleJarTest.java | a3d5e158f6db1c26ca2e503725f94301ba0a0f9f | [] | no_license | hakonhall/hybridmodules | 2833b87ead08da201138b538816db70df8460c61 | 618896e9c24fad7b19a1154a45d2c0d8c1c80efb | refs/heads/master | 2023-01-20T20:22:26.256583 | 2023-01-13T23:21:36 | 2023-01-13T23:21:36 | 135,215,151 | 0 | 0 | null | 2023-01-13T23:21:36 | 2018-05-28T22:34:02 | Java | UTF-8 | Java | false | false | 3,086 | java | package no.ion.jhms;
import org.junit.Test;
import java.lang.module.ModuleDescriptor;
import java.nio.file.Path;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
import static java.lang.module.ModuleDescriptor.Requires;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
public class HybridModuleJarTest {
@Test
public void richDescriptor() {
Path path = Path.of("src/test/resources/rich.descriptor-1.3.4.jar");
try (HybridModuleJar jar = HybridModuleJar.open(path)) {
assertEquals(path, jar.path());
assertEquals("rich.descriptor@1.3.4", jar.hybridModuleId().toString());
ModuleDescriptor descriptor = jar.descriptor();
assertFalse(descriptor.isAutomatic());
assertEquals("rich.descriptor", descriptor.name());
assertEquals(Optional.of("1.3.4"), descriptor.rawVersion());
assertEquals(Optional.of("rich.descriptor.Main"), descriptor.mainClass());
assertEquals(Set.of("rich.descriptor", "rich.descriptor.exported", "rich.descriptor.qualified"), descriptor.packages());
Map<String, Requires> requires = descriptor.requires().stream().collect(Collectors.toMap(Requires::name, Function.identity()));
assertEquals(3, requires.size());
assertTrue(requires.containsKey("java.base"));
assertTrue(requires.containsKey("java.logging"));
var requiredRequires = requires.get("required");
assertNotNull(requiredRequires);
assertEquals(Optional.of("3.1"), requiredRequires.rawCompiledVersion());
assertEquals(Set.of(Requires.Modifier.TRANSITIVE), requiredRequires.modifiers());
Map<String, Set<String>> exports = descriptor.exports().stream()
.collect(Collectors.toMap(ModuleDescriptor.Exports::source, ModuleDescriptor.Exports::targets));
assertEquals(2, exports.size());
assertEquals(Set.of(), exports.get("rich.descriptor.exported"));
assertEquals(Set.of("friend"), exports.get("rich.descriptor.qualified"));
// Gotten from sha256sum(1). Recreating the JAR file will change the checksum.
assertEquals("ec7dcd6565a85b2d5e826ed5a4643191559dd3fbeeb51b0cfdd15712d69ea790", jar.sha256String().toLowerCase());
String uri = jar.uri().toString();
assertTrue(uri.endsWith("src/test/resources/rich.descriptor-1.3.4.jar"));
try (HybridModuleJar jarCopy = HybridModuleJar.open(("src/test/resources/copies/rich.descriptor-1.3.4-copy.jar"))) {
assertTrue(jarCopy.checksumEqual(jar));
}
try (HybridModuleJar jarCopy = HybridModuleJar.open(("src/test/resources/copies/rich.descriptor-1.3.4-nocopy.jar"))) {
assertFalse(jarCopy.checksumEqual(jar));
}
}
}
}
| [
"hakon.hallingstad@gmail.com"
] | hakon.hallingstad@gmail.com |
b7f61dc9b3b9b5a88a0ea9ef0871d21033103a42 | cc65e10feea55bfa97cade23176cd6e574d3bbea | /iportal/iportal-core/src/main/java/com/imall/iportal/core/shop/repository/GoodsBatchRepository.java | 7ffb93d8709ff3b9c77b09d81bd2f017e4842f9b | [] | no_license | weishihuai/imallCloudc | ef5a0d7e4866ad7e63251dff512afede7246bd4f | f3163208eaf539aa63dc9e042d2ff6c7403aa405 | refs/heads/master | 2021-08-20T05:42:23.717707 | 2017-11-28T09:10:36 | 2017-11-28T09:10:36 | 112,305,704 | 2 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,317 | java |
package com.imall.iportal.core.shop.repository;
import com.imall.commons.base.dao.IBaseRepository;
import com.imall.iportal.core.shop.entity.GoodsBatch;
import org.springframework.data.jpa.repository.Query;
import java.util.List;
/**
* (JPA持久化层)
* @author by imall core generator
* @version 1.0.0
*/
public interface GoodsBatchRepository extends IBaseRepository<GoodsBatch, Long>,GoodsBatchRepositoryCustom {
List<GoodsBatch> findByGoodsId(Long goodsId);
List<GoodsBatch> findByGoodsIdAndShopId(Long goodsId, Long shopId);
List<GoodsBatch> findByGoodsIdAndShopIdAndBatchState(Long goodsId, Long shopId, String batchState);
GoodsBatch findByGoodsIdAndBatchAndStorageSpaceIdAndSupplierIdAndPurchasePrice(Long goodsId, String batch, Long storageSpaceId, Long supplierId, Double purchasePrice);
GoodsBatch findByGoodsIdAndBatchAndStorageSpaceIdAndSupplierIdAndPurchasePriceAndBatchState(Long goodsId, String batch, Long storageSpaceId, Long supplierId, Double purchasePrice,String batchState);
@Query("select b, count(distinct b.batch) from GoodsBatch b where b.shopId=?1 and b.goodsId=?2 and b.batchState='NORMAL' group by b.batch")
List<Object> findDistinctBatch(Long shopId, Long goodsId);
List<GoodsBatch> findByGoodsIdAndBatch(Long goodsId, String batch);
}
| [
"34024258+weishihuai@users.noreply.github.com"
] | 34024258+weishihuai@users.noreply.github.com |
052bd13e41aa415b5710998bac8d4c776505a29d | c3632598b5ff0275fff5e614f32fe4400c5a24e5 | /whatsmars-java/src/main/java/org/hongxi/java/util/concurrent/YieldTest.java | b0eca8ffa9d64c0f1e5b18260fa906d79198771a | [
"Apache-2.0"
] | permissive | javahongxi/whatsmars | 48fce80e63236acdd7a0a60c49b5c72f2ece8931 | 06bb3589d87bce43caceb9fb7c0adc9027c2043b | refs/heads/master | 2023-08-14T14:22:47.723056 | 2023-05-28T11:30:33 | 2023-05-28T11:30:33 | 55,224,431 | 2,066 | 653 | Apache-2.0 | 2023-03-08T17:29:24 | 2016-04-01T10:33:04 | Java | UTF-8 | Java | false | false | 612 | java | package org.hongxi.java.util.concurrent;
/**
* @author shenhongxi 2019/8/12
*/
public class YieldTest {
public static void main(String[] args) {
new MyThread("t1").start();
new MyThread("t2").start();
}
static class MyThread extends Thread {
MyThread(String name) {
super(name);
}
@Override
public void run() {
for (int i = 0; i < 100; i++) {
System.out.println(getName() + ", " + i);
if (i % 10 == 0) {
Thread.yield();
}
}
}
}
}
| [
"javahongxi@qq.com"
] | javahongxi@qq.com |
51b834067c91c57682ddf5c110dba85df36d449e | f1f1b17696632d865251a4f952cfd8dd74e0cc63 | /IOCProj16-RealTimeDI-CollectionInjection/src/com/nt/dao/MySQLCustomerDAOImpl.java | 9cd6edeed129881803589c5416bf9a0bc65d4b23 | [] | no_license | natarazworld/NTSP613Repo | 99c178580b6c1d098618f13f1c43cc01f0c0e164 | 554494d1e020502bd8ed25036b6b22813e0a09b0 | refs/heads/master | 2023-07-01T00:46:29.807313 | 2021-08-04T13:35:14 | 2021-08-04T13:35:14 | 320,582,195 | 17 | 18 | null | null | null | null | UTF-8 | Java | false | false | 1,186 | java | package com.nt.dao;
import java.sql.Connection;
import java.sql.PreparedStatement;
import javax.sql.DataSource;
import com.nt.bo.CustomerBO;
public final class MySQLCustomerDAOImpl implements ICustomerDAO {
private static final String INSERT_CUSTOMER_QUERY="INSERT INTO LAYERED_CUSTOMER(CNAME,CADD,PAMT,TIME,RATE,INTRAMT) VALUES(?,?,?,?,?,?)";
private DataSource ds;
public MySQLCustomerDAOImpl(DataSource ds) {
this.ds = ds;
}
@Override
public int insert(CustomerBO bo) throws Exception {
//get pooled jdbc con object
Connection con=ds.getConnection();
//create PreparedStatement object
PreparedStatement ps=con.prepareStatement(INSERT_CUSTOMER_QUERY);
//set values to query params by collecting data from BO class obj
ps.setString(1,bo.getCname());
ps.setString(2,bo.getCadd());
ps.setFloat(3, bo.getPamt());
ps.setFloat(5, bo.getTime());
ps.setFloat(4, bo.getRate());
ps.setFloat(6, bo.getIntrAmt());
//execute the SQL query
int count=ps.executeUpdate();
//close jdbc objs
ps.close();
con.close(); //releases the jdbc con object back to jdbc con pool
return count;
}//method
}//class
| [
"Nareshit@DESKTOP-IUDAAVL"
] | Nareshit@DESKTOP-IUDAAVL |
d30396142f0cb4e7fd4cc0d8b13938793cfbcabc | 69cf56e55cbbfc54a4f2c9d00722c9753c940564 | /src/LC400_10_BFS_DFS/LC127.java | 27d1198f0e3690216753ab74ffe48d86f2cf8642 | [] | no_license | bay1024/leet | 4327be345c27fb2c372a8faabd056f0137b382be | 8868c335408a31239a2729f897d4dc28dbd3774b | refs/heads/master | 2020-04-23T19:41:53.803311 | 2019-04-04T06:00:58 | 2019-04-04T06:00:58 | 171,413,806 | 0 | 0 | null | 2019-03-24T01:22:32 | 2019-02-19T05:52:38 | Java | UTF-8 | Java | false | false | 1,258 | java | package LC400_10_BFS_DFS;
import java.util.*;
/**
* Created by Gary on 2019-01-14.
*/
public class LC127 {
public int ladderLength(String beginWord, String endWord, List<String> wordList) {
Set<String> candidatePool = new HashSet<>(wordList);
if (candidatePool.contains(beginWord)) candidatePool.remove(beginWord);
Queue<String> queue = new LinkedList<>();
Map<String, Integer> wordLevel = new HashMap<>();
wordLevel.put(beginWord, 1);
queue.offer(beginWord);
while (!queue.isEmpty()) {
String current = queue.poll();
int level = wordLevel.get(current);
for (int i = 0; i < current.length(); i++) {
char[] chars = current.toCharArray();
for (char c = 'a'; c <= 'z'; c++) {
chars[i] = c;
String temp = new String(chars);
if (candidatePool.contains(temp)) {
if (temp.equals(endWord)) return level + 1;
wordLevel.put(temp, level + 1);
queue.offer(temp);
candidatePool.remove(temp);
}
}
}
}
return 0;
}
}
| [
"proheart123@gmail.com"
] | proheart123@gmail.com |
3741f02c134c23f6838edc69885cc48c2ace5447 | b1744cdbd9ca5322077cdb399512a8f133718c8d | /trunk/LianLuoSms/src/com/haolianluo/sms2/model/HSuggestParser.java | 7a8b853966d7d78e7c0015c12c81e296bf0f2a3a | [] | no_license | BGCX067/familymanage-svn-to-git | 420ba08d980cab57b248c90322b8dd993d5329ca | 2611c822a6432975f013d9cf5688e399fd168a5c | refs/heads/master | 2021-01-13T00:56:41.329897 | 2015-12-28T14:20:13 | 2015-12-28T14:20:13 | 48,840,431 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,768 | java | package com.haolianluo.sms2.model;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import android.content.Context;
import com.haolianluo.sms2.data.HConst;
import com.lianluo.core.cache.DataParser;
import com.lianluo.core.util.HChanger;
public class HSuggestParser extends DataParser {
private String re;
private Context mContext;
private String tagName;
private String mContent;
public HSuggestParser(Context context) {
super(context);
this.mContext = context;
}
public boolean suggest(String content) {
this.mContent = HChanger.ConvertJiaMi(content);
Object obj = getNet(null);
return (Boolean) obj;
}
@Override
public String getUrl() {
return HConst.SUGGEST_HOST_URL;
}
@Override
public String getBody() {
return HConst.suggest_request_xml(mContext, mContent);
}
@Override
public void characters(char[] ch, int start, int length)
throws SAXException {
super.characters(ch, start, length);
if ("re".equals(tagName)) {
re = new String(ch, start, length);
}
}
@Override
public void endDocument() throws SAXException {
super.endDocument();
boolean result = false;
if(re != null && "OK".equalsIgnoreCase(re)) {
result = true;
}
super.obj = result;
}
@Override
public void endElement(String uri, String localName, String qName)
throws SAXException {
super.endElement(uri, localName, qName);
}
@Override
public void startDocument() throws SAXException {
super.startDocument();
}
@Override
public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException {
super.startElement(uri, localName, qName, attributes);
tagName = localName;
}
}
| [
"you@example.com"
] | you@example.com |
5dae8a9be99fadf2ec269a9eacf8c8973f05f69e | 1fed9c24633df62e7777be8747a80a44a2b93389 | /src/main/java/org/dependencytrack/event/NspMirrorEvent.java | bb0658b5ae97962d498686c5d134e07bf189b65c | [
"Apache-2.0"
] | permissive | seishuchen/dependency-track | 6306bcf3f8a7f6a7f124030a8b70dec3e717665f | 70a1f3b4858d0829afa7456fb251a78bb5b1fe86 | refs/heads/master | 2020-03-28T03:24:53.305896 | 2018-09-05T18:38:27 | 2018-09-05T18:38:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 913 | java | /*
* This file is part of Dependency-Track.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright (c) Steve Springett. All Rights Reserved.
*/
package org.dependencytrack.event;
import alpine.event.framework.Event;
/**
* Defines an event used to start a mirror of Node Security Platform.
*
* @author Steve Springett
* @since 3.0.0
*/
public class NspMirrorEvent implements Event {
}
| [
"steve@springett.us"
] | steve@springett.us |
c3f1b97c63c0f825d2d8eaa5c234edf6977f22f8 | 447520f40e82a060368a0802a391697bc00be96f | /apks/apks_from_phone/data_app_com_monefy_app_lite-2/source/com/google/android/gms/ads/internal/request/zzj.java | ac3cffee450499bde126708c2603a61d1e9d971a | [
"Apache-2.0"
] | permissive | iantal/AndroidPermissions | 7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465 | d623b732734243590b5f004d167e542e2e2ae249 | refs/heads/master | 2023-07-19T01:29:26.689186 | 2019-09-30T19:01:42 | 2019-09-30T19:01:42 | 107,239,248 | 0 | 0 | Apache-2.0 | 2023-07-16T07:41:38 | 2017-10-17T08:22:57 | null | UTF-8 | Java | false | false | 5,114 | java | package com.google.android.gms.ads.internal.request;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
public abstract interface zzj
extends IInterface
{
public abstract AdResponseParcel a(AdRequestInfoParcel paramAdRequestInfoParcel);
public abstract void a(AdRequestInfoParcel paramAdRequestInfoParcel, zzk paramZzk);
public static abstract class zza
extends Binder
implements zzj
{
public zza()
{
attachInterface(this, "com.google.android.gms.ads.internal.request.IAdRequestService");
}
public static zzj a(IBinder paramIBinder)
{
if (paramIBinder == null) {
return null;
}
IInterface localIInterface = paramIBinder.queryLocalInterface("com.google.android.gms.ads.internal.request.IAdRequestService");
if ((localIInterface != null) && ((localIInterface instanceof zzj))) {
return (zzj)localIInterface;
}
return new zza(paramIBinder);
}
public IBinder asBinder()
{
return this;
}
public boolean onTransact(int paramInt1, Parcel paramParcel1, Parcel paramParcel2, int paramInt2)
{
Object localObject2 = null;
Object localObject1 = null;
switch (paramInt1)
{
default:
return super.onTransact(paramInt1, paramParcel1, paramParcel2, paramInt2);
case 1598968902:
paramParcel2.writeString("com.google.android.gms.ads.internal.request.IAdRequestService");
return true;
case 1:
paramParcel1.enforceInterface("com.google.android.gms.ads.internal.request.IAdRequestService");
if (paramParcel1.readInt() != 0) {
localObject1 = AdRequestInfoParcel.CREATOR.a(paramParcel1);
}
paramParcel1 = a((AdRequestInfoParcel)localObject1);
paramParcel2.writeNoException();
if (paramParcel1 != null)
{
paramParcel2.writeInt(1);
paramParcel1.writeToParcel(paramParcel2, 1);
}
for (;;)
{
return true;
paramParcel2.writeInt(0);
}
}
paramParcel1.enforceInterface("com.google.android.gms.ads.internal.request.IAdRequestService");
localObject1 = localObject2;
if (paramParcel1.readInt() != 0) {
localObject1 = AdRequestInfoParcel.CREATOR.a(paramParcel1);
}
a((AdRequestInfoParcel)localObject1, zzk.zza.a(paramParcel1.readStrongBinder()));
paramParcel2.writeNoException();
return true;
}
private static class zza
implements zzj
{
private IBinder a;
zza(IBinder paramIBinder)
{
this.a = paramIBinder;
}
public AdResponseParcel a(AdRequestInfoParcel paramAdRequestInfoParcel)
{
Parcel localParcel1 = Parcel.obtain();
Parcel localParcel2 = Parcel.obtain();
for (;;)
{
try
{
localParcel1.writeInterfaceToken("com.google.android.gms.ads.internal.request.IAdRequestService");
if (paramAdRequestInfoParcel != null)
{
localParcel1.writeInt(1);
paramAdRequestInfoParcel.writeToParcel(localParcel1, 0);
this.a.transact(1, localParcel1, localParcel2, 0);
localParcel2.readException();
if (localParcel2.readInt() != 0)
{
paramAdRequestInfoParcel = AdResponseParcel.CREATOR.a(localParcel2);
return paramAdRequestInfoParcel;
}
}
else
{
localParcel1.writeInt(0);
continue;
}
paramAdRequestInfoParcel = null;
}
finally
{
localParcel2.recycle();
localParcel1.recycle();
}
}
}
public void a(AdRequestInfoParcel paramAdRequestInfoParcel, zzk paramZzk)
{
Parcel localParcel1 = Parcel.obtain();
Parcel localParcel2 = Parcel.obtain();
for (;;)
{
try
{
localParcel1.writeInterfaceToken("com.google.android.gms.ads.internal.request.IAdRequestService");
if (paramAdRequestInfoParcel != null)
{
localParcel1.writeInt(1);
paramAdRequestInfoParcel.writeToParcel(localParcel1, 0);
if (paramZzk != null)
{
paramAdRequestInfoParcel = paramZzk.asBinder();
localParcel1.writeStrongBinder(paramAdRequestInfoParcel);
this.a.transact(2, localParcel1, localParcel2, 0);
localParcel2.readException();
}
}
else
{
localParcel1.writeInt(0);
continue;
}
paramAdRequestInfoParcel = null;
}
finally
{
localParcel2.recycle();
localParcel1.recycle();
}
}
}
public IBinder asBinder()
{
return this.a;
}
}
}
}
| [
"antal.micky@yahoo.com"
] | antal.micky@yahoo.com |
7b1a92ef128a00ccda9f519c8cfc5e2acd26a7ca | ca030864a3a1c24be6b9d1802c2353da4ca0d441 | /classes5.dex_source_from_JADX/com/google/common/collect/Tables.java | 01b2b6ad6420e549786aea16725a8d7391bf3fc6 | [] | no_license | pxson001/facebook-app | 87aa51e29195eeaae69adeb30219547f83a5b7b1 | 640630f078980f9818049625ebc42569c67c69f7 | refs/heads/master | 2020-04-07T20:36:45.758523 | 2018-03-07T09:04:57 | 2018-03-07T09:04:57 | 124,208,458 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,805 | java | package com.google.common.collect;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Function;
import com.google.common.base.Objects;
import java.io.Serializable;
import java.util.Collections;
import java.util.Map;
import javax.annotation.Nullable;
@GwtCompatible
/* compiled from: bug_report_in_progress */
public final class Tables {
private static final Function<? extends Map<?, ?>, ? extends Map<?, ?>> f7575a = new C08531();
/* compiled from: bug_report_in_progress */
final class C08531 implements Function<Map<Object, Object>, Map<Object, Object>> {
C08531() {
}
public final Object apply(Object obj) {
return Collections.unmodifiableMap((Map) obj);
}
}
/* compiled from: bug_report_in_progress */
public abstract class AbstractCell<R, C, V> {
@Nullable
public abstract R mo1002a();
@Nullable
public abstract C mo1003b();
@Nullable
public abstract V mo1004c();
AbstractCell() {
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof AbstractCell)) {
return false;
}
AbstractCell abstractCell = (AbstractCell) obj;
if (Objects.equal(mo1002a(), abstractCell.mo1002a()) && Objects.equal(mo1003b(), abstractCell.mo1003b()) && Objects.equal(mo1004c(), abstractCell.mo1004c())) {
return true;
}
return false;
}
public int hashCode() {
return Objects.hashCode(new Object[]{mo1002a(), mo1003b(), mo1004c()});
}
public String toString() {
return "(" + mo1002a() + "," + mo1003b() + ")=" + mo1004c();
}
}
/* compiled from: bug_report_in_progress */
public final class ImmutableCell<R, C, V> extends AbstractCell<R, C, V> implements Serializable {
private final C columnKey;
private final R rowKey;
private final V value;
public ImmutableCell(@Nullable R r, @Nullable C c, @Nullable V v) {
this.rowKey = r;
this.columnKey = c;
this.value = v;
}
public final R mo1002a() {
return this.rowKey;
}
public final C mo1003b() {
return this.columnKey;
}
public final V mo1004c() {
return this.value;
}
}
private Tables() {
}
static boolean m13704a(Table<?, ?, ?> table, @Nullable Object obj) {
if (obj == table) {
return true;
}
if (!(obj instanceof Table)) {
return false;
}
return table.b().equals(((Table) obj).b());
}
}
| [
"son.pham@jmango360.com"
] | son.pham@jmango360.com |
c095e783e07f90fc252d01ec4e7d958d07a011bd | 7e06d07b3d9752b1a12874c9f647cfe809b926f8 | /740-delete-and-earn/5-23-2019.java | ce2f648744fb47e80096d1839553228985437e4f | [] | no_license | wushangzhen/LeetCode-Practice | e44363f1e0ff72b80e060ac39984fe469dba04d8 | afba5a3dc84e8615685f893b8394b5137e9a42b6 | refs/heads/master | 2020-03-09T18:07:32.825047 | 2019-09-17T00:14:40 | 2019-09-17T00:14:40 | 128,924,476 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 478 | java | class Solution {
public int deleteAndEarn(int[] nums) {
int N = 10000;
int[] values = new int[N + 1];
for (int num : nums) {
values[num] += num;
}
int[] take = new int[N + 1];
int[] skip = new int[N + 1];
for (int i = 1; i <= N; i++) {
skip[i] = Math.max(skip[i - 1], take[i - 1]);
take[i] = skip[i - 1] + values[i - 1];
}
return Math.max(skip[N], take[N]);
}
}
| [
"wushangzhen_bupt@163.com"
] | wushangzhen_bupt@163.com |
9093cb998b7c6cff92ede9d8bfc4da4711c78dd8 | 07395e5505c3018578bc05de5bd9db1cc1f965c7 | /dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/LWUITmodel/ProgramStage.java | 0d6d8b005807753ac71c5cc585433f14a4093aa0 | [
"BSD-3-Clause"
] | permissive | darken1/dhis2darken | ae26aec266410eda426254a595eed597a2312f50 | 849ee5385505339c1d075f568a4a41d4293162f7 | refs/heads/master | 2020-12-25T01:27:16.872079 | 2014-06-26T20:11:08 | 2014-06-26T20:11:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,636 | java | package org.hisp.dhis.api.mobile.model.LWUITmodel;
/*
* Copyright (c) 2004-2014, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* Neither the name of the HISP project nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.hisp.dhis.api.mobile.model.Model;
/**
* @author Nguyen Kim Lai
*/
public class ProgramStage
extends Model
{
private String clientVersion;
private String reportDate;
private String dueDate;
private String reportDateDescription;
private boolean isRepeatable;
private boolean isCompleted;
private boolean isSingleEvent;
private Integer standardInterval;
private List<Section> sections;
private List<ProgramStageDataElement> dataElements = new ArrayList<ProgramStageDataElement>();
public List<Section> getSections()
{
return sections;
}
public void setSections( List<Section> sections )
{
this.sections = sections;
}
public List<ProgramStageDataElement> getDataElements()
{
return dataElements;
}
public void setDataElements( List<ProgramStageDataElement> dataElements )
{
this.dataElements = dataElements;
}
public String getClientVersion()
{
return clientVersion;
}
public void setClientVersion( String clientVersion )
{
this.clientVersion = clientVersion;
}
public boolean isRepeatable()
{
return isRepeatable;
}
public void setRepeatable( boolean isRepeatable )
{
this.isRepeatable = isRepeatable;
}
public boolean isCompleted()
{
return isCompleted;
}
public void setCompleted( boolean isCompleted )
{
this.isCompleted = isCompleted;
}
public boolean isSingleEvent()
{
return isSingleEvent;
}
public void setSingleEvent( boolean isSingleEvent )
{
this.isSingleEvent = isSingleEvent;
}
public String getReportDate()
{
return reportDate;
}
public void setReportDate( String reportDate )
{
this.reportDate = reportDate;
}
public String getReportDateDescription()
{
return reportDateDescription;
}
public void setReportDateDescription( String reportDateDescription )
{
this.reportDateDescription = reportDateDescription;
}
public Integer getStandardInterval()
{
return standardInterval;
}
public void setStandardInterval( Integer standardInterval )
{
this.standardInterval = standardInterval;
}
public String getDueDate()
{
return dueDate;
}
public void setDueDate( String dueDate )
{
this.dueDate = dueDate;
}
@Override
public void serialize( DataOutputStream dout )
throws IOException
{
super.serialize( dout );
if ( reportDate == null )
{
reportDate = "";
}
if ( dueDate == null )
{
dueDate = "";
}
dout.writeUTF( reportDate );
dout.writeUTF( reportDateDescription );
dout.writeUTF( dueDate );
dout.writeBoolean( isRepeatable );
dout.writeInt( standardInterval );
dout.writeBoolean( isCompleted() );
dout.writeBoolean( isSingleEvent );
dout.writeInt( dataElements.size() );
for ( int i = 0; i < dataElements.size(); i++ )
{
dataElements.get( i ).serialize( dout );
}
dout.writeInt( sections.size() );
for ( int i = 0; i < sections.size(); i++ )
{
sections.get( i ).serialize( dout );
}
}
@Override
public void deSerialize( DataInputStream dint )
throws IOException
{
super.deSerialize( dint );
setReportDate( dint.readUTF() );
setReportDateDescription( dint.readUTF() );
setDueDate( dint.readUTF() );
setRepeatable( dint.readBoolean() );
setStandardInterval( dint.readInt() );
setCompleted( dint.readBoolean() );
setSingleEvent( dint.readBoolean() );
int dataElementSize = dint.readInt();
if ( dataElementSize > 0 )
{
for ( int i = 0; i < dataElementSize; i++ )
{
ProgramStageDataElement de = new ProgramStageDataElement();
de.deSerialize( dint );
dataElements.add( de );
}
}
else
{
}
int sectionSize = dint.readInt();
if ( sectionSize > 0 )
{
for ( int i = 0; i < sectionSize; i++ )
{
sections = new ArrayList<Section>();
Section se = new Section();
se.deSerialize( dint );
sections.add( se );
}
}
else
{
}
}
}
| [
"sunbiz@gmail.com"
] | sunbiz@gmail.com |
2bda72e7409bb78a9ed3e92a7745cf1857016345 | deeedf3cebb71989a42ea39a42ad3a4ee843cfff | /app/src/main/java/com/shuiwangzhijia/shuidian/bean/ReturnMoneyRtypeOneBean.java | 277b9719d16a387d4c976d1a8ec1e5d39cb79c70 | [] | no_license | 353557447/HelperShop | a3255d3c43b8a019067b69d68c61cb1b5ec5bd4f | 59eb00bdaca33757e43f1542f277f0831e255d9a | refs/heads/master | 2020-06-04T13:08:22.204719 | 2019-06-22T12:09:36 | 2019-06-22T12:09:36 | 192,033,340 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,019 | java | package com.shuiwangzhijia.shuidian.bean;
import java.util.List;
/**
* Created by Lijn on 2019/4/29.
*/
public class ReturnMoneyRtypeOneBean {
/**
* code : 200.0
* msg : 查询成功
* data : [{"rebate_no":"F2019042516594403","r_type":1,"rbasis":1,"r_way":1,"rule":"1","total_amount":"0.01","s_count":0,"status":3,"update_time":1.556176799E9,"apply_time":1.556176799E9,"goods":[{"gid":"76676264","r_id":154405,"r_way":1,"rule":1,"rbasis":1,"gname":"小分子空气水","gnum":3,"amount":"0.01","snum":0,"ratio":"150%","full":2}]},{"rebate_no":"F2019042516594398","r_type":1,"rbasis":1,"r_way":1,"rule":"1","total_amount":"0.01","s_count":0,"status":3,"update_time":1.55617572E9,"apply_time":1.55617572E9,"goods":[{"gid":"76676264","r_id":154405,"r_way":1,"rule":1,"rbasis":1,"gname":"小分子空气水","gnum":3,"amount":"0.01","snum":0,"ratio":"150%","full":2}]}]
* scode : 0.0
*/
private int code;
private String msg;
private int scode;
private List<DataBean> data;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public int getScode() {
return scode;
}
public void setScode(int scode) {
this.scode = scode;
}
public List<DataBean> getData() {
return data;
}
public void setData(List<DataBean> data) {
this.data = data;
}
public static class DataBean {
/**
* rebate_no : F2019042516594403
* r_type : 1.0
* rbasis : 1.0
* r_way : 1.0
* rule : 1
* total_amount : 0.01
* s_count : 0.0
* status : 3.0
* update_time : 1.556176799E9
* apply_time : 1.556176799E9
* goods : [{"gid":"76676264","r_id":154405,"r_way":1,"rule":1,"rbasis":1,"gname":"小分子空气水","gnum":3,"amount":"0.01","snum":0,"ratio":"150%","full":2}]
*/
private String rebate_no;
private int r_type;
private int rbasis;
private int r_way;
private String rule;
private String total_amount;
private int s_count;
private int status;
private long update_time;
private long apply_time;
private List<GoodsBean> goods;
public String getRebate_no() {
return rebate_no;
}
public void setRebate_no(String rebate_no) {
this.rebate_no = rebate_no;
}
public int getR_type() {
return r_type;
}
public void setR_type(int r_type) {
this.r_type = r_type;
}
public int getRbasis() {
return rbasis;
}
public void setRbasis(int rbasis) {
this.rbasis = rbasis;
}
public int getR_way() {
return r_way;
}
public void setR_way(int r_way) {
this.r_way = r_way;
}
public String getRule() {
return rule;
}
public void setRule(String rule) {
this.rule = rule;
}
public String getTotal_amount() {
return total_amount;
}
public void setTotal_amount(String total_amount) {
this.total_amount = total_amount;
}
public int getS_count() {
return s_count;
}
public void setS_count(int s_count) {
this.s_count = s_count;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public long getUpdate_time() {
return update_time;
}
public void setUpdate_time(long update_time) {
this.update_time = update_time;
}
public long getApply_time() {
return apply_time;
}
public void setApply_time(long apply_time) {
this.apply_time = apply_time;
}
public List<GoodsBean> getGoods() {
return goods;
}
public void setGoods(List<GoodsBean> goods) {
this.goods = goods;
}
public static class GoodsBean {
/**
* gid : 76676264
* r_id : 154405.0
* r_way : 1.0
* rule : 1.0
* rbasis : 1.0
* gname : 小分子空气水
* gnum : 3.0
* amount : 0.01
* snum : 0.0
* ratio : 150%
* full : 2.0
*/
private String gid;
private int r_id;
private int r_way;
private int rule;
private int rbasis;
private String gname;
private int gnum;
private String amount;
private int snum;
private String ratio;
private int full;
public String getGid() {
return gid;
}
public void setGid(String gid) {
this.gid = gid;
}
public int getR_id() {
return r_id;
}
public void setR_id(int r_id) {
this.r_id = r_id;
}
public int getR_way() {
return r_way;
}
public void setR_way(int r_way) {
this.r_way = r_way;
}
public int getRule() {
return rule;
}
public void setRule(int rule) {
this.rule = rule;
}
public int getRbasis() {
return rbasis;
}
public void setRbasis(int rbasis) {
this.rbasis = rbasis;
}
public String getGname() {
return gname;
}
public void setGname(String gname) {
this.gname = gname;
}
public int getGnum() {
return gnum;
}
public void setGnum(int gnum) {
this.gnum = gnum;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public int getSnum() {
return snum;
}
public void setSnum(int snum) {
this.snum = snum;
}
public String getRatio() {
return ratio;
}
public void setRatio(String ratio) {
this.ratio = ratio;
}
public int getFull() {
return full;
}
public void setFull(int full) {
this.full = full;
}
}
}
}
| [
"353557447@qq.com"
] | 353557447@qq.com |
56908396eee745b035fd2aa4bf2039cf21d39454 | e3e0dd82a8d8972fe528fa9717703fb96d2c41e6 | /src/main/java/whatisnewin/java/util/function/WhatIsNewInPredicate.java | 2d31b9cb05b482ad11fb9626fc389b94cefc1e08 | [] | no_license | weissreto/what-is-new-in-java-9-10-11 | 0ec10b40ad37de4b47abbb75004116e711800962 | 8d5afe909e2e05c9d90b6dc821502cd2ba2fd9d4 | refs/heads/master | 2020-09-09T01:34:00.617660 | 2020-03-29T12:38:36 | 2020-03-29T12:38:36 | 221,302,384 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 726 | java | package whatisnewin.java.util.function;
import java.util.function.Predicate;
/**
* This source file was generated by WhatIsNewInJava.<br>
*
* This class provides an example call to each method in class {@link Predicate}
* that were newly introduced in Java versions 9, 10, 11.<br>
*
* {@link Predicate} is an old class but has new fields, constructors or methods.
* @since 1.8
* @see Predicate
*/
public final class WhatIsNewInPredicate<T>
{
/**
* Example call to new method {@link Predicate#not(Predicate)}.
* @since 11
* @see Predicate#not(Predicate)
*/
public static <T> Predicate<T> not(Predicate<? super T> target)
{
Predicate<T> result = Predicate.not(target);
return result;
}
}
| [
"reto.weiss@ivyteam.ch"
] | reto.weiss@ivyteam.ch |
082929b8dabd76a671c436fd50aa05c5bad5fe80 | dd019ee07c8e907bc066970f927db19a47b902af | /app/src/main/java/qtc/project/app/ui/views/activity/customer_activity/CustomerActivityViewCallback.java | e53c639b9948cb3961af7b53ae0ea6ba501be600 | [] | no_license | dinhdeveloper/qtc_app | 6b12f9177ecb1f504bd1e3de9c83a7ca7d1ea828 | 3c37a9f8ad51d3540bb9dca1e072a1d79745a483 | refs/heads/master | 2023-02-01T01:16:44.895766 | 2020-12-12T05:03:06 | 2020-12-12T05:03:06 | 320,128,082 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 300 | java | package qtc.project.app.ui.views.activity.customer_activity;
public interface CustomerActivityViewCallback {
void changeToFragmentDashboard();
void changeToFragmentIntroduce();
void changeToFragmentProduct();
void changeToFragmentArticle();
void changeToFragmentContact();
}
| [
"dinhtrancntt@gmail.com"
] | dinhtrancntt@gmail.com |
0adb09d3d8ab763e478409280f390908f475b8db | 1629e37bba65c44f8cf5e88d73c71870089041a4 | /JAVA高级/day19_JDBC优化/day18_eg/src/cn/itcast/dao/impl/AdminDao.java | b777ddde260f40f5b292097701470562d995fceb | [] | no_license | 15529343201/Java-Web | e202e242663911420879685c6762c8d232ef5d61 | 15886604aa7b732d42f7f5783f73766da34923e2 | refs/heads/master | 2021-01-19T08:50:32.816256 | 2019-03-28T23:34:31 | 2019-03-28T23:34:31 | 87,683,430 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,846 | java | package cn.itcast.dao.impl;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanHandler;
import org.apache.commons.dbutils.handlers.ScalarHandler;
import cn.itcast.dao.IAdminDao;
import cn.itcast.entity.Admin;
import cn.itcast.utils.JdbcUtil;
/**
* 2. 数据访问层接口的实现类
* (引入DbUtils组件简化jdbc操作)
* @author Jie.Yuan
*
*/
public class AdminDao implements IAdminDao {
private Connection con;
private QueryRunner qr = new QueryRunner();
@Override
public Admin findByNameAndPwd(Admin admin) {
String sql = "select * from admin where userName=? and pwd=?";
try{
con = JdbcUtil.getConnection();
Admin ad = qr.query(con, sql,
new BeanHandler<Admin>(Admin.class),
admin.getUserName(),
admin.getPwd());
return ad;
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
JdbcUtil.closeAll(con, null, null);
}
}
@Override
public void save(Admin admin) {
String sql = "INSERT INTO admin(userName,pwd) VALUES(?,?);";
try {
con = JdbcUtil.getConnection();
// 使用DbUtils组件的方法更新
qr.update(con, sql, admin.getUserName(),admin.getPwd());
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
JdbcUtil.closeAll(con, null, null);
}
}
@Override
public boolean userExists(String name) {
String sql = "select id from admin where userName=?";
try {
con = JdbcUtil.getConnection();
Integer in = qr.query(con, sql, new ScalarHandler<Integer>(), name);
if (in != null){
return true;
}
return false;
} catch (SQLException e) {
throw new RuntimeException(e);
} finally {
JdbcUtil.closeAll(con, null, null);
}
}
}
| [
"15529343201@139.com"
] | 15529343201@139.com |
562d32f09b6d223c2aa32d4cd4f0ca14881aa5f6 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/serge-rider--dbeaver/777b52064dacb187acada909a82f791e5cdba222/after/DBASecurePreferences.java | 54069f923a74201d49b44b5c5bf331a22e244b20 | [] | 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 | 904 | java | /*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2016 Serge Rieder (serge@jkiss.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License (version 2)
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package org.jkiss.dbeaver.model.admin;
/**
* Secure preferences.
* Used to store passwords.
*/
public interface DBASecurePreferences
{
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
2d18c296c63a12e3a9a5a7ee5b1710f7f3ed0346 | 42b68a55d4ca4c48b40ea0e0811f16fa0a523b33 | /src/main/java/com/colin/springboot/fileserver/config/MongoSettingsProperties.java | ac0d56779704a1eb51e6d76ec023a3c56366f8ea | [] | no_license | siasColin/fileserver | 0ca49e8be5eb195c4c6e967f26ff9d74dc9950a2 | e0d4577489bc3adc6f71b7279eba68350ef36d85 | refs/heads/master | 2021-05-22T16:27:57.059036 | 2020-08-20T10:11:05 | 2020-08-20T10:11:05 | 253,003,009 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,775 | java | package com.colin.springboot.fileserver.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.util.Arrays;
import java.util.List;
/**
* @Package: com.colin.springboot.fileserver.config
* @Author: sxf
* @Date: 2020-4-4
* @Description:
*/
//@Component
//@ConfigurationProperties(prefix = "mongodb")
public class MongoSettingsProperties {
private String database = "filedb";
private List<String> address = Arrays.asList("localhost:27017");
private Integer minConnectionsPerHost = 0;
private Integer maxConnectionsPerHost = 100;
private Integer threadsAllowedToBlockForConnectionMultiplier = 5;
private Integer serverSelectionTimeout = 30000;
private Integer maxWaitTime = 120000;
private Integer maxConnectionIdleTime = 0;
private Integer maxConnectionLifeTime = 0;
private Integer connectTimeout = 10000;
private Integer socketTimeout = 0;
private Boolean socketKeepAlive = false;
private Boolean sslEnabled = false;
private Boolean sslInvalidHostNameAllowed = false;
private Boolean alwaysUseMBeans = false;
private Integer heartbeatFrequency = 10000;
private Integer minHeartbeatFrequency = 500;
private Integer heartbeatConnectTimeout = 20000;
private Integer heartbeatSocketTimeout = 20000;
private Integer localThreshold = 15;
public String getDatabase() {
return database;
}
public void setDatabase(String database) {
this.database = database;
}
public List<String> getAddress() {
return address;
}
public void setAddress(List<String> address) {
this.address = address;
}
public Integer getMinConnectionsPerHost() {
return minConnectionsPerHost;
}
public void setMinConnectionsPerHost(Integer minConnectionsPerHost) {
this.minConnectionsPerHost = minConnectionsPerHost;
}
public Integer getMaxConnectionsPerHost() {
return maxConnectionsPerHost;
}
public void setMaxConnectionsPerHost(Integer maxConnectionsPerHost) {
this.maxConnectionsPerHost = maxConnectionsPerHost;
}
public Integer getThreadsAllowedToBlockForConnectionMultiplier() {
return threadsAllowedToBlockForConnectionMultiplier;
}
public void setThreadsAllowedToBlockForConnectionMultiplier(Integer threadsAllowedToBlockForConnectionMultiplier) {
this.threadsAllowedToBlockForConnectionMultiplier = threadsAllowedToBlockForConnectionMultiplier;
}
public Integer getServerSelectionTimeout() {
return serverSelectionTimeout;
}
public void setServerSelectionTimeout(Integer serverSelectionTimeout) {
this.serverSelectionTimeout = serverSelectionTimeout;
}
public Integer getMaxWaitTime() {
return maxWaitTime;
}
public void setMaxWaitTime(Integer maxWaitTime) {
this.maxWaitTime = maxWaitTime;
}
public Integer getMaxConnectionIdleTime() {
return maxConnectionIdleTime;
}
public void setMaxConnectionIdleTime(Integer maxConnectionIdleTime) {
this.maxConnectionIdleTime = maxConnectionIdleTime;
}
public Integer getMaxConnectionLifeTime() {
return maxConnectionLifeTime;
}
public void setMaxConnectionLifeTime(Integer maxConnectionLifeTime) {
this.maxConnectionLifeTime = maxConnectionLifeTime;
}
public Integer getConnectTimeout() {
return connectTimeout;
}
public void setConnectTimeout(Integer connectTimeout) {
this.connectTimeout = connectTimeout;
}
public Integer getSocketTimeout() {
return socketTimeout;
}
public void setSocketTimeout(Integer socketTimeout) {
this.socketTimeout = socketTimeout;
}
public Boolean getSocketKeepAlive() {
return socketKeepAlive;
}
public void setSocketKeepAlive(Boolean socketKeepAlive) {
this.socketKeepAlive = socketKeepAlive;
}
public Boolean getSslEnabled() {
return sslEnabled;
}
public void setSslEnabled(Boolean sslEnabled) {
this.sslEnabled = sslEnabled;
}
public Boolean getSslInvalidHostNameAllowed() {
return sslInvalidHostNameAllowed;
}
public void setSslInvalidHostNameAllowed(Boolean sslInvalidHostNameAllowed) {
this.sslInvalidHostNameAllowed = sslInvalidHostNameAllowed;
}
public Boolean getAlwaysUseMBeans() {
return alwaysUseMBeans;
}
public void setAlwaysUseMBeans(Boolean alwaysUseMBeans) {
this.alwaysUseMBeans = alwaysUseMBeans;
}
public Integer getHeartbeatFrequency() {
return heartbeatFrequency;
}
public void setHeartbeatFrequency(Integer heartbeatFrequency) {
this.heartbeatFrequency = heartbeatFrequency;
}
public Integer getMinHeartbeatFrequency() {
return minHeartbeatFrequency;
}
public void setMinHeartbeatFrequency(Integer minHeartbeatFrequency) {
this.minHeartbeatFrequency = minHeartbeatFrequency;
}
public Integer getHeartbeatConnectTimeout() {
return heartbeatConnectTimeout;
}
public void setHeartbeatConnectTimeout(Integer heartbeatConnectTimeout) {
this.heartbeatConnectTimeout = heartbeatConnectTimeout;
}
public Integer getHeartbeatSocketTimeout() {
return heartbeatSocketTimeout;
}
public void setHeartbeatSocketTimeout(Integer heartbeatSocketTimeout) {
this.heartbeatSocketTimeout = heartbeatSocketTimeout;
}
public Integer getLocalThreshold() {
return localThreshold;
}
public void setLocalThreshold(Integer localThreshold) {
this.localThreshold = localThreshold;
}
}
| [
"1540247870@qq.com"
] | 1540247870@qq.com |
e1c1d58c7a70cbfdbe1b4586584086b6c962d1db | 59d69052bb89d5db947dde264e81433399b3d724 | /app/src/main/java/com/trungpt/videoplus/sync/vimeo/response/VimeoResponseLikesDTO.java | 8f8216899c5456c865b72104e67df787595940cb | [] | no_license | trungptdhcn/videoplust | fe3497c47bf96674333fd95d1effa281d510b243 | 5cedd1679eca765084067656c4c1ed969307c74b | refs/heads/master | 2021-01-19T08:26:55.974788 | 2015-12-24T06:52:27 | 2015-12-24T06:52:27 | 48,529,597 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 346 | java | package com.trungpt.videoplus.sync.vimeo.response;
import java.math.BigInteger;
/**
* Created by Trung on 11/25/2015.
*/
public class VimeoResponseLikesDTO
{
private BigInteger total;
public BigInteger getTotal()
{
return total;
}
public void setTotal(BigInteger total)
{
this.total = total;
}
}
| [
"trungptdhcn@gmail.com"
] | trungptdhcn@gmail.com |
5f038e4faf5a63dcf9d983da17c21efee084f2b7 | f2d85e3f5d6dcac0a7b18cbfef6d6b7c62ab570a | /rdma-based-storm/storm-core/src/jvm/org/apache/storm/executor/bolt/BoltExecutor.java | c5a62ba6c24a29ee90e2dd3a57cb9b7e763dc15e | [
"Apache-2.0",
"MIT",
"BSD-3-Clause",
"BSD-2-Clause",
"GPL-1.0-or-later"
] | permissive | dke-knu/i2am | 82bb3cf07845819960f1537a18155541a1eb79eb | 0548696b08ef0104b0c4e6dec79c25300639df04 | refs/heads/master | 2023-07-20T01:30:07.029252 | 2023-07-07T02:00:59 | 2023-07-07T02:00:59 | 71,136,202 | 8 | 14 | Apache-2.0 | 2023-07-07T02:00:31 | 2016-10-17T12:29:48 | Java | UTF-8 | Java | false | false | 6,212 | java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.storm.executor.bolt;
import com.google.common.collect.ImmutableMap;
import java.util.List;
import org.apache.storm.Constants;
import org.apache.storm.ICredentialsListener;
import org.apache.storm.daemon.Task;
import org.apache.storm.daemon.metrics.BuiltinMetricsUtil;
import org.apache.storm.daemon.worker.WorkerState;
import org.apache.storm.executor.Executor;
import org.apache.storm.hooks.info.BoltExecuteInfo;
import org.apache.storm.stats.BoltExecutorStats;
import org.apache.storm.task.IBolt;
import org.apache.storm.task.IOutputCollector;
import org.apache.storm.task.OutputCollector;
import org.apache.storm.task.TopologyContext;
import org.apache.storm.tuple.TupleImpl;
import org.apache.storm.utils.ConfigUtils;
import org.apache.storm.utils.DisruptorQueue;
import org.apache.storm.utils.Time;
import org.apache.storm.utils.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
import java.util.concurrent.Callable;
public class BoltExecutor extends Executor {
private static final Logger LOG = LoggerFactory.getLogger(BoltExecutor.class);
private final Callable<Boolean> executeSampler;
public BoltExecutor(WorkerState workerData, List<Long> executorId, Map<String, String> credentials) {
super(workerData, executorId, credentials);
this.executeSampler = ConfigUtils.mkStatsSampler(stormConf);
}
public void init(Map<Integer, Task> idToTask) {
while (!stormActive.get()) {
Utils.sleep(100);
}
LOG.info("Preparing bolt {}:{}", componentId, idToTask.keySet());
for (Map.Entry<Integer, Task> entry : idToTask.entrySet()) {
Task taskData = entry.getValue();
IBolt boltObject = (IBolt) taskData.getTaskObject();
TopologyContext userContext = taskData.getUserContext();
taskData.getBuiltInMetrics().registerAll(stormConf, userContext);
if (boltObject instanceof ICredentialsListener) {
((ICredentialsListener) boltObject).setCredentials(credentials);
}
if (Constants.SYSTEM_COMPONENT_ID.equals(componentId)) {
Map<String, DisruptorQueue> map = ImmutableMap.of("sendqueue", transferQueue, "receive", receiveQueue,
"transfer", workerData.getTransferQueue());
BuiltinMetricsUtil.registerQueueMetrics(map, stormConf, userContext);
Map cachedNodePortToSocket = (Map) workerData.getCachedNodeToPortSocket().get();
BuiltinMetricsUtil.registerIconnectionClientMetrics(cachedNodePortToSocket, stormConf, userContext);
BuiltinMetricsUtil.registerIconnectionServerMetric(workerData.getReceiver(), stormConf, userContext);
} else {
Map<String, DisruptorQueue> map = ImmutableMap.of("sendqueue", transferQueue, "receive", receiveQueue);
BuiltinMetricsUtil.registerQueueMetrics(map, stormConf, userContext);
}
IOutputCollector outputCollector = new BoltOutputCollectorImpl(this, taskData, entry.getKey(), rand, hasEventLoggers, isDebug);
boltObject.prepare(stormConf, userContext, new OutputCollector(outputCollector));
}
openOrPrepareWasCalled.set(true);
LOG.info("Prepared bolt {}:{}", componentId, idToTask.keySet());
setupMetrics();
}
@Override
public Callable<Object> call() throws Exception {
init(idToTask);
return new Callable<Object>() {
@Override
public Object call() throws Exception {
receiveQueue.consumeBatchWhenAvailable(BoltExecutor.this);
return 0L;
}
};
}
@Override
public void tupleActionFn(int taskId, TupleImpl tuple) throws Exception {
String streamId = tuple.getSourceStreamId();
if (Constants.CREDENTIALS_CHANGED_STREAM_ID.equals(streamId)) {
Object taskObject = idToTask.get(taskId).getTaskObject();
if (taskObject instanceof ICredentialsListener) {
((ICredentialsListener) taskObject).setCredentials((Map<String, String>) tuple.getValue(0));
}
} else if (Constants.METRICS_TICK_STREAM_ID.equals(streamId)) {
metricsTick(idToTask.get(taskId), tuple);
} else {
IBolt boltObject = (IBolt) idToTask.get(taskId).getTaskObject();
boolean isSampled = sampler.call();
boolean isExecuteSampler = executeSampler.call();
Long now = (isSampled || isExecuteSampler) ? System.currentTimeMillis() : null;
if (isSampled) {
tuple.setProcessSampleStartTime(now);
}
if (isExecuteSampler) {
tuple.setExecuteSampleStartTime(now);
}
boltObject.execute(tuple);
Long ms = tuple.getExecuteSampleStartTime();
long delta = (ms != null) ? Time.deltaMs(ms) : 0;
if (isDebug) {
LOG.info("Execute done TUPLE {} TASK: {} DELTA: {}", tuple, taskId, delta);
}
new BoltExecuteInfo(tuple, taskId, delta).applyOn(idToTask.get(taskId).getUserContext());
if (delta != 0) {
((BoltExecutorStats) stats).boltExecuteTuple(tuple.getSourceComponent(), tuple.getSourceStreamId(), delta);
}
}
}
}
| [
"wnghd9999@naver.com"
] | wnghd9999@naver.com |
376bb0bdb96eade4849d0b49416677a8bff641b1 | c954c774eb5c69c6df6b4c73c87679dd48efc2fe | /gateway/src/main/java/org/javaboy/gateway/GatewayApplication.java | 5a8e20f62f96613db07bb525cdff2bd1cb2a1ddc | [] | no_license | zhiyuwyu/springcloud-video-samples | bafc30a9fd150796878f8d4f2f84375e4044b01d | dee3cf373872570c2c343baed1366f92966ea1e9 | refs/heads/master | 2022-12-19T18:07:42.433029 | 2020-02-27T16:04:40 | 2020-02-27T16:04:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 741 | java | package org.javaboy.gateway;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;
@SpringBootApplication
public class GatewayApplication {
public static void main(String[] args) {
SpringApplication.run(GatewayApplication.class, args);
}
/* @Bean
RouteLocator routeLocator(RouteLocatorBuilder builder) {
return builder.routes()
.route("javaboy_route", r -> r.path("/get").uri("http://httpbin.org"))
.build();
}*/
}
| [
"wangsong0210@gmail.com"
] | wangsong0210@gmail.com |
3af8e565c5303584d7a4d84987ade670a6b20492 | 4b9c2303bf29edfa6d2cd78243c9e44cd37df5a4 | /src/org/usfirst/frc/team2848/robot/commands/intakecommands/SetBottomPos.java | afc4b1f04e4755d5ab80cf91d659f1e4edcdea9a | [] | no_license | AllSparks2848/FRC2017Steamworks | e2cfe4467d52ef56ac23f906eb312a61f7bdb550 | 4d613cb0fd47fa3a1daa30cf73bce915311814fe | refs/heads/master | 2021-01-22T18:43:31.849692 | 2017-03-25T20:03:09 | 2017-03-25T20:03:09 | 85,110,625 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,481 | java | package org.usfirst.frc.team2848.robot.commands.intakecommands;
import org.usfirst.frc.team2848.robot.Robot;
import org.usfirst.frc.team2848.robot.subsystems.Intake;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
/**
*
*/
public class SetBottomPos extends Command {
public SetBottomPos() {
// Use requires() here to declare subsystem dependencies
// eg. requires(chassis);
requires(Robot.intake);
}
// Called just before this Command runs the first time
protected void initialize() {
Robot.intake.setBottomPos();
SmartDashboard.putNumber("Potentiometer Position", Intake.intakeEnc.get());
SmartDashboard.putNumber("Bottom Position", Robot.intake.bottomPos);
SmartDashboard.putNumber("Intake Position", Robot.intake.intakePos);
SmartDashboard.putNumber("Spit Position", Robot.intake.spitPos);
SmartDashboard.putNumber("Tuck Position", Robot.intake.tuckPos);
}
// Called repeatedly when this Command is scheduled to run
protected void execute() {
}
// Make this return true when this Command no longer needs to run execute()
protected boolean isFinished() {
return true;
}
// Called once after isFinished returns true
protected void end() {
}
// Called when another command which requires one or more of the same
// subsystems is scheduled to run
protected void interrupted() {
}
}
| [
"18187@jcpstudents.org"
] | 18187@jcpstudents.org |
8051a0bfa954174ef8ef955e7b0aa092d25b8b59 | fce1e3fe1e35dee4482b07198fb08033b9c32ef6 | /com/google/android/gms/internal/ct.java | 286863cfee09b9bd51fcfbdbdced0e0bfd963c01 | [] | no_license | Ravinther/andriodprojecttodolist | cae041a692ab2ac0ffae6461921b151803313754 | 34a35ea0c72e69c070e9e565c2d8988b098b8019 | refs/heads/master | 2021-01-09T20:19:54.676431 | 2016-08-07T08:06:04 | 2016-08-07T08:06:04 | 65,122,650 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 794 | java | package com.google.android.gms.internal;
public abstract class ct {
private final Runnable kW;
private volatile Thread pI;
/* renamed from: com.google.android.gms.internal.ct.1 */
class C02421 implements Runnable {
final /* synthetic */ ct pJ;
C02421(ct ctVar) {
this.pJ = ctVar;
}
public final void run() {
this.pJ.pI = Thread.currentThread();
this.pJ.aB();
}
}
public ct() {
this.kW = new C02421(this);
}
public abstract void aB();
public final void cancel() {
onStop();
if (this.pI != null) {
this.pI.interrupt();
}
}
public abstract void onStop();
public final void start() {
cu.execute(this.kW);
}
}
| [
"m.ravinther@yahoo.com"
] | m.ravinther@yahoo.com |
afb3cb76cdd8e5d6639addcb467c29e0c1f64eb1 | cb8b4f91c893355227345b95393456536a516541 | /src/main/java/com/authine/cloudpivot/web/api/dto/BrigadeDutyInfoDto.java | f7a8c0ee0825d1eb07cf135790a783acedc6c18c | [] | no_license | sengeiou/whxf | fbfcdacd24829a81b971b7aa6271475ab74cfb8d | ff715afbf2af35fe9b81435f1a0a5441d6923605 | refs/heads/master | 2023-04-05T11:57:03.691897 | 2021-04-16T03:35:44 | 2021-04-16T03:35:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 593 | java | package com.authine.cloudpivot.web.api.dto;
import com.authine.cloudpivot.web.api.entity.BrigadeDutyInfo;
import com.authine.cloudpivot.web.api.entity.CommandAssistant;
import com.authine.cloudpivot.web.api.entity.Commander;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @author wangyong
* @time 2020/5/18 13:31
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BrigadeDutyInfoDto extends BrigadeDutyInfo {
private List<Commander> commanders;
private List<CommandAssistant> commandAssistants;
}
| [
"1950746552@qq.com"
] | 1950746552@qq.com |
39d032182a89981f9ea2f053c5b484c55fbb31f3 | 6aeba6834cadd5122e6dc128e10e1e3830b25f84 | /src/Graph_dfs_bfs/DiameterOfBinaryTree.java | 8f44bffdac85321fbd9e8f37201a2903535aa5d5 | [] | no_license | jadefromkorea/codingTest | fbf1b7199e060a8dc686216ae1bc79b31b7bf8fd | 842798883a7f9c5e46d4eb95be440e4055a195f0 | refs/heads/master | 2022-12-14T14:54:47.782350 | 2020-08-23T07:11:05 | 2020-08-23T07:11:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 765 | java | package Graph_dfs_bfs;
class TreeNode {
int val;
TreeNode left, right;
TreeNode(int x) {
this.val = x;
}
}
class MaxDepth {
int max = 0;
public int solve(TreeNode root) {
maxDepth(root);
return max;
}
public int maxDepth(TreeNode root) {
if (root == null)
return 0;
int left = maxDepth(root.left);
int right = maxDepth(root.right);
max = Math.max(left + right, max);
return Math.max(left, right) + 1;
}
}
public class DiameterOfBinaryTree {
public static void main(String[] args) {
MaxDepth a = new MaxDepth();
TreeNode root = new TreeNode(1);
root.left = new TreeNode(2);
root.right = new TreeNode(3);
root.left.left = new TreeNode(4);
root.left.right = new TreeNode(5);
System.out.println(a.solve(root));
}
}
| [
"jadefromkorea@gmail.com"
] | jadefromkorea@gmail.com |
5144e245e6441c3a1ac15dd762714c574898f9a9 | a2c45038ab98f107061805035ede6fdf688e2627 | /3_implementation/src/net/hudup/core/parser/SnapshotParser.java | 630a693861c18c4227b5693bc4ff7f152665fc85 | [
"MIT"
] | permissive | sunflowersoft/hudup | 08a6e2d89b6d0adc4d2f5e06cc663cd2764bf9d6 | a5c84b63e25e564f095623950671da0803f1b177 | refs/heads/master | 2022-05-22T07:12:45.805449 | 2022-05-03T05:57:27 | 2022-05-03T05:57:27 | 131,938,499 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,909 | java | /**
*
*/
package net.hudup.core.parser;
import net.hudup.core.data.DataConfig;
import net.hudup.core.data.DataDriver;
/**
* There are two typical {@code Dataset} such as {@code Snapshot} and {@code Scanner}.
* {@code Snapshot} or {@code Scanner} is defined as an image of piece of {@code Dataset} and knowledge base ({@code KBase}) at certain time point.
* The difference between {@code Snapshot} and {@code Scanner} that {@code Snapshot} copies whole piece of data into memory while scanner is merely a reference to such data piece.
* Another additional {@code Dataset} is {@code Pointer}.
* {@code Pointer} does not contain any information nor provide any access means to dataset.
* It only points to another {@code Snapshot}, {@code Scanner}, or {@code KBase}.<br>
* Although you can create your own {@code Dataset}, {@code Dataset} is often retrieved from utility class parsers that implement interface {@link DatasetParser}.
* {@code Snapshot} is retrieved from {@link SnapshotParser}.
* {@code Scanner} is retrieved from {@link ScannerParser}. Both {@link SnapshotParser} and {@link ScannerParser} implement interface {@link DatasetParser}.
* {@code Pointer} is retrieved from {@link Indicator}. {@link Indicator} is {@link DatasetParser} specified to create {@code Pointer}.
*
* @author Loc Nguyen
* @version 10.0
*
*/
public abstract class SnapshotParser extends BasicDatasetParser {
/**
* Serial version UID for serializable class.
*/
private static final long serialVersionUID = 1L;
/**
* Default constructor
*/
public SnapshotParser() {
super();
// TODO Auto-generated constructor stub
}
@Override
public DataConfig createDefaultConfig() {
// TODO Auto-generated method stub
return new DataConfig();
}
@Override
public boolean support(DataDriver driver) {
// TODO Auto-generated method stub
return !driver.isRecommendServer();
}
}
| [
"ngphloc@gmail.com"
] | ngphloc@gmail.com |
bee0be43b96e7adb9c3eda69bcc484432706a00f | 19f7e40c448029530d191a262e5215571382bf9f | /decompiled/instagram/sources/p000X/AAB.java | 6f21a04c7450494d7ae10b782db857b2747e66cb | [] | no_license | stanvanrooy/decompiled-instagram | c1fb553c52e98fd82784a3a8a17abab43b0f52eb | 3091a40af7accf6c0a80b9dda608471d503c4d78 | refs/heads/master | 2022-12-07T22:31:43.155086 | 2020-08-26T03:42:04 | 2020-08-26T03:42:04 | 283,347,288 | 18 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,953 | java | package p000X;
/* renamed from: X.AAB */
public final class AAB implements AAQ, AAR {
public static final AAB A00 = new AAB();
/* JADX WARNING: Can't fix incorrect switch cases order */
/* JADX WARNING: Code restructure failed: missing block: B:10:0x0029, code lost:
if (r5.equals("rotation") == false) goto L_0x000d;
*/
/* JADX WARNING: Code restructure failed: missing block: B:12:0x0033, code lost:
if (r5.equals("scaleY") == false) goto L_0x000d;
*/
/* JADX WARNING: Code restructure failed: missing block: B:14:0x003d, code lost:
if (r5.equals("scaleX") == false) goto L_0x000d;
*/
/* JADX WARNING: Code restructure failed: missing block: B:16:0x0047, code lost:
if (r5.equals("translationZ") == false) goto L_0x000d;
*/
/* JADX WARNING: Code restructure failed: missing block: B:18:0x0051, code lost:
if (r5.equals("translationY") == false) goto L_0x000d;
*/
/* JADX WARNING: Code restructure failed: missing block: B:20:0x005b, code lost:
if (r5.equals("translationX") == false) goto L_0x000d;
*/
/* JADX WARNING: Code restructure failed: missing block: B:8:0x001f, code lost:
if (r5.equals("alpha") == false) goto L_0x000d;
*/
public final C53542Te ATC(Object obj, String str) {
char c;
float f;
AnonymousClass2D8 r4 = (AnonymousClass2D8) obj;
AAR A0B = r4.A0B();
switch (str.hashCode()) {
case -1225497657:
c = 2;
break;
case -1225497656:
c = 3;
break;
case -1225497655:
c = 4;
break;
case -908189618:
c = 5;
break;
case -908189617:
c = 6;
break;
case -40300674:
c = 1;
break;
case 92909918:
c = 0;
break;
default:
c = 65535;
break;
}
switch (c) {
case 0:
f = r4.A01.A00;
break;
case 1:
f = r4.A01.A01;
break;
case 2:
f = r4.A01.A04;
break;
case 3:
f = r4.A01.A05;
break;
case 4:
f = r4.A01.A06;
break;
case 5:
f = r4.A01.A02;
break;
case 6:
f = r4.A01.A03;
break;
default:
if (A0B != null) {
return A0B.ATC(r4, str);
}
return C53602Tl.A00;
}
return new AnonymousClass2VI(f);
}
/* JADX WARNING: Can't fix incorrect switch cases order */
/* JADX WARNING: Code restructure failed: missing block: B:10:0x0028, code lost:
if (r4.equals("translationY") == false) goto L_0x0009;
*/
/* JADX WARNING: Code restructure failed: missing block: B:12:0x0032, code lost:
if (r4.equals("translationZ") == false) goto L_0x0009;
*/
/* JADX WARNING: Code restructure failed: missing block: B:14:0x003c, code lost:
if (r4.equals("scaleX") == false) goto L_0x0009;
*/
/* JADX WARNING: Code restructure failed: missing block: B:16:0x0046, code lost:
if (r4.equals("scaleY") == false) goto L_0x0009;
*/
/* JADX WARNING: Code restructure failed: missing block: B:18:0x0050, code lost:
if (r4.equals("rotation") == false) goto L_0x0009;
*/
/* JADX WARNING: Code restructure failed: missing block: B:20:0x005a, code lost:
if (r4.equals("alpha") == false) goto L_0x0009;
*/
/* JADX WARNING: Code restructure failed: missing block: B:8:0x001e, code lost:
if (r4.equals("translationX") == false) goto L_0x0009;
*/
public final void Bjq(Object obj, String str, C53542Te r5) {
char c;
AnonymousClass2D8 r3 = (AnonymousClass2D8) obj;
switch (str.hashCode()) {
case -1225497657:
c = 2;
break;
case -1225497656:
c = 3;
break;
case -1225497655:
c = 4;
break;
case -908189618:
c = 5;
break;
case -908189617:
c = 6;
break;
case -40300674:
c = 1;
break;
case 92909918:
c = 0;
break;
default:
c = 65535;
break;
}
switch (c) {
case 0:
r3.A01.A00 = ((Number) r5).floatValue();
return;
case 1:
r3.A01.A01 = ((Number) r5).floatValue();
return;
case 2:
r3.A01.A04 = ((Number) r5).floatValue();
return;
case 3:
r3.A01.A05 = ((Number) r5).floatValue();
return;
case 4:
r3.A01.A06 = ((Number) r5).floatValue();
return;
case 5:
r3.A01.A02 = ((Number) r5).floatValue();
return;
case 6:
r3.A01.A03 = ((Number) r5).floatValue();
return;
default:
AAQ A0A = r3.A0A();
if (A0A != null) {
A0A.Bjq(r3, str, r5);
return;
}
return;
}
}
public final boolean Bnh(Object obj, String str, C53542Te r4) {
AnonymousClass2D8 r2 = (AnonymousClass2D8) obj;
AAQ A0A = r2.A0A();
if (A0A != null) {
return A0A.Bnh(r2, str, r4);
}
return true;
}
}
| [
"stan@rooy.works"
] | stan@rooy.works |
bba5161aab8fc73b809b3c1c5cb3461dafdc4d51 | 08bdd164c174d24e69be25bf952322b84573f216 | /opencores/client/foundation classes/j2sdk-1_4_2-src-scsl/j2se/src/share/classes/com/sun/tools/example/debug/gui/SourceManager.java | 32a8bb84df760a0bbd3cf6a79b96ab13246b3ec8 | [] | no_license | hagyhang/myforthprocessor | 1861dcabcf2aeccf0ab49791f510863d97d89a77 | 210083fe71c39fa5d92f1f1acb62392a7f77aa9e | refs/heads/master | 2021-05-28T01:42:50.538428 | 2014-07-17T14:14:33 | 2014-07-17T14:14:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,103 | java | /*
* @(#)SourceManager.java 1.10 03/01/23
*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* Copyright (c) 1997-1999 by Sun Microsystems, Inc. All Rights Reserved.
*
* Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
* modify and redistribute this software in source and binary code form,
* provided that i) this copyright notice and license appear on all copies of
* the software; and ii) Licensee does not utilize the software in a manner
* which is disparaging to Sun.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
* IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
* NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
* LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
* OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
* LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
* INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
* CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
* OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* This software is not designed or intended for use in on-line control of
* aircraft, air traffic, aircraft navigation or aircraft communications; or in
* the design, construction, operation or maintenance of any nuclear
* facility. Licensee represents and warrants that it will not use or
* redistribute the Software for such purposes.
*/
package com.sun.tools.example.debug.gui;
import java.io.*;
import java.util.*;
import com.sun.jdi.*;
import com.sun.tools.example.debug.event.*;
import com.sun.tools.example.debug.bdi.*;
/**
* Manage the list of source files.
* Origin of SourceListener events.
*/
public class SourceManager {
//### TODO: The source cache should be aged, and some cap
//### put on memory consumption by source files loaded into core.
private List sourceList;
private SearchPath sourcePath;
private Vector sourceListeners = new Vector();
private Map classToSource = new HashMap();
private Environment env;
/**
* Hold on to it so it can be removed.
*/
private SMClassListener classListener = new SMClassListener();
public SourceManager(Environment env) {
this(env, new SearchPath(""));
}
public SourceManager(Environment env, SearchPath sourcePath) {
this.env = env;
this.sourceList = new LinkedList();
this.sourcePath = sourcePath;
env.getExecutionManager().addJDIListener(classListener);
}
/**
* Set path for access to source code.
*/
public void setSourcePath(SearchPath sp) {
sourcePath = sp;
// Old cached sources are now invalid.
sourceList = new LinkedList();
notifySourcepathChanged();
classToSource = new HashMap();
}
public void addSourceListener(SourceListener l) {
sourceListeners.addElement(l);
}
public void removeSourceListener(SourceListener l) {
sourceListeners.removeElement(l);
}
private void notifySourcepathChanged() {
Vector l = (Vector)sourceListeners.clone();
SourcepathChangedEvent evt = new SourcepathChangedEvent(this);
for (int i = 0; i < l.size(); i++) {
((SourceListener)l.elementAt(i)).sourcepathChanged(evt);
}
}
/**
* Get path for access to source code.
*/
public SearchPath getSourcePath() {
return sourcePath;
}
/**
* Get source object associated with a Location.
*/
public SourceModel sourceForLocation(Location loc) {
return sourceForClass(loc.declaringType());
}
/**
* Get source object associated with a class or interface.
* Returns null if not available.
*/
public SourceModel sourceForClass(ReferenceType refType) {
SourceModel sm = (SourceModel)classToSource.get(refType);
if (sm != null) {
return sm;
}
try {
String filename = refType.sourceName();
String refName = refType.name();
int iDot = refName.lastIndexOf('.');
String pkgName = (iDot >= 0)? refName.substring(0, iDot+1) : "";
String full = pkgName.replace('.', File.separatorChar) + filename;
File path = sourcePath.resolve(full);
if (path != null) {
sm = sourceForFile(path);
classToSource.put(refType, sm);
return sm;
}
return null;
} catch (AbsentInformationException e) {
return null;
}
}
/**
* Get source object associated with an absolute file path.
*/
//### Use hash table for this?
public SourceModel sourceForFile(File path) {
Iterator iter = sourceList.iterator();
SourceModel sm = null;
while (iter.hasNext()) {
SourceModel candidate = (SourceModel)iter.next();
if (candidate.fileName().equals(path)) {
sm = candidate;
iter.remove(); // Will move to start of list.
break;
}
}
if (sm == null && path.exists()) {
sm = new SourceModel(env, path);
}
if (sm != null) {
// At start of list for faster access
sourceList.add(0, sm);
}
return sm;
}
private class SMClassListener extends JDIAdapter
implements JDIListener {
public void classPrepare(ClassPrepareEventSet e) {
ReferenceType refType = e.getReferenceType();
SourceModel sm = sourceForClass(refType);
if (sm != null) {
sm.addClass(refType);
}
}
public void classUnload(ClassUnloadEventSet e) {
//### iterate through looking for (e.getTypeName()).
//### then remove it.
}
}
}
| [
"blue@cmd.nu"
] | blue@cmd.nu |
531b20b7fb75e8ca17747d4cdee89cb3a4a0ac95 | 853b0bec5bc9b5499925336c1f6959ae9ea4dccc | /wxzj2/src/com/yaltec/wxzj2/biz/payment/entity/PaymentRegTZS.java | 62b962adb3145a1774ffce4d80195f11cf57c6c2 | [] | no_license | QuietClickCode/wxzj2 | 598e69af218da5218e2befcc948f353027b34447 | c08061f7bbfaf616b32846e7ac1a171efcd0b33b | refs/heads/master | 2020-06-28T20:59:48.715250 | 2019-08-03T06:11:38 | 2019-08-03T06:11:38 | 200,339,358 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,232 | java | package com.yaltec.wxzj2.biz.payment.entity;
import com.yaltec.comon.core.entity.Entity;
/**
* 交款登记通知书打印(业务编号)
* @ClassName: PaymentRegTZS
* @author 重庆亚亮科技有限公司 txj
* @date 2016-8-26 上午11:20:58
*/
public class PaymentRegTZS extends Entity {
/**
*
*/
private static final long serialVersionUID = 1L;
private String lybh;
private String lymc;
private String unitcode;
private String unitname;
private String bankno;
private String w013;
private String w006;
private String ct;
private String today;
private String yhbh;
private String yhmc;
public String getToday() {
return today;
}
public void setToday(String today) {
this.today = today;
}
public String getLybh() {
return lybh;
}
public void setLybh(String lybh) {
this.lybh = lybh;
}
public String getLymc() {
return lymc;
}
public void setLymc(String lymc) {
this.lymc = lymc;
}
public String getUnitcode() {
return unitcode;
}
public void setUnitcode(String unitcode) {
this.unitcode = unitcode;
}
public String getUnitname() {
return unitname;
}
public void setUnitname(String unitname) {
this.unitname = unitname;
}
public String getBankno() {
return bankno;
}
public void setBankno(String bankno) {
this.bankno = bankno;
}
public String getW013() {
return w013;
}
public void setW013(String w013) {
this.w013 = w013;
}
public String getW006() {
return w006;
}
public void setW006(String w006) {
this.w006 = w006;
}
public String getCt() {
return ct;
}
public void setCt(String ct) {
this.ct = ct;
}
public String getYhbh() {
return yhbh;
}
public void setYhbh(String yhbh) {
this.yhbh = yhbh;
}
public String getYhmc() {
return yhmc;
}
public void setYhmc(String yhmc) {
this.yhmc = yhmc;
}
@Override
public String toString() {
return "PaymentRegTZS [bankno=" + bankno + ", ct=" + ct + ", lybh="
+ lybh + ", lymc=" + lymc + ", today=" + today + ", unitcode="
+ unitcode + ", unitname=" + unitname + ", w006=" + w006
+ ", w013=" + w013 + ", yhbh=" + yhbh + ", yhmc=" + yhmc + "]";
}
}
| [
"2572417548@qq.com"
] | 2572417548@qq.com |
0c78381696698b39725976440bb236d0aabb8b01 | a8aeb344eb4cb99eca0398334e9939a7fa1b7ea9 | /app/src/main/java/florent37/github/com/githubnewandroidarchitecture/MainFragment.java | 5fb1d8e49bbfa1f49e5748c6f44fbfede8f0b944 | [
"Apache-2.0"
] | permissive | hansvdam/NewAndroidArchitecture-Component-Github | 888456a93709412fac2dc216d9f1233db55d00e4 | 44c9b4b9e49d556879b6e42bdae4798f8d6fa83d | refs/heads/master | 2021-09-03T01:09:15.458689 | 2018-01-04T13:05:39 | 2018-01-04T13:05:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,985 | java | package florent37.github.com.githubnewandroidarchitecture;
import android.arch.lifecycle.LifecycleFragment;
import android.arch.lifecycle.Observer;
import android.arch.lifecycle.ViewModelProviders;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.List;
import javax.inject.Inject;
import florent37.github.com.githubnewandroidarchitecture.dagger.AppComponent;
import florent37.github.com.githubnewandroidarchitecture.databinding.FragmentMainBinding;
import florent37.github.com.githubnewandroidarchitecture.model.Repo;
import florent37.github.com.githubnewandroidarchitecture.model.User;
import florent37.github.com.githubnewandroidarchitecture.viewmodel.ReposListViewModel;
import florent37.github.com.githubnewandroidarchitecture.viewmodel.UserViewModel;
public class MainFragment extends LifecycleFragment {
public static Fragment newInstance() {
return new MainFragment();
}
private FragmentMainBinding viewDataBinding;
private ReposAdapter reposAdapter;
@Inject
UserViewModel userViewModel;
@Inject
ReposListViewModel reposListViewModel;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
//get the databinding from the layout
this.viewDataBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_main, container, false);
return viewDataBinding.getRoot();
}
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
reposAdapter = new ReposAdapter();
viewDataBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
viewDataBinding.recyclerView.setAdapter(reposAdapter);
AppComponent.from(getContext()).inject(this);
//inject the viewmodel responding to User
//inject the viewmodel responding to List<Repo>
//fetch the user from the datasource
userViewModel.getUser("florent37")
.observe(this, new Observer<User>() {
@Override
public void onChanged(@Nullable User user) {
viewDataBinding.setUser(user);
}
});
//fetch the repos from the datasource
reposListViewModel.getRepos("florent37")
.observe(this, new Observer<List<Repo>>() {
@Override
public void onChanged(@Nullable List<Repo> repos) {
//when available, send it to the recyclerview
reposAdapter.setRepos(repos);
}
});
}
}
| [
"florent.champigny@backelite.com"
] | florent.champigny@backelite.com |
dea37f0d83d07eb2b14136bc35439e0a2d396d3b | 9f08db4bc13d1857e7e63a9cb67d1a38d77119c0 | /udemy/KotlinForJavaDevelopers/AccessModifiers/src/com/zahariaca/javacode/JavaEmployee.java | 969c6ec6e22afcbcb7afa0989c6efb119f2f5158 | [] | no_license | zahariaca/kotlin | 5518881955688d84d225e3e240d7976a34c3746b | 3687827202945dc12c24e7e2848fb4deb4b8f4ef | refs/heads/master | 2023-01-23T06:05:46.411000 | 2020-11-23T09:32:32 | 2020-11-23T09:32:32 | 257,950,953 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 636 | java | package com.zahariaca.javacode;
public class JavaEmployee {
private final String firstName;
private boolean fullTime;
public JavaEmployee(String firstName) {
this.firstName = firstName;
this.fullTime = true;
}
public JavaEmployee(String firstName, boolean fullTime) {
this.firstName = firstName;
this.fullTime = fullTime;
}
public String getFirstName() {
return firstName;
}
public boolean isFullTime() {
return fullTime;
}
public void setFullTime(boolean fullTime) {
this.fullTime = fullTime;
}
}
| [
"zaharia.c.alexandru@gmail.com"
] | zaharia.c.alexandru@gmail.com |
44fb9c892de3a21c1057cee312b21f8c8c087bd9 | 6baa09045c69b0231c35c22b06cdf69a8ce227d6 | /modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201601/cm/BulkMutateJobErrorReason.java | 46053f27b5d226da2f621ed84b2d6081e985e4f3 | [
"Apache-2.0"
] | permissive | remotejob/googleads-java-lib | f603b47117522104f7df2a72d2c96ae8c1ea011d | a330df0799de8d8de0dcdddf4c317d6b0cd2fe10 | refs/heads/master | 2020-12-11T01:36:29.506854 | 2016-07-28T22:13:24 | 2016-07-28T22:13:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,002 | java | /**
* BulkMutateJobErrorReason.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.adwords.axis.v201601.cm;
public class BulkMutateJobErrorReason implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected BulkMutateJobErrorReason(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String _CAN_RETURN_RESULT_FOR_ONLY_COMPLETED_JOBS = "CAN_RETURN_RESULT_FOR_ONLY_COMPLETED_JOBS";
public static final java.lang.String _CAN_RETURN_RESULT_FOR_ONLY_ONE_JOB = "CAN_RETURN_RESULT_FOR_ONLY_ONE_JOB";
public static final java.lang.String _CANNOT_UPDATE_JOB_ONCE_ALL_REQUEST_PARTS_ARE_RECEIVED = "CANNOT_UPDATE_JOB_ONCE_ALL_REQUEST_PARTS_ARE_RECEIVED";
public static final java.lang.String _INVALID_SCOPING_ENTITY_TYPE = "INVALID_SCOPING_ENTITY_TYPE";
public static final java.lang.String _MISSING_SCOPING_ENTITY_FOR_OPERATION_STREAM = "MISSING_SCOPING_ENTITY_FOR_OPERATION_STREAM";
public static final java.lang.String _MORE_THAN_ONE_SCOPING_ENTITY_TYPE = "MORE_THAN_ONE_SCOPING_ENTITY_TYPE";
public static final java.lang.String _PAYLOAD_STORE_UNAVAILABLE = "PAYLOAD_STORE_UNAVAILABLE";
public static final java.lang.String _REQUEST_PART_IS_OUT_OF_ORDER = "REQUEST_PART_IS_OUT_OF_ORDER";
public static final java.lang.String _TOO_MANY_OPERATION_STREAMS_IN_REQUEST_PART = "TOO_MANY_OPERATION_STREAMS_IN_REQUEST_PART";
public static final java.lang.String _TOO_MANY_OPERATIONS_IN_JOB = "TOO_MANY_OPERATIONS_IN_JOB";
public static final java.lang.String _TOO_MANY_OPERATIONS_IN_REQUEST_PART = "TOO_MANY_OPERATIONS_IN_REQUEST_PART";
public static final java.lang.String _TOO_MANY_RESULTS_TO_STORE = "TOO_MANY_RESULTS_TO_STORE";
public static final java.lang.String _TOO_MANY_SCOPING_ENTITIES = "TOO_MANY_SCOPING_ENTITIES";
public static final java.lang.String _UNKNOWN = "UNKNOWN";
public static final java.lang.String _LOST_RESULT = "LOST_RESULT";
public static final java.lang.String _UNPROCESSED_RESULT = "UNPROCESSED_RESULT";
public static final java.lang.String _BATCH_FAILURE = "BATCH_FAILURE";
public static final java.lang.String _SERVICE_PROVIDED_NO_RESULT = "SERVICE_PROVIDED_NO_RESULT";
public static final BulkMutateJobErrorReason CAN_RETURN_RESULT_FOR_ONLY_COMPLETED_JOBS = new BulkMutateJobErrorReason(_CAN_RETURN_RESULT_FOR_ONLY_COMPLETED_JOBS);
public static final BulkMutateJobErrorReason CAN_RETURN_RESULT_FOR_ONLY_ONE_JOB = new BulkMutateJobErrorReason(_CAN_RETURN_RESULT_FOR_ONLY_ONE_JOB);
public static final BulkMutateJobErrorReason CANNOT_UPDATE_JOB_ONCE_ALL_REQUEST_PARTS_ARE_RECEIVED = new BulkMutateJobErrorReason(_CANNOT_UPDATE_JOB_ONCE_ALL_REQUEST_PARTS_ARE_RECEIVED);
public static final BulkMutateJobErrorReason INVALID_SCOPING_ENTITY_TYPE = new BulkMutateJobErrorReason(_INVALID_SCOPING_ENTITY_TYPE);
public static final BulkMutateJobErrorReason MISSING_SCOPING_ENTITY_FOR_OPERATION_STREAM = new BulkMutateJobErrorReason(_MISSING_SCOPING_ENTITY_FOR_OPERATION_STREAM);
public static final BulkMutateJobErrorReason MORE_THAN_ONE_SCOPING_ENTITY_TYPE = new BulkMutateJobErrorReason(_MORE_THAN_ONE_SCOPING_ENTITY_TYPE);
public static final BulkMutateJobErrorReason PAYLOAD_STORE_UNAVAILABLE = new BulkMutateJobErrorReason(_PAYLOAD_STORE_UNAVAILABLE);
public static final BulkMutateJobErrorReason REQUEST_PART_IS_OUT_OF_ORDER = new BulkMutateJobErrorReason(_REQUEST_PART_IS_OUT_OF_ORDER);
public static final BulkMutateJobErrorReason TOO_MANY_OPERATION_STREAMS_IN_REQUEST_PART = new BulkMutateJobErrorReason(_TOO_MANY_OPERATION_STREAMS_IN_REQUEST_PART);
public static final BulkMutateJobErrorReason TOO_MANY_OPERATIONS_IN_JOB = new BulkMutateJobErrorReason(_TOO_MANY_OPERATIONS_IN_JOB);
public static final BulkMutateJobErrorReason TOO_MANY_OPERATIONS_IN_REQUEST_PART = new BulkMutateJobErrorReason(_TOO_MANY_OPERATIONS_IN_REQUEST_PART);
public static final BulkMutateJobErrorReason TOO_MANY_RESULTS_TO_STORE = new BulkMutateJobErrorReason(_TOO_MANY_RESULTS_TO_STORE);
public static final BulkMutateJobErrorReason TOO_MANY_SCOPING_ENTITIES = new BulkMutateJobErrorReason(_TOO_MANY_SCOPING_ENTITIES);
public static final BulkMutateJobErrorReason UNKNOWN = new BulkMutateJobErrorReason(_UNKNOWN);
public static final BulkMutateJobErrorReason LOST_RESULT = new BulkMutateJobErrorReason(_LOST_RESULT);
public static final BulkMutateJobErrorReason UNPROCESSED_RESULT = new BulkMutateJobErrorReason(_UNPROCESSED_RESULT);
public static final BulkMutateJobErrorReason BATCH_FAILURE = new BulkMutateJobErrorReason(_BATCH_FAILURE);
public static final BulkMutateJobErrorReason SERVICE_PROVIDED_NO_RESULT = new BulkMutateJobErrorReason(_SERVICE_PROVIDED_NO_RESULT);
public java.lang.String getValue() { return _value_;}
public static BulkMutateJobErrorReason fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
BulkMutateJobErrorReason enumeration = (BulkMutateJobErrorReason)
_table_.get(value);
if (enumeration==null) throw new java.lang.IllegalArgumentException();
return enumeration;
}
public static BulkMutateJobErrorReason fromString(java.lang.String value)
throws java.lang.IllegalArgumentException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
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.EnumSerializer(
_javaType, _xmlType);
}
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.EnumDeserializer(
_javaType, _xmlType);
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(BulkMutateJobErrorReason.class);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201601", "BulkMutateJobError.Reason"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
}
| [
"jradcliff@google.com"
] | jradcliff@google.com |
2c22b086537f881e66e8808afa1a9632b272a5ea | bcf03d43318239f6242e53e0bdd3c4753c08fc79 | /java/me/leolin/shortcutbadger/impl/AdwHomeBadger.java | 350ad599cb5deb3bb2c5777df035552e6917cc55 | [] | no_license | morristech/Candid | 24699d45f9efb08787316154d05ad5e6a7a181a5 | 102dd9504cac407326b67ca7a36df8adf6a8b450 | refs/heads/master | 2021-01-22T21:07:12.067146 | 2016-12-22T18:40:30 | 2016-12-22T18:40:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 966 | java | package me.leolin.shortcutbadger.impl;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import defpackage.aol;
import defpackage.aon;
import java.util.Arrays;
import java.util.List;
import me.leolin.shortcutbadger.ShortcutBadgeException;
public class AdwHomeBadger implements aol {
public void a(Context context, ComponentName componentName, int badgeCount) throws ShortcutBadgeException {
Intent intent = new Intent("org.adw.launcher.counter.SEND");
intent.putExtra("PNAME", componentName.getPackageName());
intent.putExtra("COUNT", badgeCount);
if (aon.a(context, intent)) {
context.sendBroadcast(intent);
return;
}
throw new ShortcutBadgeException("unable to resolve intent: " + intent.toString());
}
public List<String> a() {
return Arrays.asList(new String[]{"org.adw.launcher", "org.adwfreak.launcher"});
}
}
| [
"admin@timo.de.vc"
] | admin@timo.de.vc |
3a9fe456b99f4959aa348e7edc59bfb87bd765a0 | 86505462601eae6007bef6c9f0f4eeb9fcdd1e7b | /bin/modules/commerce-services/ycommercewebservices/web/src/de/hybris/platform/ycommercewebservices/mapping/mappers/SpellingSuggestionMapper.java | 00faca38a95af9cd22014bf8d0be95a42a157b06 | [] | no_license | jp-developer0/hybrisTrail | 82165c5b91352332a3d471b3414faee47bdb6cee | a0208ffee7fee5b7f83dd982e372276492ae83d4 | refs/heads/master | 2020-12-03T19:53:58.652431 | 2020-01-02T18:02:34 | 2020-01-02T18:02:34 | 231,430,332 | 0 | 4 | null | 2020-08-05T22:46:23 | 2020-01-02T17:39:15 | null | UTF-8 | Java | false | false | 2,187 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.ycommercewebservices.mapping.mappers;
import de.hybris.platform.commercefacades.search.data.SearchQueryData;
import de.hybris.platform.commercefacades.search.data.SearchStateData;
import de.hybris.platform.commerceservices.search.facetdata.SpellingSuggestionData;
import de.hybris.platform.commercewebservicescommons.dto.search.facetdata.SpellingSuggestionWsDTO;
import de.hybris.platform.webservicescommons.mapping.mappers.AbstractCustomMapper;
import ma.glasnost.orika.MappingContext;
public class SpellingSuggestionMapper extends AbstractCustomMapper<SpellingSuggestionData, SpellingSuggestionWsDTO>
{
@Override
public void mapAtoB(final SpellingSuggestionData a, final SpellingSuggestionWsDTO b, final MappingContext context)
{
// other fields are mapped automatically
context.beginMappingField("query.query.value", getAType(), a, "query", getBType(), b);
try
{
if (shouldMap(a, b, context))
{
final SearchStateData stateData = (SearchStateData) a.getQuery();
b.setQuery(mapperFacade.map(stateData.getQuery().getValue(), String.class, context));
}
}
finally
{
context.endMappingField();
}
}
@Override
public void mapBtoA(final SpellingSuggestionWsDTO b, final SpellingSuggestionData a, final MappingContext context)
{
// other fields are mapped automatically
context.beginMappingField("query", getBType(), b, "query.query.value", getAType(), a);
try
{
if (shouldMap(b, a, context))
{
final SearchStateData stateData = new SearchStateData();
final SearchQueryData queryData = new SearchQueryData();
queryData.setValue(mapperFacade.map(b.getQuery(), String.class, context));
stateData.setQuery(queryData);
a.setQuery(stateData);
}
}
finally
{
context.endMappingField();
}
}
}
| [
"juan.gonzalez.working@gmail.com"
] | juan.gonzalez.working@gmail.com |
8e1797c6ad8b18e588a54af697a2178545f41ba8 | 24d8cf871b092b2d60fc85d5320e1bc761a7cbe2 | /JFreeChart/rev91-588/base-branch-91/source/org/jfree/data/general/DefaultValueDataset.java | d7d3d19472e15f60fbd7d910d5394357cf636418 | [] | 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 | 1,404 | java |
package org.jfree.data.general;
import java.io.Serializable;
import org.jfree.util.ObjectUtilities;
import org.jfree.util.PublicCloneable;
public class DefaultValueDataset extends AbstractDataset
implements ValueDataset,
Cloneable, PublicCloneable,
Serializable {
private static final long serialVersionUID = 8137521217249294891L;
private Number value;
public DefaultValueDataset() {
this(null);
}
public DefaultValueDataset(double value) {
this(new Double(value));
}
public DefaultValueDataset(Number value) {
super();
this.value = value;
}
public Number getValue() {
return this.value;
}
public void setValue(Number value) {
this.value = value;
notifyListeners(new DatasetChangeEvent(this, this));
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof ValueDataset) {
ValueDataset vd = (ValueDataset) obj;
return ObjectUtilities.equal(this.value, vd.getValue());
}
return false;
}
public int hashCode() {
return (this.value != null ? this.value.hashCode() : 0);
}
}
| [
"joliebig@fim.uni-passau.de"
] | joliebig@fim.uni-passau.de |
a816243329e0628d651f82a54ce6006f5807ebb3 | 255758ff061f589ea172638315467c02f806f3d2 | /src/test/java/pl/codeleak/demos/sbt/home/HomePage.java | a24404f27c32458ba4b46aeb4432ce67b8cc7d4e | [] | no_license | junlapong/spring-boot-thymeleaf | 27cb37c2fb45997300b59235ab0f825209493f38 | e21fecfd3c750f97d7dc26ffffb9bf21fe6f97f1 | refs/heads/master | 2021-01-15T18:37:05.258285 | 2016-05-27T14:53:58 | 2016-05-27T14:53:58 | 43,014,233 | 1 | 0 | null | 2015-09-23T16:50:43 | 2015-09-23T16:50:42 | null | UTF-8 | Java | false | false | 653 | java | package pl.codeleak.demos.sbt.home;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import java.util.List;
public class HomePage {
@FindBy(xpath = "//table//td/p/a")
private List<WebElement> actuatorLinks;
private final WebDriver driver;
public HomePage(WebDriver driver) {
this.driver = driver;
}
public HomePageAssert assertThat() {
return new HomePageAssert(this);
}
public String getTitle() {
return driver.getTitle();
}
public List<WebElement> getActuatorLinks() {
return actuatorLinks;
}
}
| [
"rafal.borowiec@gmail.com"
] | rafal.borowiec@gmail.com |
9294464380a0d4921a851726404edadac94ff495 | f425b76b33895b445c1c9669bd038870a5465789 | /example/src/main/java/org/jboss/seam/validation/HelloWorldServlet.java | cec7706dd58255860a3741881eb322eaf60950bd | [] | no_license | seam/validation-as-fork | b6dc18ecf10ae127ac77b9801ec875809ba401c2 | 8e84f0601c1a0d8e5976163ddbb08cd60c48b806 | refs/heads/master | 2016-09-06T03:35:35.214717 | 2011-02-06T10:20:58 | 2011-02-06T10:20:58 | 1,322,510 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,799 | java | /**
* JBoss, Home of Professional Open Source
*
* Copyright 2011, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* 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.jboss.seam.validation;
import java.io.IOException;
import javax.inject.Inject;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class HelloWorldServlet extends HttpServlet
{
private static final long serialVersionUID = -8659615639253408826L;
@Inject
private HelloWorldService service;
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
response.setContentType("text/html");
response.setStatus(HttpServletResponse.SC_OK);
String name = request.getParameter("name");
if (name != null)
{
response.getWriter().println("<h1>" + service.sayHello(name) + "</h1>");
}
else
{
response.getWriter().println("<?xml version=\"1.0\" ?>");
response.getWriter().println("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
response.getWriter().println("<html xmlns=\"http://www.w3.org/1999/xhtml\">");
response.getWriter().println(" <head><title>Seam Validation Module Example</title></head>");
response.getWriter().println(" <body>");
response.getWriter().println(" <h1>Seam Validation Module Example - Method Validation</h1>");
response.getWriter().println(" <p>Hi, what's your name? Enter at least three characters.</p>");
response.getWriter().println(" <form action=\"HelloWorld\"");
response.getWriter().println(" Name: <input name=\"name\" type=\"text\" size=\"30\">");
response.getWriter().println(" <input type=\"submit\" value=\" OK \">");
response.getWriter().println(" </form>");
response.getWriter().println(" </body>");
response.getWriter().println("</html>");
}
}
} | [
"gunnar.morling@googlemail.com"
] | gunnar.morling@googlemail.com |
5ba6966ebcc425b2245c4eb3a18e182da649888f | 104b421e536d1667a70f234ec61864f9278137c4 | /code/org/vudroid/core/models/CurrentPageModel.java | 2a13ffdd2fed509fe635e57f568203140cb41959 | [] | no_license | AshwiniVijayaKumar/Chrome-Cars | f2e61347c7416d37dae228dfeaa58c3845c66090 | 6a5e824ad5889f0e29d1aa31f7a35b1f6894f089 | refs/heads/master | 2021-01-15T11:07:57.050989 | 2016-05-13T05:01:09 | 2016-05-13T05:01:09 | 58,521,050 | 1 | 0 | null | 2016-05-11T06:51:56 | 2016-05-11T06:51:56 | null | UTF-8 | Java | false | false | 686 | java | package org.vudroid.core.models;
import org.vudroid.core.events.CurrentPageListener.CurrentPageChangedEvent;
import org.vudroid.core.events.EventDispatcher;
public class CurrentPageModel
extends EventDispatcher
{
private int currentPageIndex;
public void setCurrentPageIndex(int paramInt)
{
if (this.currentPageIndex != paramInt)
{
this.currentPageIndex = paramInt;
dispatch(new CurrentPageListener.CurrentPageChangedEvent(paramInt));
}
}
}
/* Location: C:\Users\ADMIN\Desktop\foss\dex2jar-2.0\classes-dex2jar.jar!\org\vudroid\core\models\CurrentPageModel.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"ASH ABHI"
] | ASH ABHI |
7535a791f43141c12f950d992fb5cf5df78cd579 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /java/java-tests/testData/ig/com/siyeh/igfixes/migration/while_can_be_foreach/RawIterator.after.java | 411913d17a28de01168c9b96467302103774509b | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Java | false | false | 254 | java | package com.siyeh.igfixes.migration.while_can_be_foreach;
import java.util.Iterator;
import java.util.List;
class RawIterator implements Iterable {
void m(List<String> ss) {
for (String s : ss) {
System.out.println(s);
}
}
}
| [
"basleijdekkers@gmail.com"
] | basleijdekkers@gmail.com |
eaea3970d76749e3234eb22be628a08f5b8cd754 | fdc6019618af8827e28c62294f36371f31e2b7b7 | /java/server/src/org/openqa/selenium/grid/node/local/SessionFactory.java | 80db5df939817d608582dd75e35ea34950a449a8 | [
"Apache-2.0"
] | permissive | moosebay/selenium | 404f12ff34988476921fc8fbe27d81166402650f | 08889adeb32eaf656aa7ffb22c5ab4a29f5b893f | refs/heads/master | 2020-04-09T03:56:43.892654 | 2019-02-12T06:10:17 | 2019-02-12T06:10:17 | 160,003,757 | 0 | 0 | Apache-2.0 | 2019-02-12T06:10:18 | 2018-12-02T01:39:44 | Java | UTF-8 | Java | false | false | 3,483 | java | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.openqa.selenium.grid.node.local;
import static org.openqa.selenium.net.Urls.fromUri;
import static org.openqa.selenium.remote.http.HttpMethod.DELETE;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.ImmutableCapabilities;
import org.openqa.selenium.grid.data.Session;
import org.openqa.selenium.grid.web.CommandHandler;
import org.openqa.selenium.grid.web.ReverseProxyHandler;
import org.openqa.selenium.remote.http.HttpClient;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Function;
import java.util.function.Predicate;
class SessionFactory
implements Predicate<Capabilities>, Function<Capabilities, Optional<SessionAndHandler>> {
private final HttpClient.Factory httpClientFactory;
private final Capabilities capabilities;
private final Function<Capabilities, Session> generator;
private volatile boolean available = true;
SessionFactory(
HttpClient.Factory httpClientFactory,
Capabilities capabilities,
Function<Capabilities, Session> generator) {
this.httpClientFactory = Objects.requireNonNull(httpClientFactory);
this.capabilities = Objects.requireNonNull(ImmutableCapabilities.copyOf(capabilities));
this.generator = Objects.requireNonNull(generator);
}
public Capabilities getCapabilities() {
return capabilities;
}
public boolean isAvailable() {
return available;
}
@Override
public boolean test(Capabilities capabilities) {
if (!isAvailable()) {
return false;
}
return this.capabilities.getCapabilityNames().stream()
.allMatch(name -> Objects.equals(
this.capabilities.getCapability(name), capabilities.getCapability(name)));
}
@Override
public Optional<SessionAndHandler> apply(Capabilities capabilities) {
if (!test(capabilities)) {
return Optional.empty();
}
this.available = false;
Session session;
try {
session = generator.apply(capabilities);
} catch (Throwable throwable) {
this.available = true;
return Optional.empty();
}
CommandHandler handler;
if (session instanceof CommandHandler) {
handler = (CommandHandler) session;
} else {
HttpClient client = httpClientFactory.createClient(fromUri(session.getUri()));
handler = new ReverseProxyHandler(client);
}
String killUrl = "/session/" + session.getId();
CommandHandler killingHandler = (req, res) -> {
handler.execute(req, res);
if (req.getMethod() == DELETE && killUrl.equals(req.getUri())) {
available = true;
}
};
return Optional.of(new SessionAndHandler(session, killingHandler));
}
}
| [
"simon.m.stewart@gmail.com"
] | simon.m.stewart@gmail.com |
d25301e1c6827dee9913ba7ccf8f544fd6e030ff | 81b0bb3cfb2e9501f53451e7f03ec072ee2b0e13 | /src/android/support/customtabs/ICustomTabsService$Stub$Proxy.java | 2e4acacce684045b54bbbfbacdac01cd6d6d0ae1 | [] | no_license | reverseengineeringer/me.lyft.android | 48bb85e8693ce4dab50185424d2ec51debf5c243 | 8c26caeeb54ffbde0711d3ce8b187480d84968ef | refs/heads/master | 2021-01-19T02:32:03.752176 | 2016-07-19T16:30:00 | 2016-07-19T16:30:00 | 63,710,356 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,401 | java | package android.support.customtabs;
import android.net.Uri;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import android.os.RemoteException;
import java.util.List;
class ICustomTabsService$Stub$Proxy
implements ICustomTabsService
{
private IBinder mRemote;
ICustomTabsService$Stub$Proxy(IBinder paramIBinder)
{
mRemote = paramIBinder;
}
public IBinder asBinder()
{
return mRemote;
}
public Bundle extraCommand(String paramString, Bundle paramBundle)
throws RemoteException
{
Parcel localParcel1 = Parcel.obtain();
Parcel localParcel2 = Parcel.obtain();
for (;;)
{
try
{
localParcel1.writeInterfaceToken("android.support.customtabs.ICustomTabsService");
localParcel1.writeString(paramString);
if (paramBundle != null)
{
localParcel1.writeInt(1);
paramBundle.writeToParcel(localParcel1, 0);
mRemote.transact(5, localParcel1, localParcel2, 0);
localParcel2.readException();
if (localParcel2.readInt() != 0)
{
paramString = (Bundle)Bundle.CREATOR.createFromParcel(localParcel2);
return paramString;
}
}
else
{
localParcel1.writeInt(0);
continue;
}
paramString = null;
}
finally
{
localParcel2.recycle();
localParcel1.recycle();
}
}
}
public boolean mayLaunchUrl(ICustomTabsCallback paramICustomTabsCallback, Uri paramUri, Bundle paramBundle, List<Bundle> paramList)
throws RemoteException
{
boolean bool = true;
Parcel localParcel1 = Parcel.obtain();
Parcel localParcel2 = Parcel.obtain();
for (;;)
{
try
{
localParcel1.writeInterfaceToken("android.support.customtabs.ICustomTabsService");
if (paramICustomTabsCallback != null)
{
paramICustomTabsCallback = paramICustomTabsCallback.asBinder();
localParcel1.writeStrongBinder(paramICustomTabsCallback);
if (paramUri != null)
{
localParcel1.writeInt(1);
paramUri.writeToParcel(localParcel1, 0);
if (paramBundle == null) {
break label151;
}
localParcel1.writeInt(1);
paramBundle.writeToParcel(localParcel1, 0);
localParcel1.writeTypedList(paramList);
mRemote.transact(4, localParcel1, localParcel2, 0);
localParcel2.readException();
int i = localParcel2.readInt();
if (i == 0) {
break label160;
}
return bool;
}
}
else
{
paramICustomTabsCallback = null;
continue;
}
localParcel1.writeInt(0);
continue;
localParcel1.writeInt(0);
}
finally
{
localParcel2.recycle();
localParcel1.recycle();
}
label151:
continue;
label160:
bool = false;
}
}
/* Error */
public boolean newSession(ICustomTabsCallback paramICustomTabsCallback)
throws RemoteException
{
// Byte code:
// 0: iconst_0
// 1: istore_3
// 2: invokestatic 32 android/os/Parcel:obtain ()Landroid/os/Parcel;
// 5: astore 4
// 7: invokestatic 32 android/os/Parcel:obtain ()Landroid/os/Parcel;
// 10: astore 5
// 12: aload 4
// 14: ldc 34
// 16: invokevirtual 38 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V
// 19: aload_1
// 20: ifnull +61 -> 81
// 23: aload_1
// 24: invokeinterface 84 1 0
// 29: astore_1
// 30: aload 4
// 32: aload_1
// 33: invokevirtual 87 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V
// 36: aload_0
// 37: getfield 19 android/support/customtabs/ICustomTabsService$Stub$Proxy:mRemote Landroid/os/IBinder;
// 40: iconst_3
// 41: aload 4
// 43: aload 5
// 45: iconst_0
// 46: invokeinterface 57 5 0
// 51: pop
// 52: aload 5
// 54: invokevirtual 60 android/os/Parcel:readException ()V
// 57: aload 5
// 59: invokevirtual 64 android/os/Parcel:readInt ()I
// 62: istore_2
// 63: iload_2
// 64: ifeq +5 -> 69
// 67: iconst_1
// 68: istore_3
// 69: aload 5
// 71: invokevirtual 77 android/os/Parcel:recycle ()V
// 74: aload 4
// 76: invokevirtual 77 android/os/Parcel:recycle ()V
// 79: iload_3
// 80: ireturn
// 81: aconst_null
// 82: astore_1
// 83: goto -53 -> 30
// 86: astore_1
// 87: aload 5
// 89: invokevirtual 77 android/os/Parcel:recycle ()V
// 92: aload 4
// 94: invokevirtual 77 android/os/Parcel:recycle ()V
// 97: aload_1
// 98: athrow
// Local variable table:
// start length slot name signature
// 0 99 0 this Proxy
// 0 99 1 paramICustomTabsCallback ICustomTabsCallback
// 62 2 2 i int
// 1 79 3 bool boolean
// 5 88 4 localParcel1 Parcel
// 10 78 5 localParcel2 Parcel
// Exception table:
// from to target type
// 12 19 86 finally
// 23 30 86 finally
// 30 63 86 finally
}
public boolean updateVisuals(ICustomTabsCallback paramICustomTabsCallback, Bundle paramBundle)
throws RemoteException
{
boolean bool = true;
Parcel localParcel1 = Parcel.obtain();
Parcel localParcel2 = Parcel.obtain();
label126:
for (;;)
{
try
{
localParcel1.writeInterfaceToken("android.support.customtabs.ICustomTabsService");
if (paramICustomTabsCallback != null)
{
paramICustomTabsCallback = paramICustomTabsCallback.asBinder();
localParcel1.writeStrongBinder(paramICustomTabsCallback);
if (paramBundle != null)
{
localParcel1.writeInt(1);
paramBundle.writeToParcel(localParcel1, 0);
mRemote.transact(6, localParcel1, localParcel2, 0);
localParcel2.readException();
int i = localParcel2.readInt();
if (i == 0) {
break label126;
}
return bool;
}
}
else
{
paramICustomTabsCallback = null;
continue;
}
localParcel1.writeInt(0);
continue;
bool = false;
}
finally
{
localParcel2.recycle();
localParcel1.recycle();
}
}
}
public boolean warmup(long paramLong)
throws RemoteException
{
boolean bool = false;
Parcel localParcel1 = Parcel.obtain();
Parcel localParcel2 = Parcel.obtain();
try
{
localParcel1.writeInterfaceToken("android.support.customtabs.ICustomTabsService");
localParcel1.writeLong(paramLong);
mRemote.transact(2, localParcel1, localParcel2, 0);
localParcel2.readException();
int i = localParcel2.readInt();
if (i != 0) {
bool = true;
}
return bool;
}
finally
{
localParcel2.recycle();
localParcel1.recycle();
}
}
}
/* Location:
* Qualified Name: android.support.customtabs.ICustomTabsService.Stub.Proxy
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
a9869d221994c9f512070eebf2a2fab4cd7a8757 | efd3ecc485df78ea8680a310aa8c1d14ef4003c0 | /Rxtest/src/com/cml/command/RealyQueryCommand.java | e1c0d1a10c436a731a2d93e995bdd3614978b6c3 | [] | no_license | cml8655/RxJava | 0f73ef531f7272ad447761ae3b16c64f22240808 | 4a7c4bb6c5bb08c4e1034c1129c55be8b661b03c | refs/heads/master | 2020-04-06T06:55:05.725830 | 2016-09-09T06:21:34 | 2016-09-09T06:21:34 | 49,468,226 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,720 | java | package com.cml.command;
/**
* 中继扫描指令
*
*/
public class RealyQueryCommand extends BaseCommand {
public String deviceId;
public String minDeviceId;
public String maxDeviceId;
public String preRelay;
public String nextRelay;
public String minBranch;
public String maxBranch;
public String resendTimes;
public String workModel;
public String time;
public String sendDelay;
public String voltage;// 电压
public RealyQueryCommand() {
super(RELAY_SCAN_PACKAGE_ID);
}
@Override
public boolean isSupport(String command) {
return command.startsWith("B1" + packageId);
}
@Override
public boolean parse(String command) {
try {
// 数据包
String data = command.substring(30, command.length() - 4);
// 设备id
deviceId = data.substring(2, 14);
// 设备最小值
minDeviceId = data.substring(14, 16);
// 设备最大值
maxDeviceId = data.substring(16, 18);
preRelay = data.substring(18, 22);
nextRelay = data.substring(22, 26);
minBranch = data.substring(26, 28);
maxBranch = data.substring(28, 30);
resendTimes = data.substring(30, 32);
workModel = data.substring(32, 34);
time = data.substring(34, 42);
sendDelay = data.substring(42, 44);
voltage = data.substring(44, 46);// 电压
} catch (Exception e) {
e.printStackTrace();
return false;
}
return true;
}
@Override
public String generateCommand() {
// 操作符 ,包号, 本机ID ,目的地址, 数据长度, 数据/控制符 ,8位校验和, 结束符
String checksumKey = "A1" + packageId + FROM_ID + targetId + "01" + "03";
String checksumValue = checksum(checksumKey);
String value = checksumKey + checksumValue + END_CODE;
return value;
}
}
| [
"menglin.chen"
] | menglin.chen |
2af39ddc99f081eab1f52061860ccc4a8e240be1 | 7e34493f5335ed3fe64cea407245b6c76805d6e5 | /lkjh14/src/main/java/com/fastcode/lkjh14/application/core/authorization/user/IUserAppService.java | c566e0f29b606e2d76afc30621af4926d5e4207b | [] | no_license | fastcoderepos/lkjh14 | 3ae3f5bc85ba3b7bc0e4e555e1696d61de8a4799 | e331a3cebc2203a1f25f0942a916973f48ba6868 | refs/heads/master | 2023-02-18T01:37:16.142545 | 2021-01-21T15:16:09 | 2021-01-21T15:16:09 | 331,666,397 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,856 | java | package com.fastcode.lkjh14.application.core.authorization.user;
import com.fastcode.lkjh14.application.core.authorization.user.dto.*;
import com.fastcode.lkjh14.commons.search.SearchCriteria;
import com.fastcode.lkjh14.domain.core.authorization.user.UserEntity;
import com.fastcode.lkjh14.domain.core.authorization.userpreference.UserpreferenceEntity;
import java.util.*;
import org.springframework.data.domain.Pageable;
public interface IUserAppService {
//CRUD Operations
CreateUserOutput create(CreateUserInput user);
void delete(Long id);
UpdateUserOutput update(Long id, UpdateUserInput input);
FindUserByIdOutput findById(Long id);
List<FindUserByIdOutput> find(SearchCriteria search, Pageable pageable) throws Exception;
UserpreferenceEntity createDefaultUserPreference(UserEntity user);
void updateTheme(UserEntity user, String theme);
void updateLanguage(UserEntity user, String language);
void updateUserData(FindUserWithAllFieldsByIdOutput user);
UserProfile updateUserProfile(FindUserWithAllFieldsByIdOutput user, UserProfile userProfile);
FindUserWithAllFieldsByIdOutput findWithAllFieldsById(Long userId);
UserProfile getProfile(FindUserByIdOutput user);
UserEntity getUser();
FindUserByNameOutput findByUserName(String userName);
FindUserByNameOutput findByEmailAddress(String emailAddress);
//Join Column Parsers
Map<String, String> parseDashboardsJoinColumn(String keysString);
Map<String, String> parseDashboardversionsJoinColumn(String keysString);
Map<String, String> parseReportsJoinColumn(String keysString);
Map<String, String> parseReportversionsJoinColumn(String keysString);
Map<String, String> parseUserpermissionsJoinColumn(String keysString);
Map<String, String> parseUserrolesJoinColumn(String keysString);
}
| [
"info@nfinityllc.com"
] | info@nfinityllc.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.