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
6da46e0ca8036ac17b29b00e7beda4348778a45a
10186b7d128e5e61f6baf491e0947db76b0dadbc
/net/a/a/d/j.java
d296c82c0a67ceeae4cdf099982bfead1ff60336
[ "SMLNJ", "Apache-1.1", "Apache-2.0", "BSD-2-Clause" ]
permissive
MewX/contendo-viewer-v1.6.3
7aa1021e8290378315a480ede6640fd1ef5fdfd7
69fba3cea4f9a43e48f43148774cfa61b388e7de
refs/heads/main
2022-07-30T04:51:40.637912
2021-03-28T05:06:26
2021-03-28T05:06:26
351,630,911
2
0
Apache-2.0
2021-10-12T22:24:53
2021-03-26T01:53:24
Java
UTF-8
Java
false
false
2,077
java
/* */ package net.a.a.d; /* */ /* */ import java.awt.Dimension; /* */ import java.awt.image.BufferedImage; /* */ import java.io.IOException; /* */ import java.io.OutputStream; /* */ import javax.imageio.ImageWriter; /* */ import javax.imageio.stream.MemoryCacheImageOutputStream; /* */ import net.a.a.c; /* */ import org.w3c.dom.Node; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class j /* */ implements e /* */ { /* */ private final ImageWriter a; /* */ private final int b; /* */ /* */ j(ImageWriter paramImageWriter, boolean paramBoolean) { /* 54 */ this.a = paramImageWriter; /* 55 */ if (paramBoolean) { /* 56 */ this.b = 1; /* */ } else { /* 58 */ this.b = 2; /* */ } /* */ } /* */ /* */ /* */ /* */ public Dimension a(Node paramNode, c paramc, OutputStream paramOutputStream) throws IOException { /* 65 */ MemoryCacheImageOutputStream memoryCacheImageOutputStream = new MemoryCacheImageOutputStream(paramOutputStream); /* */ /* 67 */ BufferedImage bufferedImage = c.a().a(paramNode, paramc, this.b); /* */ /* 69 */ synchronized (this.a) { /* 70 */ this.a.setOutput(memoryCacheImageOutputStream); /* 71 */ this.a.write(bufferedImage); /* */ } /* 73 */ memoryCacheImageOutputStream.close(); /* 74 */ return new Dimension(bufferedImage.getWidth(), bufferedImage.getHeight()); /* */ } /* */ /* */ /* */ /* */ public e.a a(Node paramNode, c paramc) { /* 80 */ return null; /* */ } /* */ } /* Location: /mnt/r/ConTenDoViewer.jar!/net/a/a/d/j.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "xiayuanzhong+gpg2020@gmail.com" ]
xiayuanzhong+gpg2020@gmail.com
ba384e2e379489f653db630b62bf1ac1e99ebe1d
687fbe32adf4099d511abb4d458bfcf9e6be650e
/RxJavaRetrofitDemo/app/src/main/java/com/iamasoldier6/rxjavaretrofitdemo/progress/ProgressDialogHandler.java
f08bfb6cea6e348564e4b8a96e9858cf0b1e91a7
[]
no_license
brucejing/AndroidExerciseDemos
2b7b0e5bd38ac3d1c9def8d2bf82fd63526c9e57
02df9d0821e6da016881582d3ad31f1b5180029e
refs/heads/master
2020-06-17T16:38:25.534323
2018-05-06T06:19:35
2018-05-06T06:19:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,965
java
package com.iamasoldier6.rxjavaretrofitdemo.progress; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.os.Handler; import android.os.Message; /** * @author: Iamasoldier6 * @date: 07/12/2016 */ public class ProgressDialogHandler extends Handler { public static final int SHOW_PROGRESS_DIALOG = 1; public static final int DISMISS_PROGRESS_DIALOG = 2; private ProgressDialog mDialog; private Context mContext; private boolean cancelable; private ProgressCancelListener mListener; public ProgressDialogHandler(Context context, ProgressCancelListener listener, boolean cancelable) { super(); this.mContext = context; this.mListener = listener; this.cancelable = cancelable; } private void initProgressDialog() { if (mDialog == null) { mDialog = new ProgressDialog(mContext); mDialog.setCancelable(cancelable); if (cancelable) { mDialog.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialogInterface) { mListener.onCancelProgress(); } }); } if (!mDialog.isShowing()) { mDialog.show(); } } } private void dismissProgressDialog() { if (mDialog != null) { mDialog.dismiss(); mDialog = null; } } @Override public void handleMessage(Message msg) { switch (msg.what) { case SHOW_PROGRESS_DIALOG: initProgressDialog(); break; case DISMISS_PROGRESS_DIALOG: dismissProgressDialog(); break; default: break; } } }
[ "iamasoldiersix@gmail.com" ]
iamasoldiersix@gmail.com
7481bf6eca4dc3ae712d0171535b219f48510b1e
1d632f13be2f4105db473cb38e65da1d3629f1c5
/app/src/main/java/com/shiwaixiangcun/customer/ui/activity/RightDetailActivity.java
43c1ab4108091b2b7c099a7b1147c21c6ec97882
[]
no_license
dengjiaping/swxc_customer
cbcaeeb684e23b0b373a300b84e450110b93c546
9130fa79cb4ec82bae7c1d4848ad7d4707cf1ba3
refs/heads/master
2021-08-14T16:18:52.302545
2017-11-16T06:03:45
2017-11-16T06:03:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,201
java
package com.shiwaixiangcun.customer.ui.activity; import android.os.Bundle; import android.support.constraint.ConstraintLayout; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; import android.widget.HorizontalScrollView; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.lzy.okgo.OkGo; import com.lzy.okgo.callback.StringCallback; import com.lzy.okgo.model.Response; import com.shiwaixiangcun.customer.BaseActivity; import com.shiwaixiangcun.customer.GlobalAPI; import com.shiwaixiangcun.customer.GlobalConfig; import com.shiwaixiangcun.customer.R; import com.shiwaixiangcun.customer.adapter.AdapterProcess; import com.shiwaixiangcun.customer.event.EventCenter; import com.shiwaixiangcun.customer.event.SimpleEvent; import com.shiwaixiangcun.customer.model.RightDetailBean; import com.shiwaixiangcun.customer.model.RightsRecordBean; import com.shiwaixiangcun.customer.utils.AppSharePreferenceMgr; import com.shiwaixiangcun.customer.utils.DateUtil; import com.shiwaixiangcun.customer.utils.DisplayUtil; import com.shiwaixiangcun.customer.utils.ImageDisplayUtil; import com.shiwaixiangcun.customer.utils.JsonUtil; import com.shiwaixiangcun.customer.utils.RefreshTokenUtil; import com.shiwaixiangcun.customer.widget.ChangeLightImageView; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; import java.util.ArrayList; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; /** * @author Administrator */ public class RightDetailActivity extends BaseActivity implements View.OnClickListener { @BindView(R.id.back_left) ChangeLightImageView mBackLeft; @BindView(R.id.tv_page_name) TextView mTvPageName; @BindView(R.id.tv_stature) TextView mTvStature; @BindView(R.id.tv_number) TextView mTvNumber; @BindView(R.id.tv_reason) TextView mTvReason; @BindView(R.id.tv_date) TextView mTvDate; @BindView(R.id.hScrollView_iamge) HorizontalScrollView mHScrollViewImage; @BindView(R.id.constraintLayout) ConstraintLayout mConstraintLayout; @BindView(R.id.rv_stature) RecyclerView mRvStature; RightsRecordBean.ElementsBean data; private String refreshToken; private String tokenString; private List<RightDetailBean.DataBean.ProcessBean> mProcessList; private AdapterProcess mAdapterRecord; private int siteId; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_right_detail); EventCenter.getInstance().register(this); initData(); ButterKnife.bind(this); initViewAndEvent(); requestData(data.getId()); } @Override protected void onDestroy() { EventCenter.getInstance().unregister(this); super.onDestroy(); } /** * 获取详情数据 * * @param id 维权消息id */ private void requestData(int id) { OkGo.<String>get(GlobalAPI.rightDetail) .params("access_token", tokenString) .params("id", id) .params("siteId", siteId) .execute(new StringCallback() { @Override public void onSuccess(Response<String> response) { RightDetailBean bean = JsonUtil.fromJson(response.body(), RightDetailBean.class); if (bean == null) { return; } switch (bean.getResponseCode()) { case 1001: EventCenter.getInstance().post(new SimpleEvent(SimpleEvent.RIGHT_DETAIL, 1, bean)); break; case 1018: RefreshTokenUtil.sendIntDataInvatation(mContext, refreshToken); break; default: Log.e(BUG_TAG, "加载失败"); break; } } }); } private void initData() { Bundle extras = getIntent().getExtras(); data = extras.getParcelable("detail"); } private void initViewAndEvent() { mTvPageName.setText("维权记录详情"); siteId = (int) AppSharePreferenceMgr.get(mContext, GlobalConfig.CURRENT_SITE_ID, 0); refreshToken = (String) AppSharePreferenceMgr.get(mContext, GlobalConfig.Refresh_token, ""); tokenString = (String) AppSharePreferenceMgr.get(mContext, GlobalConfig.TOKEN, ""); mProcessList = new ArrayList<>(); mAdapterRecord = new AdapterProcess(mContext, mProcessList); mRvStature.setLayoutManager(new LinearLayoutManager(this)); mRvStature.setAdapter(mAdapterRecord); mBackLeft.setOnClickListener(this); } @Subscribe(threadMode = ThreadMode.MAIN) public void handleEvent(SimpleEvent simpleEvent) { if (simpleEvent == null || simpleEvent.mEventType != SimpleEvent.RIGHT_DETAIL) { return; } switch (simpleEvent.mEventValue) { case 1: RightDetailBean bean = (RightDetailBean) simpleEvent.getData(); if (bean == null) { return; } RightDetailBean.DataBean.BaseInfoBean data = bean.getData().getBaseInfo(); switch (data.getStatus()) { case "ACCEPTED": mTvStature.setBackgroundResource(R.drawable.shape_stature_green); mTvStature.setText("受理中"); break; case "FINISHED": mTvStature.setBackgroundResource(R.drawable.shape_stature_gray); mTvStature.setText("已完成"); default: break; } mTvNumber.setText(data.getNumber()); mTvReason.setText(data.getContent()); mTvDate.setText(DateUtil.getSecond(data.getTime())); if (data.getImages().size() == 0) { mHScrollViewImage.setVisibility(View.GONE); } else { mHScrollViewImage.setVisibility(View.VISIBLE); LinearLayout linearLayout = new LinearLayout(mContext); for (int i = 0; i < data.getImages().size(); i++) { ImageView imageView = new ImageView(this); imageView.setScaleType(ImageView.ScaleType.CENTER_CROP); LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(DisplayUtil.dip2px(mContext, 80), DisplayUtil.dip2px(mContext, 80)); layoutParams.setMargins(0, 0, DisplayUtil.dip2px(mContext, 10), 0); imageView.setLayoutParams(layoutParams); ImageDisplayUtil.showImageView(mContext, data.getImages().get(i).getThumbImageURL(), imageView); linearLayout.addView(imageView); } LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); params.gravity = Gravity.CENTER_VERTICAL; linearLayout.setLayoutParams(params); mHScrollViewImage.addView(linearLayout); } mProcessList.addAll(bean.getData().getProcess()); mAdapterRecord.notifyDataSetChanged(); break; default: break; } } @Override public void onClick(View v) { switch (v.getId()) { case R.id.back_left: finish(); break; default: break; } } }
[ "827938508@qq.com" ]
827938508@qq.com
f0d8786de4c0725266416de159f36a2cfa883ae2
5adc168a697a9381e94fee66078266b4b338fe41
/EIDAS-Node/src/main/java/eu/eidas/node/utils/NodeMetadataUtil.java
1548f8ad36ab473c7d6dc55e9d9281c5ad952975
[]
no_license
willp-bl/eidas-mirror
51483d4509ef5c7d3478c3d234f0c35870bf1d3b
de3bb6f139a16ceff1e5d61daf1f1ce206caa0b7
refs/heads/master
2023-01-18T14:28:45.854255
2019-12-11T20:06:16
2019-12-11T20:06:16
63,151,038
0
5
null
2022-12-27T14:45:50
2016-07-12T11:02:24
Java
UTF-8
Java
false
false
5,966
java
/* # Copyright (c) 2017 European Commission # Licensed under the EUPL, Version 1.2 or – as soon they will be # approved by the European Commission - subsequent versions of the # EUPL (the "Licence"); # You may not use this work except in compliance with the Licence. # You may obtain a copy of the Licence at: # * https://joinup.ec.europa.eu/page/eupl-text-11-12 # * # Unless required by applicable law or agreed to in writing, software # distributed under the Licence is distributed on an "AS IS" basis, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the Licence for the specific language governing permissions and limitations under the Licence. */ package eu.eidas.node.utils; import eu.eidas.auth.engine.metadata.ContactData; import eu.eidas.auth.engine.metadata.OrganizationData; import java.util.Properties; /** * Node Metadata related utilities. */ public class NodeMetadataUtil { private NodeMetadataUtil () {} private static final String[] CONNECTOR_TECHNICAL_CONTACT_PROPS = { "connector.contact.technical.company", "connector.contact.technical.email", "connector.contact.technical.givenname", "connector.contact.technical.surname", "connector.contact.technical.phone" }; private static final String[] CONNECTOR_SUPPORT_CONTACT_PROPS = { "connector.contact.support.company", "connector.contact.support.email", "connector.contact.support.givenname", "connector.contact.support.surname", "connector.contact.support.phone" }; private static final String[] SERVICE_TECHNICAL_CONTACT_PROPS = { "service.contact.technical.company", "service.contact.technical.email", "service.contact.technical.givenname", "service.contact.technical.surname", "service.contact.technical.phone" }; private static final String[] SERVICE_SUPPORT_CONTACT_PROPS = { "service.contact.support.company", "service.contact.support.email", "service.contact.support.givenname", "service.contact.support.surname", "service.contact.support.phone" }; public static final String CONNECTOR_ORG_NAME = "connector.organization.name"; public static final String CONNECTOR_ORG_DISPNAME = "connector.organization.displayname"; public static final String CONNECTOR_ORG_URL = "connector.organization.url"; public static final String SERVICE_ORG_NAME = "service.organization.name"; public static final String SERVICE_ORG_DISPNAME = "service.organization.displayname"; public static final String SERVICE_ORG_URL = "service.organization.url"; /** * Creates the connector's technical contact data. * @param configs the configuration properties * @return the contact data */ public static ContactData createConnectorTechnicalContact(Properties configs){ return createContact(CONNECTOR_TECHNICAL_CONTACT_PROPS, configs); } /** * Creates the connector's support contact data. * @param configs the configuration properties * @return the contact data */ public static ContactData createConnectorSupportContact(Properties configs){ return createContact(CONNECTOR_SUPPORT_CONTACT_PROPS, configs); } /** * Creates the proxy-service's contact data. * @param configs the configuration properties * @return the contact data */ public static ContactData createServiceTechnicalContact(Properties configs){ return createContact(SERVICE_TECHNICAL_CONTACT_PROPS, configs); } /** * Creates the proxy-service's support data. * @param configs the configuration properties * @return the contact data */ public static ContactData createServiceSupportContact(Properties configs){ return createContact(SERVICE_SUPPORT_CONTACT_PROPS, configs); } private static ContactData createContact(String[] propsNames, Properties configs){ ContactData.Builder contact = ContactData.builder(); if (propsNames != null && configs != null){ contact.company(propsNames.length > 0? configs.getProperty(propsNames[0]) : null); contact.email(propsNames.length > 1? configs.getProperty(propsNames[1]) : null); contact.givenName(propsNames.length > 2? configs.getProperty(propsNames[2]) : null); contact.surName(propsNames.length > 3? configs.getProperty(propsNames[3]) : null); contact.phone(propsNames.length > 4? configs.getProperty(propsNames[4]) : null); } return contact.build(); } /** * Creates the proxy-service's organization data. * @param configs the configuration properties * @return organization data */ public static OrganizationData createServiceOrganization(Properties configs) { return createOrganizationData(configs, SERVICE_ORG_NAME, SERVICE_ORG_DISPNAME, SERVICE_ORG_URL); } /** * Creates the connector's organization data. * @param configs the configuration properties * @return organization data */ public static OrganizationData createConnectorOrganizationData(Properties configs) { return createOrganizationData(configs, CONNECTOR_ORG_NAME, CONNECTOR_ORG_DISPNAME, CONNECTOR_ORG_URL); } private static OrganizationData createOrganizationData(Properties configs, String orgName, String orgDispname, String orgUrl) { OrganizationData.Builder organization = OrganizationData.builder(); organization.name(configs != null ? configs.getProperty(orgName) : null); organization.displayName(configs != null ? configs.getProperty(orgDispname) : null); organization.url(configs != null ? configs.getProperty(orgUrl) : null); return organization.build(); } }
[ "william.palmer@digital.cabinet-office.gov.uk" ]
william.palmer@digital.cabinet-office.gov.uk
70b6b4822f8360b1e850d2980c6c6b29aa6ec4d0
d8ae0563f237551cdfbe707cb367a5dcbae8854c
/bingo-core/src/main/java/org/bingo/common/converters/DateConverter.java
5c07fa2c986b19d5fdbb4475df22a52273f15094
[]
no_license
ERIC0402/bingo
ebda99e1d4f6d14511effc43912927d33d47fce7
4782ee19fd54293a0c5f9e0e2da987730ffcc513
refs/heads/master
2021-06-16T14:01:38.393305
2017-05-11T05:47:44
2017-05-11T05:47:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,530
java
/* Copyright c 2005-2012. * Licensed under GNU LESSER General Public License, Version 3. * http://www.gnu.org/licenses */ package org.bingo.common.converters; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import org.apache.commons.beanutils.ConversionException; import org.apache.commons.beanutils.Converter; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; public class DateConverter implements Converter { public Object convert(@SuppressWarnings("rawtypes") final Class type, final Object value) { if (value == null) { return null; } else if (type == Date.class) { return convertToDate(type, value); } else if (type == String.class) { return convertToString(type, value); } throw new ConversionException("Could not convert " + value.getClass().getName() + " to " + type.getName()); } /** * 将字符串格式化为日期<br> * format 1: yyyy-MM-dd hh:mm:ss<br> * format 2: yyyyMMdd */ @SuppressWarnings("rawtypes") protected Object convertToDate(final Class type, final Object value) { if (StringUtils.isEmpty((String) value)) { return null; } else { String dateStr = (String) value; String[] times = StringUtils.split(dateStr, " "); String[] dateElems = null; if (StringUtils.contains(times[0], "-")) { dateElems = StringUtils.split(times[0], "-"); } else { dateElems = new String[3]; int yearIndex = "yyyy".length(); dateElems[0] = StringUtils.substring(times[0], 0, yearIndex); dateElems[1] = StringUtils.substring(times[0], yearIndex, yearIndex + 2); dateElems[2] = StringUtils.substring(times[0], yearIndex + 2, yearIndex + 4); } Calendar gc = GregorianCalendar.getInstance(); gc.set(Calendar.YEAR, NumberUtils.toInt(dateElems[0])); gc.set(Calendar.MONTH, NumberUtils.toInt(dateElems[1]) - 1); gc.set(Calendar.DAY_OF_MONTH, NumberUtils.toInt(dateElems[2])); if (times.length > 1 && StringUtils.isNotBlank(times[1])) { String[] timeElems = StringUtils.split(times[1], ":"); if (timeElems.length > 0) { gc.set(Calendar.HOUR_OF_DAY, NumberUtils.toInt(timeElems[0])); } if (timeElems.length > 1) { gc.set(Calendar.MINUTE, NumberUtils.toInt(timeElems[1])); } if (timeElems.length > 2) { gc.set(Calendar.SECOND, NumberUtils.toInt(timeElems[2])); } } return gc.getTime(); } } protected Object convertToString(final Class<?> type, final Object value) { return value.toString(); } }
[ "805494859@qq.com" ]
805494859@qq.com
66af6e93b6852660d9955c4b05f21841bbcf657a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/25/25_172cdd5c4e4b3e92e13377f8a964c9fbb8950061/PopupMenuCG/25_172cdd5c4e4b3e92e13377f8a964c9fbb8950061_PopupMenuCG_s.java
421e611ae0ce7a4055bb5e255a09abbd5898d515
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,364
java
/* * $Id$ * Copyright 2000,2005 wingS development team. * * This file is part of wingS (http://www.j-wings.org). * * wingS 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. * * Please see COPYING for the complete licence. */ package org.wings.plaf.css.msie; import java.io.IOException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wings.SComponent; import org.wings.SMenu; import org.wings.SMenuItem; import org.wings.SPopupMenu; import org.wings.io.Device; public class PopupMenuCG extends org.wings.plaf.css.PopupMenuCG { private final transient static Log log = LogFactory.getLog(PopupMenuCG.class); /* (non-Javadoc) * @see org.wings.plaf.css.PopupMenuCG#writeListAttributes(org.wings.io.Device, org.wings.SPopupMenu) */ protected void writeListAttributes(final Device device, SPopupMenu menu) throws IOException { // calculate max length of children texts for sizing of layer int maxLength = 0; for (int i = 0; i < menu.getMenuComponentCount(); i++) { if (!(menu.getMenuComponent(i) instanceof SMenuItem)) continue; String text = ((SMenuItem)menu.getMenuComponent(i)).getText(); if (text != null && text.length() > maxLength) { maxLength = text.length(); if (menu.getMenuComponent(i) instanceof SMenu) { maxLength = maxLength + 2; //graphics } } } device.print(" style=\"width:"); String stringLength = String.valueOf(maxLength * menu.getWidthScaleFactor()); device.print(stringLength.substring(0,stringLength.lastIndexOf('.')+2)); device.print("em;\""); } protected void printScriptHandlers(Device device, SComponent menuItem) throws IOException { device.print(" onmouseover=\"wpm_openMenu('"); device.print(((SMenu)menuItem).getName()); device.print("_pop');\" onmouseout=\"wpm_closeMenu('"); device.print(((SMenu)menuItem).getName()); device.print("_pop');\""); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
062bd40bac36a75b0d73e65034be9be7972bf49b
600ea377b87123a8842e047d187a66be22873b79
/src/main/java/com/leo/mybatis/binding/MapperProxyFactory.java
66a897edb105fb7d52290da7b45cd7e1dc2fd966
[]
no_license
shileishmily/leo-mybatis
0cda32f26c262dd623ed0b5b3c8ce54e10809236
4df39b59e20a4254b7156a86e89b04b4cf611cff
refs/heads/master
2020-12-15T22:23:29.923894
2020-01-21T06:45:03
2020-01-21T06:45:03
235,272,423
0
0
null
null
null
null
UTF-8
Java
false
false
1,487
java
package com.leo.mybatis.binding; import com.leo.mybatis.session.SqlSession; import java.lang.reflect.Proxy; /** * @version V1.0 * @Title: Mapper代理工厂 * @ClassName: com.leo.mybatis.binding.MapperProxyFactory.java * @Description: * @Copyright ©2018 Suixingpay. All rights reserved. * @author: shi_lei@suixingpay.com * @date: 9:46 */ public class MapperProxyFactory<T> { private final Class<T> mapperInterface; /** * 初始化方法 * * @param mapperInterface : * @return : null * @author : shi_lei@suixingpay.com * @date : 9:49 */ public MapperProxyFactory(Class<T> mapperInterface) { this.mapperInterface = mapperInterface; } /** * 根据sqlSession创建一个代理 * * @param sqlSession : * @return : T * @author : shi_lei@suixingpay.com * @date : 9:47 */ public T newInstance(SqlSession sqlSession) { MapperProxy<T> mapperProxy = new MapperProxy<T>(sqlSession, this.mapperInterface); return newInstance(mapperProxy); } /** * 根据mapper代理返回实例 * * @param mapperProxy : * @return : T * @author : shi_lei@suixingpay.com * @date : 9:47 */ @SuppressWarnings("unchecked") protected T newInstance(MapperProxy<T> mapperProxy) { return (T) Proxy.newProxyInstance(this.mapperInterface.getClassLoader(), new Class[]{this.mapperInterface}, mapperProxy); } }
[ "shileibrave@163.com" ]
shileibrave@163.com
e93f47480a86552e6a91460f18c70e6291cc0a4b
c7f992c65cd82434b2309a0291010474ea4a1d85
/modules/services/src/main/java/wisematches/server/services/notify/NotificationManager.java
33a808cae3585905e78c034f1e31ff0742f9e73b
[ "Apache-2.0" ]
permissive
Letractively/wisematches
7afae98b024ac9074c0d629fd040e97da91b9cb5
9837c64bf8d447361439e89a82968f5dcb51b223
refs/heads/master
2021-01-10T16:54:29.384444
2014-06-04T18:32:34
2014-06-04T18:32:34
45,893,184
0
0
null
null
null
null
UTF-8
Java
false
false
1,595
java
package wisematches.server.services.notify; import wisematches.core.Player; import java.util.Set; /** * @author Sergey Klimenko (smklimenko@gmail.com) */ public interface NotificationManager { /** * Returns unmodifiable collection of all known notification codes. * * @return unmodifiable collection of all known notification codes. */ Set<String> getNotificationCodes(); /** * Returns default descriptor for specified notification. * * @param code notification code * @return default descriptor for specified notification or {@code null} if there is no notification with specified code. */ NotificationDescriptor getDescriptor(String code); /** * Returns personal descriptor for specified player and notification code. * * @param code notification code * @param player personality who's descriptor should be returned. * @return personal descriptor for notification of default descriptor if personality doesn't have personal * descriptor or {@code null} if there is no notification with specified code. */ NotificationScope getNotificationScope(String code, Player player); /** * Changes personal descriptor for notification. * * @param code notification code * @param player player who's descriptor should be updated. * @param scope personal descriptor for notification. * @return previous personal descriptor or {@code null} if player don't have previous personal descriptor */ NotificationScope setNotificationScope(String code, Player player, NotificationScope scope); }
[ "smklimenko@localhost" ]
smklimenko@localhost
bec07519546fbf868028e3c1a389b8efa542e111
ca60502a473aaff1594674cc4ac49db8b5546e51
/src/main/java/org/encog/neural/pnn/AbstractPNN.java
f7b6dbf7780a844b68e188034e9fd4c6719712a1
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
pidster/encog-java-core
9ce59b82cf07e2c3710f294b0e5b98c67463f7b1
50aa01c19d09ffc431d5310e06ea7fc2a230c342
refs/heads/master
2021-01-24T20:47:28.860579
2014-04-13T14:14:34
2014-04-13T14:14:34
17,671,426
0
0
NOASSERTION
2020-10-14T00:27:15
2014-03-12T15:16:26
Java
UTF-8
Java
false
false
4,339
java
/* * Encog(tm) Core v3.2 - Java Version * http://www.heatonresearch.com/encog/ * https://github.com/encog/encog-java-core * Copyright 2008-2013 Heaton Research, 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. * * For more information on Heaton Research copyrights, licenses * and trademarks visit: * http://www.heatonresearch.com/copyright */ package org.encog.neural.pnn; import org.encog.ml.BasicML; import org.encog.ml.data.MLData; /** * Abstract class to build PNN networks upon. */ public abstract class AbstractPNN extends BasicML { /** * Input neuron count. */ private final int inputCount; /** * Output neuron count. */ private final int outputCount; /** * Kernel type. */ private final PNNKernelType kernel; /** * Output mode. */ private final PNNOutputMode outputMode; /** * Is trained. */ private boolean trained; /** * Network error. (MSE) */ private double error; /** * Confusion work area. */ private int[] confusion; /** * First derivative. */ private final double[] deriv; /** * Second derivative. */ private final double[] deriv2; /** * Index of a sample to exclude. */ private int exclude; /** * True, if we are using separate sigmas for each class. */ private boolean separateClass; /** * Constructor. * @param kernel The kernel type to use. * @param outputMode The output mode to use. * @param inputCount The input count. * @param outputCount The output count. */ public AbstractPNN(final PNNKernelType kernel, final PNNOutputMode outputMode, final int inputCount, final int outputCount) { this.kernel = kernel; this.outputMode = outputMode; this.inputCount = inputCount; this.outputCount = outputCount; this.trained = false; this.error = Double.MIN_VALUE; this.confusion = null; this.exclude = -1; this.deriv = new double[inputCount]; this.deriv2 = new double[inputCount]; if (this.outputMode == PNNOutputMode.Classification) { this.confusion = new int[this.outputCount + 1]; } } /** * Compute the output from the network. * @param input The input to the network. * @return The output from the network. */ public abstract MLData compute(MLData input); /** * @return the deriv */ public double[] getDeriv() { return this.deriv; } /** * @return the deriv2 */ public double[] getDeriv2() { return this.deriv2; } /** * @return the error */ public double getError() { return this.error; } /** * @return the exclude */ public int getExclude() { return this.exclude; } /** * @return the inputCount */ public int getInputCount() { return this.inputCount; } /** * @return the kernel */ public PNNKernelType getKernel() { return this.kernel; } /** * @return the outputCount */ public int getOutputCount() { return this.outputCount; } /** * @return the outputMode */ public PNNOutputMode getOutputMode() { return this.outputMode; } /** * @return the trained */ public boolean isTrained() { return this.trained; } /** * Reset the confusion. */ public void resetConfusion() { } /** * @param error * the error to set */ public void setError(final double error) { this.error = error; } /** * @param exclude * the exclude to set */ public void setExclude(final int exclude) { this.exclude = exclude; } /** * @param trained * the trained to set */ public void setTrained(final boolean trained) { this.trained = trained; } /** * @return the separateClass */ public boolean isSeparateClass() { return separateClass; } /** * @param separateClass the separateClass to set */ public void setSeparateClass(boolean separateClass) { this.separateClass = separateClass; } }
[ "jeff@jeffheaton.com" ]
jeff@jeffheaton.com
679ee51ad63e0dbfb38b6d0144bd04f13a89230e
5a13f24c35c34082492ef851fb91d404827b7ddb
/src/main/java/com/alipay/api/domain/AlipayEcoMycarMaintainShopModifyModel.java
d6dbf9e90cf84fe885ec54013b80e7363524985e
[]
no_license
featherfly/alipay-sdk
69b2f2fc89a09996004b36373bd5512664521bfd
ba2355a05de358dc15855ffaab8e19acfa24a93b
refs/heads/master
2021-01-22T11:03:20.304528
2017-09-04T09:39:42
2017-09-04T09:39:42
102,344,436
1
0
null
null
null
null
UTF-8
Java
false
false
9,473
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 洗车保养门店修改 * * @author auto create * @since 1.0, 2017-07-13 14:23:21 */ public class AlipayEcoMycarMaintainShopModifyModel extends AlipayObject { private static final long serialVersionUID = 4433196855522868659L; /** * 门店详细地址,地址字符长度在4-50个字符,注:不含省市区。门店详细地址按规范格式填写地址,以免影响门店搜索及活动报名:例1:道路+门牌号,“人民东路18号”;例2:道路+门牌号+标志性建筑+楼层,“四川北路1552号欢乐广场1楼” */ @ApiField("address") private String address; /** * 支付宝帐号 */ @ApiField("alipay_account") private String alipayAccount; /** * 门店支持的车型品牌,支付宝车型库品牌编号(系统唯一),品牌编号可以通过调用【查询车型信息接口】alipay.eco.mycar.carmodel.query 获取。(空对象不变更/空集合清空/有数据覆盖) */ @ApiListField("brand_ids") @ApiField("string") private List<String> brandIds; /** * 城市编号(国标码,详见国家统计局数据 <a href="http://aopsdkdownload.cn-hangzhou.alipay-pub.aliyun-inc.com/doc/AreaCodeList.zip">点此下载</a>) */ @ApiField("city_code") private String cityCode; /** * 门店营业结束时间(HH:mm) */ @ApiField("close_time") private String closeTime; /** * 门店店长邮箱 */ @ApiField("contact_email") private String contactEmail; /** * 门店店长移动电话号码; 不在客户端展示 */ @ApiField("contact_mobile_phone") private String contactMobilePhone; /** * 门店店长姓名 */ @ApiField("contact_name") private String contactName; /** * 区编号(国标码,详见国家统计局数据 <a href="http://aopsdkdownload.cn-hangzhou.alipay-pub.aliyun-inc.com/doc/AreaCodeList.zip">点此下载</a>) */ @ApiField("district_code") private String districtCode; /** * 扩展参数,json格式,可以存放营销信息,以及主营描述等扩展信息 */ @ApiField("ext_param") private String extParam; /** * 行业应用类目编号 15:洗车 16:保养 17:停车 20:4S (空对象不变更/空集合清空/有数据覆盖) */ @ApiListField("industry_app_category_id") @ApiField("number") private List<Long> industryAppCategoryId; /** * 行业类目编号(空对象不变更/空集合清空/有数据覆盖,<a href="https://doc.open.alipay.com/doc2/detail.htm?treeId=205&articleId=104497&docType=1">点此查看</a> 非口碑类目 – 爱车) */ @ApiListField("industry_category_id") @ApiField("number") private List<Long> industryCategoryId; /** * 高德地图纬度(经纬度是门店搜索和活动推荐的重要参数,录入时请确保经纬度参数准确) */ @ApiField("lat") private String lat; /** * 高德地图经度(经纬度是门店搜索和活动推荐的重要参数,录入时请确保经纬度参数准确) */ @ApiField("lon") private String lon; /** * 车主平台接口上传主图片地址,通过alipay.eco.mycar.image.upload接口上传。 */ @ApiField("main_image") private String mainImage; /** * 分支机构编号,商户在车主平台自己创建的分支机构编码 */ @ApiField("merchant_branch_id") private Long merchantBranchId; /** * 门店营业开始时间(HH:mm) */ @ApiField("open_time") private String openTime; /** * 车主平台接口上传副图片地址,通过alipay.eco.mycar.image.upload接口上传。 */ @ApiListField("other_images") @ApiField("string") private List<String> otherImages; /** * 外部门店编号(与shop_id二选一,不能都为空) */ @ApiField("out_shop_id") private String outShopId; /** * 省编号(国标码,详见国家统计局数据 <a href="http://aopsdkdownload.cn-hangzhou.alipay-pub.aliyun-inc.com/doc/AreaCodeList.zip">点此下载</a>) */ @ApiField("province_code") private String provinceCode; /** * 分店名称,比如:万塘路店,与主门店名合并在客户端显示为:爱特堡(益乐路店) */ @ApiField("shop_branch_name") private String shopBranchName; /** * 车主平台门店编号(与out_shop_id二选一,不能都为空) */ @ApiField("shop_id") private Long shopId; /** * 主门店名,比如:爱特堡;主店名里不要包含分店名,如“益乐路店”。主店名长度不能超过20个字符 */ @ApiField("shop_name") private String shopName; /** * 门店电话号码;支持座机和手机,只支持数字和+-号,在客户端对用户展现 */ @ApiField("shop_tel") private String shopTel; /** * 门店类型:(shop_type_beauty:美容店,shop_type_repair:快修店,shop_type_maintenance:维修厂,shop_type_parkinglot:停车场,shop_type_gasstation:加油站,shop_type_4s:4s店) */ @ApiField("shop_type") private String shopType; /** * 门店状态(0:下线;1:上线) */ @ApiField("status") private String status; public String getAddress() { return this.address; } public void setAddress(String address) { this.address = address; } public String getAlipayAccount() { return this.alipayAccount; } public void setAlipayAccount(String alipayAccount) { this.alipayAccount = alipayAccount; } public List<String> getBrandIds() { return this.brandIds; } public void setBrandIds(List<String> brandIds) { this.brandIds = brandIds; } public String getCityCode() { return this.cityCode; } public void setCityCode(String cityCode) { this.cityCode = cityCode; } public String getCloseTime() { return this.closeTime; } public void setCloseTime(String closeTime) { this.closeTime = closeTime; } public String getContactEmail() { return this.contactEmail; } public void setContactEmail(String contactEmail) { this.contactEmail = contactEmail; } public String getContactMobilePhone() { return this.contactMobilePhone; } public void setContactMobilePhone(String contactMobilePhone) { this.contactMobilePhone = contactMobilePhone; } public String getContactName() { return this.contactName; } public void setContactName(String contactName) { this.contactName = contactName; } public String getDistrictCode() { return this.districtCode; } public void setDistrictCode(String districtCode) { this.districtCode = districtCode; } public String getExtParam() { return this.extParam; } public void setExtParam(String extParam) { this.extParam = extParam; } public List<Long> getIndustryAppCategoryId() { return this.industryAppCategoryId; } public void setIndustryAppCategoryId(List<Long> industryAppCategoryId) { this.industryAppCategoryId = industryAppCategoryId; } public List<Long> getIndustryCategoryId() { return this.industryCategoryId; } public void setIndustryCategoryId(List<Long> industryCategoryId) { this.industryCategoryId = industryCategoryId; } public String getLat() { return this.lat; } public void setLat(String lat) { this.lat = lat; } public String getLon() { return this.lon; } public void setLon(String lon) { this.lon = lon; } public String getMainImage() { return this.mainImage; } public void setMainImage(String mainImage) { this.mainImage = mainImage; } public Long getMerchantBranchId() { return this.merchantBranchId; } public void setMerchantBranchId(Long merchantBranchId) { this.merchantBranchId = merchantBranchId; } public String getOpenTime() { return this.openTime; } public void setOpenTime(String openTime) { this.openTime = openTime; } public List<String> getOtherImages() { return this.otherImages; } public void setOtherImages(List<String> otherImages) { this.otherImages = otherImages; } public String getOutShopId() { return this.outShopId; } public void setOutShopId(String outShopId) { this.outShopId = outShopId; } public String getProvinceCode() { return this.provinceCode; } public void setProvinceCode(String provinceCode) { this.provinceCode = provinceCode; } public String getShopBranchName() { return this.shopBranchName; } public void setShopBranchName(String shopBranchName) { this.shopBranchName = shopBranchName; } public Long getShopId() { return this.shopId; } public void setShopId(Long shopId) { this.shopId = shopId; } public String getShopName() { return this.shopName; } public void setShopName(String shopName) { this.shopName = shopName; } public String getShopTel() { return this.shopTel; } public void setShopTel(String shopTel) { this.shopTel = shopTel; } public String getShopType() { return this.shopType; } public void setShopType(String shopType) { this.shopType = shopType; } public String getStatus() { return this.status; } public void setStatus(String status) { this.status = status; } }
[ "zhongj@cdmhzx.com" ]
zhongj@cdmhzx.com
0eda452dc42070aa276868b142f86c5b40d4e04d
0b9f100fc229c88f7ec76bab2fcb3933635549b0
/expr/src/com/jpower/expr/BooleanExpression.java
691f653423576a32e43ca473f58ce709ad693e1c
[]
no_license
jun0rr/java
e080a7f0aab9e5c42d89756e4a5eba1ec3d6904e
7635ee51889555454461c58580df5a2a61dd9cbf
refs/heads/master
2020-06-26T18:51:41.024454
2014-10-23T17:29:30
2014-10-23T17:29:30
199,715,772
0
0
null
null
null
null
UTF-8
Java
false
false
1,929
java
/* * Direitos Autorais Reservados (c) 2011 Juno Roesler * Contato: juno.rr@gmail.com * * Esta biblioteca é software livre; você pode redistribuí-la e/ou modificá-la sob os * termos da Licença Pública Geral Menor do GNU conforme publicada pela Free * Software Foundation; tanto a versão 2.1 da Licença, ou qualquer * versão posterior. * * Esta biblioteca é distribuída na expectativa de que seja útil, porém, SEM * NENHUMA GARANTIA; nem mesmo a garantia implícita de COMERCIABILIDADE * OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública * Geral Menor do GNU para mais detalhes. * * Você deve ter recebido uma cópia da Licença Pública Geral Menor do GNU junto * com esta biblioteca; se não, acesse * http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html, * ou escreva para a Free Software Foundation, Inc., no * endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. */ package com.jpower.expr; /** * * @author Juno Roesler - juno.rr@gmail.com * @version 0.0 - 05/08/2013 */ public class BooleanExpression extends Expression { private boolean bool; public BooleanExpression() {} public BooleanExpression(boolean b) { bool = b; } public boolean getBoolean() { return bool; } public BooleanExpression setBoolean(boolean b) { bool = b; return this; } public BooleanExpression setBoolean(String str) { if(str == null || str.trim().isEmpty() || (!str.equalsIgnoreCase("true") && !str.equalsIgnoreCase("false"))) throw new IllegalArgumentException( "Argument is not a Boolean: "+ str); bool = Boolean.parseBoolean(str); return this; } public Number resolve() { return (bool ? 1 : 0); } public String toString() { return String.valueOf(bool); } }
[ "juno@pserver.us" ]
juno@pserver.us
75d557292d17e67786ad89ad2f5de5594d0c3e5a
35cffe13f902c5fb9d5822dfd7d967d61d5efe91
/com.io7m.smfj.core/src/main/java/com/io7m/smfj/core/SMFMetadataValueType.java
3c0b3e842898e85d5b685c3e12fd929948b1e769
[ "ISC" ]
permissive
io7m/smfj
aa14e5452b5e3f6f34f984798c52ace2056ece11
0775364363792bd48ca5e91ee0f9da28c45637f1
refs/heads/develop
2023-08-17T21:01:34.551443
2023-08-13T21:09:25
2023-08-13T21:09:25
73,958,126
0
0
ISC
2022-01-08T20:23:34
2016-11-16T20:26:51
Java
UTF-8
Java
false
false
1,239
java
/* * Copyright © 2019 Mark Raynsford <code@io7m.com> https://www.io7m.com * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the * above copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ package com.io7m.smfj.core; import com.io7m.immutables.styles.ImmutablesStyleType; import org.immutables.value.Value; /** * A parsed metadata value. */ @Value.Immutable @ImmutablesStyleType public interface SMFMetadataValueType { /** * @return The metadata schema */ @Value.Parameter SMFSchemaIdentifier schemaId(); /** * @return The raw metadata bytes */ @Value.Parameter byte[] data(); }
[ "code@io7m.com" ]
code@io7m.com
794df41bfe0473a6a3ee6801befc4c2279ab873b
967e56dd95e7e8e05b0dd0025733f74b0c43ba1d
/src/main/java/io/suraj/sgbau/application/repository/search/UserSearchRepository.java
840c26c882b6aea66371b9b26719778f51a09b18
[]
no_license
surajbadhe/com-ask-application
2e882babba4a7d888a10a97df3d8f43df4163d14
6fcdf6d148196616cfb1daa7110ef92ec565d9ee
refs/heads/master
2020-03-26T18:26:43.717233
2018-08-18T11:07:43
2018-08-18T11:07:43
145,213,307
0
0
null
null
null
null
UTF-8
Java
false
false
340
java
package io.suraj.sgbau.application.repository.search; import io.suraj.sgbau.application.domain.User; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; /** * Spring Data Elasticsearch repository for the User entity. */ public interface UserSearchRepository extends ElasticsearchRepository<User, Long> { }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
3c9fbcf34e800fc691a8e8de87af62cf46d233a7
3c0b9e19de4051879fe5e48bfc91415856929980
/src/com/c35/ptc/goout/response/SendCodeResponse.java
b04d1f6685b47e8cde734308c109d99cf1edb368
[]
no_license
craining/android_goout
db73b1f5459f5d6a12943f5bc95dc12866328d27
dcd8f020b21e4302927d13cedfaf6a41dd6eb52a
refs/heads/master
2020-05-31T07:28:21.848474
2013-05-31T08:18:03
2013-05-31T08:18:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
966
java
package com.c35.ptc.goout.response; import com.c35.ptc.goout.GoOutDebug; import com.c35.ptc.goout.bean.Code; import com.c35.ptc.goout.util.JsonUtil; /** * 请求验证码响应 * * @Description: * @author: zhuanggy * @see: * @since: * @copyright © 35.com * @Date:2013-4-17 */ public class SendCodeResponse extends BaseResponse { private static final String TAG = "SendCodeResponse"; private boolean requestOk = false; private int errorCode = -1; public int getErrorCode() { return errorCode; } private Code codeReturn; public Code getCodeReturn() { return codeReturn; } public boolean isRequestOk() { return requestOk; } @Override public void initFeild(String response) { super.initFeild(response); GoOutDebug.i(TAG, "result: " + response); codeReturn = JsonUtil.parseSendCodeRequestResult(response); requestOk = codeReturn.isEffective(); if (!requestOk) { errorCode = codeReturn.getErrorCode(); } // } }
[ "craining@163.com" ]
craining@163.com
3d455af180048182aeca6d5d1e442af81bb33a8d
d4e4f828a79b4877ffa9b76455770fb5c94f6883
/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DashboardAccessTokensPanel.java
d9dcc89f9ea65d948f4a6e677df542d4a7d08af6
[ "MIT", "Apache-2.0" ]
permissive
aalzehla/syncope
d8b74a35df013585fa9598bc39fcce75b79ec19f
278216e8b102d6accb5343c08d882d6f175374fa
refs/heads/master
2022-11-24T22:41:14.474597
2020-07-16T08:47:58
2020-07-16T08:47:58
280,235,265
1
0
Apache-2.0
2020-07-16T19:01:46
2020-07-16T19:01:46
null
UTF-8
Java
false
false
1,925
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.syncope.client.console.panels; import org.apache.syncope.client.console.wizards.WizardMgtPanel; import org.apache.syncope.common.lib.to.AccessTokenTO; import org.apache.syncope.common.lib.types.IdRepoEntitlement; import org.apache.wicket.Component; import org.apache.wicket.PageReference; import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; import org.apache.wicket.markup.html.panel.Panel; public class DashboardAccessTokensPanel extends Panel { private static final long serialVersionUID = -5540744119461583586L; public DashboardAccessTokensPanel(final String id, final PageReference pageRef) { super(id); WizardMgtPanel<AccessTokenTO> accessTokens = new AccessTokenDirectoryPanel.Builder(pageRef) { private static final long serialVersionUID = -5960765294082359003L; }.disableCheckBoxes().build("accessTokens"); MetaDataRoleAuthorizationStrategy.authorize( accessTokens, Component.RENDER, IdRepoEntitlement.ACCESS_TOKEN_LIST); add(accessTokens); } }
[ "ilgrosso@apache.org" ]
ilgrosso@apache.org
ca24818e76b1a4e2cb9c5735225fde02ce889838
d704ec43f7a5a296b91f5de0023def92f013dcda
/core/src/main/java/org/elasticsearch/common/inject/spi/StaticInjectionRequest.java
acdf3ba5827c5ca170cfe6fa6f3582d914fd5277
[ "Apache-2.0", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
diegopacheco/elassandra
e4ede3085416750d4a71bcdf1ae7b77786b6cc36
d7f85d1768d5ca8e7928d640609dd5a777b2523c
refs/heads/master
2021-01-12T08:24:05.935475
2016-12-15T06:53:09
2016-12-15T06:53:09
76,563,249
0
1
Apache-2.0
2023-03-20T11:53:08
2016-12-15T13:46:19
Java
UTF-8
Java
false
false
2,911
java
/* * Copyright (C) 2008 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 org.elasticsearch.common.inject.spi; import org.elasticsearch.common.inject.Binder; import org.elasticsearch.common.inject.ConfigurationException; import java.util.Set; import static com.google.common.base.Preconditions.checkNotNull; /** * A request to inject the static fields and methods of a type. Requests are created * explicitly in a module using {@link org.elasticsearch.common.inject.Binder#requestStaticInjection(Class[]) * requestStaticInjection()} statements: * <pre> * requestStaticInjection(MyLegacyService.class);</pre> * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 */ public final class StaticInjectionRequest implements Element { private final Object source; private final Class<?> type; StaticInjectionRequest(Object source, Class<?> type) { this.source = checkNotNull(source, "source"); this.type = checkNotNull(type, "type"); } @Override public Object getSource() { return source; } public Class<?> getType() { return type; } /** * Returns the static methods and fields of {@code type} that will be injected to fulfill this * request. * * @return a possibly empty set of injection points. The set has a specified iteration order. All * fields are returned and then all methods. Within the fields, supertype fields are returned * before subtype fields. Similarly, supertype methods are returned before subtype methods. * @throws ConfigurationException if there is a malformed injection point on {@code type}, such as * a field with multiple binding annotations. The exception's {@link * ConfigurationException#getPartialValue() partial value} is a {@code Set<InjectionPoint>} * of the valid injection points. */ public Set<InjectionPoint> getInjectionPoints() throws ConfigurationException { return InjectionPoint.forStaticMethodsAndFields(type); } @Override public void applyTo(Binder binder) { binder.withSource(getSource()).requestStaticInjection(type); } @Override public <T> T acceptVisitor(ElementVisitor<T> visitor) { return visitor.visit(this); } }
[ "vroyer@vroyer.org" ]
vroyer@vroyer.org
7149ccad34d08a7b9a44cd065a313c088f035bff
8bca6164fc085936891cda5ff7b2341d3d7696c5
/bootstrap/gensrc/de/hybris/platform/core/model/user/PhoneContactInfoModel.java
90d546fd49b140562f39660fb95fa1f71aec6683
[]
no_license
rgonthina1/newplatform
28819d22ba48e48d4edebbf008a925cad0ebc828
1cdc70615ea4e86863703ca9a34231153f8ef373
refs/heads/master
2021-01-19T03:03:22.221074
2016-06-20T14:49:25
2016-06-20T14:49:25
61,548,232
1
0
null
null
null
null
UTF-8
Java
false
false
5,947
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! --- * --- Generated at 20 Jun, 2016 7:36:24 PM --- * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2000-2015 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("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 hybris. * */ package de.hybris.platform.core.model.user; import de.hybris.bootstrap.annotations.Accessor; import de.hybris.platform.core.enums.PhoneContactInfoType; import de.hybris.platform.core.model.ItemModel; import de.hybris.platform.core.model.user.AbstractContactInfoModel; import de.hybris.platform.core.model.user.UserModel; import de.hybris.platform.servicelayer.model.ItemModelContext; /** * Generated model class for type PhoneContactInfo first defined at extension core. * <p> * Phone contact info. */ @SuppressWarnings("all") public class PhoneContactInfoModel extends AbstractContactInfoModel { /**<i>Generated model type code constant.</i>*/ public final static String _TYPECODE = "PhoneContactInfo"; /** <i>Generated constant</i> - Attribute key of <code>PhoneContactInfo.phoneNumber</code> attribute defined at extension <code>core</code>. */ public static final String PHONENUMBER = "phoneNumber"; /** <i>Generated constant</i> - Attribute key of <code>PhoneContactInfo.type</code> attribute defined at extension <code>core</code>. */ public static final String TYPE = "type"; /** <i>Generated variable</i> - Variable of <code>PhoneContactInfo.phoneNumber</code> attribute defined at extension <code>core</code>. */ private String _phoneNumber; /** <i>Generated variable</i> - Variable of <code>PhoneContactInfo.type</code> attribute defined at extension <code>core</code>. */ private PhoneContactInfoType _type; /** * <i>Generated constructor</i> - Default constructor for generic creation. */ public PhoneContactInfoModel() { super(); } /** * <i>Generated constructor</i> - Default constructor for creation with existing context * @param ctx the model context to be injected, must not be null */ public PhoneContactInfoModel(final ItemModelContext ctx) { super(ctx); } /** * <i>Generated constructor</i> - Constructor with all mandatory attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _code initial attribute declared by type <code>AbstractContactInfo</code> at extension <code>core</code> * @param _phoneNumber initial attribute declared by type <code>PhoneContactInfo</code> at extension <code>core</code> * @param _type initial attribute declared by type <code>PhoneContactInfo</code> at extension <code>core</code> * @param _user initial attribute declared by type <code>AbstractContactInfo</code> at extension <code>core</code> */ @Deprecated public PhoneContactInfoModel(final String _code, final String _phoneNumber, final PhoneContactInfoType _type, final UserModel _user) { super(); setCode(_code); setPhoneNumber(_phoneNumber); setType(_type); setUser(_user); } /** * <i>Generated constructor</i> - for all mandatory and initial attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _code initial attribute declared by type <code>AbstractContactInfo</code> at extension <code>core</code> * @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code> * @param _phoneNumber initial attribute declared by type <code>PhoneContactInfo</code> at extension <code>core</code> * @param _type initial attribute declared by type <code>PhoneContactInfo</code> at extension <code>core</code> * @param _user initial attribute declared by type <code>AbstractContactInfo</code> at extension <code>core</code> */ @Deprecated public PhoneContactInfoModel(final String _code, final ItemModel _owner, final String _phoneNumber, final PhoneContactInfoType _type, final UserModel _user) { super(); setCode(_code); setOwner(_owner); setPhoneNumber(_phoneNumber); setType(_type); setUser(_user); } /** * <i>Generated method</i> - Getter of the <code>PhoneContactInfo.phoneNumber</code> attribute defined at extension <code>core</code>. * @return the phoneNumber */ @Accessor(qualifier = "phoneNumber", type = Accessor.Type.GETTER) public String getPhoneNumber() { if (this._phoneNumber!=null) { return _phoneNumber; } return _phoneNumber = getPersistenceContext().getValue(PHONENUMBER, _phoneNumber); } /** * <i>Generated method</i> - Getter of the <code>PhoneContactInfo.type</code> attribute defined at extension <code>core</code>. * @return the type */ @Accessor(qualifier = "type", type = Accessor.Type.GETTER) public PhoneContactInfoType getType() { if (this._type!=null) { return _type; } return _type = getPersistenceContext().getValue(TYPE, _type); } /** * <i>Generated method</i> - Setter of <code>PhoneContactInfo.phoneNumber</code> attribute defined at extension <code>core</code>. * * @param value the phoneNumber */ @Accessor(qualifier = "phoneNumber", type = Accessor.Type.SETTER) public void setPhoneNumber(final String value) { _phoneNumber = getPersistenceContext().setValue(PHONENUMBER, value); } /** * <i>Generated method</i> - Setter of <code>PhoneContactInfo.type</code> attribute defined at extension <code>core</code>. * * @param value the type */ @Accessor(qualifier = "type", type = Accessor.Type.SETTER) public void setType(final PhoneContactInfoType value) { _type = getPersistenceContext().setValue(TYPE, value); } }
[ "Kalpana" ]
Kalpana
f6e3e364c85e2eba72fafc5a5a05eafd9a1e60a8
2b3518e908d0258a8b04f348f8d5100ff56031ec
/src/main/java/com/edgar/kafka/ProducerExample.java
4a64ca3524f15b9933121bf6995736d9d177bd78
[]
no_license
edgar615/kafka-study
61f38887690fd0d098a88fcc6a6b3e5258742cae
41fa8eeb1c7026c7c6d2020dc921f6dd3fdb2433
refs/heads/master
2021-01-19T18:28:16.996609
2017-10-15T13:20:42
2017-10-15T13:20:42
47,980,583
1
0
null
null
null
null
UTF-8
Java
false
false
2,087
java
package com.edgar.kafka; import org.apache.kafka.clients.producer.Callback; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.Producer; import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.kafka.clients.producer.RecordMetadata; import java.util.Properties; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; /** * Created by edgar on 15-12-11. */ public class ProducerExample { public static void main(String[] args) throws ExecutionException, InterruptedException { Properties props = new Properties(); props.put("bootstrap.servers", "10.11.0.31:9092"); props.put("acks", "all"); props.put("retries", 0); props.put("max.block.ms", 10000); props.put("batch.size", 16384); props.put("linger.ms", 1); props.put("buffer.memory", 33554432); props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer"); props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer"); Producer<String, String> producer = new KafkaProducer(props); int i = 0; // for(; ; ) { // System.out.println(i); // Future<RecordMetadata> future = producer.send( // new ProducerRecord<String, String>("my-topic5", Integer.toString(i), // Integer.toString(i))); // System.out.println(future.get()); // TimeUnit.SECONDS.sleep(1); // } for (; ; ) { System.out.println(i); producer.send( new ProducerRecord<String, String>("my-topic5", Integer.toString(i), Integer.toString(i)), new Callback() { @Override public void onCompletion(RecordMetadata metadata, Exception exception) { System.out.println(metadata + ":" + exception); } }); System.out.println("no"); TimeUnit.SECONDS.sleep(1); } // producer.close(); } }
[ "edgar615@gmail.com" ]
edgar615@gmail.com
b51ea41c6fb6cba54127b753bd9792cf19c9d136
995f73d30450a6dce6bc7145d89344b4ad6e0622
/P40_HarmonyOS_2.0.0_Developer_Beta1/src/main/java/ohos/global/text/format/DateFormatUtilAdapter.java
ede397e75b51fdfb39b6b95ac7fc9fcbe867d74a
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
471
java
package ohos.global.text.format; import android.content.Context; import android.text.format.DateFormat; import ohos.hiviewdfx.HiLogLabel; public class DateFormatUtilAdapter { private static final HiLogLabel LABEL = new HiLogLabel(3, 218111488, "DateFormatUtilAdapter"); public static boolean is24HourFormat(Object obj) { if (obj instanceof Context) { return DateFormat.is24HourFormat((Context) obj); } return false; } }
[ "dstmath@163.com" ]
dstmath@163.com
c1dfe704e6d5d283ea41a81603b2d8ed5d4109f3
b9055efc302828edba0757fb9e15a230e2a2dab0
/Bot/src/java/main/org/cen/cup/cup2008/device/container/console/ContainerDeviceConsole.java
8e0b0fefc1d3e19861b6a20e3fb2e2e2d2add531
[]
no_license
svanacker/cen-info-web
d812af11a9b809e899d105302ee0efe802b83466
bb187aef18d9b99acf09c0e9670ea2fbbc1fb906
refs/heads/master
2016-09-06T23:14:53.730247
2014-05-10T22:56:46
2014-05-10T22:56:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,278
java
package org.cen.cup.cup2008.device.container.console; import org.cen.cup.cup2008.device.container.ContainerDevice; import org.cen.robot.device.AbstractRobotDeviceAction; import org.cen.robot.device.IRobotDevice; import org.cen.robot.device.console.AbstractRobotDeviceConsole; public class ContainerDeviceConsole extends AbstractRobotDeviceConsole { private ContainerDevice device; public ContainerDeviceConsole(IRobotDevice device) { super(); this.device = (ContainerDevice) device; addAction(new AbstractRobotDeviceAction("open", "open") { private static final long serialVersionUID = 1L; @Override public void execute(Object parameters) { ContainerDeviceConsole.this.device.debug("open"); } }); addAction(new AbstractRobotDeviceAction("close", "close") { private static final long serialVersionUID = 1L; @Override public void execute(Object parameters) { ContainerDeviceConsole.this.device.debug("close"); } }); addAction(new AbstractRobotDeviceAction("move", "move") { private static final long serialVersionUID = 1L; @Override public void execute(Object parameters) { ContainerDeviceConsole.this.device.debug("move"); } }); } @Override public String getName() { return device.getName(); } }
[ "svanacker@gmail.com" ]
svanacker@gmail.com
37e9ac31e00e42e3c4a2d86aeb55f2683bc652fa
097df92ce1bfc8a354680725c7d10f0d109b5b7d
/com/amazon/ws/emr/hadoop/fs/shaded/com/amazonaws/services/elasticmapreduce/model/transform/GetBlockPublicAccessConfigurationRequestProtocolMarshaller.java
23247de359320268f6a5fa123812da63ed9fa998
[]
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
2,982
java
package com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.elasticmapreduce.model.transform; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.Request; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.SdkClientException; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.annotation.SdkInternalApi; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.http.HttpMethodName; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.protocol.OperationInfo; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.protocol.OperationInfo.Builder; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.protocol.Protocol; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.protocol.ProtocolRequestMarshaller; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.protocol.json.SdkJsonProtocolFactory; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.elasticmapreduce.model.GetBlockPublicAccessConfigurationRequest; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.transform.Marshaller; @SdkInternalApi public class GetBlockPublicAccessConfigurationRequestProtocolMarshaller implements Marshaller<Request<GetBlockPublicAccessConfigurationRequest>, GetBlockPublicAccessConfigurationRequest> { private static final OperationInfo SDK_OPERATION_BINDING = OperationInfo.builder().protocol(Protocol.AWS_JSON).requestUri("/") .httpMethodName(HttpMethodName.POST).hasExplicitPayloadMember(false).hasPayloadMembers(false) .operationIdentifier("ElasticMapReduce.GetBlockPublicAccessConfiguration").serviceName("AmazonElasticMapReduce").build(); private final SdkJsonProtocolFactory protocolFactory; public GetBlockPublicAccessConfigurationRequestProtocolMarshaller(SdkJsonProtocolFactory protocolFactory) { this.protocolFactory = protocolFactory; } public Request<GetBlockPublicAccessConfigurationRequest> marshall(GetBlockPublicAccessConfigurationRequest getBlockPublicAccessConfigurationRequest) { if (getBlockPublicAccessConfigurationRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { ProtocolRequestMarshaller<GetBlockPublicAccessConfigurationRequest> protocolMarshaller = protocolFactory.createProtocolMarshaller(SDK_OPERATION_BINDING, getBlockPublicAccessConfigurationRequest); protocolMarshaller.startMarshalling(); GetBlockPublicAccessConfigurationRequestMarshaller.getInstance().marshall(getBlockPublicAccessConfigurationRequest, protocolMarshaller); return protocolMarshaller.finishMarshalling(); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } } /* Location: * Qualified Name: com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.elasticmapreduce.model.transform.GetBlockPublicAccessConfigurationRequestProtocolMarshaller * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "Arwin.tio@adroll.com" ]
Arwin.tio@adroll.com
0a7ed405cde7702291aea042dd984d9357cf4e85
b244c9cafb95205dff582f191c946d0b2cb98c0b
/src/com/massivecraft/massivecore/cmd/massivecore/CmdMassiveCoreUsysUniverseClear.java
037a1d8ae10536b74a40be2cb3b22c9a1bae4434
[]
no_license
IMADICK666/MassiveCore
195fb42799dc892c6b4469598cf8b9d974658926
ff8a68b82eb8544039959543af1d7738d6919a0e
refs/heads/master
2020-12-25T23:27:27.985080
2015-06-25T14:11:55
2015-06-27T10:02:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,776
java
package com.massivecraft.massivecore.cmd.massivecore; import com.massivecraft.massivecore.MassiveCore; import com.massivecraft.massivecore.MassiveCorePerm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.Multiverse; import com.massivecraft.massivecore.cmd.MassiveCommand; import com.massivecraft.massivecore.cmd.arg.ARMultiverse; import com.massivecraft.massivecore.cmd.arg.ARString; import com.massivecraft.massivecore.cmd.req.ReqHasPerm; public class CmdMassiveCoreUsysUniverseClear extends MassiveCommand { // -------------------------------------------- // // CONSTRUCT // -------------------------------------------- // public CmdMassiveCoreUsysUniverseClear() { // Aliases this.addAliases("c", "clear"); // Args this.addArg(ARString.get(), "universe").setDesc("the universe to clear"); this.addArg(ARMultiverse.get(), "multiverse").setDesc("the multiverse of the universe to clear"); // Requirements this.addRequirements(ReqHasPerm.get(MassiveCorePerm.USYS_UNIVERSE_CLEAR.node)); } // -------------------------------------------- // // OVERRIDE // -------------------------------------------- // @Override public void perform() throws MassiveException { String universe = this.readArg(); Multiverse multiverse = this.readArg(); if (universe.equals(MassiveCore.DEFAULT)) { msg("<b>You can't clear the default universe."); msg("<b>It contains the worlds that aren't assigned to a universe."); return; } if (multiverse.clearUniverse(universe)) { msg("<g>Cleared universe <h>%s<g> in multiverse <h>%s<g>.", universe, multiverse.getId()); } else { msg("<b>No universe <h>%s<b> exists in multiverse <h>%s<b>.", universe, multiverse.getId()); } } }
[ "olof@sylt.nu" ]
olof@sylt.nu
4b2b4996e7d228b2eb33c4c51ac33c43d23a8f8f
c474b03758be154e43758220e47b3403eb7fc1fc
/apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/android/support/v4/widget/Space.java
cfd57bc6722c923a85130672716813e2d8690f20
[]
no_license
EstebanDalelR/tinderAnalysis
f80fe1f43b3b9dba283b5db1781189a0dd592c24
941e2c634c40e5dbf5585c6876ef33f2a578b65c
refs/heads/master
2020-04-04T09:03:32.659099
2018-11-23T20:41:28
2018-11-23T20:41:28
155,805,042
0
0
null
2018-11-18T16:02:45
2018-11-02T02:44:34
null
UTF-8
Java
false
false
1,518
java
package android.support.v4.widget; import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Canvas; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.View; import android.view.View.MeasureSpec; @Deprecated public class Space extends View { @SuppressLint({"MissingSuperCall"}) @Deprecated public void draw(Canvas canvas) { } @Deprecated public Space(@NonNull Context context, @Nullable AttributeSet attributeSet, int i) { super(context, attributeSet, i); if (getVisibility() == null) { setVisibility(4); } } @Deprecated public Space(@NonNull Context context, @Nullable AttributeSet attributeSet) { this(context, attributeSet, 0); } @Deprecated public Space(@NonNull Context context) { this(context, null); } /* renamed from: a */ private static int m2509a(int i, int i2) { int mode = MeasureSpec.getMode(i2); i2 = MeasureSpec.getSize(i2); if (mode == Integer.MIN_VALUE) { return Math.min(i, i2); } if (mode == 0) { return i; } if (mode != 1073741824) { return i; } return i2; } @Deprecated protected void onMeasure(int i, int i2) { setMeasuredDimension(m2509a(getSuggestedMinimumWidth(), i), m2509a(getSuggestedMinimumHeight(), i2)); } }
[ "jdguzmans@hotmail.com" ]
jdguzmans@hotmail.com
e490e2caefb19b8f338efbeb9125cd72e8310b75
47843cb70260f80d41ba4ed1a15d2e70e4f68031
/designpattern/src/build/abstractfactory/concreteproduct/BlackCat.java
6c00a6bccf71124de9e7e886abf4f2e94cc2b777
[]
no_license
zhaofeng555/misc
d1da5cd829c381cdbdebf04082446131010238ba
08677adec12e7092a9f759da93c6fb36cb9fd2e1
refs/heads/master
2020-12-10T19:03:59.661232
2016-08-17T03:41:11
2016-08-17T03:41:11
20,177,000
0
0
null
null
null
null
UTF-8
Java
false
false
227
java
package build.abstractfactory.concreteproduct; import build.abstractfactory.product.ICat; public class BlackCat implements ICat { @Override public void eat() { System.out.println("黑猫在吃……"); } }
[ "443842006@qq.com" ]
443842006@qq.com
466afcc454ed1e4a97ef560fdd7e9223389f883d
0487b3aa560fb587dca5d0c1978a6adf60e2a03e
/plugins/rearranger/test/testData/com/wrq/rearranger/RearrangementTest8.java
37802e109f93d257ca21b12c248320e7e146920c
[ "Apache-2.0" ]
permissive
serso/intellij-community
c09ed9ce0b00340cb58a7fb7fa7cf280896ac1bf
f7e8ad45f6b987c1c7940bb8a667086d1b554365
refs/heads/master
2021-01-15T17:59:53.752302
2012-11-08T12:59:30
2012-11-08T12:59:51
6,597,019
1
0
null
null
null
null
UTF-8
Java
false
false
269
java
/** * leading comments. */ package com.wrq.rearranger; /** public class comments. */ public class RearrangementTest { private int field2; /** method 1 comment. */ void method1() { // method 1 body. } static { // static initializer class. } }
[ "Denis.Zhdanov@jetbrains.com" ]
Denis.Zhdanov@jetbrains.com
2ab405fcafea4e91c2ecb1d2af653d47199635be
2161aee1ef78f77249028689fb483cf78983ed2a
/src/main/java/org/nanotek/base/artist/ArtistType.java
56d79e38ea5f4c80cd221bc259a77739a2922cb4
[]
no_license
josecarloscanova/base_entity
c1430c804e6dbabe70b4840a271bc821f4d99a3e
1b074e03522c3e134534c357bcc3eb4d6d1e1e14
refs/heads/master
2021-01-11T13:56:03.548199
2017-06-20T15:33:43
2017-06-20T15:33:43
94,900,215
0
0
null
null
null
null
UTF-8
Java
false
false
130
java
package org.nanotek.base.artist; public enum ArtistType { Musician, Singer, Actor, Dancer, Writer, Performer, Other; }
[ "jose.carlos.canova@gmail.com" ]
jose.carlos.canova@gmail.com
5e8d443ae7633c979f7a7a2a031a31eee7307d47
aee5df69cd38887110c09d3d2bd723cb6e8987d6
/2.JavaCore/src/com/javarush/task/task12/task1222/Solution.java
55fab732fa4ebe83910bf8b293415c8eec9ed30a
[]
no_license
siarheikorbut/JavaRush
5e98158ad71594b2ad1b41342b51df39517341fc
095690627248ed8cb4d2b1a3314c06333aef2235
refs/heads/master
2023-08-24T05:34:03.674176
2021-10-16T17:57:19
2021-10-16T17:57:19
306,656,990
0
0
null
null
null
null
UTF-8
Java
false
false
698
java
package com.javarush.task.task12.task1222; /* Больше не Пушистик */ public class Solution { public static void main(String[] args) { Pet pet = new Cat(); pet.setName("Я - пушистик"); System.out.println(pet.getName()); } public static class Pet { protected String name; public Pet() { } public String getName() { return name; } public void setName(String name) { this.name = name; } } public static class Cat extends Pet { @Override public void setName(String name) { this.name = "Я - кот"; } } }
[ "siarheikorbut@gmail.com" ]
siarheikorbut@gmail.com
522182c5685f6e8d7c94560636a5bc04aa0e47e7
8c69d5080dee0d09acd42255173df1c3907fc3a4
/examples/algorithmssum/src/test/java/algorithmssum/integers/IntegerSumCalculatorTest.java
d5fd0bf267c922bd592148e07848b8b82e646220
[]
no_license
edoom/strukturavalto-java-public
2ec2a1f77916b5b01ddd4189c0c19d6356b648f2
d1df0fa29942c69ed28744ecb2a6334f67f8de2d
refs/heads/master
2023-01-08T17:18:18.119783
2020-10-22T10:05:16
2020-10-22T10:05:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
449
java
package algorithmssum.integers; import java.util.Arrays; import java.util.List; import static org.hamcrest.CoreMatchers.is; import org.junit.Test; import static org.junit.Assert.*; public class IntegerSumCalculatorTest { @Test public void testSum() { List<Integer> numbers = Arrays.asList(1, 2, 2, -7, 6); IntegerSumCalculator test = new IntegerSumCalculator(); assertThat(test.sum(numbers), is(4)); } }
[ "viczian.istvan@gmail.com" ]
viczian.istvan@gmail.com
5fd547dc332bf36383315fb411741a7af38012e1
aca457909ef8c4eb989ba23919de508c490b074a
/DialerJADXDecompile/chc.java
ec6aa904fa4665efdcba72d4a3418125c926b6ba
[]
no_license
KHikami/ProjectFiCallingDeciphered
bfccc1e1ba5680d32a4337746de4b525f1911969
cc92bf6d4cad16559a2ecbc592503d37a182dee3
refs/heads/master
2021-01-12T17:50:59.643861
2016-12-08T01:20:34
2016-12-08T01:23:04
71,650,754
1
0
null
null
null
null
UTF-8
Java
false
false
355
java
public final class chc { public static final bwi[] a; static { a = new bwi[]{new chd(bwi.a("0\u0082\u0003\u00bb0\u0082\u0002\u00a3\u00a0\u0003\u0002\u0001\u0002\u0002\t\u0000\u00a1$;g\u00d0 Zq0")), new che(bwi.a("0\u0082\u0003\u00bb0\u0082\u0002\u00a3\u00a0\u0003\u0002\u0001\u0002\u0002\t\u0000\u00b2U\u00e6\u00b9Jn\u001d10"))}; } }
[ "chu.rachelh@gmail.com" ]
chu.rachelh@gmail.com
4d755746157e2b4e3aff96327fe7566fc10e0e21
498dd2daff74247c83a698135e4fe728de93585a
/clients/google-api-services-vision/v1/1.28.0/com/google/api/services/vision/v1/model/AsyncBatchAnnotateImagesRequest.java
e05f0a73b4392152e8d7b725db82558f5be4dbae
[ "Apache-2.0" ]
permissive
googleapis/google-api-java-client-services
0e2d474988d9b692c2404d444c248ea57b1f453d
eb359dd2ad555431c5bc7deaeafca11af08eee43
refs/heads/main
2023-08-23T00:17:30.601626
2023-08-20T02:16:12
2023-08-20T02:16:12
147,399,159
545
390
Apache-2.0
2023-09-14T02:14:14
2018-09-04T19:11:33
null
UTF-8
Java
false
false
4,941
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ /* * This code was generated by https://github.com/googleapis/google-api-java-client-services/ * Modify at your own risk. */ package com.google.api.services.vision.v1.model; /** * Request for async image annotation for a list of images. * * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Cloud Vision API. For a detailed explanation see: * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a> * </p> * * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class AsyncBatchAnnotateImagesRequest extends com.google.api.client.json.GenericJson { /** * Required. The desired output location and metadata (e.g. format). * The value may be {@code null}. */ @com.google.api.client.util.Key private OutputConfig outputConfig; /** * Optional. Target project and location to make a call. * * Format: `projects/{project-id}/locations/{location-id}`. * * If no parent is specified, a region will be chosen automatically. * * Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, * Taiwan, `eu`: The European Union. * * Example: `projects/project-A/locations/eu`. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String parent; /** * Required. Individual image annotation requests for this batch. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List<AnnotateImageRequest> requests; static { // hack to force ProGuard to consider AnnotateImageRequest used, since otherwise it would be stripped out // see https://github.com/google/google-api-java-client/issues/543 com.google.api.client.util.Data.nullOf(AnnotateImageRequest.class); } /** * Required. The desired output location and metadata (e.g. format). * @return value or {@code null} for none */ public OutputConfig getOutputConfig() { return outputConfig; } /** * Required. The desired output location and metadata (e.g. format). * @param outputConfig outputConfig or {@code null} for none */ public AsyncBatchAnnotateImagesRequest setOutputConfig(OutputConfig outputConfig) { this.outputConfig = outputConfig; return this; } /** * Optional. Target project and location to make a call. * * Format: `projects/{project-id}/locations/{location-id}`. * * If no parent is specified, a region will be chosen automatically. * * Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, * Taiwan, `eu`: The European Union. * * Example: `projects/project-A/locations/eu`. * @return value or {@code null} for none */ public java.lang.String getParent() { return parent; } /** * Optional. Target project and location to make a call. * * Format: `projects/{project-id}/locations/{location-id}`. * * If no parent is specified, a region will be chosen automatically. * * Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, * Taiwan, `eu`: The European Union. * * Example: `projects/project-A/locations/eu`. * @param parent parent or {@code null} for none */ public AsyncBatchAnnotateImagesRequest setParent(java.lang.String parent) { this.parent = parent; return this; } /** * Required. Individual image annotation requests for this batch. * @return value or {@code null} for none */ public java.util.List<AnnotateImageRequest> getRequests() { return requests; } /** * Required. Individual image annotation requests for this batch. * @param requests requests or {@code null} for none */ public AsyncBatchAnnotateImagesRequest setRequests(java.util.List<AnnotateImageRequest> requests) { this.requests = requests; return this; } @Override public AsyncBatchAnnotateImagesRequest set(String fieldName, Object value) { return (AsyncBatchAnnotateImagesRequest) super.set(fieldName, value); } @Override public AsyncBatchAnnotateImagesRequest clone() { return (AsyncBatchAnnotateImagesRequest) super.clone(); } }
[ "chingor@google.com" ]
chingor@google.com
0ced9a134cd639e1c9bb5ce8eb6ac77d338fda7c
0fa9e325bffe5b08b3a569a7dd5507db55aed829
/LeetCode/Longest Substring with At Least K Repeating Characters/Longest Substring with At Least K Repeating Characters(多路分治算法).java
ed49cfba5ab4571c4fa155c91e00f017bef67701
[ "Apache-2.0" ]
permissive
wuli2496/OJ
8322c07752807fdab36aae551cbe42474308ed1f
c8baef1c0b2c7fd2f0a76bf195367413b20d5284
refs/heads/master
2023-04-13T12:42:44.072512
2023-04-09T10:47:54
2023-04-09T10:47:54
196,775,902
6
2
Apache-2.0
2022-12-16T15:48:25
2019-07-13T23:48:54
Java
UTF-8
Java
false
false
1,086
java
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; class Solution { public int longestSubstring(String s, int k) { Map<Character, Integer> cntMap = new HashMap<>(); for (char ch : s.toCharArray()) { if (!cntMap.containsKey(ch)) { cntMap.put(ch, 1); } else { cntMap.put(ch, cntMap.get(ch) + 1); } } List<Integer> splits = new ArrayList<>(); for (int i = 0; i < s.length(); ++i) { if (cntMap.get(s.charAt(i)) < k) { splits.add(i); } } if (splits.size() == 0) { return s.length(); } splits.add(s.length()); int ans = 0, left = 0; for (int i = 0; i < splits.size(); ++i) { int len = splits.get(i) - left; if (len > ans) { ans = Math.max(ans, longestSubstring(s.substring(left, left + len), k)); } left = splits.get(i) + 1; } return ans; } }
[ "wuli2496@163.com" ]
wuli2496@163.com
741eeda3a500fd2861b666e93ea98e432ee59c4e
544cfadc742536618168fc80a5bd81a35a5f2c99
/packages/services/Car/experimental/service/src/com/android/experimentalcar/ExperimentalCarService.java
065f8e9c4b2f62a6c8d06070567d51e0242ed8c2
[]
no_license
ZYHGOD-1/Aosp11
0400619993b559bf4380db2da0addfa9cccd698d
78a61ca023cbf1a0cecfef8b97df2b274ac3a988
refs/heads/main
2023-04-21T20:13:54.629813
2021-05-22T05:28:21
2021-05-22T05:28:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,882
java
/* * Copyright (C) 2019 The Android Open Source Project * * 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.android.experimentalcar; import android.app.Service; import android.car.Car; import android.content.Intent; import android.os.IBinder; import java.io.FileDescriptor; import java.io.PrintWriter; /** * Top class to keep all experimental features. */ public class ExperimentalCarService extends Service { private Car mCar; private final IExperimentalCarImpl mIExperimentalCarImpl = new IExperimentalCarImpl(this); @Override public void onCreate() { super.onCreate(); // This is for crashing this service when car service crashes. mCar = Car.createCar(this); } @Override public void onDestroy() { mIExperimentalCarImpl.release(); if (mCar != null && mCar.isConnected()) { mCar.disconnect(); mCar = null; } super.onDestroy(); } @Override public int onStartCommand(Intent intent, int flags, int startId) { // keep it alive. return START_STICKY; } @Override public IBinder onBind(Intent intent) { return mIExperimentalCarImpl; } @Override protected void dump(FileDescriptor fd, PrintWriter writer, String[] args) { mIExperimentalCarImpl.dump(fd, writer, args); } }
[ "rick_tan@qq.com" ]
rick_tan@qq.com
2529e4fefee65c869ff43efd0787ea3c4c08a75e
936aa88990d1e478491aa66627b0263b5590aaa0
/Platform/mo-6-content/src/content-resource/org/mo/content/resource/common/FResRegion.java
d6eb86a4158ca3bc8202981c3902c5896c1140d7
[]
no_license
favedit/MoCloud3d
f6d417412c5686a0f043a2cc53cd34214ee35618
ef6116df5b66fbc16468bd5e915ba19bb982d867
refs/heads/master
2021-01-10T12:12:22.837243
2016-02-21T09:05:53
2016-02-21T09:05:53
48,077,310
2
2
null
null
null
null
UTF-8
Java
false
false
5,776
java
package org.mo.content.resource.common; import org.mo.com.io.IDataInput; import org.mo.com.io.IDataOutput; import org.mo.com.lang.FFatalError; import org.mo.com.xml.FXmlNode; import org.mo.content.geom.common.SFloatColor4; //============================================================ // <T>资源3D区域。</T> //============================================================ public class FResRegion extends FResObject { // 移动速度 protected float _moveSpeed = 35.0f; // 旋转按键速度 protected float _rotationKeySpeed = 2.5f; // 旋转鼠标速度 protected float _rotationMouseSpeed = 0.0035f; // 颜色 protected SFloatColor4 _color = new SFloatColor4(); // 材质(Space内默认材质) protected FResMaterial _material = new FResMaterial(); // 相机 protected FResCamera _camera = new FResCamera(); // 光源 protected FResLight _light = new FResLight(); //============================================================ // <T>构造场景区域。</T> //============================================================ public FResRegion(){ _type = "Region"; } //============================================================ // <T>获得材质。</T> // // @return 材质 //============================================================ public FResMaterial material(){ return _material; } //============================================================ // <T>获得相机。</T> // // @return 相机 //============================================================ public FResCamera camera(){ return _camera; } //============================================================ // <T>获得光源。</T> // // @return 光源 //============================================================ public FResLight light(){ return _light; } //============================================================ // <T>序列化数据到输出流。</T> // // @param output 输出流 //============================================================ @Override public void serialize(IDataOutput output){ super.serialize(output); // 存储属性 _color.serialize(output); output.writeFloat(_moveSpeed); output.writeFloat(_rotationKeySpeed); output.writeFloat(_rotationMouseSpeed); // 存储材质 _material.serialize(output); // 存储相机 _camera.serialize(output); // 存储光源 _light.serialize(output); } //============================================================ // <T>从配置信息中加载配置。</T> // // @param xconfig 配置信息 //============================================================ @Override public void loadConfig(FXmlNode xconfig){ // 读取属性 _guid = xconfig.get("guid"); _color.parse(xconfig.get("color")); _moveSpeed = xconfig.getFloat("move_speed", _moveSpeed); _rotationKeySpeed = xconfig.getFloat("rotation_key_speed", _rotationKeySpeed); _rotationMouseSpeed = xconfig.getFloat("rotation_mouse_speed", _rotationMouseSpeed); // 处理所有节点 for(FXmlNode xnode : xconfig){ if(xnode.isName("Material")){ _material.loadConfig(xnode); }else if(xnode.isName("Camera")){ _camera.loadConfig(xnode); }else if(xnode.isName("Light")){ _light.loadConfig(xnode); }else{ throw new FFatalError("Invalid config node."); } } } //============================================================ // <T>存储数据信息到配置节点中。</T> // // @param xconfig 配置信息 //============================================================ @Override public void saveConfig(FXmlNode xconfig){ // 存储属性 xconfig.set("guid", makeGuid()); xconfig.set("color", _color); xconfig.set("move_speed", _moveSpeed); xconfig.set("rotation_key_speed", _rotationKeySpeed); xconfig.set("rotation_mouse_speed", _rotationMouseSpeed); // 存储材质 _material.saveConfig(xconfig.createNode("Material")); // 存储相机 _camera.saveConfig(xconfig.createNode("Camera")); // 存储光源 _light.saveConfig(xconfig.createNode("Light")); } //============================================================ // <T>从配置信息中加载配置。</T> // // @param xconfig 配置信息 //============================================================ @Override public void mergeConfig(FXmlNode xconfig){ super.mergeConfig(xconfig); // 读取属性 _color.parse(xconfig.get("color")); _moveSpeed = xconfig.getFloat("move_speed", _moveSpeed); _rotationKeySpeed = xconfig.getFloat("rotation_key_speed", _rotationKeySpeed); _rotationMouseSpeed = xconfig.getFloat("rotation_mouse_speed", _rotationMouseSpeed); // 处理所有节点 for(FXmlNode xnode : xconfig){ if(xnode.isName("Material")){ _material.mergeConfig(xnode); }else if(xnode.isName("Camera")){ _camera.mergeConfig(xnode); }else if(xnode.isName("Light")){ _light.mergeConfig(xnode); }else{ throw new FFatalError("Invalid config node."); } } } //============================================================ // <T>从输入流反序列化数据。</T> // // @param input 输入流 //============================================================ public void importData(IDataInput input){ // 读取属性 _color.unserialize(input); _camera.importData(input); _light.importData(input); } }
[ "favedit@hotmail.com" ]
favedit@hotmail.com
7fd4508973705590dbc2bf11837f1f24cc075e53
e3d0f7f75e4356413d05ba78e14c484f8555b2b5
/azure-resourcemanager-hybrid/src/main/java/com/azure/resourcemanager/hybrid/network/models/VirtualNetworkGatewayListConnectionsResult.java
5191f422a170a10f8614c43d7914564e326df38d
[ "MIT" ]
permissive
weidongxu-microsoft/azure-stack-java-samples
1df227502c367f128916f121ccc0f5bc77b045e5
afdfd0ed220f2f8a603c6fa5e16311a7842eb31c
refs/heads/main
2023-04-04T12:24:07.405360
2021-04-07T08:06:00
2021-04-07T08:06:00
337,593,216
0
1
null
null
null
null
UTF-8
Java
false
false
2,412
java
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybrid.network.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybrid.network.fluent.models.VirtualNetworkGatewayConnectionListEntityInner; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response for the VirtualNetworkGatewayListConnections API service call. */ @Fluent public final class VirtualNetworkGatewayListConnectionsResult { @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkGatewayListConnectionsResult.class); /* * Gets a list of VirtualNetworkGatewayConnection resources that exists in * a resource group. */ @JsonProperty(value = "value") private List<VirtualNetworkGatewayConnectionListEntityInner> value; /* * The URL to get the next set of results. */ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; /** * Get the value property: Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group. * * @return the value value. */ public List<VirtualNetworkGatewayConnectionListEntityInner> value() { return this.value; } /** * Set the value property: Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group. * * @param value the value value to set. * @return the VirtualNetworkGatewayListConnectionsResult object itself. */ public VirtualNetworkGatewayListConnectionsResult withValue( List<VirtualNetworkGatewayConnectionListEntityInner> value) { this.value = value; return this; } /** * Get the nextLink property: The URL to get the next set of results. * * @return the nextLink value. */ public String nextLink() { return this.nextLink; } /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() != null) { value().forEach(e -> e.validate()); } } }
[ "weidxu@microsoft.com" ]
weidxu@microsoft.com
39c04fb06c0598cae3d93dba3bc9c728094bdf28
b3d01b8de6c8e3348fa5fb2e81b2131bdeb42ff9
/kafka-eagle-common/src/main/java/org/smartloli/kafka/eagle/common/util/KConstants.java
b4062cd95b58d67e7a26f40e974589032e6db008
[ "Apache-2.0" ]
permissive
zhanglei/kafka-eagle
99298bddba4b61244a422b62539c7f9b444b2ef2
4eb64b39cd580a7df86f2c243c83de195af791f7
refs/heads/master
2020-04-03T21:04:15.707021
2018-10-28T15:23:36
2018-10-28T15:23:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,149
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.smartloli.kafka.eagle.common.util; /** * Define constants in the system. * * @author smartloli. * * Created by Jan 3, 2017 */ public class KConstants { /** D3 data plugin size. */ public interface D3 { public final static int SIZE = 40; } /** Kafka parameter setting. */ public interface Kafka { public final static String CONSUMER_OFFSET_TOPIC = "__consumer_offsets"; public final static String KAFKA_EAGLE_SYSTEM_GROUP = "kafka.eagle.system.group"; public final static String AUTO_COMMIT = "true"; public final static String AUTO_COMMIT_MS = "1000"; public final static String EARLIEST = "earliest"; public final static String JAVA_SECURITY = "java.security.auth.login.config"; public final static int TIME_OUT = 100; public final static long POSITION = 5000;// default 5000 public final static String PARTITION_CLASS = "partitioner.class"; public final static String KEY_SERIALIZER = "key.serializer"; public final static String VALUE_SERIALIZER = "value.serializer"; } /** Mail args setting. */ public interface Mail { public final static String[] ARGS = new String[] { "toAddress", "subject", "content" }; } /** Zookeeper session. */ public interface SessionAlias { public final static String CLUSTER_ALIAS = "clusterAlias"; } /** Login session. */ public interface Login { public final static String SESSION_USER = "LOGIN_USER_SESSION"; public final static String UNKNOW_USER = "__unknow__"; public final static String ERROR_LOGIN = "error_msg"; } /** Role Administrator. */ public interface Role { public final static String ADMIN = "admin"; public final static int ADMINISRATOR = 1; public final static int ANONYMOUS = 0; public final static String WHETHER_SYSTEM_ADMIN = "WHETHER_SYSTEM_ADMIN"; } /** Kafka jmx mbean. */ public interface MBean { public final static String COUNT = "Count"; public final static String EVENT_TYPE = "EventType"; public final static String FIFTEEN_MINUTE_RATE = "FifteenMinuteRate"; public final static String FIVE_MINUTE_RATE = "FiveMinuteRate"; public final static String MEAN_RATE = "MeanRate"; public final static String ONE_MINUTE_RATE = "OneMinuteRate"; public final static String RATE_UNIT = "RateUnit"; public final static String VALUE = "Value"; /** Messages in /sec. */ public final static String MESSAGES_IN = "msg"; /** Bytes in /sec. */ public final static String BYTES_IN = "ins"; /** Bytes out /sec. */ public final static String BYTES_OUT = "out"; /** Bytes rejected /sec. */ public final static String BYTES_REJECTED = "rejected"; /** Failed fetch request /sec. */ public final static String FAILED_FETCH_REQUEST = "fetch"; /** Failed produce request /sec. */ public final static String FAILED_PRODUCE_REQUEST = "produce"; /** MBean keys. */ public final static String MESSAGEIN = "message_in"; public final static String BYTEIN = "byte_in"; public final static String BYTEOUT = "byte_out"; public final static String FAILEDFETCHREQUEST = "failed_fetch_request"; public final static String FAILEDPRODUCEREQUEST = "failed_produce_request"; } public interface Linux { public static final String DEVICE = "sd"; public static final String LO = "lo"; public static final String CPU = "cpu"; public static final String IO = "io"; public static final String MemTotal = "MemTotal"; public static final String MemFree = "MemFree"; public static final String TCP = "Tcp"; public static final String CurrEstab = "CurrEstab"; public static final int SLEEP = 3000; } public interface ZK { public static final String ZK_SEND_PACKETS = "zk_packets_sent"; public static final String ZK_RECEIVEDPACKETS = "zk_packets_received"; public static final String ZK_NUM_ALIVECONNRCTIONS = "zk_num_alive_connections"; public static final String ZK_OUTSTANDING_REQUESTS = "zk_outstanding_requests"; } public interface TopicCache { public static final String NAME = "TopicCacheData"; } public interface ServerDevice { public static final int TIME_OUT = 3000; public static final int BUFFER_SIZE = 8049; } public interface CollectorType { public static final String ZK = "zookeeper"; public static final String KAFKA = "kafka"; } public interface Zookeeper { public static final String LEADER = "leader"; } }
[ "smartloli.org@gmail.com" ]
smartloli.org@gmail.com
4d795e8d4839f0798e76297cc69c5669d4eb0e81
df6d22421164340a3c29bb5bce015c9cefbda4f3
/src/java/org/deuce/transform/asm/storage/Names.java
3906d067ca5fb1954beab44d0081b1ee45bd31b8
[]
no_license
junwhan/open_nesting
07926e351634eadc4115c138728df470c096aee9
65df45f7d878b6fbb83e2b8437616f83a45452a4
refs/heads/master
2020-04-21T00:59:02.286663
2014-01-02T02:47:32
2014-01-02T02:47:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,626
java
package org.deuce.transform.asm.storage; public class Names { public static final String HyflowInterface = "edu/vt/rt/hyflow/core/dir/IHyFlow";; public static final String atomicAnnotation = "org/deuce/Atomic"; public static final String ControlflowInterface = "edu/vt/rt/hyflow/core/tm/control/ControlContext"; public static final String AbstractLoggableClass = "edu/vt/rt/hyflow/core/tm/undoLog/AbstractLoggableObject"; public static final String ProxyClassPrefix = "$HY$_Proxy_"; public static final String RMIException = "java/rmi/RemoteException"; public static final String SerialVersionUID = "serialVersionUID"; public static final String AlephDirectoryManager = "aleph/dir/DirectoryManager"; public static final String Exception = "java/lang/Exception"; public static final String UniCastObject = "java/rmi/server/UnicastRemoteObject"; public static final String Hyflow = "edu/vt/rt/hyflow/HyFlow"; public static final String ControlFlowDirectory = "edu/vt/rt/hyflow/core/dir/control/ControlFlowDirectory"; public static final String System = "java/lang/System"; public static final String RMISecurityManager = "java/rmi/RMISecurityManager"; public static final String HyflowNetwork = "edu/vt/rt/hyflow/util/network/Network"; public static final String ProxyInterfacePrefix = "$HY$_I"; public static final Object RemoteMethodDetails = "RemoteMethodDetails"; public static final Object AtomicMethodDetails = "AtomicMethodDetails"; public static final Object DonotTouchMethodDetails = "DonotTouchMethodDetails"; public static final Object MobileClassNames = "ClassDetail"; }
[ "jkim@gojkim" ]
jkim@gojkim
7eb8462abeeef4e03d1035324d759183ebdc4af7
7872a7570269708aa3d443561b9d064ca9e2a1d7
/web/src/main/java/hu/psprog/leaflet/web/filter/restrictions/exception/MissingClientIDHeaderException.java
47c1c7c39c764753e84e43b8bf05a6cfeabf5488
[]
no_license
petersmith-hun/leaflet-backend
2dee975662ee2b53e971661c773a3e322415b7f7
f6e0072520555a0c837468fd85e4434aa037487d
refs/heads/master
2023-07-19T08:29:44.899936
2023-07-09T15:19:09
2023-07-09T15:19:09
59,896,821
0
0
null
2023-07-09T15:19:11
2016-05-28T13:51:04
Java
UTF-8
Java
false
false
469
java
package hu.psprog.leaflet.web.filter.restrictions.exception; /** * Exception to be thrown when a client does not specify its client ID in its request. * * @author Peter Smith */ public class MissingClientIDHeaderException extends SecurityRestrictionViolationException { private static final String CLIENT_CANNOT_BE_IDENTIFIED = "Client cannot be identified."; public MissingClientIDHeaderException() { super(CLIENT_CANNOT_BE_IDENTIFIED); } }
[ "peter.kovacs0519@gmail.com" ]
peter.kovacs0519@gmail.com
53ffcbf26f716e33908133f52374c444f903a68e
f7ee4dd643bb90f34c5a1d83f79d79e2168868b8
/core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/record/ORecordSerializerRaw.java
5c136a707360968500d33c258ae1b14ae7daa86b
[ "Apache-2.0" ]
permissive
Spaceghost/OrientDB
0fa11226077c8b7f62303803f50ed7eac5734f2c
f1ec2f096f0939fc4a92c5d1e8b6a6f4a8e39811
refs/heads/master
2020-07-04T04:10:58.338784
2011-12-18T00:39:19
2011-12-18T00:39:19
3,003,611
1
0
null
null
null
null
UTF-8
Java
false
false
1,899
java
/* * Copyright 1999-2010 Luca Garulli (l.garulli--at--orientechnologies.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.orientechnologies.orient.core.serialization.serializer.record; import com.orientechnologies.common.log.OLogManager; import com.orientechnologies.orient.core.db.record.ODatabaseRecord; import com.orientechnologies.orient.core.exception.OSerializationException; import com.orientechnologies.orient.core.record.ORecordInternal; import com.orientechnologies.orient.core.record.impl.ORecordBytes; public class ORecordSerializerRaw implements ORecordSerializer { public ORecordInternal<?> fromStream(ODatabaseRecord<?> iDatabase, byte[] iSource) { return new ORecordBytes(iDatabase, iSource); } public ORecordInternal<?> fromStream(ODatabaseRecord<?> iDatabase, byte[] iSource, ORecordInternal<?> iRecord) { ORecordBytes record = (ORecordBytes) iRecord; record.fromStream(iSource); record.reset(iSource); record.setDatabase(iDatabase); return record; } public byte[] toStream(ODatabaseRecord<?> iDatabase, ORecordInternal<?> iSource) { try { return iSource.toStream(); } catch (Exception e) { OLogManager.instance().error(this, "Error on unmarshalling object in binary format: " + iSource.getIdentity(), e, OSerializationException.class); } return null; } }
[ "l.garulli@gmail.com" ]
l.garulli@gmail.com
58991f90214532d5b4b61c8fcf47a21d5c9d7263
66677a6beca556141d1cc38061743fd4bd257e1a
/Test/swiperefreshlayout/src/main/java/mobiesafe74/itheima/com/swiperefreshlayout/MainActivity.java
3e2224d8d8b3ecd6a2dabccdaadd905a36cee152
[]
no_license
yayangyang/MyTestDemo
dfe1c40f6e1a7a973943b4df6a0189570134635f
fe83b28015b3a131146e77f030e111756146dddc
refs/heads/master
2021-05-13T21:35:32.486604
2018-01-06T08:40:54
2018-01-06T08:40:54
116,466,658
1
0
null
null
null
null
UTF-8
Java
false
false
2,089
java
package mobiesafe74.itheima.com.swiperefreshlayout; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.app.AppCompatActivity; import android.widget.ArrayAdapter; import android.widget.ListView; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class MainActivity extends AppCompatActivity implements SwipeRefreshLayout.OnRefreshListener{ private SwipeRefreshLayout srl; private ListView listview; private List<String> mdata=new ArrayList<String>(); private ArrayAdapter<String> adapter; public Handler mhandler=new Handler(){ @Override public void handleMessage(Message msg) { if(msg.what==0x11){ mdata.addAll(Arrays.asList("www","www","www")); adapter.notifyDataSetChanged(); srl.setRefreshing(false);//刷新结束动画消失 } } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); initUI(); initData(); } private void initData() { for(int i=0;i<10;i++){ mdata.add("s"); } } private void initUI() { srl= (SwipeRefreshLayout) findViewById(R.id.srl); listview= (ListView) findViewById(R.id.listview); srl.setOnRefreshListener(this); srl.setColorSchemeColors( getResources().getColor(android.R.color.holo_blue_bright), getResources().getColor(android.R.color.holo_green_light), getResources().getColor(android.R.color.holo_orange_light), getResources().getColor(android.R.color.holo_red_light)); adapter=new ArrayAdapter<String>(this, android.R.layout.simple_expandable_list_item_1,mdata); listview.setAdapter(adapter); } @Override public void onRefresh() { mhandler.sendEmptyMessage(0x11); } }
[ "729197312@qq.com" ]
729197312@qq.com
a015bc12a460042550b12eb5c99e5052c5bf9f53
4ebc9c549a4f60c1e903924835984fdbd5d61b5f
/src/kodejava-master/core-sample/src/main/java/org/kodejava/example/jaxb/JAXBXmlToObject.java
de4c529ed8013aa57a78d528a92919d4cd9f5d01
[]
no_license
rnoxiv/DeepSpace42
e97476273bc48c6bdf5edc4c81fcc2f583cf25ac
42656edb988e610b8800ae9908d1f6e059eaf2f3
refs/heads/master
2021-01-10T05:16:53.039132
2015-12-20T13:44:25
2015-12-20T13:44:25
43,808,785
0
1
null
null
null
null
UTF-8
Java
false
false
650
java
package org.kodejava.example.jaxb; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; import java.io.File; public class JAXBXmlToObject { public static void main(String[] args) { try { File file = new File("Track.xml"); JAXBContext context = JAXBContext.newInstance(Track.class); Unmarshaller unmarshaller = context.createUnmarshaller(); Track track = (Track) unmarshaller.unmarshal(file); System.out.println("Track = " + track); } catch (JAXBException e) { e.printStackTrace(); } } }
[ "sabatier.david.93@gmail.com" ]
sabatier.david.93@gmail.com
4cef061055791868d4328f7ba79e4e471c902522
21817427bd42bee333e4b43adb406b648cb96e70
/S03-conceptos-basicos/CL16-RecyclerView/app/src/main/java/com/udemyandroid/recyclerview/dummy/DummyContent.java
79fcb312bed39a4a0893d83547968afdd8b7826a
[]
no_license
juansebastian2426/androidapp
59f8698e4906ad41478fee2613d7e9ad0798d019
79bb5b8797fef61631972cf3b822ae5e1e5f43e1
refs/heads/master
2021-05-18T13:37:15.369731
2020-03-23T12:29:53
2020-03-23T12:29:53
251,265,643
1
0
null
2020-03-30T09:57:56
2020-03-30T09:57:55
null
UTF-8
Java
false
false
1,950
java
package com.udemyandroid.recyclerview.dummy; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Helper class for providing sample content for user interfaces created by * Android template wizards. * <p> * TODO: Replace all uses of this class before publishing your app. */ public class DummyContent { /** * An array of sample (dummy) items. */ public static final List<DummyItem> ITEMS = new ArrayList<DummyItem>(); /** * A map of sample (dummy) items, by ID. */ public static final Map<String, DummyItem> ITEM_MAP = new HashMap<String, DummyItem>(); private static final int COUNT = 25; static { // Add some sample items. for (int i = 1; i <= COUNT; i++) { addItem(createDummyItem(i)); } } private static void addItem(DummyItem item) { ITEMS.add(item); ITEM_MAP.put(item.id, item); } private static DummyItem createDummyItem(int position) { return new DummyItem(String.valueOf(position), "Item " + position, makeDetails(position)); } private static String makeDetails(int position) { StringBuilder builder = new StringBuilder(); builder.append("Details about Item: ").append(position); for (int i = 0; i < position; i++) { builder.append("\nMore details information here."); } return builder.toString(); } /** * A dummy item representing a piece of content. */ public static class DummyItem { public final String id; public final String content; public final String details; public DummyItem(String id, String content, String details) { this.id = id; this.content = content; this.details = details; } @Override public String toString() { return content; } } }
[ "camposmiguel@gmail.com" ]
camposmiguel@gmail.com
fa80d0fc4a5420e4379fcf6cad66a649650cb96f
c6352f6a45bc3ddfc82ffbba063b0c8939613ac7
/src/client/net/sf/saxon/ce/expr/RootExpression.java
97dccc96a819bbd7498f42b692bccd79608b4d77
[]
no_license
bitfabrikken/Saxon-CE
33a4e2d05965d87a2bb9c0bca13b4a1ac3efcfce
b7a0ecf542f177c0669ac225741b4773d9066312
refs/heads/master
2023-04-13T05:08:22.237748
2021-04-09T18:04:32
2021-04-09T18:04:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,821
java
package client.net.sf.saxon.ce.expr; import client.net.sf.saxon.ce.om.DocumentInfo; import client.net.sf.saxon.ce.om.Item; import client.net.sf.saxon.ce.om.NodeInfo; import client.net.sf.saxon.ce.pattern.NodeKindTest; import client.net.sf.saxon.ce.trans.XPathException; import client.net.sf.saxon.ce.type.ItemType; import client.net.sf.saxon.ce.type.TypeHierarchy; /** * An expression whose value is always a set of nodes containing a single node, * the document root. This corresponds to the XPath Expression "/", including the implicit * "/" at the start of a path expression with a leading "/". */ public class RootExpression extends SingleNodeExpression { /** * Customize the error message on type checking */ protected String noContextMessage() { return "Leading '/' cannot select the root node of the tree containing the context item"; } /** * Is this expression the same as another expression? */ public boolean equals(Object other) { return (other instanceof RootExpression); } /** * Specify that the expression returns a singleton */ public final int computeCardinality() { return StaticProperty.EXACTLY_ONE; } /** * Determine the data type of the items returned by this expression * * @return Type.NODE * @param th the type hierarchy cache */ public ItemType getItemType(TypeHierarchy th) { return NodeKindTest.DOCUMENT; } /** * get HashCode for comparing two expressions */ public int hashCode() { return "RootExpression".hashCode(); } /** * Return the first element selected by this Expression * @param context The evaluation context * @return the NodeInfo of the first selected element, or null if no element * is selected */ public NodeInfo getNode(XPathContext context) throws XPathException { Item current = context.getContextItem(); if (current==null) { dynamicError("Finding root of tree: the context item is undefined", "XPDY0002", context); } if (current instanceof NodeInfo) { DocumentInfo doc = ((NodeInfo)current).getDocumentRoot(); if (doc==null) { dynamicError("The root of the tree containing the context item is not a document node", "XPDY0050", context); } return doc; } typeError("Finding root of tree: the context item is not a node", "XPTY0020", context); // dummy return; we never get here return null; } /** * Determine which aspects of the context the expression depends on. The result is * a bitwise-or'ed value composed from constants such as StaticProperty.VARIABLES and * StaticProperty.CURRENT_NODE */ public int getIntrinsicDependencies() { return StaticProperty.DEPENDS_ON_CONTEXT_DOCUMENT; } /** * Copy an expression. This makes a deep copy. * @return the copy of the original expression */ private Expression copy() { return new RootExpression(); } /** * The toString() method for an expression attempts to give a representation of the expression * in an XPath-like form, but there is no guarantee that the syntax will actually be true XPath. * In the case of XSLT instructions, the toString() method gives an abstracted view of the syntax */ public String toString() { return "(/)"; } } // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. // This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the Mozilla Public License, v. 2.0.
[ "oneil@saxonica.com" ]
oneil@saxonica.com
844aec99b484c8f3c7f846ca8e189371bab1c8fb
704507754a9e7f300dfab163e97cd976b677661b
/src/org/omg/PortableInterceptor/IORInterceptor_3_0Holder.java
f77a3e4efaeb9f1d2a1078a3d7e710e9eb9d2664
[]
no_license
ossaw/jdk
60e7ca5e9f64541d07933af25c332e806e914d2a
b9d61d6ade341b4340afb535b499c09a8be0cfc8
refs/heads/master
2020-03-27T02:23:14.010857
2019-08-07T06:32:34
2019-08-07T06:32:34
145,785,700
0
0
null
null
null
null
UTF-8
Java
false
false
1,126
java
package org.omg.PortableInterceptor; /** * org/omg/PortableInterceptor/IORInterceptor_3_0Holder.java . Generated by the * IDL-to-Java compiler (portable), version "3.2" from * c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u144/9417/corba/src/share/ * classes/org/omg/PortableInterceptor/Interceptors.idl Friday, July 21, 2017 * 9:58:52 PM PDT */ public final class IORInterceptor_3_0Holder implements org.omg.CORBA.portable.Streamable { public org.omg.PortableInterceptor.IORInterceptor_3_0 value = null; public IORInterceptor_3_0Holder() {} public IORInterceptor_3_0Holder(org.omg.PortableInterceptor.IORInterceptor_3_0 initialValue) { value = initialValue; } public void _read(org.omg.CORBA.portable.InputStream i) { value = org.omg.PortableInterceptor.IORInterceptor_3_0Helper.read(i); } public void _write(org.omg.CORBA.portable.OutputStream o) { org.omg.PortableInterceptor.IORInterceptor_3_0Helper.write(o, value); } public org.omg.CORBA.TypeCode _type() { return org.omg.PortableInterceptor.IORInterceptor_3_0Helper.type(); } }
[ "jianghao7625@gmail.com" ]
jianghao7625@gmail.com
9f39b4e95e24a0c5f68f44db80bebd5b8df44b1d
cbdd81e6b9cf00859ce7169df36cf566417e4c8b
/1.JavaSyntax/src/com/javarush/task/task04/task0414/Solution.java
2ac85545f6660c84706bbc4f804f8e287c32fdca
[]
no_license
id2k1149/JavaRushTasks
3f13cd5d37977e38e8933e581f17fd48597f90d8
450a432649aa20608e6e9a46ada35123056480cf
refs/heads/master
2023-03-31T21:03:06.944109
2021-03-19T00:58:45
2021-03-19T00:58:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
684
java
package com.javarush.task.task04.task0414; import java.io.BufferedReader; import java.io.InputStreamReader; /* Количество дней в году */ public class Solution { public static void main(String[] args) throws Exception { //напишите тут ваш код BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int year = Integer.parseInt(reader.readLine()); int x; if (year % 400 == 0) x = 366; else if (year % 100 == 0) x = 365; else if (year % 4 == 0) x = 366; else x = 365; System.out.println("количество дней в году: " + x); } }
[ "id2k1149@gmail.com" ]
id2k1149@gmail.com
de48cdceee0668d28fdffaeaacef7933180f6603
a0e4f155a7b594f78a56958bca2cadedced8ffcd
/sdk/src/main/java/org/zstack/sdk/CreateRootVolumeTemplateFromRootVolumeResult.java
959aec508dec6afababc4917742a976788a2b875
[ "Apache-2.0" ]
permissive
zhao-qc/zstack
e67533eabbbabd5ae9118d256f560107f9331be0
b38cd2324e272d736f291c836f01966f412653fa
refs/heads/master
2020-08-14T15:03:52.102504
2019-10-14T03:51:12
2019-10-14T03:51:12
215,187,833
3
0
Apache-2.0
2019-10-15T02:27:17
2019-10-15T02:27:16
null
UTF-8
Java
false
false
343
java
package org.zstack.sdk; import org.zstack.sdk.ImageInventory; public class CreateRootVolumeTemplateFromRootVolumeResult { public ImageInventory inventory; public void setInventory(ImageInventory inventory) { this.inventory = inventory; } public ImageInventory getInventory() { return this.inventory; } }
[ "xin.zhang@mevoco.com" ]
xin.zhang@mevoco.com
8793f1c525efb60893f82af2bda1ee6a8473d09d
bab79b7e789a211821bdd2efcdaac978cc682b66
/src/main/java/com/helger/peppol/as2client/AS2ClientHelper.java
e13b1beef25602cc2b652634e8a28be7d947fe39
[ "Apache-2.0" ]
permissive
stefanogalati/as2-peppol-client
3e070ff4c701b4c0f0937dade9cb840decfec7dd
f61570ed79c3c9fb97532164902bae50507a36e9
refs/heads/master
2021-01-15T23:12:44.064846
2016-01-27T15:29:18
2016-01-27T15:29:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,943
java
/** * Copyright (C) 2014-2016 Philip Helger (www.helger.com) * philip[at]helger[dot]com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.helger.peppol.as2client; import java.security.cert.CertificateEncodingException; import java.security.cert.X509Certificate; import javax.annotation.Nonnull; import javax.annotation.concurrent.Immutable; import org.bouncycastle.asn1.x500.RDN; import org.bouncycastle.asn1.x500.X500Name; import org.bouncycastle.asn1.x500.style.BCStyle; import org.bouncycastle.asn1.x500.style.IETFUtils; import org.bouncycastle.cert.jcajce.JcaX509CertificateHolder; import com.helger.commons.ValueEnforcer; /** * Common functionality for AS2 clients * * @author Philip Helger */ @Immutable public final class AS2ClientHelper { private AS2ClientHelper () {} /** * @param aCert * Source certificate. May not be <code>null</code>. * @return The common name of the certificate subject * @throws CertificateEncodingException * In case of an internal error */ @Nonnull public static String getSubjectCommonName (@Nonnull final X509Certificate aCert) throws CertificateEncodingException { ValueEnforcer.notNull (aCert, "Certificate"); final X500Name x500name = new JcaX509CertificateHolder (aCert).getSubject (); final RDN cn = x500name.getRDNs (BCStyle.CN)[0]; return IETFUtils.valueToString (cn.getFirst ().getValue ()); } }
[ "philip@helger.com" ]
philip@helger.com
219361c2a7a040d6735a8d51583d27444db9f548
e384fb642cad55babd0afa372364db99c9cab1e3
/app/src/main/java/com/svafvel/software/production/moviecataloguelocalstorage/model/FavoriteViewModel.java
09d4cd03b206c517df18fdc4bcf21ebd0f61848c
[]
no_license
roindeyal/Aplikas-Movie-Caralogue
4a3775564605b02b563438d03e76afacfaef1e81
49f3d50281f44ad52f61ab380ef3dd327b23d82a
refs/heads/master
2021-01-03T22:40:52.216580
2020-02-13T13:27:30
2020-02-13T13:27:30
240,265,331
0
0
null
null
null
null
UTF-8
Java
false
false
4,976
java
package com.svafvel.software.production.moviecataloguelocalstorage.model; import android.app.Activity; import android.content.Context; import android.util.Log; import androidx.lifecycle.LiveData; import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.ViewModel; import com.loopj.android.http.AsyncHttpClient; import com.loopj.android.http.AsyncHttpResponseHandler; import com.svafvel.software.production.moviecataloguelocalstorage.R; import com.svafvel.software.production.moviecataloguelocalstorage.localstorage.filmfavorite.FilmItemsFavorite; import org.json.JSONArray; import org.json.JSONObject; import java.util.ArrayList; import cz.msebera.android.httpclient.Header; public class FavoriteViewModel extends ViewModel { private static final String API_KEY = "b1ca6453a5660511fc0d8eb70aa35969"; private MutableLiveData<ArrayList<FilmItemsFavorite>> listFilmsFavorite = new MutableLiveData<>(); public void setFilm(final String film, int id, final Activity activity){ // Request API AsyncHttpClient client = new AsyncHttpClient(); final ArrayList<FilmItemsFavorite> listItemsFavorite = new ArrayList<>(); String url = "http://api.themoviedb.org/3/" + film + "/" + id + "?api_key=" + API_KEY + "&language=" + activity.getResources().getString(R.string.localization); client.get(url, new AsyncHttpResponseHandler() { @Override public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) { try { String result = new String(responseBody); JSONObject responseObject = new JSONObject(result); if(film.equalsIgnoreCase("movie")){ FilmItemsFavorite filmItemsFavorite = new FilmItemsFavorite(); filmItemsFavorite.setId(responseObject.getInt("id")); filmItemsFavorite.setImg(responseObject.getString("poster_path")); filmItemsFavorite.setBgImg(responseObject.getString("backdrop_path")); filmItemsFavorite.setTitle(responseObject.getString("title")); filmItemsFavorite.setRating(responseObject.getString("vote_average")); filmItemsFavorite.setPopularity(responseObject.getString("popularity")); filmItemsFavorite.setVoteCount(responseObject.getString("vote_count")); filmItemsFavorite.setAge(responseObject.getString("adult")); filmItemsFavorite.setLanguage(responseObject.getString("original_language")); filmItemsFavorite.setDescription(responseObject.getString("overview")); filmItemsFavorite.setReleaseDate(responseObject.getString("release_date")); filmItemsFavorite.setType("movie"); listItemsFavorite.add(filmItemsFavorite); }else if(film.equalsIgnoreCase("tv")){ FilmItemsFavorite filmItemsFavorite = new FilmItemsFavorite(); filmItemsFavorite.setId(responseObject.getInt("id")); filmItemsFavorite.setImg(responseObject.getString("poster_path")); filmItemsFavorite.setBgImg(responseObject.getString("backdrop_path")); filmItemsFavorite.setTitle(responseObject.getString("name")); filmItemsFavorite.setRating(responseObject.getString("vote_average")); filmItemsFavorite.setPopularity(responseObject.getString("popularity")); filmItemsFavorite.setVoteCount(responseObject.getString("vote_count")); filmItemsFavorite.setAge(activity.getResources().getString(R.string.all_ages)); filmItemsFavorite.setLanguage(responseObject.getString("original_language")); filmItemsFavorite.setDescription(responseObject.getString("overview")); filmItemsFavorite.setReleaseDate(responseObject.getString("first_air_date")); filmItemsFavorite.setType("tv"); listItemsFavorite.add(filmItemsFavorite); } listFilmsFavorite.postValue(listItemsFavorite); }catch (Exception e){ Log.d("Exception ", e.getMessage()); } } @Override public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) { Log.d("onFailure", error.getMessage()); } }); } public LiveData<ArrayList<FilmItemsFavorite>> getFilmsFavorite(){ return listFilmsFavorite; } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
f047308fd6078420ec4a6787ba5b05065a894bec
1a4770c215544028bad90c8f673ba3d9e24f03ad
/second/quark/src/main/java/kotlin/jvm/a/e.java
673bf9d6ebba45942a9e6facd065836edd650907
[]
no_license
zhang1998/browser
e480fbd6a43e0a4886fc83ea402f8fbe5f7c7fce
4eee43a9d36ebb4573537eddb27061c67d84c7ba
refs/heads/master
2021-05-03T06:32:24.361277
2018-02-10T10:35:36
2018-02-10T10:35:36
120,590,649
8
10
null
null
null
null
UTF-8
Java
false
false
1,813
java
package kotlin.jvm.a; import java.lang.reflect.Array; import java.util.Arrays; import java.util.Collection; import java.util.Iterator; /* compiled from: ProGuard */ public final class e { private static final Object[] a = new Object[0]; public static <T, E> T[] a(Collection<E> collection, T[] tArr) { int size = collection.size(); if (tArr.length >= size) { T[] tArr2 = tArr; } else { Object[] objArr = (Object[]) Array.newInstance(tArr.getClass().getComponentType(), size); } Iterator it = collection.iterator(); int i = 0; while (i < tArr2.length) { if (it.hasNext()) { tArr2[i] = it.next(); i++; } else if (tArr != tArr2) { return Arrays.copyOf(tArr2, i); } else { tArr2[i] = null; return tArr2; } } if (!it.hasNext()) { return tArr2; } T[] tArr3 = tArr2; size = tArr2.length; while (it.hasNext()) { T[] copyOf; int length = tArr3.length; if (size == length) { int i2 = ((length / 2) + 1) * 3; if (i2 <= length) { if (length == Integer.MAX_VALUE) { throw new OutOfMemoryError("Required array size too large"); } i2 = Integer.MAX_VALUE; } copyOf = Arrays.copyOf(tArr3, i2); } else { copyOf = tArr3; } i = size + 1; copyOf[size] = it.next(); size = i; tArr3 = copyOf; } return size == tArr3.length ? tArr3 : Arrays.copyOf(tArr3, size); } }
[ "2764207312@qq.com" ]
2764207312@qq.com
c7f88ea19c3055f59b170ceff7afd8cab21d6cad
c0fe21b86f141256c85ab82c6ff3acc56b73d3db
/starshield/src/main/java/com/jdcloud/sdk/service/starshield/model/ChangeMirageSettingResult.java
935cb81d90bd0589daa7e9a8e0372fd4a371b8c2
[ "Apache-2.0" ]
permissive
jdcloud-api/jdcloud-sdk-java
3fec9cf552693520f07b43a1e445954de60e34a0
bcebe28306c4ccc5b2b793e1a5848b0aac21b910
refs/heads/master
2023-07-25T07:03:36.682248
2023-07-25T06:54:39
2023-07-25T06:54:39
126,275,669
47
61
Apache-2.0
2023-09-07T08:41:24
2018-03-22T03:41:41
Java
UTF-8
Java
false
false
1,782
java
/* * Copyright 2018 JDCLOUD.COM * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:#www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Zone-Settings * A Zone setting changes how the Zone works in relation to caching, security, or other features of JDC StarShield * * OpenAPI spec version: v1 * Contact: * * NOTE: This class is auto generated by the jdcloud code generator program. */ package com.jdcloud.sdk.service.starshield.model; import com.jdcloud.sdk.service.starshield.model.MirageImageOptimization; import com.jdcloud.sdk.service.JdcloudResult; /** * 自动优化移动设备上网站访问者的图像加载 */ public class ChangeMirageSettingResult extends JdcloudResult implements java.io.Serializable { private static final long serialVersionUID = 1L; /** * data */ private MirageImageOptimization data; /** * get data * * @return */ public MirageImageOptimization getData() { return data; } /** * set data * * @param data */ public void setData(MirageImageOptimization data) { this.data = data; } /** * set data * * @param data */ public ChangeMirageSettingResult data(MirageImageOptimization data) { this.data = data; return this; } }
[ "jdcloud-api@jd.com" ]
jdcloud-api@jd.com
270f342ca50c17d328c967cfd674bf45d05c2f7b
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipsejdt_cluster/72009/tar_0.java
67da9f444bee17f1d8d8da0484a2e8b2f3f06888
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,622
java
/******************************************************************************* * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v0.5 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v05.html * * Contributors: * IBM Corporation - initial API and implementation ******************************************************************************/ package org.eclipse.jdt.internal.core.search.indexing; import java.io.IOException; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IPath; import org.eclipse.jdt.internal.core.index.IIndex; import org.eclipse.jdt.internal.core.index.impl.IFileDocument; class AddCompilationUnitToIndex extends AddFileToIndex { char[] contents; public AddCompilationUnitToIndex(IFile resource, IPath indexedContainer, IndexManager manager) { super(resource, indexedContainer, manager); } protected boolean indexDocument(IIndex index) throws IOException { if (!initializeContents()) return false; index.add(new IFileDocument(resource, this.contents), new SourceIndexer(resource)); return true; } public boolean initializeContents() { if (this.contents == null) { try { IPath location = resource.getLocation(); if (location != null) this.contents = org.eclipse.jdt.internal.compiler.util.Util.getFileCharContent(location.toFile(), null); } catch (IOException e) { } } return this.contents != null; } }
[ "375833274@qq.com" ]
375833274@qq.com
739d9013dc3aee778d4ecd66b8e344214b2063f6
dd3eec242deb434f76d26b4dc0e3c9509c951ce7
/2018-work/jiuy-biz/jiuy-biz-core/src/main/java/com/qianmi/open/api/qmcs/message/MessageFields.java
bb31eb36439cfaff8187ea0baefb6a1cbcf6b669
[]
no_license
github4n/other_workplace
1091e6368abc51153b4c7ebbb3742c35fb6a0f4a
7c07e0d078518bb70399e50b35e9f9ca859ba2df
refs/heads/master
2020-05-31T10:12:37.160922
2019-05-25T15:48:54
2019-05-25T15:48:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
477
java
package com.qianmi.open.api.qmcs.message; /** * 消息字段 */ public abstract class MessageFields { public final static String TYPE = "type"; public final static String MESSAGE_ID = "id"; public final static String TOPIC = "topic"; public final static String CONTENT = "content"; public final static String PUBLISH_TIME = "pub_time"; public final static String PUB_APP_KEY = "pub_app_key"; public final static String USER_ID = "user_id"; }
[ "nessary@foxmail.com" ]
nessary@foxmail.com
a7be6f0f75dcc1e6216099022040a85fc279d957
14001957f8ff9867c24b24c8838688686955c988
/src/main/java/io/openslice/tmf/stm653/model/ServiceTestSpecificationCreate.java
c6472db6ab8c5dbfc5c476ad0d6e06b7316443c4
[ "Apache-2.0" ]
permissive
openslice/io.openslice.tmf.api
a88d97590a714cb0080f6da4c64c59991b2b7543
65e7fe8d4ab68313d4413ad4d7be1a5cc0408435
refs/heads/develop
2023-09-01T23:14:22.653219
2023-08-31T15:11:45
2023-08-31T15:11:45
210,859,232
9
2
Apache-2.0
2023-08-23T11:41:15
2019-09-25T14:00:53
Java
UTF-8
Java
false
false
6,774
java
/*- * ========================LICENSE_START================================= * io.openslice.tmf.api * %% * Copyright (C) 2019 - 2021 openslice.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. * =========================LICENSE_END================================== */ package io.openslice.tmf.stm653.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import org.springframework.validation.annotation.Validated; import io.openslice.tmf.common.model.TimePeriod; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; /** * The service test specification describes the service test in terms of parameters to be configured and measures to be taken. Skipped properties: id,href */ @Schema(description = "The service test specification describes the service test in terms of parameters to be configured and measures to be taken. Skipped properties: id,href") @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-08T11:50:07.226173200+02:00[Europe/Athens]") public class ServiceTestSpecificationCreate extends ServiceTestSpecificationUpdate { @JsonProperty("validFor") private TimePeriod validFor = null; public ServiceTestSpecificationCreate validFor(TimePeriod validFor) { this.validFor = validFor; return this; } /** * Get validFor * @return validFor **/ @Schema(description = "") @Valid public TimePeriod getValidFor() { return validFor; } public void setValidFor(TimePeriod validFor) { this.validFor = validFor; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ServiceTestSpecificationCreate serviceTestSpecificationCreate = (ServiceTestSpecificationCreate) o; return Objects.equals(this.description, serviceTestSpecificationCreate.description) && Objects.equals(this.isBundle, serviceTestSpecificationCreate.isBundle) && Objects.equals(this.lastUpdate, serviceTestSpecificationCreate.lastUpdate) && Objects.equals(this.lifecycleStatus, serviceTestSpecificationCreate.lifecycleStatus) && Objects.equals(this.name, serviceTestSpecificationCreate.name) && Objects.equals(this.version, serviceTestSpecificationCreate.version) && Objects.equals(this.attachment, serviceTestSpecificationCreate.attachment) && Objects.equals(this.constraint, serviceTestSpecificationCreate.constraint) && Objects.equals(this.entitySpecRelationship, serviceTestSpecificationCreate.entitySpecRelationship) && Objects.equals(this.relatedParty, serviceTestSpecificationCreate.relatedParty) && Objects.equals(this.relatedServiceSpecification, serviceTestSpecificationCreate.relatedServiceSpecification) && Objects.equals(this.serviceTestSpecRelationship, serviceTestSpecificationCreate.serviceTestSpecRelationship) && Objects.equals(this.specCharacteristic, serviceTestSpecificationCreate.specCharacteristic) && Objects.equals(this.targetEntitySchema, serviceTestSpecificationCreate.targetEntitySchema) && Objects.equals(this.testMeasureDefinition, serviceTestSpecificationCreate.testMeasureDefinition) && Objects.equals(this.validFor, serviceTestSpecificationCreate.validFor) && Objects.equals(this.baseType, serviceTestSpecificationCreate.baseType) && Objects.equals(this.schemaLocation, serviceTestSpecificationCreate.schemaLocation) && Objects.equals(this.type, serviceTestSpecificationCreate.type); } @Override public int hashCode() { return Objects.hash(description, isBundle, lastUpdate, lifecycleStatus, name, version, attachment, constraint, entitySpecRelationship, relatedParty, relatedServiceSpecification, serviceTestSpecRelationship, specCharacteristic, targetEntitySchema, testMeasureDefinition, validFor, baseType, schemaLocation, type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ServiceTestSpecificationCreate {\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" isBundle: ").append(toIndentedString(isBundle)).append("\n"); sb.append(" lastUpdate: ").append(toIndentedString(lastUpdate)).append("\n"); sb.append(" lifecycleStatus: ").append(toIndentedString(lifecycleStatus)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" attachment: ").append(toIndentedString(attachment)).append("\n"); sb.append(" constraint: ").append(toIndentedString(constraint)).append("\n"); sb.append(" entitySpecRelationship: ").append(toIndentedString(entitySpecRelationship)).append("\n"); sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); sb.append(" relatedServiceSpecification: ").append(toIndentedString(relatedServiceSpecification)).append("\n"); sb.append(" serviceTestSpecRelationship: ").append(toIndentedString(serviceTestSpecRelationship)).append("\n"); sb.append(" specCharacteristic: ").append(toIndentedString(specCharacteristic)).append("\n"); sb.append(" targetEntitySchema: ").append(toIndentedString(targetEntitySchema)).append("\n"); sb.append(" testMeasureDefinition: ").append(toIndentedString(testMeasureDefinition)).append("\n"); sb.append(" validFor: ").append(toIndentedString(validFor)).append("\n"); sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "tranoris@gmail.com" ]
tranoris@gmail.com
b9102196487a917e85d3602f9f894867c0726550
baf90a659e8fd4cd7ed9f5c41881754d286ddbbd
/src/classifiers/classifierTests/InvoicingClassifierTest.java
ebc55a6bacaee4123f2e8cbeddac849304afd52e
[]
no_license
Linusdalin/AnalysisModule
3c837af034862e59ae4694b1e62aa1aeaddadf71
4fe0e966fb0634b83722309d321472a5fb0d0668
refs/heads/master
2021-01-10T16:57:34.162334
2015-10-12T19:46:06
2015-10-12T19:46:06
44,130,199
0
0
null
null
null
null
UTF-8
Java
false
false
5,334
java
package classifiers.classifierTests; import classifiers.swedishClassifiers.DefinitionUsageClassifierSV; import classifiers.swedishClassifiers.InvoicingClassifierSV; import classifiers.swedishClassifiers.NumberClassifierSV; import featureTypes.FeatureTypeTree; import language.English; import language.Swedish; import openNLP.NLParser; import org.junit.BeforeClass; import org.junit.Test; import static org.junit.Assert.assertTrue; /*************************************************************************'' * * * */ public class InvoicingClassifierTest extends AnalysisTest { private static NLParser englishParser; private static NLParser swedishParser; @BeforeClass public static void preAmble(){ englishParser = new NLParser(new English(), "TextAnalysis/models"); swedishParser = new NLParser(new Swedish(), "TextAnalysis/models"); } /*********************************************************** * * Testing Classification by examples for tag Invoicing * Document: " Avtal avseende IT-drift" * Language: "SV" * */ @Test public void testAvtalavseendeITdriftExamples(){ try { new ClassificationTester("13.4.4 faktura ska vara specificerad så "+ "att arten och omfattningen av utförda tj"+ "änster kan kontrolleras enligt villkoren"+ " i Avtalet. Faktureringsavgifter eller p"+ "åminnelseavgifter ska inte utgå, vare si"+ "g för elektroniska eller pappersfakturor"+ ".") .withParser(swedishParser) .withHeadline("13.4.4 Faktura ska vara specificerad så att arten och omfattningen av utförda tjänster kan kontrolleras enligt villkoren i Avtalet. Faktureringsavgifter eller påminnelseavgifter ska inte utgå, vare sig för elektroniska eller pappersfakturor.") .withProject(mockProject, mockDocument) .withClassifier(new NumberClassifierSV()) .withClassifier(new DefinitionUsageClassifierSV()) .withClassifier(new InvoicingClassifierSV()) .expectingClassification(new ClassificationAssertion(FeatureTypeTree.INVOICING, 1) .withTag("") ) .test(); new ClassificationTester("13.4.6 Leverantören har inte rätt att fa"+ "kturera ersättning som är äldre än sex ("+ "6) kalendermånader, eller för arbete som"+ " utförts mer än sex (6) kalendermånader "+ "före fakturans utställande, såvida detta"+ " inte i förväg skriftligen överenskommit"+ "s mellan Parterna.") .withParser(swedishParser) .withHeadline("13.4.6 Leverantören har inte rätt att fakturera ersättning som är äldre än sex (6) kalendermånader, eller för arbete som utförts mer än sex (6) kalendermånader före fakturans utställande, såvida detta inte i förväg skriftligen överenskommits mellan Parterna.") .withProject(mockProject, mockDocument) .withClassifier(new NumberClassifierSV()) .withClassifier(new DefinitionUsageClassifierSV()) .withClassifier(new InvoicingClassifierSV()) .expectingClassification(new ClassificationAssertion(FeatureTypeTree.INVOICING, 1) .withTag("") ) .test(); new ClassificationTester("13.4.2 Fakturering ska ske månadsvis i e"+ "fterskott och efter det att prestationer"+ " som omfattas av fakturan utförts respek"+ "tive fullgjorts.") .withParser(swedishParser) .withHeadline("13.4.2 Fakturering ska ske månadsvis i efterskott och efter det att prestationer som omfattas av fakturan utförts respektive fullgjorts.") .withProject(mockProject, mockDocument) .withClassifier(new NumberClassifierSV()) .withClassifier(new DefinitionUsageClassifierSV()) .withClassifier(new InvoicingClassifierSV()) .expectingClassification(new ClassificationAssertion(FeatureTypeTree.INVOICING, 1) .withTag("") ) .test(); } catch (Exception e) { e.printStackTrace(); assertTrue(false); } } }
[ "linus.dalin@itclarifies.com" ]
linus.dalin@itclarifies.com
45e306406914a988ed2ace030e79e5084c4b296a
8e374ebe2e88f8701d18602a612ade06c4245280
/java02/src/day19/Test05_Command.java
9aec10a10fcbaa8bb0e16e993439c12b346ecbbe
[]
no_license
jakeshin89/bit_java
4c4d5b08214e39f41eef5fccfa55f3a1ab89e7db
9fe56c84a55af914c51e4c682101d610c031257e
refs/heads/master
2020-07-03T09:52:32.541332
2019-08-13T00:40:42
2019-08-13T00:40:42
201,861,661
0
0
null
null
null
null
UTF-8
Java
false
false
1,908
java
package day19; import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Test05_Command { public static void main(String[] args) { // is a 관계 활용 //Command delete = new DeleteCommand(); //Command update = new UpdateCommand(); //Command select = new SelectCommand(); //Command insert = new InsertCommand(); // 변수는 중복되면 안되니.. 마치 Map구조의 Key 느낌이 난다 //String cmd = args[0]; //delete, update, select, insert 중 하나가 들어온다 생각하자 //Map 구조로 설계하자 Map<String, Command> map = new HashMap<String, Command>(); map.put("delete", new DeleteCommand()); //이거는 콜렉션 위에 Command delete = new DeleteCommand(); 지워버리고 왼쪽처럼 쓰면 돼 //put 하면, Key와 Value가 서로 binding되어서 저장됨. map.put("update", new UpdateCommand()); map.put("select", new SelectCommand()); map.put("insert", new InsertCommand()); map.put("new", new Command() { //익명성? @Override public void exec() { System.out.println("기능 추가"); } }); //위 data들을 Map구조가 관리 Scanner sc = new Scanner(System.in); System.out.println("insert, update, delete, select 중 하나만 입력하세요."); String cmd = sc.nextLine(); Command command = map.get(cmd); // cmd에 넣은 key값에 해당하는 value 값을 불러오는 메소드 if(command != null) command.exec(); /* while(true) { Scanner sc = new Scanner(System.in); System.out.println("insert, update, delete, select 중 하나만 입력하세요."); String cmd = sc.nextLine(); if(map.containsKey(cmd)) { System.out.println(cmd+"를 수행합니다."); break; } else { System.out.println("잘 못 입력했습니다."); } } */ } }
[ "user@DESKTOP-V882PTR" ]
user@DESKTOP-V882PTR
edbe320e65623fe991098fbb4eccf46d7f335db7
55ebdc98f90bba37dd34f5020e9b2f55ab4f747b
/target/generated-sources/xjc/com/sybase365/mobiliser/web/util/notificationmgr/jaxb/NotificationMessage.java
ad0a74cddb012af6dd0a299c6e4777546b4d7ca7
[]
no_license
chandusekhar/btpn_portal
aa482eef5a760a4a3a79dd044258014c145183f1
809b857bfe01cbcf2b966e85ebb8fc3bde02680e
refs/heads/master
2020-09-27T08:29:09.299858
2014-12-07T10:44:58
2014-12-07T10:45:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,589
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4 // 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.12.07 at 05:37:34 PM ICT // package com.sybase365.mobiliser.web.util.notificationmgr.jaxb; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * * * A message template along with the IDs of the attachments to the message. * * * * <p>Java class for NotificationMessage complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="NotificationMessage"> * &lt;complexContent> * &lt;extension base="{}BaseMessage"> * &lt;sequence> * &lt;element name="attachments" type="{}MessageAttachments" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "NotificationMessage", propOrder = { "attachments" }) public class NotificationMessage extends BaseMessage implements Serializable { protected List<MessageAttachments> attachments; /** * Gets the value of the attachments property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the attachments property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAttachments().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link MessageAttachments } * * */ public List<MessageAttachments> getAttachments() { if (attachments == null) { attachments = new ArrayList<MessageAttachments>(); } return this.attachments; } public boolean isSetAttachments() { return ((this.attachments!= null)&&(!this.attachments.isEmpty())); } public void unsetAttachments() { this.attachments = null; } }
[ "antrouzz@gmail.com" ]
antrouzz@gmail.com
846dc0e3708de851b8c121d841183e9b60d88842
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14599-11-19-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/jar/internal/handler/JarExtensionJobFinishingListener_ESTest.java
91e358dfe60c8dfcd42efa8c0ca99c6bf72f22c1
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
611
java
/* * This file was automatically generated by EvoSuite * Sat Apr 04 08:08:54 UTC 2020 */ package org.xwiki.extension.jar.internal.handler; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class JarExtensionJobFinishingListener_ESTest extends JarExtensionJobFinishingListener_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
5821eeb0be134a5f9ed38541485f33afdd7524a1
ac37264b59df810b6edd2d765093116315784d2a
/mvdXMLCheckerCore1dot2/src/main/java/generated/buildingsmart_tech/mvd_xml_1dot2/IfcStructuralResultGroup.java
0f7a37deb6bab8b51cb533d6bb69dab09e21e935
[]
no_license
jyrkioraskari/mvdXMLChecker
660d2014c833cea8b7c8ca9061b79d9515d6d265
fa417fdd92e39c00b78f60dc2d428157ede3c142
refs/heads/master
2023-07-22T18:43:20.170503
2022-06-07T23:37:08
2022-06-07T23:37:08
241,197,708
6
3
null
2023-07-07T21:54:04
2020-02-17T20:08:28
Java
UTF-8
Java
false
false
3,881
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2020.05.27 at 01:59:57 PM CEST // package generated.buildingsmart_tech.mvd_xml_1dot2; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for IfcStructuralResultGroup complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="IfcStructuralResultGroup"> * &lt;complexContent> * &lt;extension base="{https://standards.buildingsmart.org/IFC/RELEASE/IFC4/Add2TC1}IfcGroup"> * &lt;sequence> * &lt;element name="ResultForLoadGroup" type="{https://standards.buildingsmart.org/IFC/RELEASE/IFC4/Add2TC1}IfcStructuralLoadGroup" minOccurs="0"/> * &lt;/sequence> * &lt;attribute name="TheoryType" type="{https://standards.buildingsmart.org/IFC/RELEASE/IFC4/Add2TC1}IfcAnalysisTheoryTypeEnum" /> * &lt;attribute name="IsLinear" type="{https://standards.buildingsmart.org/IFC/RELEASE/IFC4/Add2TC1}IfcBoolean" /> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "IfcStructuralResultGroup", propOrder = { "resultForLoadGroup" }) public class IfcStructuralResultGroup extends IfcGroup { @XmlElementRef(name = "ResultForLoadGroup", namespace = "https://standards.buildingsmart.org/IFC/RELEASE/IFC4/Add2TC1", type = JAXBElement.class, required = false) protected JAXBElement<IfcStructuralLoadGroup> resultForLoadGroup; @XmlAttribute(name = "TheoryType") protected IfcAnalysisTheoryTypeEnum theoryType; @XmlAttribute(name = "IsLinear") protected Boolean isLinear; /** * Gets the value of the resultForLoadGroup property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link IfcStructuralLoadGroup }{@code >} * */ public JAXBElement<IfcStructuralLoadGroup> getResultForLoadGroup() { return resultForLoadGroup; } /** * Sets the value of the resultForLoadGroup property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link IfcStructuralLoadGroup }{@code >} * */ public void setResultForLoadGroup(JAXBElement<IfcStructuralLoadGroup> value) { this.resultForLoadGroup = value; } /** * Gets the value of the theoryType property. * * @return * possible object is * {@link IfcAnalysisTheoryTypeEnum } * */ public IfcAnalysisTheoryTypeEnum getTheoryType() { return theoryType; } /** * Sets the value of the theoryType property. * * @param value * allowed object is * {@link IfcAnalysisTheoryTypeEnum } * */ public void setTheoryType(IfcAnalysisTheoryTypeEnum value) { this.theoryType = value; } /** * Gets the value of the isLinear property. * * @return * possible object is * {@link Boolean } * */ public Boolean isIsLinear() { return isLinear; } /** * Sets the value of the isLinear property. * * @param value * allowed object is * {@link Boolean } * */ public void setIsLinear(Boolean value) { this.isLinear = value; } }
[ "31693668+jyrkioraskari@users.noreply.github.com" ]
31693668+jyrkioraskari@users.noreply.github.com
0f9c6045671ff4a4a15fd2767915ecf0e90eee24
9cd45a02087dac52ea4d39a0c17e525c11a8ed97
/src/java/com/adincube/sdk/k/d/a.java
4417932155feae9d9b1170bab425e6034e09f927
[]
no_license
abhijeetvaidya24/INFO-NDVaidya
fffb90b8cb4478399753e3c13c4813e7e67aea19
64d69250163e2d8d165e8541aec75b818c2d21c5
refs/heads/master
2022-11-29T16:03:21.503079
2020-08-12T06:00:59
2020-08-12T06:00:59
286,928,296
0
0
null
null
null
null
UTF-8
Java
false
false
6,392
java
/* * Decompiled with CFR 0.0. * * Could not load the following classes: * android.net.Uri * com.adincube.sdk.h.a.a.a * java.lang.Object * java.lang.String * java.net.MalformedURLException * java.net.URL * java.util.List */ package com.adincube.sdk.k.d; import android.net.Uri; import com.adincube.sdk.k.b.b.d; import com.adincube.sdk.k.b.b.f; import com.adincube.sdk.k.b.b.i; import java.net.MalformedURLException; import java.net.URL; import java.util.List; public final class a { public static Uri a(com.adincube.sdk.h.a.a.a a2) { if (a2.b()) { try { Uri uri = Uri.parse((String)a2.c().toString()); return uri; } catch (MalformedURLException malformedURLException) { return null; } } return Uri.parse((String)a2.e()); } /* * Exception decompiling */ public static List<String> a(com.adincube.sdk.h.a.a.a var0, d var1) { // This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file. // org.benf.cfr.reader.util.ConfusedCFRException: Invalid stack depths @ lbl34.1 : ALOAD_2 : trying to set 1 previously set to 0 // org.benf.cfr.reader.b.a.a.g.a(Op02WithProcessedDataAndRefs.java:203) // org.benf.cfr.reader.b.a.a.g.a(Op02WithProcessedDataAndRefs.java:1489) // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:308) // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:182) // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:127) // org.benf.cfr.reader.entities.attributes.f.c(AttributeCode.java:96) // org.benf.cfr.reader.entities.g.p(Method.java:396) // org.benf.cfr.reader.entities.d.e(ClassFile.java:890) // org.benf.cfr.reader.entities.d.b(ClassFile.java:792) // org.benf.cfr.reader.b.a(Driver.java:128) // org.benf.cfr.reader.a.a(CfrDriverImpl.java:63) // com.njlabs.showjava.decompilers.JavaExtractionWorker.decompileWithCFR(JavaExtractionWorker.kt:61) // com.njlabs.showjava.decompilers.JavaExtractionWorker.doWork(JavaExtractionWorker.kt:130) // com.njlabs.showjava.decompilers.BaseDecompiler.withAttempt(BaseDecompiler.kt:108) // com.njlabs.showjava.workers.DecompilerWorker$b.run(DecompilerWorker.kt:118) // java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) // java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) // java.lang.Thread.run(Thread.java:919) throw new IllegalStateException("Decompilation failed"); } /* * Exception decompiling */ public static void a(com.adincube.sdk.h.a.a.a var0, f var1) { // This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file. // org.benf.cfr.reader.util.ConfusedCFRException: Invalid stack depths @ lbl69 : ALOAD : trying to set 1 previously set to 0 // org.benf.cfr.reader.b.a.a.g.a(Op02WithProcessedDataAndRefs.java:203) // org.benf.cfr.reader.b.a.a.g.a(Op02WithProcessedDataAndRefs.java:1489) // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:308) // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:182) // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:127) // org.benf.cfr.reader.entities.attributes.f.c(AttributeCode.java:96) // org.benf.cfr.reader.entities.g.p(Method.java:396) // org.benf.cfr.reader.entities.d.e(ClassFile.java:890) // org.benf.cfr.reader.entities.d.b(ClassFile.java:792) // org.benf.cfr.reader.b.a(Driver.java:128) // org.benf.cfr.reader.a.a(CfrDriverImpl.java:63) // com.njlabs.showjava.decompilers.JavaExtractionWorker.decompileWithCFR(JavaExtractionWorker.kt:61) // com.njlabs.showjava.decompilers.JavaExtractionWorker.doWork(JavaExtractionWorker.kt:130) // com.njlabs.showjava.decompilers.BaseDecompiler.withAttempt(BaseDecompiler.kt:108) // com.njlabs.showjava.workers.DecompilerWorker$b.run(DecompilerWorker.kt:118) // java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) // java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) // java.lang.Thread.run(Thread.java:919) throw new IllegalStateException("Decompilation failed"); } /* * Exception decompiling */ public static List<i> b(com.adincube.sdk.h.a.a.a var0, d var1) { // This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file. // org.benf.cfr.reader.util.ConfusedCFRException: Invalid stack depths @ lbl33.1 : ALOAD_2 : trying to set 1 previously set to 0 // org.benf.cfr.reader.b.a.a.g.a(Op02WithProcessedDataAndRefs.java:203) // org.benf.cfr.reader.b.a.a.g.a(Op02WithProcessedDataAndRefs.java:1489) // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:308) // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:182) // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:127) // org.benf.cfr.reader.entities.attributes.f.c(AttributeCode.java:96) // org.benf.cfr.reader.entities.g.p(Method.java:396) // org.benf.cfr.reader.entities.d.e(ClassFile.java:890) // org.benf.cfr.reader.entities.d.b(ClassFile.java:792) // org.benf.cfr.reader.b.a(Driver.java:128) // org.benf.cfr.reader.a.a(CfrDriverImpl.java:63) // com.njlabs.showjava.decompilers.JavaExtractionWorker.decompileWithCFR(JavaExtractionWorker.kt:61) // com.njlabs.showjava.decompilers.JavaExtractionWorker.doWork(JavaExtractionWorker.kt:130) // com.njlabs.showjava.decompilers.BaseDecompiler.withAttempt(BaseDecompiler.kt:108) // com.njlabs.showjava.workers.DecompilerWorker$b.run(DecompilerWorker.kt:118) // java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) // java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) // java.lang.Thread.run(Thread.java:919) throw new IllegalStateException("Decompilation failed"); } }
[ "abhijeetvaidya24@gmail.com" ]
abhijeetvaidya24@gmail.com
e742253a4d49e4d6f268eb43d39c40ab7212edca
a5f890fbd4fce4dfef4957fd9939e37babf15d39
/oim-fx/oim-fx/src/main/java/com/oim/fx/ui/main/UserContextMenu.java
172ce9607dbdc24ba4d9813dc8606b0fecb56a45
[ "MIT" ]
permissive
shanfeng929/oim-qq
913a54d2ea86027cbe7e9ac163e7cb761b4680b5
aad830eeda424514ffadf17c231d780c468b6b11
refs/heads/master
2022-12-21T05:20:01.371240
2018-06-25T07:23:31
2018-06-25T07:23:31
138,557,408
0
1
null
2022-12-16T08:00:17
2018-06-25T07:17:59
Java
UTF-8
Java
false
false
1,412
java
package com.oim.fx.ui.main; import com.only.fx.common.action.EventAction; import com.only.fx.common.component.OnlyMenuItem; import com.onlyxiahui.im.bean.UserData; import javafx.scene.control.ContextMenu; /** * @author XiaHui * @date 2015年3月13日 上午10:03:25 */ public class UserContextMenu extends ContextMenu { //private OnlyMenuItem updateMenuItem = new OnlyMenuItem(); private OnlyMenuItem showMenuItem = new OnlyMenuItem(); UserData userData; EventAction<UserData> updateEventAction; EventAction<UserData> showEventAction; public UserContextMenu() { initMenu(); initEvent(); } private void initMenu() { showMenuItem.setText("查看信息"); //updateMenuItem.setText("修改群信息"); this.getItems().add(showMenuItem); //this.getItems().add(updateMenuItem); } private void initEvent() { // updateMenuItem.setOnAction(a -> { // if (null != updateEventAction) { // updateEventAction.execute(userData); // } // }); showMenuItem.setOnAction(a -> { if (null != showEventAction) { showEventAction.execute(userData); } }); } // public void setUpdateAction(EventAction<UserData> value) { // updateEventAction = value; // } public void setShowAction(EventAction<UserData> value) { showEventAction = value; } public UserData getUserData() { return userData; } public void setUserData(UserData userData) { this.userData = userData; } }
[ "shanfeng929@163.com" ]
shanfeng929@163.com
d607a0e0aba311d5dd354d297f12f33ef5d5e921
1c31804e076828585d5df1695e308ace5382cbf1
/jodd-servlet/src/main/java/jodd/bean/loader/SessionBeanLoader.java
d29a586bbf0c81903711522c68b0c48b2c2b1fb7
[]
no_license
zipu888/jodd
bb07bb97b41a3cb7a4765677dc7a5c7d93efac43
3f70308ab43de8eb82343b5db86935a3f506a7b2
refs/heads/master
2021-01-15T18:50:31.015230
2013-07-15T02:07:47
2013-07-15T02:07:47
8,326,913
1
0
null
null
null
null
UTF-8
Java
false
false
710
java
// Copyright (c) 2003-2013, Jodd Team (jodd.org). All Rights Reserved. package jodd.bean.loader; import java.util.Enumeration; import javax.servlet.http.HttpSession; /** * Populates java bean from HttpSession objects. */ public class SessionBeanLoader extends BaseBeanLoader { public void load(Object bean, Object source) { if (source instanceof HttpSession) { HttpSession session = (HttpSession) source; Enumeration attributeNames = session.getAttributeNames(); while (attributeNames.hasMoreElements()) { String attributeName = (String) attributeNames.nextElement(); Object value = session.getAttribute(attributeName); setProperty(bean, attributeName, value); } } } }
[ "igor@jodd.org" ]
igor@jodd.org
1e9c1b5a28b31842d6e862c1683fc227623e00ae
4554e50b0162085aa06f28c838a752a84e3d69f2
/avatarui/source/src/cn/info/platform/util/People.java
becb7cac112a90e72ff0377264cc39ce1b65ded5
[]
no_license
jasonkoo/PushMarketingMonitor
724ab19c3fc6fb0d19caacc718c1f759813abf53
058515167c2995fae343ee887b1f25f61b2771a2
refs/heads/master
2020-04-06T06:00:34.045338
2016-11-13T09:48:02
2016-11-13T09:48:02
73,607,152
0
0
null
null
null
null
UTF-8
Java
false
false
365
java
package cn.info.platform.util; public class People { private int age; private String name; public int getAge() { return age; } public void setAge(int age) { this.age = age; } public String getName() { return name; } public void setName(String name) { this.name = name; } private String sayHello(String str) { return "Hello: " + str; } }
[ "cybot7yxy@126.com" ]
cybot7yxy@126.com
4d47af442704a675c6187d395cf48f5bac433812
c46304a8d962b6bea66bc6e4ef04b908bdb0dc97
/src/main/java/net/finmath/fouriermethod/calibration/BoundConstraint.java
1abd1b504afe3853890daa1b250ef8e81e880ebd
[ "Apache-2.0", "LicenseRef-scancode-mit-old-style", "LicenseRef-scancode-warranty-disclaimer", "LGPL-2.0-or-later" ]
permissive
finmath/finmath-lib
93f0f67e7914e76bbdc4e32c6dddce9eba4f50a4
b80aba56bdf6b93551d966503d5b399409c36bff
refs/heads/master
2023-08-04T09:28:21.146535
2023-07-26T17:18:45
2023-07-26T17:18:45
8,832,601
459
211
Apache-2.0
2023-07-21T13:28:03
2013-03-17T10:00:22
Java
UTF-8
Java
false
false
1,063
java
package net.finmath.fouriermethod.calibration; /** * A class applying a bound constraint to a parameter. * * @author Alessandro Gnoatto * */ public class BoundConstraint implements ScalarConstraint { private final double lowerBound; private final double upperBound; public BoundConstraint(final double lowerBound, final double upperBound) { super(); this.lowerBound = lowerBound; this.upperBound = upperBound; } /** * Return the lower bound. * @return the lower bound. */ @Override public double getLowerBound() { return lowerBound; } /** * Return the upper bound. * @return the upper bound. */ @Override public double getUpperBound() { return upperBound; } @Override public double apply(final double parameterToTest) { if(parameterToTest > upperBound || parameterToTest < lowerBound) { final double u = 1.0/(Math.exp(parameterToTest)+1.0); //maps R to to [0,1]; return lowerBound + u*(upperBound - lowerBound); //maps from [0,1] to [lowerBound, upperBound] }else { return parameterToTest; } } }
[ "email@christian-fries.de" ]
email@christian-fries.de
6095fbc08f3f9d7f2d6d1c12b9be70512ebb2c3b
357c37822ce15cee4d3c865044a390ec3775e19f
/konzi_gyakok/cars/cars/src/main/java/cars/KmState.java
13cccd36ff3ca8c47890b8a07944c76155a52026
[]
no_license
djtesla/senior-solutions
5fd0cec5513759057c4df46ca31bf90141110392
69894da3607fe499c5b599a859481d2ea4ddf8c9
refs/heads/master
2023-07-01T21:37:52.957857
2021-07-30T12:40:13
2021-07-30T12:40:13
373,088,997
0
0
null
null
null
null
UTF-8
Java
false
false
366
java
package cars; import java.time.LocalDate; public class KmState { private LocalDate date; private int actualKm; public KmState(LocalDate date, int actualKm) { this.date = date; this.actualKm = actualKm; } public LocalDate getDate() { return date; } public int getActualKm() { return actualKm; } }
[ "djtesla@gmailcom" ]
djtesla@gmailcom
7b50a85b6ce1fc827364c84856a3a0bb5ffb8fde
af344e2c6ec5544c6fe6cdbe7c6897f1a9dc91d6
/store-service/src/test/java/com/ptit/storeservice/StoreServiceApplicationTests.java
af455bf6021498febf96a2833197770f54681901
[]
no_license
shinnoo/Service-Oriented-Software
89ab39f4efa1d2bee122326c9d93a0216e27ab08
8679938bf343d636d5e88de46129ea69babe8d8b
refs/heads/master
2023-03-24T19:19:30.361823
2021-03-20T16:01:20
2021-03-20T16:01:20
349,741,090
0
0
null
null
null
null
UTF-8
Java
false
false
219
java
package com.ptit.storeservice; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class StoreServiceApplicationTests { @Test void contextLoads() { } }
[ "trandung164.ptit@gmail.com" ]
trandung164.ptit@gmail.com
fe7f29df65e9d9a1508f07524dc0425a7aa44c8f
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_378/Testnull_37758.java
f4d7d966e554d07e39d6fd6c5b9b4317760adac0
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_378; import static org.junit.Assert.*; public class Testnull_37758 { private final Productionnull_37758 production = new Productionnull_37758("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
6ee5d6ed6bda1702dae76fc2f0e8c8a6b8f4b2b2
dd01522057d622e942cc7c9058cbca61377679aa
/hybris/bin/platform/bootstrap/gensrc/de/hybris/platform/europe1/model/AbstractDiscountRowModel.java
2b1a22ec303f2677c06f73ee085bd79be14bc882
[]
no_license
grunya404/bp-core-6.3
7d73db4db81015e4ae69eeffd43730f564e17679
9bc11bc514bd0c35d7757a9e949af89b84be634f
refs/heads/master
2021-05-19T11:32:39.663520
2017-09-01T11:36:21
2017-09-01T11:36:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,993
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! --- * --- Generated at 25 Aug 2017 4:31:18 PM --- * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2000-2016 SAP SE * All rights reserved. * * This software is the confidential and proprietary information of SAP * Hybris ("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 Hybris. * */ package de.hybris.platform.europe1.model; import de.hybris.bootstrap.annotations.Accessor; import de.hybris.platform.core.HybrisEnumValue; import de.hybris.platform.core.model.ItemModel; import de.hybris.platform.core.model.c2l.CurrencyModel; import de.hybris.platform.core.model.order.price.DiscountModel; import de.hybris.platform.core.model.product.ProductModel; import de.hybris.platform.europe1.enums.ProductDiscountGroup; import de.hybris.platform.europe1.model.PDTRowModel; import de.hybris.platform.servicelayer.model.ItemModelContext; /** * Generated model class for type AbstractDiscountRow first defined at extension europe1. */ @SuppressWarnings("all") public class AbstractDiscountRowModel extends PDTRowModel { /**<i>Generated model type code constant.</i>*/ public final static String _TYPECODE = "AbstractDiscountRow"; /** <i>Generated constant</i> - Attribute key of <code>AbstractDiscountRow.currency</code> attribute defined at extension <code>europe1</code>. */ public static final String CURRENCY = "currency"; /** <i>Generated constant</i> - Attribute key of <code>AbstractDiscountRow.discount</code> attribute defined at extension <code>europe1</code>. */ public static final String DISCOUNT = "discount"; /** <i>Generated constant</i> - Attribute key of <code>AbstractDiscountRow.absolute</code> attribute defined at extension <code>europe1</code>. */ public static final String ABSOLUTE = "absolute"; /** <i>Generated constant</i> - Attribute key of <code>AbstractDiscountRow.value</code> attribute defined at extension <code>europe1</code>. */ public static final String VALUE = "value"; /** <i>Generated constant</i> - Attribute key of <code>AbstractDiscountRow.discountString</code> attribute defined at extension <code>europe1</code>. */ public static final String DISCOUNTSTRING = "discountString"; /** * <i>Generated constructor</i> - Default constructor for generic creation. */ public AbstractDiscountRowModel() { super(); } /** * <i>Generated constructor</i> - Default constructor for creation with existing context * @param ctx the model context to be injected, must not be null */ public AbstractDiscountRowModel(final ItemModelContext ctx) { super(ctx); } /** * <i>Generated constructor</i> - Constructor with all mandatory attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _discount initial attribute declared by type <code>AbstractDiscountRow</code> at extension <code>europe1</code> */ @Deprecated public AbstractDiscountRowModel(final DiscountModel _discount) { super(); setDiscount(_discount); } /** * <i>Generated constructor</i> - for all mandatory and initial attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _discount initial attribute declared by type <code>AbstractDiscountRow</code> at extension <code>europe1</code> * @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code> * @param _pg initial attribute declared by type <code>AbstractDiscountRow</code> at extension <code>europe1</code> * @param _product initial attribute declared by type <code>PDTRow</code> at extension <code>europe1</code> * @param _productId initial attribute declared by type <code>PDTRow</code> at extension <code>europe1</code> */ @Deprecated public AbstractDiscountRowModel(final DiscountModel _discount, final ItemModel _owner, final ProductDiscountGroup _pg, final ProductModel _product, final String _productId) { super(); setDiscount(_discount); setOwner(_owner); setPg(_pg); setProduct(_product); setProductId(_productId); } /** * <i>Generated method</i> - Getter of the <code>AbstractDiscountRow.absolute</code> dynamic attribute defined at extension <code>europe1</code>. * @return the absolute */ @Accessor(qualifier = "absolute", type = Accessor.Type.GETTER) public Boolean getAbsolute() { return getPersistenceContext().getDynamicValue(this,ABSOLUTE); } /** * <i>Generated method</i> - Getter of the <code>AbstractDiscountRow.currency</code> attribute defined at extension <code>europe1</code>. * @return the currency */ @Accessor(qualifier = "currency", type = Accessor.Type.GETTER) public CurrencyModel getCurrency() { return getPersistenceContext().getPropertyValue(CURRENCY); } /** * <i>Generated method</i> - Getter of the <code>AbstractDiscountRow.discount</code> attribute defined at extension <code>europe1</code>. * @return the discount */ @Accessor(qualifier = "discount", type = Accessor.Type.GETTER) public DiscountModel getDiscount() { return getPersistenceContext().getPropertyValue(DISCOUNT); } /** * <i>Generated method</i> - Getter of the <code>AbstractDiscountRow.discountString</code> dynamic attribute defined at extension <code>europe1</code>. * @return the discountString */ @Accessor(qualifier = "discountString", type = Accessor.Type.GETTER) public String getDiscountString() { return getPersistenceContext().getDynamicValue(this,DISCOUNTSTRING); } /** * <i>Generated method</i> - Getter of the <code>AbstractDiscountRow.value</code> attribute defined at extension <code>europe1</code>. * @return the value */ @Accessor(qualifier = "value", type = Accessor.Type.GETTER) public Double getValue() { return getPersistenceContext().getPropertyValue(VALUE); } /** * <i>Generated method</i> - Setter of <code>AbstractDiscountRow.currency</code> attribute defined at extension <code>europe1</code>. * * @param value the currency */ @Accessor(qualifier = "currency", type = Accessor.Type.SETTER) public void setCurrency(final CurrencyModel value) { getPersistenceContext().setPropertyValue(CURRENCY, value); } /** * <i>Generated method</i> - Initial setter of <code>AbstractDiscountRow.discount</code> attribute defined at extension <code>europe1</code>. Can only be used at creation of model - before first save. * * @param value the discount */ @Accessor(qualifier = "discount", type = Accessor.Type.SETTER) public void setDiscount(final DiscountModel value) { getPersistenceContext().setPropertyValue(DISCOUNT, value); } /** * <i>Generated method</i> - Initial setter of <code>PDTRow.pg</code> attribute defined at extension <code>europe1</code> and redeclared at extension <code>europe1</code>. Can only be used at creation of model - before first save. Will only accept values of type {@link de.hybris.platform.europe1.enums.ProductDiscountGroup}. * * @param value the pg */ @Override @Accessor(qualifier = "pg", type = Accessor.Type.SETTER) public void setPg(final HybrisEnumValue value) { if( value == null || value instanceof ProductDiscountGroup) { super.setPg(value); } else { throw new IllegalArgumentException("Given value is not instance of de.hybris.platform.europe1.enums.ProductDiscountGroup"); } } /** * <i>Generated method</i> - Setter of <code>AbstractDiscountRow.value</code> attribute defined at extension <code>europe1</code>. * * @param value the value */ @Accessor(qualifier = "value", type = Accessor.Type.SETTER) public void setValue(final Double value) { getPersistenceContext().setPropertyValue(VALUE, value); } }
[ "mashimbyek@gmail.com" ]
mashimbyek@gmail.com
35dbca6516375f7f17944cdd9ac8ca861cfa4a47
cec1602d23034a8f6372c019e5770773f893a5f0
/sources/com/iwown/ble_module/model/R1HealthMinuteData.java
6cd7a15e68f4c3fad314c856abca36c1b99d2b90
[]
no_license
sengeiou/zeroner_app
77fc7daa04c652a5cacaa0cb161edd338bfe2b52
e95ae1d7cfbab5ca1606ec9913416dadf7d29250
refs/heads/master
2022-03-31T06:55:26.896963
2020-01-24T09:20:37
2020-01-24T09:20:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,036
java
package com.iwown.ble_module.model; import com.iwown.ble_module.iwown.utils.ByteUtil; import com.iwown.ble_module.utils.Util; import java.util.Arrays; public class R1HealthMinuteData { private String cmd; private int ctrl; private int data_type; private int day; private int hour; private R1HeartRateMinuteData hr; private int minute; private int month; private int second; private int seq; private R1WalkRunMinuteData walk; private int year; public String getCmd() { return this.cmd; } public void setCmd(String cmd2) { this.cmd = cmd2; } public int getCtrl() { return this.ctrl; } public void setCtrl(int ctrl2) { this.ctrl = ctrl2; } public int getSeq() { return this.seq; } public void setSeq(int seq2) { this.seq = seq2; } public int getYear() { return this.year; } public void setYear(int year2) { this.year = year2; } public int getMonth() { return this.month; } public void setMonth(int month2) { this.month = month2; } public int getDay() { return this.day; } public void setDay(int day2) { this.day = day2; } public int getHour() { return this.hour; } public void setHour(int hour2) { this.hour = hour2; } public int getMinute() { return this.minute; } public void setMinute(int minute2) { this.minute = minute2; } public int getSecond() { return this.second; } public void setSecond(int second2) { this.second = second2; } public int getData_type() { return this.data_type; } public void setData_type(int data_type2) { this.data_type = data_type2; } public R1HeartRateMinuteData getHr() { return this.hr; } public void setHr(R1HeartRateMinuteData hr2) { this.hr = hr2; } public R1WalkRunMinuteData getWalk() { return this.walk; } public void setWalk(R1WalkRunMinuteData walk2) { this.walk = walk2; } public R1HealthMinuteData parseData(byte[] datas) { int index; setCtrl(ByteUtil.bytesToInt(Arrays.copyOfRange(datas, 4, 5))); setSeq(ByteUtil.bytesToInt(Arrays.copyOfRange(datas, 5, 7))); setYear(ByteUtil.bytesToInt(Arrays.copyOfRange(datas, 7, 8)) + 2000); setMonth(ByteUtil.bytesToInt(Arrays.copyOfRange(datas, 8, 9)) + 1); setDay(ByteUtil.bytesToInt(Arrays.copyOfRange(datas, 9, 10)) + 1); setHour(ByteUtil.bytesToInt(Arrays.copyOfRange(datas, 10, 11))); setMinute(ByteUtil.bytesToInt(Arrays.copyOfRange(datas, 11, 12))); setSecond(ByteUtil.bytesToInt(Arrays.copyOfRange(datas, 12, 13))); int data_type2 = ByteUtil.bytesToInt(Arrays.copyOfRange(datas, 13, 14)); setData_type(data_type2); byte[] data = ByteUtil.byteToBitArray(data_type2); if (data[2] == 1 && datas.length >= 51) { byte[] walkDataBytes = Arrays.copyOfRange(datas, 14, 51); R1WalkRunMinuteData walkData = new R1WalkRunMinuteData(); walkData.setSport_type(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 0, 2))); walkData.setState_type(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 2, 3))); walkData.setStep(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 3, 5))); walkData.setDistance(((float) ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 5, 7))) / 10.0f); walkData.setCalorie(((float) ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 7, 9))) / 10.0f); walkData.setRateOfStride_min(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 9, 11))); walkData.setRateOfStride_max(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 11, 13))); walkData.setRateOfStride_avg(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 13, 15))); walkData.setFlight_min(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 15, 17))); walkData.setFlight_max(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 17, 19))); walkData.setFlight_avg(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 19, 21))); walkData.setTouchDown_min(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 21, 23))); walkData.setTouchDown_max(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 23, 25))); walkData.setTouchDown_avg(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 25, 27))); walkData.setTouchDownPower_min(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 27, 29))); walkData.setTouchDownPower_max(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 29, 31))); walkData.setTouchDownPower_avg(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 31, 33))); walkData.setTouchDownPower_balance(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 33, 35))); walkData.setTouchDownPower_stop(ByteUtil.bytesToInt(Arrays.copyOfRange(walkDataBytes, 35, 37))); setWalk(walkData); } if (data[7] == 1) { if (data[2] != 1 || datas.length < 51) { index = 14; } else { index = 51; } byte[] hrDataBytes = Arrays.copyOfRange(datas, index, index + 6); int min_hr = ByteUtil.bytesToInt(Arrays.copyOfRange(hrDataBytes, 0, 2)); int max_hr = ByteUtil.bytesToInt(Arrays.copyOfRange(hrDataBytes, 2, 4)); int avg_hr = ByteUtil.bytesToInt(Arrays.copyOfRange(hrDataBytes, 4, 6)); R1HeartRateMinuteData hrData = new R1HeartRateMinuteData(); hrData.setMax_hr(max_hr); hrData.setAvg_hr(avg_hr); hrData.setMin_hr(min_hr); setHr(hrData); } setCmd(Util.bytesToString(datas, false)); return this; } }
[ "johan@sellstrom.me" ]
johan@sellstrom.me
10edee8d2c2dceb1815752f6c48981763a2dc396
ccace7925cbc81d3911296ffdc3a096ba3647e64
/modules/spi/commandreplay/impl/src/main/java/org/isisaddons/module/command/replay/impl/CommandReplayOnSlaveService.java
ca598242af6162c4cf0c6319e90227a6507cc80b
[ "Apache-2.0" ]
permissive
alexdcarl/incode-platform
27dd7f9e427a847f49d6db4eb80d1b7de1777e40
b0e9bc8dc0aa7c3d277bb320a90198a72937fd31
refs/heads/master
2020-05-04T05:09:15.428035
2019-03-05T18:27:43
2019-03-05T18:27:43
178,980,570
2
0
null
2019-04-02T02:09:27
2019-04-02T02:09:26
null
UTF-8
Java
false
false
3,425
java
package org.isisaddons.module.command.replay.impl; import java.util.Collections; import java.util.List; import org.apache.isis.applib.annotation.Action; import org.apache.isis.applib.annotation.ActionLayout; import org.apache.isis.applib.annotation.CommandReification; import org.apache.isis.applib.annotation.DomainService; import org.apache.isis.applib.annotation.DomainServiceLayout; import org.apache.isis.applib.annotation.MemberOrder; import org.apache.isis.applib.annotation.NatureOfService; import org.apache.isis.applib.annotation.SemanticsOf; import org.apache.isis.applib.services.jaxb.JaxbService; import org.apache.isis.applib.value.Clob; import org.apache.isis.schema.cmd.v1.CommandDto; import org.apache.isis.schema.cmd.v1.CommandsDto; import org.isisaddons.module.command.CommandModule; import org.isisaddons.module.command.dom.CommandJdo; import org.isisaddons.module.command.dom.CommandServiceJdoRepository; @DomainService( nature = NatureOfService.VIEW_MENU_ONLY, objectType = "isiscommand.CommandReplayOnSlaveService" ) @DomainServiceLayout( named = "Activity", menuBar = DomainServiceLayout.MenuBar.SECONDARY, menuOrder = "20.3" ) public class CommandReplayOnSlaveService { public static abstract class PropertyDomainEvent<T> extends CommandModule.PropertyDomainEvent<CommandReplayOnSlaveService, T> { } public static abstract class CollectionDomainEvent<T> extends CommandModule.CollectionDomainEvent<CommandReplayOnSlaveService, T> { } public static abstract class ActionDomainEvent extends CommandModule.ActionDomainEvent<CommandReplayOnSlaveService> { } //region > findReplayHwm public static class FindReplayHwmOnSlaveDomainEvent extends ActionDomainEvent { } @Action( domainEvent = FindReplayHwmOnSlaveDomainEvent.class, semantics = SemanticsOf.SAFE ) @ActionLayout( cssClassFa = "fa-bath" ) @MemberOrder(sequence="60.1") public CommandJdo findReplayHwmOnSlave() { return commandServiceJdoRepository.findReplayHwm(); } //endregion //region > uploadCommandsToSlave public static class UploadCommandsToSlaveDomainEvent extends ActionDomainEvent { } @Action( command = CommandReification.DISABLED, domainEvent = UploadCommandsToSlaveDomainEvent.class, semantics = SemanticsOf.NON_IDEMPOTENT ) @ActionLayout( cssClassFa = "fa-upload" ) @MemberOrder(sequence="60.2") public void uploadCommandsToSlave(final Clob commandsDtoAsXml) { final CharSequence chars = commandsDtoAsXml.getChars(); List<CommandDto> commandDtoList; try { final CommandsDto commandsDto = jaxbService.fromXml(CommandsDto.class, chars.toString()); commandDtoList = commandsDto.getCommandDto(); } catch(Exception ex) { final CommandDto commandDto = jaxbService.fromXml(CommandDto.class, chars.toString()); commandDtoList = Collections.singletonList(commandDto); } for (final CommandDto commandDto : commandDtoList) { commandServiceJdoRepository.saveForReplay(commandDto); } } //endregion @javax.inject.Inject CommandServiceJdoRepository commandServiceJdoRepository; @javax.inject.Inject JaxbService jaxbService; }
[ "dan@haywood-associates.co.uk" ]
dan@haywood-associates.co.uk
4daec708efcdbe1c16011d415e6e7a74664a05f3
e977c424543422f49a25695665eb85bfc0700784
/benchmark/icse15/1235304/buggy-version/lucene/dev/branches/branch_3x/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java
3447010b552a83ce684823ca9cb1a16c7854b6f1
[]
no_license
amir9979/pattern-detector-experiment
17fcb8934cef379fb96002450d11fac62e002dd3
db67691e536e1550245e76d7d1c8dced181df496
refs/heads/master
2022-02-18T10:24:32.235975
2019-09-13T15:42:55
2019-09-13T15:42:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,592
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.solr.handler; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.common.SolrInputDocument; import org.apache.solr.common.SolrInputField; import org.apache.solr.common.util.ContentStreamBase; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.response.SolrQueryResponse; import org.apache.solr.update.AddUpdateCommand; import org.apache.solr.update.CommitUpdateCommand; import org.apache.solr.update.DeleteUpdateCommand; import org.apache.solr.update.processor.BufferingRequestProcessor; import org.junit.BeforeClass; import org.junit.Test; public class JsonLoaderTest extends SolrTestCaseJ4 { @BeforeClass public static void beforeTests() throws Exception { initCore("solrconfig.xml","schema.xml"); } static String input = ("{\n" + "\n" + "'add': {\n" + " 'doc': {\n" + " 'bool': true,\n" + " 'f0': 'v0',\n" + " 'f2': {\n" + " 'boost': 2.3,\n" + " 'value': 'test'\n" + " },\n" + " 'array': [ 'aaa', 'bbb' ],\n" + " 'boosted': {\n" + " 'boost': 6.7,\n" + " 'value': [ 'aaa', 'bbb' ]\n" + " }\n" + " }\n" + "},\n" + "'add': {\n" + " 'commitWithin': 1234,\n" + " 'overwrite': false,\n" + " 'boost': 3.45,\n" + " 'doc': {\n" + " 'f1': 'v1',\n" + " 'f1': 'v2',\n" + " 'f2': null\n" + " }\n" + "},\n" + "\n" + "'commit': {},\n" + "'optimize': { 'waitFlush':false, 'waitSearcher':false },\n" + "\n" + "'delete': { 'id':'ID' },\n" + "'delete': { 'query':'QUERY' },\n" + "'rollback': {}\n" + "\n" + "}\n" + "").replace('\'', '"'); public void testParsing() throws Exception { SolrQueryRequest req = req(); SolrQueryResponse rsp = new SolrQueryResponse(); BufferingRequestProcessor p = new BufferingRequestProcessor(null); JsonLoader loader = new JsonLoader( req, p ); loader.load(req, rsp, new ContentStreamBase.StringStream(input)); assertEquals( 2, p.addCommands.size() ); AddUpdateCommand add = p.addCommands.get(0); SolrInputDocument d = add.solrDoc; SolrInputField f = d.getField( "boosted" ); assertEquals(6.7f, f.getBoost(), 0.1); assertEquals(2, f.getValues().size()); // add = p.addCommands.get(1); d = add.solrDoc; f = d.getField( "f1" ); assertEquals(2, f.getValues().size()); assertEquals(3.45f, d.getDocumentBoost(), 0.001); assertEquals(false, !add.allowDups); assertEquals(0, d.getField("f2").getValueCount()); // parse the commit commands assertEquals( 2, p.commitCommands.size() ); CommitUpdateCommand commit = p.commitCommands.get( 0 ); assertFalse( commit.optimize ); assertTrue( commit.waitFlush ); assertTrue( commit.waitSearcher ); commit = p.commitCommands.get( 1 ); assertTrue( commit.optimize ); assertFalse( commit.waitFlush ); assertFalse( commit.waitSearcher ); // DELETE COMMANDS assertEquals( 2, p.deleteCommands.size() ); DeleteUpdateCommand delete = p.deleteCommands.get( 0 ); assertEquals( delete.id, "ID" ); assertEquals( delete.query, null ); assertTrue(delete.fromPending && delete.fromCommitted); delete = p.deleteCommands.get( 1 ); assertEquals( delete.id, null ); assertEquals( delete.query, "QUERY" ); assertTrue(delete.fromPending && delete.fromCommitted); // ROLLBACK COMMANDS assertEquals( 1, p.rollbackCommands.size() ); req.close(); } public void testSimpleFormat() throws Exception { String str = "[{'id':'1'},{'id':'2'}]".replace('\'', '"'); SolrQueryRequest req = req("commitWithin","100", "overwrite","false"); SolrQueryResponse rsp = new SolrQueryResponse(); BufferingRequestProcessor p = new BufferingRequestProcessor(null); JsonLoader loader = new JsonLoader( req, p ); loader.load(req, rsp, new ContentStreamBase.StringStream(str)); assertEquals( 2, p.addCommands.size() ); AddUpdateCommand add = p.addCommands.get(0); SolrInputDocument d = add.solrDoc; SolrInputField f = d.getField( "id" ); assertEquals("1", f.getValue()); assertEquals(add.commitWithin, 100); assertEquals(!add.allowDups, false); add = p.addCommands.get(1); d = add.solrDoc; f = d.getField( "id" ); assertEquals("2", f.getValue()); assertEquals(add.commitWithin, 100); assertEquals(!add.allowDups, false); req.close(); } public void testSimpleFormatInAdd() throws Exception { String str = "{'add':[{'id':'1'},{'id':'2'}]}".replace('\'', '"'); SolrQueryRequest req = req(); SolrQueryResponse rsp = new SolrQueryResponse(); BufferingRequestProcessor p = new BufferingRequestProcessor(null); JsonLoader loader = new JsonLoader( req, p ); loader.load(req, rsp, new ContentStreamBase.StringStream(str)); assertEquals( 2, p.addCommands.size() ); AddUpdateCommand add = p.addCommands.get(0); SolrInputDocument d = add.solrDoc; SolrInputField f = d.getField( "id" ); assertEquals("1", f.getValue()); assertEquals(add.commitWithin, -1); assertEquals(!add.allowDups, true); add = p.addCommands.get(1); d = add.solrDoc; f = d.getField( "id" ); assertEquals("2", f.getValue()); assertEquals(add.commitWithin, -1); assertEquals(!add.allowDups, true); req.close(); } @Test public void testNullValues() throws Exception { updateJ("[{'id':'10','foo_s':null,'foo2_s':['hi',null,'there']}]".replace('\'', '"'), params("commit","true")); assertJQ(req("q","id:10", "fl","foo_s,foo2_s") ,"/response/docs/[0]=={'foo2_s':['hi','there']}" ); } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
27ed63160eac5b022e966305ae2bfb797e8d3042
8cc48c116ef4cc7fe91efec0606e3c667e150edc
/Nutz-Aop-Cglib/src/org/nutz/dao/sql/ComboSql.java
4299408badd34e3c339608927be475b70ef5afdc
[]
no_license
chengjf0526/nutzlib
d70e67791819544196c9b19ca219b09fd4a317e6
ca891069f81feba7bfbac7a2ff651649aa465302
refs/heads/master
2020-12-27T00:19:51.691696
2011-03-08T13:32:07
2011-03-08T13:32:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,770
java
package org.nutz.dao.sql; import java.sql.Connection; import java.sql.SQLException; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import org.nutz.dao.Condition; import org.nutz.dao.entity.Entity; import org.nutz.lang.Lang; public class ComboSql implements Sql { public ComboSql() { sqls = new LinkedList<Sql>(); varss = new ComboVarSet(); holderss = new ComboVarSet(); } private List<Sql> sqls; private ComboVarSet varss; private ComboVarSet holderss; public int count() { return sqls.size(); } public ComboSql add(Sql sql) { sqls.add(sql); varss.add(sql.vars()); holderss.add(sql.params()); return this; } public ComboSql clear() { sqls.clear(); varss.clear(); holderss.clear(); return this; } public Sql duplicate() { ComboSql re = new ComboSql(); for (Sql sql : sqls) re.add(sql.duplicate()); return re; } public void execute(Connection conn) throws SQLException { if (sqls.isEmpty()) return; boolean old = conn.getAutoCommit(); try { conn.setAutoCommit(false); for (Sql sql : sqls) if (null != sql) sql.execute(conn); if (old) conn.commit(); } finally { conn.setAutoCommit(old); } } public SqlContext getContext() { if (sqls.isEmpty()) return null; return sqls.get(0).getContext(); } public Object getResult() { List<Object> list = new ArrayList<Object>(sqls.size()); for (Sql sql : sqls) list.add(sql.getResult()); return list; } public int getUpdateCount() { int re = -1; for (Sql sql : sqls) { if (sql.getUpdateCount() != -1) { if (re == -1) re = 0; re += sql.getUpdateCount(); } } return re; } public VarSet params() { return holderss; } public Sql setAdapter(StatementAdapter adapter) { for (Sql sql : sqls) sql.setAdapter(adapter); return this; } public Sql setCallback(SqlCallback callback) { for (Sql sql : sqls) sql.setCallback(callback); return this; } public Sql setCondition(Condition condition) { for (Sql sql : sqls) sql.setCondition(condition); return this; } public Sql setEntity(Entity<?> entity) { for (Sql sql : sqls) sql.setEntity(entity); return this; } public VarSet vars() { return null; } public Entity<?> getEntity() { if (sqls.isEmpty()) return null; return sqls.get(0).getEntity(); } public int getInt() { throw Lang.makeThrow("Not implement yet!"); } public <T> List<T> getList(Class<T> classOfT) { throw Lang.makeThrow("Not implement yet!"); } public <T> T getObject(Class<T> classOfT) { throw Lang.makeThrow("Not implement yet!"); } }
[ "wendal1985@gmail.com" ]
wendal1985@gmail.com
2a345a3631bc5e20b681e81fa9124930ff5dd83d
a13ab684732add3bf5c8b1040b558d1340e065af
/java6-src/com/sun/corba/se/PortableActivationIDL/ORBidListHelper.java
11afded8c54a8c02b82a049def1a60d7bc4c1391
[]
no_license
Alivop/java-source-code
554e199a79876343a9922e13ccccae234e9ac722
f91d660c0d1a1b486d003bb446dc7c792aafd830
refs/heads/master
2020-03-30T07:21:13.937364
2018-10-25T01:49:39
2018-10-25T01:51:38
150,934,150
5
2
null
null
null
null
UTF-8
Java
false
false
2,077
java
package com.sun.corba.se.PortableActivationIDL; /** * com/sun/corba/se/PortableActivationIDL/ORBidListHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl * Friday, March 1, 2013 2:27:32 AM PST */ /** A list of ORB IDs. */ abstract public class ORBidListHelper { private static String _id = "IDL:PortableActivationIDL/ORBidList:1.0"; public static void insert (org.omg.CORBA.Any a, String[] that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static String[] extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0); __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.PortableInterceptor.ORBIdHelper.id (), "ORBId", __typeCode); __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.corba.se.PortableActivationIDL.ORBidListHelper.id (), "ORBidList", __typeCode); } return __typeCode; } public static String id () { return _id; } public static String[] read (org.omg.CORBA.portable.InputStream istream) { String value[] = null; int _len0 = istream.read_long (); value = new String[_len0]; for (int _o1 = 0;_o1 < value.length; ++_o1) value[_o1] = org.omg.PortableInterceptor.ORBIdHelper.read (istream); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, String[] value) { ostream.write_long (value.length); for (int _i0 = 0;_i0 < value.length; ++_i0) org.omg.PortableInterceptor.ORBIdHelper.write (ostream, value[_i0]); } }
[ "liulp@zjhjb.com" ]
liulp@zjhjb.com
d42d7d7dc904d32717cda4b2ba40460266e502a0
19f7e40c448029530d191a262e5215571382bf9f
/decompiled/instagram/sources/p000X/C19060sr.java
2816f18f66a218acaf66d27e4e50616708dabe93
[]
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
250
java
package p000X; /* renamed from: X.0sr reason: invalid class name and case insensitive filesystem */ public final class C19060sr extends C19070ss { public final C75263Rd A00(C58022fB r2) { return (C75263Rd) C75243Rb.A00.get(r2); } }
[ "stan@rooy.works" ]
stan@rooy.works
98508a4c9d8737958552c3c71370fda0872570cd
d950704f993a38c5f7c632d0322eb6df5877ff49
/spring/src/main/java/com/wch/utils/file/FileFilterX.java
ba2eba8fe48e0dbedd928bf8e4e4b675b9c8d6d8
[]
no_license
gdnwxf/framework
025fef9c1e60d6673c16aed88fc969da810c44ba
dee9604c004a28c7fc40a1d16b96dec8a4852cd1
refs/heads/master
2020-04-15T12:44:02.039374
2017-05-12T02:52:12
2017-05-12T02:52:12
61,381,968
0
0
null
null
null
null
UTF-8
Java
false
false
335
java
package com.wch.utils.file; import java.io.File; import java.io.FileFilter; public class FileFilterX implements FileFilter { /** * Accept. * * @param pathname the pathname * @return true, if successful * @see java.io.FileFilter#accept(java.io.File) */ public boolean accept(File pathname) { return true; } }
[ "qinghao@2dfire.com" ]
qinghao@2dfire.com
0a08c63c7ed121f8b733a020b72cc27a17fcce2f
d6aa3eb5f2d4057f52896bef6abf8740a15b57a7
/electonic/src/main/java/oasis/names/specification/ubl/schema/xsd/commonbasiccomponents_2/BalanceBroughtForwardIndicatorType.java
3be6bcc940e625f0a59d28a8280d729d8fe0ea2e
[]
no_license
luismg8812/facturacion2.0
aa7f585733e02365db91c5deb91cd0442af2806c
b6da20cf2a23eadce99e14ff2b579470d2baa42c
refs/heads/master
2020-03-21T01:34:43.969676
2019-03-30T04:25:25
2019-03-30T04:25:25
137,949,310
0
0
null
null
null
null
UTF-8
Java
false
false
7,042
java
// // Este archivo ha sido generado por la arquitectura JavaTM para la implantaci�n de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 // Visite <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Todas las modificaciones realizadas en este archivo se perder�n si se vuelve a compilar el esquema de origen. // Generado el: 2018.10.08 a las 09:39:43 AM COT // package oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; /** * <p>Clase Java para BalanceBroughtForwardIndicatorType complex type. * * <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. * * <pre> * &lt;complexType name="BalanceBroughtForwardIndicatorType"> * &lt;simpleContent> * &lt;extension base="&lt;urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2>IndicatorType"> * &lt;/extension> * &lt;/simpleContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "BalanceBroughtForwardIndicatorType", propOrder = { "value" }) public class BalanceBroughtForwardIndicatorType { @XmlValue protected boolean value; /** * * * <pre> * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;ccts:UniqueID xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:clm54217="urn:un:unece:uncefact:codelist:specification:54217:2001" xmlns:clm5639="urn:un:unece:uncefact:codelist:specification:5639:1988" xmlns:clm66411="urn:un:unece:uncefact:codelist:specification:66411:2001" xmlns:clmIANAMIMEMediaType="urn:un:unece:uncefact:codelist:specification:IANAMIMEMediaType:2003" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;UDT0000012&lt;/ccts:UniqueID&gt; * </pre> * * * <pre> * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;ccts:CategoryCode xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:clm54217="urn:un:unece:uncefact:codelist:specification:54217:2001" xmlns:clm5639="urn:un:unece:uncefact:codelist:specification:5639:1988" xmlns:clm66411="urn:un:unece:uncefact:codelist:specification:66411:2001" xmlns:clmIANAMIMEMediaType="urn:un:unece:uncefact:codelist:specification:IANAMIMEMediaType:2003" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;UDT&lt;/ccts:CategoryCode&gt; * </pre> * * * <pre> * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;ccts:DictionaryEntryName xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:clm54217="urn:un:unece:uncefact:codelist:specification:54217:2001" xmlns:clm5639="urn:un:unece:uncefact:codelist:specification:5639:1988" xmlns:clm66411="urn:un:unece:uncefact:codelist:specification:66411:2001" xmlns:clmIANAMIMEMediaType="urn:un:unece:uncefact:codelist:specification:IANAMIMEMediaType:2003" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;Indicator. Type&lt;/ccts:DictionaryEntryName&gt; * </pre> * * * <pre> * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;ccts:VersionID xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:clm54217="urn:un:unece:uncefact:codelist:specification:54217:2001" xmlns:clm5639="urn:un:unece:uncefact:codelist:specification:5639:1988" xmlns:clm66411="urn:un:unece:uncefact:codelist:specification:66411:2001" xmlns:clmIANAMIMEMediaType="urn:un:unece:uncefact:codelist:specification:IANAMIMEMediaType:2003" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;1.0&lt;/ccts:VersionID&gt; * </pre> * * * <pre> * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;ccts:Definition xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:clm54217="urn:un:unece:uncefact:codelist:specification:54217:2001" xmlns:clm5639="urn:un:unece:uncefact:codelist:specification:5639:1988" xmlns:clm66411="urn:un:unece:uncefact:codelist:specification:66411:2001" xmlns:clmIANAMIMEMediaType="urn:un:unece:uncefact:codelist:specification:IANAMIMEMediaType:2003" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;A list of two mutually exclusive Boolean values that express the only possible states of a property.&lt;/ccts:Definition&gt; * </pre> * * * <pre> * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;ccts:RepresentationTermName xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:clm54217="urn:un:unece:uncefact:codelist:specification:54217:2001" xmlns:clm5639="urn:un:unece:uncefact:codelist:specification:5639:1988" xmlns:clm66411="urn:un:unece:uncefact:codelist:specification:66411:2001" xmlns:clmIANAMIMEMediaType="urn:un:unece:uncefact:codelist:specification:IANAMIMEMediaType:2003" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;Indicator&lt;/ccts:RepresentationTermName&gt; * </pre> * * * <pre> * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;ccts:PrimitiveType xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:clm54217="urn:un:unece:uncefact:codelist:specification:54217:2001" xmlns:clm5639="urn:un:unece:uncefact:codelist:specification:5639:1988" xmlns:clm66411="urn:un:unece:uncefact:codelist:specification:66411:2001" xmlns:clmIANAMIMEMediaType="urn:un:unece:uncefact:codelist:specification:IANAMIMEMediaType:2003" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;string&lt;/ccts:PrimitiveType&gt; * </pre> * * * <pre> * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;xsd:BuiltinType xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:clm54217="urn:un:unece:uncefact:codelist:specification:54217:2001" xmlns:clm5639="urn:un:unece:uncefact:codelist:specification:5639:1988" xmlns:clm66411="urn:un:unece:uncefact:codelist:specification:66411:2001" xmlns:clmIANAMIMEMediaType="urn:un:unece:uncefact:codelist:specification:IANAMIMEMediaType:2003" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2"&gt;boolean&lt;/xsd:BuiltinType&gt; * </pre> * * * */ public boolean isValue() { return value; } /** * Define el valor de la propiedad value. * */ public void setValue(boolean value) { this.value = value; } }
[ "luis.gonzalez@expertla.com" ]
luis.gonzalez@expertla.com
fb71d81fead1030f59eeae3463dc1400c7e27602
a7667b6267041dfe584e5b962ba91e7f2cd5272b
/src/main/java/net/minecraftforge/fml/relauncher/libraries/LinkRepository.java
c9c3cdee6a6b9476f7d330c8ec9d922128fc6bdb
[ "MIT" ]
permissive
8osm/AtomMC
79925dd6bc3123e494f0671ddaf33caa318ea427
9ca248a2e870b3058e90679253d25fdb5b75f41c
refs/heads/master
2020-06-29T14:08:11.184503
2019-08-05T00:44:42
2019-08-05T00:44:42
200,557,840
0
0
MIT
2019-08-05T00:52:31
2019-08-05T00:52:31
null
UTF-8
Java
false
false
3,444
java
/* * Minecraft Forge * Copyright (c) 2016-2018. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation version 2.1 * of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ package net.minecraftforge.fml.relauncher.libraries; import java.io.File; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import net.minecraftforge.fml.common.FMLLog; public class LinkRepository extends Repository { private Map<String, File> artifact_to_file = new HashMap<>(); private Map<String, File> filesystem = new HashMap<>(); private Map<String, Artifact> snapshots = new HashMap<>(); private Set<File> known = new HashSet<>(); LinkRepository(File root) { super(root, "MEMORY"); } public File archive(Artifact artifact, File file, byte[] manifest) { String key = artifact.toString(); known.add(file); if (artifact_to_file.containsKey(key)) { FMLLog.log.debug("Maven file already exists for {}({}) at {}, ignoring duplicate.", file.getName(), artifact.toString(), artifact_to_file.get(key).getAbsolutePath()); if (artifact.isSnapshot()) { Artifact old = snapshots.get(key); if (old == null || old.compareVersion(artifact) < 0) { FMLLog.log.debug("Overriding Snapshot {} -> {}", old == null ? "null" : old.getTimestamp(), artifact.getTimestamp()); snapshots.put(key, artifact); artifact_to_file.put(key, file); filesystem.put(artifact.getPath(), file); } } } else { FMLLog.log.debug("Making maven link for {} in memory to {}.", key, file.getAbsolutePath()); artifact_to_file.put(key, file); filesystem.put(artifact.getPath(), file); if (artifact.isSnapshot()) snapshots.put(key, artifact); /* Support external meta? screw it. if (!LibraryManager.DISABLE_EXTERNAL_MANIFEST) { File meta_target = new File(target.getAbsolutePath() + ".meta"); Files.write(manifest, meta_target); } */ } return file; } @Override public void filterLegacy(List<File> list) { list.removeIf(e -> known.contains(e)); } public Artifact resolve(Artifact artifact) { String key = artifact.toString(); File file = artifact_to_file.get(key); if (file == null || !file.exists()) return super.resolve(artifact); return new Artifact(artifact, this, artifact.isSnapshot() ? artifact.getTimestamp() : null); } @Override public File getFile(String path) { return filesystem.containsKey(path) ? filesystem.get(path) : super.getFile(path); } }
[ "rostyk1@hotmail.com" ]
rostyk1@hotmail.com
e134fc991d7acddfb74d3d97c2f552868a3f56cb
7961133bd042d73e83871877378ef55579b63058
/src/main/java/com/siwuxie095/spring/chapter1st/example3rd/HelloWorldBean.java
142e33ba5804651a8859782e472896c14f8919f0
[]
no_license
siwuxie095/spring-practice
f234c14f33e468538fb620b4dd8648526fc2d28c
7fa5aeaa5c81efd30a5c3d9e0d1396d0f866b056
refs/heads/master
2023-04-08T03:33:46.620416
2021-04-03T06:57:19
2021-04-03T06:57:19
319,481,337
0
0
null
null
null
null
UTF-8
Java
false
false
308
java
package com.siwuxie095.spring.chapter1st.example3rd; /** * Spring 不会在 HelloWorldBean 上有任何不合理的要求 * * @author Jiajing Li * @date 2020-12-11 08:21:56 */ @SuppressWarnings("all") public class HelloWorldBean { public String sayHello() { return "Hello World"; } }
[ "834879583@qq.com" ]
834879583@qq.com
63d41eb9c0d9017b62ae1f18f17de8516fe440de
29778169d6d896cbc8c4e0dad6563fbd46c673f6
/money-api/core/src/test/java/javax/money/UnknownCurrencyExceptionTest.java
c7687b5ff35f853b41d09ea06b88fe8eab512e9a
[ "Apache-2.0" ]
permissive
laxmi-narayan-nitdgp/javamoney
b8c9606b82dde4b37f377f57f20ecc58d1249d22
a23d222c7fdffd9690ddbae0fd2c129e2d361678
refs/heads/master
2020-04-03T01:55:35.639033
2013-02-23T19:47:05
2013-02-23T19:47:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,001
java
/* * Copyright (c) 2012-2013, Credit Suisse * * 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 JSR-354 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. */ package javax.money; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import org.junit.Test; /** * Tests the {@link UnknownCurrencyException} class. * * @author Anatole Tresch */ public class UnknownCurrencyExceptionTest { @Test public void testIsRuntimeException() { assertTrue(RuntimeException.class.isAssignableFrom(UnknownCurrencyException.class)); } /** * Test method for * {@link javax.money.UnknownCurrencyException#UnknownCurrencyException(java.lang.String, java.lang.String)} * . */ @Test public void testUnknownCurrencyException() { new UnknownCurrencyException("ns", "code"); } /** * Test method for * {@link javax.money.UnknownCurrencyException#UnknownCurrencyException(java.lang.String, java.lang.String)} * . */ @Test(expected = IllegalArgumentException.class) public void testUnknownCurrencyException_NoNamespace() throws IllegalArgumentException{ new UnknownCurrencyException(null, "code"); } /** * Test method for * {@link javax.money.UnknownCurrencyException#UnknownCurrencyException(java.lang.String, java.lang.String)} * . */ @Test(expected = IllegalArgumentException.class) public void testUnknownCurrencyException_NoCode() throws IllegalArgumentException{ new UnknownCurrencyException("ns", null); } /** * Test method for * {@link javax.money.UnknownCurrencyException#UnknownCurrencyException(java.lang.String, java.lang.String)} * . */ @Test(expected = IllegalArgumentException.class) public void testUnknownCurrencyException_NoParams() throws IllegalArgumentException{ new UnknownCurrencyException(null, null); } /** * Test method for * {@link javax.money.UnknownCurrencyException#getNamespace()}. */ @Test public void testGetNamespace() { UnknownCurrencyException ex = new UnknownCurrencyException("ns", "code"); assertNotNull(ex.getNamespace()); assertEquals("ns", ex.getNamespace()); } /** * Test method for * {@link javax.money.UnknownCurrencyException#getCurrencyCode()}. */ @Test public void testGetCurrencyCode() { UnknownCurrencyException ex = new UnknownCurrencyException("ns", "code01"); assertNotNull(ex.getCurrencyCode()); assertEquals("code01", ex.getCurrencyCode()); } }
[ "atsticks@gmail.com" ]
atsticks@gmail.com
e24ace9090a83ef1465e55c927f97a9e571b0b2f
0ea271177f5c42920ac53cd7f01f053dba5c14e4
/5.3.5/sources/com/coremedia/iso/boxes/AbstractMediaHeaderBox.java
18152781b4210a7cf9538d79e0feceb82a451f89
[]
no_license
alireza-ebrahimi/telegram-talaeii
367a81a77f9bc447e729b2ca339f9512a4c2860e
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
refs/heads/master
2020-03-21T13:44:29.008002
2018-12-09T10:30:29
2018-12-09T10:30:29
138,622,926
12
1
null
null
null
null
UTF-8
Java
false
false
236
java
package com.coremedia.iso.boxes; import com.googlecode.mp4parser.AbstractFullBox; public abstract class AbstractMediaHeaderBox extends AbstractFullBox { protected AbstractMediaHeaderBox(String type) { super(type); } }
[ "alireza.ebrahimi2006@gmail.com" ]
alireza.ebrahimi2006@gmail.com
2662527e9b556bf6ce63060b405f8ed415a8b630
7c98f4363a16933b9886b59996f249957b752cd8
/scratch-frontend-examples-test/scratch-frontend-examples-acceptance/src/test/java/scratch/frontend/examples/page/SeleniumSignInPageTest.java
0504fe09dea9595abced4737ea77cd16dfcd0055
[]
no_license
karlbennett/scratch-frontend-examples
38b900d773f85293d95c1006e058e5ce67187bfc
0c20320395d558885f680c3c1b3b06f1bcba896f
refs/heads/master
2021-01-20T00:22:17.471162
2017-09-18T22:46:35
2017-09-18T22:46:35
89,123,296
0
0
null
null
null
null
UTF-8
Java
false
false
1,107
java
package scratch.frontend.examples.page; import acceptance.scratch.frontend.examples.finder.Finders; import acceptance.scratch.frontend.examples.page.SeleniumSignInPage; import org.junit.Test; import scratch.frontend.examples.domain.User; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static shiver.me.timbers.data.random.RandomStrings.someString; public class SeleniumSignInPageTest { @Test public void Can_sign_in() { final Finders finders = mock(Finders.class); final User user = mock(User.class); final String username = someString(); final String password = someString(); // Given given(user.getUsername()).willReturn(username); given(user.getPassword()).willReturn(password); // When new SeleniumSignInPage(finders).signIn(user); // Then verify(finders).setTextByLabel("Username", username); verify(finders).setTextByLabel("Password", password); verify(finders).clickByValue("Sign In"); } }
[ "karl.bennett.smt@gmail.com" ]
karl.bennett.smt@gmail.com
10b507ebc1fff77c7afb722b33b226be0ae2012b
bfaa3169609e7a5419b4ac915f31b634a1aa80bb
/src/scriptjava/ValueMutable.java
d631a2618e302cece0265cd97a5dda2e796dc0f2
[ "Apache-2.0" ]
permissive
zongwu233/ScriptJava
d4f99f915d10a5e20f44bbb3772a666311ad09bb
fb5878fc3a87d6382a6fb50b30cbe651ebf0664a
refs/heads/master
2021-01-21T16:31:17.448297
2016-08-26T12:36:51
2016-08-26T12:36:51
66,645,284
1
0
null
2016-08-26T12:17:49
2016-08-26T12:17:49
null
UTF-8
Java
false
false
979
java
/* * Copyright 2016 Dimitry Ivanov (copy@dimitryivanov.ru) * * 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 scriptjava; public class ValueMutable<T> implements Value<T> { private T value; public ValueMutable() { } public ValueMutable(T initialValue) { this.value = initialValue; } @Override public T get() { return value; } @Override public void set(T value) { this.value = value; } }
[ "mail@dimitryivanov.ru" ]
mail@dimitryivanov.ru
14925c95ad87357ac4d7e6de4eb08eb560e51a2a
7ef5088ff8142569857c5f2fa3c8d77f360d4061
/archived/itp/classes/nature/week08/examples74/arrive/steering5.java
105256d24b90dbfcb69c9077b1c312488a5ddba3
[]
no_license
shiffman/shiffman.net
3b361720d0f93fffc9c76c95c48a23e606c7dc1f
31a661b53c92091dffadd60bb51e2ce3bb79b8d6
refs/heads/gh-pages
2023-05-11T21:01:25.069462
2023-04-29T15:49:21
2023-04-29T15:49:21
9,962,923
153
103
null
2023-04-29T15:47:16
2013-05-09T16:08:23
JavaScript
UTF-8
Java
false
false
4,791
java
import processing.core.*; import java.applet.*; import java.awt.*; import java.awt.image.*; import java.awt.event.*; import java.io.*; import java.net.*; import java.text.*; import java.util.*; import java.util.zip.*; public class steering5 extends PApplet { //An instance of Boid Boid b; public void setup() { size(600,400); colorMode(RGB,255,255,255,100); b = new Boid(new Vector3D(width/2,height/2),5.0f,0.1f); smooth(); } public void draw() { background(0); //Draw an ellipse at the mouse location int mx = mouseX; int my = mouseY; fill(100); noStroke(); ellipse(mx,my,30,30); //call some behaviors on our agent //b.wander(); //b.seek(new Vector3D(mx,my)); b.arrive(new Vector3D(mx,my)); b.run(); } //our Boid extends Particle, has a few more properties class Boid extends Particle { float wandertheta; //the "wander" angle float maxforce,maxspeed; //maxforce for steering, maxspeed for vel Boid(Vector3D l, float ms, float mf) { super(l); r = 4.0f; wandertheta = 0.0f; maxspeed = ms; maxforce = mf; } void run() { update(); borders(); render(); } //function to update location void update() { vel.add(acc); vel.limit(maxspeed); loc.add(vel); acc.setXYZ(0,0,0); } void seek(Vector3D target) { acc.add(steer(target,false)); } void arrive(Vector3D target) { acc.add(steer(target,true)); } void wander() { float wanderR = 10.0f; //radius for our "wander circle" float wanderD = 20.0f; //distance for our "wander circle" wandertheta += random(-1,1); //randomly changet wander theta //now we have to calculate the new location to steer towards on the wander circle Vector3D v = vel.copy(); v.normalize(); //our heading float xoff = wanderD * v.x() + wanderR * cos(wandertheta); //x spot on circle based on heading float yoff = wanderD * v.y() + wanderR * sin(wandertheta); //y spot on circle based on heading Vector3D target = Vector3D.add(loc,new Vector3D(xoff,yoff)); //add the location acc.add(steer(target,false)); //steer towards it } //a method that calculates a steering vector towards a target //takes a second argument, if true, it slows down as it approaches the target Vector3D steer(Vector3D target, boolean slowdown) { Vector3D steer; //the steering vector Vector3D desired = Vector3D.sub(target,loc); //a vector pointing from the location to the target float d = desired.magnitude(); //distance from the target is the magnitude of the vector //if the distance is greater than 0, calc steering (otherwise return zero vector) if (d > 0) { //normalize desired desired.normalize(); //two options for magnitude (1 -- based on distance, 2 -- maxspeed) if ((slowdown) && (d < 100.0f)) desired.mult(maxspeed*(d/100.0f)); else desired.mult(maxspeed); //STEERING VECTOR IS DESIREDVECTOR MINUS VELOCITY steer = Vector3D.sub(desired,vel); steer.limit(maxforce); //limit to maximum steering force } else { steer = new Vector3D(0,0); } return steer; } void render() { //draws a triangle rotated in the direction of velocity float theta = vel.heading2D() + radians(90); fill(200); stroke(255); push(); translate(loc.x(),loc.y()); rotateZ(theta); beginShape(TRIANGLES); vertex(0, -r*2); vertex(-r, r*2); vertex(r, r*2); endShape(); pop(); } void borders() { if (loc.x() < -r) loc.setX(width+r); if (loc.y() < -r) loc.setY(height+r); if (loc.x() > width+r) loc.setX(-r); if (loc.y() > height+r) loc.setY(-r); } } /*A class to describe a one singular particle*/ class Particle { Vector3D loc; Vector3D vel; Vector3D acc; float r; float timer; //The Constructor (called when the object is first created) Particle(Vector3D a, Vector3D v, Vector3D l, float r_) { acc = a.copy(); vel = v.copy(); loc = l.copy(); r = r_; timer = 100.0f; } //look, we can have more than one constructor! Particle(Vector3D l) { acc = new Vector3D(0,0.05f,0); //ooooh, bad random, random bad vel = new Vector3D(random(-1,1),random(-2,0),0); loc = l.copy(); r = 10.0f; timer = 100.0f; } void run() { update(); render(); } //function to update location void update() { vel.add(acc); loc.add(vel); timer -= 1.0f; } //function to display void render() { ellipseMode(CENTER); noStroke(); fill(0,100,255,timer); ellipse(loc.x(),loc.y(),r,r); } //is the particle still useful? boolean dead() { if (timer <= 0.0f) { return true; } else { return false; } } } }
[ "daniel@shiffman.net" ]
daniel@shiffman.net
85eef97cbd47d68af51e4bfcd70348850fc7de66
e0f11e0fb453f2c29a781129f0a6065299bc3e1e
/protocols/isis/isisio/src/test/java/org/onosproject/isis/io/isispacket/tlv/subtlv/SubTlvToBytesTest.java
f6f2ac8fed4e6f3c27dfc93c4bece5b109154b1d
[ "Apache-2.0" ]
permissive
TransportSDN/onos
f8ab40ba562329bfe55a14b7fff95978d3686e40
da27f529410df067170517c2e678a0ec0940f498
refs/heads/master
2020-04-06T05:48:53.864784
2016-07-08T05:05:39
2016-07-08T05:06:45
62,899,771
2
1
null
2016-08-27T15:21:58
2016-07-08T15:47:37
Java
UTF-8
Java
false
false
2,453
java
package org.onosproject.isis.io.isispacket.tlv.subtlv; import org.easymock.EasyMock; import org.jboss.netty.buffer.ChannelBuffer; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.onosproject.isis.io.isispacket.tlv.TlvHeader; import java.util.List; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; /** * Unit test class for SubTlvToBytes. */ public class SubTlvToBytesTest { private TlvHeader tlvHeader; private ChannelBuffer channelBuffer; private List<Byte> tlv; @Before public void setUp() throws Exception { tlvHeader = new TlvHeader(); channelBuffer = EasyMock.createMock(ChannelBuffer.class); } @After public void tearDown() throws Exception { tlvHeader = null; channelBuffer = null; } @Test public void testTlvToBytes() throws Exception { tlvHeader.setTlvLength(4); tlvHeader.setTlvType(9); AdministrativeGroup administrativeGroup = new AdministrativeGroup(tlvHeader); tlv = SubTlvToBytes.tlvToBytes(administrativeGroup); assertThat(tlv, is(notNullValue())); tlvHeader = new TlvHeader(); tlvHeader.setTlvLength(4); tlvHeader.setTlvType(5); TrafficEngineeringMetric trafficEngineeringMetric = new TrafficEngineeringMetric(tlvHeader); tlv = SubTlvToBytes.tlvToBytes(trafficEngineeringMetric); assertThat(tlv, is(notNullValue())); tlvHeader = new TlvHeader(); tlvHeader.setTlvLength(4); tlvHeader.setTlvType(6); MaximumBandwidth maximumBandwidth = new MaximumBandwidth(tlvHeader); tlv = SubTlvToBytes.tlvToBytes(maximumBandwidth); assertThat(tlv, is(notNullValue())); tlvHeader = new TlvHeader(); tlvHeader.setTlvLength(4); tlvHeader.setTlvType(7); MaximumReservableBandwidth maximumReservableBandwidth = new MaximumReservableBandwidth(tlvHeader); tlv = SubTlvToBytes.tlvToBytes(maximumReservableBandwidth); assertThat(tlv, is(notNullValue())); tlvHeader = new TlvHeader(); tlvHeader.setTlvLength(4); tlvHeader.setTlvType(8); UnreservedBandwidth unreservedBandwidth = new UnreservedBandwidth(tlvHeader); tlv = SubTlvToBytes.tlvToBytes(unreservedBandwidth); assertThat(tlv, is(notNullValue())); } }
[ "gerrit@onlab.us" ]
gerrit@onlab.us
1c8b9db1202a8831dd97830c3cd2c0a4ae2aeddf
5d1817ba4bef44bae537d9bd8b99603baf48615e
/src/main/java/com/sefryek/brokerpro/dto/request/alert/enumeration/AlertTypesRequest.java
de087d1a468f34d57b39958493bb7279d6060004
[]
no_license
esi123456/project
bfb5426d1712ee1b6d740d893c17c04d00481c06
b032107d264f7166a35c7109ffc5d3496f026744
refs/heads/master
2021-01-25T11:20:30.596839
2018-03-01T09:40:57
2018-03-01T09:40:57
123,392,985
0
1
null
null
null
null
UTF-8
Java
false
false
1,051
java
package com.sefryek.brokerpro.dto.request.alert.enumeration; import com.fasterxml.jackson.annotation.JsonCreator; import com.sefryek.util.StringUtils; /** * Copyright 2016 (C) sefryek.com * * @author: Amin Malekpour * @email: amin.malekpour@hotmail.com * @date: 30, Apr, 2017 */ public enum AlertTypesRequest { NONE("None"), SEND_ORDER("SendOrder"), SMS("SMS"), POP_UP("PopUp"), SMS_POP_UP("SMS_PopUp"); private String value; AlertTypesRequest(String value) { this.value = value; } @JsonCreator public static AlertTypesRequest fromString(String key) { if (StringUtils.isEmpty(key)) { return NONE; } for (AlertTypesRequest alertTypesRequest : AlertTypesRequest.values()) { if (alertTypesRequest.name().equalsIgnoreCase(key)) { return alertTypesRequest; } } return NONE; // FIXME: 2/6/2017 change to another value or return exception } public String getValue() { return value; } }
[ "esmailsadeghi11@gmail.com" ]
esmailsadeghi11@gmail.com
e3cb5d7abc1494dd2bdaedda4b38c76e5bc59fe7
c3cf33e7b9fe20ff3124edcfc39f08fa982b2713
/pocs/terraform-cdk-fun/src/main/java/imports/kubernetes/DaemonsetSpecTemplateSpecInitContainerReadinessProbeExec.java
88217e0937a8cd5bcfee53f5cd53aff43b20cf96
[ "Unlicense" ]
permissive
diegopacheco/java-pocs
d9daa5674921d8b0d6607a30714c705c9cd4c065
2d6cc1de9ff26e4c0358659b7911d2279d4008e1
refs/heads/master
2023-08-30T18:36:34.626502
2023-08-29T07:34:36
2023-08-29T07:34:36
107,281,823
47
57
Unlicense
2022-03-23T07:24:08
2017-10-17T14:42:26
Java
UTF-8
Java
false
false
6,021
java
package imports.kubernetes; @javax.annotation.Generated(value = "jsii-pacmak/1.30.0 (build adae23f)", date = "2021-06-16T06:12:12.478Z") @software.amazon.jsii.Jsii(module = imports.kubernetes.$Module.class, fqn = "kubernetes.DaemonsetSpecTemplateSpecInitContainerReadinessProbeExec") @software.amazon.jsii.Jsii.Proxy(DaemonsetSpecTemplateSpecInitContainerReadinessProbeExec.Jsii$Proxy.class) public interface DaemonsetSpecTemplateSpecInitContainerReadinessProbeExec extends software.amazon.jsii.JsiiSerializable { /** * Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. * <p> * The command is simply exec'd, it is not run inside a shell, so traditional shell instructions. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. * <p> * Docs at Terraform Registry: {&#64;link https://www.terraform.io/docs/providers/kubernetes/r/daemonset.html#command Daemonset#command} */ default @org.jetbrains.annotations.Nullable java.util.List<java.lang.String> getCommand() { return null; } /** * @return a {@link Builder} of {@link DaemonsetSpecTemplateSpecInitContainerReadinessProbeExec} */ static Builder builder() { return new Builder(); } /** * A builder for {@link DaemonsetSpecTemplateSpecInitContainerReadinessProbeExec} */ public static final class Builder implements software.amazon.jsii.Builder<DaemonsetSpecTemplateSpecInitContainerReadinessProbeExec> { private java.util.List<java.lang.String> command; /** * Sets the value of {@link DaemonsetSpecTemplateSpecInitContainerReadinessProbeExec#getCommand} * @param command Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. * The command is simply exec'd, it is not run inside a shell, so traditional shell instructions. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. * <p> * Docs at Terraform Registry: {&#64;link https://www.terraform.io/docs/providers/kubernetes/r/daemonset.html#command Daemonset#command} * @return {@code this} */ public Builder command(java.util.List<java.lang.String> command) { this.command = command; return this; } /** * Builds the configured instance. * @return a new instance of {@link DaemonsetSpecTemplateSpecInitContainerReadinessProbeExec} * @throws NullPointerException if any required attribute was not provided */ @Override public DaemonsetSpecTemplateSpecInitContainerReadinessProbeExec build() { return new Jsii$Proxy(command); } } /** * An implementation for {@link DaemonsetSpecTemplateSpecInitContainerReadinessProbeExec} */ @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DaemonsetSpecTemplateSpecInitContainerReadinessProbeExec { private final java.util.List<java.lang.String> command; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.command = software.amazon.jsii.Kernel.get(this, "command", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final java.util.List<java.lang.String> command) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.command = command; } @Override public final java.util.List<java.lang.String> getCommand() { return this.command; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); if (this.getCommand() != null) { data.set("command", om.valueToTree(this.getCommand())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("kubernetes.DaemonsetSpecTemplateSpecInitContainerReadinessProbeExec")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DaemonsetSpecTemplateSpecInitContainerReadinessProbeExec.Jsii$Proxy that = (DaemonsetSpecTemplateSpecInitContainerReadinessProbeExec.Jsii$Proxy) o; return this.command != null ? this.command.equals(that.command) : that.command == null; } @Override public final int hashCode() { int result = this.command != null ? this.command.hashCode() : 0; return result; } } }
[ "diego.pacheco.it@gmail.com" ]
diego.pacheco.it@gmail.com
4c3e2b66ef1db110a66c3e259fdf2ca9d8ccb2ee
087136b0ead4dde00b557a02a181be6ea7081c9a
/SupetsCamera/thirdlib/MotuSDKLib/src_sdk/cn/jingling/lib/utils/ArraysUtil.java
06d4f7965c3af19fdf1399ad3524ef0e0870a26b
[]
no_license
JiShangShiDai/supets-camera
34fb32d16ebeb8de5d0271dbc9fa83314998895c
4976922fd77cfc62afbe64836185faa03642254f
refs/heads/master
2021-05-14T10:59:44.532044
2017-08-09T03:57:56
2017-08-09T03:57:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
880
java
package cn.jingling.lib.utils; public class ArraysUtil { public static int[] copyOf(int[] src) { int[] dst = new int[src.length]; for (int i = 0; i < src.length; i ++) { dst[i] = src[i]; } return dst; } public static int[] copyOf(String[] src) { int[] dst = new int[src.length]; for (int i = 0; i < src.length; i ++) { dst[i] = Integer.parseInt(src[i]); } return dst; } public static String toString(int[] src, String split) { if (src == null || src.length < 1) { return ""; } StringBuilder builder = new StringBuilder(); for (int i = 0; i < src.length; i++) { builder.append(src[i]); if (i != (src.length - 1)) { builder.append(split); } } return builder.toString(); } public static int[] toArray(String src, String split) { String[] strArray = src.split(split); return ArraysUtil.copyOf(strArray); } }
[ "lihongjiang@supets.com" ]
lihongjiang@supets.com
589c1ab87fb6fe87a7608f68f569b2d79da144de
81b96ca92ea792b32c72be8aadfc53efb9df1312
/src/com/syntax/class23/MethodOverloading/Calculator.java
c8d58ed2e4c069d232a38c61641b719ca8dc3b03
[]
no_license
Elizabeth8353/Intelij-Batch-10
1d21c8094050430cd176c9218a59aeb9544f0ae3
e7d8004eee5a3f201eb053c842ec888ebac3161f
refs/heads/main
2023-08-24T03:47:21.629009
2021-10-23T04:22:31
2021-10-23T04:22:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
386
java
package com.syntax.class23.MethodOverloading; public class Calculator { void add(int num1,int num2){ System.out.println(num1+num2); } void addDouble(double num1,double num2){ System.out.println(num1+num2); } void addArray(int[] arr){ int sum=0; for(int a:arr){ sum+=a; } System.out.println(sum); } }
[ "evaldivieso6@gmail.com" ]
evaldivieso6@gmail.com
9fbd5e7b0234e2a0503dfca076b03a3ddb7cb797
46a109afe41f667dfe7bf7e4ad4a634596bd6e7d
/src/com/mainacad/runner/TreeSetRunner.java
c50b19edd5ffacee62dae856e0116343cef62264
[]
no_license
Antoninadan/MainAcademyJavaCollections
e0b4c194290bf7a30d77e8d4d53db26722674e01
198de23c4c1c387c317f13650b3620a60085b5b6
refs/heads/master
2020-08-10T23:13:10.191368
2020-05-14T13:23:01
2020-05-14T13:23:01
214,440,904
0
0
null
null
null
null
UTF-8
Java
false
false
362
java
package com.mainacad.runner; import java.util.TreeSet; public class TreeSetRunner { public static void main(String[] args) { TreeSet<Integer> treeSet = new TreeSet<Integer>(); treeSet.add(34); treeSet.add(3); treeSet.add(102); treeSet.add(102); treeSet.add(-3); System.out.println(treeSet); } }
[ "mail100@i.ua" ]
mail100@i.ua
c837805d2045d8747ce2b6919ce42ce1e705f306
d099b49dc23a0af079ae1c172afb1b7b40b9fc30
/src/main/java/org/apache/camel/salesforce/dto/RecordIdEnum.java
d6cf585074b7f07b3dab8428a0d5d52dc53fc08c
[]
no_license
jorgecanoc/salesforce-demo
a5bea92dd33f7327d0694ebe03eb00987e586b50
5dfa7c1cb1bbbb88cc24dcbdd302006a86ad1d57
refs/heads/master
2021-01-10T09:21:54.522025
2016-03-04T19:29:39
2016-03-04T19:29:39
53,092,243
0
0
null
null
null
null
UTF-8
Java
false
false
827
java
/* * Salesforce DTO generated by camel-salesforce-maven-plugin * Generated on: Thu Feb 11 22:46:57 CST 2016 */ package org.apache.camel.salesforce.dto; import org.codehaus.jackson.annotate.JsonCreator; import org.codehaus.jackson.annotate.JsonValue; /** * Salesforce Enumeration DTO for picklist RecordId */ public enum RecordIdEnum { ; // empty picklist! final String value; private RecordIdEnum(String value) { this.value = value; } @JsonValue public String value() { return this.value; } @JsonCreator public static RecordIdEnum fromValue(String value) { for (RecordIdEnum e : RecordIdEnum.values()) { if (e.value.equals(value)) { return e; } } throw new IllegalArgumentException(value); } }
[ "jorge.canoc@gmail.com" ]
jorge.canoc@gmail.com
c8456bc1d6149e1831c19cbd8e382506b0c8e647
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_fb657892d263b541a79005b57dd34ed376856301/EventProducerTestModule/9_fb657892d263b541a79005b57dd34ed376856301_EventProducerTestModule_s.java
77436809af767891726fb90952c721f54b5f35dd
[]
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,642
java
package org.jboss.errai.cdi.client; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.PostConstruct; import javax.enterprise.event.Observes; import javax.inject.Inject; import org.jboss.errai.cdi.client.api.Event; import org.jboss.errai.cdi.client.event.ReceivedEvent; import org.jboss.errai.cdi.client.events.BusReadyEvent; import org.jboss.errai.cdi.client.qualifier.A; import org.jboss.errai.cdi.client.qualifier.B; import org.jboss.errai.cdi.client.qualifier.C; import org.jboss.errai.ioc.client.api.EntryPoint; /** * Test module used by {@see EventProducerIntegrationTest}. * * @author Christian Sadilek <csadilek@redhat.com> */ @EntryPoint public class EventProducerTestModule { private boolean busReadyEventReceived = false; private static EventProducerTestModule instance; private Map<String, List<String>> receivedEventsOnServer = new HashMap<String, List<String>>(); @Inject private Event<String> event; @Inject @A private Event<String> eventA; @Inject @B private Event<String> eventB; @Inject @C private Event<String> eventC; @Inject @A @B private Event<String> eventAB; @Inject @B @C private Event<String> eventBC; @Inject @A @C private Event<String> eventAC; @Inject @A @B @C private Event<String> eventABC; @PostConstruct public void doPostConstruct() { instance = this; } public static EventProducerTestModule getInstance() { return instance; } public boolean getBusReadyEventsReceived() { return busReadyEventReceived; } /** * count the {@link BusReadyEvents} */ public void onBusReady(@Observes BusReadyEvent event) { busReadyEventReceived = true; } public void fireAll() { fire(); fireA(); fireB(); fireC(); fireAB(); fireAC(); fireBC(); fireABC(); } public void fire() { event.fire(""); } public void fireA() { eventA.fire("A"); } public void fireB() { eventB.fire("B"); } public void fireC() { eventC.fire("C"); } public void fireAB() { eventAB.fire("AB"); } public void fireBC() { eventBC.fire("BC"); } public void fireAC() { eventAC.fire("AC"); } public void fireABC() { eventABC.fire("ABC"); } public Event<String> getEvent() { return event; } public Event<String> getEventA() { return eventA; } public Event<String> getEventB() { return eventB; } public Event<String> getEventC() { return eventC; } public Event<String> getEventAB() { return eventAB; } public Event<String> getEventBC() { return eventBC; } public Event<String> getEventAC() { return eventAC; } public Event<String> getEventABC() { return eventABC; } public void collectResults(@Observes ReceivedEvent event) { List<String> events = receivedEventsOnServer.get(event.getReceiver()); if (events == null) events = new ArrayList<String>(); events.add(event.getEvent()); receivedEventsOnServer.put(event.getReceiver(), events); } public Map<String, List<String>> getReceivedEventsOnServer() { return receivedEventsOnServer; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
9ff794e07f49f1332b3df2f2571f351c3dd33626
155d7e5c1543f6d102479de8e54527f4b77a1b38
/server-core/src/main/java/io/onedev/server/model/support/issue/field/spec/userchoicefield/defaultmultivalueprovider/ScriptingDefaultMultiValue.java
18bf05effe2564530e5c536b578e581051ca1518
[ "MIT" ]
permissive
theonedev/onedev
0945cbe8c2ebeeee781ab88ea11363217bf1d0b7
1ec9918988611d5eb284a21d7e94e071c7b48aa7
refs/heads/main
2023-08-22T22:37:29.554139
2023-08-22T14:52:13
2023-08-22T14:52:13
156,317,154
12,162
880
MIT
2023-08-07T02:33:21
2018-11-06T02:57:01
Java
UTF-8
Java
false
false
1,116
java
package io.onedev.server.model.support.issue.field.spec.userchoicefield.defaultmultivalueprovider; import io.onedev.server.annotation.Editable; import io.onedev.server.annotation.OmitName; import io.onedev.server.annotation.ScriptChoice; import io.onedev.server.util.GroovyUtils; import javax.validation.constraints.NotEmpty; import java.util.List; @Editable(order=400, name="Evaluate script to get default value") public class ScriptingDefaultMultiValue implements DefaultMultiValueProvider { private static final long serialVersionUID = 1L; private String scriptName; @Editable(description="Groovy script to be evaluated. It should return list of string. " + "Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details") @ScriptChoice @OmitName @NotEmpty public String getScriptName() { return scriptName; } public void setScriptName(String scriptName) { this.scriptName = scriptName; } @SuppressWarnings("unchecked") @Override public List<String> getDefaultValue() { return (List<String>) GroovyUtils.evalScriptByName(scriptName); } }
[ "robin@onedev.io" ]
robin@onedev.io
697b1db70f7a1d87a7e579c71a192fcaa939a9b8
42c47380a0849b16f084fe511baebb5f96c1c064
/app/src/main/java/com/example/lxx/myalipay/ui/staff/apply/ui/fragment3/adapter/RepairAdapter.java
06d62d74f7a87715e31e910295bfc894384794ef
[]
no_license
lixixiang/Honpe2
813a06e5ee9dfe5ea31561370a12ee752ea3b42b
0049e7d31b8f7988c82890527001cf27b07dd94b
refs/heads/master
2022-03-31T11:31:20.931256
2019-12-10T08:39:37
2019-12-10T08:39:37
227,068,393
0
1
null
null
null
null
UTF-8
Java
false
false
6,171
java
package com.example.lxx.myalipay.ui.staff.apply.ui.fragment3.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseExpandableListAdapter; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; import com.example.lxx.myalipay.R; import com.example.lxx.myalipay.ui.staff.apply.ui.fragment3.bean.RepairBean; import java.util.List; /** * created by lxx at 2019/11/28 17:33 * 描述:维修单适配器 */ public class RepairAdapter extends BaseExpandableListAdapter { private LayoutInflater inflater; private Context context; private List<RepairBean> data; public RepairAdapter(Context context, List<RepairBean> data) { this.context = context; this.data = data; this.inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } @Override public int getGroupCount() { return data.size(); } @Override public int getChildrenCount(int groupPosition) { return data.get(groupPosition).getDetailListBeans().size(); } @Override public Object getGroup(int groupPosition) { return data.get(groupPosition); } @Override public Object getChild(int groupPosition, int childPosition) { return data.get(groupPosition).getDetailListBeans().get(childPosition); } @Override public long getGroupId(int groupPosition) { return groupPosition; } @Override public long getChildId(int groupPosition, int childPosition) { return childPosition; } @Override public boolean hasStableIds() { return true; } @Override public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { ParentViewHolder parentViewHolder; if (null == convertView) { convertView = inflater.inflate(R.layout.item_repair, parent, false); parentViewHolder = new ParentViewHolder(convertView); convertView.setTag(parentViewHolder); } else { parentViewHolder = (ParentViewHolder) convertView.getTag(); } RepairBean bean = data.get(groupPosition); parentViewHolder.tvDepart.setText(bean.getDepart()); parentViewHolder.userName.setText(bean.getUserName()); parentViewHolder.tvOrderNo.setText(bean.getOrderId()); parentViewHolder.tvOrderCause.setText(bean.getCause()); parentViewHolder.tvTime.setText(bean.getApplyDate()); parentViewHolder.iconIndex.setImageResource(isExpanded ? R.drawable.ic_top : R.drawable.ic_bottom); // parentViewHolder.view0.setVisibility(isExpanded ? View.VISIBLE : View.GONE); return convertView; } @Override public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { ChildViewHolder childViewHolder; if (null == convertView) { convertView = inflater.inflate(R.layout.item_repair_list_detail, parent, false); childViewHolder = new ChildViewHolder(convertView); convertView.setTag(childViewHolder); }else{ childViewHolder = (ChildViewHolder) convertView.getTag(); } RepairBean.DetailListBean bean = data.get(groupPosition).getDetailListBeans().get(childPosition); childViewHolder.tvItem.setText("("+bean.getRepairItem()+")"); childViewHolder.tvPoint.setText(bean.getPoint()); childViewHolder.tvHours.setText(bean.getTime()); childViewHolder.tvType.setText(bean.getType()); childViewHolder.tvFinishTime.setText(bean.getFinishTime()); childViewHolder.tvUserName.setText(bean.getRepairMan()); childViewHolder.tvApplydepartConfirm.setText(bean.isConfirm()?"完成":"未完成"); childViewHolder.tvCause.setText(bean.getCause()); childViewHolder.tvChecked.setText(bean.getDianGonConfirm()); childViewHolder.tvResult.setText(bean.getResultCommit()); childViewHolder.btnChangeState.setText("去完成"); return convertView; } @Override public boolean isChildSelectable(int groupPosition, int childPosition) { return true; } class ParentViewHolder { private TextView tvDepart, userName, tvOrderNo, tvOrderCause, tvStatus, tvTime; private ImageView iconIndex; // private View view0; private ParentViewHolder(View view) { tvDepart = view.findViewById(R.id.tv_depart); userName = view.findViewById(R.id.tv_applyPerson); tvOrderNo = view.findViewById(R.id.tv_order_no); tvOrderCause = view.findViewById(R.id.tv_orderCause); tvStatus = view.findViewById(R.id.tv_status); tvTime = view.findViewById(R.id.tv_time); iconIndex = view.findViewById(R.id.icon_index); // view0 = view.findViewById(R.id.view0); } } class ChildViewHolder{ private TextView tvItem,tvPoint,tvHours,tvType,tvFinishTime,tvUserName,tvApplydepartConfirm,tvCause, tvChecked,tvResult; private Button btnChangeState; private ChildViewHolder(View view){ tvItem = view.findViewById(R.id.tv_item); //维修项目 tvPoint = view.findViewById(R.id.tv_point); //位置 tvHours = view.findViewById(R.id.tv_hours); //工时 tvType = view.findViewById(R.id.tv_type); //类型 tvFinishTime = view.findViewById(R.id.tv_finish_time);//完成时间 tvUserName = view.findViewById(R.id.tv_userName); //维修人 tvApplydepartConfirm = view.findViewById(R.id.tv_apply_depart_confirm);//申请部门确认 tvCause = view.findViewById(R.id.tv_cause); //原因 tvChecked = view.findViewById(R.id.tv_checked); //电工鉴定 tvResult = view.findViewById(R.id.tv_result); //鉴定结果 btnChangeState = view.findViewById(R.id.apply_succeed);//完成按钮 } } }
[ "2914424169@qq.com" ]
2914424169@qq.com
ddd901b6dcab11526afa7ffdb71a3e8f915063ce
0169de90b19e031608d6ca6a7fb47bc8448953a4
/docs/command/Parser分析/005 parseInsert分析.java
de53b04ea1bda904ef519f220d136a3caf95af12
[]
no_license
zwqjsj0404/H2-Research
70d96c1fd08c31e8bacd6579274635f5a570affd
bdc6b9ec1cb5c30a2c841afd478bbaf72c4d7dda
refs/heads/master
2021-01-18T00:23:41.173885
2013-04-09T14:42:11
2013-04-09T14:42:11
null
0
0
null
null
null
null
GB18030
Java
false
false
2,736
java
private Insert parseInsert() { Insert command = new Insert(session); currentPrepared = command; read("INTO"); Table table = readTableOrView(); command.setTable(table); Column[] columns = null; if (readIf("(")) { if (isSelect()) { command.setQuery(parseSelect()); read(")"); return command; } columns = parseColumnList(table); command.setColumns(columns); } if (readIf("DIRECT")) { command.setInsertFromSelect(true); } if (readIf("SORTED")) { command.setSortedInsertMode(true); } if (readIf("DEFAULT")) { //比如: INSERT INTO tableName DEFAULT VALUES,插入一行默认值 read("VALUES"); Expression[] expr = { }; command.addRow(expr); } else if (readIf("VALUES")) { read("("); do { ArrayList<Expression> values = New.arrayList(); //比如: "INSERT INTO t VALUES(DEFAULT),('abc'),('123')",可以同时insert多行 if (!readIf(")")) { do { if (readIf("DEFAULT")) { values.add(null); } else { values.add(readExpression()); } } while (readIfMore()); } command.addRow(values.toArray(new Expression[values.size()])); // the following condition will allow (..),; and (..); } while (readIf(",") && readIf("(")); } else if (readIf("SET")) { if (columns != null) { //比如INSERT INTO t(name) set name='xyz',不能同时指定字段列表 throw getSyntaxError(); } ArrayList<Column> columnList = New.arrayList(); ArrayList<Expression> values = New.arrayList(); do { //支持INSERT INTO t set name='xyz', f2=DEFAULT,...这样的语法, columnList.add(parseColumn(table)); read("="); Expression expression; if (readIf("DEFAULT")) { expression = ValueExpression.getDefault(); } else { expression = readExpression(); } values.add(expression); } while (readIf(",")); command.setColumns(columnList.toArray(new Column[columnList.size()])); command.addRow(values.toArray(new Expression[values.size()])); } else { command.setQuery(parseSelect()); } return command; }
[ "zhh200910@gmail.com" ]
zhh200910@gmail.com
0ffcd3435572b33a4cbeb60e93bbfbcc77b3fda2
cfc60fc1148916c0a1c9b421543e02f8cdf31549
/src/testcases/CWE563_Unused_Variable/CWE563_Unused_Variable__unused_init_variable_int_13.java
84ccc6cd56e0734569fca44d184a75ddf5b6992a
[ "LicenseRef-scancode-public-domain" ]
permissive
zhujinhua/GitFun
c77c8c08e89e61006f7bdbc5dd175e5d8bce8bd2
987f72fdccf871ece67f2240eea90e8c1971d183
refs/heads/master
2021-01-18T05:46:03.351267
2012-09-11T16:43:44
2012-09-11T16:43:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,054
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE563_Unused_Variable__unused_init_variable_int_13.java Label Definition File: CWE563_Unused_Variable__unused_init_variable.label.xml Template File: source-sinks-13.tmpl.java */ /* * @description * CWE: 563 Unused Variable * BadSource: Initialize data * Sinks: * GoodSink: Use data * BadSink : do nothing * Flow Variant: 13 Control flow: if(IO.static_final_five==5) and if(IO.static_final_five!=5) * * */ package testcases.CWE563_Unused_Variable; import testcasesupport.*; import javax.servlet.http.*; public class CWE563_Unused_Variable__unused_init_variable_int_13 extends AbstractTestCase { public void bad() throws Throwable { Integer data; /* POTENTIAL FLAW: Initialize, but do not use data */ data = 5; if (IO.static_final_five==5) { /* POTENTIAL FLAW: Do not use the variable */ /* do nothing */ ; /* empty statement needed for some flow variants */ } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ /* FIX: Use data */ IO.writeLine("" + data); } } /* goodB2G1() - use badsource and goodsink by changing IO.static_final_five==5 to IO.static_final_five!=5 */ private void goodB2G1() throws Throwable { Integer data; /* POTENTIAL FLAW: Initialize, but do not use data */ data = 5; if(IO.static_final_five!=5) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ /* POTENTIAL FLAW: Do not use the variable */ /* do nothing */ ; /* empty statement needed for some flow variants */ } else { /* FIX: Use data */ IO.writeLine("" + data); } } /* goodB2G2() - use badsource and goodsink by reversing statements in if */ private void goodB2G2() throws Throwable { Integer data; /* POTENTIAL FLAW: Initialize, but do not use data */ data = 5; if(IO.static_final_five==5) { /* FIX: Use data */ IO.writeLine("" + data); } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ /* POTENTIAL FLAW: Do not use the variable */ /* do nothing */ ; /* empty statement needed for some flow variants */ } } public void good() throws Throwable { goodB2G1(); goodB2G2(); } /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "amitf@chackmarx.com" ]
amitf@chackmarx.com
0263af411703c5406569017afdb5b872e4ec7cae
378d619ab70fe51c006bab9431dd4b37852bdff7
/app/src/main/java/com/bitpay/bitpay/utils/LoginUtils.java
1d253fff08f1bfb7a7bfb39184d2ae672468fb77
[]
no_license
deepak-tns/updatedBitpay
7ed8a9a7d4cf9b9c5a9e51408a7234a707edae29
62a3634464b0c8d30516d4988eb1449dfe117f73
refs/heads/master
2021-07-02T08:23:11.694067
2017-09-19T11:03:48
2017-09-19T11:03:48
104,064,259
0
0
null
null
null
null
UTF-8
Java
false
false
405
java
package com.bitpay.bitpay.utils; import android.content.Context; import com.bitpay.bitpay.constant.AppConstants; /** * Created by Codeslay-03 on 1/23/2017. */ public class LoginUtils { public static boolean isLogin(Context context) { return false; //return SharedPreferenceUtils.getInstance(context).getSharedPreferences().getBoolean(AppConstants.IS_LOGIN, false); } }
[ "deepaksachan8@gmail.com" ]
deepaksachan8@gmail.com
d4a80086f45308fa125f646b8635931eb9aca00c
ad63012ad35c9fa18f6254b599ea480cf12d8778
/src/ni/org/ics/zpo/v2/appmovil/helpers/UserSistemaHelper.java
5bbd1aa861ddedb1aa470f3b3aba7edfd075f607
[]
no_license
msalinasicsni/zika-zpo-2.0-app
3ae15108eb3ec36d3dfbf988811094b4377a2e7a
97e5e37f8cefdbf6b4ace00d7911c676451a6006
refs/heads/master
2022-08-28T00:07:07.023099
2022-08-12T19:49:28
2022-08-12T19:49:28
172,779,870
0
0
null
null
null
null
UTF-8
Java
false
false
4,069
java
package ni.org.ics.zpo.v2.appmovil.helpers; import java.util.Date; import android.content.ContentValues; import android.database.Cursor; import ni.org.ics.zpo.v2.appmovil.domain.users.Authority; import ni.org.ics.zpo.v2.appmovil.domain.users.AuthorityId; import ni.org.ics.zpo.v2.appmovil.domain.users.UserSistema; import ni.org.ics.zpo.v2.appmovil.utils.MainDBConstants; public class UserSistemaHelper { public static ContentValues crearUserSistemaContentValues(UserSistema user){ ContentValues cv = new ContentValues(); cv.put(MainDBConstants.username, user.getUsername()); if (user.getCreated() != null) cv.put(MainDBConstants.created, user.getCreated().getTime()); if (user.getModified() != null) cv.put(MainDBConstants.modified, user.getModified().getTime()); if (user.getLastAccess() != null) cv.put(MainDBConstants.lastAccess, user.getLastAccess().getTime()); cv.put(MainDBConstants.password, user.getPassword()); cv.put(MainDBConstants.completeName, user.getCompleteName()); cv.put(MainDBConstants.email, user.getEmail()); cv.put(MainDBConstants.enabled, user.getEnabled()); cv.put(MainDBConstants.accountNonExpired, user.getAccountNonExpired()); cv.put(MainDBConstants.credentialsNonExpired, user.getCredentialsNonExpired()); if (user.getLastCredentialChange() != null) cv.put(MainDBConstants.lastCredentialChange, user.getLastCredentialChange().getTime()); cv.put(MainDBConstants.accountNonLocked, user.getAccountNonLocked()); cv.put(MainDBConstants.createdBy, user.getCreatedBy()); cv.put(MainDBConstants.modifiedBy, user.getModifiedBy()); return cv; } public static UserSistema crearUserSistema(Cursor cursorUser){ UserSistema mUser = new UserSistema(); mUser.setUsername(cursorUser.getString(cursorUser.getColumnIndex(MainDBConstants.username))); if(cursorUser.getLong(cursorUser.getColumnIndex(MainDBConstants.created))>0) mUser.setCreated(new Date(cursorUser.getLong(cursorUser.getColumnIndex(MainDBConstants.created)))); if(cursorUser.getLong(cursorUser.getColumnIndex(MainDBConstants.modified))>0) mUser.setModified(new Date(cursorUser.getLong(cursorUser.getColumnIndex(MainDBConstants.modified)))); if(cursorUser.getLong(cursorUser.getColumnIndex(MainDBConstants.lastAccess))>0) mUser.setLastAccess(new Date(cursorUser.getLong(cursorUser.getColumnIndex(MainDBConstants.lastAccess)))); mUser.setPassword(cursorUser.getString(cursorUser.getColumnIndex(MainDBConstants.password))); mUser.setCompleteName(cursorUser.getString(cursorUser.getColumnIndex(MainDBConstants.completeName))); mUser.setEmail(cursorUser.getString(cursorUser.getColumnIndex(MainDBConstants.email))); mUser.setEnabled(cursorUser.getInt(cursorUser.getColumnIndex(MainDBConstants.enabled))>0); mUser.setAccountNonExpired(cursorUser.getInt(cursorUser.getColumnIndex(MainDBConstants.accountNonExpired))>0); mUser.setCredentialsNonExpired(cursorUser.getInt(cursorUser.getColumnIndex(MainDBConstants.credentialsNonExpired))>0); if(cursorUser.getLong(cursorUser.getColumnIndex(MainDBConstants.lastCredentialChange))>0) mUser.setLastCredentialChange(new Date(cursorUser.getLong(cursorUser.getColumnIndex(MainDBConstants.lastCredentialChange)))); mUser.setAccountNonLocked(cursorUser.getInt(cursorUser.getColumnIndex(MainDBConstants.accountNonLocked))>0); mUser.setCreatedBy(cursorUser.getString(cursorUser.getColumnIndex(MainDBConstants.createdBy))); mUser.setModifiedBy(cursorUser.getString(cursorUser.getColumnIndex(MainDBConstants.modifiedBy))); return mUser; } public static ContentValues crearRolValues(Authority rol){ ContentValues cv = new ContentValues(); cv.put(MainDBConstants.username, rol.getAuthId().getUsername()); cv.put(MainDBConstants.role, rol.getAuthId().getAuthority()); return cv; } public static Authority crearRol(Cursor cursorRol){ Authority mRol = new Authority(); mRol.setAuthId(new AuthorityId(cursorRol.getString(cursorRol.getColumnIndex(MainDBConstants.username)),cursorRol.getString(cursorRol.getColumnIndex(MainDBConstants.role)))); return mRol; } }
[ "msalinas@icsnicaragua.org" ]
msalinas@icsnicaragua.org
072bb83cfd8d334bb72f2ffaf36b37864aec226e
a915d83d3088d355d90ba03e5b4df4987bf20a2a
/src/Applications/jetty/server/package-info.java
ae963ab6ded3271e8fd4b9bf7054d155b46ce9a4
[]
no_license
worldeditor/Aegean
164c74d961185231d8b40dbbb6f8b88dcd978d79
33a2c651e826561e685fb84c1e3848c44d2ac79f
refs/heads/master
2022-02-15T15:34:02.074428
2019-08-21T03:52:48
2019-08-21T15:37:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
873
java
// // ======================================================================== // Copyright (c) 1995-2013 Mort Bay Consulting Pty. Ltd. // ------------------------------------------------------------------------ // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // and Apache License v2.0 which accompanies this distribution. // // The Eclipse Public License is available at // http://www.eclipse.org/legal/epl-v10.html // // The Apache License v2.0 is available at // http://www.opensource.org/licenses/apache2.0.php // // You may elect to redistribute this code under either of these licenses. // ======================================================================== // /** * Jetty Server : Core Server API */ package Applications.jetty.server;
[ "remzican_aksoy@apple.com" ]
remzican_aksoy@apple.com
f138361eec2631b876814c2168160ed32d5c8815
cb3cb1370ea4643d5b63bb19673428b27b7a90f9
/src/main/java/com/niche/jhipster/repository/SectorRepository.java
57d83fefd3de0e516701db8527334c2f753d8e49
[]
no_license
AnithaRaja90/PGH_Base_Batch_Mgnt
96f3d62ba2ed00968ccb19771277b9024c317cd1
3059d4a5f9d8820f48dcf08dc3c8c62ed83200a6
refs/heads/master
2020-03-25T02:44:33.434867
2018-08-02T14:44:06
2018-08-02T14:44:06
143,305,352
0
0
null
null
null
null
UTF-8
Java
false
false
356
java
package com.niche.jhipster.repository; import com.niche.jhipster.domain.Sector; import org.springframework.data.jpa.repository.*; import org.springframework.stereotype.Repository; /** * Spring Data repository for the Sector entity. */ @SuppressWarnings("unused") @Repository public interface SectorRepository extends JpaRepository<Sector, Long> { }
[ "ptnaveenraj@outlook.com" ]
ptnaveenraj@outlook.com
f8902c171dd8d64041cd738099487395eaedcc8b
ca638c1f5fafa0294e958f07b698cfea93722a63
/src/ru/demi/patterns/base/structural/flyweight/UsualSymbol.java
415e84f279792a133e3ad5cb8570eb579dae5441
[]
no_license
dmitry-izmerov/design-patterns
fc59919ac0857c5cb10f90ed9d3db61683b278b3
e2e09ef4bb0f95647ba22d4be36927f32b999d36
refs/heads/master
2021-01-25T04:34:37.641195
2017-06-30T19:38:09
2017-06-30T19:38:09
93,445,535
1
0
null
null
null
null
UTF-8
Java
false
false
201
java
package ru.demi.patterns.base.structural.flyweight; public class UsualSymbol extends Symbol { public UsualSymbol(char value) { super(value); } @Override char getValue() { return value; } }
[ "idd90i@gmail.com" ]
idd90i@gmail.com
e96e81fef4f9678d50f75341cc6e789d2e266936
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_7a6084e644242d018c279dc332bb4691a18f55b1/AppEngineHttpResponseImpl/7_7a6084e644242d018c279dc332bb4691a18f55b1_AppEngineHttpResponseImpl_s.java
9610b3143528d84c79aeb793b50278acf843fb5f
[]
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
6,867
java
/* * Copyright 2007 Yusuke Yamamoto * * 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 twitter4j.internal.http.alternative; import com.google.appengine.api.urlfetch.HTTPHeader; import com.google.appengine.api.urlfetch.HTTPResponse; import twitter4j.TwitterException; import twitter4j.TwitterRuntimeException; import twitter4j.conf.ConfigurationContext; import twitter4j.internal.http.HttpResponse; import twitter4j.internal.http.HttpResponseCode; import twitter4j.internal.logging.Logger; import twitter4j.internal.org.json.JSONArray; import twitter4j.internal.org.json.JSONObject; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.TreeMap; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.zip.GZIPInputStream; /** * @author Takao Nakaguchi - takao.nakaguchi at gmail.com * @since Twitter4J 2.2.4 */ final class AppEngineHttpResponseImpl extends HttpResponse implements HttpResponseCode { private Future<HTTPResponse> future; private boolean responseGot; private Map<String, String> headers; private static Logger logger = Logger.getLogger(AppEngineHttpResponseImpl.class); AppEngineHttpResponseImpl(Future<HTTPResponse> futureResponse) { super(ConfigurationContext.getInstance()); this.future = futureResponse; } /** * {@inheritDoc} */ @Override public int getStatusCode() { ensureResponseEvaluated(); return statusCode; } /** * {@inheritDoc} */ @Override public String getResponseHeader(String name) { ensureResponseEvaluated(); return headers.get(name); } /** * {@inheritDoc} */ @Override public Map<String, List<String>> getResponseHeaderFields() { ensureResponseEvaluated(); Map<String, List<String>> ret = new TreeMap<String, List<String>>(); for (Map.Entry<String, String> entry : headers.entrySet()) { ret.put(entry.getKey(), Arrays.asList(entry.getValue())); } return ret; } /** * {@inheritDoc} */ @Override public InputStream asStream() { ensureResponseEvaluated(); return super.asStream(); } /** * {@inheritDoc} */ @Override public String asString() throws TwitterException { ensureResponseEvaluated(); return super.asString(); } /** * {@inheritDoc} */ @Override public final JSONObject asJSONObject() throws TwitterException { ensureResponseEvaluated(); return super.asJSONObject(); } /** * {@inheritDoc} */ @Override public final JSONArray asJSONArray() throws TwitterException { ensureResponseEvaluated(); return super.asJSONArray(); } /** * {@inheritDoc} */ @Override public final Reader asReader() { ensureResponseEvaluated(); return super.asReader(); } /** * {@inheritDoc} */ @Override public void disconnect() throws IOException { if (!future.isDone() && !future.isCancelled()) { future.cancel(true); } } private Throwable th = null; private void ensureResponseEvaluated() { if (th != null) { throw new TwitterRuntimeException(th); } if (responseGot) { return; } responseGot = true; if (future.isCancelled()) { th = new TwitterException("HttpResponse already disconnected."); throw new TwitterRuntimeException(th); } try { HTTPResponse r = future.get(); statusCode = r.getResponseCode(); headers = new HashMap<String, String>(); for (HTTPHeader h : r.getHeaders()) { headers.put(h.getName(), h.getValue()); } byte[] content = r.getContent(); is = new ByteArrayInputStream(content); if ("gzip".equals(headers.get("Content-Encoding"))) { // the response is gzipped try { is = new GZIPInputStream(is); } catch (IOException e) { th = e; throw new TwitterRuntimeException(th); } } responseAsString = inputStreamToString(is); if (statusCode < OK || (statusCode != FOUND && MULTIPLE_CHOICES <= statusCode)) { if (statusCode == ENHANCE_YOUR_CLAIM || statusCode == BAD_REQUEST || statusCode < INTERNAL_SERVER_ERROR) { th = new TwitterException(responseAsString, null, statusCode); throw new TwitterRuntimeException(th); } } } catch (ExecutionException e) { th = e.getCause(); } catch (InterruptedException e) { th = e.getCause(); } if (th != null) { throw new TwitterRuntimeException(th); } } private String inputStreamToString(InputStream is) { if (responseAsString == null) { StringBuffer buf = new StringBuffer(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line; try { while ((line = br.readLine()) != null) { buf.append(line); } } catch (IOException e) { return null; } responseAsString = buf.toString(); } return responseAsString; } @Override public String toString() { return "GAEHttpResponse{" + "future=" + future + ", responseGot=" + responseGot + ", headers=" + headers + '}'; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f63e057cc95746a5c540ccbcde69fdc80baad158
ab87f80cdfca03a2b7e22706a33dc000fb9a81b1
/Assertion/TestAssert.java
024297b9db8b204eaa35cb71c20f331bf7e77150
[]
no_license
raja21068/Java-Programs
662610f316c7d474d838240e717143dfb267f91b
d9a19e6dd7c1688dd423629cdbeb293d32964aa8
refs/heads/master
2021-04-27T16:59:56.458867
2018-02-22T06:52:28
2018-02-22T06:52:28
122,307,080
0
1
null
null
null
null
UTF-8
Java
false
false
387
java
public class TestAssert { public static void main(String arg[]){ // validate(90); validate(190); } private static boolean validate(int age){ //We are assuming that age should be from 1 to 100 but // what if an unexpected age is used, now we should use assert assert (age>=1 && age<=100): age; if(age<60){ return true; }else{ return false; } } }
[ "rajakumarlohano@gmail.com" ]
rajakumarlohano@gmail.com