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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b13f46af9bd8c31dc4dc3dc15dcc839551ad3e88
|
0519b0c2a3a06abe0e868e3444bd0eade1425b2f
|
/srdz-client-api/src/main/java/cn/org/citycloud/bean/UnionPayBean.java
|
ed35bd06cd1cf3d18885129dccad0e9b6446eb7c
|
[] |
no_license
|
xiaolowe/srdz-client-api
|
d62f26db6559ca11dc52c5ab6c94213f67c93245
|
5bd36bbc3d962c3af69a3c28a4f960eb9f8eb23b
|
refs/heads/master
| 2021-01-12T14:25:49.823694
| 2016-09-26T02:52:09
| 2016-09-26T02:52:09
| 69,206,961
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,131
|
java
|
package cn.org.citycloud.bean;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.NotBlank;
public class UnionPayBean {
@ApiModelProperty(value = "商户号码", required = true)
@NotBlank(message = "商户号码不能为空")
private String merId;
@ApiModelProperty(value = "交易金额", required = true)
@NotBlank(message = "交易金额不能为空")
private String txnAmt; //单位为分, 不要带小数点
@ApiModelProperty(value = "商户订单号", required = true)
@NotBlank(message = "商户订单号不能为空")
private String orderId;
private String accNo;
public String getMerId() {
return merId;
}
public void setMerId(String merId) {
this.merId = merId;
}
public String getTxnAmt() {
return txnAmt;
}
public void setTxnAmt(String txnAmt) {
this.txnAmt = txnAmt;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getAccNo() {
return accNo;
}
public void setAccNo(String accNo) {
this.accNo = accNo;
}
}
|
[
"xiaolowe@gmail.com"
] |
xiaolowe@gmail.com
|
a882578b25efbdf993e7f12f283612364e2b7a7e
|
374fa213d13d8739a1f81cd01716b63cf5cd50e7
|
/beauty/src/main/java/cn/wu1588/beauty/ui/views/custom/ContentViewPager.java
|
4b70ac9c3dd5f4bfb46b7992fb2cc48b764cb84c
|
[] |
no_license
|
838245284/sbmall
|
22dea5509df20e77e53fe4e726308e0b0e74c438
|
cf975886955225cd54f48a69ba98a51ac95100ce
|
refs/heads/develop
| 2023-06-11T20:15:46.413200
| 2021-07-14T15:11:16
| 2021-07-14T15:11:16
| 380,426,907
| 0
| 0
| null | 2021-07-14T15:11:17
| 2021-06-26T06:02:48
|
Java
|
UTF-8
|
Java
| false
| false
| 1,430
|
java
|
package cn.wu1588.beauty.ui.views.custom;
import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.View;
import java.util.HashMap;
import java.util.LinkedHashMap;
public class ContentViewPager extends ViewPager {
private HashMap<Integer, View> mChildrenViews = new LinkedHashMap<>();
public ContentViewPager(Context context) {
super(context);
}
public ContentViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int index = getCurrentItem();
int height = 0;
if (mChildrenViews.size() > index) {
View child = mChildrenViews.get(index);
if (child != null) {
child.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
height = child.getMeasuredHeight();
}
}
if (mChildrenViews.size() != 0) {
heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY);
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
/**
* 保存View对应的索引,需要自适应高度的一定要设置这个
*/
public void setViewForPosition(View view, int position) {
mChildrenViews.put(position, view);
}
}
|
[
"838245284@qq.com"
] |
838245284@qq.com
|
050c9acf06ae2869bfb8ae16f5c0a057ffe9f706
|
54c4dca990c9e24b626f1fcc6787b94ddda10c5a
|
/sisConflicto.logic/src/main/java/co/edu/uniandes/csw/general/estudiante/logic/ejb/_EstudianteLogicService.java
|
3e4d5b19e8de3915475c22836a78a2597b710f72
|
[] |
no_license
|
paotoya757/PreParcial
|
f4de5c2032840d2c19956dbe5070a8f8deebeda8
|
a4bd8987a00d51ee2376b7599db31dc7efd0a2fe
|
refs/heads/master
| 2020-05-20T05:16:56.802371
| 2014-08-27T06:31:33
| 2014-08-27T06:31:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,341
|
java
|
/* ========================================================================
* Copyright 2014 general
*
* Licensed under the MIT, The MIT License (MIT)
* Copyright (c) 2014 general
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
* ========================================================================
Source generated by CrudMaker version 1.0.0.201408112050
*/
package co.edu.uniandes.csw.general.estudiante.logic.ejb;
import java.util.List;
import javax.inject.Inject;
import co.edu.uniandes.csw.general.estudiante.logic.dto.EstudianteDTO;
import co.edu.uniandes.csw.general.estudiante.logic.api._IEstudianteLogicService;
import co.edu.uniandes.csw.general.estudiante.persistence.api.IEstudiantePersistence;
public abstract class _EstudianteLogicService implements _IEstudianteLogicService {
@Inject
protected IEstudiantePersistence persistance;
public EstudianteDTO createEstudiante(EstudianteDTO estudiante){
return persistance.createEstudiante( estudiante);
}
public List<EstudianteDTO> getEstudiantes(){
return persistance.getEstudiantes();
}
public EstudianteDTO getEstudiante(Long id){
return persistance.getEstudiante(id);
}
public void deleteEstudiante(Long id){
persistance.deleteEstudiante(id);
}
public void updateEstudiante(EstudianteDTO estudiante){
persistance.updateEstudiante(estudiante);
}
}
|
[
"pa.otoya757@uniandes.edu.co"
] |
pa.otoya757@uniandes.edu.co
|
80d95b1f0013040312a18b8c33d9c05b1f15da15
|
6f60c52828a9e7251021babbe8454621ff2cd7ff
|
/app/src/main/java/com/htcompany/educationerpforgansu/workpart/adapters/AssetMaintenanceAdapter.java
|
d261e97c5bbc92f7846bf580e0147280e59f7fde
|
[] |
no_license
|
liuhui-huatang/EducationERP
|
f193e41ec30491521b6ede08ef42f6f7e04447d3
|
894d27ef6ee13b817ade2e21c21b7794fb67cc70
|
refs/heads/master
| 2020-03-27T08:25:51.204410
| 2018-08-21T12:11:08
| 2018-08-21T12:11:08
| 146,253,621
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,648
|
java
|
package com.htcompany.educationerpforgansu.workpart.adapters;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.htcompany.educationerpforgansu.R;
import com.htcompany.educationerpforgansu.commonpart.MyApp;
import com.htcompany.educationerpforgansu.internet.InterfaceManager;
import com.htcompany.educationerpforgansu.workpart.entities.AssetMaintenanceEntity;
import com.nostra13.universalimageloader.core.ImageLoader;
import java.util.List;
/**
* 资产维护适配器
* Created by wrb on 2016/11/9.
*/
public class AssetMaintenanceAdapter extends BaseAdapter{
private Context context;
private LayoutInflater inflater;
private List<AssetMaintenanceEntity> datas;
public AssetMaintenanceAdapter(Context context,List<AssetMaintenanceEntity> datas){
this.context = context;
this.datas = datas;
inflater = LayoutInflater.from(context);
}
@Override
public int getCount() {
return datas.size();
}
@Override
public Object getItem(int position) {
return datas.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHodler vh;
if(convertView==null){
vh = new ViewHodler();
convertView=inflater.inflate(R.layout.assetmaintenance_lv_item,null);
vh.assetmaintenance_photo_img = (ImageView)convertView.findViewById(R.id.assetmaintenance_photo_img);
vh.assetmaintenance_title_tv = (TextView)convertView.findViewById(R.id.assetmaintenance_title_tv);
vh.assetmaintenance_ms_tv = (TextView)convertView.findViewById(R.id.assetmaintenance_ms_tv);
vh.assetmaintenance_adress_tv = (TextView)convertView.findViewById(R.id.assetmaintenance_adress_tv);
vh.assetmaintenance_time_tv = (TextView)convertView.findViewById(R.id.assetmaintenance_time_tv);
vh.assetmaintenance_zt_tv = (TextView)convertView.findViewById(R.id.assetmaintenance_zt_tv);
vh.assetmaintenance_zt_img=(ImageView)convertView.findViewById(R.id.assetmaintenance_zt_img);
convertView.setTag(vh);
}else{
vh = (ViewHodler) convertView.getTag();
}
vh.assetmaintenance_title_tv.setText(datas.get(position).getTitle());
vh.assetmaintenance_ms_tv.setText(datas.get(position).getMiaoshu());
vh.assetmaintenance_adress_tv.setText(datas.get(position).getPlace());
vh.assetmaintenance_time_tv.setText(datas.get(position).getRepair_time());
vh.assetmaintenance_zt_tv.setText(datas.get(position).getShow_treatment_status_id());
if("已处理".equals(datas.get(position).getShow_treatment_status_id())) {
vh.assetmaintenance_zt_tv.setText(datas.get(position).getShow_treatment_status_id());
vh.assetmaintenance_zt_tv.setTextColor(context.getResources().getColor(R.color.qj_btncolor));
vh.assetmaintenance_zt_img.setImageResource(R.mipmap.qj_togguo);
}else if("未处理".equals(datas.get(position).getShow_treatment_status_id())) {
vh.assetmaintenance_zt_tv.setText(datas.get(position).getShow_treatment_status_id());
vh.assetmaintenance_zt_tv.setTextColor(context.getResources().getColor(R.color.qj_btn2color));
vh.assetmaintenance_zt_img.setImageResource(R.mipmap.qj_yitij);
}else if("已派工".equals(datas.get(position).getShow_treatment_status_id())) {
vh.assetmaintenance_zt_tv.setText(datas.get(position).getShow_treatment_status_id());
vh.assetmaintenance_zt_tv.setTextColor(context.getResources().getColor(R.color.qj_btn4color));
vh.assetmaintenance_zt_img.setImageResource(R.mipmap.qj_xiaoij);
}
Glide.with(context).load(datas.get(position).getImgurl())
.placeholder(R.mipmap.bottombg_show_icon)
.diskCacheStrategy(DiskCacheStrategy.RESULT)
.into(vh.assetmaintenance_photo_img);
return convertView;
}
class ViewHodler{
public ImageView assetmaintenance_zt_img;
public ImageView assetmaintenance_photo_img;
public TextView assetmaintenance_title_tv,assetmaintenance_ms_tv,assetmaintenance_adress_tv,assetmaintenance_time_tv,assetmaintenance_zt_tv;
}
}
|
[
"liuhui@huatangjt.com"
] |
liuhui@huatangjt.com
|
16b0935982f438486fc742c59e86289e1f258ec4
|
f766baf255197dd4c1561ae6858a67ad23dcda68
|
/app/src/main/java/com/tencent/mm/protocal/c/bzo.java
|
d58f2540699f834bc4771a31c304f2d20800ac45
|
[] |
no_license
|
jianghan200/wxsrc6.6.7
|
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
|
eb6c56587cfca596f8c7095b0854cbbc78254178
|
refs/heads/master
| 2020-03-19T23:40:49.532494
| 2018-06-12T06:00:50
| 2018-06-12T06:00:50
| 137,015,278
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,699
|
java
|
package com.tencent.mm.protocal.c;
import f.a.a.b;
import java.util.LinkedList;
public final class bzo
extends bhp
{
public long rxH;
public long svs;
protected final int a(int paramInt, Object... paramVarArgs)
{
if (paramInt == 0)
{
paramVarArgs = (f.a.a.c.a)paramVarArgs[0];
if (this.six == null) {
throw new b("Not all required fields were included: BaseResponse");
}
if (this.six != null)
{
paramVarArgs.fV(1, this.six.boi());
this.six.a(paramVarArgs);
}
paramVarArgs.T(2, this.svs);
paramVarArgs.T(3, this.rxH);
return 0;
}
if (paramInt == 1) {
if (this.six == null) {
break label379;
}
}
label379:
for (paramInt = f.a.a.a.fS(1, this.six.boi()) + 0;; paramInt = 0)
{
return paramInt + f.a.a.a.S(2, this.svs) + f.a.a.a.S(3, this.rxH);
if (paramInt == 2)
{
paramVarArgs = new f.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler);
for (paramInt = bhp.a(paramVarArgs); paramInt > 0; paramInt = bhp.a(paramVarArgs)) {
if (!super.a(paramVarArgs, this, paramInt)) {
paramVarArgs.cJS();
}
}
if (this.six != null) {
break;
}
throw new b("Not all required fields were included: BaseResponse");
}
if (paramInt == 3)
{
Object localObject1 = (f.a.a.a.a)paramVarArgs[0];
bzo localbzo = (bzo)paramVarArgs[1];
paramInt = ((Integer)paramVarArgs[2]).intValue();
switch (paramInt)
{
default:
return -1;
case 1:
paramVarArgs = ((f.a.a.a.a)localObject1).IC(paramInt);
int i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
Object localObject2 = (byte[])paramVarArgs.get(paramInt);
localObject1 = new fl();
localObject2 = new f.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (boolean bool = true; bool; bool = ((fl)localObject1).a((f.a.a.a.a)localObject2, (com.tencent.mm.bk.a)localObject1, bhp.a((f.a.a.a.a)localObject2))) {}
localbzo.six = ((fl)localObject1);
paramInt += 1;
}
case 2:
localbzo.svs = ((f.a.a.a.a)localObject1).vHC.rZ();
return 0;
}
localbzo.rxH = ((f.a.a.a.a)localObject1).vHC.rZ();
return 0;
}
return -1;
}
}
}
/* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes4-dex2jar.jar!/com/tencent/mm/protocal/c/bzo.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"526687570@qq.com"
] |
526687570@qq.com
|
241870b7fb9e521bbebf961f7934f34719409534
|
ec897c1152f53fa1efe994e7842cb73d5bd82d08
|
/mdgen/src/hamy/mdgen/api/generator/format/aseXML/GasIntervalMeterStandingData.java
|
403d32cbf4d598b1023f334b982755ef516d971f
|
[
"MIT"
] |
permissive
|
hemantmurthy/mdgen
|
4b69e5f6805526bd35a532c1c61610dae052ad78
|
31333e4d7687526103d08b6f6772a1805cd12c7a
|
refs/heads/master
| 2020-12-27T22:16:34.251746
| 2020-06-11T00:21:10
| 2020-06-11T00:21:10
| 238,079,485
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,623
|
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.03.18 at 10:36:34 AM AEDT
//
package hamy.mdgen.api.generator.format.aseXML;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* Schema - Gas
*
* <p>Java class for GasIntervalMeterStandingData complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="GasIntervalMeterStandingData">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="CommunicationEquipmentPresent" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* <element name="ExcludedServicesCharges" minOccurs="0">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ChargeItem" type="{urn:aseXML:r38}GasIntervalMeterCharge" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "GasIntervalMeterStandingData", propOrder = {
"communicationEquipmentPresent",
"excludedServicesCharges"
})
public class GasIntervalMeterStandingData {
@XmlElement(name = "CommunicationEquipmentPresent")
protected Boolean communicationEquipmentPresent;
@XmlElement(name = "ExcludedServicesCharges")
protected GasIntervalMeterStandingData.ExcludedServicesCharges excludedServicesCharges;
/**
* Gets the value of the communicationEquipmentPresent property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isCommunicationEquipmentPresent() {
return communicationEquipmentPresent;
}
/**
* Sets the value of the communicationEquipmentPresent property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setCommunicationEquipmentPresent(Boolean value) {
this.communicationEquipmentPresent = value;
}
/**
* Gets the value of the excludedServicesCharges property.
*
* @return
* possible object is
* {@link GasIntervalMeterStandingData.ExcludedServicesCharges }
*
*/
public GasIntervalMeterStandingData.ExcludedServicesCharges getExcludedServicesCharges() {
return excludedServicesCharges;
}
/**
* Sets the value of the excludedServicesCharges property.
*
* @param value
* allowed object is
* {@link GasIntervalMeterStandingData.ExcludedServicesCharges }
*
*/
public void setExcludedServicesCharges(GasIntervalMeterStandingData.ExcludedServicesCharges value) {
this.excludedServicesCharges = value;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ChargeItem" type="{urn:aseXML:r38}GasIntervalMeterCharge" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"chargeItem"
})
public static class ExcludedServicesCharges {
@XmlElement(name = "ChargeItem", required = true)
protected List<GasIntervalMeterCharge> chargeItem;
/**
* Gets the value of the chargeItem 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 chargeItem property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getChargeItem().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link GasIntervalMeterCharge }
*
*
*/
public List<GasIntervalMeterCharge> getChargeItem() {
if (chargeItem == null) {
chargeItem = new ArrayList<GasIntervalMeterCharge>();
}
return this.chargeItem;
}
}
}
|
[
"hemantmurthy@gmail.com"
] |
hemantmurthy@gmail.com
|
8771ea4b2abba35e928372c69c50825c87da08ad
|
30d0ca064ddb0fb29e6a2e7ca633cde1e67f68a9
|
/src/main/java/com/imooc/demo/handler/GlobalExceptionHandler.java
|
d8599f39ffbbf8cb7f63328654d24951ffef25d6
|
[] |
no_license
|
liuxinlxlrxlrt/MiniApplets
|
fbc8f0c7428e57d5179a273de6e52c56d5b7aed9
|
55e85c3dbf91531115770283153aff31a84b813e
|
refs/heads/master
| 2022-12-22T08:14:29.229918
| 2020-09-24T15:42:02
| 2020-09-24T15:42:02
| 291,715,609
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 701
|
java
|
package com.imooc.demo.handler;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
@ControllerAdvice
public class GlobalExceptionHandler {
@ExceptionHandler(value = Exception.class)
@ResponseBody
private Map<String,Object> exceptionHandler(HttpServletRequest req,Exception e){
Map<String,Object> modelMap = new HashMap<>();
modelMap.put("success",false);
modelMap.put("errMsg",e.getMessage());
return modelMap;
}
}
|
[
"183771798@qq.com"
] |
183771798@qq.com
|
85eacd9054a5f8734eb29ab6b7dd433a400fcb3f
|
e1b1ce58fb1277b724022933176f0809169682d9
|
/sources/fr/pcsoft/wdjava/core/types/collection/tableau/C0762d.java
|
21aa6f685dfd00302e2d5b6197c911bbc2918572
|
[] |
no_license
|
MR-116/com.masociete.projet_mobile-1_source_from_JADX
|
a5949c814f0f77437f74b7111ea9dca17140f2ea
|
6cd80095cd68cb9392e6e067f26993ab2bf08bb2
|
refs/heads/master
| 2020-04-11T15:00:54.967026
| 2018-12-15T06:33:57
| 2018-12-15T06:33:57
| 161,873,466
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,387
|
java
|
package fr.pcsoft.wdjava.core.types.collection.tableau;
import fr.pcsoft.wdjava.core.C0725i;
import fr.pcsoft.wdjava.core.WDObjet;
import fr.pcsoft.wdjava.core.erreur.WDErreurManager;
import fr.pcsoft.wdjava.core.parcours.p039a.C0567c;
import fr.pcsoft.wdjava.core.ressources.messages.C0745b;
import fr.pcsoft.wdjava.core.types.collection.C0582d;
/* renamed from: fr.pcsoft.wdjava.core.types.collection.tableau.d */
class C0762d extends C0567c {
/* renamed from: z */
private static final String[] f1994z = new String[]{C0762d.m3533z(C0762d.m3534z("\u0019elC2lalN={r}^8hsaE,xl{P8")), C0762d.m3533z(C0762d.m3534z("\u0019tS!akN)cn\\$ku{N#unaP!vokT"))};
final C0759o this$0;
C0762d(C0759o c0759o, C0582d c0582d, WDObjet wDObjet, WDObjet wDObjet2, WDObjet wDObjet3, boolean z, boolean z2) {
this.this$0 = c0759o;
super(c0582d, wDObjet, wDObjet2, wDObjet3, z, z2);
}
/* renamed from: z */
private static String m3533z(char[] cArr) {
int length = cArr.length;
for (int i = 0; length > i; i++) {
int i2;
char c = cArr[i];
switch (i % 5) {
case 0:
i2 = 58;
break;
case 1:
i2 = 32;
break;
case 2:
i2 = 62;
break;
case 3:
i2 = 17;
break;
default:
i2 = 109;
break;
}
cArr[i] = (char) (i2 ^ c);
}
return new String(cArr).intern();
}
/* renamed from: z */
private static char[] m3534z(String str) {
char[] toCharArray = str.toCharArray();
if (toCharArray.length < 2) {
toCharArray[0] = (char) (toCharArray[0] ^ 109);
}
return toCharArray;
}
/* renamed from: d */
protected void mo2449d() {
super.mo2449d();
if (this.this$0.mo2487d() != this.h.getTypeVar()) {
WDErreurManager.m2883a(C0745b.m3222b(f1994z[0], C0725i.m3045b(this.this$0.mo2487d())));
}
}
/* renamed from: e */
protected void mo2450e() {
super.mo2450e();
if (!this.this$0.mo2481f()) {
WDErreurManager.m2883a(C0745b.m3222b(f1994z[1], new String[0]));
}
}
}
|
[
"Entrepreneursmalaysia1@gmail.com"
] |
Entrepreneursmalaysia1@gmail.com
|
94ab63470e2febbe0420492b2edbca5c93da53db
|
fff3302fe8193d13360f12e5b13d376ef76cf4d6
|
/AppLock/com/facebook/ads/internal/p023d/C1551b.java
|
baed6109ea3e44af123f9f3b63b5c76d46d3efc6
|
[] |
no_license
|
shaolin-example-com-my-shopify-com/KidWatcher
|
2912950b7ca4773c3d29005b9d231ad6035b4912
|
f67a81b757043159ea358b7f9e4b16fd6be0e0c0
|
refs/heads/master
| 2022-04-25T17:19:28.800922
| 2020-04-30T02:53:20
| 2020-04-30T02:53:20
| 260,098,439
| 0
| 0
| null | 2020-04-30T02:51:49
| 2020-04-30T02:51:48
| null |
UTF-8
|
Java
| false
| false
| 3,776
|
java
|
package com.facebook.ads.internal.p023d;
import android.content.Context;
import android.os.Handler;
import android.util.Log;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
public class C1551b {
private static final String f3778a = C1551b.class.getSimpleName();
private final Handler f3779b = new Handler();
private final ExecutorService f3780c = Executors.newFixedThreadPool(10);
private final C1552c f3781d;
private final C1554d f3782e;
private final List<Callable<Boolean>> f3783f;
private class C1549a implements Callable<Boolean> {
final /* synthetic */ C1551b f3774a;
private final String f3775b;
public C1549a(C1551b c1551b, String str) {
this.f3774a = c1551b;
this.f3775b = str;
}
public Boolean m4300a() {
this.f3774a.f3781d.m4315a(this.f3775b);
return Boolean.valueOf(true);
}
public /* synthetic */ Object call() {
return m4300a();
}
}
private class C1550b implements Callable<Boolean> {
final /* synthetic */ C1551b f3776a;
private final String f3777b;
public C1550b(C1551b c1551b, String str) {
this.f3776a = c1551b;
this.f3777b = str;
}
public Boolean m4301a() {
this.f3776a.f3782e.m4320a(this.f3777b);
return Boolean.valueOf(true);
}
public /* synthetic */ Object call() {
return m4301a();
}
}
public C1551b(Context context) {
this.f3781d = C1552c.m4311a(context);
this.f3782e = C1554d.m4318a(context);
this.f3783f = new ArrayList();
}
public void m4307a(final C1528a c1528a) {
final ArrayList arrayList = new ArrayList(this.f3783f);
this.f3780c.submit(new Runnable(this) {
final /* synthetic */ C1551b f3773c;
class C15471 implements Runnable {
final /* synthetic */ C15481 f3770a;
C15471(C15481 c15481) {
this.f3770a = c15481;
}
public void run() {
c1528a.mo2723a();
}
}
public void run() {
Throwable e;
List<Future> arrayList = new ArrayList(arrayList.size());
Iterator it = arrayList.iterator();
while (it.hasNext()) {
arrayList.add(this.f3773c.f3780c.submit((Callable) it.next()));
}
try {
for (Future future : arrayList) {
future.get();
}
} catch (InterruptedException e2) {
e = e2;
Log.e(C1551b.f3778a, "Exception while executing cache downloads.", e);
this.f3773c.f3779b.post(new C15471(this));
} catch (ExecutionException e3) {
e = e3;
Log.e(C1551b.f3778a, "Exception while executing cache downloads.", e);
this.f3773c.f3779b.post(new C15471(this));
}
this.f3773c.f3779b.post(new C15471(this));
}
});
this.f3783f.clear();
}
public void m4308a(String str) {
this.f3783f.add(new C1549a(this, str));
}
public void m4309b(String str) {
this.f3783f.add(new C1550b(this, str));
}
public String m4310c(String str) {
return this.f3782e.m4321b(str);
}
}
|
[
"Nist@netcompany.com"
] |
Nist@netcompany.com
|
4142dd0b40e8365c628797870d1c7c9ad0d0e2e0
|
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
|
/ast_results/linuxtage_glt-companion/app/src/main/java/at/linuxtage/companion/viewmodels/EventDetailsViewModel.java
|
1e6ea5b9eaf93bef96a818d377920627f25b7b59
|
[] |
no_license
|
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
|
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
|
0564143d92f8024ff5fa6b659c2baebf827582b1
|
refs/heads/master
| 2020-07-13T13:53:40.297493
| 2019-01-11T11:51:18
| 2019-01-11T11:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,254
|
java
|
// isComment
package at.linuxtage.companion.viewmodels;
import android.app.Application;
import android.arch.lifecycle.AndroidViewModel;
import android.arch.lifecycle.LiveData;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.AsyncTask;
import android.support.annotation.NonNull;
import android.support.v4.content.LocalBroadcastManager;
import java.util.List;
import at.linuxtage.companion.db.DatabaseManager;
import at.linuxtage.companion.livedata.AsyncTaskLiveData;
import at.linuxtage.companion.model.Event;
import at.linuxtage.companion.model.Link;
import at.linuxtage.companion.model.Person;
import at.linuxtage.companion.utils.ArrayUtils;
public class isClassOrIsInterface extends AndroidViewModel {
public static class isClassOrIsInterface {
public List<Person> isVariable;
public List<Link> isVariable;
}
private Event isVariable = null;
private final AsyncTaskLiveData<Boolean> isVariable = new AsyncTaskLiveData<Boolean>() {
@Override
protected Boolean isMethod() throws Exception {
return isNameExpr.isMethod().isMethod(isNameExpr);
}
};
private final AsyncTaskLiveData<EventDetails> isVariable = new AsyncTaskLiveData<EventDetails>() {
@Override
protected EventDetails isMethod() throws Exception {
EventDetails isVariable = new EventDetails();
DatabaseManager isVariable = isNameExpr.isMethod();
isNameExpr.isFieldAccessExpr = isNameExpr.isMethod(isNameExpr);
isNameExpr.isFieldAccessExpr = isNameExpr.isMethod(isNameExpr);
return isNameExpr;
}
};
private final BroadcastReceiver isVariable = new BroadcastReceiver() {
@Override
public void isMethod(Context isParameter, Intent isParameter) {
if (isNameExpr.isMethod() == isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, -isStringConstant)) {
isNameExpr.isMethod(true);
}
}
};
private final BroadcastReceiver isVariable = new BroadcastReceiver() {
@Override
public void isMethod(Context isParameter, Intent isParameter) {
long[] isVariable = isNameExpr.isMethod(isNameExpr.isFieldAccessExpr);
if (isNameExpr.isMethod(isNameExpr, isNameExpr.isMethod()) != -isIntegerConstant) {
isNameExpr.isMethod(true);
}
}
};
public isConstructor(@NonNull Application isParameter) {
super(isNameExpr);
}
public void isMethod(@NonNull Event isParameter) {
if (this.isFieldAccessExpr == null) {
this.isFieldAccessExpr = isNameExpr;
isNameExpr.isMethod();
LocalBroadcastManager isVariable = isNameExpr.isMethod(isMethod());
isNameExpr.isMethod(isNameExpr, new IntentFilter(isNameExpr.isFieldAccessExpr));
isNameExpr.isMethod(isNameExpr, new IntentFilter(isNameExpr.isFieldAccessExpr));
isNameExpr.isMethod();
}
}
public LiveData<Boolean> isMethod() {
return isNameExpr;
}
public void isMethod() {
Boolean isVariable = isNameExpr.isMethod();
if (isNameExpr != null) {
new ToggleBookmarkAsyncTask(isNameExpr).isMethod(isNameExpr);
}
}
private static class isClassOrIsInterface extends AsyncTask<Boolean, Void, Void> {
private final Event isVariable;
public isConstructor(Event isParameter) {
this.isFieldAccessExpr = isNameExpr;
}
@Override
protected Void isMethod(Boolean... isParameter) {
if (isNameExpr[isIntegerConstant]) {
isNameExpr.isMethod().isMethod(isNameExpr);
} else {
isNameExpr.isMethod().isMethod(isNameExpr);
}
return null;
}
}
public LiveData<EventDetails> isMethod() {
return isNameExpr;
}
@Override
protected void isMethod() {
LocalBroadcastManager isVariable = isNameExpr.isMethod(isMethod());
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
}
}
|
[
"matheus@melsolucoes.net"
] |
matheus@melsolucoes.net
|
2d017d84c0b94836bc546e71997dd0ca09f15ec5
|
20ea5ee84221ff5fd7e3cc1e1ca38db910caf3de
|
/src/test/java/com/victropolis/euler/TestProblem041.java
|
99996b887f4aa796a86d27763619cdf010e65c72
|
[] |
no_license
|
victropolis/project-euler-solved
|
a76207d8583126618ff8af801262e6077c536e55
|
b4f153a42e101b4d780178af05aab8a0203931ec
|
refs/heads/master
| 2016-09-06T13:38:52.788092
| 2015-07-04T22:03:32
| 2015-07-04T22:03:37
| 37,392,888
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 619
|
java
|
package com.victropolis.euler;
import org.junit.Assert;
import org.junit.Test;
/**
* Generated programatically by victropolis on 07/04/15.
*/
public class TestProblem041 {
/*
Description (from https://projecteuler.net/problem=41):
We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example,
2143 is a 4-digit pandigital and is also prime. What is the largest n-digit pandigital prime that exists?
*/
@Test
public void test() {
Assert.assertEquals(7652413L, Problem041.solve(/* change signature to provide required inputs */));
}
}
|
[
"victropolis@gmail.com"
] |
victropolis@gmail.com
|
dfb2fd9a9a319402421ec78735299deabb76fbc3
|
a857674940edec14dd77991e94ba38e477619326
|
/src/java/checkavail.java
|
bd704b8d37def3cc439f235e02e4c70ac61e3366
|
[] |
no_license
|
ishita2411/BTMS
|
f7b8d30bd103ee5e7a4455ea7bf5c7e9ea2546ae
|
35905fc2045178f30099675ff01f0413d6ac9c83
|
refs/heads/master
| 2022-12-11T21:08:47.714957
| 2020-09-08T09:54:40
| 2020-09-08T10:33:47
| 293,777,783
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,386
|
java
|
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
//import com.sun.tools.javac.jvm.StringConcat;
/**
* Servlet implementation class checkavail
*/
@WebServlet("/checkavail")
public class checkavail extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public checkavail() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
response.getWriter().append("Served at: ").append(request.getContextPath());
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
String bno = request.getParameter("busdrop");
String uname=request.getParameter("uname");
//String uid=(String)request.getSession(false).getAttribute("uid");
String s=request.getParameter("seats");
String[] s1=s.split(",");
Integer slen=s1.length;
request.getSession().setAttribute("user",uname);
request.getSession().setAttribute("bus",bno);
request.getSession().setAttribute("seats",s);
try{
Class.forName("com.mysql.jdbc.Driver");
//String url="jdbc:mysql://localhost:3306/test";
Connection connection=DriverManager.getConnection("jdbc:mysql://localhost:3306/btbs_db?zeroDateTimeBehavior=convertToNull","root","");
Statement stmt = connection.createStatement() ;
PrintWriter out=response.getWriter();
String query="select price from bus_details where busno='"+bno+"'";
ResultSet rs=stmt.executeQuery(query);
if(rs.next()){
out.println("<script type=\"text/javascript\">");
Integer i=slen*Integer.parseInt(rs.getString(1));
out.println("alert('Total Price is:"+i+"');");
//out.println("location='selectbus.jsp';");
out.println("</script>");
}}
catch(Exception e)
{
System.out.println("wrong entry"+e);
}//response.sendRedirect("payment.html");
PrintWriter out=response.getWriter();
out.println("<html><head><style>\r\n" +
"body{\r\n" +
" background-image:url('bus.jpg');\r\n" +
" height:\"100\";\r\n" +
" width:\"100\";\r\n" +
" background-position: center;\r\n" +
" background-repeat: no-repeat;\r\n" +
" background-size: cover;\r\n" +
"}\r\n" +
"</style></head><body><a href=\"payment.html\"><h1 style=\"color: white; font-size: 40px;\"><i>PROCEED TO PAYMENT</i></a></h1></body></html>");
doGet(request, response);
}
}
|
[
"lenovo@lenovo-PC"
] |
lenovo@lenovo-PC
|
0cb6169fba9cdfa24d106d7f2d7e8d8e0f016bd7
|
05fee857f5ccae0998eebdf096d91ff2c7ef0926
|
/src/main/java/pl/asie/minetestbridge/backwards/ItemStackWrapped.java
|
a16352385c65072c419dc4cd42a023109b046f91
|
[] |
no_license
|
asiekierka/MinetestBridgeMC
|
709c858c231f8d3c83b9b2effd3ae934d334a814
|
ab22607843cd1f548a834ab4baeb50c0598acb40
|
refs/heads/master
| 2022-12-26T17:51:17.400053
| 2019-09-21T21:05:44
| 2019-09-21T21:05:44
| 300,708,923
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,887
|
java
|
/*
* Copyright (c) 2015, 2016, 2017, 2018 Adrian Siekierka
*
* This file is part of MinetestBridge.
*
* MinetestBridge 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 3 of the License, or
* (at your option) any later version.
*
* MinetestBridge 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 MinetestBridge. If not, see <http://www.gnu.org/licenses/>.
*/
package pl.asie.minetestbridge.backwards;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import org.luaj.vm2.LuaError;
import org.luaj.vm2.LuaTable;
import org.luaj.vm2.LuaValue;
import pl.asie.minetestbridge.MinetestBridge;
import pl.asie.minetestbridge.MinetestLib;
import pl.asie.minetestbridge.recipe.MinetestRecipeProxy;
import pl.asie.minetestbridge.util.LuaMethod;
import pl.asie.minetestbridge.util.LuaProxy;
import javax.annotation.Nullable;
import java.util.function.Consumer;
public class ItemStackWrapped extends LuaTable {
@Nullable
private final Consumer<ItemStack> stackReplacer;
private final ItemStack stack;
public ItemStackWrapped(ItemStack stack) {
this(stack, null);
}
public ItemStackWrapped(LuaValue wrap) {
this.stackReplacer = null;
if (wrap instanceof ItemStackWrapped) {
this.stack = ((ItemStackWrapped) wrap).getStack();
} else {
this.stack = MinetestRecipeProxy.getStack(wrap);
}
LuaProxy.reflect(this, this);
}
public ItemStackWrapped(ItemStack stack, Consumer<ItemStack> stackReplacer) {
this.stack = stack;
this.stackReplacer = stackReplacer;
LuaProxy.reflect(this, this);
}
public ItemStack getStack() {
return stack;
}
@LuaMethod
public LuaValue get_wear(LuaValue wrap) {
if (!stack.isItemStackDamageable()) {
return LuaValue.valueOf(0);
}
return LuaValue.valueOf(stack.getItemDamage() * 65535 / stack.getMaxDamage());
}
@LuaMethod
public LuaValue set_wear(LuaValue wrap, LuaValue amount) {
if (stack.isItemStackDamageable()) {
stack.setItemDamage(stack.getItemDamage() + (amount.optint(0) * stack.getMaxDamage() / 65535));
}
return LuaValue.valueOf(stack.getItemDamage() == 0);
}
@LuaMethod
public LuaValue add_wear(LuaValue wrap, LuaValue amount) {
if (stack.isItemStackDamageable()) {
stack.setItemDamage((amount.optint(0) * stack.getMaxDamage() / 65535));
}
return null;
}
@LuaMethod
public LuaValue is_known(LuaValue wrap) {
return LuaValue.valueOf(true);
}
@LuaMethod
public LuaValue is_empty(LuaValue wrap) {
return LuaValue.valueOf(stack.isEmpty());
}
@LuaMethod
public LuaValue get_name(LuaValue wrap) {
if (stack.isEmpty()) {
return LuaValue.valueOf("ignore");
}
return LuaValue.valueOf(MinetestBridge.asMtName(stack.getItem().getRegistryName()));
}
@LuaMethod
public LuaValue get_count(LuaValue wrap) {
return LuaValue.valueOf(stack.getCount());
}
@LuaMethod
public LuaValue set_count(LuaValue wrap, LuaValue count) {
stack.setCount(count.checkint());
return is_empty(wrap);
}
@LuaMethod
public LuaValue clear(LuaValue wrap) {
stack.setCount(0);
return LuaValue.NIL;
}
@LuaMethod
public LuaValue get_definition(LuaValue wrap) {
try {
return MinetestLib.getRegistry("items").get(MinetestBridge.asMtName(stack.getItem().getRegistryName()));
} catch (LuaError e) {
return LuaValue.NIL;
}
}
@LuaMethod
public LuaValue get_stack_max(LuaValue wrap) {
return LuaValue.valueOf(stack.getMaxStackSize());
}
@LuaMethod
public LuaValue get_free_space(LuaValue wrap) {
return LuaValue.valueOf(stack.getMaxStackSize() - stack.getCount());
}
@LuaMethod
public LuaValue take_item(LuaValue wrap, LuaValue count) {
int c = count.optint(1);
return new ItemStackWrapped(stack.splitStack(c));
}
@LuaMethod
public LuaValue peek_item(LuaValue wrap, LuaValue count) {
int c = count.optint(1);
ItemStack ns = stack.copy();
ns.setCount(Math.min(c, ns.getCount()));
return new ItemStackWrapped(ns);
}
}
|
[
"kontakt@asie.pl"
] |
kontakt@asie.pl
|
2345d4d9aa638e75aced373262c904ca3b00d47f
|
8870fa16fe6f0fe3e791c1463c5ee83c46f86839
|
/mmoarpg/mmoarpg-game/src/data/com/wanniu/game/data/BranchLineCO.java
|
583b0b505462684177b5a9e32e2d6fec2ba8d762
|
[] |
no_license
|
daxingyou/yxj
|
94535532ea4722493ac0342c18d575e764da9fbb
|
91fb9a5f8da9e5e772e04b3102fe68fe0db5e280
|
refs/heads/master
| 2022-01-08T10:22:48.477835
| 2018-04-11T03:18:37
| 2018-04-11T03:18:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 169
|
java
|
package com.wanniu.game.data;
public class BranchLineCO extends com.wanniu.game.data.base.TaskBase {
/** 构造前置属性 */
public void beforeProperty() { }
}
|
[
"lkjx3031274@163.com"
] |
lkjx3031274@163.com
|
f6f3b9d6f6e91a2889fd8a44216e66587d992c77
|
5ec06dab1409d790496ce082dacb321392b32fe9
|
/clients/jaxrs-cxf-client/generated/src/gen/java/org/openapitools/model/ComDayCqWcmCoreImplAuthoringUIModeServiceImplInfo.java
|
ab6ee781b40e1fab27b86335c633dcc3ddfc9bed
|
[
"Apache-2.0"
] |
permissive
|
shinesolutions/swagger-aem-osgi
|
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
|
c2f6e076971d2592c1cbd3f70695c679e807396b
|
refs/heads/master
| 2022-10-29T13:07:40.422092
| 2021-04-09T07:46:03
| 2021-04-09T07:46:03
| 190,217,155
| 3
| 3
|
Apache-2.0
| 2022-10-05T03:26:20
| 2019-06-04T14:23:28
| null |
UTF-8
|
Java
| false
| false
| 5,198
|
java
|
package org.openapitools.model;
import org.openapitools.model.ComDayCqWcmCoreImplAuthoringUIModeServiceImplProperties;
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ComDayCqWcmCoreImplAuthoringUIModeServiceImplInfo {
@ApiModelProperty(value = "")
private String pid = null;
@ApiModelProperty(value = "")
private String title = null;
@ApiModelProperty(value = "")
private String description = null;
@ApiModelProperty(value = "")
private ComDayCqWcmCoreImplAuthoringUIModeServiceImplProperties properties = null;
@ApiModelProperty(value = "")
private String additionalProperties = null;
@ApiModelProperty(value = "")
private String bundleLocation = null;
@ApiModelProperty(value = "")
private String serviceLocation = null;
/**
* Get pid
* @return pid
**/
@JsonProperty("pid")
public String getPid() {
return pid;
}
public void setPid(String pid) {
this.pid = pid;
}
public ComDayCqWcmCoreImplAuthoringUIModeServiceImplInfo pid(String pid) {
this.pid = pid;
return this;
}
/**
* Get title
* @return title
**/
@JsonProperty("title")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public ComDayCqWcmCoreImplAuthoringUIModeServiceImplInfo title(String title) {
this.title = title;
return this;
}
/**
* Get description
* @return description
**/
@JsonProperty("description")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public ComDayCqWcmCoreImplAuthoringUIModeServiceImplInfo description(String description) {
this.description = description;
return this;
}
/**
* Get properties
* @return properties
**/
@JsonProperty("properties")
public ComDayCqWcmCoreImplAuthoringUIModeServiceImplProperties getProperties() {
return properties;
}
public void setProperties(ComDayCqWcmCoreImplAuthoringUIModeServiceImplProperties properties) {
this.properties = properties;
}
public ComDayCqWcmCoreImplAuthoringUIModeServiceImplInfo properties(ComDayCqWcmCoreImplAuthoringUIModeServiceImplProperties properties) {
this.properties = properties;
return this;
}
/**
* Get additionalProperties
* @return additionalProperties
**/
@JsonProperty("additionalProperties")
public String getAdditionalProperties() {
return additionalProperties;
}
public void setAdditionalProperties(String additionalProperties) {
this.additionalProperties = additionalProperties;
}
public ComDayCqWcmCoreImplAuthoringUIModeServiceImplInfo additionalProperties(String additionalProperties) {
this.additionalProperties = additionalProperties;
return this;
}
/**
* Get bundleLocation
* @return bundleLocation
**/
@JsonProperty("bundle_location")
public String getBundleLocation() {
return bundleLocation;
}
public void setBundleLocation(String bundleLocation) {
this.bundleLocation = bundleLocation;
}
public ComDayCqWcmCoreImplAuthoringUIModeServiceImplInfo bundleLocation(String bundleLocation) {
this.bundleLocation = bundleLocation;
return this;
}
/**
* Get serviceLocation
* @return serviceLocation
**/
@JsonProperty("service_location")
public String getServiceLocation() {
return serviceLocation;
}
public void setServiceLocation(String serviceLocation) {
this.serviceLocation = serviceLocation;
}
public ComDayCqWcmCoreImplAuthoringUIModeServiceImplInfo serviceLocation(String serviceLocation) {
this.serviceLocation = serviceLocation;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ComDayCqWcmCoreImplAuthoringUIModeServiceImplInfo {\n");
sb.append(" pid: ").append(toIndentedString(pid)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append(" bundleLocation: ").append(toIndentedString(bundleLocation)).append("\n");
sb.append(" serviceLocation: ").append(toIndentedString(serviceLocation)).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 static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"cliffano@gmail.com"
] |
cliffano@gmail.com
|
11e6f1db7967962006547699efd0108f4a32ac94
|
83a60b1f317e1e5327be8cd96b4c7acb49b2634f
|
/Spells/src/main/java/com/lothrazar/samsmagic/spell/ISpell.java
|
122fc3fe22296c76a833ee22fef9db644437da1e
|
[
"MIT"
] |
permissive
|
Lothrazar/SamsPowerups
|
9ab7f5f67428573bc42105bbe6b0691453a78565
|
06142623bb5da81af702e473d20f0da4273d222d
|
refs/heads/master
| 2021-07-02T03:48:52.899109
| 2015-08-26T01:33:35
| 2015-08-26T01:33:35
| 26,006,925
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 747
|
java
|
package com.lothrazar.samsmagic.spell;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
public interface ISpell
{
public ISpell left();
public ISpell right();
public String getSpellName();
public int getSpellID();
public int getExpCost();
public void cast(World world, EntityPlayer player, BlockPos pos);
public void onCastSuccess(World world, EntityPlayer player, BlockPos pos);
public void onCastFailure(World world, EntityPlayer player, BlockPos pos);
public ItemStack getIconDisplay();
public ItemStack getIconDisplayHeader();
public boolean canPlayerCast(World world, EntityPlayer player, BlockPos pos);
}
|
[
"samson.bassett@gmail.com"
] |
samson.bassett@gmail.com
|
1953612470e40d168f47f3d5f8793cf1be619f66
|
71fe4adaecb0d34b598c9463068cccc096391b28
|
/scarabei-api/src/com/jfixby/scarabei/api/graphs/Graphs.java
|
37ae227028255436177f597912670e680dc85979
|
[] |
no_license
|
Scarabei/Scarabei
|
ea795ddfa0ee83bdc100b54ca88f09c56937c289
|
07ab9cf45eafb3c0bb939792303b4c70e6b50b95
|
refs/heads/master
| 2023-03-12T11:58:48.401947
| 2021-03-04T13:24:53
| 2021-03-04T13:31:01
| 45,246,099
| 8
| 3
| null | 2017-03-13T11:11:46
| 2015-10-30T11:02:15
|
Java
|
UTF-8
|
Java
| false
| false
| 1,178
|
java
|
package com.jfixby.scarabei.api.graphs;
import com.jfixby.scarabei.api.ComponentInstaller;
import com.jfixby.scarabei.api.collections.EditableCollection;
import com.jfixby.scarabei.api.floatn.ReadOnlyFloat2;
public class Graphs {
static private ComponentInstaller<GraphsComponent> componentInstaller = new ComponentInstaller<GraphsComponent>("Graphs");
public static final void installComponent (final GraphsComponent component_to_install) {
componentInstaller.installComponent(component_to_install);
}
public static void installComponent (final String className) {
componentInstaller.installComponent(className);
}
public static final GraphsComponent invoke () {
return componentInstaller.invokeComponent();
}
public static final GraphsComponent component () {
return componentInstaller.getComponent();
}
public static <VertexType, EdgeType> MultiGraph<VertexType, EdgeType> newUndirectedGraph () {
return invoke().newUndirectedGraph();
}
public static <EdgeType> PolyGraph<EdgeType> newPolyGraph (final EditableCollection<? extends ReadOnlyFloat2> vertices) {
return invoke().newPolyGraph(vertices);
}
}
|
[
"github@jfixby.com"
] |
github@jfixby.com
|
66df1d69b2bbe43b14670b48fa4a01fca99516cf
|
23f4d78623458d375cf23b7017c142dd45c32481
|
/OrientServer/orient-testresource/com/orient/testresource/controller/ResourceInitController.java
|
985cfa11db7c3f6ba657cf7a37031b0853526aaf
|
[] |
no_license
|
lcr863254361/weibao_qd
|
4e2165efec704b81e1c0f57b319e24be0a1e4a54
|
6d12c52235b409708ff920111db3e6e157a712a6
|
refs/heads/master
| 2023-04-03T00:37:18.947986
| 2021-04-11T15:12:45
| 2021-04-11T15:12:45
| 356,436,350
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,793
|
java
|
package com.orient.testresource.controller;
import com.orient.testresource.business.ResourceInitBusiness;
import com.orient.testresource.util.TestResourceUtil;
import com.orient.web.base.BaseController;
import com.orient.web.base.CommonResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.io.FileInputStream;
import java.util.Map;
/**
* 试验资源管理数据库初始化
*/
@Controller
@RequestMapping("/resourceInit")
public class ResourceInitController extends BaseController {
@Autowired
ResourceInitBusiness business;
@RequestMapping("initResourceDB")
@ResponseBody
public CommonResponseData initResourceDB() {
String sqlFilePath = TestResourceUtil.getAbsolutePath()+"../init/dsInit.sql";
sqlFilePath = TestResourceUtil.getFormatedPath(sqlFilePath);
Map<String, String> mapper = business.importSchema(sqlFilePath);
sqlFilePath = TestResourceUtil.getAbsolutePath()+"../init/tableInit.sql";
sqlFilePath = TestResourceUtil.getFormatedPath(sqlFilePath);
business.createTables(sqlFilePath, mapper);
sqlFilePath = TestResourceUtil.getAbsolutePath()+"../init/tempInit.sql";
sqlFilePath = TestResourceUtil.getFormatedPath(sqlFilePath);
business.importTemplate(sqlFilePath, mapper);
sqlFilePath = TestResourceUtil.getAbsolutePath()+"../init/tbomInit.sql";
sqlFilePath = TestResourceUtil.getFormatedPath(sqlFilePath);
business.importTBom(sqlFilePath, mapper);
return new CommonResponseData(true, "试验资源管理数据库初始化成功");
}
}
|
[
"lcr18015367626"
] |
lcr18015367626
|
735530224518bb8f5309c97ff13bf905e37fd30e
|
96f8d42c474f8dd42ecc6811b6e555363f168d3e
|
/budejie/sources/cn/v6/sixrooms/ui/phone/input/d.java
|
585a97baf8e5658b6db1a6f5ed3390eb609c5bd8
|
[] |
no_license
|
aheadlcx/analyzeApk
|
050b261595cecc85790558a02d79739a789ae3a3
|
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
|
refs/heads/master
| 2020-03-10T10:24:49.773318
| 2018-04-13T09:44:45
| 2018-04-13T09:44:45
| 129,332,351
| 6
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 733
|
java
|
package cn.v6.sixrooms.ui.phone.input;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
final class d implements TextWatcher {
final /* synthetic */ BaseRoomInputDialog a;
d(BaseRoomInputDialog baseRoomInputDialog) {
this.a = baseRoomInputDialog;
}
public final void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
if (this.a.mActivity.mSpeakState == 1 && !TextUtils.isEmpty(charSequence.toString())) {
this.a.mInputEditText.setText("");
}
}
public final void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
public final void afterTextChanged(Editable editable) {
}
}
|
[
"aheadlcxzhang@gmail.com"
] |
aheadlcxzhang@gmail.com
|
8acb713fcae002d26bdc8ba2dc6ce4fb0f7eed35
|
e53d97bee51ae59dc52c71f1425da0c5dd92a7d6
|
/app/src/main/java/com/davis/kangpinhui/util/VibrateUtil.java
|
3513fd6ef67d5889cc7d1123d9f6dbfa30d6b7c7
|
[] |
no_license
|
xusoku/KPH
|
a6920efd0a7e013a586bd0b0afa5785fe3354877
|
3485d53be0b57c38bfaf1e74db80d5fce3a14f9f
|
refs/heads/master
| 2020-04-12T08:06:48.961636
| 2017-07-13T03:01:47
| 2017-07-13T03:01:47
| 59,076,170
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,022
|
java
|
package com.davis.kangpinhui.util;
import android.content.Context;
import android.os.Vibrator;
/**
* <p>All methods requires the caller to hold the permission
* {@link android.Manifest.permission#VIBRATE}.
*
* @author MaTianyu
* @date 2014-11-21
*/
public class VibrateUtil {
/**
* Vibrate constantly for the specified period of time.
* <p>This method requires the caller to hold the permission
* {@link android.Manifest.permission#VIBRATE}.
*
* @param milliseconds The number of milliseconds to vibrate.
*/
public static void vibrate(Context context, long milliseconds) {
Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
vibrator.vibrate(milliseconds);
}
/**
* Vibrate with a given pattern.
* <p/>
* <p>
* Pass in an array of ints that are the durations for which to turn on or off
* the vibrator in milliseconds. The first value indicates the number of milliseconds
* to wait before turning the vibrator on. The next value indicates the number of milliseconds
* for which to keep the vibrator on before turning it off. Subsequent values alternate
* between durations in milliseconds to turn the vibrator off or to turn the vibrator on.
* </p><p>
* To cause the pattern to repeat, pass the index into the pattern array at which
* to start the repeat, or -1 to disable repeating.
* </p>
* <p>This method requires the caller to hold the permission
* {@link android.Manifest.permission#VIBRATE}.
*
* @param pattern an array of longs of times for which to turn the vibrator on or off.
* @param repeat the index into pattern at which to repeat, or -1 if
* you don't want to repeat.
*/
public static void vibrate(Context context, long[] pattern, int repeat) {
Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
vibrator.vibrate(pattern, repeat);
}
}
|
[
"286636562@qq.com"
] |
286636562@qq.com
|
80d94a30bab90c09ade4bccb05b1f15837d766d5
|
cb4a8a35cd9480abd7d0ec1958eb72829fda8f79
|
/06_Fragment/04_DialogFragment/app/src/main/java/com/miguelcr/a03_fragmentlist/MyNoteRecyclerViewAdapter.java
|
192b3a7c84581ef1ae65293d305b22cf4d096f83
|
[] |
no_license
|
miguelcamposdev/hrvatska2019
|
32b380a0b69ea33dc91a097ca57fb6f4b237e14a
|
1706ab7bafb00b86a57f097d5875bcead8d03618
|
refs/heads/master
| 2022-01-19T01:46:00.103004
| 2019-06-12T11:13:26
| 2019-06-12T11:13:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,247
|
java
|
package com.miguelcr.a03_fragmentlist;
import android.content.Context;
import android.graphics.Color;
import android.media.Image;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.miguelcr.a03_fragmentlist.dummy.DummyContent.DummyItem;
import java.util.List;
public class MyNoteRecyclerViewAdapter extends RecyclerView.Adapter<MyNoteRecyclerViewAdapter.ViewHolder> {
private final List<Note> mValues;
private final Context context;
public MyNoteRecyclerViewAdapter(Context ctx, List<Note> items) {
context = ctx;
mValues = items;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.fragment_note, parent, false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(final ViewHolder holder, int position) {
holder.mItem = mValues.get(position);
holder.tvTitle.setText(holder.mItem.getTitle());
holder.tvContent.setText(holder.mItem.getContent());
if(holder.mItem.isFavourite()) {
holder.ivFav.setImageResource(R.drawable.ic_star_black_24dp);
}
holder.mView.setBackgroundColor(
Color.parseColor(holder.mItem.getColor())
);
}
@Override
public int getItemCount() {
return mValues.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
public final View mView;
public final ImageView ivFav;
public final TextView tvTitle;
public final TextView tvContent;
public Note mItem;
public ViewHolder(View view) {
super(view);
mView = view;
ivFav = view.findViewById(R.id.imageViewFav);
tvTitle = view.findViewById(R.id.textViewTitle);
tvContent = view.findViewById(R.id.textViewContent);
}
@Override
public String toString() {
return super.toString() + " '" + tvTitle.getText() + "'";
}
}
}
|
[
"camposmiguel@gmail.com"
] |
camposmiguel@gmail.com
|
41a8c8447a9567729253ee2dd8efa29572234424
|
d60e287543a95a20350c2caeabafbec517cabe75
|
/NLPCCd/Camel/3157_2.java
|
c22cef10e24e5d69d3b9009c995f17ebfd4e230d
|
[
"MIT"
] |
permissive
|
sgholamian/log-aware-clone-detection
|
242067df2db6fd056f8d917cfbc143615c558b2c
|
9993cb081c420413c231d1807bfff342c39aa69a
|
refs/heads/main
| 2023-07-20T09:32:19.757643
| 2021-08-27T15:02:50
| 2021-08-27T15:02:50
| 337,837,827
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 437
|
java
|
//,temp,sample_4322.java,2,9,temp,sample_4876.java,2,10
//,3
public class xxx {
protected void doGetDeployment(Exchange exchange, String operation) throws Exception {
Deployment deployment = null;
String deploymentName = exchange.getIn().getHeader(KubernetesConstants.KUBERNETES_DEPLOYMENT_NAME, String.class);
if (ObjectHelper.isEmpty(deploymentName)) {
log.info("get a specific deployment require specify a deployment name");
}
}
};
|
[
"SHOSHIN\\sgholamian@shoshin.uwaterloo.ca"
] |
SHOSHIN\sgholamian@shoshin.uwaterloo.ca
|
d9f835ad50dcca23ebf078187c7601c05cb04f06
|
ebbb716ae1b612da41af7701d3cd49a5eedf9633
|
/src/listeners/ClpDAOListener.java
|
8e5bb8b89413a07a171410cc1674a4851f54c334
|
[] |
no_license
|
florin-b/LSFPRD
|
e79aa5baee1dad2e5e2327cc49725d182436120b
|
d3cbae5354647a316ccea39637aad5bf8cdc122b
|
refs/heads/master
| 2023-01-14T12:23:38.440610
| 2023-01-11T08:58:27
| 2023-01-11T08:58:27
| 40,964,418
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 155
|
java
|
package listeners;
import enums.EnumClpDAO;
public interface ClpDAOListener {
public void operationClpComplete(EnumClpDAO methodName, Object result);
}
|
[
"gflorinb@yahoo.com"
] |
gflorinb@yahoo.com
|
0bbff768cc9992f970f42aa6908ac706e7f8c163
|
2f2799f20fc894e7bae097707dde98fa68dfbb84
|
/src/main/java/au/org/ala/layers/dao/TaskDAOImpl.java
|
785a40e1e06024ecab9e2810b8c17f5436f5657b
|
[] |
no_license
|
TU-NHM-elurikkus/layers-store
|
da0d30c8e1dd0451137542495c81f4835813ea75
|
b751253a849b16dc3bcdd4bf993d292492f4e4ea
|
refs/heads/master
| 2021-01-22T23:48:46.607489
| 2017-03-21T09:50:51
| 2017-03-21T09:50:51
| 85,672,601
| 0
| 0
| null | 2017-03-21T07:38:36
| 2017-03-21T07:38:36
| null |
UTF-8
|
Java
| false
| false
| 4,336
|
java
|
/**************************************************************************
* Copyright (C) 2010 Atlas of Living Australia
* All Rights Reserved.
* <p>
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
* <p>
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
***************************************************************************/
package au.org.ala.layers.dao;
import au.org.ala.layers.dto.Task;
import org.apache.log4j.Logger;
import org.springframework.jdbc.core.simple.ParameterizedBeanPropertyRowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcInsert;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.sql.DataSource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author ajay
*/
@Service("taskDao")
public class TaskDAOImpl implements TaskDAO {
/**
* log4j logger
*/
private static final Logger logger = Logger.getLogger(TaskDAOImpl.class);
private SimpleJdbcTemplate jdbcTemplate;
private SimpleJdbcInsert insertTask;
@Resource(name = "dataSource")
public void setDataSource(DataSource dataSource) {
this.jdbcTemplate = new SimpleJdbcTemplate(dataSource);
this.insertTask = new SimpleJdbcInsert(dataSource).withTableName("task")
.usingColumns("name", "json", "size");
}
public List<Task> getTasks(int page, int pageSize, int minSize, int maxSize, boolean includeFinished, boolean includeStarted) {
String sql = "SELECT * FROM task " +
"WHERE size >= " + minSize + " AND size <= " + maxSize +
(!includeFinished ? " AND finished is NULL " : " ") +
(!includeStarted ? " AND started is NULL " : " ") +
" ORDER BY created " +
" LIMIT " + pageSize + " OFFSET " + page;
logger.debug(sql);
return jdbcTemplate.query(sql, ParameterizedBeanPropertyRowMapper.newInstance(Task.class));
}
@Transactional
public synchronized void addTask(String name, String json, Integer size) {
if (jdbcTemplate.queryForInt("select count(*) from task where name = '" + name + "' and " +
(json == null ? " json = '' " : " json = '" + json + "' ") +
" and started is null ") == 0) {
Map m = new HashMap();
m.put("name", name);
m.put("json", json);
m.put("size", size);
insertTask.execute(m);
}
}
public synchronized boolean startTask(int id) {
if (jdbcTemplate.queryForInt("select count(*) from task where id = " + id + " AND started is NULL") > 0) {
String sql = "UPDATE task SET started = CURRENT_TIMESTAMP WHERE id = " + id + " AND started is NULL";
jdbcTemplate.update(sql);
return true;
} else {
return false;
}
}
public void endTask(int id, String error) {
if (error != null && error.length() > 0) {
String sql = "UPDATE task SET finished = CURRENT_TIMESTAMP " +
", error = ? " +
" WHERE id = " + id;
jdbcTemplate.update(sql, error);
} else {
String sql = "UPDATE task SET finished = CURRENT_TIMESTAMP " +
" WHERE id = " + id;
jdbcTemplate.update(sql);
}
}
@Override
public Task getNextTask(int maxSize) {
List<Task> tasks = getTasks(0, 1, -1, maxSize, false, false);
if (tasks.size() > 0) {
return tasks.get(0);
} else {
return null;
}
}
@Override
public void resetStartedTasks() {
String sql = "UPDATE task SET started = null WHERE started is not null AND finished is null";
jdbcTemplate.update(sql);
}
}
|
[
"adam.collins832@gmail.com"
] |
adam.collins832@gmail.com
|
f9e9ec0e687e00676ac4bc25bdeb3374f22158c2
|
bb9140f335d6dc44be5b7b848c4fe808b9189ba4
|
/Extra-DS/Corpus/class/aspectj/826.java
|
42755e2f913dc35585bac854a31e60501d06c06d
|
[] |
no_license
|
masud-technope/EMSE-2019-Replication-Package
|
4fc04b7cf1068093f1ccf064f9547634e6357893
|
202188873a350be51c4cdf3f43511caaeb778b1e
|
refs/heads/master
| 2023-01-12T21:32:46.279915
| 2022-12-30T03:22:15
| 2022-12-30T03:22:15
| 186,221,579
| 5
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,309
|
java
|
package com.nwalsh.saxon;
import org.xml.sax.*;
import com.icl.saxon.output.*;
import com.icl.saxon.om.*;
import javax.xml.transform.TransformerException;
import com.icl.saxon.expr.FragmentValue;
import com.icl.saxon.tree.AttributeCollection;
/**
* <p>Saxon extension to scan the column widthsin a result tree fragment.</p>
*
* <p>$Id: ColumnUpdateEmitter.java,v 1.1 2002/05/15 17:22:27 isberg Exp $</p>
*
* <p>Copyright (C) 2000 Norman Walsh.</p>
*
* <p>This class provides a
* <a href="http://users.iclway.co.uk/mhkay/saxon/">Saxon 6.*</a>
* implementation to scan the column widths in a result tree
* fragment.</p>
*
* <p>The general design is this: the stylesheets construct a result tree
* fragment for some colgroup environment. That result tree fragment
* is "replayed" through the ColumnUpdateEmitter; the ColumnUpdateEmitter watches
* the cols go by and extracts the column widths that it sees. These
* widths are then made available.</p>
*
* <p><b>Change Log:</b></p>
* <dl>
* <dt>1.0</dt>
* <dd><p>Initial release.</p></dd>
* </dl>
*
* @author Norman Walsh
* <a href="mailto:ndw@nwalsh.com">ndw@nwalsh.com</a>
*
* @version $Id: ColumnUpdateEmitter.java,v 1.1 2002/05/15 17:22:27 isberg Exp $
*
*/
public class ColumnUpdateEmitter extends CopyEmitter {
/** The number of columns seen. */
protected int numColumns = 0;
protected String width[] = null;
protected NamePool namePool = null;
/** The FO namespace name. */
protected static String foURI = "http://www.w3.org/1999/XSL/Format";
/** Construct a new ColumnUpdateEmitter. */
public ColumnUpdateEmitter(NamePool namePool, String width[]) {
super(namePool);
numColumns = 0;
this.width = width;
this.namePool = namePool;
}
/** Examine for column info. */
public void startElement(int nameCode, org.xml.sax.Attributes attributes, int[] namespaces, int nscount) throws TransformerException {
int thisFingerprint = namePool.getFingerprint(nameCode);
int colFingerprint = namePool.getFingerprint("", "col");
int foColFingerprint = namePool.getFingerprint(foURI, "table-column");
if (thisFingerprint == colFingerprint) {
AttributeCollection attr = new AttributeCollection(namePool, attributes);
int widthFingerprint = namePool.getFingerprint("", "width");
if (attr.getValueByFingerprint(widthFingerprint) == null) {
attr.addAttribute(widthFingerprint, "CDATA", width[numColumns++]);
} else {
attr.setAttribute(widthFingerprint, "CDATA", width[numColumns++]);
}
attributes = attr;
} else if (thisFingerprint == foColFingerprint) {
AttributeCollection attr = new AttributeCollection(namePool, attributes);
int widthFingerprint = namePool.getFingerprint("", "column-width");
if (attr.getValueByFingerprint(widthFingerprint) == null) {
attr.addAttribute(widthFingerprint, "CDATA", width[numColumns++]);
} else {
attr.setAttribute(widthFingerprint, "CDATA", width[numColumns++]);
}
attributes = attr;
}
rtfEmitter.startElement(nameCode, attributes, namespaces, nscount);
}
}
|
[
"masudcseku@gmail.com"
] |
masudcseku@gmail.com
|
401573fe5d3f612fad1bde620e741000a45fdc7a
|
de3f5c7c3021232cf53e452b938df688929fc345
|
/tags/JAIN-SIP-1-2-1/src/gov/nist/javax/sip/header/ims/SecurityServerHeader.java
|
4116106f033ca04b81f889d82720e40d8afe3aeb
|
[
"LicenseRef-scancode-public-domain"
] |
permissive
|
rkday/jain-sip
|
bd3f728948bdaafd98c17bb4843148edab74cd0d
|
cf52d49d540f8515b209352f861365dbe3d59d90
|
refs/heads/master
| 2021-01-22T09:26:50.309500
| 2014-01-25T19:59:06
| 2014-01-25T19:59:06
| 16,236,776
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,881
|
java
|
/*
* Conditions Of Use
*
* This software was developed by employees of the National Institute of
* Standards and Technology (NIST), an agency of the Federal Government
* and others.
* Pursuant to title 15 Untied States Code Section 105, works of NIST
* employees are not subject to copyright protection in the United States
* and are considered to be in the public domain. As a result, a formal
* license is not needed to use the software.
*
* This software is provided by NIST as a service and is expressly
* provided "AS IS." NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY. NIST does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
* Permission to use this software is contingent upon your acceptance
* of the terms of this agreement.
*
*/
/************************************************************************************************
* PRODUCT OF PT INOVACAO - EST DEPARTMENT and Telecommunications Institute (Aveiro, Portugal) *
************************************************************************************************/
package gov.nist.javax.sip.header.ims;
import java.text.ParseException;
import javax.sip.InvalidArgumentException;
import javax.sip.header.Header;
import javax.sip.header.Parameters;
/**
* Security-Server header
* - sec-agree: RFC 3329 + 3GPP TS33.203 (Annex H).
*
* <p></p>
*
* @author Miguel Freitas (IT) PT-Inovacao
*/
public interface SecurityServerHeader extends SecurityAgreeHeader
{
/**
* Name of SecurityServerHeader
*/
public final static String NAME = "Security-Server";
}
|
[
"(no author)@8e71dc83-d81e-6649-80f2-80b843a9b2be"
] |
(no author)@8e71dc83-d81e-6649-80f2-80b843a9b2be
|
39674cf0535c897aaeb842c5057d06dd95347b34
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project47/src/test/java/org/gradle/test/performance47_2/Test47_157.java
|
92bb56db6cbc8c9616ba51384f8c2d16070d063c
|
[] |
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
| 292
|
java
|
package org.gradle.test.performance47_2;
import static org.junit.Assert.*;
public class Test47_157 {
private final Production47_157 production = new Production47_157("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
af646c64a4ed417994c062aeea2ee459501ab677
|
b55d3b2332871cad182ed82e01786780886d1dd0
|
/src/medium/PartitionEqualSubsetSum.java
|
8c3a470c9f7008889c3cf2ae3460b662653f21ec
|
[] |
no_license
|
acrush37/leetcode-dp
|
58c64735777c523a9627ef2950c8b865f0e33337
|
2fc10059c0151e8ef8dc948e8509be4bc3ad0796
|
refs/heads/master
| 2022-04-10T18:00:02.187481
| 2020-03-02T06:35:35
| 2020-03-02T06:35:35
| 215,553,677
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,135
|
java
|
package medium;
/*
Given a non-empty array containing only positive integers, find if the array can be
partitioned into two subsets such that the sum of elements in both subsets is equal.
*/
import java.util.Arrays;
public class PartitionEqualSubsetSum {
public static void main(String... args) {
int[] nums1 = {1, 2, 3, 4, 5, 6, 7};
int[] nums2 = {1, 2, 3, 5};
PartitionEqualSubsetSum partitionEqualSubsetSum = new PartitionEqualSubsetSum();
System.out.println(partitionEqualSubsetSum.canPartition(nums1));
System.out.println(partitionEqualSubsetSum.canPartition(nums2));
}
private boolean find(int s, int k, int[] nums) {
if (s == 0) return true;
if (k < 0 || nums[k] > s) return false;
return find(s - nums[k], k - 1, nums) || find(s, k - 1, nums);
}
public boolean canPartition(int[] nums) {
int n = nums.length;
if (n == 1) return false;
int s = 0;
for (int num : nums) s += num;
if ((s & 1) == 1) return false;
Arrays.sort(nums);
return find(s >> 1, n-1, nums);
}
}
|
[
"acrush37@gmail.com"
] |
acrush37@gmail.com
|
f1e4b27b4ca4c745b349ca0d70f37b093482a5b0
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_87/Testnull_8674.java
|
f8c84b259a05620e30c5b49839dccecd9beb238f
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 304
|
java
|
package org.gradle.test.performancenull_87;
import static org.junit.Assert.*;
public class Testnull_8674 {
private final Productionnull_8674 production = new Productionnull_8674("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
a747f4d0e4a6630d1e9f916605be7a0ff81027df
|
6edf6c315706e14dc6aef57788a2abea17da10a3
|
/com/planet_ink/marble_mud/Abilities/Thief/Thief_PlantItem.java
|
d43da606c4e51fe226a2889fc3389424657afeb4
|
[] |
no_license
|
Cocanuta/Marble
|
c88efd73c46bd152098f588ba1cdc123316df818
|
4306fbda39b5488dac465a221bf9d8da4cbf2235
|
refs/heads/master
| 2020-12-25T18:20:08.253300
| 2012-09-10T17:09:50
| 2012-09-10T17:09:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,707
|
java
|
package com.planet_ink.marble_mud.Abilities.Thief;
import com.planet_ink.marble_mud.core.interfaces.*;
import com.planet_ink.marble_mud.core.*;
import com.planet_ink.marble_mud.core.collections.*;
import com.planet_ink.marble_mud.Abilities.interfaces.*;
import com.planet_ink.marble_mud.Areas.interfaces.*;
import com.planet_ink.marble_mud.Behaviors.interfaces.*;
import com.planet_ink.marble_mud.CharClasses.interfaces.*;
import com.planet_ink.marble_mud.Commands.interfaces.*;
import com.planet_ink.marble_mud.Common.interfaces.*;
import com.planet_ink.marble_mud.Exits.interfaces.*;
import com.planet_ink.marble_mud.Items.interfaces.*;
import com.planet_ink.marble_mud.Locales.interfaces.*;
import com.planet_ink.marble_mud.MOBS.interfaces.*;
import com.planet_ink.marble_mud.Races.interfaces.*;
import java.util.*;
/*
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.
*/
@SuppressWarnings("rawtypes")
public class Thief_PlantItem extends ThiefSkill
{
public String ID() { return "Thief_PlantItem"; }
public String name(){ return "Plant Item";}
protected int canAffectCode(){return 0;}
protected int canTargetCode(){return Ability.CAN_MOBS;}
public int abstractQuality(){return Ability.QUALITY_INDIFFERENT;}
public int classificationCode(){return Ability.ACODE_THIEF_SKILL|Ability.DOMAIN_STEALING;}
private static final String[] triggerStrings = {"PLANTITEM"};
public String[] triggerStrings(){return triggerStrings;}
public int usageType(){return USAGE_MOVEMENT|USAGE_MANA;}
public int code=0;
public int abilityCode(){return code;}
public void setAbilityCode(int newCode){code=newCode;}
public boolean invoke(MOB mob, Vector commands, Physical givenTarget, boolean auto, int asLevel)
{
if(commands.size()<2)
{
mob.tell("What would you like to plant on whom?");
return false;
}
MOB target=mob.location().fetchInhabitant((String)commands.lastElement());
if((target==null)||(!CMLib.flags().canBeSeenBy(target,mob)))
{
mob.tell("You don't see '"+(String)commands.lastElement()+"' here.");
return false;
}
if(target==mob)
{
mob.tell("You cannot plant anything on yourself!");
return false;
}
commands.removeElement(commands.lastElement());
Item item=super.getTarget(mob,null,givenTarget,commands,Wearable.FILTER_UNWORNONLY);
if(item==null) return false;
if(!super.invoke(mob,commands,givenTarget,auto,asLevel))
return false;
int levelDiff=target.phyStats().level()-(mob.phyStats().level()+abilityCode()+(getXLEVELLevel(mob)*2));
if(levelDiff<0) levelDiff=0;
levelDiff*=5;
boolean success=proficiencyCheck(mob,-levelDiff,auto);
if(success)
{
CMMsg msg=CMClass.getMsg(mob,target,item,CMMsg.MSG_GIVE,"<S-NAME> plant(s) <O-NAME> on <T-NAMESELF>.",CMMsg.MASK_ALWAYS|CMMsg.MSG_GIVE,null,CMMsg.MASK_ALWAYS|CMMsg.MSG_GIVE,null);
if(mob.location().okMessage(mob,msg))
{
mob.location().send(mob,msg);
if(target.isMine(item))
{
item.basePhyStats().setDisposition(item.basePhyStats().disposition()|PhyStats.IS_HIDDEN);
item.recoverPhyStats();
}
}
}
else
beneficialVisualFizzle(mob,target,"<S-NAME> attempt(s) to plant "+item.name()+" on <T-NAMESELF>, but fail(s).");
return success;
}
}
|
[
"Cocanuta@Gmail.com"
] |
Cocanuta@Gmail.com
|
17dd1c81974d235ef3eda3f6b4686dafcb39f03e
|
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
|
/src/chosun/ciis/fc/func/rec/FC_FUNC_6050_LCURLISTRecord.java
|
620b76fc9bf4fca6c7190d7594565fade9cfba77
|
[] |
no_license
|
nosmoon/misdevteam
|
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
|
1829d5bd489eb6dd307ca244f0e183a31a1de773
|
refs/heads/master
| 2020-04-15T15:57:05.480056
| 2019-01-10T01:12:01
| 2019-01-10T01:12:01
| 164,812,547
| 1
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 2,451
|
java
|
/***************************************************************************************************
* 파일명 : .java
* 기능 : 독자우대-구독신청
* 작성일자 : 2007-05-22
* 작성자 : 김대섭
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.fc.func.rec;
import java.sql.*;
import chosun.ciis.fc.func.dm.*;
import chosun.ciis.fc.func.ds.*;
/**
*
*/
public class FC_FUNC_6050_LCURLISTRecord extends java.lang.Object implements java.io.Serializable{
public String deps_isav_clsf_cd;
public String deps_isav_no;
public String deps_isav_clsf_cdnm;
public String tot_pymt_amt;
public String comp_dt;
public String mtry_dt;
public String int_rate;
public String mangiamt;
public FC_FUNC_6050_LCURLISTRecord(){}
public void setDeps_isav_clsf_cd(String deps_isav_clsf_cd){
this.deps_isav_clsf_cd = deps_isav_clsf_cd;
}
public void setDeps_isav_no(String deps_isav_no){
this.deps_isav_no = deps_isav_no;
}
public void setDeps_isav_clsf_cdnm(String deps_isav_clsf_cdnm){
this.deps_isav_clsf_cdnm = deps_isav_clsf_cdnm;
}
public void setTot_pymt_amt(String tot_pymt_amt){
this.tot_pymt_amt = tot_pymt_amt;
}
public void setComp_dt(String comp_dt){
this.comp_dt = comp_dt;
}
public void setMtry_dt(String mtry_dt){
this.mtry_dt = mtry_dt;
}
public void setInt_rate(String int_rate){
this.int_rate = int_rate;
}
public void setMangiamt(String mangiamt){
this.mangiamt = mangiamt;
}
public String getDeps_isav_clsf_cd(){
return this.deps_isav_clsf_cd;
}
public String getDeps_isav_no(){
return this.deps_isav_no;
}
public String getDeps_isav_clsf_cdnm(){
return this.deps_isav_clsf_cdnm;
}
public String getTot_pymt_amt(){
return this.tot_pymt_amt;
}
public String getComp_dt(){
return this.comp_dt;
}
public String getMtry_dt(){
return this.mtry_dt;
}
public String getInt_rate(){
return this.int_rate;
}
public String getMangiamt(){
return this.mangiamt;
}
}
/* 작성시간 : Thu Mar 19 14:03:34 KST 2009 */
|
[
"DLCOM000@172.16.30.11"
] |
DLCOM000@172.16.30.11
|
ff17f2319f26d3ad34bcd134fe4644017a292edc
|
22c06ce39649e70f5eee3b77a2f355f064a51c74
|
/services/src/main/java/org/keycloak/protocol/oidc/grants/ciba/endpoints/request/BackchannelAuthenticationEndpointRequest.java
|
8077e9406c46fa0a3fb6c7144b46daac36bb0da0
|
[
"Apache-2.0"
] |
permissive
|
keycloak/keycloak
|
fa71d8b0712c388faeb89ade03ea5f1073ffb837
|
a317f78e65c1ee63eb166c61767f34f72be0a891
|
refs/heads/main
| 2023-09-01T20:04:48.392597
| 2023-09-01T17:12:35
| 2023-09-01T17:12:35
| 11,125,589
| 17,920
| 7,045
|
Apache-2.0
| 2023-09-14T19:48:31
| 2013-07-02T13:38:51
|
Java
|
UTF-8
|
Java
| false
| false
| 2,610
|
java
|
/*
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* 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.keycloak.protocol.oidc.grants.ciba.endpoints.request;
import java.util.HashMap;
import java.util.Map;
/**
* @author <a href="mailto:takashi.norimatsu.ws@hitachi.com">Takashi Norimatsu</a>
*/
public class BackchannelAuthenticationEndpointRequest {
String scope;
String clientNotificationToken;
String acr;
String loginHintToken;
String idTokenHint;
String loginHint;
String bindingMessage;
String userCode;
Integer requestedExpiry;
String prompt;
String nonce;
Integer maxAge;
String display;
String uiLocales;
String claims;
Map<String, String> additionalReqParams = new HashMap<>();
String invalidRequestMessage;
public String getScope() {
return scope;
}
public String getClientNotificationToken() {
return clientNotificationToken;
}
public String getAcr() {
return acr;
}
public String getLoginHintToken() {
return loginHintToken;
}
public String getIdTokenHint() {
return idTokenHint;
}
public String getLoginHint() {
return loginHint;
}
public String getBindingMessage() {
return bindingMessage;
}
public String getUserCode() {
return userCode;
}
public Integer getRequestedExpiry() {
return requestedExpiry;
}
public String getPrompt() {
return prompt;
}
public String getNonce() {
return nonce;
}
public Integer getMaxAge() {
return maxAge;
}
public String getDisplay() {
return display;
}
public String getUiLocales() {
return uiLocales;
}
public String getClaims() {
return claims;
}
public Map<String, String> getAdditionalReqParams() {
return additionalReqParams;
}
public String getInvalidRequestMessage() {
return invalidRequestMessage;
}
}
|
[
"mposolda@gmail.com"
] |
mposolda@gmail.com
|
4d32906cd426e95660d958df233ca4d3f0348bd2
|
b19674396d9a96c7fd7abdcfa423fe9fea4bb5be
|
/ratis-proto-shaded/src/main/java/org/apache/ratis/shaded/io/netty/util/DefaultAttributeMap.java
|
d9fd80b0e1ce4c796e653cb0dec5bf95d7e07eff
|
[] |
no_license
|
snemuri/ratis.github.io
|
0529ceed6f86ad916fbc559576b39ae123c465a0
|
85e1dd1890477d4069052358ed0b163c3e23db76
|
refs/heads/master
| 2020-03-24T07:18:03.130700
| 2018-07-27T13:29:06
| 2018-07-27T13:29:06
| 142,558,496
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,933
|
java
|
/*
* Copyright 2012 The Netty Project
*
* The Netty Project 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.ratis.shaded.io.netty.util;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.atomic.AtomicReferenceArray;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
/**
* Default {@link AttributeMap} implementation which use simple synchronization per bucket to keep the memory overhead
* as low as possible.
*/
public class DefaultAttributeMap implements AttributeMap {
@SuppressWarnings("rawtypes")
private static final AtomicReferenceFieldUpdater<DefaultAttributeMap, AtomicReferenceArray> updater =
AtomicReferenceFieldUpdater.newUpdater(DefaultAttributeMap.class, AtomicReferenceArray.class, "attributes");
private static final int BUCKET_SIZE = 4;
private static final int MASK = BUCKET_SIZE - 1;
// Initialize lazily to reduce memory consumption; updated by AtomicReferenceFieldUpdater above.
@SuppressWarnings("UnusedDeclaration")
private volatile AtomicReferenceArray<DefaultAttribute<?>> attributes;
@SuppressWarnings("unchecked")
@Override
public <T> Attribute<T> attr(AttributeKey<T> key) {
if (key == null) {
throw new NullPointerException("key");
}
AtomicReferenceArray<DefaultAttribute<?>> attributes = this.attributes;
if (attributes == null) {
// Not using ConcurrentHashMap due to high memory consumption.
attributes = new AtomicReferenceArray<DefaultAttribute<?>>(BUCKET_SIZE);
if (!updater.compareAndSet(this, null, attributes)) {
attributes = this.attributes;
}
}
int i = index(key);
DefaultAttribute<?> head = attributes.get(i);
if (head == null) {
// No head exists yet which means we may be able to add the attribute without synchronization and just
// use compare and set. At worst we need to fallback to synchronization and waste two allocations.
head = new DefaultAttribute();
DefaultAttribute<T> attr = new DefaultAttribute<T>(head, key);
head.next = attr;
attr.prev = head;
if (attributes.compareAndSet(i, null, head)) {
// we were able to add it so return the attr right away
return attr;
} else {
head = attributes.get(i);
}
}
synchronized (head) {
DefaultAttribute<?> curr = head;
for (;;) {
DefaultAttribute<?> next = curr.next;
if (next == null) {
DefaultAttribute<T> attr = new DefaultAttribute<T>(head, key);
curr.next = attr;
attr.prev = curr;
return attr;
}
if (next.key == key && !next.removed) {
return (Attribute<T>) next;
}
curr = next;
}
}
}
@Override
public <T> boolean hasAttr(AttributeKey<T> key) {
if (key == null) {
throw new NullPointerException("key");
}
AtomicReferenceArray<DefaultAttribute<?>> attributes = this.attributes;
if (attributes == null) {
// no attribute exists
return false;
}
int i = index(key);
DefaultAttribute<?> head = attributes.get(i);
if (head == null) {
// No attribute exists which point to the bucket in which the head should be located
return false;
}
// We need to synchronize on the head.
synchronized (head) {
// Start with head.next as the head itself does not store an attribute.
DefaultAttribute<?> curr = head.next;
while (curr != null) {
if (curr.key == key && !curr.removed) {
return true;
}
curr = curr.next;
}
return false;
}
}
private static int index(AttributeKey<?> key) {
return key.id() & MASK;
}
@SuppressWarnings("serial")
private static final class DefaultAttribute<T> extends AtomicReference<T> implements Attribute<T> {
private static final long serialVersionUID = -2661411462200283011L;
// The head of the linked-list this attribute belongs to
private final DefaultAttribute<?> head;
private final AttributeKey<T> key;
// Double-linked list to prev and next node to allow fast removal
private DefaultAttribute<?> prev;
private DefaultAttribute<?> next;
// Will be set to true one the attribute is removed via getAndRemove() or remove()
private volatile boolean removed;
DefaultAttribute(DefaultAttribute<?> head, AttributeKey<T> key) {
this.head = head;
this.key = key;
}
// Special constructor for the head of the linked-list.
DefaultAttribute() {
head = this;
key = null;
}
@Override
public AttributeKey<T> key() {
return key;
}
@Override
public T setIfAbsent(T value) {
while (!compareAndSet(null, value)) {
T old = get();
if (old != null) {
return old;
}
}
return null;
}
@Override
public T getAndRemove() {
removed = true;
T oldValue = getAndSet(null);
remove0();
return oldValue;
}
@Override
public void remove() {
removed = true;
set(null);
remove0();
}
private void remove0() {
synchronized (head) {
if (prev == null) {
// Removed before.
return;
}
prev.next = next;
if (next != null) {
next.prev = prev;
}
// Null out prev and next - this will guard against multiple remove0() calls which may corrupt
// the linked list for the bucket.
prev = null;
next = null;
}
}
}
}
|
[
"snemuri@hortonworks.com"
] |
snemuri@hortonworks.com
|
9cc038caf5ed406646d0d634a129f2e4602a457a
|
dfb3f631ed8c18bd4605739f1ecb6e47d715a236
|
/disconnect-highcharts/src/main/java/js/lang/external/highcharts/SeriesIkhOptions.java
|
3e4ddb08524124e242c7ebe8fa1bb2cbaff03d81
|
[
"Apache-2.0"
] |
permissive
|
fluorumlabs/disconnect-project
|
ceb788b901d1bf7cfc5ee676592f55f8a584a34e
|
54f4ea5e6f05265ea985e1ee615cc3d59d5842b4
|
refs/heads/master
| 2022-12-26T11:26:46.539891
| 2020-08-20T16:37:19
| 2020-08-20T16:37:19
| 203,577,241
| 6
| 1
|
Apache-2.0
| 2022-12-16T00:41:56
| 2019-08-21T12:14:42
|
Java
|
UTF-8
|
Java
| false
| false
| 2,686
|
java
|
package js.lang.external.highcharts;
import com.github.fluorumlabs.disconnect.core.annotations.Import;
import com.github.fluorumlabs.disconnect.core.annotations.NpmPackage;
import javax.annotation.Nullable;
import js.extras.JsEnum;
import js.lang.Any;
import js.lang.Unknown /* undefined */;
import org.teavm.jso.JSProperty;
/**
* (Highstock) A <code>IKH</code> series. If the type option is not specified, it is
* inherited from chart.type.
*
* In TypeScript the type option must always be set.
*
* Configuration options for the series are given in three levels:
*
* <ol>
* <li>
* Options for all series in a chart are defined in the plotOptions.series
* object.
*
* </li>
* <li>
* Options for all <code>ikh</code> series are defined in plotOptions.ikh.
*
* </li>
* <li>
* Options for one single series are given in the series instance array. (see
* online documentation for example)
*
* </li>
* </ol>
* You have to extend the <code>SeriesIkhOptions</code> via an interface to allow custom
* properties: ``` declare interface SeriesIkhOptions { customProperty: string;
* }
*
*/
@NpmPackage(
name = "highcharts",
version = "^8.1.2"
)
@Import(
module = "highcharts/es-modules/masters/highcharts.src.js"
)
public interface SeriesIkhOptions extends PlotIkhOptions, SeriesOptions {
/**
* Not available
*
*/
@JSProperty("dataParser")
@Nullable
Unknown /* undefined */ getDataParser();
/**
* Not available
*
*/
@JSProperty("dataURL")
@Nullable
Unknown /* undefined */ getDataURL();
/**
* (Highcharts, Highstock, Highmaps, Gantt) This property is only in
* TypeScript non-optional and might be <code>undefined</code> in series objects from
* unknown sources.
*
*/
@JSProperty("type")
Type getType();
/**
* (Highcharts, Highstock, Highmaps, Gantt) This property is only in
* TypeScript non-optional and might be <code>undefined</code> in series objects from
* unknown sources.
*
*/
@JSProperty("type")
void setType(Type value);
static Builder builder() {
return new Builder();
}
abstract class Type extends JsEnum {
public static final Type IKH = JsEnum.of("ikh");
}
final class Builder {
private final SeriesIkhOptions object = Any.empty();
private Builder() {
}
public SeriesIkhOptions build() {
return object;
}
/**
* (Highcharts, Highstock, Highmaps, Gantt) This property is only in
* TypeScript non-optional and might be <code>undefined</code> in series objects from
* unknown sources.
*
*/
public Builder type(Type value) {
object.setType(value);
return this;
}
}
}
|
[
"fluorumlabs@users.noreply.github.com"
] |
fluorumlabs@users.noreply.github.com
|
32ee76fb1712c304d51280723e77884755b08f9b
|
7b36c92e2c1c8d24ddf671b65ca813320e0ce3a7
|
/SteepleChase.java
|
8ac87f807696bca7bfc6db88eedf3543ba9a5dae
|
[] |
no_license
|
m2mtech/cs106a-assignment1
|
69d73f3eb583145e25c8b84d956b9ed9e3cf0750
|
32fd244b52cc4411ad5d26cfd83b2e9d402be203
|
refs/heads/master
| 2021-01-19T14:52:51.346404
| 2012-09-14T17:28:34
| 2012-09-14T17:28:34
| 5,756,585
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,336
|
java
|
/*
* File: SteepleChase.java
* -----------------------
* Karel runs a steeple chase the is 9 avenues long.
* Hurdles are of arbitrary height and placement.
*/
import stanford.karel.*;
public class SteepleChase extends SuperKarel {
/*
* To run a race that is 9 avenues long, we
* forward or jump hurdles 8 times.
*/
public void run() {
for (int i = 0; i < 8; i++) {
if (frontIsClear()) {
move();
} else {
jumpHurdle();
}
}
}
/*
* Pre-condition: Facing East at bottom of hurdle
* Post-condition: Facing East at bottom in next avenue
* after hurdle
*/
private void jumpHurdle() {
ascendHurdle();
move();
descendHurdle();
}
/*
* Pre-condition: Facing East at bottom of hurdle
* Post-condition: Facing East immediately above hurdle
*/
private void ascendHurdle() {
turnLeft();
while (rightIsBlocked()) {
move();
}
turnRight();
}
/*
* Pre-condition: Facing East above and immediately after hurdle
* Post-condition: Facing East at bottom of hurdle
*/
private void descendHurdle() {
turnRight();
moveToWall();
turnLeft();
}
/*
* Pre-condition: none
* Post-condition: Facing first wall in whichever direction
* Karel was facing previously
*/
private void moveToWall() {
while (frontIsClear()) {
move();
}
}
}
|
[
"s"
] |
s
|
e7e9cff0269d68ceffe98bba80fb4800ac68157a
|
d3e4601f45428fefd1ca2d7b10ec4834f4725db3
|
/tool/src/org/antlr/v4/codegen/model/decl/CodeBlock.java
|
e19933191d007cb41d98b45e549a612bd3c6460f
|
[
"BSD-3-Clause"
] |
permissive
|
chrreisinger/antlr4
|
8a20bd8b3e9c0a111d0011ab1ba9c93a2a1659b5
|
085dd05bf17f071d22e9d089932884d914dadcdf
|
refs/heads/master
| 2021-01-20T23:31:21.956149
| 2011-08-13T03:51:12
| 2011-08-13T03:51:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,623
|
java
|
/*
[The "BSD license"]
Copyright (c) 2011 Terence Parr
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. 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.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.antlr.v4.codegen.model.decl;
import org.antlr.v4.codegen.OutputModelFactory;
import org.antlr.v4.codegen.model.*;
import org.antlr.v4.runtime.misc.OrderedHashSet;
import java.util.*;
public class CodeBlock extends SrcOp {
public int codeBlockLevel;
public int treeLevel;
@ModelElement public OrderedHashSet<Decl> locals;
@ModelElement public List<SrcOp> preamble;
@ModelElement public List<SrcOp> ops;
public CodeBlock(OutputModelFactory factory) {
super(factory);
}
public CodeBlock(OutputModelFactory factory, int treeLevel, int codeBlockLevel) {
super(factory);
this.treeLevel = treeLevel;
this.codeBlockLevel = codeBlockLevel;
}
/** Add local var decl */
public void addLocalDecl(Decl d) {
if ( locals==null ) locals = new OrderedHashSet<Decl>();
locals.add(d);
d.isLocal = true;
}
public void addPreambleOp(SrcOp op) {
if ( preamble==null ) preamble = new ArrayList<SrcOp>();
preamble.add(op);
}
public void addOp(SrcOp op) {
if ( ops==null ) ops = new ArrayList<SrcOp>();
ops.add(op);
}
public void addOps(List<SrcOp> ops) {
if ( this.ops==null ) this.ops = new ArrayList<SrcOp>();
this.ops.addAll(ops);
}
}
|
[
"parrt@antlr.org"
] |
parrt@antlr.org
|
bcc61ba0b438574dd8f281e3817379c26c7a1948
|
01563cf663b502102e22b73bd3ff6a16dde701d0
|
/src/main/java/com/jk51/modules/pandian/error/NotFoundStoresException.java
|
822e0d9bcb7666e2528bcb26be42280c72f9d84d
|
[] |
no_license
|
tomzhang/springTestB
|
17cc2d866723d7200302b068a30239732a9cda26
|
af4bd2d5cc90d44f0b786fb115577a811d1eaac7
|
refs/heads/master
| 2020-05-02T04:35:50.729767
| 2018-10-24T02:24:35
| 2018-10-24T02:24:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 334
|
java
|
package com.jk51.modules.pandian.error;
/**
* 版权所有(C) 2017 上海伍壹健康科技有限公司
* 描述:
* 作者: gaojie
* 创建日期: 2017-12-27
* 修改记录:
*/
public class NotFoundStoresException extends RuntimeException {
public NotFoundStoresException(String message){
super(message);
}
}
|
[
"gaojie@51jk.com"
] |
gaojie@51jk.com
|
19d06994c25b0f63a8658159b0438015040c0cc9
|
088d37e531cd4516480e8ceb143ca46800cc19af
|
/app/src/main/java/davidandroidprojecttools/qq986945193/com/davidandroidprojecttools/pulltorefreshlibrarary/LoadingLayoutProxy.java
|
84afda8b8a4ceea7fa309054f3edc104c808c954
|
[] |
no_license
|
IaHehe/DavidAndroidProjectTools
|
f562bc1bd5499c063d8d73f3977fa9ab1399f928
|
ed4db1728715c61eb27abf772fa88454d2896b83
|
refs/heads/master
| 2021-01-20T07:13:43.908834
| 2017-04-28T03:10:45
| 2017-04-28T03:10:45
| 89,981,337
| 3
| 1
| null | 2017-05-02T02:05:55
| 2017-05-02T02:05:55
| null |
UTF-8
|
Java
| false
| false
| 2,150
|
java
|
package davidandroidprojecttools.qq986945193.com.davidandroidprojecttools.pulltorefreshlibrarary;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import java.util.HashSet;
import davidandroidprojecttools.qq986945193.com.davidandroidprojecttools.pulltorefreshlibrarary.internal.LoadingLayout;
/**
* @author :程序员小冰
* @新浪微博 :http://weibo.com/mcxiaobing
* @GitHub: https://github.com/QQ986945193
* @CSDN博客: http://blog.csdn.net/qq_21376985
* @OsChina空间: https://my.oschina.net/mcxiaobing
*/
public class LoadingLayoutProxy implements ILoadingLayout {
private final HashSet<LoadingLayout> mLoadingLayouts;
LoadingLayoutProxy() {
mLoadingLayouts = new HashSet<LoadingLayout>();
}
/**
* This allows you to add extra LoadingLayout instances to this proxy. This
* is only necessary if you keep your own instances, and want to have them
* included in any
* {@link PullToRefreshBase#createLoadingLayoutProxy(boolean, boolean)
* createLoadingLayoutProxy(...)} calls.
*
* @param layout - LoadingLayout to have included.
*/
public void addLayout(LoadingLayout layout) {
if (null != layout) {
mLoadingLayouts.add(layout);
}
}
@Override
public void setLastUpdatedLabel(CharSequence label) {
for (LoadingLayout layout : mLoadingLayouts) {
layout.setLastUpdatedLabel(label);
}
}
@Override
public void setLoadingDrawable(Drawable drawable) {
for (LoadingLayout layout : mLoadingLayouts) {
layout.setLoadingDrawable(drawable);
}
}
@Override
public void setRefreshingLabel(CharSequence refreshingLabel) {
for (LoadingLayout layout : mLoadingLayouts) {
layout.setRefreshingLabel(refreshingLabel);
}
}
@Override
public void setPullLabel(CharSequence label) {
for (LoadingLayout layout : mLoadingLayouts) {
layout.setPullLabel(label);
}
}
@Override
public void setReleaseLabel(CharSequence label) {
for (LoadingLayout layout : mLoadingLayouts) {
layout.setReleaseLabel(label);
}
}
public void setTextTypeface(Typeface tf) {
for (LoadingLayout layout : mLoadingLayouts) {
layout.setTextTypeface(tf);
}
}
}
|
[
"986945193@qq.com"
] |
986945193@qq.com
|
931b9b919b141d5247bbf76b8be7af8e0fbb4aaa
|
656ce78b903ef3426f8f1ecdaee57217f9fbc40e
|
/src/com/localytics/android/BaseHandler$BaseListener.java
|
eb61d4f27a4b6328764e0d8363ec080140806342
|
[] |
no_license
|
zhuharev/periscope-android-source
|
51bce2c1b0b356718be207789c0b84acf1e7e201
|
637ab941ed6352845900b9d465b8e302146b3f8f
|
refs/heads/master
| 2021-01-10T01:47:19.177515
| 2015-12-25T16:51:27
| 2015-12-25T16:51:27
| 48,586,306
| 8
| 10
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 322
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.localytics.android;
// Referenced classes of package com.localytics.android:
// BaseHandler
public static interface
{
}
|
[
"hostmaster@zhuharev.ru"
] |
hostmaster@zhuharev.ru
|
bf500e536888f824c9d4ff9a476e0e81eb2ca17e
|
128da67f3c15563a41b6adec87f62bf501d98f84
|
/com/emt/proteus/duchampopt/__tcf_446794.java
|
8df2e5dbc3ed777130fe4176959ee77c716db1da
|
[] |
no_license
|
Creeper20428/PRT-S
|
60ff3bea6455c705457bcfcc30823d22f08340a4
|
4f6601fb0dd00d7061ed5ee810a3252dcb2efbc6
|
refs/heads/master
| 2020-03-26T03:59:25.725508
| 2018-08-12T16:05:47
| 2018-08-12T16:05:47
| 73,244,383
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,644
|
java
|
/* */ package com.emt.proteus.duchampopt;
/* */
/* */ import com.emt.proteus.runtime.api.Env;
/* */ import com.emt.proteus.runtime.api.Frame;
/* */ import com.emt.proteus.runtime.api.Function;
/* */ import com.emt.proteus.runtime.api.ImplementedFunction;
/* */ import com.emt.proteus.runtime.library.strings._ZNSsD1Ev;
/* */
/* */ public final class __tcf_446794 extends ImplementedFunction
/* */ {
/* */ public static final int FNID = 2013;
/* 12 */ public static final Function _instance = new __tcf_446794();
/* 13 */ public final Function resolve() { return _instance; }
/* */
/* 15 */ public __tcf_446794() { super("__tcf_446794", 1, false); }
/* */
/* */ public int execute(int paramInt)
/* */ {
/* 19 */ call(paramInt);
/* 20 */ return 0;
/* */ }
/* */
/* */ public int execute(Env paramEnv, Frame paramFrame, int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt, int paramInt4)
/* */ {
/* 25 */ int i = paramFrame.getI32(paramArrayOfInt[paramInt4]);
/* 26 */ paramInt4 += 2;
/* 27 */ paramInt3--;
/* 28 */ call(i);
/* 29 */ return paramInt4;
/* */ }
/* */
/* */
/* */
/* */
/* */ public static void call(int paramInt)
/* */ {
/* */ try
/* */ {
/* 39 */ _ZNSsD1Ev.call(466704);
/* 40 */ return;
/* */ }
/* */ finally {}
/* */ }
/* */ }
/* Location: /home/jkim13/Desktop/emediatrack/codejar_s.jar!/com/emt/proteus/duchampopt/__tcf_446794.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"kimjoey79@gmail.com"
] |
kimjoey79@gmail.com
|
70e9fb612c2ee8ecb1a7bdabe708d69c29694d17
|
9718498ab481a31c2aa808240c3fac135a9c4ef0
|
/util/ReflectUtils.java
|
8c69d771034fef130c4a67b8d05ae95d7736ebd6
|
[] |
no_license
|
Pzqqt/prevent-framework
|
761400862ad1eabb0cf62f4f78b335a5f915d745
|
3e59b4e99033a3c46a20578a0a220da57b062eb6
|
refs/heads/master
| 2020-03-19T08:15:38.877375
| 2018-12-08T18:12:05
| 2018-12-08T18:12:05
| 136,188,850
| 0
| 1
| null | 2018-06-05T14:21:12
| 2018-06-05T14:21:12
| null |
UTF-8
|
Java
| false
| false
| 3,121
|
java
|
package me.piebridge.prevent.framework.util;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.LinkedHashMap;
import java.util.Map;
import me.piebridge.prevent.framework.PreventLog;
/**
* Created by thom on 16/2/3.
*/
public class ReflectUtils {
private static final Map<String, Method> METHOD_CACHES = new LinkedHashMap<String, Method>();
private ReflectUtils() {
}
public static Field getDeclaredField(Object target, String name) {
if (target == null) {
return null;
}
Field field = null;
Class clazz = target.getClass();
while (clazz != null && field == null) {
try {
field = clazz.getDeclaredField(name);
field.setAccessible(true);
} catch (NoSuchFieldException e) {
PreventLog.d("cannot find field " + name + " in " + clazz, e);
clazz = clazz.getSuperclass();
}
}
if (field == null) {
PreventLog.e("cannot find field " + name + " in " + target.getClass());
}
return field;
}
public static Object invoke(Object target, String name) {
return invoke(target, name, null, null);
}
public static Object invoke(Object target, String name, Class<?>[] parameterTypes, Object[] args) {
String key = target.getClass() + "#" + name;
Method method = METHOD_CACHES.get(key);
try {
if (method == null) {
if (parameterTypes == null || parameterTypes[0] != null) {
method = target.getClass().getDeclaredMethod(name, parameterTypes);
} else {
for (Method m : target.getClass().getDeclaredMethods()) {
if (m.getName().equals(name)) {
method = m;
break;
}
}
if (method == null) {
throw new NoSuchMethodException();
}
}
method.setAccessible(true);
METHOD_CACHES.put(key, method);
}
return method.invoke(target, args);
} catch (NoSuchMethodException e) {
PreventLog.e("cannot find method " + name + " in " + target.getClass());
} catch (InvocationTargetException e) {
PreventLog.e("cannot invoke " + method + " in " + target.getClass());
} catch (IllegalAccessException e) {
PreventLog.e("cannot access " + method + " in " + target.getClass());
}
return null;
}
public static Object get(Object target, String name) {
Field field = null;
try {
field = getDeclaredField(target, name);
field.setAccessible(true);
return field.get(target);
} catch (IllegalAccessException e) {
PreventLog.e("cannot access " + field + " in " + target.getClass());
}
return null;
}
}
|
[
"liudongmiao@gmail.com"
] |
liudongmiao@gmail.com
|
853f274956aeda0f2ccde71a84927e9490500616
|
68f9c299ea0fc017a37d31b75977564446c507a9
|
/dwcms-1.0.3-SNAPSHOT/src/main/java/com/doadway/dwcms/core/content/dao/ContentPictureMapper.java
|
ef7d05c527f75a2b52aed09d46f5e63b8cfc5f7b
|
[] |
no_license
|
gaohe1227/othsers
|
256e43a26ba097f110455ae23981b24d44035607
|
850c671bfd3ed475f0ce63224cf79012b017c4fc
|
refs/heads/master
| 2020-12-24T06:41:37.691009
| 2016-08-04T07:27:05
| 2016-08-04T07:27:05
| 64,910,868
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,185
|
java
|
package com.doadway.dwcms.core.content.dao;
import com.doadway.dwcms.core.content.pojo.ContentPicture;
import com.doadway.dwcms.core.content.pojo.ContentPictureExample;
import com.doadway.dwcms.core.content.pojo.ContentPictureKey;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@Repository
public interface ContentPictureMapper {
int countByExample(ContentPictureExample example);
int deleteByExample(ContentPictureExample example);
int deleteByPrimaryKey(ContentPictureKey key);
int insert(ContentPicture record);
int insertSelective(ContentPicture record);
List<ContentPicture> selectByExample(ContentPictureExample example);
ContentPicture selectByPrimaryKey(ContentPictureKey key);
int updateByExampleSelective(@Param("record") ContentPicture record, @Param("example") ContentPictureExample example);
int updateByExample(@Param("record") ContentPicture record, @Param("example") ContentPictureExample example);
int updateByPrimaryKeySelective(ContentPicture record);
int updateByPrimaryKey(ContentPicture record);
public int selectMaxPriority();
}
|
[
"904724283@qq.com"
] |
904724283@qq.com
|
b98eb26b4fe584d19a1d6aded46f99d8ad3d6a24
|
30057e353957920564ee07722427c3ff434d322f
|
/ProblemSolving/src/com/basics/list/DetectLoop.java
|
808d756a779f46e1e66820a2d1af0907440dabbb
|
[] |
no_license
|
mmanjunath998/Problem-Solving
|
a7f4e541b150ad3d28e545b7c990d47b020c79a9
|
32f21921f05ff351a6cdc52fe72e954633d9036a
|
refs/heads/master
| 2020-09-09T15:06:46.232130
| 2019-12-04T08:04:58
| 2019-12-04T08:04:58
| 221,479,218
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 538
|
java
|
package com.basics.list;
public class DetectLoop {
public static boolean isInLoop(Node head){
boolean isTrue = false;
Node slow = head, fast = head;
while(slow != null && fast != null && fast.next != null){
slow = slow.next;
fast = fast.next.next;
if(slow == fast){
isTrue = true;
break;
}
}
return isTrue;
}
public static void main(String[] args){
Node n1 = new Node(4);
n1.add(n1, 6);
n1.next.next = new Node(9);
n1.next.next.next = n1;
System.out.println(isInLoop(n1));
}
}
|
[
"manjunath@bytemark.co"
] |
manjunath@bytemark.co
|
6ceef7c237b4d930b449d27783c20583fba5e5ac
|
9238e44218c4eab8da22fbdbfdabe4cfb634c86c
|
/Java OOP Advanced July/03. GENERICS/lab/src/p02_GenericArrayCreator/Main.java
|
ffb8c66fd0c739bf86d342112fdb2faa80fcb746
|
[] |
no_license
|
zgirtsova/Java-Advanced---052018
|
ec2b53c52e1c471d60a641ced34d37f74b29132c
|
780fdf88e0b94e4b22af7854ecf24b00c4e45eae
|
refs/heads/master
| 2021-08-16T09:34:56.752452
| 2018-10-26T19:16:58
| 2018-10-26T19:16:58
| 133,714,514
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 479
|
java
|
package p02_GenericArrayCreator;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) {
String[] strings = ArrayCreator.create(10, "none");
Integer[] integers = ArrayCreator.create(Integer.class, 10, 0);
for (String string : strings) {
System.out.println(string);
}
for (Integer integer : integers) {
System.out.println(integer);
}
}
}
|
[
"zgirtsova@gmail.com"
] |
zgirtsova@gmail.com
|
ddc919e975236a100eace7bfa1d1c5a2f09fdd9a
|
b39d7e1122ebe92759e86421bbcd0ad009eed1db
|
/sources/android/content/pm/IDexModuleRegisterCallback.java
|
8f17da2f2319a3520ac039f45ddf3b2c433d11d2
|
[] |
no_license
|
AndSource/miuiframework
|
ac7185dedbabd5f619a4f8fc39bfe634d101dcef
|
cd456214274c046663aefce4d282bea0151f1f89
|
refs/heads/master
| 2022-03-31T11:09:50.399520
| 2020-01-02T09:49:07
| 2020-01-02T09:49:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,192
|
java
|
package android.content.pm;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
public interface IDexModuleRegisterCallback extends IInterface {
public static abstract class Stub extends Binder implements IDexModuleRegisterCallback {
private static final String DESCRIPTOR = "android.content.pm.IDexModuleRegisterCallback";
static final int TRANSACTION_onDexModuleRegistered = 1;
private static class Proxy implements IDexModuleRegisterCallback {
public static IDexModuleRegisterCallback sDefaultImpl;
private IBinder mRemote;
Proxy(IBinder remote) {
this.mRemote = remote;
}
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return Stub.DESCRIPTOR;
}
public void onDexModuleRegistered(String dexModulePath, boolean success, String message) throws RemoteException {
Parcel _data = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
_data.writeString(dexModulePath);
_data.writeInt(success ? 1 : 0);
_data.writeString(message);
if (this.mRemote.transact(1, _data, null, 1) || Stub.getDefaultImpl() == null) {
_data.recycle();
} else {
Stub.getDefaultImpl().onDexModuleRegistered(dexModulePath, success, message);
}
} finally {
_data.recycle();
}
}
}
public Stub() {
attachInterface(this, DESCRIPTOR);
}
public static IDexModuleRegisterCallback asInterface(IBinder obj) {
if (obj == null) {
return null;
}
IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
if (iin == null || !(iin instanceof IDexModuleRegisterCallback)) {
return new Proxy(obj);
}
return (IDexModuleRegisterCallback) iin;
}
public IBinder asBinder() {
return this;
}
public static String getDefaultTransactionName(int transactionCode) {
if (transactionCode != 1) {
return null;
}
return "onDexModuleRegistered";
}
public String getTransactionName(int transactionCode) {
return getDefaultTransactionName(transactionCode);
}
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
String descriptor = DESCRIPTOR;
if (code == 1) {
data.enforceInterface(descriptor);
onDexModuleRegistered(data.readString(), data.readInt() != 0, data.readString());
return true;
} else if (code != IBinder.INTERFACE_TRANSACTION) {
return super.onTransact(code, data, reply, flags);
} else {
reply.writeString(descriptor);
return true;
}
}
public static boolean setDefaultImpl(IDexModuleRegisterCallback impl) {
if (Proxy.sDefaultImpl != null || impl == null) {
return false;
}
Proxy.sDefaultImpl = impl;
return true;
}
public static IDexModuleRegisterCallback getDefaultImpl() {
return Proxy.sDefaultImpl;
}
}
public static class Default implements IDexModuleRegisterCallback {
public void onDexModuleRegistered(String dexModulePath, boolean success, String message) throws RemoteException {
}
public IBinder asBinder() {
return null;
}
}
void onDexModuleRegistered(String str, boolean z, String str2) throws RemoteException;
}
|
[
"shivatejapeddi@gmail.com"
] |
shivatejapeddi@gmail.com
|
6279f388564e62ac4aae348710a0b19fee7cab41
|
9e1ad925f368f89a3849de6cedcfa4eb67658494
|
/src/main/java/twopointers/ThreeSumZero.java
|
16f0ecc00d1773898183bf5462f77fd816fea9d5
|
[] |
no_license
|
sherif98/ProblemSolving
|
d776c7aff35f3369a5316d567d092daee290c125
|
e120733197d6db08cd82448412ce8fa8626a4763
|
refs/heads/master
| 2021-09-16T22:40:36.257030
| 2018-06-25T16:52:46
| 2018-06-25T16:52:46
| 125,643,027
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,613
|
java
|
package twopointers;
import java.util.*;
public class ThreeSumZero {
public static void main(String[] args) {
ThreeSumZero threeSumZero = new ThreeSumZero();
ArrayList<ArrayList<Integer>> arrayLists = threeSumZero.threeSum(new ArrayList<>(Arrays.asList(2, 1, 0, -1, -1, -4)));
System.out.println(arrayLists);
}
public ArrayList<ArrayList<Integer>> threeSum(ArrayList<Integer> a) {
ArrayList<ArrayList<Integer>> ret = new ArrayList<>();
Collections.sort(a);
for (int i = 0; i < a.size(); i++) {
if (i > 0 && a.get(i - 1).equals(a.get(i))) {
continue;
}
twoSum(a, i, ret);
}
return ret;
}
private void twoSum(List<Integer> nums, int idx, ArrayList<ArrayList<Integer>> ret) {
int lo = idx + 1;
int hi = nums.size() - 1;
int target = -1 * nums.get(idx);
while (lo < hi) {
if (nums.get(lo) + nums.get(hi) == target) {
ArrayList<Integer> p =
new ArrayList<>(Arrays.asList(-target, nums.get(lo), nums.get(hi)));
ret.add(p);
lo++;
hi--;
while (lo < hi && nums.get(lo - 1).equals(nums.get(lo))) {
lo++;
}
while (hi < nums.size() - 1 && nums.get(hi + 1).equals(nums.get(hi))) {
hi--;
}
} else if (nums.get(lo) + nums.get(hi) > target) {
hi--;
} else {
lo++;
}
}
}
}
|
[
"sherif.hamdy.1995@gmail.com"
] |
sherif.hamdy.1995@gmail.com
|
5f09fd6c0537449c31d2d6c98742e0cf00ee31e6
|
319531f0ef01900b83d106d53cb4e9502e33f355
|
/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryConvertPositionalParameters.java
|
ae39d4f6f253e127782592cf938f35930ea2fc3f
|
[
"Apache-2.0",
"CDDL-1.0",
"LicenseRef-scancode-oracle-openjdk-exception-2.0",
"GPL-2.0-only"
] |
permissive
|
wso2/wso2-openjpa
|
798822ee319590eed5a00ae21b65b6977faf162d
|
9c3801c861d1a0c9d93a9fa5cfa0cbe749114b92
|
refs/heads/master
| 2023-08-14T23:55:26.907881
| 2022-04-05T09:32:59
| 2022-04-05T09:32:59
| 97,706,188
| 35
| 16
|
Apache-2.0
| 2022-04-05T09:33:00
| 2017-07-19T10:56:02
|
Java
|
UTF-8
|
Java
| false
| false
| 5,984
|
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.openjpa.persistence.query;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import org.apache.openjpa.kernel.QueryLanguages;
import org.apache.openjpa.kernel.jpql.JPQLParser;
import org.apache.openjpa.persistence.OpenJPAPersistence;
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
/**
* This test was added for OPENJPA-1999. 'Add' support for allowing positional parameters to start at something other
* than 1 and allow for missing parameters.
*/
public class TestQueryConvertPositionalParameters extends SingleEMFTestCase {
EntityManager _em;
long _id1;
String _name1;
String _val1;
long _id2;
String _name2;
String _val2;
@Override
public void setUp() {
super.setUp(SimpleEntity.class, "openjpa.Compatibility", "ConvertPositionalParametersToNamed=true"
// ,"openjpa.Log","SQL=trace"
);
_em = emf.createEntityManager();
_em.getTransaction().begin();
SimpleEntity se1 = new SimpleEntity();
_name1 = "name1";
_val1 = "val1";
se1.setName(_name1);
se1.setValue(_val1);
_em.persist(se1);
_id1 = se1.getId();
_em.getTransaction().commit();
_em.getTransaction().begin();
SimpleEntity se2 = new SimpleEntity();
_name2 = "name2";
_val2 = "val2";
se2.setName(_name2);
se2.setValue(_val2);
_em.persist(se2);
_id2 = se2.getId();
_em.getTransaction().commit();
_em.clear();
}
@Override
public void tearDown() throws Exception {
if (_em.getTransaction().isActive()) {
_em.getTransaction().rollback();
}
_em.close();
// TODO Auto-generated method stub
super.tearDown();
}
public void testNamedPositionalStartAtNonOne() {
SimpleEntity se =
_em.createNamedQuery("SelectWithPositionalParameterNonOneStart", SimpleEntity.class)
.setParameter(900, _id1).setParameter(2, _name1).setParameter(54, _val1).getSingleResult();
assertNotNull(se);
}
public void testJPQLPositionalStartAtNonOne() {
int idPos = 7;
int namePos = 908;
int valPos = 578;
SimpleEntity se =
_em.createQuery(
"Select s FROM simple s where s.id=?" + idPos + " and s.name=?" + namePos + " and s.value=?" + valPos,
SimpleEntity.class).setParameter(idPos, _id1).setParameter(namePos, _name1).setParameter(valPos, _val1)
.getSingleResult();
assertNotNull(se);
}
public void testJPQLWithSubQueryPositionalStartAtNonOne() {
int idPos = 7;
int namePos = 908;
int valPos = 578;
SimpleEntity se =
_em.createQuery(
"Select s FROM simple s where s.id = ?" + idPos
+ " and (SELECT se.value FROM simple se where se.name=?" + namePos + ")=?" + valPos,
SimpleEntity.class).setParameter(idPos, _id1).setParameter(namePos, _name1).setParameter(valPos, _val1)
.getSingleResult();
assertNotNull(se);
}
public void testPreparedQueryPositionalStartAtNonOne() {
int idPos = 54;
int namePos = 23;
int valPos = 42;
String jpql =
"Select s FROM simple s where s.id=?" + idPos + " and s.name=?" + namePos + " and s.value=?" + valPos;
Query q =
_em.createQuery(jpql).setParameter(idPos, _id1).setParameter(namePos, _name1).setParameter(valPos, _val1);
SimpleEntity se = (SimpleEntity) q.getSingleResult();
assertNotNull(se);
assertEquals(JPQLParser.LANG_JPQL, OpenJPAPersistence.cast(q).getLanguage());
Query q2 =
_em.createQuery(jpql).setParameter(idPos, _id2).setParameter(namePos, _name2).setParameter(valPos, _val2);
SimpleEntity se2 = (SimpleEntity) q2.getSingleResult();
assertNotNull(se2);
assertEquals(QueryLanguages.LANG_PREPARED_SQL, OpenJPAPersistence.cast(q2).getLanguage());
}
public void testPreparedQueryWithSubQueryPositionalStartAtNonOne() {
int idPos = 7;
int namePos = 908;
int valPos = 352;
String jpql =
"Select s FROM simple s where s.id = ?" + idPos + " and (SELECT se.value FROM simple se where se.name=?"
+ namePos + ")=?" + valPos;
Query q =
_em.createQuery(jpql, SimpleEntity.class).setParameter(idPos, _id1).setParameter(namePos, _name1)
.setParameter(valPos, _val1);
SimpleEntity se = (SimpleEntity) q.getSingleResult();
assertNotNull(se);
assertEquals(JPQLParser.LANG_JPQL, OpenJPAPersistence.cast(q).getLanguage());
Query q2 =
_em.createQuery(jpql, SimpleEntity.class).setParameter(idPos, _id2).setParameter(namePos, _name2)
.setParameter(valPos, _val2);
SimpleEntity se2 = (SimpleEntity) q2.getSingleResult();
assertNotNull(se2);
assertEquals(QueryLanguages.LANG_PREPARED_SQL, OpenJPAPersistence.cast(q2).getLanguage());
}
}
|
[
"nandika@wso2.com"
] |
nandika@wso2.com
|
56389c5ebd935bb8cd2c9eb2ac2510915d75a860
|
3605e89cc07a6b7c1d879b3d65b37e83c288fced
|
/appng-core/src/main/java/org/appng/core/controller/handler/StaticContentHandler.java
|
6ac2867ac667ca8900d7f3cde0045f55d80d08ba
|
[
"Apache-2.0"
] |
permissive
|
madness-inc/appng
|
e6d04dd5e71153c9b5cbc8fbecad6f87b4599a10
|
91343914034a6a14ea2929a2b125762b20cd3672
|
refs/heads/master
| 2021-08-19T02:39:15.909517
| 2017-11-09T10:16:20
| 2017-11-09T10:16:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,311
|
java
|
/*
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.appng.core.controller.handler;
import static org.appng.api.Scope.REQUEST;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;
import org.appng.api.Environment;
import org.appng.api.PathInfo;
import org.appng.api.Platform;
import org.appng.api.Scope;
import org.appng.api.SiteProperties;
import org.appng.api.model.Nameable;
import org.appng.api.model.Properties;
import org.appng.api.model.ResourceType;
import org.appng.api.model.Site;
import org.appng.api.support.environment.EnvironmentKeys;
import org.appng.core.Redirect;
import org.appng.core.controller.Controller;
import org.appng.core.model.CacheProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* A {@link RequestHandler} responsible for serving static resources.<br/>Those resources may belong to a template or
* reside inside a document-folder of a {@link Site} (see {@link SiteProperties#DOCUMENT_DIR} and
* {@link org.appng.api.Path#isDocument()}).
*
* @author Matthias Müller
*/
public class StaticContentHandler implements RequestHandler {
private static final Logger LOGGER = LoggerFactory.getLogger(StaticContentHandler.class);
private static final List<String> TEMPLATE_FOLDERS = Arrays.asList("assets","resources");
private static final String SLASH = "/";
private Controller controller;
public StaticContentHandler(Controller controller) {
this.controller = controller;
}
public void handle(HttpServletRequest servletRequest, HttpServletResponse servletResponse, Environment environment,
Site site, PathInfo pathInfo) throws ServletException, IOException {
Properties platformProperties = environment.getAttribute(Scope.PLATFORM, Platform.Environment.PLATFORM_CONFIG);
String servletPath = pathInfo.getServletPath();
String repoPath = platformProperties.getString(Platform.Property.REPOSITORY_PATH);
String templatePrefix = platformProperties.getString(Platform.Property.TEMPLATE_PREFIX);
String templateFolder = platformProperties.getString(Platform.Property.TEMPLATE_FOLDER);
String defaultTemplate = platformProperties.getString(Platform.Property.DEFAULT_TEMPLATE);
String activeTemplate = site.getProperties().getString(SiteProperties.TEMPLATE, defaultTemplate);
String wwwDir = site.getProperties().getString(SiteProperties.WWW_DIR);
String defaultPage = site.getProperties().getString(SiteProperties.DEFAULT_PAGE);
String wwwRootPath = SLASH + repoPath + SLASH + site.getName() + wwwDir;
String resourcePath = wwwRootPath + servletPath;
if (pathInfo.isStaticContent()) {
serveStatic(servletRequest, servletResponse, resourcePath);
} else if (servletPath.startsWith(templatePrefix)) {
CacheProvider cacheProvider = new CacheProvider(platformProperties);
String applicationDir = platformProperties.getString(Platform.Property.APPLICATION_DIR);
serveTemplateResource(servletRequest, servletResponse, site, applicationDir, templatePrefix,
templateFolder, activeTemplate, defaultTemplate, repoPath, cacheProvider);
} else if (pathInfo.isDocument()) {
if (pathInfo.isRootIgnoreTrailingSlash()) {
String target = pathInfo.getRootPath() + SLASH + defaultPage;
Redirect.to(servletResponse, HttpServletResponse.SC_MOVED_PERMANENTLY, servletPath, target);
} else {
int idx = servletPath.indexOf('.');
if (idx < 0 || pathInfo.isJsp()) {
serveJsp(servletRequest, servletResponse, environment, site, pathInfo, wwwRootPath);
} else {
serveStatic(servletRequest, servletResponse, resourcePath);
}
}
}
}
private void serveJsp(HttpServletRequest servletRequest, HttpServletResponse servletResponse,
Environment environment, Site site, PathInfo pathInfo, String wwwRootPath) throws ServletException,
IOException {
File wwwRootFile = new File(servletRequest.getServletContext().getRealPath(wwwRootPath));
final String forwardPath = pathInfo.getForwardPath(wwwRootPath, wwwRootFile);
List<String> urlParameters = pathInfo.getJspUrlParameters();
environment.setAttribute(REQUEST, EnvironmentKeys.JSP_URL_PARAMETERS, urlParameters);
HttpServletRequestWrapper requestWrapper = new HttpServletRequestWrapper(servletRequest) {
@Override
public String getServletPath() {
return forwardPath;
}
};
controller.getJspHandler().handle(requestWrapper, servletResponse, environment, site, pathInfo);
}
private int serveStatic(HttpServletRequest servletRequest, HttpServletResponse response, final String forwardPath)
throws IOException, ServletException {
HttpServletRequestWrapper requestWrapper = new HttpServletRequestWrapper(servletRequest) {
@Override
public String getServletPath() {
return forwardPath;
}
};
controller.serveResource(requestWrapper, response);
int status = response.getStatus();
LOGGER.trace("returned " + status + " for static resource " + forwardPath);
return status;
}
private int serveTemplateResource(HttpServletRequest servletRequest, HttpServletResponse response, Site site,
String applicationDir, String templatePrefix, String templateFolder, String templateName,
String defaultTemplate, String repoPath, CacheProvider cacheProvider) throws IOException, ServletException {
String servletPath = servletRequest.getServletPath();
String[] splitted = servletPath.split(SLASH);
String[] splittedPrefix = splitted[1].split("_");
boolean isApplicationResource = splittedPrefix.length > 1;
String folder = splitted[2];
if (!isApplicationResource && TEMPLATE_FOLDERS.contains(folder)) {
String wwwDir = site.getProperties().getString(SiteProperties.WWW_DIR);
String forwardPath = SLASH + repoPath + SLASH + site.getName() + wwwDir + servletPath;
return serveStatic(servletRequest, response, forwardPath);
}
String path;
if (isApplicationResource) {
templatePrefix = SLASH + splitted[1];
final String applicationName = splittedPrefix[1];
Nameable application = new Nameable() {
public String getName() {
return applicationName;
}
public String getDescription() {
return null;
}
};
String relativePlatformCache = cacheProvider.getRelativePlatformCache(site, application);
String resourcePath = relativePlatformCache + SLASH + ResourceType.RESOURCE.getFolder();
path = servletPath.replaceFirst(templatePrefix, resourcePath);
} else {
path = servletPath.replaceFirst(templatePrefix, templateFolder + SLASH + templateName);
}
return serveStatic(servletRequest, response, path);
}
}
|
[
"matthias.mueller@appng.org"
] |
matthias.mueller@appng.org
|
8e084d2245a114c23ac45331b4a1edcf27ab60df
|
493a8065cf8ec4a4ccdf136170d505248ac03399
|
/net.sf.ictalive.coordination.agents.diagram/src/net/sf/ictalive/coordination/agents/diagram/preferences/DiagramGeneralPreferencePage.java
|
48501cc9830b45c77c49800b473b5fb8652ac296
|
[] |
no_license
|
ignasi-gomez/aliveclipse
|
593611b2d471ee313650faeefbed591c17beaa50
|
9dd2353c886f60012b4ee4fe8b678d56972dff97
|
refs/heads/master
| 2021-01-14T09:08:24.839952
| 2014-10-09T14:21:01
| 2014-10-09T14:21:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 487
|
java
|
package net.sf.ictalive.coordination.agents.diagram.preferences;
import net.sf.ictalive.coordination.agents.diagram.part.AgentsDiagramEditorPlugin;
import org.eclipse.gmf.runtime.diagram.ui.preferences.DiagramsPreferencePage;
/**
* @generated
*/
public class DiagramGeneralPreferencePage extends DiagramsPreferencePage {
/**
* @generated
*/
public DiagramGeneralPreferencePage() {
setPreferenceStore(AgentsDiagramEditorPlugin.getInstance()
.getPreferenceStore());
}
}
|
[
"salvarez@lsi.upc.edu"
] |
salvarez@lsi.upc.edu
|
e617b5806da25ac9f8291ef2160cdbbed969417a
|
3644a0308b6fdb09d436a597069d2f05e7149200
|
/org.hl7.fhir.dstu2016may/src/main/java/org/hl7/fhir/dstu2016may/model/api/IBaseEnumFactory.java
|
4b2bc14b0ba35f4d4fc7cd14e485c1ee9ab6d78c
|
[
"Apache-2.0"
] |
permissive
|
patrick-werner/org.hl7.fhir.core
|
1b6f56eea676b9f74244240b515310a34059ae3f
|
f5c592fbadf9cdbf0c668b856b719b8716249277
|
refs/heads/master
| 2020-04-23T11:49:12.701805
| 2019-02-08T06:52:37
| 2019-02-08T06:52:37
| 171,149,064
| 0
| 0
|
Apache-2.0
| 2019-02-17T17:13:26
| 2019-02-17T17:13:26
| null |
UTF-8
|
Java
| false
| false
| 1,322
|
java
|
package org.hl7.fhir.dstu2016may.model.api;
/*
* #%L
* org.hl7.fhir.dstu2016may
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* 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.
* #L%
*/
public interface IBaseEnumFactory<T extends Enum<?>> {
/**
* Read an enumeration value from the string that represents it on the XML or JSON
*
* @param codeString the value found in the XML or JSON
* @return the enumeration value
* @throws IllegalArgumentException is the value is not known
*/
public T fromCode(String codeString) throws IllegalArgumentException;
/**
* Get the XML/JSON representation for an enumerated value
*
* @param code - the enumeration value
* @return the XML/JSON representation
*/
public String toCode(T code);
}
|
[
"jamesagnew@gmail.com"
] |
jamesagnew@gmail.com
|
98f9f0e0b22ddab9a76c88f3ce8a8cd3d37f8723
|
0f77c5ec508d6e8b558f726980067d1058e350d7
|
/1_39_120042/com/ankamagames/wakfu/client/network/protocol/frame/guild/HavenWorldGuildNotifyBuildingRemovedMessageRunner.java
|
89dd2777f13f3328eaa061d55e12fe19790c621b
|
[] |
no_license
|
nightwolf93/Wakxy-Core-Decompiled
|
aa589ebb92197bf48e6576026648956f93b8bf7f
|
2967f8f8fba89018f63b36e3978fc62908aa4d4d
|
refs/heads/master
| 2016-09-05T11:07:45.145928
| 2014-12-30T16:21:30
| 2014-12-30T16:21:30
| 29,250,176
| 5
| 5
| null | 2015-01-14T15:17:02
| 2015-01-14T15:17:02
| null |
UTF-8
|
Java
| false
| false
| 710
|
java
|
package com.ankamagames.wakfu.client.network.protocol.frame.guild;
import com.ankamagames.wakfu.client.network.protocol.message.game.serverToClient.havenworld.*;
import com.ankamagames.wakfu.client.core.game.group.guild.*;
import com.ankamagames.framework.kernel.core.common.message.*;
class HavenWorldGuildNotifyBuildingRemovedMessageRunner implements MessageRunner<HavenWorldGuildNotifyBuildingRemovedMessage>
{
@Override
public boolean run(final HavenWorldGuildNotifyBuildingRemovedMessage msg) {
WakfuGuildView.getInstance().notifyHavenWorldBuildngRemoved(msg.getBuildingId());
return false;
}
@Override
public int getProtocolId() {
return 20098;
}
}
|
[
"totomakers@hotmail.fr"
] |
totomakers@hotmail.fr
|
2435ce95ca3e8ff6a79b60d899090b39e23677cc
|
59be8dfbf238dedbc75f1494284869f7e8952aa7
|
/LLKC/src/com/zrlh/llkc/corporate/RequestMsgAdapter.java
|
acc968f79c3efc90df8e28b8f2fdc55d9360b530
|
[] |
no_license
|
2006003845/yidagong
|
8e9832ed20bc4c12ffd96747c529282281245295
|
42310a951d965ec0f049cd1e066f13202585ca80
|
refs/heads/master
| 2021-01-13T05:14:14.272625
| 2017-02-08T07:06:49
| 2017-02-08T07:06:49
| 81,278,782
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,576
|
java
|
package com.zrlh.llkc.corporate;
import java.util.List;
import org.json.JSONException;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.AsyncTask;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.TextView;
import com.zrlh.llkc.R;
import com.zrlh.llkc.funciton.LlkcBody;
import com.zzl.zl_app.connection.Community;
import com.zzl.zl_app.db.BaseMsgTable;
import com.zzl.zl_app.db.RequestMsgDBOper;
import com.zzl.zl_app.entity.Msg;
import com.zzl.zl_app.entity.RequestMsg;
import com.zzl.zl_app.util.TimeUtil;
/*
* 请求信息适配
* */
public class RequestMsgAdapter extends BaseAdapter {
private List<Msg> msgList;
Context context;
LayoutInflater inflater;
public RequestMsgAdapter(Context context, List<Msg> msgList) {
this.msgList = msgList;
this.context = context;
inflater = LayoutInflater.from(context);
}
@Override
public int getCount() {
return msgList.size();
}
@Override
public Object getItem(int position) {
return msgList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@SuppressLint("ResourceAsColor")
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
if (convertView == null) {
convertView = inflater.inflate(R.layout.item_resqmsg, null);
holder = new ViewHolder();
holder.name = (TextView) convertView
.findViewById(R.id.item_msg_tv_name);
holder.content = (TextView) convertView
.findViewById(R.id.item_msg_tv_content);
holder.agree = (Button) convertView
.findViewById(R.id.item_msg_btn_agree);
holder.time = (TextView) convertView
.findViewById(R.id.item_resqmsg_tv_time);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
final RequestMsg msg = (RequestMsg) msgList.get(position);
if (msg != null) {
if (msg.sRName == null || "".equals(msg.sRName))
holder.name.setText(msg.senderName);
else
holder.name.setText(msg.sRName);
// holder.name.setText(msg.uName);
holder.content.setText(msg.content);
}
if (msg.type.equals("-100")) {
holder.agree.setText(R.string.have_agree);
holder.agree.setBackgroundColor(R.color.gray);
} else if (msg.type.equals("-200")) {
holder.agree.setText(R.string.have_agree);
holder.agree.setBackgroundColor(R.color.gray);
} else {
holder.agree.setText(R.string.agree);
holder.agree
.setBackgroundResource(R.drawable.bg_btn_gray2_selector);
}
holder.agree.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO
String type = msg.type;
if (type.equals("10")) {
// 入群请求
new OperGroupTask(position, msg.id, msg.senderId, "1", "")
.execute();
} else if (type.equals("4")) {
// 加好友请求
new OperFriendTask(position, "4", msg.senderId).execute();
}
}
});
holder.time.setText(TimeUtil.getLocalTimeString(Long
.parseLong(msg.time)));
return convertView;
}
public void update() {
this.notifyDataSetChanged();
}
class OperFriendTask extends AsyncTask<Object, Integer, Integer> {
String operType;
String uId;
int position;
public OperFriendTask(int position, String operType, String uId) {
this.operType = operType;
this.uId = uId;
this.position = position;
}
@Override
protected Integer doInBackground(Object... params) {
try {
return Community.getInstance(context).OperFriend(
LlkcBody.USER_ACCOUNT, LlkcBody.PASS_ACCOUNT, operType,
uId);
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return -1;
}
@Override
protected void onPostExecute(Integer result) {
// TODO
if (result != -1 || operType.equals("5")) {
Msg msg = msgList.get(position);
msg.type = "-100";
msgList.set(position, msg);
RequestMsgDBOper requestOper = (RequestMsgDBOper) RequestMsgDBOper
.getDBOper(context);
requestOper.updateMsg(msg, requestOper.getTableName(""));
update();
}
super.onPostExecute(result);
}
}
class OperGroupTask extends AsyncTask<Object, Integer, Boolean> {
private String gId;
private String uId;
private String gPower;
private String gReqMsg;
private int position;
public OperGroupTask(int position, String gId, String uId,
String gPower, String gReqMsg) {
this.position = position;
this.gId = gId;
this.uId = uId;
this.gPower = gPower;
this.gReqMsg = gReqMsg;
}
@Override
protected Boolean doInBackground(Object... params) {
try {
return Community.getInstance(context).operGroupArgOrRef(
LlkcBody.USER_ACCOUNT, LlkcBody.PASS_ACCOUNT, gId, uId,
gPower, gReqMsg);
} catch (JSONException e) {
}
return false;
}
@Override
protected void onPostExecute(Boolean result) {
if (result || gPower.equals("2")) {
// TODO
if (position < msgList.size()) {
RequestMsg msg = (RequestMsg) msgList.get(position);
msg.type = "-200";
msgList.set(position, msg);
RequestMsgDBOper requestOper = (RequestMsgDBOper) RequestMsgDBOper
.getDBOper(context);
requestOper.updateMsg(msg, requestOper.getTableName(""));
update();
}
}
super.onPostExecute(result);
}
}
class ViewHolder {
Button agree;
TextView time;
TextView content;
TextView name;
}
}
|
[
"zhilongzhou@creditease.cn"
] |
zhilongzhou@creditease.cn
|
3a281663670c7c71cb9e5f5569cdfd20cd730bf0
|
7a90836d66d736ab2b9986908428cd2bf5e7a40e
|
/src/main/java/erebus/tileentity/TileEntityErebusAltarXP.java
|
a01dbd0c2a91d92ccf2735543a6997c7f15c9629
|
[] |
no_license
|
sokratis12GR/TheErebus
|
075db88cfce5da5f2461cbc6d763a27166ab5c1c
|
c33a970fa3f9752aa5260a77e5db4c395eb358df
|
refs/heads/mc1.12
| 2020-03-30T12:18:22.280170
| 2018-10-02T08:43:03
| 2018-10-02T08:43:03
| 151,218,100
| 0
| 0
| null | 2018-10-02T08:43:04
| 2018-10-02T07:39:54
|
Java
|
UTF-8
|
Java
| false
| false
| 3,071
|
java
|
package erebus.tileentity;
import erebus.Erebus;
import erebus.ModBlocks;
import erebus.ModSounds;
import erebus.network.client.PacketAltarAnimationTimer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ITickable;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public class TileEntityErebusAltarXP extends TileEntityErebusAltar implements ITickable {
public boolean active;
private int spawnTicks;
private int uses;
@Override
public void update() {
if (!getWorld().isRemote) {
prevAnimationTicks = animationTicks;
if (active) {
if (animationTicks == 0)
getWorld().playSound(null, getPos(), ModSounds.ALTAR_CHANGE_STATE, SoundCategory.BLOCKS, 1.0F, 1.3F);
if (animationTicks <= 24)
animationTicks++;
if (spawnTicks == 0)
setActive(false);
spawnTicks--;
}
if (!active) {
if (animationTicks == 25)
getWorld().playSound(null, getPos(), ModSounds.ALTAR_CHANGE_STATE, SoundCategory.BLOCKS, 1.0F, 1.3F);
if (animationTicks >= 1)
animationTicks--;
if (animationTicks == 1)
getWorld().setBlockState(getPos(), ModBlocks.ALTAR_BASE.getDefaultState());
}
if (prevAnimationTicks != animationTicks)
Erebus.NETWORK_WRAPPER.sendToAll(new PacketAltarAnimationTimer(getPos().getX(), getPos().getY(), getPos().getZ(), animationTicks));
}
if (getWorld().isRemote)
if (animationTicks == 6)
cloudBurst(getWorld(), getPos());
}
private void cloudBurst(World world, BlockPos pos) {
if (world.isRemote) {
double d0 = pos.getX() + 0.53125F;
double d1 = pos.getY() + 1.25F;
double d2 = pos.getZ() + 0.53125F;
Erebus.PROXY.spawnCustomParticle("cloud", world, d0, d1, d2, 0.0D, 0.0D, 0.0D);
Erebus.PROXY.spawnCustomParticle("cloud", world, d0, d1, d2 - 0.265625, 0.0D, 0.0D, 0.0D);
Erebus.PROXY.spawnCustomParticle("cloud", world, d0, d1, d2 + 0.265625, 0.0D, 0.0D, 0.0D);
Erebus.PROXY.spawnCustomParticle("cloud", world, d0 - 0.265625, d1, d2, 0.0D, 0.0D, 0.0D);
Erebus.PROXY.spawnCustomParticle("cloud", world, d0 + 0.265625, d1, d2, 0.0D, 0.0D, 0.0D);
Erebus.PROXY.spawnCustomParticle("cloud", world, d0, d1 + 0.25, d2, 0.0D, 0.0D, 0.0D);
Erebus.PROXY.spawnCustomParticle("cloud", world, d0, d1 + 0.5, d2, 0.0D, 0.0D, 0.0D);
}
}
public void setActive(boolean par1) {
active = par1;
}
public void setSpawnTicks(int i) {
spawnTicks = i;
}
public void setUses(int isSize) {
uses = isSize;
}
public int getUses() {
return uses;
}
public int getExcess() {
return uses - 165;
}
@Override
protected void writeTileToNBT(NBTTagCompound nbt) {
nbt.setInteger("animationTicks", animationTicks);
nbt.setInteger("spawnTicks", spawnTicks);
nbt.setInteger("uses", uses);
nbt.setBoolean("active", active);
}
@Override
protected void readTileFromNBT(NBTTagCompound nbt) {
animationTicks = nbt.getInteger("animationTicks");
spawnTicks = nbt.getInteger("spawnTicks");
uses = nbt.getInteger("uses");
active = nbt.getBoolean("active");
}
}
|
[
"curve_linear@hotmail.com"
] |
curve_linear@hotmail.com
|
82db6489337337114af83cc225d44f43b46ac0ad
|
e5e46ac27edef7410fd1d36741e8cbf01d704a10
|
/src/CosNotifyFilter/FilterIDSeqHelper.java
|
998c887ebc34ec70c5823ce21ed7ca9fe484c9f7
|
[] |
no_license
|
thradexIT/tmf814
|
4cc5be43145137f5d58693a5d2e3a60968541799
|
20688a799d5b20ec7e9adbc33ca69cc63347b2a9
|
refs/heads/master
| 2021-12-25T00:00:44.914802
| 2017-12-21T22:01:40
| 2017-12-21T22:01:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,957
|
java
|
package CosNotifyFilter;
/**
* CosNotifyFilter/FilterIDSeqHelper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from CosNotifyFilter.idl
* Wednesday, June 15, 2016 7:24:33 PM COT
*/
/**
* A sequence of FilterID.
*/
abstract public class FilterIDSeqHelper
{
private static String _id = "IDL:omg.org/CosNotifyFilter/FilterIDSeq:1.0";
public static void insert (org.omg.CORBA.Any a, int[] 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 int[] 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 ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
__typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (CosNotifyFilter.FilterIDHelper.id (), "FilterID", __typeCode);
__typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode);
__typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (CosNotifyFilter.FilterIDSeqHelper.id (), "FilterIDSeq", __typeCode);
}
return __typeCode;
}
public static String id ()
{
return _id;
}
public static int[] read (org.omg.CORBA.portable.InputStream istream)
{
int value[] = null;
int _len0 = istream.read_long ();
value = new int[_len0];
for (int _o1 = 0;_o1 < value.length; ++_o1)
value[_o1] = CosNotifyFilter.FilterIDHelper.read (istream);
return value;
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, int[] value)
{
ostream.write_long (value.length);
for (int _i0 = 0;_i0 < value.length; ++_i0)
CosNotifyFilter.FilterIDHelper.write (ostream, value[_i0]);
}
}
|
[
"miplanmobile@gmail.com"
] |
miplanmobile@gmail.com
|
84a596b075fb347671c1908cb74cb9392acc41ae
|
4e121bfe9778e3accb5c076ca0e57ae939b6b60e
|
/geoportal/src/com/esri/gpt/catalog/arcgis/metadata/WFSServerHandler.java
|
939699bdbf462e91a3f2a47e002eba980aeb7a94
|
[
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unicode",
"LGPL-2.0-or-later",
"CDDL-1.0",
"ICU",
"CC-BY-SA-3.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"JSON",
"NAIST-2003",
"CPL-1.0"
] |
permissive
|
Esri/geoportal-server
|
79a126cb1808325426ad2ae66466e84459cf4794
|
29a1c66ebfbcd8f44247fa73b96fed50f52aada1
|
refs/heads/master
| 2023-08-22T17:20:42.269458
| 2023-06-15T18:50:36
| 2023-06-15T18:50:36
| 5,485,573
| 191
| 89
|
Apache-2.0
| 2023-04-16T22:49:39
| 2012-08-20T19:15:11
|
C#
|
UTF-8
|
Java
| false
| false
| 1,063
|
java
|
/* See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* Esri Inc. licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.esri.gpt.catalog.arcgis.metadata;
/**
* Handles the collection of metadata for an ArcGIS WFS service (WFSServer).
*/
public class WFSServerHandler extends OGCServerHandler {
/** constructors ============================================================ */
/** Default constructor. */
public WFSServerHandler() {
super("WFS");
}
}
|
[
"mhogeweg@esri.com"
] |
mhogeweg@esri.com
|
2e82983cca30c15c06fc22c64d7cae7c9458eb86
|
bccb412254b3e6f35a5c4dd227f440ecbbb60db9
|
/hl7/pseudo/group/ORDER_RGV_O15.java
|
ef8fc7b03343285dfb3f0fc49bcf6c82393839ca
|
[] |
no_license
|
nlp-lap/Version_Compatible_HL7_Parser
|
8bdb307aa75a5317265f730c5b2ac92ae430962b
|
9977e1fcd1400916efc4aa161588beae81900cfd
|
refs/heads/master
| 2021-03-03T15:05:36.071491
| 2020-03-09T07:54:42
| 2020-03-09T07:54:42
| 245,967,680
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 324
|
java
|
package hl7.pseudo.group;
import hl7.bean.Structure;
public class ORDER_RGV_O15 extends hl7.model.V2_7.group.ORDER_RGV_O15{
public ORDER_RGV_O15(){
super();
}
public static ORDER_RGV_O15 CLASS;
static{
CLASS = new ORDER_RGV_O15();
}
public Structure[][] getComponents(){
return super.getComponents();
}
}
|
[
"terminator800@hanmail.net"
] |
terminator800@hanmail.net
|
1966dccd00c418d69e7bf8eb83f555e654d9ddaf
|
28570940f9dee73dee7a086fcd8b32f2a861b794
|
/imchatlibrary/src/main/java/com/yst/im/imchatlibrary/utils/EmojiFilter.java
|
6a557d53e694a40e0075a0c9cf508ff54971f063
|
[] |
no_license
|
luxc1992/OptimalWorking
|
b0b0ec1eab68b02de826a6efe5b21769ed1a532b
|
434a23c09a30b909f4e85e729b6de92f78306cd6
|
refs/heads/master
| 2020-05-18T04:58:12.369288
| 2019-04-30T06:55:08
| 2019-04-30T06:55:08
| 184,185,029
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,904
|
java
|
package com.yst.im.imchatlibrary.utils;
import android.text.InputFilter;
import android.text.Spanned;
import java.util.HashSet;
import java.util.Set;
/**
* 过滤emoji表情
*
* @author lierpeng
* @date 2018/03/28
* @version 1.0.0
*/
public class EmojiFilter implements InputFilter {
private static Set<String> filterSet = null;
private static Set<Scope> scopeSet = null;
/**
* 区间类模型
*/
private class Scope {
int start;
int end;
@Override
public boolean equals(Object o) {
if (o instanceof Scope) {
Scope scope = (Scope) o;
if (scope.start == start && scope.end == end) {
return true;
}
}
return super.equals(o);
}
@Override
public int hashCode() {
return super.hashCode();
}
}
private static void addUnicodeRangeToSet(Set<String> set, int start, int end) {
if (set == null) {
return;
}
if (start > end) {
return;
}
for (int i = start; i <= end; i++) {
filterSet.add(new String(new int[]{i}, 0, 1));
}
}
private static void addUnicodeRangeToSet(Set<String> set, int code) {
if (set == null) {
return;
}
filterSet.add(new String(new int[]{code}, 0, 1));
}
static {
filterSet = new HashSet<String>();
scopeSet = new HashSet<>();
// See http://apps.timwhitlock.info/emoji/tables/unicode
// 1. Emoticons ( 1F601 - 1F64F )
addUnicodeRangeToSet(filterSet, 0x1F601, 0X1F64F);
// 2. Dingbats ( 2702 - 27B0 )
addUnicodeRangeToSet(filterSet, 0x2702, 0X27B0);
// 3. Transport and map symbols ( 1F680 - 1F6C0 )
addUnicodeRangeToSet(filterSet, 0X1F680, 0X1F6C0);
// 4. Enclosed characters ( 24C2 - 1F251 )
addUnicodeRangeToSet(filterSet, 0X24C2);
addUnicodeRangeToSet(filterSet, 0X1F170, 0X1F251);
// 6a. Additional emoticons ( 1F600 - 1F636 )
addUnicodeRangeToSet(filterSet, 0X1F600, 0X1F636);
// 6b. Additional transport and map symbols ( 1F681 - 1F6C5 )
addUnicodeRangeToSet(filterSet, 0X1F681, 0X1F6C5);
// 6c. Other additional symbols ( 1F30D - 1F567 )
addUnicodeRangeToSet(filterSet, 0X1F30D, 0X1F567);
// 5. Uncategorized
addUnicodeRangeToSet(filterSet, 0X1F004);
addUnicodeRangeToSet(filterSet, 0X1F0CF);
// 与6c. Other additional symbols ( 1F30D - 1F567 )重复
// 去掉重复部分虽然不去掉HashSet也不会重复,原范围(0X1F300 - 0X1F5FF)
addUnicodeRangeToSet(filterSet, 0X1F300, 0X1F30D);
addUnicodeRangeToSet(filterSet, 0X1F5FB, 0X1F5FF);
addUnicodeRangeToSet(filterSet, 0X00A9);
addUnicodeRangeToSet(filterSet, 0X00AE);
addUnicodeRangeToSet(filterSet, 0X0023);
//阿拉伯数字0-9,配合0X20E3使用
//addUnicodeRangeToSet(filterSet, 0X0030, 0X0039);
// 过滤掉203C开始后的2XXX 段落
//addUnicodeRangeToSet(filterSet, 0X203C, 0X24C2);
addUnicodeRangeToSet(filterSet, 0X203C);
addUnicodeRangeToSet(filterSet, 0X2049);
//严格验证的话需要判断前面是否是数字
//Android上显示和数字分开可以不判断
addUnicodeRangeToSet(filterSet, 0X20E3);
addUnicodeRangeToSet(filterSet, 0X2122);
addUnicodeRangeToSet(filterSet, 0X2139);
addUnicodeRangeToSet(filterSet, 0X2194, 0X2199);
addUnicodeRangeToSet(filterSet, 0X21A9, 0X21AA);
addUnicodeRangeToSet(filterSet, 0X231A, 0X231B);
addUnicodeRangeToSet(filterSet, 0X23E9, 0X23EC);
addUnicodeRangeToSet(filterSet, 0X23F0);
addUnicodeRangeToSet(filterSet, 0X23F3);
addUnicodeRangeToSet(filterSet, 0X25AA, 0X25AB);
addUnicodeRangeToSet(filterSet, 0X25FB, 0X25FE);
//TODO: 26XX 太杂全部过滤
addUnicodeRangeToSet(filterSet, 0X2600, 0X26FE);
addUnicodeRangeToSet(filterSet, 0X2934, 0X2935);
addUnicodeRangeToSet(filterSet, 0X2B05, 0X2B07);
addUnicodeRangeToSet(filterSet, 0X2B1B, 0X2B1C);
addUnicodeRangeToSet(filterSet, 0X2B50);
addUnicodeRangeToSet(filterSet, 0X2B55);
addUnicodeRangeToSet(filterSet, 0X3030);
addUnicodeRangeToSet(filterSet, 0X303D);
addUnicodeRangeToSet(filterSet, 0X3297);
addUnicodeRangeToSet(filterSet, 0X3299);
}
public EmojiFilter() {
super();
}
@Override
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart,
int dend) {
if (filterSet.contains(source.toString())) {
return "";
}
return source;
}
}
|
[
"15942932581@163.com"
] |
15942932581@163.com
|
0ce895fa40dd2c6d11c158c6f62f2297cbe46098
|
9a722bc9197bf65854bdc8e761c151e6b4cf80e0
|
/gatling-http-client/src/test/java/io/gatling/http/client/proxy/HttpsProxyTest.java
|
ff21c4ce1a47711281d853c7e5dae00f976d616e
|
[
"Apache-2.0",
"GPL-2.0-only",
"BSD-2-Clause",
"EPL-1.0",
"BSD-3-Clause",
"MIT",
"MPL-2.0"
] |
permissive
|
NeatNerdPrime/gatling
|
6c7f6231baee47aa706baecd527be7af12b35483
|
a5469735b2b7ca0241e7a3768c886fe874bbed7f
|
refs/heads/master
| 2023-04-18T23:39:12.751305
| 2020-12-06T10:15:52
| 2020-12-06T10:18:20
| 303,316,965
| 0
| 0
|
Apache-2.0
| 2020-12-06T12:20:51
| 2020-10-12T07:49:38
|
Scala
|
UTF-8
|
Java
| false
| false
| 3,193
|
java
|
/*
* Copyright 2011-2020 GatlingCorp (https://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.gatling.http.client.proxy;
import io.gatling.http.client.Request;
import io.gatling.http.client.uri.Uri;
import io.gatling.http.client.test.HttpTest;
import io.gatling.http.client.test.TestServer;
import io.gatling.http.client.test.listener.TestListener;
import io.netty.handler.codec.http.DefaultHttpHeaders;
import io.netty.handler.codec.http.HttpHeaders;
import io.netty.handler.codec.http.HttpMethod;
import io.netty.handler.codec.http.HttpResponseStatus;
import org.eclipse.jetty.proxy.ConnectHandler;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.junit.jupiter.api.Assertions.assertEquals;
class HttpsProxyTest extends HttpTest {
private static HttpsProxy proxy;
private static TestServer target;
private static class HttpsProxy implements AutoCloseable {
private final Server jetty;
public HttpsProxy() {
jetty = new Server();
ServerConnector connector = new ServerConnector(jetty);
connector.setPort(8888);
jetty.addConnector(connector);
jetty.setHandler(new ConnectHandler());
}
public int getPort() {
return ((ServerConnector) jetty.getConnectors()[0]).getPort();
}
public void start() throws Exception {
jetty.start();
}
@Override
public void close() throws Exception {
jetty.stop();
}
}
@BeforeAll
static void start() throws Throwable {
target = new TestServer();
target.start();
proxy = new HttpsProxy();
proxy.start();
}
@AfterAll
static void stop() throws Throwable {
target.close();
proxy.close();
}
@Test
void testRequestProxy() throws Throwable {
withClient().run(client ->
withServer(target).run(server -> {
server.enqueueEcho();
HttpHeaders h = new DefaultHttpHeaders();
for (int i = 1; i < 5; i++) {
h.add("Test" + i, "Test" + i);
}
Request request = client.newRequestBuilder(HttpMethod.GET, Uri.create(server.getHttpsUrl()))
.setHeaders(h)
.setProxyServer(new HttpProxyServer("localhost", 0, proxy.getPort(), null))
.build();
client.test(request, 0, new TestListener() {
@Override
public void onComplete0() {
assertEquals(HttpResponseStatus.OK, status);
}
}).get(TIMEOUT_SECONDS, SECONDS);
})
);
}
}
|
[
"slandelle@gatling.io"
] |
slandelle@gatling.io
|
5b382a7f382b8fbbca59e0a59b049f66845352c4
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/3/3_2a86b82f842c1aae4697cd4b524b6d4fa540eb94/AffineKernelTest/3_2a86b82f842c1aae4697cd4b524b6d4fa540eb94_AffineKernelTest_s.java
|
af2731461830af4a2ca39b9a4f5dd4234e8c4b48
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,086
|
java
|
package math.nyx.codecs;
import static org.junit.Assert.assertEquals;
import math.nyx.affine.AffineKernel;
import math.nyx.affine.AffineTransform;
import math.nyx.framework.SignalBlock;
import math.nyx.framework.square.SquareDecimationStrategy;
import math.nyx.utils.TestUtils;
import org.apache.commons.math.linear.Array2DRowRealMatrix;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.SparseRealMatrix;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"file:src/main/resources/applicationContext.xml"})
public class AffineKernelTest {
@Autowired
private AffineKernel affineKernel;
@Autowired
private SquareDecimationStrategy decimationStrategy;
@Test
public void getAffineTransformForIdenticalBlocks() {
verifyAffineTransform(TestUtils.generateSignal(4), TestUtils.generateSignal(4), 0.0, 1.0, 0.0);
}
@Test
public void getAffineTransformForBlocksWithScaleAndOffset() {
int signalDimension = 4;
double scale = 7.0f;
double offset = 11.0f;
RealMatrix domain = TestUtils.generateSignal(signalDimension);
RealMatrix range = TestUtils.generateSignal(signalDimension);
range = range.scalarMultiply(scale);
range = range.scalarAdd(offset);
verifyAffineTransform(domain, range, 0.0, scale, offset);
}
private void verifyAffineTransform(RealMatrix domain, RealMatrix range,
double expectedDistance, double expectedScale, double expectedOffset) {
SignalBlock domainBlock = new SignalBlock(0, domain);
SignalBlock rangeBlock = new SignalBlock(0, range);
AffineTransform transform = affineKernel.encode(domainBlock, rangeBlock);
assertEquals(expectedDistance, transform.getDistance(), TestUtils.DELTA);
assertEquals(transform.toString(), expectedScale, transform.getScale(), TestUtils.DELTA);
assertEquals(expectedOffset, transform.getOffset(), TestUtils.DELTA);
}
@Test
public void verifyTransform() {
double rangeVector[] = new double[] {
90.0, 90.0, 89.0, 92.0, 92.0, 90.0, 89.0, 86.0,
93.0, 92.0, 89.0, 92.0, 93.0, 88.0, 89.0, 87.0,
92.0, 89.0, 90.0, 90.0, 91.0, 89.0, 87.0, 87.0,
90.0, 86.0, 89.0, 89.0, 90.0, 89.0, 86.0, 82.0,
85.0, 88.0, 88.0, 87.0, 89.0, 86.0, 87.0, 85.0,
86.0, 88.0, 86.0, 84.0, 87.0, 87.0, 85.0, 86.0,
87.0, 87.0, 87.0, 86.0, 87.0, 87.0, 86.0, 87.0,
89.0, 88.0, 86.0, 88.0, 86.0, 86.0, 87.0, 86.0
};
double domainVector[] = new double[] {
51.0, 43.0, 54.0, 59.0, 56.0, 56.0, 52.0, 56.0, 55.0, 55.0, 55.0, 59.0, 60.0, 29.0, 16.0, 33.0,
43.0, 50.0, 56.0, 57.0, 54.0, 53.0, 54.0, 57.0, 58.0, 55.0, 57.0, 62.0, 55.0, 24.0, 16.0, 31.0,
51.0, 60.0, 57.0, 51.0, 50.0, 52.0, 53.0, 55.0, 56.0, 58.0, 60.0, 56.0, 47.0, 23.0, 15.0, 25.0,
52.0, 54.0, 54.0, 51.0, 49.0, 48.0, 53.0, 51.0, 53.0, 58.0, 59.0, 54.0, 44.0, 22.0, 14.0, 19.0,
51.0, 50.0, 48.0, 49.0, 48.0, 46.0, 48.0, 51.0, 54.0, 56.0, 52.0, 46.0, 41.0, 21.0, 13.0, 14.0,
54.0, 48.0, 47.0, 46.0, 47.0, 44.0, 46.0, 51.0, 48.0, 49.0, 47.0, 42.0, 31.0, 16.0, 11.0, 10.0,
48.0, 44.0, 41.0, 38.0, 39.0, 38.0, 40.0, 43.0, 44.0, 40.0, 38.0, 33.0, 25.0, 14.0, 12.0, 8.0,
27.0, 25.0, 27.0, 28.0, 28.0, 32.0, 32.0, 30.0, 32.0, 30.0, 27.0, 25.0, 22.0, 15.0, 12.0, 9.0,
16.0, 19.0, 23.0, 23.0, 23.0, 21.0, 21.0, 23.0, 24.0, 26.0, 24.0, 24.0, 22.0, 21.0, 15.0, 10.0,
8.0, 9.0, 11.0, 12.0, 12.0, 13.0, 13.0, 17.0, 17.0, 21.0, 20.0, 19.0, 20.0, 25.0, 20.0, 14.0,
10.0, 8.0, 9.0, 11.0, 10.0, 9.0, 9.0, 9.0, 10.0, 12.0, 12.0, 13.0, 16.0, 17.0, 19.0, 20.0,
20.0, 14.0, 11.0, 10.0, 11.0, 11.0, 10.0, 10.0, 10.0, 9.0, 10.0, 9.0, 11.0, 13.0, 17.0, 19.0,
39.0, 34.0, 23.0, 15.0, 13.0, 12.0, 11.0, 11.0, 11.0, 11.0, 10.0, 9.0, 10.0, 11.0, 11.0, 13.0,
35.0, 32.0, 28.0, 24.0, 21.0, 16.0, 13.0, 12.0, 11.0, 11.0, 10.0, 10.0, 12.0, 12.0, 11.0, 10.0,
21.0, 20.0, 17.0, 15.0, 16.0, 18.0, 17.0, 13.0, 13.0, 12.0, 13.0, 12.0, 12.0, 14.0, 14.0, 13.0,
14.0, 14.0, 15.0, 14.0, 12.0, 14.0, 13.0, 12.0, 12.0, 12.0, 12.0, 13.0, 12.0, 14.0, 15.0, 13.0
};
SparseRealMatrix decimationOperator = decimationStrategy.getDecimationOperator(rangeVector.length, domainVector.length);
RealMatrix range = new Array2DRowRealMatrix(rangeVector.length, 1);
range.setColumn(0, rangeVector);
RealMatrix domain = new Array2DRowRealMatrix(domainVector.length, 1);
domain.setColumn(0, domainVector);
RealMatrix decimatedDomain = decimationOperator.multiply(domain);
AffineTransform transform = affineKernel.encode(new SignalBlock(0, decimatedDomain), new SignalBlock(0, range));
assertEquals(1.303533, transform.getDistance(), TestUtils.DELTA);
assertEquals(0.107998, transform.getScale(), TestUtils.DELTA);
assertEquals(84.911498, transform.getOffset(), TestUtils.DELTA);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
de8f787c48ae03fb8fc86512b7939cd6a4daa988
|
56319e53f4155b0f0ae4ab249b1d3249fc8ddd98
|
/apache-tomcat-8.0.39/converted/org/apache/tomcat/util/descriptor/web/MainForTestWebXmlOrdering_testOrderWebFragmentsRelative7.java
|
0931989abd54ac2c88e40a1b60828cf53332777b
|
[] |
no_license
|
SnowOnion/J2mConvertedTestcases
|
2f904e2f2754f859f6125f248d3672eb1a70abd1
|
e74b0e4c08f12e5effeeb8581670156ace42640a
|
refs/heads/master
| 2021-01-11T19:01:42.207334
| 2017-01-19T12:22:22
| 2017-01-19T12:22:22
| 79,295,183
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 520
|
java
|
package org.apache.tomcat.util.descriptor.web;
import org.apache.tomcat.util.descriptor.web.TestWebXmlOrdering;
public class MainForTestWebXmlOrdering_testOrderWebFragmentsRelative7 {
public static void main(String[] args) {
try {
TestWebXmlOrdering objTestWebXmlOrdering = new TestWebXmlOrdering();
objTestWebXmlOrdering.setUp();
objTestWebXmlOrdering.testOrderWebFragmentsRelative7();
} catch (Throwable e) {
e.printStackTrace();
}
}
}
|
[
"snowonionlee@gmail.com"
] |
snowonionlee@gmail.com
|
853037e948a7d4480ca96eeeb44a81181ead4178
|
b35e42618890b01f01f5408c05741dc895db50a2
|
/opentsp-dongfeng-modules/opentsp-dongfeng-system/dongfeng-system-core/src/main/java/com/navinfo/opentsp/dongfeng/system/service/IRoleService.java
|
d9bac90429dfaca02e4f850c0a6c9d54ca19ce91
|
[] |
no_license
|
shanghaif/dongfeng-huanyou-platform
|
28eb5572a1f15452427456ceb3c7f3b3cf72dc84
|
67bcc02baab4ec883648b167717f356df9dded8d
|
refs/heads/master
| 2023-05-13T01:51:37.463721
| 2018-03-07T14:24:03
| 2018-03-07T14:26:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,146
|
java
|
package com.navinfo.opentsp.dongfeng.system.service;
import com.navinfo.opentsp.dongfeng.common.result.CommonResult;
import com.navinfo.opentsp.dongfeng.common.result.HttpCommandResultWithData;
import com.navinfo.opentsp.dongfeng.system.commands.role.*;
/**
* Created by yaocy on 2017/03/13.
* 角色Service接口
*/
@SuppressWarnings("rawtypes")
public interface IRoleService {
/**
* 查询
* @param command
* @return
*/
public HttpCommandResultWithData queryRoleList(RoleListCommand command);
public HttpCommandResultWithData getRole(GetRoleCommand command);
/**
* 添加
* @param command
* @return
*/
public CommonResult addRole(AddRoleCommand command);
/**
* 修改
* @param command
* @return
*/
public CommonResult editRole(EditRoleCommand command);
/**
* 删除
* @param command
* @return
*/
public CommonResult delRole(DelRoleCommand command);
public HttpCommandResultWithData queryRoleByType(RoleByTypeCommand command);
public HttpCommandResultWithData queryRolePermission(RolePermissionCommand command);
}
|
[
"zhangtiantong@aerozhonghuan.com"
] |
zhangtiantong@aerozhonghuan.com
|
4eb8e34a560838a04f2edf9b3ed7546022a09e53
|
eb9f655206c43c12b497c667ba56a0d358b6bc3a
|
/plugins/lombok/testData/before/logger/LoggerLog4j2.java
|
9f7b79b808c6c73dca3a6505dacbfdf602567abe
|
[
"Apache-2.0"
] |
permissive
|
JetBrains/intellij-community
|
2ed226e200ecc17c037dcddd4a006de56cd43941
|
05dbd4575d01a213f3f4d69aa4968473f2536142
|
refs/heads/master
| 2023-09-03T17:06:37.560889
| 2023-09-03T11:51:00
| 2023-09-03T12:12:27
| 2,489,216
| 16,288
| 6,635
|
Apache-2.0
| 2023-09-12T07:41:58
| 2011-09-30T13:33:05
| null |
UTF-8
|
Java
| false
| false
| 180
|
java
|
import lombok.extern.log4j.Log4j2;
@Log4j2
class LoggerLog4j2 {
}
@Log4j2
class LoggerLog4j2WithImport {
}
@Log4j2(topic="DifferentName")
class LoggerLog4j2WithDifferentName {
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
c68adf26657534158ead2d2a51f1bf674835d273
|
cbc61ffb33570a1bc55bb1e754510192b0366de2
|
/ole-app/olefs/src/main/java/org/kuali/ole/fp/document/validation/impl/DisbursementVoucherPayeeStateCodeValidation.java
|
844a8205be98db38113bf99147df4366f6f581ce
|
[
"ECL-2.0"
] |
permissive
|
VU-libtech/OLE-INST
|
42b3656d145a50deeb22f496f6f430f1d55283cb
|
9f5efae4dfaf810fa671c6ac6670a6051303b43d
|
refs/heads/master
| 2021-07-08T11:01:19.692655
| 2015-05-15T14:40:50
| 2015-05-15T14:40:50
| 24,459,494
| 1
| 0
|
ECL-2.0
| 2021-04-26T17:01:11
| 2014-09-25T13:40:33
|
Java
|
UTF-8
|
Java
| false
| false
| 4,970
|
java
|
/*
* Copyright 2009 The Kuali Foundation
*
* Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
*
* 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.kuali.ole.fp.document.validation.impl;
import org.apache.commons.lang.StringUtils;
import org.kuali.ole.fp.businessobject.DisbursementVoucherPayeeDetail;
import org.kuali.ole.fp.document.DisbursementVoucherDocument;
import org.kuali.ole.sys.OLEKeyConstants;
import org.kuali.ole.sys.OLEPropertyConstants;
import org.kuali.ole.sys.context.SpringContext;
import org.kuali.ole.sys.document.AccountingDocument;
import org.kuali.ole.sys.document.validation.GenericValidation;
import org.kuali.ole.sys.document.validation.event.AttributedDocumentEvent;
import org.kuali.rice.kns.service.DataDictionaryService;
import org.kuali.rice.krad.util.GlobalVariables;
import org.kuali.rice.krad.util.MessageMap;
import org.kuali.rice.location.api.state.State;
import org.kuali.rice.location.api.state.StateService;
public class DisbursementVoucherPayeeStateCodeValidation extends GenericValidation {
private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(DisbursementVoucherPayeeStateCodeValidation.class);
private AccountingDocument accountingDocumentForValidation;
/**
* @see org.kuali.ole.sys.document.validation.Validation#validate(org.kuali.ole.sys.document.validation.event.AttributedDocumentEvent)
*/
public boolean validate(AttributedDocumentEvent event) {
LOG.debug("validate start");
boolean isValid = true;
DisbursementVoucherDocument document = (DisbursementVoucherDocument) accountingDocumentForValidation;
DisbursementVoucherPayeeDetail payeeDetail = document.getDvPayeeDetail();
MessageMap errors = GlobalVariables.getMessageMap();
errors.addToErrorPath(OLEPropertyConstants.DOCUMENT);
DataDictionaryService dataDictionaryService = SpringContext.getBean(DataDictionaryService.class);
StateService stateService = SpringContext.getBean(StateService.class);
String countryCode = payeeDetail.getDisbVchrPayeeCountryCode();
String stateCode = payeeDetail.getDisbVchrPayeeStateCode();
if (StringUtils.isNotBlank(stateCode) && StringUtils.isNotBlank(countryCode)) {
State state = stateService.getState(countryCode, stateCode);
if (state == null) {
String label = dataDictionaryService.getAttributeLabel(DisbursementVoucherPayeeDetail.class, OLEPropertyConstants.DISB_VCHR_PAYEE_STATE_CODE);
String propertyPath = OLEPropertyConstants.DV_PAYEE_DETAIL + "." + OLEPropertyConstants.DISB_VCHR_PAYEE_STATE_CODE;
errors.putError(propertyPath, OLEKeyConstants.ERROR_EXISTENCE, label);
isValid = false;
}
}
countryCode = payeeDetail.getDisbVchrSpecialHandlingCountryCode();
stateCode = payeeDetail.getDisbVchrSpecialHandlingStateCode();
if (document.isDisbVchrSpecialHandlingCode() && StringUtils.isNotBlank(stateCode) && StringUtils.isNotBlank(countryCode)) {
State state = stateService.getState(countryCode, stateCode);
if (state == null) {
String label = dataDictionaryService.getAttributeLabel(DisbursementVoucherPayeeDetail.class, OLEPropertyConstants.DISB_VCHR_SPECIAL_HANDLING_STATE_CODE);
String propertyPath = OLEPropertyConstants.DV_PAYEE_DETAIL + "." + OLEPropertyConstants.DISB_VCHR_SPECIAL_HANDLING_STATE_CODE;
errors.putError(propertyPath, OLEKeyConstants.ERROR_EXISTENCE, label);
isValid = false;
}
}
errors.removeFromErrorPath(OLEPropertyConstants.DOCUMENT);
return isValid;
}
/**
* Gets the accountingDocumentForValidation attribute.
*
* @return Returns the accountingDocumentForValidation.
*/
public AccountingDocument getAccountingDocumentForValidation() {
return accountingDocumentForValidation;
}
/**
* Sets the accountingDocumentForValidation attribute value.
*
* @param accountingDocumentForValidation The accountingDocumentForValidation to set.
*/
public void setAccountingDocumentForValidation(AccountingDocument accountingDocumentForValidation) {
this.accountingDocumentForValidation = accountingDocumentForValidation;
}
}
|
[
"david.lacy@villanova.edu"
] |
david.lacy@villanova.edu
|
78c4b25f38a1de8e9a43a10d6cc3b50b86780866
|
c81340901371a2026dc26aed82bfbd2d0a7e8485
|
/src/main/java/com/eu/habbo/threading/runnables/PetEatAction.java
|
fc390299c03dd1d805868d47af3eda7775650de4
|
[
"Apache-2.0"
] |
permissive
|
Re4yz/ArcturusEmulator
|
f9cbe520809eb36fc370a1d285182e083dfbb4ef
|
a039967aa27e5340ac2997822142f4eaa9caafe4
|
refs/heads/master
| 2023-04-19T03:49:05.138800
| 2021-05-05T20:35:20
| 2021-05-05T20:35:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,295
|
java
|
package com.eu.habbo.threading.runnables;
import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.achievements.AchievementManager;
import com.eu.habbo.habbohotel.items.interactions.InteractionPetFood;
import com.eu.habbo.habbohotel.pets.GnomePet;
import com.eu.habbo.habbohotel.pets.Pet;
import com.eu.habbo.habbohotel.pets.PetTasks;
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer;
public class PetEatAction implements Runnable
{
private final Pet pet;
private final InteractionPetFood food;
public PetEatAction(Pet pet, InteractionPetFood food)
{
this.pet = pet;
this.food = food;
}
@Override
public void run()
{
if(this.pet.getRoomUnit() != null && this.pet.getRoom() != null)
{
if (this.pet.levelHunger >= 20 && this.food != null && Integer.valueOf(this.food.getExtradata()) < this.food.getBaseItem().getStateCount())
{
this.pet.addHunger(-20);
this.pet.setTask(PetTasks.EAT);
this.pet.getRoomUnit().setCanWalk(false);
this.food.setExtradata(Integer.valueOf(this.food.getExtradata()) + 1 + "");
this.pet.getRoom().updateItem(this.food);
if (this.pet instanceof GnomePet)
{
if (this.pet.getPetData().getType() == 26)
{
AchievementManager.progressAchievement(Emulator.getGameEnvironment().getHabboManager().getHabbo(this.pet.getUserId()), Emulator.getGameEnvironment().getAchievementManager().getAchievement("GnomeFeedingFeeding"), 20);
}
else
{
AchievementManager.progressAchievement(Emulator.getGameEnvironment().getHabboManager().getHabbo(this.pet.getUserId()), Emulator.getGameEnvironment().getAchievementManager().getAchievement("LeprechaunFeedingFeeding"), 20);
}
}
else
{
AchievementManager.progressAchievement(Emulator.getGameEnvironment().getHabboManager().getHabbo(this.pet.getUserId()), Emulator.getGameEnvironment().getAchievementManager().getAchievement("PetFeeding"), 20);
}
Emulator.getThreading().run(this, 1000);
} else
{
if (this.food != null && Integer.valueOf(this.food.getExtradata()) == this.food.getBaseItem().getStateCount())
{
Emulator.getThreading().run(new QueryDeleteHabboItem(this.food), 500);
if (this.pet.getRoom() != null)
{
this.pet.getRoom().removeHabboItem(this.food);
this.pet.getRoom().sendComposer(new RemoveFloorItemComposer(this.food, true).compose());
}
}
this.pet.setTask(PetTasks.FREE);
this.pet.getRoomUnit().getStatus().remove("eat");
this.pet.getRoomUnit().setCanWalk(true);
this.pet.getRoom().sendComposer(new RoomUserStatusComposer(this.pet.getRoomUnit()).compose());
}
}
}
}
|
[
"orracosta@icloud.com"
] |
orracosta@icloud.com
|
436c611ee4b16a2e6432984627ca85112f24977c
|
ebdcaff90c72bf9bb7871574b25602ec22e45c35
|
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201809/cm/AdGroupExtensionSettingServiceInterfacegetResponse.java
|
1e7782fca251ec38d1a3a56cf86db119b0b3d93d
|
[
"Apache-2.0"
] |
permissive
|
ColleenKeegan/googleads-java-lib
|
3c25ea93740b3abceb52bb0534aff66388d8abd1
|
3d38daadf66e5d9c3db220559f099fd5c5b19e70
|
refs/heads/master
| 2023-04-06T16:16:51.690975
| 2018-11-15T20:50:26
| 2018-11-15T20:50:26
| 158,986,306
| 1
| 0
|
Apache-2.0
| 2023-04-04T01:42:56
| 2018-11-25T00:56:39
|
Java
|
UTF-8
|
Java
| false
| false
| 2,233
|
java
|
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.api.ads.adwords.jaxws.v201809.cm;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for getResponse element declaration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <element name="getResponse">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="rval" type="{https://adwords.google.com/api/adwords/cm/v201809}AdGroupExtensionSettingPage" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"rval"
})
@XmlRootElement(name = "getResponse")
public class AdGroupExtensionSettingServiceInterfacegetResponse {
protected AdGroupExtensionSettingPage rval;
/**
* Gets the value of the rval property.
*
* @return
* possible object is
* {@link AdGroupExtensionSettingPage }
*
*/
public AdGroupExtensionSettingPage getRval() {
return rval;
}
/**
* Sets the value of the rval property.
*
* @param value
* allowed object is
* {@link AdGroupExtensionSettingPage }
*
*/
public void setRval(AdGroupExtensionSettingPage value) {
this.rval = value;
}
}
|
[
"jradcliff@users.noreply.github.com"
] |
jradcliff@users.noreply.github.com
|
c49c284f393517570ac9b8d29585062761bd85bf
|
bf390e6589e240c6ccc325355cfd0c21fbe9d884
|
/3.JavaMultithreading/src/com/javarush/task/task27/task2710/MailServer.java
|
186dbed991825c23d6d946768150714183c15958
|
[] |
no_license
|
vladmeh/jrt
|
84878788fbb1f10aa55d320d205f886d1df9e417
|
0272ded03ac8eced7bf901bdfcc503a4eb6da12a
|
refs/heads/master
| 2020-04-05T11:20:15.441176
| 2019-05-22T22:24:56
| 2019-05-22T22:24:56
| 81,300,849
| 4
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 780
|
java
|
package com.javarush.task.task27.task2710;
public class MailServer implements Runnable {
private Mail mail;
public MailServer(Mail mail) {
this.mail = mail;
}
@Override
public void run() {
long beforeTime = System.currentTimeMillis();
//сделайте что-то тут - do something here
synchronized (mail){
try {
mail.wait();
} catch (InterruptedException e) {
e.printStackTrace();
}
String name = Thread.currentThread().getName();
long afterTime = System.currentTimeMillis();
System.out.format("%s MailServer has got: [%s] in %d ms after start", name, mail.getText(), (afterTime - beforeTime));
}
}
}
|
[
"vladmeh@gmail.com"
] |
vladmeh@gmail.com
|
bffdb0640255265c22cc7ebb30fe010e7d55d37c
|
ef5bea450f69e1d16dee0cd15e9076da2a427e8f
|
/app/src/main/java/cn/longmaster/hospital/doctor/core/entity/consult/record/BaseDiagnosisInfo.java
|
28438a8a8664de737a62d9c027521e5f589d944e
|
[] |
no_license
|
chengsoft618/Internet_Hospital_Doctor
|
c9e37e8ce80bf3c303f799406644f1adf4cb10df
|
b6486de17b2246113bcee26d0ec3f2586828d5f7
|
refs/heads/master
| 2021-02-07T20:55:11.939929
| 2020-01-16T09:10:08
| 2020-01-16T09:10:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,762
|
java
|
package cn.longmaster.hospital.doctor.core.entity.consult.record;
import java.io.Serializable;
import cn.longmaster.doctorlibrary.util.json.JsonField;
/**
* 医嘱基类
* Created by yangyong on 16/8/24.
*/
public class BaseDiagnosisInfo implements Serializable {
@JsonField("appointment_id")
private int appointmentId;//预约ID
@JsonField("recure_num")
private int recureNum;//复诊次数
@JsonField("insert_dt")
private String insertDt;//插入时间
private boolean isMedia;//是否多媒体医嘱,当为文本时为false
private boolean isLocalData;//是否本地数据,默认为false
public int getAppointmentId() {
return appointmentId;
}
public void setAppointmentId(int appointmentId) {
this.appointmentId = appointmentId;
}
public int getRecureNum() {
return recureNum;
}
public void setRecureNum(int recureNum) {
this.recureNum = recureNum;
}
public String getInsertDt() {
return insertDt;
}
public void setInsertDt(String insertDt) {
this.insertDt = insertDt;
}
public boolean isMedia() {
return isMedia;
}
public void setMedia(boolean media) {
isMedia = media;
}
public boolean isLocalData() {
return isLocalData;
}
public void setLocalData(boolean localData) {
isLocalData = localData;
}
@Override
public String toString() {
return "BaseDiagnosisInfo{" +
"appointmentId=" + appointmentId +
", recureNum=" + recureNum +
", insertDt='" + insertDt + '\'' +
", isMedia=" + isMedia +
", isLocalData=" + isLocalData +
'}';
}
}
|
[
"wangyangguiyang@163.com"
] |
wangyangguiyang@163.com
|
ea32c91871c020880daa97377e19cc9cfb88082e
|
f766baf255197dd4c1561ae6858a67ad23dcda68
|
/app/src/main/java/com/davemorrissey/labs/subscaleview/c/a.java
|
82d3c7da83803f6e82db525e051b672ba89f0549
|
[] |
no_license
|
jianghan200/wxsrc6.6.7
|
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
|
eb6c56587cfca596f8c7095b0854cbbc78254178
|
refs/heads/master
| 2020-03-19T23:40:49.532494
| 2018-06-12T06:00:50
| 2018-06-12T06:00:50
| 137,015,278
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 695
|
java
|
package com.davemorrissey.labs.subscaleview.c;
import android.content.Context;
import android.net.Uri;
import com.davemorrissey.labs.subscaleview.a.d;
import com.davemorrissey.labs.subscaleview.view.SubsamplingScaleImageView;
public abstract interface a
{
public abstract b a(SubsamplingScaleImageView paramSubsamplingScaleImageView, Context paramContext, com.davemorrissey.labs.subscaleview.a.b<? extends d> paramb, Uri paramUri, boolean paramBoolean);
}
/* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes6-dex2jar.jar!/com/davemorrissey/labs/subscaleview/c/a.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"526687570@qq.com"
] |
526687570@qq.com
|
a4d651d1fa303e7d86d992f6d1b0863086589391
|
f4d8f789541888f81cadcb0fb34e807926e673bc
|
/chapter_002/src/main/java/ru/job4j/tracker2/start/interfaces/Input.java
|
0a6de95eb3641a73aa117fcf34ec1784d8a82d95
|
[
"Apache-2.0"
] |
permissive
|
Massimilian/Vasily-Maslov
|
844cc913e78463a06b961c9890d4d8188d85e793
|
c741c19831fcb9eabd6d83ba0450e931925f48de
|
refs/heads/master
| 2021-06-14T03:39:15.012034
| 2020-02-28T22:13:23
| 2020-02-28T22:13:23
| 111,004,725
| 0
| 1
|
Apache-2.0
| 2020-10-12T17:45:26
| 2017-11-16T18:01:06
|
Java
|
UTF-8
|
Java
| false
| false
| 164
|
java
|
package ru.job4j.tracker2.start.interfaces;
public interface Input {
String ask(String question);
int ask(String question, int[] range); // overloading
}
|
[
"vasalekmas@gmail.com"
] |
vasalekmas@gmail.com
|
99f0a84700f179de5b8b7a6827985241493d6715
|
3c63907025075a4eb5554b3cb4a2bbcce6d04cc9
|
/itsnat_featshow/src/main/webapp/WEB-INF/src/org/itsnat/feashow/features/core/domutils/PersonExtended.java
|
5fadb6107b01ef3ff08feebb8a45af28e48ec9e6
|
[] |
no_license
|
jmarranz/itsnat_server
|
36da4d7c2c91c7d07c4a6c639b6513f16def639d
|
49337e09adda04ad120eecf9eea614ac4e44c8ab
|
refs/heads/master
| 2020-04-10T15:52:49.481387
| 2016-04-13T18:04:28
| 2016-04-13T18:04:28
| 6,872,297
| 5
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,253
|
java
|
/*
* This file is not part of the ItsNat framework.
*
* Original source code use and closed source derivatives are authorized
* to third parties with no restriction or fee.
* The original source code is owned by the author.
*
* This program is distributed AS IS 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.
*
* (C) Innowhere Software a service of Jose Maria Arranz Santamaria, Spanish citizen.
*/
package org.itsnat.feashow.features.core.domutils;
import org.itsnat.feashow.features.comp.shared.Person;
public class PersonExtended extends Person
{
protected int age;
protected boolean married;
public PersonExtended(String firstName,String lastName,int age,boolean married)
{
super(firstName,lastName);
this.age = age;
this.married = married;
}
public int getAge()
{
return age;
}
public void setAge(int age)
{
this.age = age;
}
public boolean isMarried()
{
return married;
}
public void setMarried(boolean married)
{
this.married = married;
}
}
|
[
"jmarranz@innowhere.com"
] |
jmarranz@innowhere.com
|
d3579272d1521cdb4d26ef5720f2289449c7e7f1
|
052228ac8c5aef2e94770398268180b2f1326cff
|
/src/REST/esdk_ec/src/main/java/com/huawei/esdk/ec/north/rest/bean/eserver/multiapponline/GetIMGroupResponse.java
|
a27c2132cd4eff83cf4a21f82cd4380f494d849f
|
[
"Apache-2.0"
] |
permissive
|
Hr2013/eSDK_EC_SDK_Java
|
091ee3828cd0e0f2959a3cfc6fff9d660d7999ff
|
99adf0dc17add9cab47ef8e47e677340b84e746f
|
refs/heads/master
| 2020-06-14T15:13:03.844905
| 2016-09-06T01:35:17
| 2016-09-06T01:35:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,970
|
java
|
package com.huawei.esdk.ec.north.rest.bean.eserver.multiapponline;
import java.util.List;
import com.huawei.esdk.ec.business.professional.rest.multiapponline.callback.AbstractCallbackMsg;
import com.huawei.esdk.ec.domain.model.multiapponline.IMGroupInfo;
import com.huawei.esdk.ec.domain.model.multiapponline.MultiAppOnlineModel;
import com.huawei.esdk.ec.north.rest.eserver.resource.multiapponline.convert.GroupResourceConvert;
import com.huawei.esdk.ec.northcommu.rest.callback.RestEServerListener;
public class GetIMGroupResponse extends AbstractCallbackMsg
{
private String resultCode;
private String recordAmount;
private String count;
private List<IMGroup> imGroupList;
private String pageIndex;
public String getResultCode()
{
return resultCode;
}
public void setResultCode(String resultCode)
{
this.resultCode = resultCode;
}
public String getRecordAmount()
{
return recordAmount;
}
public void setRecordAmount(String recordAmount)
{
this.recordAmount = recordAmount;
}
public String getCount()
{
return count;
}
public void setCount(String count)
{
this.count = count;
}
public List<IMGroup> getImGroupList()
{
return imGroupList;
}
public void setImGroupList(List<IMGroup> imGroupList)
{
this.imGroupList = imGroupList;
}
public String getPageIndex()
{
return pageIndex;
}
public void setPageIndex(String pageIndex)
{
this.pageIndex = pageIndex;
}
@Override
public void notifyCallbackMsg(RestEServerListener listener, MultiAppOnlineModel msg)
{
GetIMGroupResponse payload = new GroupResourceConvert().getIMGroupModel2Rest((IMGroupInfo)msg);
processNorthSno(msg, payload);
listener.sendCallbackMsg(payload, "imgroup");
}
}
|
[
"13262212358@163.com"
] |
13262212358@163.com
|
69b65550042cba585c0b0d5a0e52490766731f90
|
204ed7097c2eca124ba44a4b8ec32825bc61dcd0
|
/nms-biz-client/src/java/com/yuep/nms/biz/client/topo/view/AddDomainOrGroupView.java
|
55aa466d21bdc408f5079fdb9b704a937bd0bf29
|
[] |
no_license
|
frankggyy/YUEP
|
8ee9a7d547f8fa471fda88a42c9e3a31ad3f94d2
|
827115c99b84b9cbfbc501802b18c06c62c1c507
|
refs/heads/master
| 2016-09-16T13:49:11.258476
| 2011-08-31T13:30:34
| 2011-08-31T13:30:34
| 2,299,133
| 0
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 6,475
|
java
|
/*
* $Id: AddDomainOrGroupView.java, 2011-4-19 ÏÂÎç03:50:12 aaron Exp $
*
* Copyright (c) 2010 Wuhan Yangtze Communications Industry Group Co.,Ltd
* All rights reserved.
*
* This software is copyrighted and owned by YCIG or the copyright holder
* specified, unless otherwise noted, and may not be reproduced or distributed
* in whole or in part in any form or medium without express written permission.
*/
package com.yuep.nms.biz.client.topo.view;
import java.util.List;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import org.apache.commons.collections.CollectionUtils;
import twaver.swing.TableLayout;
import com.yuep.core.client.ClientCoreContext;
import com.yuep.core.client.component.factory.SwingFactory;
import com.yuep.core.client.component.factory.decorator.editor.ComboBoxEditorDecorator;
import com.yuep.core.client.component.factory.decorator.editor.StringEditorDecorator;
import com.yuep.core.client.component.factory.decorator.label.LabelDecorator;
import com.yuep.core.client.component.menu.action.AbstractButtonAction;
import com.yuep.core.client.component.validate.editor.DefaultXEditor;
import com.yuep.core.client.component.validate.editor.XComboBoxEditor;
import com.yuep.core.client.component.validate.validator.StringValidator;
import com.yuep.core.client.mvc.ClientController;
import com.yuep.core.client.mvc.validate.AbstractValidateView;
import com.yuep.nms.core.common.mocore.naming.MoNaming;
import com.yuep.nms.core.common.mocore.service.MoCore;
import com.yuep.nms.core.common.momanager.module.constants.MoManagerModuleConstants;
import com.yuep.nms.core.common.momanager.service.MoManager;
/**
* <p>
* Title: AddDomainOrGroupView
* </p>
* <p>
* Description:
* </p>
*
* @author aaron
* created 2011-4-19 ÏÂÎç03:50:12
* modified [who date description]
* check [who date description]
*/
public class AddDomainOrGroupView extends AbstractValidateView<Object> {
private static final long serialVersionUID = -3252214346664206430L;
private DefaultXEditor<StringValidator> nameEditor;
private MoNaming parent;
private XComboBoxEditor typeEditor;
/**
* @see com.yuep.core.client.mvc.validate.AbstractValidateView#addButtonListener(com.yuep.core.client.mvc.ClientController)
*/
@Override
protected <V, M> void addButtonListener(ClientController<Object, V, M> controller) {
okButton.addActionListener(new AbstractButtonAction("") {
private static final long serialVersionUID = -4625176666445968309L;
@Override
protected Object[] commitData(Object... objs) {
Object selectedItem = typeEditor.getSelectedItem();
String type = "";
if (selectedItem != null) {
if (selectedItem.equals(ClientCoreContext.getString("AddDomainOrGroupView.type.domain"))) {
type = "domain";
} else if (selectedItem.equals(ClientCoreContext.getString("AddDomainOrGroupView.type.group"))) {
type = "group";
}
}
String domainName = nameEditor.getText();
MoManager moManager = ClientCoreContext.getRemoteService(MoManagerModuleConstants.MOMANAGER_REMOTE_SERVICE, MoManager.class);
MoCore moCore = ClientCoreContext.getLocalService("moCore", MoCore.class);
if(parent==null)
parent=moCore.getRootMo().getMoNaming();
moManager.createManagedDomain(parent, domainName, type);
return null;
}
@Override
protected void updateUi(Object... objs) {
dispose();
}
});
}
/**
* @see com.yuep.core.client.mvc.validate.AbstractValidateView#createContentPane()
*/
@Override
protected JComponent createContentPane() {
SwingFactory swingFactory = ClientCoreContext.getSwingFactory();
JPanel mainPanel = swingFactory.getPanel();
double[][] ds = { { 10, 100, TableLayout.FILL, 10 }, swingFactory.getTableLayoutRowParam(2, 4, 4) };
mainPanel.setLayout(swingFactory.getTableLayout(ds));
JLabel typeLabel = swingFactory.getLabel(new LabelDecorator("AddDomainOrGroupView.type"));
typeEditor = swingFactory.getXEditor(new ComboBoxEditorDecorator("AddDomainOrGroupView.type"));
JLabel domainNameLabel = swingFactory.getLabel(new LabelDecorator("AddDomainOrGroupView.name"));
nameEditor = swingFactory.getXEditor(new StringEditorDecorator("AddDomainOrGroupView.name", true, 1, 64));
mainPanel.add(typeLabel, "1,1,f,c");
mainPanel.add(typeEditor, "2,1,f,c");
mainPanel.add(domainNameLabel, "1,3,f,c");
mainPanel.add(nameEditor, "2,3,f,c");
return mainPanel;
}
/**
* @see com.yuep.core.client.mvc.validate.AbstractValidateView#getDescription()
*/
@Override
protected String getDescription() {
return "AddDomainOrGroupView.title";
}
/**
* @see com.yuep.core.client.mvc.ClientView#collectData()
*/
@Override
public List<Object> collectData() {
// TODO Auto-generated method stub
return null;
}
/**
* @see com.yuep.core.client.mvc.ClientView#getDefaultFocus()
*/
@Override
public JComponent getDefaultFocus() {
// TODO Auto-generated method stub
return null;
}
/**
* @see com.yuep.core.client.mvc.ClientView#getHelpId()
*/
@Override
public String getHelpId() {
// TODO Auto-generated method stub
return null;
}
/**
* @see com.yuep.core.client.mvc.ClientView#getTitle()
*/
@Override
public String getTitle() {
return "AddDomainOrGroupView.title";
}
@Override
protected void initializeData(List<Object> data) {
if (CollectionUtils.isEmpty(data))
return;
typeEditor.addItem(ClientCoreContext.getString("AddDomainOrGroupView.type.domain"));
typeEditor.addItem(ClientCoreContext.getString("AddDomainOrGroupView.type.group"));
Object object = data.get(0);
if (object instanceof MoNaming)
this.parent = (MoNaming) object;
}
}
|
[
"wanghu-520@163.com"
] |
wanghu-520@163.com
|
19eed8a3cd51da7beef686c808d82f71da2b6fc5
|
53d6a07c1a7f7ce6f58135fefcbd0e0740b059a6
|
/23Code/XCL-Charts-master/XCL-Charts-master/XCL-Charts/src/org/xclcharts/event/zoom/ChartZoom.java
|
6322ef9bc65afbcc39b08a5d3b29bf4fd7033244
|
[
"Apache-2.0"
] |
permissive
|
jx-admin/Code2
|
33dfa8d7a1acfa143d07309b6cf33a9ad7efef7f
|
c0ced8c812c0d44d82ebd50943af8b3381544ec7
|
refs/heads/master
| 2021-01-15T15:36:33.439310
| 2017-05-17T03:22:30
| 2017-05-17T03:22:30
| 43,429,217
| 8
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,519
|
java
|
/**
* Copyright 2014 XCL-Charts
*
* 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.
*
* @Project XCL-Charts
* @Description Android图表基类库
* @author XiongChuanLiang<br/>(xcl_168@aliyun.com)
* @license http://www.apache.org/licenses/ Apache v2 License
* @version 1.0
*/
package org.xclcharts.event.zoom;
import org.xclcharts.renderer.XChart;
import android.util.Log;
import android.view.View;
/**
* @ClassName ChartZoom
* @Description 放大缩小图表 <br/>
* @author XiongChuanLiang<br/>(xcl_168@aliyun.com)
*/
//附注: 对于有放大缩小图,数据随着放大缩小或左右移动要求的,可在view中
// 通过控制图的Axis和Datasource重置来实现。
// 图表库本身其实应当只负责绘图的。唉。不能对图表库要求太多。
// 像动画之类完全都应当是在view中去操作的,见我写的Demo。
public class ChartZoom implements IChartZoom {
private static final String TAG = "ChartZoom";
private View mView;
private XChart mChart;
//图原始的宽高
private float mInitWidth = 0.0f;
private float mInitHeight = 0.0f;
//处理类型
private static final int ZOOM_IN = 0; //放大
private static final int ZOOM_OUT = 1; //缩小
//当前缩放比
private float mScaleRate = 0.1f;
//所允许的最小缩小比,固定为0.5f;
private static final float MIN_SCALE_RATE = 0.5f;
//最小缩小比对应的宽高
private float mScaleMinWidth = 0.0f;
private float mScaleMinHeight = 0.0f;
public ChartZoom(View view, XChart chart) {
this.mChart = chart;
this.mView = view;
mInitWidth = chart.getWidth();
mInitHeight = chart.getHeight();
mScaleMinWidth = (int)(MIN_SCALE_RATE * mInitWidth);
mScaleMinHeight = (int)(MIN_SCALE_RATE * mInitHeight);
}
@Override
public void setZoomRate(float rate) {
// TODO Auto-generated method stub
mScaleRate = rate;
}
@Override
public void zoomIn() {
// TODO Auto-generated method stub
//放大
reSize(ZOOM_IN);
}
@Override
public void zoomOut() {
// TODO Auto-generated method stub
reSize(ZOOM_OUT);
}
//重置大小
private void reSize(int flag)
{
float newWidth = 0.0f,newHeight = 0.0f;
int scaleWidth = (int)(mScaleRate * mInitWidth);
int scaleHeight = (int)(mScaleRate * mInitHeight);
if(ZOOM_OUT == flag) //缩小
{
newWidth = mChart.getWidth() - scaleWidth;
newHeight = mChart.getHeight() - scaleHeight;
if(mScaleMinWidth > newWidth) newWidth = mScaleMinWidth;
if(mScaleMinHeight > newHeight) newHeight = mScaleMinHeight;
}else if(ZOOM_IN == flag){ //放大
newWidth = mChart.getWidth() + scaleWidth;
newHeight = mChart.getHeight() + scaleHeight;
}else{
Log.e(TAG, "不认识这个参数.");
return ;
}
if( Float.compare(newWidth, 0) > 0 && Float.compare(newHeight,0) > 0 )
{
mChart.setChartRange(mChart.getLeft(),mChart.getTop(), newWidth, newHeight);
mView.invalidate();
}
}
}
|
[
"jx.wang@holaverse.com"
] |
jx.wang@holaverse.com
|
7267817e2e725d90e23b60b8a1045776f950f2c8
|
eae6fb036cb14222207903f48e8329e1eae1cf94
|
/Core/src/test/java/prompto/translate/oeo/TestNative.java
|
f5445e74e1b42976022ee24620893fd579af70ee
|
[] |
no_license
|
balqeesawawde/prompto-java
|
0cd765d3d3a7e2d530efef6208037b2e0c5e018f
|
9991ed6c3f47050ad882d87bee0840fbe8754976
|
refs/heads/master
| 2023-03-13T06:37:53.919759
| 2021-03-06T16:49:15
| 2021-03-06T16:49:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,314
|
java
|
package prompto.translate.oeo;
import org.junit.Test;
import prompto.parser.o.BaseOParserTest;
public class TestNative extends BaseOParserTest {
@Test
public void testCategory() throws Exception {
compareResourceOEO("native/category.poc");
}
@Test
public void testCategoryReturn() throws Exception {
compareResourceOEO("native/categoryReturn.poc");
}
@Test
public void testMethod() throws Exception {
compareResourceOEO("native/method.poc");
}
@Test
public void testReturn() throws Exception {
compareResourceOEO("native/return.poc");
}
@Test
public void testReturnBooleanLiteral() throws Exception {
compareResourceOEO("native/returnBooleanLiteral.poc");
}
@Test
public void testReturnBooleanObject() throws Exception {
compareResourceOEO("native/returnBooleanObject.poc");
}
@Test
public void testReturnBooleanValue() throws Exception {
compareResourceOEO("native/returnBooleanValue.poc");
}
@Test
public void testReturnCharacterLiteral() throws Exception {
compareResourceOEO("native/returnCharacterLiteral.poc");
}
@Test
public void testReturnCharacterObject() throws Exception {
compareResourceOEO("native/returnCharacterObject.poc");
}
@Test
public void testReturnCharacterValue() throws Exception {
compareResourceOEO("native/returnCharacterValue.poc");
}
@Test
public void testReturnDecimalLiteral() throws Exception {
compareResourceOEO("native/returnDecimalLiteral.poc");
}
@Test
public void testReturnIntegerLiteral() throws Exception {
compareResourceOEO("native/returnIntegerLiteral.poc");
}
@Test
public void testReturnIntegerObject() throws Exception {
compareResourceOEO("native/returnIntegerObject.poc");
}
@Test
public void testReturnIntegerValue() throws Exception {
compareResourceOEO("native/returnIntegerValue.poc");
}
@Test
public void testReturnLongLiteral() throws Exception {
compareResourceOEO("native/returnLongLiteral.poc");
}
@Test
public void testReturnLongObject() throws Exception {
compareResourceOEO("native/returnLongObject.poc");
}
@Test
public void testReturnLongValue() throws Exception {
compareResourceOEO("native/returnLongValue.poc");
}
@Test
public void testReturnStringLiteral() throws Exception {
compareResourceOEO("native/returnStringLiteral.poc");
}
}
|
[
"eric.vergnaud@wanadoo.fr"
] |
eric.vergnaud@wanadoo.fr
|
dc09bafe30043a9d6f35358e7524ad0de095fb98
|
33ae45d7d4fe63f2ff56f00ab0459e13cf62a59f
|
/library/src/main/java/com/ray/library/utils/T.java
|
00b99912c9881a047366fd723ec4026f4960a1e8
|
[] |
no_license
|
Ray512512/GankDay
|
2e0d8d8d1774ef32cb6489a3803075e9ef445489
|
afff748d564c8af0f555dd18a927fa06763bcb12
|
refs/heads/master
| 2020-03-18T14:15:38.608251
| 2018-06-04T09:38:43
| 2018-06-04T09:38:45
| 134,838,689
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 979
|
java
|
package com.ray.library.utils;
import android.content.Context;
import com.ray.library.BaseApplication;
/**
* Created by Ray on 2017/5/16.
* email:1452011874@qq.com
*/
public class T {
/**
* 短暂显示Toast提示(来自String) *
*/
public static void show(Context context, String text) {
android.widget.Toast.makeText(context, text, android.widget.Toast.LENGTH_SHORT).show();
}
/**
* 短暂显示Toast提示(来自res) *
*/
public static void show(Context context, int resId) {
android.widget.Toast.makeText(context, resId, android.widget.Toast.LENGTH_SHORT).show();
}
public static void show(String text) {
android.widget.Toast.makeText(BaseApplication.getInstance(), text, android.widget.Toast.LENGTH_SHORT).show();
}
public static void show(int resId) {
android.widget.Toast.makeText(BaseApplication.getInstance(), resId, android.widget.Toast.LENGTH_SHORT).show();
}
}
|
[
"1452011874@qq.com"
] |
1452011874@qq.com
|
9c384b62cab86e683d96e784a92826213bb6b411
|
11002d1052b546105738829e1f49cff37588dba2
|
/ai.relational.orm.codegen/src/edu/neumont/schemas/orm/_2006/_04/orm/core/TooManyReadingRolesErrorType.java
|
5f57f68088252a87dae3be3236b735517bcdcd22
|
[] |
no_license
|
imbur/orm-codegen
|
2f0ddb929e364dc8945cf699ecaf08156062962c
|
962821f5ac2c55ffbc087eca6b45aa5e3dbe408c
|
refs/heads/master
| 2023-05-03T05:25:32.203415
| 2021-05-20T18:35:43
| 2021-05-20T18:35:43
| 364,452,740
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,742
|
java
|
/**
*/
package edu.neumont.schemas.orm._2006._04.orm.core;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Too Many Reading Roles Error Type</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* Reading text does not have enough placeholders for all roles.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link edu.neumont.schemas.orm._2006._04.orm.core.TooManyReadingRolesErrorType#getReading <em>Reading</em>}</li>
* </ul>
*
* @see edu.neumont.schemas.orm._2006._04.orm.core.CorePackage#getTooManyReadingRolesErrorType()
* @model extendedMetaData="name='TooManyReadingRolesErrorType' kind='elementOnly'"
* @generated
*/
public interface TooManyReadingRolesErrorType extends ModelError {
/**
* Returns the value of the '<em><b>Reading</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Reading</em>' containment reference.
* @see #setReading(ReadingRef)
* @see edu.neumont.schemas.orm._2006._04.orm.core.CorePackage#getTooManyReadingRolesErrorType_Reading()
* @model containment="true" required="true"
* extendedMetaData="kind='element' name='Reading' namespace='##targetNamespace'"
* @generated
*/
ReadingRef getReading();
/**
* Sets the value of the '{@link edu.neumont.schemas.orm._2006._04.orm.core.TooManyReadingRolesErrorType#getReading <em>Reading</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Reading</em>' containment reference.
* @see #getReading()
* @generated
*/
void setReading(ReadingRef value);
} // TooManyReadingRolesErrorType
|
[
"marton.bur@gmail.com"
] |
marton.bur@gmail.com
|
2617780943b814a6c8ae29f2c9978af71a4190e3
|
fa82ec4395e60d743314f43037770f503311ea99
|
/plugins/dummy/core/src/main/java/org/pentaho/di/be/ibridge/kettle/dummy/DummyPluginMeta.java
|
e2e3dbe116963334fc0ec4fd32fec3b8edf29cc9
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
vivostar/pentaho-kettle-webspoon-0.8.1.17
|
fb65046ee38c59ba54fdf947132e96beb1ea76b0
|
30523f66c95d9164b6dacb570a78f6a7f0e45fd0
|
refs/heads/master
| 2022-01-15T07:26:35.643881
| 2019-05-20T02:45:09
| 2019-05-20T02:45:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,600
|
java
|
/*! ******************************************************************************
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.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 org.pentaho.di.be.ibridge.kettle.dummy;
import org.eclipse.swt.widgets.*;
import org.pentaho.di.core.*;
import org.pentaho.di.core.annotations.*;
import org.pentaho.di.core.database.*;
import org.pentaho.di.core.exception.*;
import org.pentaho.di.core.row.*;
import org.pentaho.di.core.row.value.*;
import org.pentaho.di.core.variables.*;
import org.pentaho.di.core.xml.*;
import org.pentaho.di.repository.*;
import org.pentaho.di.trans.*;
import org.pentaho.di.trans.step.*;
import org.w3c.dom.*;
import java.util.List;
import java.util.*;
/*
* Created on 02-jun-2003
*
*/
@Step( id = "DummyStep",
image = "DPL.svg",
i18nPackageName = "be.ibridge.kettle.dummy",
name = "DummyPlugin.Step.Name",
description = "DummyPlugin.Step.Description",
categoryDescription = "Deprecated" )
public class DummyPluginMeta extends BaseStepMeta implements StepMetaInterface {
private ValueMetaAndData value;
public DummyPluginMeta() {
super(); // allocate BaseStepInfo
}
/**
* @return Returns the value.
*/
public ValueMetaAndData getValue() {
return value;
}
/**
* @param value The value to set.
*/
public void setValue( ValueMetaAndData value ) {
this.value = value;
}
@Override
public String getXML() throws KettleException {
String retval = "";
retval += " <values>" + Const.CR;
if ( value != null ) {
retval += value.getXML();
}
retval += " </values>" + Const.CR;
return retval;
}
@Override
public void getFields( RowMetaInterface r, String origin, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space ) {
if ( value != null ) {
ValueMetaInterface v = value.getValueMeta();
v.setOrigin( origin );
r.addValueMeta( v );
}
}
@Override
public Object clone() {
Object retval = super.clone();
return retval;
}
@Override
public void loadXML( Node stepnode, List<DatabaseMeta> databases, Map<String, Counter> counters ) throws KettleXMLException {
try {
value = new ValueMetaAndData();
Node valnode = XMLHandler.getSubNode( stepnode, "values", "value" );
if ( valnode != null ) {
System.out.println( "reading value in " + valnode );
value.loadXML( valnode );
}
} catch ( Exception e ) {
throw new KettleXMLException( "Unable to read step info from XML node", e );
}
}
@Override
public void setDefault() {
value = new ValueMetaAndData( new ValueMetaNumber( "valuename" ), new Double( 123.456 ) );
value.getValueMeta().setLength( 12 );
value.getValueMeta().setPrecision( 4 );
}
@Override
public void readRep( Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters ) throws KettleException {
try {
String name = rep.getStepAttributeString( id_step, 0, "value_name" );
String typedesc = rep.getStepAttributeString( id_step, 0, "value_type" );
String text = rep.getStepAttributeString( id_step, 0, "value_text" );
boolean isnull = rep.getStepAttributeBoolean( id_step, 0, "value_null" );
int length = (int) rep.getStepAttributeInteger( id_step, 0, "value_length" );
int precision = (int) rep.getStepAttributeInteger( id_step, 0, "value_precision" );
int type = ValueMetaFactory.getIdForValueMeta( typedesc );
value = new ValueMetaAndData( new ValueMeta( name, type ), null );
value.getValueMeta().setLength( length );
value.getValueMeta().setPrecision( precision );
if ( isnull ) {
value.setValueData( null );
} else {
ValueMetaInterface stringMeta = new ValueMetaString( name );
if ( type != ValueMetaInterface.TYPE_STRING ) {
text = Const.trim( text );
}
value.setValueData( value.getValueMeta().convertData( stringMeta, text ) );
}
} catch ( KettleDatabaseException dbe ) {
throw new KettleException( "error reading step with id_step=" + id_step + " from the repository", dbe );
} catch ( Exception e ) {
throw new KettleException( "Unexpected error reading step with id_step=" + id_step + " from the repository", e );
}
}
@Override
public void saveRep( Repository rep, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
try {
rep.saveStepAttribute( id_transformation, id_step, "value_name", value.getValueMeta().getName() );
rep.saveStepAttribute( id_transformation, id_step, 0, "value_type", value.getValueMeta().getTypeDesc() );
rep.saveStepAttribute( id_transformation, id_step, 0, "value_text", value.getValueMeta().getString( value.getValueData() ) );
rep.saveStepAttribute( id_transformation, id_step, 0, "value_null", value.getValueMeta().isNull( value.getValueData() ) );
rep.saveStepAttribute( id_transformation, id_step, 0, "value_length", value.getValueMeta().getLength() );
rep.saveStepAttribute( id_transformation, id_step, 0, "value_precision", value.getValueMeta().getPrecision() );
} catch ( KettleDatabaseException dbe ) {
throw new KettleException( "Unable to save step information to the repository, id_step=" + id_step, dbe );
}
}
@Override
public void check( List<CheckResultInterface> remarks, TransMeta transmeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info ) {
CheckResult cr;
if ( prev == null || prev.size() == 0 ) {
cr = new CheckResult( CheckResult.TYPE_RESULT_WARNING, "Not receiving any fields from previous steps!", stepMeta );
remarks.add( cr );
} else {
cr = new CheckResult( CheckResult.TYPE_RESULT_OK, "Step is connected to previous one, receiving " + prev.size() + " fields", stepMeta );
remarks.add( cr );
}
// See if we have input streams leading to this step!
if ( input.length > 0 ) {
cr = new CheckResult( CheckResult.TYPE_RESULT_OK, "Step is receiving info from other steps.", stepMeta );
remarks.add( cr );
} else {
cr = new CheckResult( CheckResult.TYPE_RESULT_ERROR, "No input received from other steps!", stepMeta );
remarks.add( cr );
}
}
public StepDialogInterface getDialog( Shell shell, StepMetaInterface meta, TransMeta transMeta, String name ) {
return new DummyPluginDialog( shell, meta, transMeta, name );
}
@Override
public StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta transMeta, Trans disp ) {
return new DummyPlugin( stepMeta, stepDataInterface, cnr, transMeta, disp );
}
@Override
public StepDataInterface getStepData() {
return new DummyPluginData();
}
}
|
[
"tlw_ray@163.com"
] |
tlw_ray@163.com
|
ccb34dcd1d2ce9decc97f1851baa646c4bad5ca0
|
d39ccf65250d04d5f7826584a06ee316babb3426
|
/wb-mmb/wb-bdb/src/main/java/org/ihtsdo/concept/component/image/ImageBinder.java
|
39776e1f935d7087f7e195d1db7ad37fbaca550d
|
[] |
no_license
|
va-collabnet-archive/workbench
|
ab4c45504cf751296070cfe423e39d3ef2410287
|
d57d55cb30172720b9aeeb02032c7d675bda75ae
|
refs/heads/master
| 2021-01-10T02:02:09.685099
| 2012-01-25T19:15:44
| 2012-01-25T19:15:44
| 47,691,158
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 443
|
java
|
package org.ihtsdo.concept.component.image;
import java.util.concurrent.atomic.AtomicInteger;
import org.ihtsdo.concept.component.ConceptComponentBinder;
public class ImageBinder extends ConceptComponentBinder<ImageRevision, Image> {
public static AtomicInteger encountered = new AtomicInteger();
public static AtomicInteger written = new AtomicInteger();
public ImageBinder() {
super(new ImageFactory(), encountered, written);
}
}
|
[
"wsmoak"
] |
wsmoak
|
ca5eb0a337d7648ad97a1c2d4bd58930212248bd
|
78322b8556677178b629460e9a870241892964eb
|
/li.strolch.agent/src/main/java/li/strolch/agent/impl/EmptyRealm.java
|
17a70e1b1543aaf774aec45bda6f0c7e3ce4e7fc
|
[
"Apache-2.0"
] |
permissive
|
taitruong/strolch
|
28ac6fa66cc9e55cf5e5bcd9b3ff7f6e2cca3f1c
|
7134e603968def9e0f513d82a44a924ac2a47d2d
|
refs/heads/master
| 2020-11-24T07:38:28.885317
| 2017-08-28T08:38:15
| 2017-08-28T08:38:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,575
|
java
|
/*
* Copyright 2013 Robert von Burg <eitch@eitchnet.ch>
*
* 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 li.strolch.agent.impl;
import java.text.MessageFormat;
import li.strolch.agent.api.ActivityMap;
import li.strolch.agent.api.AuditTrail;
import li.strolch.agent.api.ComponentContainer;
import li.strolch.agent.api.OrderMap;
import li.strolch.agent.api.ResourceMap;
import li.strolch.persistence.api.PersistenceHandler;
import li.strolch.persistence.api.StrolchTransaction;
import li.strolch.persistence.inmemory.InMemoryPersistence;
import li.strolch.privilege.model.Certificate;
import li.strolch.privilege.model.PrivilegeContext;
import li.strolch.runtime.StrolchConstants;
import li.strolch.runtime.configuration.ComponentConfiguration;
import li.strolch.utils.dbc.DBC;
/**
* @author Robert von Burg <eitch@eitchnet.ch>
*/
public class EmptyRealm extends InternalStrolchRealm {
private ResourceMap resourceMap;
private OrderMap orderMap;
private ActivityMap activityMap;
private AuditTrail auditTrail;
private PersistenceHandler persistenceHandler;
public EmptyRealm(String realm) {
super(realm);
}
@Override
public DataStoreMode getMode() {
return DataStoreMode.EMPTY;
}
@Override
public StrolchTransaction openTx(Certificate certificate, String action) {
DBC.PRE.assertNotNull("Certificate must be set!", certificate); //$NON-NLS-1$
return this.persistenceHandler.openTx(this, certificate, action);
}
@Override
public StrolchTransaction openTx(Certificate certificate, Class<?> clazz) {
DBC.PRE.assertNotNull("Certificate must be set!", certificate); //$NON-NLS-1$
return this.persistenceHandler.openTx(this, certificate, clazz.getName());
}
@Override
public ResourceMap getResourceMap() {
return this.resourceMap;
}
@Override
public OrderMap getOrderMap() {
return this.orderMap;
}
@Override
public ActivityMap getActivityMap() {
return this.activityMap;
}
@Override
public AuditTrail getAuditTrail() {
return this.auditTrail;
}
@Override
public void initialize(ComponentContainer container, ComponentConfiguration configuration) {
super.initialize(container, configuration);
this.persistenceHandler = new InMemoryPersistence(container.getPrivilegeHandler());
this.resourceMap = new TransactionalResourceMap();
this.orderMap = new TransactionalOrderMap();
String enableAuditKey = StrolchConstants.makeRealmKey(getRealm(), DefaultRealmHandler.PROP_ENABLE_AUDIT_TRAIL);
if (configuration.getBoolean(enableAuditKey, Boolean.FALSE)) {
this.auditTrail = new TransactionalAuditTrail();
logger.info("Enabling AuditTrail for realm " + getRealm()); //$NON-NLS-1$
} else {
this.auditTrail = new NoStrategyAuditTrail();
logger.info("AuditTrail is disabled for realm " + getRealm()); //$NON-NLS-1$
}
}
@Override
public void start(PrivilegeContext privilegeContext) {
logger.info(MessageFormat.format("Initialized EMPTY Realm {0}", getRealm())); //$NON-NLS-1$
}
@Override
public void stop() {
//
}
@Override
public void destroy() {
//
}
}
|
[
"eitch@eitchnet.ch"
] |
eitch@eitchnet.ch
|
6aabec63520aa93f8ed852b839ca3f6e83ad4b60
|
79595075622ded0bf43023f716389f61d8e96e94
|
/app/src/main/java/android/widget/RadioButton.java
|
c0857c7147bd0ad09cbe2d54ea1d7b30f940e4b7
|
[] |
no_license
|
dstmath/OppoR15
|
96f1f7bb4d9cfad47609316debc55095edcd6b56
|
b9a4da845af251213d7b4c1b35db3e2415290c96
|
refs/heads/master
| 2020-03-24T16:52:14.198588
| 2019-05-27T02:24:53
| 2019-05-27T02:24:53
| 142,840,716
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 877
|
java
|
package android.widget;
import android.content.Context;
import android.util.AttributeSet;
import com.android.internal.R;
public class RadioButton extends CompoundButton {
public RadioButton(Context context) {
this(context, null);
}
public RadioButton(Context context, AttributeSet attrs) {
this(context, attrs, R.attr.radioButtonStyle);
}
public RadioButton(Context context, AttributeSet attrs, int defStyleAttr) {
this(context, attrs, defStyleAttr, 0);
}
public RadioButton(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
public void toggle() {
if (!isChecked()) {
super.toggle();
}
}
public CharSequence getAccessibilityClassName() {
return RadioButton.class.getName();
}
}
|
[
"toor@debian.toor"
] |
toor@debian.toor
|
c2adf31490a99e209928727bf94977065bfd5e43
|
0fff4cd12b37d085c2b9be3a1ccd24a81f61b042
|
/src/main/java/lehjr/numina/client/config/IMeterConfig.java
|
e60b177220dabcae231863a16e969fb0922903db
|
[
"BSD-2-Clause"
] |
permissive
|
lehjr/MachineMusePowersuits
|
673e0c9ab40ff5fa220813b0c78aa99ad54cb794
|
082834036cf665a5ccdf5fe34c9e59937dce612b
|
refs/heads/1.19.2
| 2023-09-01T08:03:35.603524
| 2023-08-29T10:54:11
| 2023-08-29T10:54:11
| 323,434,512
| 11
| 9
|
NOASSERTION
| 2023-08-20T23:34:57
| 2020-12-21T19:54:53
|
Java
|
UTF-8
|
Java
| false
| false
| 310
|
java
|
package lehjr.numina.client.config;
import lehjr.numina.common.math.Color;
public interface IMeterConfig {
default float getDebugValue() {
return 0;
}
default Color getGlassColor() {
return Color.WHITE;
}
default Color getBarColor() {
return Color.WHITE;
}
}
|
[
"lehjr1@gmail.com"
] |
lehjr1@gmail.com
|
7edf058a9441ae8b83d4ba27f9bad74d75003f6d
|
23f42be278044c0840f980d7a200c9486720867b
|
/dorado-core/src/main/java/ai/houyi/dorado/spring/DoradoApplicationContext.java
|
43eb4f14b25bc74792609f6e7856ba598e5dfc8e
|
[
"Apache-2.0"
] |
permissive
|
javagossip/dorado
|
5920871c77d33cc39fdc0d630cc228d677f03a43
|
3576041f60a4763323e1c56f0a41739280822eb7
|
refs/heads/master
| 2022-08-08T20:08:47.832321
| 2022-07-31T02:34:53
| 2022-07-31T02:34:53
| 141,869,327
| 80
| 29
|
Apache-2.0
| 2022-07-31T02:34:54
| 2018-07-22T05:45:18
|
Java
|
UTF-8
|
Java
| false
| false
| 1,098
|
java
|
/*
* Copyright 2017 The OpenDSP Project
*
* The OpenDSP Project 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 ai.houyi.dorado.spring;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
/**
*
* @author wangwp
*/
public class DoradoApplicationContext extends AnnotationConfigApplicationContext {
private final DoradoClassPathBeanDefinitionScanner scanner;
public DoradoApplicationContext(String... basePackages) {
scanner = new DoradoClassPathBeanDefinitionScanner(this);
scanner.scan(basePackages);
refresh();
}
}
|
[
"javagossip@gmail.com"
] |
javagossip@gmail.com
|
be17699013de4b31e62764831742c031c01c6644
|
5194981697a363648cb049b8176e730cb61cccbd
|
/OCP8Apress/src/mock/QX14.java
|
68c26f833b3a0d9b531eb87026f521c2bff49c9a
|
[] |
no_license
|
demirramazan/OCP8
|
1b91d52c98dbf28946dddb87798be8af7a4db0c6
|
ec21bd4c0afba467f1e6084756a090b04a5ffbc8
|
refs/heads/master
| 2020-03-29T02:08:29.972513
| 2018-06-16T19:19:30
| 2018-06-16T19:19:30
| 149,422,202
| 1
| 0
| null | 2018-09-19T09:01:23
| 2018-09-19T09:01:22
| null |
UTF-8
|
Java
| false
| false
| 461
|
java
|
package mock;
class WildCard {
interface BI {
}
interface DI extends BI {
}
interface DDI extends DI {
}
static class C<T> {
}
static void foo(C<? super DI> arg) {
}
@SuppressWarnings({ "rawtypes", "unchecked" })
public static void main(String[] args) {
foo(new C<BI>()); // ONE
foo(new C<DI>()); // TWO
//foo(new C<DDI>()); // THREE //Compiler error
foo(new C()); // FOUR
}
}
public class QX14 {
}
|
[
"erguder.levent@gmail.com"
] |
erguder.levent@gmail.com
|
1c389c82cc6bda0e839558de403742e9cae8a2ff
|
2122d24de66635b64ec2b46a7c3f6f664297edc4
|
/spring/spring-mvc/spring-mvc-java-config-example/src/main/java/com/memorynotfound/config/ServletInitializer.java
|
3df6f71b1da783cf95488567169e4f818fdec95e
|
[] |
no_license
|
yiminyangguang520/Java-Learning
|
8cfecc1b226ca905c4ee791300e9b025db40cc6a
|
87ec6c09228f8ad3d154c96bd2a9e65c80fc4b25
|
refs/heads/master
| 2023-01-10T09:56:29.568765
| 2022-08-29T05:56:27
| 2022-08-29T05:56:27
| 92,575,777
| 5
| 1
| null | 2023-01-05T05:21:02
| 2017-05-27T06:16:40
|
Java
|
UTF-8
|
Java
| false
| false
| 541
|
java
|
package com.memorynotfound.config;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
/**
* @author min
*/
public class ServletInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
@Override
protected Class<?>[] getServletConfigClasses() {
return new Class[]{WebConfig.class};
}
@Override
protected String[] getServletMappings() {
return new String[]{"/"};
}
@Override
protected Class<?>[] getRootConfigClasses() {
return null;
}
}
|
[
"litz-a@glodon.com"
] |
litz-a@glodon.com
|
9a191b89accecfe6a96fe27c0625c2c3698927b5
|
258b7af0e87c46b94450edc12e73f120e97d817e
|
/services/sample-service/sample-service-portlet/src/main/java/org/xcolab/services/sample/service/impl/SampleEntityServiceImpl.java
|
a80e47ee9c279316fb45338059d299c7d3e9efb3
|
[
"MIT"
] |
permissive
|
csaladenes/XCoLab
|
8d04d8b852a5153e9b6521b04bf59f3866a85cd3
|
680dae4738df0a2b8d5c27adb9a5a3a33b5d0c23
|
refs/heads/master
| 2021-01-16T21:10:30.355609
| 2014-12-16T23:31:20
| 2014-12-16T23:31:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,092
|
java
|
package org.xcolab.services.sample.service.impl;
import org.xcolab.services.sample.service.base.SampleEntityServiceBaseImpl;
/**
* The implementation of the sample entity remote service.
*
* <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.xcolab.services.sample.service.SampleEntityService} interface.
*
* <p>
* This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
* </p>
*
* @author Brian Wing Shun Chan
* @see org.xcolab.services.sample.service.base.SampleEntityServiceBaseImpl
* @see org.xcolab.services.sample.service.SampleEntityServiceUtil
*/
public class SampleEntityServiceImpl extends SampleEntityServiceBaseImpl {
/*
* NOTE FOR DEVELOPERS:
*
* Never reference this interface directly. Always use {@link org.xcolab.services.sample.service.SampleEntityServiceUtil} to access the sample entity remote service.
*/
}
|
[
"janusz.parfieniuk@gmail.com"
] |
janusz.parfieniuk@gmail.com
|
b2f223c4300bb97090e097c7dc5934f0a4c36961
|
5b55c12f1e60ea2c0f094bf6e973e9150bbda57f
|
/cloudviewservice_device/src/main/java/com/ssitcloud/view/sysmgmt/service/impl/DataBaseServiceImpl.java
|
e9184c3549384116a6e139964ff10795aeb78900
|
[] |
no_license
|
huguodong/Cloud-4
|
f18a8f471efbb2167e639e407478bf808d1830c2
|
3facaf5fc3d585c938ecc93e89a6a4a7d35e5bcc
|
refs/heads/master
| 2020-03-27T22:59:41.109723
| 2018-08-24T01:42:39
| 2018-08-24T01:43:04
| 147,279,899
| 0
| 0
| null | 2018-09-04T02:54:28
| 2018-09-04T02:54:28
| null |
UTF-8
|
Java
| false
| false
| 2,636
|
java
|
package com.ssitcloud.view.sysmgmt.service.impl;
import org.springframework.stereotype.Service;
import com.ssitcloud.common.entity.ResultEntity;
import com.ssitcloud.view.common.service.impl.BasicServiceImpl;
import com.ssitcloud.view.sysmgmt.service.DataBaseService;
@Service
public class DataBaseServiceImpl extends BasicServiceImpl implements DataBaseService{
public static final String URL_backUp="backUp";
public static final String URL_queryDbBakByparam="queryDbBakByparam";
private static final String URL_deleteBakup = "deleteBakup";
private static final String URL_getLastBakUpTime = "getLastBakUpTime";
private static final String URL_restoreBakup = "restoreBakup";
private static final String URL_getMongodbNames = "getMongodbNames";
private static final String URL_bakupByLibraryIdx = "bakupByLibraryIdx";
private static final String URL_restoreDataByLibraryIdx = "restoreDataByLibraryIdx";
private static final String URL_queryLibraryDbBakByparamExt = "queryLibraryDbBakByparamExt";
private static final String URL_checkBakUpFileIfExsit = "checkBakUpFileIfExsit";
private static final String URL_deleteLibBakup = "deleteLibBakup";
private static final String URL_getLastLibBakUpTime = "getLastLibBakUpTime";
@Override
public ResultEntity backUp(String req) {
return postUrlLongTimeout(URL_backUp, req);
}
@Override
public ResultEntity queryDbBakByparam(String req) {
return postUrl(URL_queryDbBakByparam, req);
}
@Override
public ResultEntity deleteBakup(String req) {
return postUrl(URL_deleteBakup, req);
}
@Override
public ResultEntity getLastBakUpTime(String req) {
return postUrl(URL_getLastBakUpTime, req);
}
@Override
public ResultEntity restoreBakup(String req) {
return postUrlLongTimeout(URL_restoreBakup, req);
}
@Override
public ResultEntity getMongodbNames(String req) {
return postUrl(URL_getMongodbNames, req);
}
@Override
public ResultEntity bakupByLibraryIdx(String req) {
return postUrl(URL_bakupByLibraryIdx, req);
}
@Override
public ResultEntity restoreDataByLibraryIdx(String req) {
return postUrlLongTimeout(URL_restoreDataByLibraryIdx, req);
}
@Override
public ResultEntity queryLibraryDbBakByparamExt(String req) {
return postUrl(URL_queryLibraryDbBakByparamExt, req);
}
@Override
public ResultEntity checkBakUpFileIfExsit(String req) {
return postUrl(URL_checkBakUpFileIfExsit, req);
}
@Override
public ResultEntity deleteLibBakup(String req) {
return postUrl(URL_deleteLibBakup, req);
}
@Override
public ResultEntity getLastLibBakUpTime(String req) {
return postUrl(URL_getLastLibBakUpTime, req);
}
}
|
[
"chenkun141@163com"
] |
chenkun141@163com
|
39bacbe7bbc9b33dcf661e066d67d1e78aff2eed
|
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
|
/project34/src/main/java/org/gradle/test/performance/largejavamultiproject/project34/p170/Production3403.java
|
ebf9fba0d2c984ef6ce2d3878c60d34707da8a34
|
[] |
no_license
|
big-guy/largeJavaMultiProject
|
405cc7f55301e1fd87cee5878a165ec5d4a071aa
|
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
|
refs/heads/main
| 2023-03-17T10:59:53.226128
| 2021-03-04T01:01:39
| 2021-03-04T01:01:39
| 344,307,977
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,959
|
java
|
package org.gradle.test.performance.largejavamultiproject.project34.p170;
public class Production3403 {
private Production3400 property0;
public Production3400 getProperty0() {
return property0;
}
public void setProperty0(Production3400 value) {
property0 = value;
}
private Production3401 property1;
public Production3401 getProperty1() {
return property1;
}
public void setProperty1(Production3401 value) {
property1 = value;
}
private Production3402 property2;
public Production3402 getProperty2() {
return property2;
}
public void setProperty2(Production3402 value) {
property2 = value;
}
private String property3;
public String getProperty3() {
return property3;
}
public void setProperty3(String value) {
property3 = value;
}
private String property4;
public String getProperty4() {
return property4;
}
public void setProperty4(String value) {
property4 = value;
}
private String property5;
public String getProperty5() {
return property5;
}
public void setProperty5(String value) {
property5 = value;
}
private String property6;
public String getProperty6() {
return property6;
}
public void setProperty6(String value) {
property6 = value;
}
private String property7;
public String getProperty7() {
return property7;
}
public void setProperty7(String value) {
property7 = value;
}
private String property8;
public String getProperty8() {
return property8;
}
public void setProperty8(String value) {
property8 = value;
}
private String property9;
public String getProperty9() {
return property9;
}
public void setProperty9(String value) {
property9 = value;
}
}
|
[
"sterling.greene@gmail.com"
] |
sterling.greene@gmail.com
|
02415494c761b59dbc227d23a99eb6dadfab5bd2
|
c908d6a58a7e79f684f9d430fa39ba34f8a320c8
|
/eclipse/portal/plugins/com.liferay.ide.eclipse.taglib.ui/src/com/liferay/ide/eclipse/taglib/ui/snippets/AlloyTagItemHelper.java
|
24ea1e2396cc3cf6820d88f39bab267b602e8634
|
[] |
no_license
|
admhouss/liferay-ide
|
b2f08294c6ac5d8dc909b97236f3006cd1f734e5
|
3b8b0bf1b98cd79b8dc794c4bd4fe4dc086fde34
|
refs/heads/master
| 2021-01-18T08:36:01.718248
| 2012-10-12T06:21:24
| 2012-10-12T06:21:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,929
|
java
|
/*******************************************************************************
* Copyright (c) 2004, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package com.liferay.ide.eclipse.taglib.ui.snippets;
import com.liferay.ide.eclipse.core.util.CoreUtil;
import com.liferay.ide.eclipse.taglib.ui.TaglibUI;
import com.liferay.ide.eclipse.taglib.ui.model.ITag;
import com.liferay.ide.eclipse.ui.snippets.SnippetsUIPlugin;
import java.io.File;
import java.io.StringWriter;
import java.net.URL;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.jface.window.Window;
import org.eclipse.sapphire.modeling.xml.RootXmlResource;
import org.eclipse.sapphire.modeling.xml.XmlResourceStore;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.wst.common.snippets.core.ISnippetItem;
import org.eclipse.wst.common.snippets.core.ISnippetsEntry;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.json.JSONObject;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
/**
* Class copied from VariableItemHelper.java v1.4
*
* @author Greg Amerson
*/
@SuppressWarnings("restriction")
public class AlloyTagItemHelper {
public static String getInsertString(Shell host, ISnippetItem item, IEditorInput editorInput) {
return getInsertString(host, item, editorInput, true);
}
public static String getInsertString(final Shell host, ISnippetItem item, IEditorInput editorInput, boolean clearModality) {
if (item == null)
return ""; //$NON-NLS-1$
String insertString = null;
ITag model = getTagModel(editorInput, item);
AlloyTagInsertDialog dialog =
new AlloyTagInsertDialog( host, model, TaglibUI.PLUGIN_ID +
"/com/liferay/ide/eclipse/taglib/ui/snippets/AlloyTag.sdef!tagInsertDialog", clearModality );
// VariableInsertionDialog dialog = new TaglibVariableInsertionDialog(host, clearModality);
// dialog.setItem(item);
// The editor itself influences the insertion's actions, so we
// can't
// allow the active editor to be changed.
// Disabling the parent shell achieves psuedo-modal behavior
// without
// locking the UI under Linux
int result = Window.CANCEL;
try {
if (clearModality) {
host.setEnabled(false);
dialog.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent arg0) {
/*
* The parent shell must be reenabled when the dialog disposes, otherwise it won't automatically
* receive focus.
*/
host.setEnabled(true);
}
});
}
result = dialog.open();
}
catch (Exception t) {
SnippetsUIPlugin.logError(t);
}
finally {
if (clearModality) {
host.setEnabled(true);
}
}
if (result == Window.OK) {
insertString = dialog.getPreparedText();
}
else {
insertString = null;
}
return insertString;
}
private static ITag getTagModel(IEditorInput editorInput, ISnippetsEntry item) {
if (!(editorInput instanceof IFileEditorInput) || item == null) {
return null;
}
IFile tldFile = null;
XmlResourceStore store = null;
IFile editorFile = ((IFileEditorInput) editorInput).getFile();
Document tldDocument = null;
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
tldFile = CoreUtil.getDocroot(editorFile.getProject()).getFile("WEB-INF/tld/alloy.tld");
if (tldFile.exists()) {
try {
IDOMModel tldModel = (IDOMModel) StructuredModelManager.getModelManager().getModelForRead( tldFile );
tldDocument = tldModel.getDocument();
}
catch (Exception e) {
SnippetsUIPlugin.logError(e);
}
}
else {
// read alloy from plugin
try {
URL alloyURL = FileLocator.toFileURL( TaglibUI.getDefault().getBundle().getEntry( "deps/alloy.tld" ) );
File alloyFile = new File(alloyURL.getFile());
tldDocument = docFactory.newDocumentBuilder().parse(alloyFile);
}
catch (Exception e) {
SnippetsUIPlugin.logError(e);
}
}
if (tldDocument == null) {
return null;
}
try {
NodeList tags = tldDocument.getElementsByTagName("tag");
Element alloyTag = null;
for (int i = 0; i < tags.getLength(); i++) {
Element tag = (Element) tags.item(i);
NodeList children = tag.getElementsByTagName("name");
if (children.getLength() > 0) {
String name = children.item(0).getChildNodes().item(0).getNodeValue();
if (item.getLabel().equals(name)) {
alloyTag = tag;
break;
}
}
}
if (alloyTag == null) {
return null;
}
// build XML model to be used by sapphire dialog
DocumentBuilder newDocumentBuilder = docFactory.newDocumentBuilder();
Document doc = newDocumentBuilder.newDocument();
Element destTag = doc.createElement("tag");
Element name = doc.createElement("name");
name.appendChild(doc.createTextNode(item.getLabel()));
destTag.appendChild(name);
Element prefix = doc.createElement("prefix");
prefix.appendChild(doc.createTextNode("alloy"));
destTag.appendChild(prefix);
Element required = (Element) destTag.appendChild(doc.createElement("required"));
Element events = (Element) destTag.appendChild(doc.createElement("events"));
Element other = (Element) destTag.appendChild(doc.createElement("other"));
NodeList attrs = alloyTag.getElementsByTagName("attribute");
for (int i = 0; i < attrs.getLength(); i++) {
try {
Element attr = (Element) attrs.item(i);
String desc =
( (Element) attr.getElementsByTagName( "description" ).item( 0 ) ).getFirstChild().getNodeValue();
String json = desc.substring(desc.indexOf("<!--") + 4, desc.indexOf("-->"));
JSONObject jsonObject = new JSONObject(json);
Node newAttr = null;
if (jsonObject.getBoolean("required")) {
newAttr = required.appendChild(doc.importNode(attr, true));
}
else if (jsonObject.getBoolean("event")) {
newAttr = events.appendChild(doc.importNode(attr, true));
}
else {
newAttr = other.appendChild(doc.importNode(attr, true));
}
if (jsonObject.has("defaultValue")) {
Element defaultValElement = doc.createElement("default-value");
defaultValElement.appendChild(doc.createTextNode(jsonObject.get("defaultValue").toString()));
newAttr.appendChild(defaultValElement);
}
}
catch (Exception e) {
TaglibUI.logError( e );
}
}
doc.appendChild(destTag);
Transformer trans = TransformerFactory.newInstance().newTransformer();
trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
// create string from xml tree
StringWriter sw = new StringWriter();
StreamResult result = new StreamResult(sw);
DOMSource source = new DOMSource(doc);
trans.transform(source, result);
String xmlString = sw.toString();
store = new XmlResourceStore(xmlString.getBytes());
}
catch (Exception e) {
TaglibUI.logError( e );
}
return ITag.TYPE.instantiate(new RootXmlResource(store));
}
}
|
[
"gregory.amerson@liferay.com"
] |
gregory.amerson@liferay.com
|
de84ca73a2cd55b5b74d7a16188faa1ff7624007
|
9208ba403c8902b1374444a895ef2438a029ed5c
|
/sources/org/msgpack/core/buffer/ArrayBufferOutput.java
|
3833e526d27a1a80c3e14c46b2501cb17a3950ed
|
[] |
no_license
|
MewX/kantv-decompiled-v3.1.2
|
3e68b7046cebd8810e4f852601b1ee6a60d050a8
|
d70dfaedf66cdde267d99ad22d0089505a355aa1
|
refs/heads/main
| 2023-02-27T05:32:32.517948
| 2021-02-02T13:38:05
| 2021-02-02T13:44:31
| 335,299,807
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,441
|
java
|
package org.msgpack.core.buffer;
import java.util.ArrayList;
import java.util.List;
public class ArrayBufferOutput implements MessageBufferOutput {
private final int bufferSize;
private MessageBuffer lastBuffer;
private final List<MessageBuffer> list;
public void close() {
}
public void flush() {
}
public ArrayBufferOutput() {
this(8192);
}
public ArrayBufferOutput(int i) {
this.bufferSize = i;
this.list = new ArrayList();
}
public int getSize() {
int i = 0;
for (MessageBuffer size : this.list) {
i += size.size();
}
return i;
}
public byte[] toByteArray() {
byte[] bArr = new byte[getSize()];
int i = 0;
for (MessageBuffer messageBuffer : this.list) {
messageBuffer.getBytes(0, bArr, i, messageBuffer.size());
i += messageBuffer.size();
}
return bArr;
}
public MessageBuffer toMessageBuffer() {
if (this.list.size() == 1) {
return (MessageBuffer) this.list.get(0);
}
if (this.list.isEmpty()) {
return MessageBuffer.allocate(0);
}
return MessageBuffer.wrap(toByteArray());
}
public List<MessageBuffer> toBufferList() {
return new ArrayList(this.list);
}
public void clear() {
this.list.clear();
}
public MessageBuffer next(int i) {
MessageBuffer messageBuffer = this.lastBuffer;
if (messageBuffer != null && messageBuffer.size() > i) {
return this.lastBuffer;
}
MessageBuffer allocate = MessageBuffer.allocate(Math.max(this.bufferSize, i));
this.lastBuffer = allocate;
return allocate;
}
public void writeBuffer(int i) {
this.list.add(this.lastBuffer.slice(0, i));
if (this.lastBuffer.size() - i > this.bufferSize / 4) {
MessageBuffer messageBuffer = this.lastBuffer;
this.lastBuffer = messageBuffer.slice(i, messageBuffer.size() - i);
return;
}
this.lastBuffer = null;
}
public void write(byte[] bArr, int i, int i2) {
MessageBuffer allocate = MessageBuffer.allocate(i2);
allocate.putBytes(0, bArr, i, i2);
this.list.add(allocate);
}
public void add(byte[] bArr, int i, int i2) {
this.list.add(MessageBuffer.wrap(bArr, i, i2));
}
}
|
[
"xiayuanzhong@gmail.com"
] |
xiayuanzhong@gmail.com
|
57fbdf19402c737980f33ccd72527085a5ac77ef
|
a93a0b282e7a6281d3188b9549e070f993bb33e1
|
/modules/basic/basic-api/src/main/java/basic/exception/NoSuchEventFAQsException.java
|
3184da29d10a219e7c08a63867bbc97c85ac1fd4
|
[] |
no_license
|
micha-mn/youth
|
e12e15d8a1c0e644ecca8b2b36971cc556261884
|
3044dd068a4a5ef770a08c4ad9c8fdd42febf604
|
refs/heads/master
| 2020-09-25T00:48:28.565275
| 2019-12-09T11:37:08
| 2019-12-09T11:37:08
| 225,882,323
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,129
|
java
|
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package basic.exception;
import org.osgi.annotation.versioning.ProviderType;
import com.liferay.portal.kernel.exception.NoSuchModelException;
/**
* @author Brian Wing Shun Chan
*/
@ProviderType
public class NoSuchEventFAQsException extends NoSuchModelException {
public NoSuchEventFAQsException() {
}
public NoSuchEventFAQsException(String msg) {
super(msg);
}
public NoSuchEventFAQsException(String msg, Throwable cause) {
super(msg, cause);
}
public NoSuchEventFAQsException(Throwable cause) {
super(cause);
}
}
|
[
"m.nassar@everteam-gs.com"
] |
m.nassar@everteam-gs.com
|
1be87de1dd462bcdd5aebcb836deb4505d922d2c
|
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
|
/classes5/com/tencent/mobileqq/filemanager/data/WeiYunFileInfo.java
|
50aa6f52c66bcd1c26a0ff4283f7f47d5a893b28
|
[] |
no_license
|
meeidol-luo/qooq
|
588a4ca6d8ad579b28dec66ec8084399fb0991ef
|
e723920ac555e99d5325b1d4024552383713c28d
|
refs/heads/master
| 2020-03-27T03:16:06.616300
| 2016-10-08T07:33:58
| 2016-10-08T07:33:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,471
|
java
|
package com.tencent.mobileqq.filemanager.data;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import com.tencent.mobileqq.hotpatch.NotVerifyClass;
import sbc;
public class WeiYunFileInfo
implements Parcelable
{
public static final Parcelable.Creator CREATOR = new sbc();
public static final int a = 0;
public static final int b = 1;
public long a;
public String a;
public long b;
public String b;
public int c;
public String c;
public int d;
public String d;
public String e;
public String f;
public String g;
public String h;
static
{
boolean bool = NotVerifyClass.DO_VERIFY_CLASS;
}
public WeiYunFileInfo()
{
this.jdField_c_of_type_Int = 0;
}
public WeiYunFileInfo(Parcel paramParcel)
{
this.jdField_c_of_type_Int = 0;
this.jdField_a_of_type_JavaLangString = paramParcel.readString();
this.jdField_b_of_type_JavaLangString = paramParcel.readString();
this.jdField_a_of_type_Long = paramParcel.readLong();
this.jdField_b_of_type_Long = paramParcel.readLong();
this.jdField_c_of_type_Int = paramParcel.readInt();
this.jdField_c_of_type_JavaLangString = paramParcel.readString();
this.jdField_d_of_type_Int = paramParcel.readInt();
this.jdField_d_of_type_JavaLangString = paramParcel.readString();
this.e = paramParcel.readString();
this.f = paramParcel.readString();
this.g = paramParcel.readString();
this.h = paramParcel.readString();
}
public int describeContents()
{
return 0;
}
public void writeToParcel(Parcel paramParcel, int paramInt)
{
paramParcel.writeString(this.jdField_a_of_type_JavaLangString);
paramParcel.writeString(this.jdField_b_of_type_JavaLangString);
paramParcel.writeLong(this.jdField_a_of_type_Long);
paramParcel.writeLong(this.jdField_b_of_type_Long);
paramParcel.writeInt(this.jdField_c_of_type_Int);
paramParcel.writeString(this.jdField_c_of_type_JavaLangString);
paramParcel.writeInt(this.jdField_d_of_type_Int);
paramParcel.writeString(this.jdField_d_of_type_JavaLangString);
paramParcel.writeString(this.e);
paramParcel.writeString(this.f);
paramParcel.writeString(this.g);
paramParcel.writeString(this.h);
}
}
/* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\com\tencent\mobileqq\filemanager\data\WeiYunFileInfo.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
1ecb8835223256c212cbfbabd6adec1b7f5f5f43
|
036f37aa941bcecf86941704a74682a95cdb3002
|
/i_PlusOne/src/i_PlusOne/Solution.java
|
d8edff7c1c25e880cdd81a2c6a07d24eba7560bd
|
[] |
no_license
|
mbhushan/injava
|
98999b0e9e0619a7b23694aa4c8b539b8434df1e
|
36afa016fc8e62ee532c385b08e35fb625dc5473
|
refs/heads/master
| 2020-05-31T02:45:36.452691
| 2016-08-24T00:36:35
| 2016-08-24T00:36:35
| 29,081,399
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,276
|
java
|
package i_PlusOne;
import java.util.ArrayList;
public class Solution {
public static ArrayList<Integer> plusOne(ArrayList<Integer> a) {
int n = a.size();
long number = 0;
int carry = 1;
int len = 0;
for (int i=n-1; i>=0; i--) {
int s = a.get(i);
s = s + carry;
if (s > 9) {
s = 0;
carry = 1;
} else {
carry = 0;
}
a.set(i, s);
++len;
}
ArrayList<Integer> result = new ArrayList();
int index = 0;
if (carry == 1) {
result.add(carry);
} else {
while (a.get(index) == 0) {
++index;
}
}
System.out.println("index: " + index);
System.out.println("n: " + n);
for (int i=index; i<n; i++) {
// System.out.println("len: " + len);
result.add(a.get(i));
}
return result;
}
public static void main(String [] args) {
// int [] A = {0,0,1,2,3};
// int [] A = { 3, 0, 6, 4, 0 };
// int [] A = {9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
// int [] A = {0, 0, 9, 9, 9};
int [] A = { 9, 9, 9, 9, 9 };
ArrayList<Integer> X = new ArrayList();
for (int index = 0; index < A.length; index++) {
X.add(A[index]);
}
X = plusOne(X);
for (int i=0; i<X.size(); i++) {
System.out.print(X.get(i) + " ");
}
System.out.println();
}
}
|
[
"manibhushan.cs@gmail.com"
] |
manibhushan.cs@gmail.com
|
4c7e3d8421b1e7fbca6b9f582d37be352dd036fd
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/32/32_92b15ff5c9a30124d7703b0429973ee203fd05ea/PaymentWindow/32_92b15ff5c9a30124d7703b0429973ee203fd05ea_PaymentWindow_t.java
|
0a52d3a7c1829ac7d65a8ad8221284a282abff19
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,248
|
java
|
package ee.ut.math.tvt.sinys;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import org.apache.log4j.Logger;
import ee.ut.math.tvt.salessystem.domain.controller.SalesDomainController;
import ee.ut.math.tvt.salessystem.domain.data.Order;
import ee.ut.math.tvt.salessystem.domain.data.SoldItem;
import ee.ut.math.tvt.salessystem.ui.model.SalesSystemModel;
import ee.ut.math.tvt.salessystem.ui.tabs.PurchaseTab;
public class PaymentWindow extends JFrame {
/**
*
*/
private static final long serialVersionUID = 1L;
private static final Logger log = Logger.getLogger(PurchaseTab.class);
private JTextField paymentAmount;
private SalesDomainController domainController;
private final SalesSystemModel model;
private List<SoldItem> rows;
private double sum;
private double change = 0.0;
private JPanel textPanel;
private JLabel changeValue;
private JButton acceptButton;
private JButton cancelButton;
public JLabel allDone;
public PaymentWindow(final SalesSystemModel model) {
this.model = model;
int width = 200;
int height = 150;
allDone = new JLabel();
rows = model.getCurrentPurchaseTableModel().getTableRows();
for (SoldItem item : rows) {
sum += item.getSum();
}
textPanel = new JPanel();
textPanel.setLayout(new GridLayout(4, 3));
add(textPanel);
JLabel sumLabel = new JLabel("Order sum: ");
textPanel.add(sumLabel);
JLabel sumValue = new JLabel(String.valueOf(Math.round( sum * 100.0 ) / 100.0));
textPanel.add(sumValue);
JLabel changeLabel = new JLabel("Change:");
textPanel.add(changeLabel);
changeValue = new JLabel(String.valueOf(change), 10);
textPanel.add(changeValue);
paymentAmount = new JTextField(15);
paymentAmount.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void removeUpdate(DocumentEvent e) {
updateChangeValue();
}
@Override
public void insertUpdate(DocumentEvent e) {
updateChangeValue();
}
@Override
public void changedUpdate(DocumentEvent e) {
updateChangeValue();
}
});
textPanel.add(paymentAmount);
JLabel emptyLabel = new JLabel("");
textPanel.add(emptyLabel);
acceptButton = new JButton("Accept");
acceptButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (change >= 0) {
submitCurrentPurchase(model.getCurrentPurchaseTableModel()
.getTableRows());
} else {
JOptionPane.showMessageDialog(getRootPane(),
"Enter value greater or equal to amount to pay",
"Attention", JOptionPane.ERROR_MESSAGE, null);
}
}
});
textPanel.add(acceptButton);
cancelButton = new JButton("Cancel");
cancelButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
cancelCurrentPurchase();
}
});
textPanel.add(cancelButton);
setTitle("Payment information");
setSize(width, height);
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
setLocation((screen.width - width) / 2, (screen.height - height) / 2);
setVisible(true);
}
public void updateChangeValue() {
try {
double payment = Double.parseDouble(paymentAmount.getText());
change = payment - sum;
change=Math.round( change * 100.0 ) / 100.0;
} catch (Exception e1) {
e1.getMessage();
}
changeValue.setText(String.valueOf(change));
}
public void submitCurrentPurchase(List<SoldItem> goods) {
float price = 0;
for (int i = 0; i < goods.size(); i++) {
price += goods.get(i).getSum();
model.getWarehouseTableModel().decrementItemQuantityById(
goods.get(i).getId(), goods.get(i).getQuantity());
}
model.getCurrentPurchaseTableModel().addItemsToDB();
model.getWarehouseTableModel().fireTableDataChanged();
model.getDomainController().saveWarehouseState(
model.getWarehouseTableModel().getTableRows());
model.updateWarehouseTableModel();
model.getWarehouseTableModel().fireTableDataChanged();
price=(float) (Math.round( price * 100.0 ) / 100.0);
Order o = new Order(model.getHistoryTableModel().getRowCount() + 1,
price, goods);
model.getHistoryTableModel().addItem(o);
allDone.setText("done");
reset();
this.setVisible(false);
this.dispose();// TODO fix
}
public void reset() {
paymentAmount.setText("");
changeValue.setText("");
change = 0;
}
public void cancelCurrentPurchase() {
this.setVisible(false);
reset();
// List<SoldItem> goods = model.getCurrentPurchaseTableModel().getTableRows();
// for (int i = 0; i < goods.size(); i++) {
// model.getWarehouseTableModel().incrementItemQuantityById(
// goods.get(i).getId(), goods.get(i).getQuantity());
// }
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d622feabac9452717a43aba5c6d4e36437bec100
|
e6d7727f309768b5987bc3976f9a4f60c79833a2
|
/common/src/main/java/applications/tools/randomNumberGenerator.java
|
f5206f338c17b0bf97cf409edafa2e4eee50aefb
|
[
"Apache-2.0"
] |
permissive
|
aqifhamid786/briskstream
|
2eab0b2c5789b1978c5bffb8e821dbf1a21e30d2
|
05c591f6df59c6e06797c58eb431a52d160bc724
|
refs/heads/master
| 2023-05-09T21:53:46.263197
| 2019-06-23T15:24:44
| 2019-06-23T15:24:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 367
|
java
|
package applications.tools;
import java.util.Random;
/**
* Created by I309939 on 7/29/2016.
*/
public class randomNumberGenerator {
public static int generate(int min, int max) {
final Random rn = new Random(System.nanoTime());
int result = rn.nextInt(max - min + 1) + min;
//System.out.println(result);
return result;
}
}
|
[
"IDSZS@nus.edu.sg"
] |
IDSZS@nus.edu.sg
|
0397b53bdb43e4784040c76c02b8486be54ad40e
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/jdbi/learning/4480/QueryTimeOutFactory.java
|
989c9414c063c24a3c7e0ba54f96aac32731ba8e
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,104
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jdbi.v3.sqlobject.customizer.internal;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
import java.lang.reflect.Type;
import org.jdbi.v3.sqlobject.customizer.QueryTimeOut;
import org.jdbi.v3.sqlobject.customizer.SqlStatementCustomizer;
import org.jdbi.v3.sqlobject.customizer.SqlStatementCustomizerFactory;
import org.jdbi.v3.sqlobject.customizer.SqlStatementParameterCustomizer;
public class QueryTimeOutFactory implements SqlStatementCustomizerFactory {
@Override
public SqlStatementCustomizer createForType(Annotation annotation, Class<?> sqlObjectType) {
int queryTimeout = ((QueryTimeOut) annotation).value();
return stmt -> stmt.setQueryTimeout(queryTimeout);
}
@Override
public SqlStatementCustomizer createForMethod(Annotation annotation, Class<?> sqlObjectType, Method method) {
return createForType(annotation, sqlObjectType);
}
@Override
public SqlStatementParameterCustomizer createForParameter(Annotation annotation,
Class<?> sqlObjectType,
Method method,
Parameter param,
int index,
Type type) {
return (stmt, queryTimeout) ->stmt.setQueryTimeout((Integer) queryTimeout);
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
8fc79c33b1d3b33b7371028ecc939f66e0c5777b
|
533ff159f125813460432c8d43956788e6da045f
|
/Chintha/ChinthaAdmin/app/src/main/java/com/chintha_admin/ConnectionDetecter.java
|
b6181d2f4bbd38883e90a976da7ab17fe66bf43c
|
[] |
no_license
|
AitoApps/AndroidWorks
|
7747b084e84b8ad769f4552e8b2691d9cdec3f06
|
3c6c7d17f085ee3aa714e66f13fec2a4d8663ca3
|
refs/heads/master
| 2022-03-14T10:57:59.215113
| 2019-12-06T17:03:24
| 2019-12-06T17:03:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 895
|
java
|
package com.chintha_admin;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.NetworkInfo.State;
public class ConnectionDetecter {
private Context _context;
public ConnectionDetecter(Context context) {
_context = context;
}
public boolean isConnectingToInternet() {
ConnectivityManager connectivity = (ConnectivityManager) _context.getSystemService(Context.CONNECTIVITY_SERVICE);
if (connectivity != null) {
NetworkInfo[] info = connectivity.getAllNetworkInfo();
if (info != null) {
for (NetworkInfo state : info) {
if (state.getState() == State.CONNECTED) {
return true;
}
}
}
}
return false;
}
}
|
[
"me.salmanponnani@gmail.com"
] |
me.salmanponnani@gmail.com
|
3fb3a40fd07990e7e103e9a6073ba3f1a5ba72f0
|
5a940a1f038e03869a0934ebb3d684731face903
|
/src/main/java/com/mossle/api/store/StoreConnector.java
|
a11cfc38ec0b1a8a10c397d99abf813daf1ade57
|
[] |
no_license
|
zhiqinghuang/SmartPlatform
|
3a92f2b59fed40665396e5c2de80392ed51cab97
|
995e13d57989ec505c730a39ffff38c23342f178
|
refs/heads/master
| 2022-12-23T08:46:40.881068
| 2020-12-04T03:32:54
| 2020-12-04T03:32:54
| 45,810,484
| 0
| 1
| null | 2022-12-16T01:17:38
| 2015-11-09T02:35:55
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 481
|
java
|
package com.mossle.api.store;
import javax.activation.DataSource;
public interface StoreConnector {
StoreDTO saveStore(String model, DataSource dataSource, String tenantId) throws Exception;
StoreDTO saveStore(String model, String key, DataSource dataSource, String tenantId) throws Exception;
StoreDTO getStore(String model, String key, String tenantId) throws Exception;
void removeStore(String model, String key, String tenantId) throws Exception;
}
//need to confirm
|
[
"beahuang@hotmail.com"
] |
beahuang@hotmail.com
|
f86fdc4b863f73273807080985599f638851e06a
|
deb9c613a77c163f5969ab8a12a3ef3a31a428bf
|
/src/main/java/com/jpql/entity/entityType/Album.java
|
3d9d3fa2f5de7c64f61c8f9b3092b7288410c0e4
|
[] |
no_license
|
jaenyeong/Study_JPA-Basic
|
dbf7bf6eef8ff688299298de46948521373ac0b5
|
d1d5e7f3a4172c6704a24b69661108a50be5a35e
|
refs/heads/master
| 2023-03-06T21:55:48.716285
| 2021-02-16T10:16:27
| 2021-02-16T10:16:27
| 237,733,188
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 411
|
java
|
package com.jpql.entity.entityType;
import javax.persistence.Entity;
@Entity
public class Album extends Item {
private String artist;
private String etc;
public String getArtist() {
return artist;
}
public Album setArtist(String artist) {
this.artist = artist;
return this;
}
public String getEtc() {
return etc;
}
public Album setEtc(String etc) {
this.etc = etc;
return this;
}
}
|
[
"jaenyeong.dev@gmail.com"
] |
jaenyeong.dev@gmail.com
|
7c6bdc3cecf7cb179cf9e4c41de67f12f357f103
|
000e9ddd9b77e93ccb8f1e38c1822951bba84fa9
|
/java/classes/com/b/a/i/b.java
|
52a53c9961b23ff09f40dbc4dca5ae97e200da10
|
[
"Apache-2.0"
] |
permissive
|
Paladin1412/house
|
2bb7d591990c58bd7e8a9bf933481eb46901b3ed
|
b9e63db1a4975b614c422fed3b5b33ee57ea23fd
|
refs/heads/master
| 2021-09-17T03:37:48.576781
| 2018-06-27T12:39:38
| 2018-06-27T12:41:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 482
|
java
|
package com.b.a.i;
import com.b.a.d;
public class b
extends d
{
public b(String paramString)
{
super(paramString);
}
public b(String paramString, Throwable paramThrowable)
{
super(paramString, paramThrowable);
}
public b(Throwable paramThrowable)
{
super(paramThrowable);
}
}
/* Location: /Users/gaoht/Downloads/zirom/classes-dex2jar.jar!/com/b/a/i/b.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"ght163988@autonavi.com"
] |
ght163988@autonavi.com
|
54c36a3ccba145bc4c43b9577abbf7b6b5c2752d
|
377405a1eafa3aa5252c48527158a69ee177752f
|
/src/com/braintreepayments/api/threedsecure/ThreeDSecureWebChromeClient.java
|
d07868eab0133d89601f66eacc87a792de5991de
|
[] |
no_license
|
apptology/AltFuelFinder
|
39c15448857b6472ee72c607649ae4de949beb0a
|
5851be78af47d1d6fcf07f9a4ad7f9a5c4675197
|
refs/heads/master
| 2016-08-12T04:00:46.440301
| 2015-10-25T18:25:16
| 2015-10-25T18:25:16
| 44,921,258
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,583
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.braintreepayments.api.threedsecure;
import android.os.Message;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
// Referenced classes of package com.braintreepayments.api.threedsecure:
// ThreeDSecureWebViewActivity, ThreeDSecureWebView
public class ThreeDSecureWebChromeClient extends WebChromeClient
{
private ThreeDSecureWebViewActivity mActivity;
public ThreeDSecureWebChromeClient(ThreeDSecureWebViewActivity threedsecurewebviewactivity)
{
mActivity = threedsecurewebviewactivity;
}
public void onCloseWindow(WebView webview)
{
mActivity.popCurrentWebView();
}
public boolean onCreateWindow(WebView webview, boolean flag, boolean flag1, Message message)
{
webview = new ThreeDSecureWebView(mActivity);
webview.init(mActivity);
mActivity.pushNewWebView(webview);
((android.webkit.WebView.WebViewTransport)message.obj).setWebView(webview);
message.sendToTarget();
return true;
}
public void onProgressChanged(WebView webview, int i)
{
super.onProgressChanged(webview, i);
if (i < 100)
{
mActivity.setProgress(i);
mActivity.setProgressBarVisibility(true);
return;
} else
{
mActivity.setProgressBarVisibility(false);
return;
}
}
}
|
[
"rich.foreman@apptology.com"
] |
rich.foreman@apptology.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.