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
9182f330edbdf6e84581a748cb95c0d820814c58
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.qqlite/assets/exlibs.1.jar/classes.jar/com/tencent/mobileqq/activity/NumberWheelView$ScrollStateListener.java
c2bc90266d41f92323d8b6e1216856b5fe34b5b2
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
460
java
package com.tencent.mobileqq.activity; import com.tencent.widget.VerticalGallery; public abstract interface NumberWheelView$ScrollStateListener { public abstract void a(VerticalGallery paramVerticalGallery); } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.qqlite\assets\exlibs.1.jar\classes.jar * Qualified Name: com.tencent.mobileqq.activity.NumberWheelView.ScrollStateListener * JD-Core Version: 0.7.0.1 */
3a0a9fe73ae9ee0ba8a3c9cf3817bd6aca74e7ca
88d41a18d1ad0ccc1a79b623cf4006e52f6e20ab
/mybatis-3/src/test/java/org/apache/ibatis/submitted/enum_with_method/Mapper.java
13e35d0fa2b7ca8ced4116c8cc02302631eb3505
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
huifer/javaBook-src
87369e5f175197166dcae49ffde9a41ad3965bf7
5f319dbf46401f7f5770ed3ca80079e48392d2f8
refs/heads/master
2023-08-30T12:58:56.644540
2023-08-30T01:36:09
2023-08-30T01:36:09
173,409,096
57
19
Apache-2.0
2023-02-22T08:11:26
2019-03-02T05:51:32
Java
UTF-8
Java
false
false
777
java
/** * Copyright 2009-2019 the original author or authors. * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * 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.ibatis.submitted.enum_with_method; public interface Mapper { User getUser(Integer id); void insertUser(User user); }
f18315f730bcc58e50f16af9cdef6cc2af661272
78479864badf6f2bc7c5abeb2412c73b7113bda2
/plugin/topologychannels/resource/utility/JComboBoxPattern.java
171d36ca1ed30fa08b99fa04d5142d08469a2248
[]
no_license
remenska/Charmy
8784bb2101a12badb25b44cddc0b9cb11769ec6d
d77092c6637127166a2eecab13b6430316cc89e7
refs/heads/master
2020-06-04T11:34:18.392901
2013-07-18T19:21:48
2013-07-18T19:21:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,233
java
/* Charmy (CHecking Architectural Model consistencY) * Copyright (C) 2004 Patrizio Pelliccione <[email protected]>, * Henry Muccini <[email protected]>, Paola Inverardi <[email protected]>. * Computer Science Department, University of L'Aquila. SEA Group. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package plugin.topologychannels.resource.utility; import javax.swing.JComboBox; import plugin.topologychannels.resource.graph.GraficoLink; /** La classe specializza JComboBox introducendo l'inizializzazione con i pattern disponibili nella classe 'GraficoLink' per il tracciamento di una linea. */ public class JComboBoxPattern extends JComboBox { /** Vettore dei pattern disponibili per il tracciamento di una linea. */ static final int[] patterndisponibili = {GraficoLink.SIMPLE_PATTERN, GraficoLink.TYPE1_PATTERN, GraficoLink.TYPE2_PATTERN}; /* Costruttore_ Prende in ingresso l'elemento da selezionare nella 'ComboBox'. */ public JComboBoxPattern(int pattern) { super(); int index = 0; addItem("Simple"); addItem("Type 1"); addItem("Type 2"); for (int i=0; i < patterndisponibili.length; i++) { if (pattern == patterndisponibili[i]) { index = i; } } setSelectedIndex(index); } /** Restituisce il pattern selezionato. */ public int getSelectedPattern() { return(patterndisponibili[getSelectedIndex()]); } }
cf1dfe5a3e0a59750a4a6c4ed852f479698abad8
b35fadf8d375525e320751e25893f6f69a04e37d
/leimingtech-admin/src/main/java/com/leimingtech/platform/service/impl/doc/DocServiceImpl.java
7d301d5f0e802b9da908deb3cbd2c6772f39d9ba
[]
no_license
dockercms/cms-4.0
8e41fca1142e121861a86006afaf378327f1917b
8f390cc00848124daeb997b8c09aefa0f465572c
refs/heads/master
2021-05-19T03:38:03.644558
2019-12-06T02:10:27
2019-12-06T02:10:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,903
java
package com.leimingtech.platform.service.impl.doc; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.leimingtech.core.base.SortDirection; import com.leimingtech.core.base.ContextHolderUtils; import com.leimingtech.core.hibernate.qbc.CriteriaQuery; import com.leimingtech.core.hibernate.qbc.PageList; import com.leimingtech.core.service.CommonService; import com.leimingtech.platform.entity.doc.DocEnRefEntity; import com.leimingtech.platform.entity.doc.DocEntity; import com.leimingtech.platform.entity.doc.DocParamEntity; import com.leimingtech.platform.entity.doc.DocReturnValueEntity; import com.leimingtech.platform.entity.doc.DocTypeEntity; import com.leimingtech.platform.service.doc.DocServiceI; /** * 文档管理接口实现 * * @author liuzhen 2014年6月11日 16:53:11 * */ @Service("docService") @Transactional public class DocServiceImpl implements DocServiceI { /**公共dao接口*/ @Autowired private CommonService commonService; /** * 删除文档(级联删除子集) * * @param doc */ @Override public void delete(DocEntity doc) { HttpServletRequest request = ContextHolderUtils.getRequest(); String id = request.getParameter("id"); List<DocParamEntity> docparamList = commonService.findByProperty(DocParamEntity.class, "docid", id); commonService.deleteAllEntitie(docparamList); //删除标签及api输入参数 List<DocReturnValueEntity> docreturnList = commonService.findByProperty(DocReturnValueEntity.class, "docid", id); commonService.deleteAllEntitie(docreturnList); //删除返回结果 List<DocEntity> docList = commonService.findByProperty(DocEntity.class, "pid", id); commonService.deleteAllEntitie(docList); //删除api列表 commonService.delete(doc); //删除文档 } /** * 获取文档列表(标签调用) * * @param params * @return */ @Override public Object getDocListByTag(Map params) { if (MapUtils.isEmpty(params)) { return null; } String typeid = (String) params.get("typeid"); if (StringUtils.isNotEmpty(typeid)) { String platform = (String) params.get("platform"); CriteriaQuery cq = new CriteriaQuery(DocEntity.class); cq.eq("status", 1); cq.eq("typeid", typeid); cq.eq("pid", "0"); if(StringUtils.isNotEmpty(platform)){ cq.eq("platform", platform); } cq.addOrder("sort", SortDirection.desc); cq.addOrder("createdtime", SortDirection.desc); cq.add(); List<DocEntity> docList = commonService.getListByCriteriaQuery(cq, false); if (docList != null && docList.size() > 0) { for (int i = 0; i < docList.size(); i++) { DocTypeEntity doctype = commonService.getEntity(DocTypeEntity.class, docList.get(i).getTypeid()); docList.get(i).setType(doctype.getName()); } } return docList; } return null; } @Override public Map<String, Object> getPageList(String name, String typeid, String pid,String platform ,int pageSize, int pageNo) { CriteriaQuery cq = new CriteriaQuery(DocEntity.class, pageSize, pageNo, "", ""); // 排序条件 // 查询条件组装器 cq.addOrder("createdtime",SortDirection.desc); cq.addOrder("sort", SortDirection.desc); if (StringUtils.isNotEmpty(name)) { cq.like("name", "%" + name + "%"); } if (StringUtils.isNotEmpty(pid)) { cq.eq("pid", pid); }else{ if(StringUtils.isEmpty(pid)){ cq.eq("pid", "0"); pid="0"; } } if (StringUtils.isNotEmpty(typeid)) { cq.eq("typeid", typeid); } if (StringUtils.isNotEmpty(platform)) { cq.eq("platform", platform); } cq.add(); PageList pageList = commonService.getPageList(cq, true); List<DocEntity> resultList = pageList.getResultList(); if (resultList != null && resultList.size() > 0) { // 文档类型赋值 for (DocEntity docEntity : resultList) { DocTypeEntity doctype = commonService.getEntity(DocTypeEntity.class, docEntity.getTypeid()); if (doctype != null) { docEntity.setType(doctype.getName()); } } } int pageCount = (int) Math.ceil((double) pageList.getCount() / (double) pageSize); if (pageCount <= 0) { pageCount = 1; } Map<String, Object> m = new HashMap<String, Object>(); if (StringUtils.isEmpty(pid) || pid.equals("0")) { // 查询文档类型,添加文档类型查询条件 CriteriaQuery cqDocType = new CriteriaQuery(DocTypeEntity.class); cqDocType.eq("status", 1); cqDocType.addOrder("sort", SortDirection.desc); cqDocType.add(); List<DocTypeEntity> docTypeList = commonService.getListByCriteriaQuery(cqDocType, false); m.put("docTypeList", docTypeList); } m.put("pageList", resultList); m.put("pageNo", pageList.getCurPageNO()); m.put("pageCount", pageCount); m.put("actionUrl", "docController.do?doc&pid=" + pid); return m; } @Override public void saveOrUpdate(DocEntity doc) { commonService.saveOrUpdate(doc); } @Override public String save(DocEntity doc) { return (String) commonService.save(doc); } @Override public DocEntity getDoc(String id) { DocEntity doc=commonService.getEntity(DocEntity.class, id); return doc; } @Override public List<DocEntity> getListRedDoc(String id) { HttpServletRequest request = ContextHolderUtils.getRequest(); String platform = request.getParameter("platform"); CriteriaQuery cq = new CriteriaQuery(DocEntity.class); cq.eq("status", 1); cq.eq("typeid", id); if (StringUtils.isNotEmpty(platform)) { cq.eq("platform", platform); } cq.eq("pid", "0"); cq.addOrder("sort", SortDirection.desc); cq.add(); List<DocEntity> docList = commonService.getListByCriteriaQuery(cq, false); return docList; } @Override public List<DocEntity> getListRedDocTag(String id) { HttpServletRequest request = ContextHolderUtils.getRequest(); String platform = request.getParameter("platform"); DocEntity doc = getDoc(id); CriteriaQuery cq = new CriteriaQuery(DocEntity.class); cq.eq("status", 1); cq.eq("typeid", doc.getTypeid()); if (StringUtils.isNotEmpty(platform)) { cq.eq("platform", platform); } cq.addOrder("sort", SortDirection.desc); cq.add(); List<DocEntity> docList = commonService.getListByCriteriaQuery(cq, false); return docList; } @Override public List<DocEntity> getListRedDocApiList(String id) { HttpServletRequest request = ContextHolderUtils.getRequest(); String platform = request.getParameter("platform"); DocEntity doc = getDoc(id); CriteriaQuery cq = new CriteriaQuery(DocEntity.class); cq.eq("status", 1); cq.eq("pid", id); if (StringUtils.isNotEmpty(platform)) { cq.eq("platform", platform); } cq.addOrder("sort", SortDirection.desc); cq.add(); List<DocEntity> docList = commonService.getListByCriteriaQuery(cq, false); return docList; } @Override public List<DocEnRefEntity> findByProperty(String id) { List<DocEnRefEntity> docEnRefList = commonService.findByProperty(DocEnRefEntity.class, "doc.id", id); return docEnRefList; } @Override public List<DocEntity> getListRedDocApi(String id) { HttpServletRequest request = ContextHolderUtils.getRequest(); String platform = request.getParameter("platform"); DocEntity doc =getDoc(id); CriteriaQuery cq = new CriteriaQuery(DocEntity.class); cq.eq("status", 1); cq.eq("typeid", doc.getTypeid()); if (StringUtils.isNotEmpty(platform)) { cq.eq("platform", platform); } cq.eq("pid", doc.getPid()); cq.addOrder("sort", SortDirection.desc); cq.add(); List<DocEntity> docList = commonService.getListByCriteriaQuery(cq, false); return docList; } }
1738ffb0cdcb3d8707f773b7c0c8b825cd56aa63
470638d559d0e626ea6cff28462e8d0ec97f11f3
/java/代码/Java-Base/src/base/N.java
8518871a1b8d4c306571ef1540ad3b5880e0cfa1
[]
no_license
LiShuxue/BackEnd-Base
40069d6cc88501f170a0b30969b8bb978e453d31
5ab9d1e16b9924fe252933342fdb8c57f86631cd
refs/heads/master
2023-08-31T02:12:27.381616
2023-08-30T02:11:02
2023-08-30T02:11:02
93,992,632
0
0
null
2022-07-13T18:28:38
2017-06-11T08:49:05
HTML
GB18030
Java
false
false
1,875
java
package base; import java.util.Scanner; public class N { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("请输入消费金额:"); double cost = input.nextInt(); System.out.print("是否参加优惠换购活动(y/n):"); String isChoice = input.next(); if(isChoice.equals("y")) { if(cost>=50) { System.out.println("1:满50元,加2元换购百事可乐饮料一瓶"); System.out.println("2:满100元,加3元换购500ml可乐一瓶"); System.out.println("3:满100元,加10元换购5公斤面粉"); System.out.println("4:满200元,加10元换购一个苏泊尔炒菜锅"); System.out.println("5:满200元,加20元换购欧莱雅爽肤水一瓶"); System.out.println("0:不换购"); System.out.print("请选择:"); int choice = input.nextInt(); switch(choice){ case 1: System.out.println("本次消费金额:" + (cost+2)); System.out.println("成功换购:百事可乐饮料一瓶"); break; case 2: System.out.println("本次消费金额:" + (cost+3)); System.out.println("成功换购:500ml可乐一瓶"); break; case 3: System.out.println("本次消费金额:" + (cost+10)); System.out.println("成功换购:5公斤面粉"); break; case 4: System.out.println("本次消费金额:" + (cost+10)); System.out.println("成功换购:一个苏泊尔炒锅"); break; case 5: System.out.println("本次消费金额:" + (cost+20)); System.out.println("成功换购:欧莱雅爽肤水一瓶"); break; case 0: System.out.println("您未选择换购"); } } else { System.out.println("您的消费不满足换购条件,再见。"); } } else { System.out.println("感谢您的使用。"); } } }
05a14541615aa2c087d10edf26371cf7cb9903cc
6dc5682bcd9572ceee8e4d56ad648cb7d8bd51ba
/문서/Thread/5/Family.java
03c55146aaa684ac92d6371fce3a42f19480ec64
[]
no_license
go88hoontops/Java-and-sql
692e3b387f86987fd72ac99be36fe1d36d880d5f
80b4f467d5dfd5b8372704a41c553fb56fbda6a5
refs/heads/master
2023-04-04T03:02:26.106709
2021-04-06T07:06:40
2021-04-06T07:06:40
355,087,149
0
0
null
null
null
null
UTF-8
Java
false
false
331
java
// Thread 클래스를 상속받아 Thread를 정의함. public class Family extends Thread { Toilet toilet; String who; boolean key; // 초기값: false // 생성자 public Family( String name, Toilet t ) { who = name; toilet = t; } public void run() { toilet.openDoor( who, key ); } }
df5ffae47d44d79b4f5f1ec635d86ae7a7dfe741
bfb6a5acf730838bb22bd827928055763d350263
/app/src/main/java/com/iris/cada/adapter/ReportShangPaiAdapter.java
3fac68227520103504ba2ba016bb825e93d07097
[]
no_license
sunshaochi/Aodi
cb497b5c80596f7c084a51fc6cb2b0dd3ddaecf9
1bfaa160413b56a6dec22696d9fb44a612ca4899
refs/heads/master
2020-03-17T16:52:38.196952
2018-05-17T06:10:09
2018-05-17T06:10:09
133,765,996
0
0
null
null
null
null
UTF-8
Java
false
false
3,446
java
package com.iris.cada.adapter; import java.util.List; import com.iris.cada.ProfitApplication; import com.iris.cada.entity.IViewProfitReport; import com.iris.cada.utils.CommonAdapter; import com.iris.cada.utils.StringUtils; import com.iris.cada.R; import android.content.Context; import android.graphics.Color; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; public class ReportShangPaiAdapter extends CommonAdapter<IViewProfitReport>{ private Context context; private List<IViewProfitReport> datas; public ReportShangPaiAdapter(Context context, List<IViewProfitReport> datas) { super(context, datas); this.context = context; this.datas = datas; } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder viewHolder = null; if (convertView == null) { viewHolder = new ViewHolder(); convertView = LayoutInflater.from(context).inflate(R.layout.item_report_shang_pai, null); viewHolder.salesconsultant = (TextView) convertView.findViewById(R.id.item_shang_pai_name); viewHolder.Turnover = (TextView) convertView.findViewById(R.id.item_shang_pai_name1); viewHolder.shangPaiCount = (TextView) convertView.findViewById(R.id.item_shang_pai_name2);//上牌数 viewHolder.shangPaiShenTouRate = (TextView) convertView.findViewById(R.id.item_shang_pai_name3);//渗透率 viewHolder.shangPaiTotalMaoLi = (TextView) convertView.findViewById(R.id.item_shang_pai_name4);//总毛利 viewHolder.shangPaiMaoLiRate = (TextView) convertView.findViewById(R.id.item_shang_pai_name5);//毛利率 viewHolder.oneShangPaiMaoLi = (TextView) convertView.findViewById(R.id.item_shang_pai_name6);//单车上牌毛利 viewHolder.ll_item=(LinearLayout) convertView.findViewById(R.id.item_shang_pai_linner); convertView.setTag(viewHolder); } else { viewHolder = (ViewHolder) convertView.getTag(); } if (!ProfitApplication.isConsultantMode) { viewHolder.salesconsultant.setText(datas.get(position).getModels()); }else { viewHolder.salesconsultant.setText(datas.get(position).getSalesconsultant()); } viewHolder.Turnover.setText(datas.get(position).getTurnover()); viewHolder.shangPaiCount.setText(datas.get(position).getOnCardSaleNum()); viewHolder.shangPaiShenTouRate.setText(datas.get(position).getOnCardPermeaterate()+"%"); viewHolder.shangPaiTotalMaoLi.setText(StringUtils.intDivTo0(datas.get(position).getOnCardTotalProfit())); viewHolder.shangPaiMaoLiRate.setText(StringUtils.nullTo0(datas.get(position).getOnCardGrossrate())+"%"); viewHolder.oneShangPaiMaoLi.setText(StringUtils.intDivTo0(datas.get(position).getAvgOnCardGross())); if(position%2==0){ viewHolder.ll_item.setBackgroundColor(Color.parseColor("#ffffff")); }else { viewHolder.ll_item.setBackgroundColor(Color.parseColor("#ebebeb")); } return convertView; } private static class ViewHolder { // 销售顾问 private TextView salesconsultant; // 车系 private TextView models; // 总交车数 private TextView Turnover; //上牌数 private TextView shangPaiCount; //上牌渗透率 private TextView shangPaiShenTouRate; //上牌总毛利 private TextView shangPaiTotalMaoLi; //上牌毛利率 private TextView shangPaiMaoLiRate; //单车上牌毛利 private TextView oneShangPaiMaoLi; private LinearLayout ll_item; } }
5e35798fbfd03889f5b2427b6ad8f3535a96753b
a839bdbe703b9081f1417d4a7538c7aca79c23a2
/app/src/main/java/com/ucuxin/ucuxin/tec/view/dialog/effects/RotateBottom.java
b219df54c9e02dd4346b7c9c81795c8515baee0c
[]
no_license
13302864582/baifen_teacher_app
8463cdd82dd1afd60beea0b9605eb8e2ff85acaf
9e8aa8c05ecdf31094674923f64e1caa9f5d0685
refs/heads/master
2020-07-09T11:04:21.537326
2019-08-27T06:12:37
2019-08-27T06:12:37
202,825,528
0
0
null
null
null
null
UTF-8
Java
false
false
609
java
package com.ucuxin.ucuxin.tec.view.dialog.effects; import android.view.View; import com.nineoldandroids.animation.ObjectAnimator; /** * Created by lee on 2014/7/31. */ public class RotateBottom extends BaseEffects{ @Override protected void setupAnimation(View view) { getAnimatorSet().playTogether( ObjectAnimator.ofFloat(view, "rotationX",90, 0).setDuration(mDuration), ObjectAnimator.ofFloat(view, "translationY", 300, 0).setDuration(mDuration), ObjectAnimator.ofFloat(view, "alpha", 0, 1).setDuration(mDuration*3/2) ); } }
a441e22fa2d2c668e524030468a23a21aee35205
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/19/19_1122fd54b55bc9885244c395a2da46a9a4e1bb10/VehiclItem/19_1122fd54b55bc9885244c395a2da46a9a4e1bb10_VehiclItem_s.java
30e8cbd4a92e12cd6580bd7dfc90ab58889a635b
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,365
java
/* * @(#)VehiclItem.java * * Copyright 2010 Instituto Superior Tecnico * Founding Authors: Luis Cruz, Nuno Ochoa, Paulo Abrantes * * https://fenix-ashes.ist.utl.pt/ * * This file is part of the Expenditure Tracking Module. * * The Expenditure Tracking Module 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. * * The Expenditure Tracking Module 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 the Expenditure Tracking Module. If not, see <http://www.gnu.org/licenses/>. * */ package module.mission.domain; import module.mission.domain.activity.ItemActivityInformation; import pt.ist.bennu.core.domain.exceptions.DomainException; /** * * @author Luis Cruz * */ public abstract class VehiclItem extends VehiclItem_Base { public VehiclItem() { super(); new VehiclItemJustification(this); } @Override public void delete() { final VehiclItemJustification vehiclItemJustification =getVehiclItemJustification(); if (vehiclItemJustification != null) { vehiclItemJustification.delete(); } super.delete(); } @Override public boolean isVehicleItem() { return true; } @Override public void setInfo(final ItemActivityInformation itemActivityInformation) { if (itemActivityInformation.getDriver() == null) { throw new DomainException("A vehicle item must have a driver"); } super.setInfo(itemActivityInformation); setDriver(itemActivityInformation.getDriver()); addPeople(itemActivityInformation.getDriver()); } @Override protected void setNewVersionInformation(final MissionItem missionItem) { super.setNewVersionInformation(missionItem); final VehiclItem vehiclItem = (VehiclItem) missionItem; vehiclItem.setVehiclItemJustification(getVehiclItemJustification()); } }
216956f41c4329a61059322af39673573649fb9e
d9d7bf3d0dca265c853cb58c251ecae8390135e0
/gcld/src/com/reign/kf/comm/entity/match/MatchScheduleEntity.java
32b9e35dfdc893c0226c919d280090542aa9f6a5
[]
no_license
Crasader/workspace
4da6bd746a3ae991a5f2457afbc44586689aa9d0
28e26c065a66b480e5e3b966be4871b44981b3d8
refs/heads/master
2020-05-04T21:08:49.911571
2018-11-19T08:14:27
2018-11-19T08:14:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,369
java
package com.reign.kf.comm.entity.match; public class MatchScheduleEntity { private int matchId; private int player1; private int player2; private int turn; private int matchNum; private long matchCD; private int session; public int getMatchId() { return this.matchId; } public void setMatchId(final int matchId) { this.matchId = matchId; } public int getPlayer1() { return this.player1; } public void setPlayer1(final int player1) { this.player1 = player1; } public int getPlayer2() { return this.player2; } public void setPlayer2(final int player2) { this.player2 = player2; } public int getTurn() { return this.turn; } public void setTurn(final int turn) { this.turn = turn; } public int getMatchNum() { return this.matchNum; } public void setMatchNum(final int matchNum) { this.matchNum = matchNum; } public long getMatchCD() { return this.matchCD; } public void setMatchCD(final long matchCD) { this.matchCD = matchCD; } public int getSession() { return this.session; } public void setSession(final int session) { this.session = session; } }
041f98a6a3a84be78a651940a02af53d20da5d49
4a308bb4f309bc03626790d1b8847b7d388a75e9
/mall/JavaSource/com/fantasy/mall/goods/bean/SpecificationValue.java
6dd4b108cc88889106322b565840f7a6ceec6fb2
[ "MIT" ]
permissive
caohaibing/jfantasy
69f87822798d1a09851e26376a1d50d1448543f2
086f4473df1fe507f3d3bcb588c453bddc64bdd1
refs/heads/master
2021-01-21T17:36:54.751311
2015-10-21T03:06:44
2015-10-21T03:06:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,697
java
package com.fantasy.mall.goods.bean; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import java.util.UUID; /** * 商品规格 */ public class SpecificationValue implements Comparable<SpecificationValue> { private String id; private String value; private Integer sort; public SpecificationValue() { this.id = UUID.randomUUID().toString(); } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public Integer getSort() { return sort; } public void setSort(Integer sort) { this.sort = sort; } @Override public boolean equals(Object o) { if (o instanceof SpecificationValue) { SpecificationValue specificationValue = (SpecificationValue) o; return new EqualsBuilder().appendSuper(super.equals(o)).append(this.getId(), specificationValue.getId()).append(this.getValue(), specificationValue.getValue()).isEquals(); } return false; } @Override public int hashCode() { return new HashCodeBuilder().appendSuper(super.hashCode()).append(this.getId()).append(this.getValue()).toHashCode(); } public int compareTo(SpecificationValue specificationValue) { if (specificationValue.getSort() == null) { return 1; } if (this.getSort() == null) { return -1; } return this.getSort().compareTo(specificationValue.getSort()); } }
91c5c610c231debf94f1251dd259eabfe6cce2cb
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module1139/src/main/java/module1139packageJava0/Foo4.java
07c5a5a39b11fbf4f4223dc09ab145785c5a2f8e
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
212
java
package module1139packageJava0; import java.lang.Integer; public class Foo4 { Integer int0; public void foo0() { new module1139packageJava0.Foo3().foo1(); } public void foo1() { foo0(); } }
83e20621695731bdaf31ed143601b59c21ec8b36
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-1.4.0/modules/xml/src/test/java/org/mule/routing/filters/xml/IsXmlFilterTestCase.java
2256fa4da52a865cb4493c2fc6e7c31719600ee8
[]
no_license
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
2,299
java
/* * $Id$ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com * * The software in this package is published under the terms of the MuleSource MPL * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ package org.mule.routing.filters.xml; import java.io.IOException; import java.io.InputStream; import org.mule.impl.MuleMessage; import org.mule.routing.filters.xml.IsXmlFilter; import org.mule.tck.AbstractMuleTestCase; import org.mule.util.IOUtils; public class IsXmlFilterTestCase extends AbstractMuleTestCase { private IsXmlFilter filter; protected void doSetUp() throws Exception { filter = new IsXmlFilter(); } public void testFilterFalse() throws Exception { assertFalse(filter.accept(new MuleMessage("This is definitely not XML."))); } public void testFilterFalse2() throws Exception { assertFalse(filter.accept(new MuleMessage( "<line>This is almost XML</line><line>This is almost XML</line>"))); } public void testFilterTrue() throws Exception { assertTrue(filter.accept(new MuleMessage("<msg attrib=\"att1\">This is some nice XML!</msg>"))); } public void testFilterBytes() throws Exception { byte[] bytes = "<msg attrib=\"att1\">This is some nice XML!</msg>".getBytes(); assertTrue(filter.accept(new MuleMessage(bytes))); } public void testFilterNull() throws Exception { assertFalse(filter.accept(new MuleMessage(null))); } public void testFilterLargeXml() throws Exception { final String xml = loadFromClasspath("cdcatalog.xml"); assertTrue(filter.accept(new MuleMessage(xml))); } public void testFilterLargeXmlFalse() throws Exception { final String html = loadFromClasspath("cdcatalog.html"); assertTrue(filter.accept(new MuleMessage(html))); } private String loadFromClasspath(final String name) throws IOException { InputStream is = IOUtils.getResourceAsStream(name, getClass()); assertNotNull("Test resource not found.", is); return IOUtils.toString(is); } }
[ "dirk.olmes@bf997673-6b11-0410-b953-e057580c5b09" ]
dirk.olmes@bf997673-6b11-0410-b953-e057580c5b09
02288f0924a518359ee9ed1ef125c54e4aacf358
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
/flakiness-predicter/input_data/original_tests/joel-costigliola-assertj-core/nonFlakyMethods/org.assertj.core.internal.classes.Classes_assertHasFields_Test-should_fail_if_fields_are_missing.java
5d2c3b4fce1ecad0655ec3072b9f692fa22533d9
[ "BSD-3-Clause" ]
permissive
Taher-Ghaleb/FlakeFlagger
6fd7c95d2710632fd093346ce787fd70923a1435
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
refs/heads/main
2023-07-14T16:57:24.507743
2021-08-26T14:50:16
2021-08-26T14:50:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
443
java
@Test() public void should_fail_if_fields_are_missing(){ AssertionInfo info=someInfo(); String[] expected=new String[]{"missingField","publicField"}; try { classes.assertHasFields(someInfo(),actual,expected); } catch ( AssertionError e) { verify(failures).failure(info,shouldHaveFields(actual,newLinkedHashSet(expected),newLinkedHashSet("missingField"))); return; } failBecauseExpectedAssertionErrorWasNotThrown(); }
aedcc5f940cc5f4d7dbb627c684a09a493ba653f
74acea1b7f2a3a509b9ead48f186c9349bf55cc8
/framework/src/main/java/com/enjoyf/platform/db/gameres/PrivilegeRoleRelationAccessorMySql.java
4a75ca8d02f0a95253c7cb77cd9fd049cfad13ea
[]
no_license
liu67224657/besl-platform
6cd2bfcc7320a4039e61b114173d5f350345f799
68c126bea36c289526e0cc62b9d5ce6284353d11
refs/heads/master
2022-04-16T02:23:40.178907
2020-04-17T09:00:01
2020-04-17T09:00:01
109,520,110
1
1
null
null
null
null
UTF-8
Java
false
false
299
java
package com.enjoyf.platform.db.gameres; /** * Created by IntelliJ IDEA. * User: zhitaoshi * Date: 13-10-15 * Time: 下午12:12 * To change this template use File | Settings | File Templates. */ public class PrivilegeRoleRelationAccessorMySql extends AbstractPrivilegeRoleRelationAccessor { }
35ec4c8f4737f0f178fe3177deef63a8ce698ab1
7ca5be744f4cd757e6d279fba20c8a5f00a23e4d
/src/main/java/crazypants/enderio/teleport/telepad/TeleportEntityRenderHandler.java
652964119ef3346713c9c633ff8e23eca636bb65
[ "LGPL-3.0-only", "CC0-1.0", "LicenseRef-scancode-public-domain", "CC-BY-3.0", "Unlicense" ]
permissive
TataTawa/EnderIO
4971832bf2a21657e915c888cc19bba5dc3dae01
7e625f2bffeba82c82ad53d8c6e3d86a0e86bd2e
refs/heads/master
2022-12-10T12:58:04.300497
2022-06-10T14:50:16
2022-06-10T14:50:16
283,451,158
0
0
Unlicense
2020-07-29T09:06:55
2020-07-29T09:06:55
null
UTF-8
Java
false
false
3,816
java
package crazypants.enderio.teleport.telepad; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.Tessellator; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.client.event.RenderLivingEvent; import org.lwjgl.opengl.GL11; import com.enderio.core.client.render.RenderUtil; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import static org.lwjgl.opengl.GL11.*; public class TeleportEntityRenderHandler { @SubscribeEvent public void onEntityRender(RenderLivingEvent.Post event) { EntityLivingBase e = event.entity; if(e.getEntityData().getBoolean(TileTelePad.TELEPORTING_KEY)) { float radius = e.width / 2.0F; AxisAlignedBB bb = AxisAlignedBB.getBoundingBox(-radius, 0, -radius, radius, e.height + 0.25, radius); glPushMatrix(); glPushAttrib(GL_ALL_ATTRIB_BITS); glDisable(GL_TEXTURE_2D); glShadeModel(GL_SMOOTH); glEnable(GL_BLEND); OpenGlHelper.glBlendFunc(GL_SRC_ALPHA, GL_ONE, GL_ZERO, GL_ONE); glDisable(GL_ALPHA_TEST); glEnable(GL_CULL_FACE); glDisable(GL_LIGHTING); glDepthMask(false); glTranslated(event.x, event.y, event.z); bb = bb.expand(0.5, 0, 0.5); float speed = e.getEntityData().getFloat(TileTelePad.PROGRESS_KEY) * 1.2f; float rot = (e.getEntityData().getFloat("teleportrotation")) + speed; glRotatef(rot + RenderUtil.getTimer().renderPartialTicks + e.ticksExisted, 0, 1, 0); double yMax = bb.maxY + 1; Tessellator tes = Tessellator.instance; tes.startDrawingQuads(); colorBot(tes); tes.addVertex(bb.minX, bb.minY, bb.minZ); tes.addVertex(bb.minX, bb.minY, bb.maxZ); colorTop(tes); tes.addVertex(bb.minX, yMax, bb.maxZ); tes.addVertex(bb.minX, yMax, bb.minZ); colorBot(tes); tes.addVertex(bb.minX, bb.minY, bb.maxZ); tes.addVertex(bb.minX, bb.minY, bb.minZ); colorTop(tes); tes.addVertex(bb.minX, yMax, bb.minZ); tes.addVertex(bb.minX, yMax, bb.maxZ); colorBot(tes); tes.addVertex(bb.maxX, bb.minY, bb.minZ); tes.addVertex(bb.maxX, bb.minY, bb.maxZ); colorTop(tes); tes.addVertex(bb.maxX, yMax, bb.maxZ); tes.addVertex(bb.maxX, yMax, bb.minZ); colorBot(tes); tes.addVertex(bb.maxX, bb.minY, bb.maxZ); tes.addVertex(bb.maxX, bb.minY, bb.minZ); colorTop(tes); tes.addVertex(bb.maxX, yMax, bb.minZ); tes.addVertex(bb.maxX, yMax, bb.maxZ); colorBot(tes); tes.addVertex(bb.minX, bb.minY, bb.minZ); tes.addVertex(bb.maxX, bb.minY, bb.minZ); colorTop(tes); tes.addVertex(bb.maxX, yMax, bb.minZ); tes.addVertex(bb.minX, yMax, bb.minZ); colorBot(tes); tes.addVertex(bb.maxX, bb.minY, bb.minZ); tes.addVertex(bb.minX, bb.minY, bb.minZ); colorTop(tes); tes.addVertex(bb.minX, yMax, bb.minZ); tes.addVertex(bb.maxX, yMax, bb.minZ); colorBot(tes); tes.addVertex(bb.minX, bb.minY, bb.maxZ); tes.addVertex(bb.maxX, bb.minY, bb.maxZ); colorTop(tes); tes.addVertex(bb.maxX, yMax, bb.maxZ); tes.addVertex(bb.minX, yMax, bb.maxZ); colorBot(tes); tes.addVertex(bb.maxX, bb.minY, bb.maxZ); tes.addVertex(bb.minX, bb.minY, bb.maxZ); colorTop(tes); tes.addVertex(bb.minX, yMax, bb.maxZ); tes.addVertex(bb.maxX, yMax, bb.maxZ); tes.draw(); GL11.glPopAttrib(); GL11.glPopMatrix(); e.getEntityData().setFloat("teleportrotation", rot); } } private void colorBot(Tessellator tes) { tes.setColorRGBA(175, 255, 255, 100); } private void colorTop(Tessellator tes) { tes.setColorRGBA(220, 255, 255, 0); } }
1c4c6e79c14eb55a94f60323e6b21c0b6191497c
b3e8c286f69ff584622a597ae892b39475028fd6
/TagWriterPoc_source/sources/android/support/p001v4/net/ConnectivityManagerCompatGingerbread.java
6526c5974863776455115066c4925fe47193544c
[]
no_license
EXPONENCIAL-IO/Accessphere
292e3ecf389a216cb656d5d3c22981061b7a2f45
1c07e06d85ed85972d14d848818dc24079a0ca2f
refs/heads/master
2022-11-24T22:12:37.776368
2020-07-26T02:30:17
2020-07-26T02:30:17
282,062,061
0
0
null
null
null
null
UTF-8
Java
false
false
631
java
package android.support.p001v4.net; import android.net.ConnectivityManager; import android.net.NetworkInfo; /* renamed from: android.support.v4.net.ConnectivityManagerCompatGingerbread */ class ConnectivityManagerCompatGingerbread { ConnectivityManagerCompatGingerbread() { } public static boolean isActiveNetworkMetered(ConnectivityManager cm) { NetworkInfo info = cm.getActiveNetworkInfo(); if (info == null) { return true; } switch (info.getType()) { case 1: return false; default: return true; } } }
2baa63f70dbc21220e8332466d52bcd2bb9baac3
92f2df2289eb55810bccb30ea0b29ca3fbc84e79
/BoosterCodeGenerator/src/main/java/com/hexacta/booster/codegeneration/metamodel/DummyClass.java
9a453659106416e59252613254fd1f23e0137acc
[]
no_license
ltenconi/hexacta-booster
b47fb01bee57cbd9c2041fd50b83e915293d41b4
c130039f2b669c092ce97864b926916bce6e146d
refs/heads/master
2021-05-09T02:14:33.793234
2018-02-20T15:43:13
2018-02-20T15:43:13
119,201,384
1
0
null
null
null
null
UTF-8
Java
false
false
270
java
package com.hexacta.booster.codegeneration.metamodel; /***/ public class DummyClass extends Class { /** * */ private static final long serialVersionUID = 440481182675367090L; public DummyClass(final String name) { super(name); } }
f9c550edc4ab33087626e6f16c38c09143a71880
6468b385716a5ea8ca6971187687e2361c69b6cd
/plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/data/PostgreBinaryFormatter.java
257c2bb91170b73a6b084137e8d59e7232582b68
[ "Apache-2.0", "EPL-2.0" ]
permissive
ouguan/dbeaver
49e72648c1523845f67a0d486cf6133a3ffd0402
40d871e92190d80dcebfe9c400fd36d0c4f261dd
refs/heads/master
2020-04-11T20:48:53.444362
2019-02-25T08:38:23
2019-02-25T08:38:23
162,083,780
0
0
Apache-2.0
2018-12-17T06:17:57
2018-12-17T06:17:57
null
UTF-8
Java
false
false
1,728
java
/* * DBeaver - Universal Database Manager * Copyright (C) 2010-2017 Serge Rider ([email protected]) * * 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.jkiss.dbeaver.ext.postgresql.model.data; import org.jkiss.dbeaver.model.impl.data.formatters.BinaryFormatterHex; /** * PostgreBinaryFormatter */ public class PostgreBinaryFormatter extends BinaryFormatterHex { public static final PostgreBinaryFormatter INSTANCE = new PostgreBinaryFormatter(); private static final String HEX_PREFIX = "decode('"; private static final String HEX_POSTFIX = "','hex')"; @Override public String getId() { return "pghex"; } @Override public String getTitle() { return "PostgreSQL Hex"; } @Override public String toString(byte[] bytes, int offset, int length) { return HEX_PREFIX + super.toString(bytes, offset, length) + HEX_POSTFIX; } @Override public byte[] toBytes(String string) { if (string.startsWith(HEX_PREFIX)) { string = string.substring( HEX_PREFIX.length(), string.length() - HEX_POSTFIX.length()); } return super.toBytes(string); } }
1477b434f5c7c59da98a7200d9c47ff890859a15
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
/Crawler/data/MtccException.java
0b47db2df9b8a144a2e082ec344ee090ba5dd67f
[]
no_license
NayrozD/DD2476-Project
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
94dfb3c0a470527b069e2e0fd9ee375787ee5532
refs/heads/master
2023-03-18T04:04:59.111664
2021-03-10T15:03:07
2021-03-10T15:03:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
590
java
11 https://raw.githubusercontent.com/yfelvis/mtcc/master/mtcc-common/src/main/java/com/yf/mtcc/common/exception/MtccException.java package com.yf.mtcc.common.exception; /** * @Author: Elvis on 2020/4/13 * @Email: [email protected] * @Desc: TODO */ public class MtccException extends RuntimeException { public MtccException() { } public MtccException(String message) { super(message); } public MtccException(String message, Throwable cause) { super(message, cause); } public MtccException(Throwable cause) { super(cause); } }
164e434ca56bf59010be5e78ef01d382955da6a4
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project407/src/test/java/org/gradle/test/performance/largejavamultiproject/project407/p2037/Test40743.java
7076d22c8216ad2b9a5821f91a5220dafce0021e
[]
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
2,182
java
package org.gradle.test.performance.largejavamultiproject.project407.p2037; import org.junit.Test; import static org.junit.Assert.*; public class Test40743 { Production40743 objectUnderTest = new Production40743(); @Test public void testProperty0() { Production40740 value = new Production40740(); objectUnderTest.setProperty0(value); assertEquals(value, objectUnderTest.getProperty0()); } @Test public void testProperty1() { Production40741 value = new Production40741(); objectUnderTest.setProperty1(value); assertEquals(value, objectUnderTest.getProperty1()); } @Test public void testProperty2() { Production40742 value = new Production40742(); objectUnderTest.setProperty2(value); assertEquals(value, objectUnderTest.getProperty2()); } @Test public void testProperty3() { String value = "value"; objectUnderTest.setProperty3(value); assertEquals(value, objectUnderTest.getProperty3()); } @Test public void testProperty4() { String value = "value"; objectUnderTest.setProperty4(value); assertEquals(value, objectUnderTest.getProperty4()); } @Test public void testProperty5() { String value = "value"; objectUnderTest.setProperty5(value); assertEquals(value, objectUnderTest.getProperty5()); } @Test public void testProperty6() { String value = "value"; objectUnderTest.setProperty6(value); assertEquals(value, objectUnderTest.getProperty6()); } @Test public void testProperty7() { String value = "value"; objectUnderTest.setProperty7(value); assertEquals(value, objectUnderTest.getProperty7()); } @Test public void testProperty8() { String value = "value"; objectUnderTest.setProperty8(value); assertEquals(value, objectUnderTest.getProperty8()); } @Test public void testProperty9() { String value = "value"; objectUnderTest.setProperty9(value); assertEquals(value, objectUnderTest.getProperty9()); } }
e129b18f121788ab3f9a20720a1a167017736750
43b30286f24f347d03f6f47a5340ae40a6d8fdb0
/sqjz/src/com/nci/dcs/jzgl/cxtj/model/ViewReportAlarm.java
27db893f26b0d4278429d9812348562c335d2f23
[]
no_license
qixinglan/java
399a1c9f13bcfc751ad04d4bebb0ff0f81d7629c
a82ddb3cd75033e5c2458b1231124c4077faec71
refs/heads/master
2020-03-19T11:33:29.766899
2018-06-07T10:44:16
2018-06-07T10:44:16
136,461,358
2
0
null
null
null
null
UTF-8
Java
false
false
1,328
java
package com.nci.dcs.jzgl.cxtj.model; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name = "VIEW_REPORT_ALARM", schema = "SQJZ") public class ViewReportAlarm implements java.io.Serializable { private String id;// 后台字段 private String status;// 后台字段 private String alarmType; private String responseOrg;// 负责矫正单位 private String supOrg; @Id @Column(name = "ID", unique = true, nullable = false, length = 32) public String getId() { return this.id; } public void setId(String id) { this.id = id; } @Column(name = "RESPONSE_ORG", length = 32) public String getResponseOrg() { return responseOrg; } public void setResponseOrg(String responseOrg) { this.responseOrg = responseOrg; } @Column(name = "SUP_ORG_ID", length = 32) public String getSupOrg() { return supOrg; } public void setSupOrg(String supOrg) { this.supOrg = supOrg; } @Column(name = "STATUS", length = 30) public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } @Column(name = "ALARM_TYPE", length = 30) public String getAlarmType() { return alarmType; } public void setAlarmType(String alarmType) { this.alarmType = alarmType; } }
f145c4ed91d0761e63dc6ee155b68bf0f4b11161
7ad54455ccfdd0c2fa6c060b345488ec8ebb1cf4
/com/sun/media/jai/mlib/MlibConvolveOpImage.java
4d9e9033d52fc4de8639a452229189c21265e4b5
[]
no_license
chetanreddym/segmentation-correction-tool
afdbdaa4642fcb79a21969346420dd09eea72f8c
7ca3b116c3ecf0de3a689724e12477a187962876
refs/heads/master
2021-05-13T20:09:00.245175
2018-01-10T04:42:03
2018-01-10T04:42:03
116,817,741
0
0
null
null
null
null
UTF-8
Java
false
false
3,041
java
package com.sun.media.jai.mlib; import com.sun.medialib.mlib.Image; import com.sun.medialib.mlib.mediaLibImage; import java.awt.Rectangle; import java.awt.image.Raster; import java.awt.image.RenderedImage; import java.awt.image.SampleModel; import java.awt.image.WritableRaster; import java.util.Map; import javax.media.jai.AreaOpImage; import javax.media.jai.BorderExtender; import javax.media.jai.ImageLayout; import javax.media.jai.KernelJAI; final class MlibConvolveOpImage extends AreaOpImage { protected KernelJAI kernel; private int kw; private int kh; private int kx; private int ky; float[] kData; double[] doublekData; int[] intkData; int shift = -1; public MlibConvolveOpImage(RenderedImage source, BorderExtender extender, Map config, ImageLayout layout, KernelJAI kernel) { super(source, layout, config, true, extender, kernel.getLeftPadding(), kernel.getRightPadding(), kernel.getTopPadding(), kernel.getBottomPadding()); this.kernel = kernel; kw = kernel.getWidth(); kh = kernel.getHeight(); kx = (kw / 2); ky = (kh / 2); kData = kernel.getKernelData(); int count = kw * kh; intkData = new int[count]; doublekData = new double[count]; for (int i = 0; i < count; i++) { doublekData[i] = kData[i]; } } private synchronized void setShift(int formatTag) { if (shift == -1) { int mediaLibDataType = MediaLibAccessor.getMediaLibDataType(formatTag); shift = Image.ConvKernelConvert(intkData, doublekData, kw, kh, mediaLibDataType); } } protected void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect) { Raster source = sources[0]; Rectangle srcRect = mapDestRect(destRect, 0); int formatTag = MediaLibAccessor.findCompatibleTag(sources, dest); MediaLibAccessor srcAccessor = new MediaLibAccessor(source, srcRect, formatTag); MediaLibAccessor dstAccessor = new MediaLibAccessor(dest, destRect, formatTag); int numBands = getSampleModel().getNumBands(); mediaLibImage[] srcML = srcAccessor.getMediaLibImages(); mediaLibImage[] dstML = dstAccessor.getMediaLibImages(); for (int i = 0; i < dstML.length; i++) { switch (dstAccessor.getDataType()) { case 0: case 1: case 2: case 3: if (shift == -1) { setShift(formatTag); } Image.ConvMxN(dstML[i], srcML[i], intkData, kw, kh, kx, ky, shift, (1 << numBands) - 1, 0); break; case 4: case 5: Image.ConvMxN_Fp(dstML[i], srcML[i], doublekData, kw, kh, kx, ky, (1 << numBands) - 1, 0); break; default: String className = getClass().getName(); throw new RuntimeException(JaiI18N.getString("Generic2")); } } if (dstAccessor.isDataCopy()) { dstAccessor.copyDataToRaster(); } } }
0ed9e204300fe733459468110d5b9737e1a6ca4b
a4d338bebd051e46802b75e98c9466c70d6093e2
/src/main/java/com/norteksoft/acs/base/utils/permission/impl/dataRule/advanced/ConditionVlaueInfo.java
f8bd7840eefc923f11d9d33561d79edc82cd1f3a
[]
no_license
norteksoft/iMatrix-v6.5.RC2
39175574a3c7ca05fdf6d45aef9d443fe968a4d1
9b1c50181860c5266bab350f5d15ef6f63f024bb
refs/heads/master
2021-01-10T05:44:21.015962
2016-03-01T07:24:42
2016-03-01T07:24:42
52,853,470
0
2
null
null
null
null
UTF-8
Java
false
false
745
java
package com.norteksoft.acs.base.utils.permission.impl.dataRule.advanced; import java.io.Serializable; public class ConditionVlaueInfo implements Serializable{ private static final long serialVersionUID = 1L; private String value; private DataRuleConditionValueType valueType;//值的类型:标准值、非标准值 public ConditionVlaueInfo(DataRuleConditionValueType valueType,String value) { this.valueType = valueType; this.value = value; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public DataRuleConditionValueType getValueType() { return valueType; } public void setValueType(DataRuleConditionValueType valueType) { this.valueType = valueType; } }
dcda12ed26477439f8ff19b123d69118eb6945ee
6aeba6834cadd5122e6dc128e10e1e3830b25f84
/src/Dynamic/CoinChange.java
ac3a55715cb16a8428be0b9df6bd648d2232c460
[]
no_license
jadefromkorea/codingTest
fbf1b7199e060a8dc686216ae1bc79b31b7bf8fd
842798883a7f9c5e46d4eb95be440e4055a195f0
refs/heads/master
2022-12-14T14:54:47.782350
2020-08-23T07:11:05
2020-08-23T07:11:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
940
java
package Dynamic; import java.util.Arrays; public class CoinChange { public static void main(String[] args) { int[] coins = {1, 2, 5}; int amount = 11; System.out.println(coinChange(coins, amount)); } public static int coinChange(int[] coins, int amount) { int max = amount + 1; int[] dp = new int[amount + 1]; Arrays.fill(dp, max); dp[0] = 0; for (int i = 1; i <= amount; i++) { System.out.println("i: "+i); for (int j = 0; j < coins.length; j++) { System.out.println(": "+coins[j]+" "+i); if (coins[j] <= i) { System.out.println("coins["+j+"]"+coins[j]+" i "+i+" "+(dp[i - coins[j]])); dp[i] = Math.min(dp[i], dp[i - coins[j]] + 1); } } System.out.println(); } return dp[amount] > amount ? -1 : dp[amount]; } }
82639cf99e09ad0304922835215a3a8b58b141fc
1f7a8a0a76e05d096d3bd62735bc14562f4f071a
/NeverPuk/net/yz/az.java
0fdebc4231df69050fc855df666ae4d86626be85
[]
no_license
yunusborazan/NeverPuk
b6b8910175634523ebd4d21d07a4eb4605477f46
a0e58597858de2fcad3524daaea656362c20044d
refs/heads/main
2023-05-10T09:08:02.183430
2021-06-13T17:17:50
2021-06-13T17:17:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,648
java
package net.yz; import java.security.Key; import java.security.KeyFactory; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; import java.security.PublicKey; import java.security.spec.X509EncodedKeySpec; import javax.crypto.Cipher; import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; import net.yz.m_; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class az { private static final Logger W = LogManager.getLogger(); public static SecretKey g() { KeyGenerator var0 = KeyGenerator.getInstance("AES"); var0.init(128); return var0.generateKey(); } public static KeyPair p() { KeyPairGenerator var0 = KeyPairGenerator.getInstance("RSA"); var0.initialize(1024); return var0.generateKeyPair(); } public static byte[] G(String var0, PublicKey var1, SecretKey var2) { return z("SHA-1", new byte[][]{var0.getBytes("ISO_8859_1"), var2.getEncoded(), var1.getEncoded()}); } private static byte[] z(String var0, byte[]... var1) { int var2 = m_.J(); MessageDigest var3 = MessageDigest.getInstance(var0); int var5 = var1.length; int var6 = 0; if(var6 < var5) { byte[] var7 = var1[var6]; var3.update(var7); ++var6; } return var3.digest(); } public static PublicKey T(byte[] var0) { X509EncodedKeySpec var1 = new X509EncodedKeySpec(var0); KeyFactory var2 = KeyFactory.getInstance("RSA"); return var2.generatePublic(var1); } public static SecretKey g(PrivateKey var0, byte[] var1) { return new SecretKeySpec(I(var0, var1), "AES"); } public static byte[] D(Key var0, byte[] var1) { return X(1, var0, var1); } public static byte[] I(Key var0, byte[] var1) { return X(2, var0, var1); } private static byte[] X(int var0, Key var1, byte[] var2) { return l(var0, var1.getAlgorithm(), var1).doFinal(var2); } private static Cipher l(int var0, String var1, Key var2) { Cipher var3 = Cipher.getInstance(var1); var3.init(var0, var2); return var3; } public static Cipher i(int var0, Key var1) { Cipher var2 = Cipher.getInstance("AES/CFB8/NoPadding"); var2.init(var0, var1, new IvParameterSpec(var1.getEncoded())); return var2; } private static NoSuchAlgorithmException a(NoSuchAlgorithmException var0) { return var0; } }
b62234813a326de2f44a39498f2f2acff68bc16d
16a7a5d045e8f4bdea837fe3fb3607d7e6b68f13
/module1/src/concurrentCollection/CopyOnWriteArrayListEx1.java
c4737083588948e0a71ef891410c5beca5af762e
[]
no_license
Pratik-Singh786/new_core_java
2d19cf74c629b70a3400a26000a30e6396b03f4a
6fa7186cd5f60d7030e95b4030e15800ee19b045
refs/heads/main
2023-09-03T07:44:12.908410
2021-11-20T13:22:08
2021-11-20T13:22:08
430,109,672
0
0
null
null
null
null
UTF-8
Java
false
false
949
java
package concurrentCollection; import java.util.Iterator; import java.util.concurrent.CopyOnWriteArrayList; public class CopyOnWriteArrayListEx1 extends Thread { static CopyOnWriteArrayList l=new CopyOnWriteArrayList(); public void run() { try { Thread.sleep(1000); } catch(Exception e) { } System.out.println("Child thread updating list"); l.add("C"); } public static void main(String [] args) throws Exception { l.add("A"); l.add("B"); CopyOnWriteArrayListEx1 cw= new CopyOnWriteArrayListEx1();//class obj cw.start(); Iterator itr= l.iterator(); while(itr.hasNext()) { String s1=(String) itr.next(); System.out.println("Main thread iterating List and currently object is: "+s1); Thread.sleep(3000); } System.out.println(l); } }
1a4fbed60f76323e308794cc8e0af794a5a8b962
0a2924f4ae6dafaa6aa28e2b947a807645494250
/dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/UpdateIndicatorGroupSetAction.java
a815ed09a5a758e973240e2e0677c0c3703e793c
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
filoi/ImmunizationRepository
9483ee02afd0b46d0f321a1e1ff8a0f6d8ca7f71
efb9f2bb9ae3da8c6ac60e5d5661b8a79a6939d5
refs/heads/master
2023-03-16T03:26:34.564453
2023-03-06T08:32:07
2023-03-06T08:32:07
126,012,725
0
0
BSD-3-Clause
2022-12-16T05:59:21
2018-03-20T12:17:24
Java
UTF-8
Java
false
false
4,009
java
package org.hisp.dhis.dd.action.indicatorgroupset; /* * Copyright (c) 2004-2015, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * Neither the name of the HISP project nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import com.opensymphony.xwork2.Action; import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.indicator.IndicatorGroupSet; import org.hisp.dhis.indicator.IndicatorService; import java.util.ArrayList; import java.util.List; /** * @author Tran Thanh Tri */ public class UpdateIndicatorGroupSetAction implements Action { // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- private IndicatorService indicatorService; public void setIndicatorService( IndicatorService indicatorService ) { this.indicatorService = indicatorService; } // ------------------------------------------------------------------------- // Input // ------------------------------------------------------------------------- private Integer id; public void setId( Integer id ) { this.id = id; } private String name; public void setName( String name ) { this.name = name; } private String description; public void setDescription( String description ) { this.description = description; } private boolean compulsory; public void setCompulsory( boolean compulsory ) { this.compulsory = compulsory; } private List<String> ingSelected = new ArrayList<>(); public void setIngSelected( List<String> ingSelected ) { this.ingSelected = ingSelected; } // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @Override public String execute() throws Exception { IndicatorGroupSet indicatorGroupSet = indicatorService.getIndicatorGroupSet( id ); indicatorGroupSet.setName( StringUtils.trimToNull( name ) ); indicatorGroupSet.setDescription( StringUtils.trimToNull( description ) ); indicatorGroupSet.setCompulsory( compulsory ); indicatorGroupSet.getMembers().clear(); for ( String id : ingSelected ) { indicatorGroupSet.getMembers().add( indicatorService.getIndicatorGroup( id ) ); } indicatorService.updateIndicatorGroupSet( indicatorGroupSet ); return SUCCESS; } }
7ad0f223e99dabce1a8d81dedadf08ff63ab986b
031b1c5b0c404f23ccd61a08845695bd4c3827f2
/project/Pat/learn/src/main/java/com/zixin/learn/sgg/datastructure/graph/Graph.java
910f1bfdcbb2c6d46917e9e0a92e9269d8803825
[]
no_license
AndyFlower/zixin
c8d957fd8b1e6ca0e1ae63389bc8151ab93dbb55
647705e5f14fae96f82d334ba1eb8a534735bfd9
refs/heads/master
2022-12-23T21:10:44.872371
2021-02-10T07:15:21
2021-02-10T07:15:21
232,578,547
1
0
null
2022-12-16T15:41:14
2020-01-08T14:13:25
Java
UTF-8
Java
false
false
5,431
java
package com.zixin.learn.sgg.datastructure.graph; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; public class Graph { private ArrayList<String> vertexList; //存储顶点集合 private int[][] edges; //存储图对应的邻结矩阵 private int numOfEdges; //表示边的数目 //定义给数组boolean[], 记录某个结点是否被访问 private boolean[] isVisited; public static void main(String[] args) { //测试一把图是否创建ok int n = 8; //结点的个数 //String Vertexs[] = {"A", "B", "C", "D", "E"}; String Vertexs[] = {"1", "2", "3", "4", "5", "6", "7", "8"}; //创建图对象 Graph graph = new Graph(n); //循环的添加顶点 for(String vertex: Vertexs) { graph.insertVertex(vertex); } //添加边 //A-B A-C B-C B-D B-E // graph.insertEdge(0, 1, 1); // A-B // graph.insertEdge(0, 2, 1); // // graph.insertEdge(1, 2, 1); // // graph.insertEdge(1, 3, 1); // // graph.insertEdge(1, 4, 1); // //更新边的关系 graph.insertEdge(0, 1, 1); graph.insertEdge(0, 2, 1); graph.insertEdge(1, 3, 1); graph.insertEdge(1, 4, 1); graph.insertEdge(3, 7, 1); graph.insertEdge(4, 7, 1); graph.insertEdge(2, 5, 1); graph.insertEdge(2, 6, 1); graph.insertEdge(5, 6, 1); //显示一把邻结矩阵 graph.showGraph(); //测试一把,我们的dfs遍历是否ok System.out.println("深度遍历"); graph.dfs(); // A->B->C->D->E [1->2->4->8->5->3->6->7] // System.out.println(); System.out.println("广度优先!"); graph.bfs(); // A->B->C->D-E [1->2->3->4->5->6->7->8] } //构造器 public Graph(int n) { //初始化矩阵和vertexList edges = new int[n][n]; vertexList = new ArrayList<String>(n); numOfEdges = 0; } //得到第一个邻接结点的下标 w /** * * @param index * @return 如果存在就返回对应的下标,否则返回-1 */ public int getFirstNeighbor(int index) { for(int j = 0; j < vertexList.size(); j++) { if(edges[index][j] > 0) { return j; } } return -1; } //根据前一个邻接结点的下标来获取下一个邻接结点 public int getNextNeighbor(int v1, int v2) { for(int j = v2 + 1; j < vertexList.size(); j++) { if(edges[v1][j] > 0) { return j; } } return -1; } //深度优先遍历算法 //i 第一次就是 0 private void dfs(boolean[] isVisited, int i) { //首先我们访问该结点,输出 System.out.print(getValueByIndex(i) + "->"); //将结点设置为已经访问 isVisited[i] = true; //查找结点i的第一个邻接结点w int w = getFirstNeighbor(i); while(w != -1) {//说明有 if(!isVisited[w]) { dfs(isVisited, w); } //如果w结点已经被访问过 w = getNextNeighbor(i, w); } } //对dfs 进行一个重载, 遍历我们所有的结点,并进行 dfs public void dfs() { isVisited = new boolean[vertexList.size()]; //遍历所有的结点,进行dfs[回溯] for(int i = 0; i < getNumOfVertex(); i++) { if(!isVisited[i]) { dfs(isVisited, i); } } } //对一个结点进行广度优先遍历的方法 private void bfs(boolean[] isVisited, int i) { int u ; // 表示队列的头结点对应下标 int w ; // 邻接结点w //队列,记录结点访问的顺序 LinkedList queue = new LinkedList(); //访问结点,输出结点信息 System.out.print(getValueByIndex(i) + "=>"); //标记为已访问 isVisited[i] = true; //将结点加入队列 queue.addLast(i); while( !queue.isEmpty()) { //取出队列的头结点下标 u = (Integer)queue.removeFirst(); //得到第一个邻接结点的下标 w w = getFirstNeighbor(u); while(w != -1) {//找到 //是否访问过 if(!isVisited[w]) { System.out.print(getValueByIndex(w) + "=>"); //标记已经访问 isVisited[w] = true; //入队 queue.addLast(w); } //以u为前驱点,找w后面的下一个邻结点 w = getNextNeighbor(u, w); //体现出我们的广度优先 } } } //遍历所有的结点,都进行广度优先搜索 public void bfs() { isVisited = new boolean[vertexList.size()]; for(int i = 0; i < getNumOfVertex(); i++) { if(!isVisited[i]) { bfs(isVisited, i); } } } //图中常用的方法 //返回结点的个数 public int getNumOfVertex() { return vertexList.size(); } //显示图对应的矩阵 public void showGraph() { for(int[] link : edges) { System.err.println(Arrays.toString(link)); } } //得到边的数目 public int getNumOfEdges() { return numOfEdges; } //返回结点i(下标)对应的数据 0->"A" 1->"B" 2->"C" public String getValueByIndex(int i) { return vertexList.get(i); } //返回v1和v2的权值 public int getWeight(int v1, int v2) { return edges[v1][v2]; } //插入结点 public void insertVertex(String vertex) { vertexList.add(vertex); } //添加边 /** * * @param v1 表示点的下标即使第几个顶点 "A"-"B" "A"->0 "B"->1 * @param v2 第二个顶点对应的下标 * @param weight 表示 */ public void insertEdge(int v1, int v2, int weight) { edges[v1][v2] = weight; edges[v2][v1] = weight; numOfEdges++; } }
d531f3ce57820ca7b93bc96e0540726ec8e354a1
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module1692_public/tests/unittests/src/java/module1692_public_tests_unittests/a/Foo1.java
c29a85a892f3f261efcfb87d038152a383c6b473
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
1,701
java
package module1692_public_tests_unittests.a; import java.rmi.*; import java.nio.file.*; import java.sql.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see java.util.logging.Filter * @see java.util.zip.Deflater * @see javax.annotation.processing.Completion */ @SuppressWarnings("all") public abstract class Foo1<H> extends module1692_public_tests_unittests.a.Foo0<H> implements module1692_public_tests_unittests.a.IFoo1<H> { javax.lang.model.AnnotatedConstruct f0 = null; javax.management.Attribute f1 = null; javax.naming.directory.DirContext f2 = null; public H element; public static Foo1 instance; public static Foo1 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return module1692_public_tests_unittests.a.Foo0.create(input); } public String getName() { return module1692_public_tests_unittests.a.Foo0.getInstance().getName(); } public void setName(String string) { module1692_public_tests_unittests.a.Foo0.getInstance().setName(getName()); return; } public H get() { return (H)module1692_public_tests_unittests.a.Foo0.getInstance().get(); } public void set(Object element) { this.element = (H)element; module1692_public_tests_unittests.a.Foo0.getInstance().set(this.element); } public H call() throws Exception { return (H)module1692_public_tests_unittests.a.Foo0.getInstance().call(); } }
8067107af47f3461e253c1f3487b42787dab2bcf
4927361cfd41599b111833cc770d0f5dd8dc81ab
/src/test/java/com/lordjoe/distributed/SparkWordCountTest.java
f012496e14b0821eb13b8cc285a216a2364f4019
[ "Apache-2.0" ]
permissive
lordjoe/SparkHydraV2
ac9b58e3d1ec4bd598f773e50a4147e9d10a15c3
ab039d3bd93a06da442207eed709e8ceb0ccea26
refs/heads/master
2022-07-22T21:23:02.901862
2020-06-15T23:39:54
2020-06-15T23:39:54
132,197,816
0
0
Apache-2.0
2020-06-15T20:54:46
2018-05-04T23:22:33
Java
UTF-8
Java
false
false
371
java
package com.lordjoe.distributed; import com.lordjoe.distributed.test.*; import org.junit.*; /** * com.lordjoe.distributed.SparkWordCount * User: Steve * Date: 9/12/2014 */ public class SparkWordCountTest { // works but runs too long //@Test public void testWordCount() { WordCountOperator.validateWordCount(SparkMapReduce.FACTORY); } }
2f7e03e43e1e2b3b6a89e3fb536866859c3264b7
7f20b1bddf9f48108a43a9922433b141fac66a6d
/core3/api/tags/api-parent-3.0.0-beta1/presentation-api/src/main/java/org/cytoscape/view/presentation/property/ArrowShapeVisualProperty.java
3729c7fb62e2dedfece545589407cd01e7d5ac11
[]
no_license
ahdahddl/cytoscape
bf783d44cddda313a5b3563ea746b07f38173022
a3df8f63dba4ec49942027c91ecac6efa920c195
refs/heads/master
2020-06-26T16:48:19.791722
2013-08-28T04:08:31
2013-08-28T04:08:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,791
java
package org.cytoscape.view.presentation.property; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import org.cytoscape.model.CyIdentifiable; import org.cytoscape.view.model.AbstractVisualProperty; import org.cytoscape.view.model.DiscreteRange; import org.cytoscape.view.presentation.property.values.AbstractVisualPropertyValue; import org.cytoscape.view.presentation.property.values.ArrowShape; /** * Visual Property for {@link ArrowShape} values. * This implementation provides basic default shapes. Rendering * Engines can provide others. * * @CyAPI.Final.Class */ public final class ArrowShapeVisualProperty extends AbstractVisualProperty<ArrowShape> { /** No arrow */ public static final ArrowShape NONE = new ArrowShapeImpl("None", "NONE"); /** Diamond shaped arrow */ public static final ArrowShape DIAMOND = new ArrowShapeImpl("Diamond", "DIAMOND"); /** Triangle shaped arrow */ public static final ArrowShape DELTA = new ArrowShapeImpl("Delta", "DELTA"); /** Pointy triangle shaped arrow */ public static final ArrowShape ARROW = new ArrowShapeImpl("Arrow", "ARROW"); /** T shaped arrow */ public static final ArrowShape T = new ArrowShapeImpl("T", "T"); /** Circle shaped arrow */ public static final ArrowShape CIRCLE = new ArrowShapeImpl("Circle", "CIRCLE"); /** Top Half of a triangle shaped arrow */ public static final ArrowShape HALF_TOP = new ArrowShapeImpl("Half Top", "HALF_TOP"); /** Bottom Half of a triangle shaped arrow */ public static final ArrowShape HALF_BOTTOM = new ArrowShapeImpl("Half Bottom", "HALF_BOTTOM"); private static final DiscreteRange<ArrowShape> ARROW_SHAPE_RANGE; private static final Map<String, ArrowShape> DEFAULT_SHAPES; static { DEFAULT_SHAPES = new HashMap<String, ArrowShape>(); DEFAULT_SHAPES.put(NONE.getSerializableString().toUpperCase(), NONE); DEFAULT_SHAPES.put(DIAMOND.getSerializableString().toUpperCase(), DIAMOND); DEFAULT_SHAPES.put(DELTA.getSerializableString().toUpperCase(), DELTA); DEFAULT_SHAPES.put(ARROW.getSerializableString().toUpperCase(), ARROW); DEFAULT_SHAPES.put(T.getSerializableString().toUpperCase(), T); DEFAULT_SHAPES.put(CIRCLE.getSerializableString().toUpperCase(), CIRCLE); DEFAULT_SHAPES.put(HALF_TOP.getSerializableString().toUpperCase(), HALF_TOP); DEFAULT_SHAPES.put(HALF_BOTTOM.getSerializableString().toUpperCase(), HALF_BOTTOM); ARROW_SHAPE_RANGE = new DiscreteRange<ArrowShape>(ArrowShape.class, new HashSet<ArrowShape>(DEFAULT_SHAPES.values())); } /** * Constructor. * @param defaultValue The default arrow shape. * @param id A machine readable string identifying this visual property used for XML serialization. * @param displayName A human readable string used for displays and user interfaces. * @param modelDataType The model data type associated with this visual property, e.g. CyNode, CyEdge, or CyNetwork. */ public ArrowShapeVisualProperty(ArrowShape defaultValue, String id, String displayName, Class<? extends CyIdentifiable> modelDataType) { super(defaultValue, ARROW_SHAPE_RANGE, id, displayName, modelDataType); } @Override public String toSerializableString(ArrowShape value) { return value.getSerializableString(); } @Override public ArrowShape parseSerializableString(String value) { ArrowShape shape = null; if (value != null) shape = DEFAULT_SHAPES.get(value.toUpperCase()); return shape; } public static boolean isDefaultShape(final ArrowShape shape) { return DEFAULT_SHAPES.containsValue(shape); } private static final class ArrowShapeImpl extends AbstractVisualPropertyValue implements ArrowShape { public ArrowShapeImpl(final String displayName, final String serializableString) { super(displayName, serializableString); } } }
[ "mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5" ]
mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5
5b4d5ee08fed0b8172400a177ae0d180554b1192
0ae9455f8602eaf225972f5912eea09227580dc4
/InnerClassExample/src/com/example/innerclassexample/InnerClassExample.java
91d2e9f2936a9a4fd5061bb5322125f986b20cd2
[]
no_license
canmurat/myworkspace
7fcb269ae881557ad4cd31450e6a8644311a8de2
7ddc97a40609b652cf2b7e5304b1c29a4d4b4393
refs/heads/master
2016-09-06T00:27:08.858902
2014-04-01T19:46:56
2014-04-01T19:46:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,343
java
package com.example.innerclassexample; import java.util.Random; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.view.Menu; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class InnerClassExample extends Activity { private View mColorRegion; private int[] mColorChoices = { Color.BLACK, Color.BLUE}; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_inner_class_example); mColorRegion = findViewById(R.id.textView1); Button colorButton = (Button)findViewById(R.id.button1); colorButton.setOnClickListener(new ColorRandomizer()); } private void setRegionColor(int color) { mColorRegion.setBackgroundColor(color); } private class ColorRandomizer implements OnClickListener { @Override public void onClick(View v) { Random generator = new Random(); int index = generator.nextInt(mColorChoices.length); setRegionColor(mColorChoices[index]); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.inner_class_example, menu); return true; } }
62b5de1f3e8f0a02710439bf45464bbd67f15fb1
4bf3544d6675ede676ab9bb2bc498689ca871a4b
/src/main/java/com/catpp/springbootpro/service/GoodsService.java
449c88750a6ea83b9016ffe73e84b7c53c27dc33
[]
no_license
Maopp/springbootpro
1d6825619e210c3c272bdcd52d85e76060869de0
31c8a40534104799503cb7b8ceec77183b0d6186
refs/heads/master
2022-06-21T14:37:37.976374
2018-12-06T09:06:51
2018-12-06T09:06:51
152,026,395
0
0
null
2022-06-17T02:45:43
2018-10-08T06:05:08
Java
UTF-8
Java
false
false
277
java
package com.catpp.springbootpro.service; import com.catpp.springbootpro.pojo.GoodInfo; /** * com.catpp.springbootpro.service * * @Author cat_pp * @Date 2018/11/1 * @Description */ public interface GoodsService { Integer save(GoodInfo goodInfo) throws Exception; }
740caab1445ca54dcf08e413b2b38d5b7c0ac10e
1cf90d282a0fff1e8e5825c3301892e07d56b87e
/app/src/main/java/com/relinns/viegram/Activity/Splash_screen.java
da0eee775e5c45efc3f6476a3560649550dfc4ba
[]
no_license
mukulraw/Viegram
79a15ab39efa0a2db111e96ddd97d7bac704d779
6dc08084103236f6928e52f1eba0ba3f324c2d1c
refs/heads/master
2021-05-03T09:12:02.597490
2018-02-07T06:19:43
2018-02-07T06:19:46
120,571,747
0
2
null
null
null
null
UTF-8
Java
false
false
2,326
java
package com.relinns.viegram.Activity; import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.os.CountDownTimer; import android.os.Bundle; import android.util.Log; import com.crashlytics.android.Crashlytics; import com.google.firebase.iid.FirebaseInstanceId; import com.relinns.viegram.R; import com.relinns.viegram.service.MyFirebaseInstanceIDService; import io.fabric.sdk.android.Fabric; public class Splash_screen extends Activity { private SharedPreferences preferences; private CountDownTimer timer; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_splash_screen); if(FirebaseInstanceId.getInstance()==null){ Log.d("instance","nhi"); } else { Log.d("instance","hai"); } new Thread() { @Override public void run() { //If there are stories, add them to the table try { // code runs in a thread runOnUiThread(new Runnable() { @Override public void run() { // new MyFirebaseInstanceIDService().onTokenRefresh(); } }); } catch (final Exception ignored) { } } }.start(); Fabric.with(this, new Crashlytics()); preferences = getSharedPreferences("Viegram", MODE_PRIVATE); if (!preferences.getString("user_id", "").equals("")) { Intent i = new Intent(Splash_screen.this, Timeline.class); startActivity(i); overridePendingTransition(R.anim.enter, R.anim.exit); } else { timer = new CountDownTimer(3000, 1000) { @Override public void onTick(long millisUntilFinished) { } @Override public void onFinish() { Intent i = new Intent(Splash_screen.this, Login_Screen.class); startActivity(i); overridePendingTransition(R.anim.enter, R.anim.exit); } }.start(); } } }
f905021c4113b1c8750a490aca32219c1f0830fc
35e8a12f96c6f46aa77907c3a3ee2af30c8c8d3f
/hub.sam.sdl.model/src/hub/sam/sdl/SdlStatePartitionInstance.java
3443cf8b71f116616f15d17d366db1b5bfe2f578
[]
no_license
markus1978/tef
36049dee71a99d24401d4a01fe33a3018e7bb776
38bfc24dc64822b7b3ed74e41f85b3a8c10c1955
refs/heads/master
2020-04-06T04:30:58.699975
2015-08-13T07:51:37
2015-08-13T07:51:37
25,520,279
1
2
null
2015-08-13T07:51:37
2014-10-21T12:13:17
Java
UTF-8
Java
false
false
1,286
java
/** * <copyright> * </copyright> * * $Id$ */ package hub.sam.sdl; import org.eclipse.emf.common.util.EList; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Sdl State Partition Instance</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link hub.sam.sdl.SdlStatePartitionInstance#getActualState <em>Actual State</em>}</li> * </ul> * </p> * * @see hub.sam.sdl.EmfSdlPackage#getSdlStatePartitionInstance() * @model * @generated */ public interface SdlStatePartitionInstance extends SdlStateInstance { /** * Returns the value of the '<em><b>Actual State</b></em>' reference list. * The list contents are of type {@link hub.sam.sdl.SdlStateInstance}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Actual State</em>' reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Actual State</em>' reference list. * @see hub.sam.sdl.EmfSdlPackage#getSdlStatePartitionInstance_ActualState() * @model required="true" ordered="false" * @generated */ EList<SdlStateInstance> getActualState(); } // SdlStatePartitionInstance
be142c6403fe82f18046d87c4fcce5d498ace07d
e78904d8699b3fddb00f48c4a53208ad538c7f62
/src/main/java/hellfirepvp/astralsorcery/common/item/gem/GemAttributeHelper.java
bf0cf039051cf7e535d85daeb3f3d18b76ab29d9
[]
no_license
jblosser/AstralSorcery
c621469144bb8e74c45b157bed7d37e83975999c
bc299b56a6dce9a8dbfa29b54d785495ef06622d
refs/heads/master
2023-01-23T07:59:54.683583
2020-12-06T09:23:41
2020-12-06T09:23:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,171
java
/******************************************************************************* * HellFirePvP / Astral Sorcery 2020 * * All rights reserved. * The source code is available on github: https://github.com/HellFirePvP/AstralSorcery * For further details, see the License file there. ******************************************************************************/ package hellfirepvp.astralsorcery.common.item.gem; import hellfirepvp.astralsorcery.common.data.config.registry.WeightedPerkAttributeRegistry; import hellfirepvp.astralsorcery.common.data.config.registry.sets.PerkAttributeEntry; import hellfirepvp.astralsorcery.common.perk.DynamicModifierHelper; import hellfirepvp.astralsorcery.common.perk.modifier.DynamicAttributeModifier; import hellfirepvp.astralsorcery.common.perk.type.ModifierType; import hellfirepvp.astralsorcery.common.perk.type.PerkAttributeType; import hellfirepvp.astralsorcery.common.util.MiscUtils; import net.minecraft.item.ItemStack; import net.minecraft.util.math.MathHelper; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.UUID; /** * This class is part of the Astral Sorcery Mod * The complete source code for this mod can be found on github. * Class: GemAttributeHelper * Created by HellFirePvP * Date: 09.08.2019 / 07:41 */ public class GemAttributeHelper { private static final Random rand = new Random(); //TODO this. at some point. private static float chance3Modifiers = 0.4F; private static float chance4Modifiers = 0.15F; private static boolean allowDuplicateTypes = false; private static float incModifierLower = 0.05F; private static float incModifierHigher = 0.08F; private static boolean allowNegativeModifiers = false; private static float chanceNegative = 0.25F; private static float decModifierLower = -0.05F; private static float decModifierHigher = -0.08F; private static boolean allowMoreLessModifiers = false; private static float chanceMultiplicative = 0.1F; private static float moreModifierLower = 0.05F; private static float moreModifierHigher = 0.08F; private static float lessModifierLower = -0.05F; private static float lessModifierHigher = -0.08F; public static boolean rollGem(ItemStack gem) { return rollGem(gem, rand); } public static boolean rollGem(ItemStack gem, Random random) { if (!DynamicModifierHelper.getStaticModifiers(gem).isEmpty()) { return false; } GemType gemType = ItemPerkGem.getGemType(gem); if (gemType == null) { return false; } int rolls = getPotentialMods(random, gemType.countModifier); List<DynamicAttributeModifier> mods = new ArrayList<>(); List<PerkAttributeEntry> configuredModifiers = WeightedPerkAttributeRegistry.INSTANCE.getConfiguredValues(); for (int i = 0; i < rolls; i++) { PerkAttributeEntry entry = null; if (allowDuplicateTypes) { entry = MiscUtils.getWeightedRandomEntry(configuredModifiers, random, PerkAttributeEntry::getWeight); } else { List<PerkAttributeEntry> keys = new ArrayList<>(configuredModifiers); while (!keys.isEmpty() && entry == null) { PerkAttributeEntry item = getWeightedResultAndRemove(keys, random); if (item != null) { boolean foundType = false; for (DynamicAttributeModifier m : mods) { if (m.getAttributeType().equals(item.getType())) { foundType = true; break; } } if (foundType) { continue; } entry = item; } } } if (entry == null) { continue; } boolean isNegative = allowNegativeModifiers && random.nextFloat() < chanceNegative; boolean isMultiplicative = allowMoreLessModifiers && random.nextFloat() < chanceMultiplicative; float lower = isNegative ? (isMultiplicative ? lessModifierLower : decModifierLower) : (isMultiplicative ? moreModifierLower : incModifierLower); float higher = isNegative ? (isMultiplicative ? lessModifierHigher : decModifierHigher) : (isMultiplicative ? moreModifierHigher : incModifierHigher); float value; if (lower > higher) { value = lower; } else { float exp = 1F / gemType.amplifierModifier; float multiplierScale = (float) Math.pow(random.nextFloat(), exp); value = lower + (MathHelper.clamp(multiplierScale, 0F, 1F) * (higher - lower)); } ModifierType mode = isMultiplicative ? ModifierType.STACKING_MULTIPLY : ModifierType.ADDED_MULTIPLY; float rValue = isMultiplicative ? 1F + value : value; PerkAttributeType type = entry.getType(); if (allowDuplicateTypes) { DynamicAttributeModifier existing = MiscUtils.iterativeSearch(mods, mod -> mod.getAttributeType().equals(type) && mod.getMode().equals(mode)); if (existing != null) { mods.remove(existing); float combinedValue; if (isMultiplicative) { combinedValue = (existing.getRawValue() - 1F) + (rValue - 1F); } else { combinedValue = existing.getRawValue() + rValue; } if (combinedValue != 0F) { mods.add(new DynamicAttributeModifier(UUID.randomUUID(), type, mode, isMultiplicative ? combinedValue + 1 : combinedValue)); } //If == 0 -> don't re-add anything. } else { mods.add(new DynamicAttributeModifier(UUID.randomUUID(), type, mode, rValue)); } } else { mods.add(new DynamicAttributeModifier(UUID.randomUUID(), type, mode, rValue)); } } DynamicModifierHelper.addModifiers(gem, mods); return true; } @Nullable private static PerkAttributeEntry getWeightedResultAndRemove(List<PerkAttributeEntry> list, Random random) { if (list.isEmpty()) { return null; } PerkAttributeEntry result = MiscUtils.getWeightedRandomEntry(list, random, PerkAttributeEntry::getWeight); if (result != null) { list.remove(result); } return result; } private static int getPotentialMods(Random random, float countModifier) { int mods = 2; if (random.nextFloat() < (chance3Modifiers + countModifier)) { mods++; if (random.nextFloat() < (chance4Modifiers + countModifier)) { mods++; } } return mods; } }
6ab53615e30a9a56bd02c449878fe06916f458ad
37d8b470e71ea6edff6ed108ffd2b796322b7943
/zcms/src/com/zving/framework/ResponseImpl.java
1fc8861a54293065945f2dfc62228c196cac67b0
[]
no_license
haifeiforwork/myfcms
ef9575be5fc7f476a048d819e7c0c0f2210be8ca
fefce24467df59d878ec5fef2750b91a29e74781
refs/heads/master
2020-05-15T11:37:50.734759
2014-06-28T08:31:55
2014-06-28T08:31:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,244
java
package com.zving.framework; import com.zving.framework.data.DataCollection; public class ResponseImpl extends DataCollection { private static final long serialVersionUID = 1L; public int Status = 1; public String Message = ""; public String getMessage() { return this.Message; } public void setError(String message) { setMessage(message); setStatus(0); } public void setMessage(String message) { this.Message = message; put("_ZVING_MESSAGE", this.Message); } public int getStatus() { return this.Status; } public void setStatus(int status) { this.Status = status; put("_ZVING_STATUS", this.Status); } public void setLogInfo(int status, String message) { this.Status = status; put("_ZVING_STATUS", this.Status); this.Message = message; put("_ZVING_MESSAGE", this.Message); } public String toXML() { put("_ZVING_STATUS", this.Status); return super.toXML(); } } /* Location: F:\JAVA\Tomcat5.5\webapps\zcms\WEB-INF\classes\ * Qualified Name: com.zving.framework.ResponseImpl * JD-Core Version: 0.5.3 */
[ "[email protected]@c1c2bf6e-ae9d-b823-7fc2-ff1dc594729e" ]
[email protected]@c1c2bf6e-ae9d-b823-7fc2-ff1dc594729e
02101a42c41b2311fe7d8da71c0b60ee32067457
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module666/src/main/java/module666packageJava0/Foo121.java
f187de859482444c1ea98987b2f2689ff61ed72c
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
719
java
package module666packageJava0; import java.lang.Integer; public class Foo121 { Integer int0; Integer int1; public void foo0() { new module666packageJava0.Foo120().foo13(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } public void foo6() { foo5(); } public void foo7() { foo6(); } public void foo8() { foo7(); } public void foo9() { foo8(); } public void foo10() { foo9(); } public void foo11() { foo10(); } public void foo12() { foo11(); } public void foo13() { foo12(); } }
11c65506bc286ca937aa0a3b889ab1aa578633c9
ced11fd402c75ef685e72ac88910ce2b69daa2ff
/workbench/src/main/java/org/fourthline/cling/workbench/plugins/avtransport/impl/ProgressPanel.java
b877663351cc02d3fded6c67c27d425267fff9b7
[]
no_license
COLTRAM/cling
eeedde664de2995c56cdb1b4e0452ee3628d72f6
02a30774315a6f26da4a916c4ef88ce18f7d86df
refs/heads/master
2021-01-14T14:29:04.853829
2014-04-02T16:16:39
2014-04-02T16:16:39
18,370,971
2
1
null
null
null
null
UTF-8
Java
false
false
3,183
java
/* * Copyright (C) 2013 4th Line GmbH, Switzerland * * The contents of this file are subject to the terms of either the GNU * Lesser General Public License Version 2 or later ("LGPL") or the * Common Development and Distribution License Version 1 or later * ("CDDL") (collectively, the "License"). You may not use this file * except in compliance with the License. See LICENSE.txt for more * information. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ package org.fourthline.cling.workbench.plugins.avtransport.impl; import org.fourthline.cling.support.model.PositionInfo; import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSlider; import javax.swing.event.ChangeListener; import java.awt.Dimension; /** * @author Christian Bauer */ public class ProgressPanel extends JPanel { final private JSlider positionSlider = new JSlider(0, 100, 0); final private JLabel positionLabel = new JLabel(); private PositionInfo positionInfo; public ProgressPanel() { super(); setBorder(BorderFactory.createTitledBorder("Position")); setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); positionLabel.setText("00:00:00/00:00:00"); positionLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); positionSlider.setEnabled(false); positionSlider.setPreferredSize(new Dimension(200, 24)); add(positionSlider); add(positionLabel); } public JSlider getPositionSlider() { return positionSlider; } public void setProgress(PositionInfo positionInfo) { if (positionInfo == null) { positionLabel.setText("00:00:00/00:00:00"); setPositionSliderWithoutNotification(0); } else { if (positionInfo.getTrackDurationSeconds() > 0) { positionLabel.setText(positionInfo.getRelTime() + "/" + positionInfo.getTrackDuration()); setPositionSliderWithoutNotification(positionInfo.getElapsedPercent()); positionSlider.setEnabled(true); } else { positionLabel.setText(positionInfo.getRelTime()); positionSlider.setEnabled(false); } } this.positionInfo = positionInfo; } // Internal re-positioning, should not fire a Seek UPnP action, so we remove // the listener before and add it back afterwards protected void setPositionSliderWithoutNotification(int value) { if (value == positionSlider.getValue()) return; ChangeListener[] listeners = positionSlider.getChangeListeners(); for (ChangeListener listener : listeners) { positionSlider.removeChangeListener(listener); } positionSlider.setValue(value); for (ChangeListener listener : listeners) { positionSlider.addChangeListener(listener); } } public PositionInfo getPositionInfo() { return positionInfo; } }
1a1d6e52ff0563183e2303d1304fe623a57c9c30
64a9624c726eda649644b3f8b225ef934f997b96
/src/main/java/org/zalando/intellij/swagger/completion/field/model/common/ArrayField.java
bf8eed20d4e9bb58faa1607cf1f35cf0ccca3ced
[ "MIT" ]
permissive
WouldYouKindly/intellij-swagger
bb77e1c4dec91520407289a0d0753e599712e0a2
3ef9039330de169e439862f2b590d07679583231
refs/heads/master
2021-09-09T19:28:45.670690
2018-03-17T12:57:38
2018-03-17T12:57:38
125,818,971
0
0
MIT
2018-03-19T07:35:33
2018-03-19T07:35:33
null
UTF-8
Java
false
false
1,415
java
package org.zalando.intellij.swagger.completion.field.model.common; import org.apache.commons.lang.StringUtils; import static org.zalando.intellij.swagger.file.FileConstants.CARET; public class ArrayField extends Field { public ArrayField(final String name) { super(name, false); } @Override public String getJsonPlaceholderSuffix(final int indentation) { final String indentationPadding = StringUtils.repeat(" ", indentation); final String nextLineIndentationPadding = StringUtils.repeat(" ", indentation + 2); return ": [\n" + nextLineIndentationPadding + CARET + "\n" + indentationPadding + "]"; } @Override public String getYamlPlaceholderSuffix(final int indentation) { final String nextLineIndentationPadding = StringUtils.repeat(" ", indentation + 2); return ":\n" + nextLineIndentationPadding + "- " + CARET; } @Override public String getCompleteJson(final int indentation) { final String indentationPadding = StringUtils.repeat(" ", indentation); return indentationPadding + "\"" + getName() + "\"" + getJsonPlaceholderSuffix(indentation); } @Override public String getCompleteYaml(final int indentation) { final String indentationPadding = StringUtils.repeat(" ", indentation); return indentationPadding + getName() + getYamlPlaceholderSuffix(indentation); } }
06d5d5738a562d2f7d446d0bc09f75bfecc3d8ba
3b481b302b02edf57b816acac9e5ff3b7ec602e2
/src/com/twitter/app/lists/i.java
bbdf92b87c85892b73b99eb42a13668ee4789d42
[]
no_license
reverseengineeringer/com.twitter.android
53338ae009b2b6aa79551a8273875ec3728eda99
f834eee04284d773ccfcd05487021200de30bd1e
refs/heads/master
2021-04-15T04:35:06.232782
2016-07-21T03:51:19
2016-07-21T03:51:19
63,835,046
1
1
null
null
null
null
UTF-8
Java
false
false
244
java
package com.twitter.app.lists; abstract interface i { public abstract void a(long paramLong, String paramString); } /* Location: * Qualified Name: com.twitter.app.lists.i * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
5e466264fa787faec5abe35aa8cbfdef6474e16d
97fd02f71b45aa235f917e79dd68b61c62b56c1c
/src/main/java/com/tencentcloudapi/rum/v20210622/models/DescribeScoresResponse.java
d44d7924771709d25495d89884846aa907f2a84f
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-java
7df922f7c5826732e35edeab3320035e0cdfba05
09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec
refs/heads/master
2023-09-04T10:51:57.854153
2023-09-01T03:21:09
2023-09-01T03:21:09
129,837,505
537
317
Apache-2.0
2023-09-13T02:42:03
2018-04-17T02:58:16
Java
UTF-8
Java
false
false
3,197
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.rum.v20210622.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class DescribeScoresResponse extends AbstractModel{ /** * 数组 */ @SerializedName("ScoreSet") @Expose private ScoreInfo [] ScoreSet; /** * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ @SerializedName("RequestId") @Expose private String RequestId; /** * Get 数组 * @return ScoreSet 数组 */ public ScoreInfo [] getScoreSet() { return this.ScoreSet; } /** * Set 数组 * @param ScoreSet 数组 */ public void setScoreSet(ScoreInfo [] ScoreSet) { this.ScoreSet = ScoreSet; } /** * Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public String getRequestId() { return this.RequestId; } /** * Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } public DescribeScoresResponse() { } /** * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, * and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. */ public DescribeScoresResponse(DescribeScoresResponse source) { if (source.ScoreSet != null) { this.ScoreSet = new ScoreInfo[source.ScoreSet.length]; for (int i = 0; i < source.ScoreSet.length; i++) { this.ScoreSet[i] = new ScoreInfo(source.ScoreSet[i]); } } if (source.RequestId != null) { this.RequestId = new String(source.RequestId); } } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamArrayObj(map, prefix + "ScoreSet.", this.ScoreSet); this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
8f220c88409b39f90000b79e3a3bb76cfedf6011
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_8e877ffeb0d0dc55a308efe8d1727337fd72af2d/MethodInvocationAndReturnTest/9_8e877ffeb0d0dc55a308efe8d1727337fd72af2d_MethodInvocationAndReturnTest_s.java
a91d653c80d711d49f4a6887a263bc64a2555789
[]
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
4,061
java
/* * Copyright (C) 2007 Pekka Enberg * * This file is released under the GPL version 2 with the following * clarification and special exception: * * Linking this library statically or dynamically with other modules is * making a combined work based on this library. Thus, the terms and * conditions of the GNU General Public License cover the whole * combination. * * As a special exception, the copyright holders of this library give you * permission to link this library with independent modules to produce an * executable, regardless of the license terms of these independent * modules, and to copy and distribute the resulting executable under terms * of your choice, provided that you also meet, for each linked independent * module, the terms and conditions of the license of that module. An * independent module is a module which is not derived from or based on * this library. If you modify this library, you may extend this exception * to your version of the library, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your * version. * * Please refer to the file LICENSE for details. */ package jvm; /** * @author Pekka Enberg */ public class MethodInvocationAndReturnTest extends TestCase { public static void testReturnFromInvokeVirtualReinstatesTheFrameOfTheInvoker() { Dispatcher dispatcher = new Dispatcher(); assertEquals(dispatcher, dispatcher.self); InvocationTarget target = new InvocationTarget(); assertEquals(target, target.self); dispatcher.dispatch(target); assertEquals(dispatcher, dispatcher.self); assertEquals(target, target.self); } public static class Dispatcher { public Object self; public Dispatcher() { this.self = this; } public void dispatch(InvocationTarget target) { target.invoke(); } } public static class InvocationTarget { public Object self; public InvocationTarget() { this.self = this; } public void invoke() { } } public static void testInvokeVirtualInvokesSuperClassMethodIfMethodIsNotOverridden() { SuperClass c = new NonOverridingSubClass(); assertEquals(0, c.value()); } public static void testInvokeVirtualInvokesSubClassMethodIfMethodIsOverridden() { SuperClass c = new OverridingSubClass(); assertEquals(1, c.value()); } public static class NonOverridingSubClass extends SuperClass { } public static class OverridingSubClass extends SuperClass { public int value() { return 1; } } public static class SuperClass { public int value() { return 0; } } public static void testRecursiveInvocation() { assertEquals(3, recursive(2)); } public static int recursive(int n) { if (n == 0) return n; return n + recursive(n - 1); } public static void testInvokestaticLongReturnValue() { assertEquals(Long.MIN_VALUE, f(Long.MIN_VALUE)); assertEquals(Long.MAX_VALUE, f(Long.MAX_VALUE)); } public static long f(long x) { return x; } public static void testInvokevirtualLongReturnValue() { F f = new F(); assertEquals(Long.MIN_VALUE, f.f(Long.MIN_VALUE)); assertEquals(Long.MAX_VALUE, f.f(Long.MAX_VALUE)); } public static class F { public long f(long x) { return x; } } public static void main(String[] args) { testReturnFromInvokeVirtualReinstatesTheFrameOfTheInvoker(); testInvokeVirtualInvokesSuperClassMethodIfMethodIsNotOverridden(); testRecursiveInvocation(); testInvokestaticLongReturnValue(); testInvokevirtualLongReturnValue(); } }
fd5bdf754b9db5c3a5263be178182e7099a6a924
be588f9903b4491dd1b52ad8c9e872f3f91e274a
/authserver/src/main/java/com/ddastudio/auth/config/BeanConfig.java
8c9f0c20625328afa8fa0f51a941160d15316411
[]
no_license
messi1913/fishing-wang
36ac9cd65eb855420512a407cd4f9fde185802c3
30f195c40fa0f350f23e73293ba6f45bc4ea4c03
refs/heads/master
2020-07-04T02:52:03.552506
2019-08-15T03:47:51
2019-08-15T03:47:51
202,130,104
0
0
null
null
null
null
UTF-8
Java
false
false
770
java
package com.ddastudio.auth.config; import org.modelmapper.Conditions; import org.modelmapper.ModelMapper; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.crypto.factory.PasswordEncoderFactories; import org.springframework.security.crypto.password.PasswordEncoder; @Configuration public class BeanConfig { @Bean public ModelMapper modelMapper() { ModelMapper modelMapper = new ModelMapper(); modelMapper.getConfiguration().setPropertyCondition(Conditions.isNotNull()); return modelMapper; } @Bean public PasswordEncoder passwordEncoder(){ return PasswordEncoderFactories.createDelegatingPasswordEncoder(); } }
0c89eb4d152d92b909b99a26b54aa51e6feeb7f0
88fa5202233b149f24aa1640125fcbd7d8c2e9a5
/src/main/java/arithmetic/BinarySearchTree/LinkedListSet.java
f724be516abbb835ec8377b0438cd013c4f83087
[]
no_license
never123450/the-data-structure
03c89c12a0e12d52d43dd2e83a0ea90a1fbe33dd
3ca52debe2e00c1e66dbd0dde29b1a9942f471e7
refs/heads/master
2020-04-17T00:04:31.576460
2019-01-24T14:11:55
2019-01-24T14:11:55
166,036,311
0
0
null
null
null
null
UTF-8
Java
false
false
689
java
package arithmetic.BinarySearchTree; import arithmetic.LinkedList.LinkedList; public class LinkedListSet<E> implements Set<E> { private LinkedList<E> list; public LinkedListSet() { list = new LinkedList<>(); } @Override public void add(E e) { if (!list.contains(e)) { list.addFirst(e); } } @Override public void remove(E e) { list.removeElement(e); } @Override public boolean contains(E e) { return list.contains(e); } @Override public int getSize() { return list.getSize(); } @Override public boolean isEmpty() { return list.isEmpty(); } }
9c389582f71960282ed535cad80ec5523054fe79
79bdb304316cba76c0be112d78a1dc594c0c4a01
/WiFiModel/src/main/java/com/znt/wificonnector/WifiConnectionReceiver.java
3626e0dd8acfb5c55e8d3cb234da06f80ff980de
[]
no_license
HotterYu/DianYinBox
0e075b0b7f0bf78553ff699d72180edbe8a1542f
1eadff3c8187ba5e796794b0d44d81d5f87efe7e
refs/heads/master
2020-05-15T15:31:26.715247
2019-06-19T03:13:16
2019-06-19T03:13:16
174,515,846
0
1
null
null
null
null
UTF-8
Java
false
false
3,641
java
/* * Created by Jose Flavio on 10/18/17 12:49 PM. * Copyright (c) 2017 JoseFlavio. * All rights reserved. */ package com.znt.wificonnector; import android.annotation.SuppressLint; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.wifi.SupplicantState; import android.net.wifi.WifiManager; import android.util.Log; /** * WifiConnectionReceiver * * @author Jose Flavio - [email protected] * @since 18/10/17 */ class WifiConnectionReceiver extends BroadcastReceiver { private WifiConnector wifiConnector; public WifiConnectionReceiver(WifiConnector wifiConnector) { this.wifiConnector = wifiConnector; } @SuppressLint("NewApi") @Override public void onReceive(Context c, Intent intent) { if (wifiConnector.getConnectionResultListener() == null) return; String action = intent.getAction(); if (WifiManager.SUPPLICANT_STATE_CHANGED_ACTION.equals(action)) { SupplicantState state = intent.getParcelableExtra(WifiManager.EXTRA_NEW_STATE); wifiLog("Connection state: " + state); wifiConnector.getConnectionResultListener().onStateChange(state); switch (state) { case COMPLETED: wifiLog("Connection to Wifi was successfully completed...\n" + "Connected to BSSID: " + wifiConnector.getWifiManager().getConnectionInfo().getBSSID() + " And SSID: " + wifiConnector.getWifiManager().getConnectionInfo().getSSID()); if (wifiConnector.getWifiManager().getConnectionInfo().getBSSID() != null) { wifiConnector.setCurrentWifiSSID(wifiConnector.getWifiManager().getConnectionInfo().getSSID()); wifiConnector.setCurrentWifiBSSID(wifiConnector.getWifiManager().getConnectionInfo().getBSSID()); wifiConnector.getConnectionResultListener().successfulConnect(wifiConnector.getCurrentWifiSSID()); wifiConnector.unregisterWifiConnectionListener(); } // if BSSID is null, may be is still triying to get information about the access point break; case DISCONNECTED: int supl_error = intent.getIntExtra(WifiManager.EXTRA_SUPPLICANT_ERROR, -1); wifiLog("Disconnected... Supplicant error: " + supl_error); // only remove broadcast listener if error was ERROR_AUTHENTICATING if (supl_error == WifiManager.ERROR_AUTHENTICATING) { wifiLog("Authentication error..."); if (wifiConnector.deleteWifiConf()) { wifiConnector.getConnectionResultListener().errorConnect(WifiConnector.AUTHENTICATION_ERROR); } else { wifiConnector.getConnectionResultListener().errorConnect(WifiConnector.UNKOWN_ERROR); } wifiConnector.unregisterWifiConnectionListener(); } break; case AUTHENTICATING: wifiLog("Authenticating..."); break; } } } private void wifiLog(String text) { if (wifiConnector.isLogOrNot()) Log.d(WifiConnector.TAG, "ConnectionReceiver: " + text); } }
74b060c465a461d9b1afd9787f0a6621b468995a
f2d085998273b0da3e91a6a18ec036e125e1c443
/app/src/main/java/io/pello/android/intentssample/AnotherActivity.java
67968ebdd92793b5151d56c6bf1819c28e19427f
[]
no_license
pxai/android-intentssample
d1fe99581d807751394bc86c7abc0e41cfb19e6a
aae3f7f97bb443b515087bbd183ca3cec92db578
refs/heads/master
2021-01-12T12:59:46.085728
2016-09-21T23:35:57
2016-09-21T23:35:57
68,866,369
0
0
null
null
null
null
UTF-8
Java
false
false
873
java
package io.pello.android.intentssample; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.widget.TextView; /** * AnotherActivity shows how to get extra parameters from intent * @author Pello Xabier Altadill Izura * @greetz Mr. Remírez */ public class AnotherActivity extends Activity { private TextView textView1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.another_activity); textView1 = (TextView) findViewById(R.id.intentParameter); if (null != savedInstanceState) Log.d("PELLODEBUG","Bundle contents: " + savedInstanceState.toString()); Log.d("PELLODEBUG","Passed parameter through intent: " + getIntent().getStringExtra("extraValue")); textView1.setText( getIntent().getStringExtra("extraValue")); } }
051571bb9fd327654e7b4eec57d0dadfcf6e6b96
3d4349c88a96505992277c56311e73243130c290
/Preparation/processed-dataset/god-class_4_983/12.java
7483562d34e762ac74f3d673c0f38cc315c38779
[]
no_license
D-a-r-e-k/Code-Smells-Detection
5270233badf3fb8c2d6034ac4d780e9ce7a8276e
079a02e5037d909114613aedceba1d5dea81c65d
refs/heads/master
2020-05-20T00:03:08.191102
2019-05-15T11:51:51
2019-05-15T11:51:51
185,272,690
7
4
null
null
null
null
UTF-8
Java
false
false
380
java
private ClassLoader findClassloader() { // work-around set context loader for windows-service started jvms (QUARTZ-748) if (Thread.currentThread().getContextClassLoader() == null && getClass().getClassLoader() != null) { Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); } return Thread.currentThread().getContextClassLoader(); }
64aa4218a1b32c0d526500dbe3fb3301f2b456c4
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/51/org/apache/commons/math/dfp/DfpField_newDfp_342.java
dd2d25724586ce0e74f1f7a015d9feea7048cddb
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
900
java
org apach common math dfp field decim float point instanc version dfp field dfpfield field dfp creat instanc param convert instanc link dfp dfp dfp newdfp dfp
62bda9d6f94ae7a5628ff6b50df2aeec4f4fcb65
178ef1239b7b188501395c4d3db3f0266b740289
/android/os/MessageProto.java
290c38a1ffad8a13f3e5ae48263fb36812dd0655
[]
no_license
kailashrs/5z_framework
b295e53d20de0b6d2e020ee5685eceeae8c0a7df
1b7f76b1f06cfb6fb95d4dd41082a003d7005e5d
refs/heads/master
2020-04-26T12:31:27.296125
2019-03-03T08:58:23
2019-03-03T08:58:23
173,552,503
1
0
null
null
null
null
UTF-8
Java
false
false
495
java
package android.os; public final class MessageProto { public static final long ARG1 = 1120986464260L; public static final long ARG2 = 1120986464261L; public static final long BARRIER = 1120986464264L; public static final long CALLBACK = 1138166333442L; public static final long OBJ = 1138166333446L; public static final long TARGET = 1138166333447L; public static final long WHAT = 1120986464259L; public static final long WHEN = 1112396529665L; public MessageProto() {} }
b52b20f07d01be16b3e9aae5fe3ce9be441e8abe
1baaa53016ac06a291d6ac9c7a4c6e4d4a87c51c
/zb-wechat/zb-wechat-rpc-api/src/main/java/pers/zb/wechat/rpc/api/wxapi/coupon/manage/model/BaseInfo.java
6ad1b7c86f49582425a2e4d73e64d15d619ad221
[]
no_license
tapate/-
7a4e0354a1c56afcb5d6f0c9f23059277e24e54a
e9e9d99911d8134794f3d55850a1e1000629389f
refs/heads/master
2020-04-23T13:31:31.807404
2017-08-11T07:39:54
2017-08-11T07:39:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,988
java
package pers.zb.wechat.rpc.api.wxapi.coupon.manage.model; import java.util.List; /** * 基本的卡券数据. */ public class BaseInfo { // card_id private String id; // 卡券的商户logo private String logo_url; // code 码展示类型 请参考常量类 CardConsts.CodeType private String code_type; // 商户名字 private String brand_name; // 券名 private String title; // 券颜色。色彩规范标注值对应的色值。如#3373bb private String color; // 使用提醒。(一句话描述,展示在首页) private String notice; // 客服电话 private String service_phone; // 使用说明。长文本描述,可以分行。 private String description; // 每人使用次数限制。 private Integer use_limit; // 每人最大领取次数。 private Integer get_limit; // 是否自定义code 码。 private String use_custom_code; // 是否指定用户领取。 private String bind_openid; // 领取卡券原生页面是否可分享,填写 true 或false,true 代表可分享。默认可分享。 private boolean can_share; // 卡券是否可转赠,填写true 或false,true 代表可转赠。默认可转赠。 private boolean can_give_friend; // 门店位置ID。 private List<Integer> location_id_list; // update-begin----author:scott-----date:20150825---for:礼券获取详细信息报错处理----- private List<String> js_oauth_uin_list; public List<String> getJs_oauth_uin_list() { return js_oauth_uin_list; } public void setJs_oauth_uin_list(List<String> js_oauth_uin_list) { this.js_oauth_uin_list = js_oauth_uin_list; } // update-end----author:scott-----date:20150825---for:礼券获取详细信息报错处理----- // 使用日期,有效期的信息。 private DateInfo date_info; // 商品信息。 private Sku sku; // 商户自定义cell 名称,与custom_url 字段共同使用,目前支持类型参考 常量类CardConsts.UrlNameType。 private String url_name_type; // 商户自定义cell 跳转外链的地址链 接,跳转页面内容需与自定义cell 名称保持一致。 private String custom_url; // 第三方来源名,例如同程旅游、格瓦拉。 private String source; // 卡券状态,请参考常量类 CardConsts.Status private String status; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getLogo_url() { return logo_url; } public void setLogo_url(String logo_url) { this.logo_url = logo_url; } public String getCode_type() { return code_type; } public void setCode_type(String code_type) { this.code_type = code_type; } public String getBrand_name() { return brand_name; } public void setBrand_name(String brand_name) { this.brand_name = brand_name; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } public String getNotice() { return notice; } public void setNotice(String notice) { this.notice = notice; } public String getService_phone() { return service_phone; } public void setService_phone(String service_phone) { this.service_phone = service_phone; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Integer getUse_limit() { return use_limit; } public void setUse_limit(Integer use_limit) { this.use_limit = use_limit; } public Integer getGet_limit() { return get_limit; } public void setGet_limit(Integer get_limit) { this.get_limit = get_limit; } public String getUse_custom_code() { return use_custom_code; } public void setUse_custom_code(String use_custom_code) { this.use_custom_code = use_custom_code; } public String getBind_openid() { return bind_openid; } public void setBind_openid(String bind_openid) { this.bind_openid = bind_openid; } public boolean isCan_share() { return can_share; } public void setCan_share(boolean can_share) { this.can_share = can_share; } public boolean isCan_give_friend() { return can_give_friend; } public void setCan_give_friend(boolean can_give_friend) { this.can_give_friend = can_give_friend; } public List<Integer> getLocation_id_list() { return location_id_list; } public void setLocation_id_list(List<Integer> location_id_list) { this.location_id_list = location_id_list; } public DateInfo getDate_info() { return date_info; } public void setDate_info(DateInfo date_info) { this.date_info = date_info; } public Sku getSku() { return sku; } public void setSku(Sku sku) { this.sku = sku; } public String getUrl_name_type() { return url_name_type; } public void setUrl_name_type(String url_name_type) { this.url_name_type = url_name_type; } public String getCustom_url() { return custom_url; } public void setCustom_url(String custom_url) { this.custom_url = custom_url; } public String getSource() { return source; } public void setSource(String source) { this.source = source; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } }
cf606b1a87657bf1d6c125e1fa92d7fe37c16061
6240a87133481874e293b36a93fdb64ca1f2106c
/taobao/src/com/taobao/api/response/ItemUpdateListingResponse.java
397c154f3ba3631b5485175a3237253b60caa38b
[]
no_license
mrzeng/comments-monitor
596ba8822d70f8debb630f40b548f62d0ad48bd4
1451ec9c14829c7dc29a2297a6f3d6c4e490dc13
refs/heads/master
2021-01-15T08:58:05.997787
2013-07-17T16:29:23
2013-07-17T16:29:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
665
java
package com.taobao.api.response; import com.taobao.api.internal.mapping.ApiField; import com.taobao.api.domain.Item; import com.taobao.api.TaobaoResponse; /** * TOP API: taobao.item.update.listing response. * * @author auto create * @since 1.0, null */ public class ItemUpdateListingResponse extends TaobaoResponse { private static final long serialVersionUID = 4711135221549954989L; /** * 上架后返回的商品信息:返回的结果就是:num_iid和modified */ @ApiField("item") private Item item; public void setItem(Item item) { this.item = item; } public Item getItem( ) { return this.item; } }
6215971fbfb18519a90b8683b07700c9d28aef2a
034416becb36f4a9922053daf5f1175349a2843f
/mmall-oms/mmall-oms-api/src/main/java/com/xyl/mmall/oms/report/meta/OmsReceiptDaily.java
9a50c7e3b3972cbbb5ea47cf551018368e6048dc
[]
no_license
timgle/utilcode
40ee8d05e96ac324f452fccb412e07b4465e5345
a8c81c90ec1965d45589dd7be8d2c8b0991a6b6a
refs/heads/master
2021-05-09T22:39:11.417003
2016-03-20T14:30:52
2016-03-20T14:30:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,904
java
package com.xyl.mmall.oms.report.meta; import java.io.Serializable; import com.netease.print.daojar.meta.annotation.AnnonOfClass; import com.netease.print.daojar.meta.annotation.AnnonOfField; @AnnonOfClass(desc = "oms签收情况", tableName = "Mmall_Oms_Report_ReceiptDaily") public class OmsReceiptDaily implements Serializable { private static final long serialVersionUID = 1L; @AnnonOfField(desc = "自增主键", primary = true, autoAllocateId = true) private long id; @AnnonOfField(desc = "仓库编号") private long warehouseId; @AnnonOfField(desc = "妥投数") private int total; @AnnonOfField(desc = "时间范围") private int type; @AnnonOfField(desc = "未签收,即未妥投") private int no_receipt; @AnnonOfField(desc = "日期") private long date; @AnnonOfField(desc = "创建日期") private long createTime; @AnnonOfField(desc = "更新日期") private long updateTime; public long getId() { return id; } public void setId(long id) { this.id = id; } public long getWarehouseId() { return warehouseId; } public void setWarehouseId(long warehouseId) { this.warehouseId = warehouseId; } public int getTotal() { return total; } public void setTotal(int total) { this.total = total; } public int getType() { return type; } public void setType(int type) { this.type = type; } public int getNo_receipt() { return no_receipt; } public void setNo_receipt(int no_receipt) { this.no_receipt = no_receipt; } public long getDate() { return date; } public void setDate(long date) { this.date = date; } public long getCreateTime() { return createTime; } public void setCreateTime(long createTime) { this.createTime = createTime; } public long getUpdateTime() { return updateTime; } public void setUpdateTime(long updateTime) { this.updateTime = updateTime; } }
1433e53e866d1fb8310ef0c73c85242de6f51a75
ca021ff2fb3d5abdaf7f65fbaab776e869ccd7a5
/src/ebay/UniqueBinarySearchTrees.java
c1e4f230e4636b37eb527a53ca2bdc1793bc14da
[]
no_license
teddywang1992/leetcode
56ab4c072c9f0f2db31a0721294b1619a12856cd
7d676f2e67a1a2ba073a5c11fc5f17e8c6b77e69
refs/heads/master
2021-01-22T18:07:23.152614
2018-11-24T22:46:09
2018-11-24T22:46:09
100,737,117
0
0
null
null
null
null
UTF-8
Java
false
false
378
java
package ebay; public class UniqueBinarySearchTrees { public int numTrees(int n) { if (n <= 1) return 1; int[] dp = new int[n + 1]; dp[0] = 1; dp[1] = 1; for (int i = 2; i < n + 1; i++) { for (int j = 0; j < i; j++) { dp[i] += dp[i - j - 1] * dp[j]; } } return dp[n]; } }
2241aee55521a29a68d59d8fd01106e8ad823ce6
11babced1f48d7a4d9353da64f278b25384d5acd
/CSEIII/StockHubWeb/src/VO/marketVO/SimpleInvestVO.java
40d23ee00de9cca227398ddaa63d8263c279adfd
[]
no_license
Apocalpyse/NJU-SE3
08daf05f9f98569b892fa41cd706f7445eb9baf2
27ae6915830a4087d2eb9350257fb5513c6d8692
refs/heads/master
2020-03-11T02:04:58.892123
2018-04-16T08:43:37
2018-04-16T08:43:37
129,316,413
0
0
null
null
null
null
UTF-8
Java
false
false
710
java
package VO.marketVO; /** * Created by chenjin on 2017/6/8. */ public class SimpleInvestVO { private String investID; private String title; private String author; public SimpleInvestVO() { } public SimpleInvestVO(String investID, String title, String author) { this.investID = investID; this.title = title; this.author = author; } public String getInvestID() { return investID; } public void setInvestID(String investID) { this.investID = investID; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } }
9918365623cc1f22561ca756c552af55fe609458
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/26/26_cc4b75d4857e66e1efaf3dc6f7d7bcc4216cb95f/SessionMonitor/26_cc4b75d4857e66e1efaf3dc6f7d7bcc4216cb95f_SessionMonitor_s.java
55e008f051cab042e80c16490ec0bc0e888fa5e6
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,402
java
/******************************************************************************* * Copyright (c) 2012 Google, Inc. * 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: * Google, Inc. - initial API and implementation *******************************************************************************/ package com.windowtester.eclipse.ui.session; import java.util.ArrayList; import java.util.List; import com.windowtester.codegen.ExecutionProfile; import com.windowtester.recorder.ISemanticEventProvider; import com.windowtester.ui.internal.core.recorder.NullRecorder; public class SessionMonitor implements ISessionMonitor { public static final ISession NULL_SESSION = new ISession() { public ISemanticEventProvider getRecorder() { return new NullRecorder(); } public ExecutionProfile getExecutionProfile() { // TODO Auto-generated method stub return null; } }; private ISession session = nullSession(); private final List<ISessionListener> listeners = new ArrayList<ISessionListener>(); public ISession getCurrent() { return session; } public boolean inSession() { return getCurrent() != nullSession(); } public void sessionEnded(ISession session) { for (ISessionListener listener: getListeners()) { listener.ended(session); } setSession(nullSession()); } private static ISession nullSession() { return NULL_SESSION; } public void sessionStarted(ISession session) { setSession(session); for (ISessionListener listener: getListeners()) { listener.started(session); } } private void setSession(ISession session) { assertNotNull(session); this.session = session; } public void addListener(ISessionListener listener) { assertNotNull(listener); getListeners().add(listener); } private void assertNotNull(Object param) { if (param == null) throw new IllegalArgumentException("argument cannot be null"); } public void removeListener(ISessionListener listener) { assertNotNull(listener); getListeners().remove(listener); } private List<ISessionListener> getListeners() { return listeners; } }
fd420b35f2701eb2ab44190d9605626ab1f4bf87
44d8aa309f709422f32d4815490a3eec05544489
/build/src/main/java/com/mypurecloud/sdk/v2/model/EdgeChangeTopicEdge.java
5d9a3b509174c31f47ade83288f0a1bb48831cd1
[ "MIT" ]
permissive
MyPureCloud/platform-client-sdk-java
a25146f15a0ef96f5c0c4655af3dc8aa77e48843
250d47418a9642fce5c7d6697f87d978ec39a257
refs/heads/master
2023-08-17T01:42:17.287918
2023-08-15T07:03:28
2023-08-15T07:03:28
86,601,855
7
14
MIT
2023-02-27T14:26:49
2017-03-29T15:56:50
HTML
UTF-8
Java
false
false
3,959
java
package com.mypurecloud.sdk.v2.model; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.util.Objects; import java.util.ArrayList; import java.io.IOException; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; /** * EdgeChangeTopicEdge */ public class EdgeChangeTopicEdge implements Serializable { private String id = null; private static class OnlineStatusEnumDeserializer extends StdDeserializer<OnlineStatusEnum> { public OnlineStatusEnumDeserializer() { super(OnlineStatusEnumDeserializer.class); } @Override public OnlineStatusEnum deserialize(JsonParser jsonParser, DeserializationContext ctxt) throws IOException { JsonNode node = jsonParser.getCodec().readTree(jsonParser); return OnlineStatusEnum.fromString(node.toString().replace("\"", "")); } } /** * Gets or Sets onlineStatus */ @JsonDeserialize(using = OnlineStatusEnumDeserializer.class) public enum OnlineStatusEnum { OUTDATEDSDKVERSION("OutdatedSdkVersion"), ONLINE("ONLINE"), OFFLINE("OFFLINE"); private String value; OnlineStatusEnum(String value) { this.value = value; } @JsonCreator public static OnlineStatusEnum fromString(String key) { if (key == null) return null; for (OnlineStatusEnum value : OnlineStatusEnum.values()) { if (key.equalsIgnoreCase(value.toString())) { return value; } } return OnlineStatusEnum.values()[0]; } @Override @JsonValue public String toString() { return String.valueOf(value); } } private OnlineStatusEnum onlineStatus = null; /** **/ public EdgeChangeTopicEdge id(String id) { this.id = id; return this; } @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public String getId() { return id; } public void setId(String id) { this.id = id; } /** **/ public EdgeChangeTopicEdge onlineStatus(OnlineStatusEnum onlineStatus) { this.onlineStatus = onlineStatus; return this; } @ApiModelProperty(example = "null", value = "") @JsonProperty("onlineStatus") public OnlineStatusEnum getOnlineStatus() { return onlineStatus; } public void setOnlineStatus(OnlineStatusEnum onlineStatus) { this.onlineStatus = onlineStatus; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } EdgeChangeTopicEdge edgeChangeTopicEdge = (EdgeChangeTopicEdge) o; return Objects.equals(this.id, edgeChangeTopicEdge.id) && Objects.equals(this.onlineStatus, edgeChangeTopicEdge.onlineStatus); } @Override public int hashCode() { return Objects.hash(id, onlineStatus); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EdgeChangeTopicEdge {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" onlineStatus: ").append(toIndentedString(onlineStatus)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
3a1e278f61c33e766659e80276b498f193543677
c0b37a664fde6a57ae61c4af635e6dea28d7905e
/Helpful dev stuff/AeriesMobilePortal_v1.2.0_apkpure.com_source_from_JADX/android/support/v4/content/SharedPreferencesCompat.java
3766422aab313a080fe75ee1c8a854927dea9eaa
[]
no_license
joshkmartinez/Grades
a21ce8ede1371b9a7af11c4011e965f603c43291
53760e47f808780d06c4fbc2f74028a2db8e2942
refs/heads/master
2023-01-30T13:23:07.129566
2020-12-07T18:20:46
2020-12-07T18:20:46
131,549,535
0
0
null
null
null
null
UTF-8
Java
false
false
2,543
java
package android.support.v4.content; import android.content.SharedPreferences.Editor; import android.support.annotation.NonNull; public final class SharedPreferencesCompat { public static final class EditorCompat { private static EditorCompat sInstance; private final Helper mHelper = new Helper(); private static class Helper { Helper() { } public void apply(@android.support.annotation.NonNull android.content.SharedPreferences.Editor r1) { /* JADX: method processing error */ /* Error: java.lang.NullPointerException at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75) at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45) at jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63) at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14) at jadx.core.ProcessClass.process(ProcessClass.java:37) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:306) at jadx.api.JavaClass.decompile(JavaClass.java:62) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:199) */ /* r0 = this; r1.apply(); Catch:{ AbstractMethodError -> 0x0004 } goto L_0x0007; L_0x0004: r1.commit(); L_0x0007: return; */ throw new UnsupportedOperationException("Method not decompiled: android.support.v4.content.SharedPreferencesCompat.EditorCompat.Helper.apply(android.content.SharedPreferences$Editor):void"); } } private EditorCompat() { } public static EditorCompat getInstance() { if (sInstance == null) { sInstance = new EditorCompat(); } return sInstance; } public void apply(@NonNull Editor editor) { this.mHelper.apply(editor); } } private SharedPreferencesCompat() { } }
418ef5189812af28d8860e33bc0f5e41836797cb
a0caa255f3dbe524437715adaee2094ac8eff9df
/src/main/java/p000/bgx.java
3f69668ee159ab34d380b0cd16ea6690ed4e7885
[]
no_license
AndroidTVDeveloper/com.google.android.tvlauncher
16526208b5b48fd48931b09ed702fe606fe7d694
0f959c41bbb5a93e981145f371afdec2b3e207bc
refs/heads/master
2021-01-26T07:47:23.091351
2020-02-26T20:58:19
2020-02-26T20:58:19
243,363,961
0
1
null
null
null
null
UTF-8
Java
false
false
4,397
java
package p000; import android.view.View; import android.widget.TextView; /* renamed from: bgx */ /* compiled from: PG */ final class bgx implements View.OnClickListener, aks, bhf { /* renamed from: a */ private final /* synthetic */ bgz f3877a; public /* synthetic */ bgx(bgz bgz) { this.f3877a = bgz; } /* renamed from: a */ public final void mo466a() { } /* renamed from: b */ public final void mo468b() { } /* renamed from: d */ public final void mo471d() { } /* renamed from: e */ public final void mo472e() { } /* renamed from: f */ public final void mo473f() { } /* renamed from: g */ public final void mo474g() { } /* renamed from: k */ public final void mo478k() { } public final void onClick(View view) { bgz bgz = this.f3877a; akt akt = bgz.f3900m; if (akt == null) { return; } if (bgz.f3890c == view) { bgz.mo1903c(akt); } else if (bgz.f3889b == view) { bgz.mo1900b(akt); } else if (bgz.f3893f == view) { bgz.mo1909e(akt); } else if (bgz.f3894g != view) { int i = 1; if (bgz.f3891d == view) { if (akt.mo392f() != 1 && akt.mo392f() == 4) { bgz.m3192a(akt, akt.mo397k(), -9223372036854775807L); } this.f3877a.f3901n.mo374a(akt, true); } else if (bgz.f3892e == view) { bgz.f3901n.mo374a(akt, false); } else if (bgz.f3895h == view) { int i2 = akt.mo395i(); while (true) { if (i <= 2) { int i3 = (i2 + i) % 3; if (i3 == 0) { i2 = i3; break; } i++; } else { break; } } ald ald = (ald) akt; ald.mo523u(); ajy ajy = ald.f644b; if (ajy.f484i != i2) { ajy.f484i = i2; ajy.f479d.f516a.mo2041a(12, i2).sendToTarget(); ajy.mo386a(new ajj()); } } else if (bgz.f3896i == view) { boolean z = !akt.mo396j(); ald ald2 = (ald) akt; ald2.mo523u(); ajy ajy2 = ald2.f644b; if (ajy2.f485j != z) { ajy2.f485j = z; ajy2.f479d.f516a.mo2041a(13, z ? 1 : 0).sendToTarget(); ajy2.mo386a(new ajk()); } } } else { bgz.mo1905d(akt); } } /* renamed from: c */ public final void mo470c() { this.f3877a.mo1914j(); } /* renamed from: b */ public final void mo469b(int i) { this.f3877a.mo1908e(); this.f3877a.mo1914j(); } /* renamed from: h */ public final void mo475h() { this.f3877a.mo1910f(); this.f3877a.mo1913i(); } /* renamed from: i */ public final void mo476i() { this.f3877a.mo1911g(); this.f3877a.mo1910f(); } /* renamed from: a */ public final void mo1892a(long j) { bgz bgz = this.f3877a; TextView textView = bgz.f3897j; if (textView != null) { textView.setText(blm.m3639a(bgz.f3898k, bgz.f3899l, j)); } } /* renamed from: b */ public final void mo1894b(long j) { bgz bgz = this.f3877a; bgz.f3902o = true; TextView textView = bgz.f3897j; if (textView != null) { textView.setText(blm.m3639a(bgz.f3898k, bgz.f3899l, j)); } } /* renamed from: a */ public final void mo1893a(long j, boolean z) { akt akt; bgz bgz = this.f3877a; bgz.f3902o = false; if (!z && (akt = bgz.f3900m) != null) { akt.mo404r(); bgz.m3192a(akt, akt.mo397k(), j); } } /* renamed from: j */ public final void mo477j() { this.f3877a.mo1912h(); this.f3877a.mo1910f(); } /* renamed from: a */ public final void mo467a(alh alh) { this.f3877a.mo1910f(); this.f3877a.mo1913i(); } }
982421a44184602ff551b1f1551d67836cf9debb
3735a07d455d7b40613c3c4160aa8b1cb1b3472a
/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/types/DfLongConstantType.java
99cdad181216a6d0040068a837b95b3fc8c23666
[ "Apache-2.0" ]
permissive
caofanCPU/intellij-community
ede9417fc4ccb4b5efefb099906e4abe6871f3b4
5ad3e2bdf3c83d86e7c4396f5671929768d76999
refs/heads/master
2023-02-27T21:38:33.416107
2021-02-05T06:37:40
2021-02-05T06:37:40
321,209,485
1
0
Apache-2.0
2021-02-05T06:37:41
2020-12-14T02:22:32
null
UTF-8
Java
false
false
700
java
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.codeInspection.dataFlow.types; import com.intellij.codeInspection.dataFlow.rangeSet.LongRangeSet; import com.intellij.psi.PsiPrimitiveType; import org.jetbrains.annotations.NotNull; class DfLongConstantType extends DfConstantType<Long> implements DfLongType { DfLongConstantType(long value) { super(value); } @NotNull @Override public PsiPrimitiveType getPsiType() { return DfLongType.super.getPsiType(); } @NotNull @Override public LongRangeSet getRange() { return LongRangeSet.point(getValue()); } }
ad08b05bc8617c81e4f373e49dec4e40adb62552
ae2906fa1a2ec0750bed9ac28696871f5838dc91
/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_GetOrganizationQuotaDefinitionResponse.java
c29ed8dcb9314ef64d9ef3000671ae365a219d44
[ "Apache-2.0" ]
permissive
theghost5800/cf-java-client
ca8e2c0073fa1b8fd0441177d93d713ab3856f55
07a34c646a2f982e9405a49db2122ef461462af0
refs/heads/master
2022-11-15T08:17:10.162327
2019-10-29T15:48:42
2019-10-29T15:48:42
219,698,354
0
0
Apache-2.0
2019-11-05T08:48:37
2019-11-05T08:48:36
null
UTF-8
Java
false
false
1,030
java
/* * Copyright 2013-2019 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.cloudfoundry.client.v2.organizationquotadefinitions; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.immutables.value.Value; /** * The response payload for the Retrieve a Particular Organization Quota Definition operation */ @JsonDeserialize @Value.Immutable abstract class _GetOrganizationQuotaDefinitionResponse extends AbstractOrganizationQuotaDefinition { }
ebdaef61538e6fbdee905f0122039b89f66e988b
e19ca77b8725551e5c806dfbae02b8f44b4a6c6f
/processor/src/test/java/spritz/support/processor/AbstractSpritzProcessorTest.java
60e7c01b55db9cd336f65f70b979a0787dd75721
[ "Apache-2.0" ]
permissive
spritz/spritz
a0ffcac27cfe50dff0f468d6165eaf599bc5ddbd
49ba61517b5c023e521c6775e4a16f8da5034371
refs/heads/master
2022-05-15T17:24:32.597278
2022-04-29T05:05:55
2022-04-29T05:05:55
149,194,146
4
0
Apache-2.0
2019-04-24T06:37:35
2018-09-17T22:08:56
Java
UTF-8
Java
false
false
6,175
java
package spritz.support.processor; import com.google.common.collect.ImmutableList; import com.google.testing.compile.Compilation; import com.google.testing.compile.Compiler; import com.google.testing.compile.JavaFileObjects; import com.google.testing.compile.JavaSourcesSubjectFactory; import java.io.File; import java.io.InputStream; import java.lang.reflect.Field; import java.net.MalformedURLException; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import javax.annotation.Nonnull; import javax.tools.JavaFileObject; import static com.google.common.truth.Truth.*; import static org.testng.Assert.*; abstract class AbstractSpritzProcessorTest { void assertSuccessfulCompile( @Nonnull final String classname ) throws Exception { final String[] elements = classname.contains( "." ) ? classname.split( "\\." ) : new String[]{ classname }; final StringBuilder input = new StringBuilder(); final StringBuilder docFile = new StringBuilder(); input.append( "input" ); docFile.append( "expected" ); for ( final String element : elements ) { input.append( '/' ); input.append( element ); docFile.append( '/' ); docFile.append( element ); } input.append( ".java" ); docFile.append( ".doc.json" ); final ArrayList<String> expectedOutputs = new ArrayList<>(); expectedOutputs.add( docFile.toString() ); // The annotations have been copied into test directory as they are not part of the API // but they are part of our mechanism for validating the project. We MUST keep these // aligned else bad things will happen. assertSuccessfulCompile( Arrays.asList( fixture( "input/spritz/DocCategory.java" ), fixture( "input/spritz/MetaDataSource.java" ), fixture( "input/spritz/SourceCategory.java" ), fixture( input.toString() ) ), expectedOutputs ); } private void assertSuccessfulCompile( @Nonnull final List<JavaFileObject> inputs, @Nonnull final List<String> outputs ) throws Exception { if ( outputFiles() ) { final Compilation compilation = Compiler.javac().withProcessors( new SpritzProcessor() ).compile( inputs ); final Compilation.Status status = compilation.status(); if ( Compilation.Status.SUCCESS != status ) { /* * Ugly hackery that marks the compile as successful so we can emit output onto filesystem. This could * result in java code that is not compilable emitted to filesystem. This re-running determining problems * a little easier even if it does make re-running tests from IDE a little harder */ final Field field = compilation.getClass().getDeclaredField( "status" ); field.setAccessible( true ); field.set( compilation, Compilation.Status.SUCCESS ); } final ImmutableList<JavaFileObject> fileObjects = compilation.generatedFiles(); for ( final JavaFileObject fileObject : fileObjects ) { if ( fileObject.getKind() != JavaFileObject.Kind.CLASS ) { final Path target = fixtureDir().resolve( "expected/" + fileObject.getName().replace( "/SOURCE_OUTPUT/", "" ) ); final File dir = target.getParent().toFile(); if ( !dir.exists() ) { assertTrue( dir.mkdirs() ); } if ( Files.exists( target ) ) { final byte[] existing = Files.readAllBytes( target ); final InputStream generated = fileObject.openInputStream(); final byte[] data = new byte[ generated.available() ]; assertEquals( generated.read( data ), data.length ); if ( Arrays.equals( existing, data ) ) { /* * If the data on the filesystem is identical to data generated then do not write * to filesystem. The writing can be slow and it can also trigger the IDE or other * tools to recompile code which is problematic. */ continue; } Files.delete( target ); } Files.copy( fileObject.openInputStream(), target ); } } if ( Compilation.Status.SUCCESS != status ) { // Restore old status final Field field = compilation.getClass().getDeclaredField( "status" ); field.setAccessible( true ); field.set( compilation, status ); // This next line will generate an error //noinspection ResultOfMethodCallIgnored compilation.generatedSourceFiles(); } } final JavaFileObject firstExpected = fixture( outputs.get( 0 ) ); final JavaFileObject[] restExpected = outputs.stream().skip( 1 ).map( this::fixture ).toArray( JavaFileObject[]::new ); assert_(). about( JavaSourcesSubjectFactory.javaSources() ). that( inputs ). processedWith( new SpritzProcessor() ). compilesWithoutError(). and(). generatesFiles( firstExpected, restExpected ); } @Nonnull private JavaFileObject fixture( @Nonnull final String path ) { final Path outputFile = fixtureDir().resolve( path ); if ( !Files.exists( outputFile ) ) { fail( "Fixture file " + outputFile + " does not exist. Thus can not compare against it." ); } try { return JavaFileObjects.forResource( outputFile.toUri().toURL() ); } catch ( final MalformedURLException e ) { throw new IllegalStateException( e ); } } @Nonnull private Path fixtureDir() { final String fixtureDir = System.getProperty( "spritz.fixture_dir" ); assertNotNull( fixtureDir, "Expected System.getProperty( \"spritz.fixture_dir\" ) to return fixture directory" ); return new File( fixtureDir ).toPath(); } private boolean outputFiles() { return System.getProperty( "spritz.output_fixture_data", "false" ).equals( "true" ); } }
f5963f3e1eb3615038ece333948aa82c5d6300a2
dbda4749ad2b35bf98d1adeedebab0ab98010e88
/app/src/main/java/com/greattone/greattone/Listener/BaseUiListener.java
c20ed0bf306e3db3077c709ca400696e5217e5f7
[]
no_license
makaifeng/greattone2
b7d771c50b2466e7718b4194dee952a7a3325170
7eddff6be1007d9264813e920ba46780a9bac59f
refs/heads/master
2020-12-24T10:03:40.334376
2017-04-26T06:29:25
2017-04-26T06:29:25
73,248,461
1
2
null
null
null
null
UTF-8
Java
false
false
903
java
package com.greattone.greattone.Listener; import org.json.JSONObject; import com.tencent.tauth.IUiListener; import com.tencent.tauth.UiError; public class BaseUiListener implements IUiListener { @Override public void onComplete(Object response) { if (null == response) { //"返回为空", "登录失败" return; } JSONObject jsonResponse = (JSONObject) response; if (null != jsonResponse && jsonResponse.length() == 0) { //"返回为空", "登录失败" return; } //登录成功 doComplete((JSONObject)response); } protected void doComplete(JSONObject values) { } @Override public void onError(UiError e) { // LogUtil.e("onError==>code:" + e.errorCode + ", msg:" // + e.errorMessage + ", detail:" + e.errorDetail); } @Override public void onCancel() { // LogUtil.e("onCancel==>"); } }
5cf54e03539d397157284c047c10047ab1ce1931
1ce518b09521578e26e79a1beef350e7485ced8c
/source/app/src/main/java/com/google/android/gms/internal/w.java
b929aca0feb9afd5e8e2b80f666ee8a749a5704c
[]
no_license
yash2710/AndroidStudioProjects
7180eb25e0f83d3f14db2713cd46cd89e927db20
e8ba4f5c00664f9084f6154f69f314c374551e51
refs/heads/master
2021-01-10T01:15:07.615329
2016-04-03T09:19:01
2016-04-03T09:19:01
55,338,306
1
1
null
null
null
null
UTF-8
Java
false
false
2,666
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.google.android.gms.internal; import android.os.Parcel; import com.google.android.gms.common.internal.safeparcel.a; import com.google.android.gms.common.internal.safeparcel.b; // Referenced classes of package com.google.android.gms.internal: // v public class w implements android.os.Parcelable.Creator { public w() { } static void a(v v1, Parcel parcel, int i) { int j = com.google.android.gms.common.internal.safeparcel.b.C(parcel); com.google.android.gms.common.internal.safeparcel.b.c(parcel, 1, v1.versionCode); com.google.android.gms.common.internal.safeparcel.b.a(parcel, 2, v1.lb); com.google.android.gms.common.internal.safeparcel.b.a(parcel, 3, v1.ld); com.google.android.gms.common.internal.safeparcel.b.G(parcel, j); } public v a(Parcel parcel) { boolean flag = false; int i = com.google.android.gms.common.internal.safeparcel.a.B(parcel); boolean flag1 = false; int j = 0; do { if (parcel.dataPosition() < i) { int k = com.google.android.gms.common.internal.safeparcel.a.A(parcel); switch (com.google.android.gms.common.internal.safeparcel.a.ar(k)) { default: com.google.android.gms.common.internal.safeparcel.a.b(parcel, k); break; case 1: // '\001' j = com.google.android.gms.common.internal.safeparcel.a.g(parcel, k); break; case 2: // '\002' flag1 = com.google.android.gms.common.internal.safeparcel.a.c(parcel, k); break; case 3: // '\003' flag = com.google.android.gms.common.internal.safeparcel.a.c(parcel, k); break; } } else if (parcel.dataPosition() != i) { throw new com.google.android.gms.common.internal.safeparcel.a.a((new StringBuilder("Overread allowed size end=")).append(i).toString(), parcel); } else { return new v(j, flag1, flag); } } while (true); } public v[] b(int i) { return new v[i]; } public Object createFromParcel(Parcel parcel) { return a(parcel); } public Object[] newArray(int i) { return b(i); } }
a4e06f55456a7bca7b3daccd23e1a1a5d476fd67
3ec740784b754780b6083fc6cde6d87904ebc8ab
/tm-tool/textmapper/src/org/textmapper/tool/parser/ast/TmaBracketsDirective.java
e51ea94a5820931de9bde9afc3799bd9483f6de7
[ "Apache-2.0" ]
permissive
takamori/textmapper
b83da7f30c43868e16de18aea7e21e456ceb3803
3c9ec01f17db9f9e3d3914c984f8ccd4496913fb
refs/heads/master
2020-04-02T10:03:39.409821
2018-10-23T13:18:03
2018-10-23T13:18:03
154,322,486
0
0
null
2018-10-23T12:15:59
2018-10-23T12:15:58
null
UTF-8
Java
false
false
1,373
java
/** * Copyright 2002-2017 Evgeny Gryaznov * * 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.textmapper.tool.parser.ast; import org.textmapper.tool.parser.TMTree.TextSource; public class TmaBracketsDirective extends TmaNode implements ITmaLexerPart { private final TmaSymref opening; private final TmaSymref closing; public TmaBracketsDirective(TmaSymref opening, TmaSymref closing, TextSource source, int line, int offset, int endoffset) { super(source, line, offset, endoffset); this.opening = opening; this.closing = closing; } public TmaSymref getOpening() { return opening; } public TmaSymref getClosing() { return closing; } @Override public void accept(TmaVisitor v) { if (!v.visit(this)) { return; } if (opening != null) { opening.accept(v); } if (closing != null) { closing.accept(v); } } }
d6882dde0232487943c3cf5ba6b20e7ff1913fe1
c770c49e2a91260abad58fd451d9524b790d7b20
/sentinel-agent/sentinel-agent-client/src/main/java/com/alibaba/acm/shaded/org/codehaus/jackson/map/jsontype/impl/StdTypeResolverBuilder.java
10caf478321090f64fdeba033e84c5dadd619fb2
[ "Apache-2.0" ]
permissive
ddreaml/Sentinel-ali
d45e941e537d26628151f9c87dccdca16ef329a7
33721158794f9a713057abccbb4f4b89dfaaa644
refs/heads/master
2023-04-24T13:20:07.505656
2019-10-21T11:24:43
2019-10-21T11:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,978
java
package com.alibaba.acm.shaded.org.codehaus.jackson.map.jsontype.impl; import java.util.Collection; import com.alibaba.acm.shaded.org.codehaus.jackson.annotate.JsonTypeInfo; import com.alibaba.acm.shaded.org.codehaus.jackson.map.*; import com.alibaba.acm.shaded.org.codehaus.jackson.map.jsontype.NamedType; import com.alibaba.acm.shaded.org.codehaus.jackson.map.jsontype.TypeIdResolver; import com.alibaba.acm.shaded.org.codehaus.jackson.map.jsontype.TypeResolverBuilder; import com.alibaba.acm.shaded.org.codehaus.jackson.type.JavaType; /** * Default {@link TypeResolverBuilder} implementation. * * @author tatu * @since 1.5 */ public class StdTypeResolverBuilder implements TypeResolverBuilder<StdTypeResolverBuilder> { // Configuration settings: protected JsonTypeInfo.Id _idType; protected JsonTypeInfo.As _includeAs; protected String _typeProperty; /** * @since 1.9 */ protected Class<?> _defaultImpl; // Objects protected TypeIdResolver _customIdResolver; /* /********************************************************** /* Accessors /********************************************************** */ @Override public Class<?> getDefaultImpl() { return _defaultImpl; } /* /********************************************************** /* Construction, initialization, actual building /********************************************************** */ public StdTypeResolverBuilder() { } public static StdTypeResolverBuilder noTypeInfoBuilder() { return new StdTypeResolverBuilder().init(JsonTypeInfo.Id.NONE, null); } @Override public StdTypeResolverBuilder init(JsonTypeInfo.Id idType, TypeIdResolver idRes) { // sanity checks if (idType == null) { throw new IllegalArgumentException("idType can not be null"); } _idType = idType; _customIdResolver = idRes; // Let's also initialize property name as per idType default _typeProperty = idType.getDefaultPropertyName(); return this; } @Override public TypeSerializer buildTypeSerializer(SerializationConfig config, JavaType baseType, Collection<NamedType> subtypes, BeanProperty property) { if (_idType == JsonTypeInfo.Id.NONE) { return null; } TypeIdResolver idRes = idResolver(config, baseType, subtypes, true, false); switch (_includeAs) { case WRAPPER_ARRAY: return new AsArrayTypeSerializer(idRes, property); case PROPERTY: return new AsPropertyTypeSerializer(idRes, property, _typeProperty); case WRAPPER_OBJECT: return new AsWrapperTypeSerializer(idRes, property); case EXTERNAL_PROPERTY: return new AsExternalTypeSerializer(idRes, property, _typeProperty); } throw new IllegalStateException("Do not know how to construct standard type serializer for inclusion type: "+_includeAs); } @Override public TypeDeserializer buildTypeDeserializer(DeserializationConfig config, JavaType baseType, Collection<NamedType> subtypes, BeanProperty property) { if (_idType == JsonTypeInfo.Id.NONE) { return null; } TypeIdResolver idRes = idResolver(config, baseType, subtypes, false, true); // First, method for converting type info to type id: switch (_includeAs) { case WRAPPER_ARRAY: return new AsArrayTypeDeserializer(baseType, idRes, property, _defaultImpl); case PROPERTY: return new AsPropertyTypeDeserializer(baseType, idRes, property, _defaultImpl, _typeProperty); case WRAPPER_OBJECT: return new AsWrapperTypeDeserializer(baseType, idRes, property, _defaultImpl); case EXTERNAL_PROPERTY: return new AsExternalTypeDeserializer(baseType, idRes, property, _defaultImpl, _typeProperty); } throw new IllegalStateException("Do not know how to construct standard type serializer for inclusion type: "+_includeAs); } /* /********************************************************** /* Construction, configuration /********************************************************** */ @Override public StdTypeResolverBuilder inclusion(JsonTypeInfo.As includeAs) { if (includeAs == null) { throw new IllegalArgumentException("includeAs can not be null"); } _includeAs = includeAs; return this; } /** * Method for constructing an instance with specified type property name * (property name to use for type id when using "as-property" inclusion). */ @Override public StdTypeResolverBuilder typeProperty(String typeIdPropName) { // ok to have null/empty; will restore to use defaults if (typeIdPropName == null || typeIdPropName.length() == 0) { typeIdPropName = _idType.getDefaultPropertyName(); } _typeProperty = typeIdPropName; return this; } @Override public StdTypeResolverBuilder defaultImpl(Class<?> defaultImpl) { _defaultImpl = defaultImpl; return this; } /* /********************************************************** /* Accessors /********************************************************** */ public String getTypeProperty() { return _typeProperty; } /* /********************************************************** /* Internal methods /********************************************************** */ /** * Helper method that will either return configured custom * type id resolver, or construct a standard resolver * given configuration. */ protected TypeIdResolver idResolver(MapperConfig<?> config, JavaType baseType, Collection<NamedType> subtypes, boolean forSer, boolean forDeser) { // Custom id resolver? if (_customIdResolver != null) { return _customIdResolver; } if (_idType == null) { throw new IllegalStateException("Can not build, 'init()' not yet called"); } switch (_idType) { case CLASS: return new ClassNameIdResolver(baseType, config.getTypeFactory()); case MINIMAL_CLASS: return new MinimalClassNameIdResolver(baseType, config.getTypeFactory()); case NAME: return TypeNameIdResolver.construct(config, baseType, subtypes, forSer, forDeser); case NONE: // hmmh. should never get this far with 'none' return null; case CUSTOM: // need custom resolver... } throw new IllegalStateException("Do not know how to construct standard type id resolver for idType: "+_idType); } }
d86b86c9717b524015830921778df9d3dd1a7d3e
9329071c7a74c2bf206b7bdf7edd984748d205b3
/src/main/java/io/sporkpgm/module/builder/BuilderContext.java
b655d927626420062f0e318add4d6ae9aa18d412
[]
no_license
simba3rcks/SporkPGM
c102e0ee55dcab5ef59360b79d3e9caf39029942
a32f017f579967e9ae66e11e2edf614bcce0d700
refs/heads/master
2021-01-18T06:05:10.373516
2014-06-10T21:49:24
2014-06-10T21:49:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,780
java
package io.sporkpgm.module.builder; import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import io.sporkpgm.Spork; import io.sporkpgm.map.SporkLoader; import io.sporkpgm.map.SporkMap; import io.sporkpgm.match.Match; import io.sporkpgm.util.ClassUtils; import io.sporkpgm.util.Log; import org.jdom2.Document; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; public class BuilderContext { private Document document; private SporkLoader loader; private SporkMap map; private Match match; public BuilderContext(Object... fields) { Preconditions.checkArgument(fields.length > 0, "Contexts require at least 1 field"); List<Object> passed = new ArrayList<>(); for(Object field : fields) { passed.add(field); if(field instanceof Document) { document = (Document) field; continue; } else if(field instanceof SporkLoader) { loader = (SporkLoader) field; continue; } else if(field instanceof SporkMap) { map = (SporkMap) field; continue; } else if(field instanceof Match) { match = (Match) field; continue; } passed.remove(field); } Preconditions.checkState(passed.size() > 0, "Contexts require at acceptable least 1 field"); } public Document getDocument() { return document; } public SporkLoader getLoader() { return loader; } public SporkMap getMap() { return map; } public Match getMatch() { return match; } public boolean all(String... fields) { return all(Lists.newArrayList(fields)); } public boolean all(List<String> fields) { for(String string : fields) { try { Field field = getClass().getDeclaredField(string); field.setAccessible(true); if(!has(field.getName())) { return false; } } catch(Exception e) { if(Spork.isDebug()) { e.printStackTrace(); } return false; } } return true; } public boolean only(String... fields) { return only(Lists.newArrayList(fields)); } public boolean only(List<String> fields) { List<String> available = new ArrayList<>(); for(Field field : getClass().getDeclaredFields()) { if(has(field.getName())) { available.add(field.getName()); } } // Log.debug("Checking " + fields + " against " + available); if(fields.size() != available.size()) { return false; } for(String string : available) { if(!fields.contains(string)) { return false; } } return true; } public boolean has(String field) { switch(field) { case "document": return document != null; case "loader": return loader != null; case "map": return map != null; case "match": return match != null; } return false; } @Override public String toString() { return ClassUtils.build(this); } }
6927bb365e9aa789f4a5ff206c6862d4a014bebc
77ed4f7dc2289ced4ebb7e77b46b92c926fddbc3
/app/src/main/java/com/test/gambit/fragments/GamesFragment.java
d516572dfb43da4a0ec2674379bf8f77feeb3a4f
[]
no_license
sunilparmar04/GameBitTask
d8a6732790c65865b67187268ec8585c851e9b0c
8115a626632e3666756f03b1135bfbc3dfc24a4d
refs/heads/master
2020-05-17T15:30:23.765978
2019-04-28T04:35:58
2019-04-28T04:35:58
183,792,485
0
0
null
null
null
null
UTF-8
Java
false
false
6,562
java
package com.test.gambit.fragments; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.android.volley.Request; import com.android.volley.VolleyError; import com.test.gambit.R; import com.test.gambit.model.GameResponse; import com.test.gambit.utils.AppConstants; import com.test.gambit.utils.CommonUtils; import com.test.gambit.utils.NetworkUtils; import com.test.gambit.utils.RecyclerViewEndlessScrollListener; import com.test.gambit.views.HomeActivity; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import in.myvolley.NetworkCall; import in.myvolley.interfaces.NetworkCallback; /** * Created by sunilparmar on 4/27/2019. */ public class GamesFragment extends Fragment { private View mView; private RecyclerView mGameRecycleView; private GameAdapter mAdapter; private ArrayList<GameResponse.Data> gameArrayList = new ArrayList<>(); private int mPage = 0; private RecyclerViewEndlessScrollListener recyclerViewEndlessScrollListener; private LinearLayoutManager mLayoutManager; @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { mView = inflater.inflate(R.layout.fragment_games, container, false); initViews(); gameArrayList.clear(); initAdapter(); getGame(); initListener(); return mView; } private void initViews() { mLayoutManager=new LinearLayoutManager(getActivity()); mGameRecycleView = mView.findViewById(R.id.gameRecyclerView); } private void initListener() { recyclerViewEndlessScrollListener = new RecyclerViewEndlessScrollListener(mLayoutManager) { @Override public void onLoadMore(int page, int totalItemsCount, RecyclerView view) { Log.d("scroll_listener", "load_more:"); if (!NetworkUtils.isNetworkConnected(getActivity())) { CommonUtils.getInstance().showRedToast(getString(R.string.no_internet), getActivity(), 112); return; } ++mPage; getGame(); } }; mGameRecycleView.addOnScrollListener(recyclerViewEndlessScrollListener); } private void initAdapter() { mAdapter = new GameAdapter(); mGameRecycleView.setLayoutManager(mLayoutManager); mGameRecycleView.setAdapter(mAdapter); } private void getGame() { if (!NetworkUtils.isNetworkConnected(getActivity())) { CommonUtils.getInstance().showRedToast(getString(R.string.no_internet), getActivity(), 112); return; } NetworkCallback<GameResponse> networkCallback = new NetworkCallback<GameResponse>() { @Override public void onSuccess(GameResponse response) { parseData(response); } @Override public void onError(VolleyError error) { } }; Map<String, String> params = new HashMap<>(); params.put(AppConstants.PARAMS_PAGE, "" + mPage); NetworkCall<GameResponse> networkCall = new NetworkCall<>(AppConstants.GAMES_URL, new HashMap<String, String>(), Request.Method.GET, networkCallback, GameResponse.class); if (mPage>0) { networkCall.initiateCall("Getting games...", getActivity().getSupportFragmentManager()); }else { networkCall.initiateCall(); } } private void parseData(GameResponse response) { if (response.getData().size() > 0) { gameArrayList.addAll(response.getData()); mAdapter.notifyDataSetChanged(); updateTabText(); } } class GameAdapter extends RecyclerView.Adapter<GameAdapter.MyViewHolder> { public class MyViewHolder extends RecyclerView.ViewHolder { public TextView homeTeamAbbreviationTextView, visitorTeamAbbreviationTextView, homeTeamFullNameTextView, visitorTeamFullNameíTextView; public MyViewHolder(View view) { super(view); homeTeamAbbreviationTextView = view.findViewById(R.id.homeTeamAbbreviationTextView); visitorTeamAbbreviationTextView = view.findViewById(R.id.visitorTeamAbbreviationTextView); homeTeamFullNameTextView = view.findViewById(R.id.homeTeamFullNameTextView); visitorTeamFullNameíTextView = view.findViewById(R.id.visitorTeamFullNameíTextView); } } public GameAdapter() { } @Override public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View itemView = LayoutInflater.from(parent.getContext()) .inflate(R.layout.item_game, parent, false); return new MyViewHolder(itemView); } @Override public void onBindViewHolder(final MyViewHolder holder, final int position) { GameResponse.Data dataModel = gameArrayList.get(position); holder.homeTeamAbbreviationTextView.setText(dataModel.getHome_team().getAbbreviation()); holder.visitorTeamAbbreviationTextView.setText(dataModel.getVisitor_team().getAbbreviation()); holder.homeTeamFullNameTextView.setText(dataModel.getHome_team().getName()); holder.visitorTeamFullNameíTextView.setText(dataModel.getVisitor_team().getName()); } @Override public int getItemCount() { return gameArrayList.size(); } } public void updateTabText() { try { View view = ((HomeActivity) getActivity()).mTabLayout.getTabAt(1).getCustomView(); View badgeContainer = view.findViewById(R.id.badgeCotainer); TextView countTextView = view.findViewById(R.id.badge); if (gameArrayList.size() > 0) { badgeContainer.setVisibility(View.VISIBLE); countTextView.setText(gameArrayList.size() + ""); } else { badgeContainer.setVisibility(View.GONE); } } catch (Exception e) { e.printStackTrace(); } } }
44f32eee4311203c84fcb308b325d3d0b58d3c45
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/grade/bfad6d21d636def8e9e72910c3eb0815f5747669e3a60fb10c6f7f421082d18e548dcfc5d4717bb6da075c36f067b37858d11528ce796b3226ae33719c5007ce/001/mutations/84/grade_bfad6d21_001.java
e53b71c300aca2b62525cc1060003f37566511f4
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,685
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class grade_bfad6d21_001 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { grade_bfad6d21_001 mainClass = new grade_bfad6d21_001 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { FloatObj thresha = new FloatObj (), threshb = new FloatObj (), threshc = new FloatObj (), threshd = new FloatObj (), stuscore = new FloatObj (); output += (String.format ("Enter thresholds for A, B, C, D\nin that order, decreasing percentages > ")); thresha.value = scanner.nextFloat (); threshb.value = scanner.nextFloat (); threshc.value = scanner.nextFloat (); threshd.value = scanner.nextFloat (); output += (String.format ("Thank you. Now enter student score (percent) >")); stuscore.value = scanner.nextFloat (); if (stuscore.value > thresha.value) { output += (String.format ("Student has an A grade\n")); } if ((stuscore.value < thresha.value) && (stuscore.value >= threshb.value)) { output += (String.format ("Student has an B grade\n")); } if ((stuscore.value < threshb.value) && (stuscore.value >= threshc.value)) { output += (String.format ("Student has an C grade\n")); } if ((stuscore.value) < (threshc.value)) && ((stuscore.value) >= (threshd.value) && (stuscore.value >= threshd.value)) { output += (String.format ("Student has an D grade\n")); } if (stuscore.value < threshd.value) { output += (String.format ("Student has failed the course\n")); } if (true) return;; } }
2f67a7e6fe5eee9318a79e94578d6f465921b344
32c387fc3e714a40574573dc0281ad3281d709df
/src/main/java/org/hibernate/sqm/query/predicate/InPredicate.java
65f337a8da8a76db85b6fde82d20ac5b83b8f83c
[ "Apache-2.0" ]
permissive
avijra/hibernate-semantic-query
1e9070c01ca04368df88215544333adf425c648e
d5b8e165fb7b64fe179835e6b65ede4532562225
refs/heads/master
2021-01-15T12:25:05.246292
2016-03-09T18:52:02
2016-03-09T18:52:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
430
java
/* * Hibernate, Relational Persistence for Idiomatic Java * * License: Apache License, Version 2.0 * See the LICENSE file in the root directory or visit http://www.apache.org/licenses/LICENSE-2.0 */ package org.hibernate.sqm.query.predicate; import org.hibernate.sqm.query.expression.Expression; /** * @author Steve Ebersole */ public interface InPredicate extends NegatablePredicate { Expression getTestExpression(); }
ef087c59b1698837e957ef6ae0b977b51dd0b052
26e611565ce0e9eed154caaf6548a281a829d356
/onvif-ws-client/src/main/java/org/onvif/ver10/recording/wsdl/ExportRecordedDataResponse.java
4395949b2fc71fff29614ab5b81cd3006c5611ea
[ "Apache-2.0" ]
permissive
doniexun/onvif-1
ecb366070dca73781c7baf3b9bcff94dd68001f5
ff9839c099e5f81d877a1753598a508c5c0bfc6b
refs/heads/master
2020-05-27T09:14:42.784064
2017-12-20T18:15:59
2017-12-20T18:15:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,356
java
package org.onvif.ver10.recording.wsdl; 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.XmlAnyElement; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.w3c.dom.Element; /** * <p>Classe Java per anonymous complex type. * * <p>Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. * * <pre> * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="OperationToken" type="{http://www.onvif.org/ver10/schema}ReferenceToken"/&gt; * &lt;element name="FileNames" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt; * &lt;element name="Extension" minOccurs="0"&gt; * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;any processContents='lax'/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * &lt;/element&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "operationToken", "fileNames", "extension" }) @XmlRootElement(name = "ExportRecordedDataResponse") public class ExportRecordedDataResponse { @XmlElement(name = "OperationToken", required = true) protected String operationToken; @XmlElement(name = "FileNames") protected List<String> fileNames; @XmlElement(name = "Extension") protected ExportRecordedDataResponse.Extension extension; /** * Recupera il valore della proprietà operationToken. * * @return * possible object is * {@link String } * */ public String getOperationToken() { return operationToken; } /** * Imposta il valore della proprietà operationToken. * * @param value * allowed object is * {@link String } * */ public void setOperationToken(String value) { this.operationToken = value; } /** * Gets the value of the fileNames 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 fileNames property. * * <p> * For example, to add a new item, do as follows: * <pre> * getFileNames().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getFileNames() { if (fileNames == null) { fileNames = new ArrayList<String>(); } return this.fileNames; } /** * Recupera il valore della proprietà extension. * * @return * possible object is * {@link ExportRecordedDataResponse.Extension } * */ public ExportRecordedDataResponse.Extension getExtension() { return extension; } /** * Imposta il valore della proprietà extension. * * @param value * allowed object is * {@link ExportRecordedDataResponse.Extension } * */ public void setExtension(ExportRecordedDataResponse.Extension value) { this.extension = value; } /** * <p>Classe Java per anonymous complex type. * * <p>Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. * * <pre> * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;any processContents='lax'/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "any" }) public static class Extension { @XmlAnyElement(lax = true) protected Object any; /** * Recupera il valore della proprietà any. * * @return * possible object is * {@link Element } * {@link Object } * */ public Object getAny() { return any; } /** * Imposta il valore della proprietà any. * * @param value * allowed object is * {@link Element } * {@link Object } * */ public void setAny(Object value) { this.any = value; } } }
7ce0745f814eef25401b157b274d135c347e051e
5a1d6752ef215efaddf6b55e1bb88c0575d3d7cd
/erp/app.contractmanagement/domain/src/main/java/org/flowframe/erp/app/contractmanagement/domain/CustomSubscriptionPlan.java
02304a6d6610cbfe678cb2e7a1be8419739e94f0
[]
no_license
mduduzik/flowframe
5849eddfed53a82e65f6d1e815db0ba2cc85e263
71245bf70688a08cf91a6b105fd8aae62cdab2ab
refs/heads/master
2021-01-20T05:49:44.876366
2013-08-05T02:11:54
2013-08-05T02:11:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
502
java
package org.flowframe.erp.app.contractmanagement.domain; import javax.persistence.Entity; import javax.persistence.ManyToOne; @Entity public class CustomSubscriptionPlan extends SubscriptionPlan { @ManyToOne private Customer tenant; public Customer getTenant() { return tenant; } public void setTenant(Customer tenant) { this.tenant = tenant; } public CustomSubscriptionPlan() { super(); } public CustomSubscriptionPlan(Customer tenant) { super(); this.tenant = tenant; } }
97a4b37283fe3b3c02c4b9ee1b1992a2b43ba2c8
3f7a5d7c700199625ed2ab3250b939342abee9f1
/src/gcom/gui/faturamento/credito/AtualizarTipoCreditoAction.java
41e44d488b75391f9ca2b80c92653a29d374c081
[]
no_license
prodigasistemas/gsan-caema
490cecbd2a784693de422d3a2033967d8063204d
87a472e07e608c557e471d555563d71c76a56ec5
refs/heads/master
2021-01-01T06:05:09.920120
2014-10-08T20:10:40
2014-10-08T20:10:40
24,958,220
1
0
null
null
null
null
ISO-8859-1
Java
false
false
6,620
java
/* * Copyright (C) 2007-2007 the GSAN - Sistema Integrado de Gestão de Serviços de Saneamento * * This file is part of GSAN, an integrated service management system for Sanitation * * GSAN is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License. * * GSAN is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ /* * GSAN - Sistema Integrado de Gestão de Serviços de Saneamento * Copyright (C) <2007> * Adriano Britto Siqueira * Alexandre Santos Cabral * Ana Carolina Alves Breda * Ana Maria Andrade Cavalcante * Aryed Lins de Araújo * Bruno Leonardo Rodrigues Barros * Carlos Elmano Rodrigues Ferreira * Cláudio de Andrade Lira * Denys Guimarães Guenes Tavares * Eduardo Breckenfeld da Rosa Borges * Fabíola Gomes de Araújo * Flávio Leonardo Cavalcanti Cordeiro * Francisco do Nascimento Júnior * Homero Sampaio Cavalcanti * Ivan Sérgio da Silva Júnior * José Edmar de Siqueira * José Thiago Tenório Lopes * Kássia Regina Silvestre de Albuquerque * Leonardo Luiz Vieira da Silva * Márcio Roberto Batista da Silva * Maria de Fátima Sampaio Leite * Micaela Maria Coelho de Araújo * Nelson Mendonça de Carvalho * Newton Morais e Silva * Pedro Alexandre Santos da Silva Filho * Rafael Corrêa Lima e Silva * Rafael Francisco Pinto * Rafael Koury Monteiro * Rafael Palermo de Araújo * Raphael Veras Rossiter * Roberto Sobreira Barbalho * Rodrigo Avellar Silveira * Rosana Carvalho Barbosa * Sávio Luiz de Andrade Cavalcante * Tai Mu Shih * Thiago Augusto Souza do Nascimento * Tiago Moreno Rodrigues * Vivianne Barbosa Sousa * * Este programa é software livre; você pode redistribuí-lo e/ou * modificá-lo sob os termos de Licença Pública Geral GNU, conforme * publicada pela Free Software Foundation; versão 2 da * Licença. * Este programa é distribuído na expectativa de ser útil, mas SEM * QUALQUER GARANTIA; sem mesmo a garantia implícita de * COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM * PARTICULAR. Consulte a Licença Pública Geral GNU para obter mais * detalhes. * Você deve ter recebido uma cópia da Licença Pública Geral GNU * junto com este programa; se não, escreva para Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307, USA. */ package gcom.gui.faturamento.credito; import gcom.fachada.Fachada; import gcom.faturamento.credito.CreditoTipo; import gcom.financeiro.lancamento.FiltroLancamentoItemContabil; import gcom.financeiro.lancamento.LancamentoItemContabil; import gcom.gui.GcomAction; import gcom.seguranca.acesso.usuario.Usuario; import gcom.util.ConstantesSistema; import gcom.util.filtro.ParametroSimples; import java.math.BigDecimal; import java.util.Collection; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; public class AtualizarTipoCreditoAction extends GcomAction { public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { // Seta o retorno ActionForward retorno = actionMapping.findForward("telaSucesso"); // Obtém a instância da fachada Fachada fachada = Fachada.getInstancia(); // Mudar isso quando tiver esquema de segurança HttpSession sessao = httpServletRequest.getSession(false); // Usuario logado no sistema Usuario usuarioLogado = (Usuario)sessao.getAttribute(Usuario.USUARIO_LOGADO); AtualizarTipoCreditoActionForm atualizarTipoCreditoActionForm = (AtualizarTipoCreditoActionForm) actionForm; CreditoTipo creditoTipo = (CreditoTipo) sessao .getAttribute("creditoTipoAtualizar"); // creditoTipo.setId(new Integer(atualizarTipoCreditoActionForm // .getCodigo())); creditoTipo.setDescricao(atualizarTipoCreditoActionForm.getDescricao()); creditoTipo.setDescricaoAbreviada(atualizarTipoCreditoActionForm .getAbreviatura()); creditoTipo.setIndicadorGeracaoAutomatica(new Short( atualizarTipoCreditoActionForm.getIndicadorgeracaoAutomaica())); creditoTipo.setIndicadorUso(new Integer(atualizarTipoCreditoActionForm .getIndicativoUso())); String valorLimiteCredito = atualizarTipoCreditoActionForm .getValorLimiteCredito(); valorLimiteCredito = valorLimiteCredito.replace(".", ""); valorLimiteCredito = valorLimiteCredito.replace(",", "."); creditoTipo.setValorLimite(new BigDecimal(valorLimiteCredito)); // AtendimentoMotivoEncerramento atendimentoMotivoEncerramento = null; if (atualizarTipoCreditoActionForm.getTipoLancamentoContabil() != null) { Integer idTipoLancamentoContabil = new Integer( atualizarTipoCreditoActionForm.getTipoLancamentoContabil()); if (idTipoLancamentoContabil .equals(ConstantesSistema.NUMERO_NAO_INFORMADO)) { creditoTipo.setLancamentoItemContabil(null); } else { FiltroLancamentoItemContabil filtroLancamentoItemContabil = new FiltroLancamentoItemContabil(); filtroLancamentoItemContabil .adicionarParametro(new ParametroSimples( FiltroLancamentoItemContabil.ID, atualizarTipoCreditoActionForm .getTipoLancamentoContabil().toString())); Collection colecaoTipoLancamentoContabil = (Collection) fachada .pesquisar(filtroLancamentoItemContabil, LancamentoItemContabil.class.getName()); // setando creditoTipo .setLancamentoItemContabil((LancamentoItemContabil) colecaoTipoLancamentoContabil .iterator().next()); } } fachada.atualizarTipoCredito(creditoTipo, usuarioLogado); montarPaginaSucesso(httpServletRequest, "Tipo de Crédito " + creditoTipo.getId().toString() + " atualizado com sucesso.", "Realizar outra Manutenção de Tipo de Crédito", "exibirFiltrarTipoCreditoAction.do?menu=sim"); return retorno; } }
1da77b53f3bf892a7b18cce223a084e643a81cb0
37a30835fcea9664afa873871e479cd28e280378
/app/src/main/java/com/duy/pascal/interperter/exceptions/parsing/missing/MissingSemicolonTokenException.java
3e4dfaa29cc5a30173046a8ac09629e1ffdfd10a
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
DereckySany/pascalnide
2e2ad859ff91809a52817f2a61dac92f048ece85
c7f3f79ecf4cf6a81b32c7d389aad7f4034c8f01
refs/heads/master
2022-01-03T08:00:37.935504
2018-03-18T14:02:17
2018-03-18T14:02:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,529
java
/* * Copyright (c) 2017 Tran Le Duy * * 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.duy.pascal.interperter.exceptions.parsing.missing; import android.content.Context; import android.support.annotation.NonNull; import android.text.Spanned; import com.duy.pascal.interperter.linenumber.LineNumber; import com.duy.pascal.ui.R; import static com.duy.pascal.ui.code.ExceptionManager.formatMessageFromResource; public class MissingSemicolonTokenException extends MissingTokenException { public MissingSemicolonTokenException(@NonNull LineNumber line) { super(line); } @NonNull public String getMissingToken() { return ";"; } @Override public boolean canQuickFix() { return true; } @Override public Spanned getFormattedMessage(@NonNull Context context) { return formatMessageFromResource(this, context, R.string.MissingSemicolonTokenException, getLineNumber().getLine()); } }
e18722b216ae388bb64377dd1808d5369aa5c989
a7c85a1e89063038e17ed2fa0174edf14dc9ed56
/spring-aop-perf-tests/src/main/java/coas/perf/ComplexCondition250/Advice116.java
f2008b6c938d1d0642074fbea862f3ec704d1e19
[]
no_license
pmaslankowski/java-contracts
28b1a3878f68fdd759d88b341c8831716533d682
46518bb9a83050956e631faa55fcdf426589830f
refs/heads/master
2021-03-07T13:15:28.120769
2020-09-07T20:06:31
2020-09-07T20:06:31
246,267,189
0
0
null
null
null
null
UTF-8
Java
false
false
1,644
java
package coas.perf.ComplexCondition250; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.springframework.stereotype.Component; import coas.perf.ComplexCondition250.Subject250; @Aspect @Component("Advice_250_116_cc") public class Advice116 { @Around("execution(* coas.perf.ComplexCondition250.Subject250.*(..)) and (execution(* *.junk0(..)) or execution(* *.junk1(..)) or execution(* *.junk2(..)) or execution(* *.junk3(..)) or execution(* *.junk4(..)) or execution(* *.junk5(..)) or execution(* *.junk6(..)) or execution(* *.junk7(..)) or execution(* *.junk8(..)) or execution(* *.junk9(..)) or execution(* *.junk10(..)) or execution(* *.junk11(..)) or execution(* *.junk12(..)) or execution(* *.junk13(..)) or execution(* *.junk14(..)) or execution(* *.junk15(..)) or execution(* *.junk16(..)) or execution(* *.junk17(..)) or execution(* *.junk18(..)) or execution(* *.junk19(..)) or execution(* *.junk20(..)) or execution(* *.junk21(..)) or execution(* *.junk22(..)) or execution(* *.junk23(..)) or execution(* *.junk24(..)) or execution(* *.junk25(..)) or execution(* *.junk26(..)) or execution(* *.junk27(..)) or execution(* *.junk28(..)) or execution(* *.junk29(..)) or execution(* *.target(..)))") public Object onTarget(ProceedingJoinPoint joinPoint) throws Throwable { int res = (int) joinPoint.proceed(); for (int i=0; i < 1000; i++) { if (res % 2 == 0) { res /= 2; } else { res = 2 * res + 1; } } return res; } }
11e4521ec0641a327984162b876c802ae5ac4af5
a662c696678b3e333084d35d18052444a78ac180
/Day0721_2cocos2dbase/src/com/anjoyo/day0721_1cocos2dbase/MyLayer.java
02cd618553ddf9fd7774ceafe248daddd63ba393
[]
no_license
guoxiaojun001/cocos_2d
7ed44af37a50e2c82b29225b7947888655102739
d3bd79f578dcf627e81093ed74a12def95660f8c
refs/heads/master
2016-09-11T02:54:01.748407
2015-04-11T13:51:17
2015-04-11T13:51:17
33,776,157
0
1
null
null
null
null
GB18030
Java
false
false
653
java
package com.anjoyo.day0721_1cocos2dbase; import org.cocos2d.layers.CCLayer; import org.cocos2d.nodes.CCSprite; public class MyLayer extends CCLayer { public MyLayer(){ init(); } private void init() { CCSprite zombie = CCSprite.sprite("z_1_01.png"); zombie.setAnchorPoint(0, 0); zombie.setPosition(200, 150); zombie.setFlipX(true);//x镜像,x方向反转 // zombie.setFlipY(true);//y镜像,y方向反转 CCSprite cover = CCSprite.sprite("cover.jpg"); cover.setAnchorPoint(0, 0); //缩小为0.65 cover.setScale(0.65); //int z,表示重要性,越大越最后绘制 addChild(cover,0); this.addChild(zombie,1); } }
c95438acbb43ac6aaa9f71df621e37f56c003f10
9ab5bdb918b886f1f2d09d81efb63ff83a86bfb0
/core/src/main/java/com/jdt/fedlearn/core/entity/localModel/LocalLinearModel.java
ce2d606031ca576990eec59fcbdf4d03642e45ff
[ "Apache-2.0" ]
permissive
BestJex/fedlearn
75a795ec51c4a37af34886c551874df419da3a9c
15395f77ac3ddd983ae3affb1c1a9367287cc125
refs/heads/master
2023-06-17T01:27:36.143351
2021-07-19T10:43:09
2021-07-19T10:43:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,887
java
/* Copyright 2020 The FedLearn Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package com.jdt.fedlearn.core.entity.localModel; import com.jdt.fedlearn.core.model.common.loss.SquareLoss; import com.jdt.fedlearn.core.entity.randomForest.DataUtils; import org.ejml.data.SingularMatrixException; import org.ejml.equation.Equation; import org.ejml.simple.SimpleMatrix; import java.util.HashMap; import java.util.Map; import java.util.stream.IntStream; public class LocalLinearModel implements LocalModel { /** * Local linear model: Y = X * beta + alpha */ // column vector SimpleMatrix beta; // scalar double alpha; // ridge regression parameter double lambda; // 线性模型默认拟合MSE SquareLoss loss = new SquareLoss(); // 构造函数 public LocalLinearModel() { this.lambda = 1e-6; } public LocalLinearModel(double lambda) { this.lambda = lambda; } @Override public String getModelType() { return "LinearModel"; } @Override public void train(SimpleMatrix X, SimpleMatrix y) { // compute (X.T * X + lambda * I) \ (X.T * y) SimpleMatrix y1 = y; if (y1.numRows() == 1) { y1 = y1.transpose(); } Equation eq = new Equation(); int numRows = X.numRows(); eq.alias(X, "X", numRows, "n"); eq.process("X1 = [X,ones(n,1)]"); SimpleMatrix X1 = new SimpleMatrix(eq.lookupSimple("X1")); SimpleMatrix eye = SimpleMatrix.identity(X.numCols() + 1); SimpleMatrix X2 = X1.transpose().mult(X1).plus(eye.scale(lambda)); try { SimpleMatrix res = X2.solve(X1.transpose().mult(y1)); // set beta res.print(); beta = res.extractMatrix(0, res.numRows() - 1, 0, 1); alpha = res.get(res.numRows() - 1, 0); } catch (SingularMatrixException e) { throw new IllegalArgumentException("Singular matrix"); } } @Override public double predict(SimpleMatrix X) { return X.dot(beta) + alpha; } @Override public double[] batchPredict(SimpleMatrix X) { if (X.numCols() == beta.numRows()) { // X * beta return doBatchPredict(X); } else if (X.numRows() == beta.numRows()) { // X.T * beta return doBatchPredict(X.transpose()); } else { throw new IllegalArgumentException("Matrix dimensions of X and beta are not compatible"); } } private double[] doBatchPredict(SimpleMatrix X) { SimpleMatrix y = X.mult(beta).plus(alpha); return DataUtils.toArray(y); } @Override public double[] getResidual(SimpleMatrix X, SimpleMatrix y) { double[] pred = batchPredict(X); return IntStream.range(0, pred.length).mapToDouble(i -> pred[i] - y.get(i)).toArray(); } @Override public double[] getGradient(SimpleMatrix X, SimpleMatrix y) { double[] pred = batchPredict(X); return loss.grad(pred, DataUtils.toArray(y)); } @Override public double[] getHessian(SimpleMatrix X, SimpleMatrix y) { double[] pred = batchPredict(X); return loss.hess(pred, DataUtils.toArray(y)); } @Override public double[] getPseudoLabel(SimpleMatrix X, SimpleMatrix y) { double[] gradient = getGradient(X, y); double[] hessian = getHessian(X, y); // formula: (sqrt(h) * f - (-g) / sqrt(h))^2 // MSE loss 的话 hessian 是 1 return IntStream.range(0, gradient.length).mapToDouble(i -> -gradient[i] / Math.sqrt(hessian[i])).toArray(); } @Override public String serialize() { Map<String, String> map = new HashMap<>(); map.put("beta", DataUtils.doubleArrayToString(DataUtils.toArray(beta))); map.put("alpha", String.valueOf(alpha)); return DataUtils.mapToString(map); } @Override public LocalLinearModel deserialize(String s) { Map<String, String> map = DataUtils.stringToMap(s, true, true); double[] tmp = DataUtils.stringToDoubleArray(map.get("beta")); beta = new SimpleMatrix(tmp.length, 1); for (int i = 0; i < beta.numRows(); i++) { beta.set(i, 0, tmp[i]); } alpha = Double.parseDouble(map.get("alpha")); return this; } }
dcbd23ac6fcfc6e5be9af286c4aeec29929f870d
279b06d38332a87ded97015e0df2ec06f85bc6b5
/banbanle/src/main/java/com/sf/banbanle/bean/BaiduPushInfo.java
04f2d6f2a3726b4e48a7dd951affdc71f8f9eec4
[]
no_license
xieningtao/WakeUp
19d27dd656d32bc363773544264f5d6582329103
d622b2bd77aee1f2dabba0f8a3f8cda305d64ddd
refs/heads/master
2020-06-16T13:59:47.473881
2017-01-18T13:45:03
2017-01-18T13:45:03
75,094,017
0
0
null
null
null
null
UTF-8
Java
false
false
301
java
package com.sf.banbanle.bean; /** * Created by mac on 16/12/3. */ public class BaiduPushInfo { public final String userId; public final String channelId; public BaiduPushInfo(String userId, String channelId) { this.userId = userId; this.channelId = channelId; } }
[ "1" ]
1
c0eec5bb848494835f7d43622c0d1f568eec7473
10be1e248267f630bc7019f09b5529b40cd83e7b
/src/lwh/java/zhujie/junit/DemoTest1.java
05d8e9b218665724424bcf3c457ca996ba31e6ff
[]
no_license
liwanghonggc/JavaBase
746233c3185f07939ecf8fe2a048969fa9a7be9c
c9ce0b96240bfddceb08a8421640bbe73fa275f1
refs/heads/master
2021-07-11T05:45:30.810974
2019-03-11T01:08:07
2019-03-11T01:08:07
148,955,380
0
0
null
null
null
null
UTF-8
Java
false
false
370
java
package lwh.java.zhujie.junit; public class DemoTest1 { @Test(time = 1000) public void test1(){ try { Thread.sleep(1500); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("test1执行了"); } public void test2(){ System.out.println("test2执行了"); } }
3bb8f909f3bf5072459b03fec41d52bef4002cd1
bfed0d992f925ee137eb94026f0283724eba17fa
/V5.0/ZDK/src/nl/zeesoft/zdk/grid/ColumnFunction.java
1cc1d9fae1b430d90faf09762afe31986a96b733
[]
no_license
DyzLecticus/Zeesoft
c17c469b000f15301ff2be6c19671b12bba25f99
b5053b762627762ffeaa2de4f779d6e1524a936d
refs/heads/master
2023-04-15T01:42:36.260351
2023-04-10T06:50:40
2023-04-10T06:50:40
28,697,832
7
2
null
2023-02-27T16:30:37
2015-01-01T22:57:39
Java
UTF-8
Java
false
false
344
java
package nl.zeesoft.zdk.grid; public class ColumnFunction { public Object[] applyFunction(GridColumn column, Object[] values) { for (int z = 0; z < values.length; z++) { values[z] = applyFunction(column,z,values[z]); } return values; } public Object applyFunction(GridColumn column, int posZ, Object value) { return value; } }
c0e88e0dcc612672b4e25d7da7de693b0078e3e8
c8688db388a2c5ac494447bac90d44b34fa4132c
/sources/com/google/android/gms/internal/measurement/C2880u4.java
110a16ed1e6dacf629b7eb9b17f8f5065d11616e
[]
no_license
mred312/apk-source
98dacfda41848e508a0c9db2c395fec1ae33afa1
d3ca7c46cb8bf701703468ddc88f25ba4fb9d975
refs/heads/master
2023-03-06T05:53:50.863721
2021-02-23T13:34:20
2021-02-23T13:34:20
341,481,669
0
0
null
null
null
null
UTF-8
Java
false
false
679
java
package com.google.android.gms.internal.measurement; import java.util.Map; /* renamed from: com.google.android.gms.internal.measurement.u4 */ /* compiled from: com.google.android.gms:play-services-measurement-base@@17.6.0 */ interface C2880u4 { /* renamed from: a */ Map<?, ?> mo18859a(Object obj); /* renamed from: b */ boolean mo18860b(Object obj); /* renamed from: c */ Map<?, ?> mo18861c(Object obj); /* renamed from: d */ Object mo18862d(Object obj, Object obj2); /* renamed from: e */ int mo18863e(int i, Object obj, Object obj2); C2864s4<?, ?> zzb(Object obj); Object zze(Object obj); Object zzf(Object obj); }
d4a229dbafe1d057f80e2a2fb3d96e83c494e61d
0a532b9d7ebc356ab684a094b3cf840b6b6a17cd
/java-source/src/main/javax/tools/ForwardingFileObject.java
a177666ab6695565ad6ede70f4a0eba1d36dccc8
[ "Apache-2.0" ]
permissive
XWxiaowei/JavaCode
ac70d87cdb0dfc6b7468acf46c84565f9d198e74
a7e7cd7a49c36db3ee479216728dd500eab9ebb2
refs/heads/master
2022-12-24T10:21:28.144227
2020-08-22T08:01:43
2020-08-22T08:01:43
98,070,624
10
4
Apache-2.0
2022-12-16T04:23:38
2017-07-23T02:51:51
Java
UTF-8
Java
false
false
2,911
java
/* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.tools; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.Reader; import java.io.Writer; import java.net.URI; /** * Forwards calls to a given file object. Subclasses of this class * might override some of these methods and might also provide * additional fields and methods. * * @param <F> the kind of file object forwarded to by this object * @author Peter von der Ah&eacute; * @since 1.6 */ public class ForwardingFileObject<F extends FileObject> implements FileObject { /** * The file object which all methods are delegated to. */ protected final F fileObject; /** * Creates a new instance of ForwardingFileObject. * @param fileObject delegate to this file object */ protected ForwardingFileObject(F fileObject) { fileObject.getClass(); // null check this.fileObject = fileObject; } public URI toUri() { return fileObject.toUri(); } public String getName() { return fileObject.getName(); } /** * @throws IllegalStateException {@inheritDoc} * @throws UnsupportedOperationException {@inheritDoc} * @throws IOException {@inheritDoc} */ public InputStream openInputStream() throws IOException { return fileObject.openInputStream(); } /** * @throws IllegalStateException {@inheritDoc} * @throws UnsupportedOperationException {@inheritDoc} * @throws IOException {@inheritDoc} */ public OutputStream openOutputStream() throws IOException { return fileObject.openOutputStream(); } /** * @throws IllegalStateException {@inheritDoc} * @throws UnsupportedOperationException {@inheritDoc} * @throws IOException {@inheritDoc} */ public Reader openReader(boolean ignoreEncodingErrors) throws IOException { return fileObject.openReader(ignoreEncodingErrors); } /** * @throws IllegalStateException {@inheritDoc} * @throws UnsupportedOperationException {@inheritDoc} * @throws IOException {@inheritDoc} */ public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException { return fileObject.getCharContent(ignoreEncodingErrors); } /** * @throws IllegalStateException {@inheritDoc} * @throws UnsupportedOperationException {@inheritDoc} * @throws IOException {@inheritDoc} */ public Writer openWriter() throws IOException { return fileObject.openWriter(); } public long getLastModified() { return fileObject.getLastModified(); } public boolean delete() { return fileObject.delete(); } }
617c9d8c209b04e1ff0fbee114b961f213be8589
4c6adf0ce6ef3f02dcef9c345e0e5e4ff139d886
/MPS/app-website/src/main/java/com/pay/app/controller/base/login/LoginController.java
9a6b0545c796edb42ef187f3a167bf12cebd505d
[]
no_license
happyjianguo/pay-1
8631906be62707316f0ed3eb6b2337c90d213bc0
40ae79738cfe4e5d199ca66468f3a33e9d8f2007
refs/heads/master
2020-07-27T19:51:54.958859
2016-12-19T07:34:24
2016-12-19T07:34:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,482
java
package com.pay.app.controller.base.login; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.multiaction.MultiActionController; import com.pay.app.common.helper.AppConf; public class LoginController extends MultiActionController{ private String enterpriceLogin; private String individualLogin; public ModelAndView individualLogin(HttpServletRequest request, HttpServletResponse response) { String returnUrl=request.getParameter("returnUrl"); if(StringUtils.isBlank(returnUrl)){ returnUrl=AppConf.defaultCallBack; } return new ModelAndView(individualLogin).addObject("returnUrl",returnUrl); } public ModelAndView enterpriceLogin(HttpServletRequest request, HttpServletResponse response) { String returnUrl=request.getParameter("returnUrl"); if(StringUtils.isBlank(returnUrl)){ returnUrl=AppConf.defaultCorpCallBack; } return new ModelAndView(enterpriceLogin).addObject("returnUrl",returnUrl); } public void setEnterpriceLogin(String enterpriceLogin) { this.enterpriceLogin = enterpriceLogin; } public void setIndividualLogin(String individualLogin) { this.individualLogin = individualLogin; } }
449fe45ed8280fe77dcf7449af5dd2cb0ec10110
28bb8f9e29a821a15c8262b89f7aa968088ee3d0
/src/by/it/examples/lesson15/listing14/DynQueue.java
7348a55d47049f806c7241fe9983aa5f88582ae4
[]
no_license
Khmelov/CS2017-09
0ffee1e1054b965b76ee8cf36993f0f3ca310ff2
793e0adb7468a62eac9a49f984955070927b55f7
refs/heads/master
2021-08-26T09:46:59.063670
2017-11-23T06:54:45
2017-11-23T06:54:45
105,267,925
0
89
null
2017-11-23T06:55:45
2017-09-29T12:06:36
Java
UTF-8
Java
false
false
989
java
package by.it.examples.lesson15.listing14; // A dynamic queue. class DynQueue implements ICharQ { private char q[]; // this array holds the queue private int putloc, getloc; // the put and get indices // Construct an empty queue given its size. public DynQueue(int size) { q = new char[size]; // allocate memory for queue putloc = getloc = 0; } // Put a characer into the queue. public void put(char ch) { if(putloc==q.length) { // increase queue size char t[] = new char[q.length * 2]; // copy elements into new queue for(int i=0; i < q.length; i++) t[i] = q[i]; q = t; } q[putloc++] = ch; } // Get a character from the queue. public char get() { if(getloc == putloc) { System.out.println(" -- Queue is empty."); return (char) 0; } return q[getloc++]; } }
10edd134682e161cf85455e6db5aeb8fbc5777d9
5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab
/app/src/main/wechat6.5.3/com/tencent/mm/plugin/freewifi/ui/FreewifiActivateWeChatNoAuthStateUI.java
78654d550f4da9c164b40e46d86d00ad6c6d47e4
[]
no_license
newtonker/wechat6.5.3
8af53a870a752bb9e3c92ec92a63c1252cb81c10
637a69732afa3a936afc9f4679994b79a9222680
refs/heads/master
2020-04-16T03:32:32.230996
2017-06-15T09:54:10
2017-06-15T09:54:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,773
java
package com.tencent.mm.plugin.freewifi.ui; import android.net.NetworkInfo.State; import com.tencent.mm.model.ak; import com.tencent.mm.plugin.freewifi.d.a; import com.tencent.mm.plugin.freewifi.m; import com.tencent.mm.plugin.freewifi.model.d; import com.tencent.mm.plugin.freewifi.model.j; import com.tencent.mm.sdk.platformtools.v; import com.tencent.mm.v.e; import com.tencent.mm.v.k; @Deprecated public class FreewifiActivateWeChatNoAuthStateUI extends FreeWifiActivateNoAuthStateUI { private int bcb; private String gcX; private String gcY; protected final String apQ() { return getString(2131232984); } public final void a(State state) { v.i("MicroMsg.FreeWifi.FreewifiActivateWeChatNoAuthStateUI", "now network state : %s", new Object[]{state.toString()}); if (state == State.CONNECTED && d.tH(this.ssid) && this.gaY) { apT(); this.gaY = false; this.gcX = d.aoW(); this.gcY = d.aoY(); this.bcb = d.aoX(); v.i("MicroMsg.FreeWifi.FreewifiActivateWeChatNoAuthStateUI", "now has connect the ap, check from server rssi is : %d, mac : %s, ssid is : %s", new Object[]{Integer.valueOf(this.bcb), this.gcX, this.gcY}); new a(this.fZD, this.gcX, this.gcY, this.bcb, this.aPW, m.s(getIntent())).b(new e(this) { final /* synthetic */ FreewifiActivateWeChatNoAuthStateUI gcZ; { this.gcZ = r1; } public final void a(int i, int i2, String str, k kVar) { ak.vy().b(640, this); v.i("MicroMsg.FreeWifi.FreewifiActivateWeChatNoAuthStateUI", "onSceneEnd, errType = %d, errCode = %d", new Object[]{Integer.valueOf(i), Integer.valueOf(i2)}); if (i == 0 && i2 == 0) { v.i("MicroMsg.FreeWifi.FreewifiActivateWeChatNoAuthStateUI", "check ap ok"); d.a(this.gcZ.ssid, 2, this.gcZ.getIntent()); return; } v.e("MicroMsg.FreeWifi.FreewifiActivateWeChatNoAuthStateUI", "check ap failed : rssi is : %d, mac : %s, ssid is : %s", new Object[]{Integer.valueOf(this.gcZ.bcb), this.gcZ.gcX, this.gcZ.gcY}); this.gcZ.ku(-2014); d.tJ(this.gcZ.gcY); } }); } } protected void onDestroy() { super.onDestroy(); } protected final int apP() { j.api(); int tG = d.tG(this.ssid); v.i("MicroMsg.FreeWifi.FreewifiActivateWeChatNoAuthStateUI", "get connect state = %d", new Object[]{Integer.valueOf(tG)}); if (tG == 0) { return -2014; } return tG; } }
833859df37aca04d5a93b2a0088d3cb0e400ecc3
c609b045ef0bd0dfbc1b0ac5caac869915bfba6d
/src/test/java/com/liujun/command/processbuilder/TestSynchronousLocalShellCommand.java
67c3697e5343ff515d47579fbcc438b6a0920a14
[]
no_license
kkzfl22/demojava8
de0c8d877b7b980f2ee4bef9227af9470d79842f
5d0030a27a8ffcac2a619e9bf5b7d8dc9eba171f
refs/heads/master
2022-06-27T08:21:31.257326
2021-04-23T01:36:23
2021-04-23T01:36:23
208,544,311
3
0
null
2022-05-20T22:01:43
2019-09-15T04:58:48
Java
UTF-8
Java
false
false
961
java
package com.liujun.command.processbuilder; import org.junit.Assert; import org.junit.Test; import java.util.Arrays; import java.util.List; /** * 测试同步命令的执行 * * @author liujun * @version 0.0.1 */ public class TestSynchronousLocalShellCommand { /** 同步执行命令 */ @Test public void synchornousDoCommand() { // 运行一个正常的命令 this.runCommand("ping www.baidu.com"); // 运行一个bat脚本 this.runCommand("D:/run/bat/run.bat"); // 错误命令 this.runCommand("abcdef"); } /** * 运行command * * @param commandStr 错误命令行 */ private void runCommand(String commandStr) { List<String> commandList = Arrays.asList("cmd.exe","/C",commandStr); SynchronousLocalShellCommand command = new SynchronousLocalShellCommand(commandList); String commandRsp = command.doCommand(); Assert.assertNotNull(commandRsp); System.out.println(commandRsp); } }
81670c20d2c47ac068057811d0e69db3a1df2806
cde4358da2cbef4d8ca7caeb4b90939ca3f1f1ef
/java/quantserver/snmpagent/src/main/java/deltix/snmp/smi/SMIRowImpl.java
83fe0ade82cda222f4ff14b3314a724d3d84d898
[ "Apache-2.0" ]
permissive
ptuyo/TimeBase
e17a33e0bfedcbbafd3618189e4de45416ec7259
812e178b814a604740da3c15cc64e42c57d69036
refs/heads/master
2022-12-18T19:41:46.084759
2020-09-29T11:03:50
2020-09-29T11:03:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,062
java
package deltix.snmp.smi; /** * */ public class SMIRowImpl extends SMIPrimitiveContainerImpl <SMITableImpl> implements SMIRow { private final SMIIndexInfo indexInfo; /** * Row with primary index */ public SMIRowImpl( SMITableImpl parent, SMIOID oid, String name, String description, int numIndexedChildren, boolean lastIndexImplicit ) { super (parent, oid, name, description); if (numIndexedChildren < 1) throw new IllegalArgumentException ("No indexes defined"); indexInfo = new SMIPrimaryIndexImpl (numIndexedChildren, lastIndexImplicit); } /** * Augmenting row */ SMIRowImpl ( SMITableImpl parent, SMIOID oid, String name, String description, SMIRow augmentsRow ) { super (parent, oid, name, description); indexInfo = new SMIAugmentedIndexImpl (augmentsRow); } @Override public SMIIndexInfo getIndexInfo () { return (indexInfo); } @Override public SMIPrimitive addObjectType ( int id, String name, SMIType type, SMIAccess access, String description, int indexDepth ) { checkChild (id, name); SMIPrimitiveNodeImpl node = new SMIPrimitiveNodeImpl ( this, new SMIOID (getOid (), id), name, type, access, description ); registerChild (node); if (indexDepth >= 0) { if (!(indexInfo instanceof SMIPrimaryIndexImpl)) throw new IllegalArgumentException ( this + " was not constructed with the primary index flags" ); SMIPrimaryIndexImpl pi = (SMIPrimaryIndexImpl) indexInfo; SMIPrimitive [] indexes = pi.indexedChildren; if (indexDepth >= indexes.length) throw new IllegalArgumentException ( "Index depth " + indexDepth + " > max " + indexes.length ); if (indexes [indexDepth] != null) throw new IllegalArgumentException( String.format("Index at depth %d is already set: %s [%s] clashes with %s [%s]", indexDepth, indexes[indexDepth], indexes[indexDepth].getDescription(), node, node.getDescription()) ); indexes [indexDepth] = node; } return (node); } }
f3e6c4ef939058e77e293d597ba11b43e21fc23c
ce3014bb6eed65d35480135d2306ba6114d93abd
/src/main/java/com/yanan/plugin/spring/SpringBeansResource.java
3496aaa003245e6d4e26a7c561858c3a6a973d40
[ "Apache-2.0" ]
permissive
tja414312570/plugin.spring
d1c356a58bb7a05976bb1dfd043a980124fe4761
931f03c4ecc5de224d22497685a427b627f727e1
refs/heads/main
2023-08-26T08:25:19.244494
2021-10-12T09:48:54
2021-10-12T09:48:54
353,289,698
0
0
null
null
null
null
UTF-8
Java
false
false
221
java
package com.yanan.plugin.spring; import com.yanan.framework.plugin.decoder.StandScanResource; public class SpringBeansResource extends StandScanResource{ public SpringBeansResource(String path) { super(path); } }
15836875a51e127e6fe34d4cae33d4a8b6a15c48
0118956ece52559399cd1805dd68ac21e83ae3d9
/fitnesse/lib/src/fitlibrarySrc/fitlibrary/exception/ExceptionHandlingStandard.java
ba4e38e2ab7d71146372c2b17f06e1e3350ffc88
[]
no_license
JavaQualitasCorpus/fitlibraryforfitnesse-20110301
6588290ca08deb254e76f67aa6936d2a6f24370f
ceb5abcce236ae380cc0745a7920f82cfba69a19
refs/heads/master
2023-08-12T08:37:17.890919
2019-03-12T23:27:44
2019-03-12T23:27:44
167,004,721
0
1
null
null
null
null
UTF-8
Java
false
false
1,612
java
/* * Copyright (c) 2009 Rick Mugridge, www.RimuResearch.com * Released under the terms of the GNU General Public License version 2 or later. * 20/10/2009 */ package fitlibrary.exception; import java.io.PrintWriter; import java.io.StringWriter; import fit.Fixture; import fitlibrary.suite.BatchFitLibrary; import fitlibrary.utility.ExceptionHandler; import fitlibrary.utility.HtmlUtils; public class ExceptionHandlingStandard implements ExceptionHandling { @Override public void mustBeThreadSafe() { // } @Override public String exceptionMessage(Throwable throwable) { Throwable exception = unwrapThrowable(throwable); if (!BatchFitLibrary.SHOW_EXCEPTION_STACKS && exception instanceof IgnoredException) return ""; if (!BatchFitLibrary.SHOW_EXCEPTION_STACKS && exception instanceof FitLibraryExceptionInHtml) return "<hr/>" + Fixture.label(exception.getMessage()); if (!BatchFitLibrary.SHOW_EXCEPTION_STACKS && exception instanceof FitLibraryException) return "<hr/>" + Fixture.label(HtmlUtils.escapeHtml(exception.getMessage())); final StringWriter buf = new StringWriter(); exception.printStackTrace(new PrintWriter(buf)); return "<hr><pre><div class=\"fit_stacktrace\">" + (buf.toString()) + "</div></pre>"; } @Override public Throwable unwrapThrowable(Throwable throwable) { return ExceptionHandler.unwrap(throwable); } @Override public boolean unwrappedIsShow(Exception e) { return unwrapThrowable(e) instanceof FitLibraryShowException; } }
d2e30d85cf4a1774874575a85aa59d3eee6af089
eb2556a43cc0a8d1c525fb21bb00d5a6158da4ad
/basex-tests/src/test/java/org/basex/server/ServerMemTest.java
6ad60fd336ed8d24dad588a6f52230318f18dd0d
[ "BSD-3-Clause" ]
permissive
SirOlrac/basex
ee22c8336f2430ae38e962399f1cdc89c9a657d3
b97a3bbf961178d0c3dc8c65d389c8299fc5d517
refs/heads/master
2020-06-13T20:08:21.217244
2016-12-02T21:48:49
2016-12-02T21:48:49
75,557,973
1
0
null
2016-12-04T19:08:45
2016-12-04T19:08:45
null
UTF-8
Java
false
false
1,774
java
package org.basex.server; import org.basex.*; import org.basex.api.client.*; import org.junit.*; /** * This class performs a client/server memory stress tests with a specified * number of threads and queries. * * @author BaseX Team 2005-16, BSD License * @author Christian Gruen */ public final class ServerMemTest extends SandboxTest { /** Query to be run. */ private static final String QUERY = "(for $i in 1 to 50000 order by $i return $i)[1]"; /** Server reference. */ BaseXServer server; /** * Runs the test. * @throws Exception exception */ @Test public void clients10() throws Exception { run(10); } /** * Runs the test. * @throws Exception exception */ @Test public void clients100() throws Exception { run(100); } /** * Runs the stress test. * @param clients number of clients * @throws Exception exception */ private void run(final int clients) throws Exception { //run server instance server = createServer(); // run clients final Client[] cl = new Client[clients]; for(int i = 0; i < clients; ++i) cl[i] = new Client(); for(final Client c : cl) c.start(); for(final Client c : cl) c.join(); // stop server stopServer(server); } /** Single client. */ static final class Client extends Thread { /** Client session. */ private final ClientSession session; /** * Default constructor. * @throws Exception exception */ Client() throws Exception { session = createClient(); } @Override public void run() { try { // Perform query session.execute("xquery " + QUERY); session.close(); } catch(final Exception ex) { ex.printStackTrace(); } } } }
1ce296ded1d5a2d463bde55f2ead11837a6d6b3c
017b6dd7d3a526ff1664c3f5734d7943c4a30815
/src/main/java/com/bfsi/mfi/dao/AgentValidationDao.java
34314729e76401be96fbc5f3a0d7d9885cafb351
[ "Apache-2.0" ]
permissive
ltphan/egalite-web-service
bfa3418cfecc750303a73c1234dbd237119bc3b1
8f47a544b5508a490ef18d45b62621857915c156
refs/heads/develop
2021-01-22T00:30:01.371799
2016-08-07T18:14:00
2016-08-07T18:14:00
63,091,292
0
0
null
2016-07-11T18:15:18
2016-07-11T18:15:17
null
UTF-8
Java
false
false
254
java
package com.bfsi.mfi.dao; import com.bfsi.mfi.entity.AgentValidationServiceRequest; /** * * @author Shabu * */ //EGA-MN15-000017 public interface AgentValidationDao { public String checkAgentValidity(AgentValidationServiceRequest p_request); }
defbe9b4bb00fc16437ca7bd51b5bc05ece07616
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-900-Files/boiler-To-Generate-900-Files/syncregions-900Files/BoilerActuator1381.java
42f1f8a13d953b06f4ccd16a029792b39ff9db04
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
263
java
package syncregions; public class BoilerActuator1381 { public execute(int temperatureDifference1381, boolean boilerStatus1381) { //sync _bfpnGUbFEeqXnfGWlV1381, behaviour Half Change - return temperature - targetTemperature; //endSync } }
9ee967dfe17c42429e5b3f73fd4e9172e8ef76df
3b320eefee9006512b004bf592500dee8c9381ef
/Moonstone/src/moonstone/rule/InferenceRule.java
90ebc32935a0215a4d0cfce240fd38ef8d90ee67
[]
no_license
leenlp/Moonstone
0f48707f31fcfc9e73d082032ad7c1706fa9928a
07dfd8c0f2f2635afc050f48e861f38135a3f6e9
refs/heads/master
2021-01-18T23:36:55.268542
2018-10-10T03:32:00
2018-10-10T03:32:00
152,357,622
1
0
null
null
null
null
UTF-8
Java
false
false
2,683
java
package moonstone.rule; import java.util.Vector; import moonstone.annotation.AnnotationIntegrationMaps; import tsl.expression.form.sentence.ImplicationSentence; import tsl.expression.term.constant.ObjectConstant; import tsl.expression.term.relation.RelationSentence; import tsl.knowledge.knowledgebase.KnowledgeBase; import tsl.tsllisp.Sexp; import tsl.tsllisp.TLUtils; public class InferenceRule extends Rule { private ImplicationSentence implicationSentence = null; public InferenceRule(KnowledgeBase kb, Sexp sexp) { kb.clearFields(); this.setPattern(TLUtils.convertSexpToJVector(sexp)); this.setPropertiesFromPattern(this.getPattern()); this.setRuleType("inferencerule"); String idstr = this.getStringProperty("ruleid"); this.setRuleID(idstr); Sexp s = (Sexp) sexp.getSecond(); Vector sv = TLUtils.convertSexpToJVector(s); this.implicationSentence = (ImplicationSentence) ImplicationSentence .createImplicationSentence(sv); this.implicationSentence.setName(this.getRuleID()); this.implicationSentence.setSexp(sexp); this.implicationSentence.setContainingObject(this); kb.initializeAndAddForm(this.implicationSentence); } public InferenceRule(KnowledgeBase kb, Sexp sexp, String idstr) { kb.clearFields(); this.setRuleType("inferencerule"); this.setRuleID(idstr); Vector sv = TLUtils.convertSexpToJVector(sexp); this.implicationSentence = (ImplicationSentence) ImplicationSentence .createImplicationSentence(sv); this.implicationSentence.setSexp(sexp); this.implicationSentence.setContainingObject(this); kb.initializeAndAddForm(this.implicationSentence); } public static InferenceRule createInferenceRule(KnowledgeBase kb, Sexp sexp) { if (isInferenceRule(sexp)) { return new InferenceRule(kb, sexp); } return null; } public static boolean isInferenceRule(Sexp sexp) { return (sexp.getLength() == 2 && TLUtils.isCons(sexp.getSecond()) && ImplicationSentence .isImpllicationSentence((Sexp) sexp.getSecond())); } public ImplicationSentence getImplicationSentence() { return implicationSentence; } public String getConsequentConcept() { if (this.getImplicationSentence() != null && this.getImplicationSentence().getConsequent() != null) { RelationSentence consequent = this.getImplicationSentence() .getConsequentRelationSentence(); if (consequent.getTermCount() > 0) { for (Object o : consequent.getTerms()) { if (o instanceof ObjectConstant) { ObjectConstant uo = (ObjectConstant) o; String str = uo.getObject().toString(); if (AnnotationIntegrationMaps.getCUI(str) != null) { return str; } } } } } return null; } }
97a33a2486cfd6503b2e31c83333be65f6ae6988
c8655251bb853a032ab7db6a9b41c13241565ff6
/jframe-utils/src/main/java/com/alipay/api/domain/KoubeiAdvertCommissionAdvchannelBindModel.java
b2ea0242adfe0551f275872515ef0790d8cacfdd
[]
no_license
jacksonrick/JFrame
3b08880d0ad45c9b12e335798fc1764c9b01756b
d9a4a9b17701eb698b957e47fa3f30c6cb8900ac
refs/heads/master
2021-07-22T21:13:22.548188
2017-11-03T06:49:44
2017-11-03T06:49:44
107,761,091
1
0
null
null
null
null
UTF-8
Java
false
false
979
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 添加广告的渠道关系接口 * * @author auto create * @since 1.0, 2017-01-17 10:33:28 */ public class KoubeiAdvertCommissionAdvchannelBindModel extends AlipayObject { private static final long serialVersionUID = 3791739828686872555L; /** * 广告id */ @ApiField("adv_id") private String advId; /** * 渠道ID列表 */ @ApiListField("channel_id_list") @ApiField("string") private List<String> channelIdList; public String getAdvId() { return this.advId; } public void setAdvId(String advId) { this.advId = advId; } public List<String> getChannelIdList() { return this.channelIdList; } public void setChannelIdList(List<String> channelIdList) { this.channelIdList = channelIdList; } }
438611bda68910bcb11b04c430df8e7792957e95
4e8d52f594b89fa356e8278265b5c17f22db1210
/WebServiceArtifacts/BookingAPI/_170/_0/_168/_192/tt/bookingapi/ArrayOfWSTicket.java
571153579815fee8b9a044f87738f815cc656bbd
[]
no_license
ouniali/WSantipatterns
dc2e5b653d943199872ea0e34bcc3be6ed74c82e
d406c67efd0baa95990d5ee6a6a9d48ef93c7d32
refs/heads/master
2021-01-10T05:22:19.631231
2015-05-26T06:27:52
2015-05-26T06:27:52
36,153,404
1
2
null
null
null
null
UTF-8
Java
false
false
1,893
java
package _170._0._168._192.tt.bookingapi; 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; /** * <p>Java class for ArrayOfWSTicket complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ArrayOfWSTicket"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="WSTicket" type="{http://192.168.0.170/TT/BookingAPI}WSTicket" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ArrayOfWSTicket", propOrder = { "wsTicket" }) public class ArrayOfWSTicket { @XmlElement(name = "WSTicket", nillable = true) protected List<WSTicket> wsTicket; /** * Gets the value of the wsTicket 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 wsTicket property. * * <p> * For example, to add a new item, do as follows: * <pre> * getWSTicket().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link WSTicket } * * */ public List<WSTicket> getWSTicket() { if (wsTicket == null) { wsTicket = new ArrayList<WSTicket>(); } return this.wsTicket; } }
73ba22da1c0f083bafbcb9dc19afc2c4755c6411
72cbb22560559912fc1a2ab4b6348fe111a66cb0
/spring-restdocs-core/src/main/java/org/springframework/restdocs/payload/PayloadHandlingException.java
38bc2bf0ff4c2c560fe5dfff102367e96d82c84d
[ "Apache-2.0" ]
permissive
helpermethod/spring-restdocs
2ef199ae1bc67a7cc42bff2adfd5cccd3854d65f
24c1746b363d08a0d369565134ef338cd8069350
refs/heads/master
2020-04-01T23:52:36.071654
2018-10-04T11:26:50
2018-10-04T11:26:50
153,777,173
1
0
null
2018-10-19T12:09:31
2018-10-19T12:09:30
null
UTF-8
Java
false
false
1,278
java
/* * Copyright 2014-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.restdocs.payload; /** * Thrown to indicate that a failure has occurred during payload handling. * * @author Andy Wilkinson * */ @SuppressWarnings("serial") class PayloadHandlingException extends RuntimeException { /** * Creates a new {@code PayloadHandlingException} with the given {@code message}. * @param message the message * @since 1.2.0 */ PayloadHandlingException(String message) { super(message); } /** * Creates a new {@code PayloadHandlingException} with the given {@code cause}. * @param cause the cause of the failure */ PayloadHandlingException(Throwable cause) { super(cause); } }
59698f095d0e67408e23980b879654ea86ea533b
3ca3dc07eb6afffe2fb5c858f7e7dbde5bebaa28
/jBPM64Ex023_taskReassignment/src/test/java/com/sample/ProcessJPATest.java
5b27214e2b8bab4e177fce2b8083f829b67fe1b0
[ "CC0-1.0", "LicenseRef-scancode-public-domain" ]
permissive
tkobayas/BxMS64examples
040c9c50939d522f7298e30e549869eec7e1c71b
daeadc50a2487c2c160b37b2dfbfe8b01dbcac04
refs/heads/master
2022-11-01T06:57:02.524135
2021-12-10T06:50:32
2021-12-10T06:50:32
97,538,348
1
0
null
2022-10-05T19:02:59
2017-07-18T01:28:11
Java
UTF-8
Java
false
false
6,854
java
package com.sample; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import org.h2.tools.Server; import org.jbpm.process.audit.JPAAuditLogService; import org.jbpm.runtime.manager.impl.RuntimeEnvironmentBuilder; import org.jbpm.services.task.identity.JBossUserGroupCallbackImpl; import org.jbpm.test.JBPMHelper; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.kie.api.io.ResourceType; import org.kie.api.runtime.KieSession; import org.kie.api.runtime.manager.RuntimeEngine; import org.kie.api.runtime.manager.RuntimeEnvironment; import org.kie.api.runtime.manager.RuntimeManager; import org.kie.api.runtime.manager.RuntimeManagerFactory; import org.kie.api.runtime.process.ProcessInstance; import org.kie.api.task.TaskService; import org.kie.api.task.UserGroupCallback; import org.kie.api.task.model.TaskSummary; import org.kie.internal.io.ResourceFactory; import org.kie.internal.runtime.manager.context.EmptyContext; import org.kie.internal.runtime.manager.context.ProcessInstanceIdContext; import bitronix.tm.BitronixTransactionManager; import bitronix.tm.TransactionManagerServices; import bitronix.tm.resource.jdbc.PoolingDataSource; /** * This is a sample file to launch a process. */ public class ProcessJPATest { private static final boolean H2 = true; private static EntityManagerFactory emf; private static Server h2Server; private static PoolingDataSource ds; @Before public void setup() { if (H2) { // for H2 datasource h2Server = JBPMHelper.startH2Server(); ds = JBPMHelper.setupDataSource(); } else { // for external database datasource ds = setupDataSource(); } Map configOverrides = new HashMap(); configOverrides.put("hibernate.hbm2ddl.auto", "create"); // Uncomment if you don't want to clean up tables if (H2) { configOverrides.put("hibernate.dialect", "org.hibernate.dialect.H2Dialect"); } else { configOverrides.put("hibernate.dialect", "org.hibernate.dialect.MySQL5InnoDBDialect"); // Change for other DB } emf = Persistence.createEntityManagerFactory("org.jbpm.example", configOverrides); } @After public void teardown() { if (ds != null) { ds.close(); } if (h2Server != null) { h2Server.shutdown(); } } @Test public void testProcess() throws Exception { try { RuntimeManager manager = getRuntimeManager("sample.bpmn"); RuntimeEngine runtime = manager.getRuntimeEngine(ProcessInstanceIdContext.get()); KieSession ksession = runtime.getKieSession(); // JPAAuditLogService logService = new JPAAuditLogService(ksession.getEnvironment()); BitronixTransactionManager transactionManager = TransactionManagerServices.getTransactionManager(); transactionManager.setTransactionTimeout(3600); // longer timeout for a debugger // start a new process instance Map<String, Object> params = new HashMap<String, Object>(); ProcessInstance pi = ksession.startProcess("com.sample.bpmn.hello", params); long piid = pi.getId(); System.out.println("A process instance started : pid = " + piid); TaskService taskService = runtime.getTaskService(); // ------------ { List<TaskSummary> list = taskService.getTasksAssignedAsPotentialOwner("john", "en-UK"); for (TaskSummary taskSummary : list) { System.out.println("john has a task : taskId = " + taskSummary.getId()); } } // ----------- { List<TaskSummary> list = taskService.getTasksAssignedAsPotentialOwner("mary", "en-UK"); for (TaskSummary taskSummary : list) { System.out.println("mary has a task : taskId = " + taskSummary.getId()); } } // Without dispose, scheduler thread will be blocked by processEngineLock manager.disposeRuntimeEngine(runtime); System.out.println("sleeping..."); Thread.sleep(5000); RuntimeEngine runtime2 = manager.getRuntimeEngine(ProcessInstanceIdContext.get(piid)); TaskService taskService2 = runtime2.getTaskService(); // ------------ { List<TaskSummary> list = taskService2.getTasksAssignedAsPotentialOwner("john", "en-UK"); for (TaskSummary taskSummary : list) { System.out.println("john has a task : taskId = " + taskSummary.getId()); } } // ----------- { List<TaskSummary> list = taskService2.getTasksAssignedAsPotentialOwner("mary", "en-UK"); for (TaskSummary taskSummary : list) { System.out.println("mary has a task : taskId = " + taskSummary.getId()); } } // ----------- manager.disposeRuntimeEngine(runtime2); } catch (Throwable th) { th.printStackTrace(); } } private static RuntimeManager getRuntimeManager(String process) { Properties properties = new Properties(); properties.setProperty("krisv", ""); properties.setProperty("mary", ""); properties.setProperty("john", ""); UserGroupCallback userGroupCallback = new JBossUserGroupCallbackImpl(properties); RuntimeEnvironment environment = RuntimeEnvironmentBuilder.getDefault().persistence(true) .entityManagerFactory(emf).userGroupCallback(userGroupCallback) .addAsset(ResourceFactory.newClassPathResource(process), ResourceType.BPMN2).get(); return RuntimeManagerFactory.Factory.get().newPerProcessInstanceRuntimeManager(environment); } public static PoolingDataSource setupDataSource() { // Please edit here when you want to use your database PoolingDataSource pds = new PoolingDataSource(); pds.setUniqueName("jdbc/jbpm-ds"); pds.setClassName("bitronix.tm.resource.jdbc.lrc.LrcXADataSource"); pds.setMaxPoolSize(5); pds.setAllowLocalTransactions(true); pds.getDriverProperties().put("user", "mysql"); pds.getDriverProperties().put("password", "mysql"); pds.getDriverProperties().put("url", "jdbc:mysql://localhost:3306/testbpms640"); pds.getDriverProperties().put("driverClassName", "com.mysql.jdbc.Driver"); pds.init(); return pds; } }
5f11ea03ea36b2b66b77078e4706396d33fd61f2
c66c55e29461770ad0dbf2738061d075c66027fc
/OA/src/main/java/com/android/tongzhiyuan/base/fragment/BaseSearchFragment.java
cf5473032d93a52a68f0f188be5779d58b7b46b1
[]
no_license
dylan2021/tzy_2.0
c39c0b33a479ab8c1bcd4c051c236d06880437ac
37d69bfb9e5f5152cbce5b044150f51a975bafa4
refs/heads/master
2022-12-18T06:04:01.584864
2020-09-30T07:56:05
2020-09-30T07:56:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,793
java
package com.android.tongzhiyuan.base.fragment; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.content.LocalBroadcastManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.view.inputmethod.InputMethodManager; /** * Created by gaopan on 2017-1-14. */ public abstract class BaseSearchFragment extends BaseLazyFragment { protected abstract int getContentViewLayoutID(); protected abstract View getLoadView(View view); protected final static String TAG = "777"; // private LoadViewHelper loadViewHelper; @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { if (getContentViewLayoutID() != 0) { return inflater.inflate(getContentViewLayoutID(), null); } else { return super.onCreateView(inflater, container, savedInstanceState); } } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); initLoadView(getLoadView(view)); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); LocalBroadcastManager broadcastManager = LocalBroadcastManager.getInstance(getActivity()); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction("android.intent.action.SEARCHCLICK");//建议把它写一个公共的变量,这里方便阅读就不写了。 BroadcastReceiver mItemViewListClickReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { // System.out.println("OK"); onUIReceive(); } }; broadcastManager.registerReceiver(mItemViewListClickReceiver, intentFilter); } /** * 广播接收封装,子类选择实现 */ public void onUIReceive() { } public void initLoadView(View view) { } public void showError(String errorText, String buttonText, View.OnClickListener onClickListener) { } public void search(String key) { } /** * 设置添加屏幕的背景透明度 * * @param bgAlpha */ public void backgroundAlpha(float bgAlpha) { WindowManager.LayoutParams lp = getActivity().getWindow().getAttributes(); lp.alpha = bgAlpha; //0.0-1.0 getActivity().getWindow().setAttributes(lp); } }
fe8a54441d4f44fdd1e2980dccafeb6cfde15482
70e16d746b9a3c6ec2628bff7c986c9ea4ccf0df
/lib_zxing/lib_my_zxing3/src/main/java/com/google/myzxing3/datamatrix/encoder/ErrorCorrection_S.java
6b6cd197cf305c6935e76edb0f1e1652e0d07177
[]
no_license
66668/FastQrcode3
9e1020bdfe4c17fb92dd401c9ade1a96e171c2fa
d2bbc751349cf2b9e887de68ec2891ed4af1e4fb
refs/heads/master
2020-06-29T21:23:32.503807
2019-08-08T04:12:08
2019-08-08T04:12:08
200,628,505
0
1
null
null
null
null
UTF-8
Java
false
false
7,213
java
/* * Copyright 2006 Jeremias Maerki. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this string_b 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.myzxing3.datamatrix.encoder; /** * Error Correction Code for ECC200. */ public final class ErrorCorrection_S { /** * Lookup table which factors to use for which number of error correction codewords. * See FACTORS. */ private static final int[] FACTOR_SETS = {5, 7, 10, 11, 12, 14, 18, 20, 24, 28, 36, 42, 48, 56, 62, 68}; /** * Precomputed polynomial factors for ECC 200. */ private static final int[][] FACTORS = { {228, 48, 15, 111, 62}, {23, 68, 144, 134, 240, 92, 254}, {28, 24, 185, 166, 223, 248, 116, 255, 110, 61}, {175, 138, 205, 12, 194, 168, 39, 245, 60, 97, 120}, {41, 153, 158, 91, 61, 42, 142, 213, 97, 178, 100, 242}, {156, 97, 192, 252, 95, 9, 157, 119, 138, 45, 18, 186, 83, 185}, {83, 195, 100, 39, 188, 75, 66, 61, 241, 213, 109, 129, 94, 254, 225, 48, 90, 188}, {15, 195, 244, 9, 233, 71, 168, 2, 188, 160, 153, 145, 253, 79, 108, 82, 27, 174, 186, 172}, {52, 190, 88, 205, 109, 39, 176, 21, 155, 197, 251, 223, 155, 21, 5, 172, 254, 124, 12, 181, 184, 96, 50, 193}, {211, 231, 43, 97, 71, 96, 103, 174, 37, 151, 170, 53, 75, 34, 249, 121, 17, 138, 110, 213, 141, 136, 120, 151, 233, 168, 93, 255}, {245, 127, 242, 218, 130, 250, 162, 181, 102, 120, 84, 179, 220, 251, 80, 182, 229, 18, 2, 4, 68, 33, 101, 137, 95, 119, 115, 44, 175, 184, 59, 25, 225, 98, 81, 112}, {77, 193, 137, 31, 19, 38, 22, 153, 247, 105, 122, 2, 245, 133, 242, 8, 175, 95, 100, 9, 167, 105, 214, 111, 57, 121, 21, 1, 253, 57, 54, 101, 248, 202, 69, 50, 150, 177, 226, 5, 9, 5}, {245, 132, 172, 223, 96, 32, 117, 22, 238, 133, 238, 231, 205, 188, 237, 87, 191, 106, 16, 147, 118, 23, 37, 90, 170, 205, 131, 88, 120, 100, 66, 138, 186, 240, 82, 44, 176, 87, 187, 147, 160, 175, 69, 213, 92, 253, 225, 19}, {175, 9, 223, 238, 12, 17, 220, 208, 100, 29, 175, 170, 230, 192, 215, 235, 150, 159, 36, 223, 38, 200, 132, 54, 228, 146, 218, 234, 117, 203, 29, 232, 144, 238, 22, 150, 201, 117, 62, 207, 164, 13, 137, 245, 127, 67, 247, 28, 155, 43, 203, 107, 233, 53, 143, 46}, {242, 93, 169, 50, 144, 210, 39, 118, 202, 188, 201, 189, 143, 108, 196, 37, 185, 112, 134, 230, 245, 63, 197, 190, 250, 106, 185, 221, 175, 64, 114, 71, 161, 44, 147, 6, 27, 218, 51, 63, 87, 10, 40, 130, 188, 17, 163, 31, 176, 170, 4, 107, 232, 7, 94, 166, 224, 124, 86, 47, 11, 204}, {220, 228, 173, 89, 251, 149, 159, 56, 89, 33, 147, 244, 154, 36, 73, 127, 213, 136, 248, 180, 234, 197, 158, 177, 68, 122, 93, 213, 15, 160, 227, 236, 66, 139, 153, 185, 202, 167, 179, 25, 220, 232, 96, 210, 231, 136, 223, 239, 181, 241, 59, 52, 172, 25, 49, 232, 211, 189, 64, 54, 108, 153, 132, 63, 96, 103, 82, 186}}; private static final int MODULO_VALUE = 0x12D; private static final int[] LOG; private static final int[] ALOG; static { //Create log and antilog table LOG = new int[256]; ALOG = new int[255]; int p = 1; for (int i = 0; i < 255; i++) { ALOG[i] = p; LOG[p] = i; p *= 2; if (p >= 256) { p ^= MODULO_VALUE; } } } private ErrorCorrection_S() { } /** * Creates the ECC200 error correction for an encoded message. * * @param codewords the codewords * @param symbolInfo information about the symbol to be encoded * @return the codewords with interleaved error correction. */ public static String encodeECC200(String codewords, SymbolInfo_S symbolInfo) { if (codewords.length() != symbolInfo.getDataCapacity()) { throw new IllegalArgumentException( "The number of codewords does not match the selected symbol"); } StringBuilder sb = new StringBuilder(symbolInfo.getDataCapacity() + symbolInfo.getErrorCodewords()); sb.append(codewords); int blockCount = symbolInfo.getInterleavedBlockCount(); if (blockCount == 1) { String ecc = createECCBlock(codewords, symbolInfo.getErrorCodewords()); sb.append(ecc); } else { sb.setLength(sb.capacity()); int[] dataSizes = new int[blockCount]; int[] errorSizes = new int[blockCount]; int[] startPos = new int[blockCount]; for (int i = 0; i < blockCount; i++) { dataSizes[i] = symbolInfo.getDataLengthForInterleavedBlock(i + 1); errorSizes[i] = symbolInfo.getErrorLengthForInterleavedBlock(i + 1); startPos[i] = 0; if (i > 0) { startPos[i] = startPos[i - 1] + dataSizes[i]; } } for (int block = 0; block < blockCount; block++) { StringBuilder temp = new StringBuilder(dataSizes[block]); for (int d = block; d < symbolInfo.getDataCapacity(); d += blockCount) { temp.append(codewords.charAt(d)); } String ecc = createECCBlock(temp.toString(), errorSizes[block]); int pos = 0; for (int e = block; e < errorSizes[block] * blockCount; e += blockCount) { sb.setCharAt(symbolInfo.getDataCapacity() + e, ecc.charAt(pos++)); } } } return sb.toString(); } private static String createECCBlock(CharSequence codewords, int numECWords) { return createECCBlock(codewords, 0, codewords.length(), numECWords); } private static String createECCBlock(CharSequence codewords, int start, int len, int numECWords) { int table = -1; for (int i = 0; i < FACTOR_SETS.length; i++) { if (FACTOR_SETS[i] == numECWords) { table = i; break; } } if (table < 0) { throw new IllegalArgumentException( "Illegal number of error correction codewords specified: " + numECWords); } int[] poly = FACTORS[table]; char[] ecc = new char[numECWords]; for (int i = 0; i < numECWords; i++) { ecc[i] = 0; } for (int i = start; i < start + len; i++) { int m = ecc[numECWords - 1] ^ codewords.charAt(i); for (int k = numECWords - 1; k > 0; k--) { if (m != 0 && poly[k] != 0) { ecc[k] = (char) (ecc[k - 1] ^ ALOG[(LOG[m] + LOG[poly[k]]) % 255]); } else { ecc[k] = ecc[k - 1]; } } if (m != 0 && poly[0] != 0) { ecc[0] = (char) ALOG[(LOG[m] + LOG[poly[0]]) % 255]; } else { ecc[0] = 0; } } char[] eccReversed = new char[numECWords]; for (int i = 0; i < numECWords; i++) { eccReversed[i] = ecc[numECWords - i - 1]; } return String.valueOf(eccReversed); } }