blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
332
content_id
stringlengths
40
40
detected_licenses
listlengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
7
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
557 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
82 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
5.41M
extension
stringclasses
11 values
content
stringlengths
7
5.41M
authors
listlengths
1
1
author
stringlengths
0
161
42f4b202ba7aa66a7d742dbdd012db272b2bb63d
064274c30b5c775d63f431d75dace1e53c418f69
/src/main/java/com/zyh/springcloud/jobtest/model/system/Scheduler.java
f4e8b82949bf67bad732f74a19b5f92e3d74d920
[]
no_license
Lingosi/jobtest
4da92e5ca8f47e73886b60bf10ff312aecac91d7
880bb8e6b76b077e3ea8ac01417dff40f853c4ce
refs/heads/master
2020-03-27T01:04:49.960401
2018-08-29T10:42:43
2018-08-29T10:42:43
145,680,343
0
0
null
null
null
null
UTF-8
Java
false
false
268
java
package com.zyh.springcloud.jobtest.model.system; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper=false) public class Scheduler extends BaseModel{ private String name; private String corn; private int itemId; }
[ "lingosi@git.co" ]
lingosi@git.co
3f3651c522a626b62c62a6b0f9b9e880380d5eb6
abb5d27161312d5471283f5b14de5a59b29dbc0d
/myframework/src/main/java/com/gy/myframework/Service/player/audio/service/AudioPlayService.java
09b77d0a7a4927cc31a8b360a22143c0c9633194
[]
no_license
ganyao114/RemoteOfficeShow
71f9568516d19a59e2e4a3dc0f06a24b98cd5552
e8e8c94a9d4717fee5a371b83f0082f079117dc9
refs/heads/master
2021-01-01T05:27:09.417092
2016-05-18T13:39:28
2016-05-18T13:39:28
59,119,005
0
0
null
null
null
null
UTF-8
Java
false
false
1,392
java
package com.gy.myframework.Service.player.audio.service; import android.app.Service; import android.content.Intent; import android.os.Binder; import android.os.IBinder; import android.support.annotation.Nullable; import com.gy.myframework.Service.player.audio.entity.AuPalyMode; import com.gy.myframework.Service.player.audio.entity.AudioInfoTmp; import java.io.File; /** * Created by gy on 2016/1/15. */ public class AudioPlayService extends Service implements IAuPlayerService { public IBinder mybinder; @Override public void onCreate() { super.onCreate(); mybinder = new MyBinder(); } @Override public void play(File src, AuPalyMode mode) throws Exception { } @Override public void pause() { } @Override public void resume() { } @Override public void stop() { } @Override public void switchTo(long ms) { } @Override public void switchTo(float persent) { } @Override public AudioInfoTmp getPlayInfo() { return null; } @Nullable @Override public IBinder onBind(Intent intent) { return mybinder; } public class MyBinder extends Binder{ public IAuPlayerService getService(){ return AudioPlayService.this; } } }
[ "939543405@qq.com" ]
939543405@qq.com
4d9ff13cd35246a2e879cf5d10e9d7855be2e695
5c17c3b5e5b531d395b6c85b7a22f2c39086003f
/view/src/main/java/view/ViewPanel.java
978fdd34bd148bfdba036a4394a9ea0fb35525d7
[]
no_license
Csniadach/lorann
4880a310a73321f4e9e9bb226f439e75366e13c6
63a3267c4153f8b4d021f159bd65f7385e253339
refs/heads/master
2021-01-20T20:36:51.224637
2016-06-22T07:23:03
2016-06-22T07:23:03
60,856,662
0
0
null
null
null
null
UTF-8
Java
false
false
3,136
java
package view; import contract.IElement; import java.awt.*; import java.awt.image.BufferedImage; import java.sql.Array; import java.sql.SQLException; import java.util.Arrays; import javax.swing.JPanel; /** * The Class ViewPanel. * * @author Jean-Aymeric Diet */ class ViewPanel extends JPanel { /** The view frame. */ private ViewFrame viewFrame; /** The Constant serialVersionUID. */ private static final long serialVersionUID = -998294702363713521L; /** * the tilemap */ private IElement[][] tileMap; /** * Instantiates a new view panel. * * @param viewFrame * the view frame */ public ViewPanel(final ViewFrame viewFrame) { this.setViewFrame(viewFrame); } /** * Gets the view frame. * * @return the view frame */ private ViewFrame getViewFrame() { return this.viewFrame; } /** * Sets the view frame. * * @param viewFrame * the new view frame */ private void setViewFrame(final ViewFrame viewFrame) { this.viewFrame = viewFrame; } /* * (non-Javadoc) * * @see java.util.Observer#update(java.util.Observable, java.lang.Object) */ public void update(IElement[][] tileMap) { this.tileMap = tileMap; this.setSize(this.tileMap[0].length, this.tileMap.length); this.repaint(); } /** * Modified windows size taking border in count and sprite size (32x32) * * @param width * @param height */ public void setSize(int width, int height) { super.setSize((width*32) + this.getInsets().left + this.getInsets().right, (height*32) + this.getInsets().top + this.getInsets().bottom + 40); this.viewFrame.setSize(width*32, height*32 + 40); } /** * the component that print everything to the screen * * @see javax.swing.JComponent#paintComponent(java.awt.Graphics) */ @Override protected void paintComponent(final Graphics graphics) { graphics.setColor(Color.black); graphics.fillRect(0, 0, this.getWidth(), this.getHeight()); graphics.setColor(Color.yellow); graphics.setFont(new Font(null, Font.BOLD, 20)); int scoreIndex = 0; String[][] scores = this.viewFrame.getModel().getHighScore(); //System.out.println(Arrays.deepToString(scores)); //test to recover the score from the database if(this.tileMap != null) { for (int i = 0; i < this.tileMap.length; i++) { for(int j = 0; j < this.tileMap[0].length; j++) { BufferedImage image = tileMap[i][j].getImage(); if(image != null) graphics.drawImage(image, j*32, i*32, null); else if(tileMap[i][j].getClass().getSimpleName().contains("Title")) { graphics.drawString("HIGHSCORE", j*32, i*32 + 20); } else if(tileMap[i][j].getClass().getSimpleName().contains("Score")) { if(scoreIndex < scores[0].length) { graphics.drawString( String.format("%s %s", scores[0][scoreIndex], scores[1][scoreIndex]), j*32 + 5, i*32 + 20); scoreIndex++; } } } } } graphics.drawString(String.format("SCORE : %d LEVEL : %d", this.viewFrame.getController().getScore(), this.viewFrame.getController().getLevel()), 10, this.getHeight() - 20); } }
[ "cyril.sniadach@viacesi.fr" ]
cyril.sniadach@viacesi.fr
4f6c8c2ea2761faad01cc025f307fbdc76e6bc36
2d56f0ee9ee776da20b90fc44af1983cf015b3e9
/oa_api/src/main/java/com/xiaoyu/lingdian/controller/CoreUserController.java
c4076cad7a1117a7db26ac91b7a1a409cdebb2f7
[]
no_license
zhangxiaoyu185/oa
9152dd3860ef5076bdced4da2fa78bd1498bceaa
69b508645df04e23a634c65ac74c0e5b8f7b924a
refs/heads/master
2020-03-08T03:52:37.585470
2018-04-03T12:53:20
2018-04-03T12:53:20
127,904,229
1
0
null
null
null
null
UTF-8
Java
false
false
25,023
java
package com.xiaoyu.lingdian.controller; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.xiaoyu.lingdian.core.mybatis.page.Page; import com.xiaoyu.lingdian.entity.CoreCapitalLog; import com.xiaoyu.lingdian.entity.CoreCompany; import com.xiaoyu.lingdian.entity.CoreProject; import com.xiaoyu.lingdian.entity.CoreUser; import com.xiaoyu.lingdian.service.CoreCapitalLogService; import com.xiaoyu.lingdian.service.CoreCompanyService; import com.xiaoyu.lingdian.service.CoreProjectService; import com.xiaoyu.lingdian.service.CoreUserService; import com.xiaoyu.lingdian.tool.RandomUtil; import com.xiaoyu.lingdian.tool.StringUtil; import com.xiaoyu.lingdian.tool.out.ResultMessageBuilder; import com.xiaoyu.lingdian.vo.CoreUserVO; @Controller @RequestMapping(value="/coreUser") public class CoreUserController extends BaseController { private static final String PHONE_PATTERN = "^((13[0-9])|(15[^4])|(18[0,2,3,5-9])|(17[0-8])|(147))\\d{8}$"; /** * 用户表 */ @Autowired private CoreUserService coreUserService; /** * 资金变动表 */ @Autowired private CoreCapitalLogService coreCapitalLogService; /** * 集团表 */ @Autowired private CoreCompanyService coreCompanyService; /** * 项目表 */ @Autowired private CoreProjectService coreProjectService; /** * 重置密码 * * @param crusrUuid 标识UUID * @param password 密码 (MD5处理) * @param response */ @RequestMapping(value = "/reset/pwd", method = RequestMethod.POST) public void resetPwd(String crusrUuid, String password, HttpServletResponse response) { logger.info("[CoreUserController.resetPwd]:begin resetPwd."); if (StringUtils.isBlank(crusrUuid)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "请输入uuid!"), response); return; } if (StringUtils.isBlank(password)) { password = "e10adc3949ba59abbe56e057f20f883e"; } CoreUser coreUser = new CoreUser(); coreUser.setCrusrUuid(crusrUuid); coreUser.setCrusrPassword(password); coreUser.setCrusrUdate(new Date()); coreUserService.updateCoreUser(coreUser); writeAjaxJSONResponse(ResultMessageBuilder.build(true, 1, "重置密码成功!"), response); logger.info("[CoreUserController.resetPwd]:end resetPwd."); } /** * 登录(需要判断账号所属的项目和集团是否是启用,如果是禁用需要弹提示,不能登录) * * @param crusrName 登录名 * @param crusrPassword (MD5处理) * @param response */ @RequestMapping(value = "/login", method = RequestMethod.POST) public void login(String crusrName, String crusrPassword, HttpServletResponse response) { logger.info("[CoreUserController.login]:begin login."); if (StringUtils.isBlank(crusrName)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "请输入帐户名称!"), response); return; } if (StringUtils.isBlank(crusrPassword)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "请输入密码!"), response); return; } CoreUser coreUser = new CoreUser(); coreUser.setCrusrName(crusrName); coreUser = coreUserService.getCoreUserByName(coreUser); if(coreUser == null || !crusrPassword.equals(coreUser.getCrusrPassword())) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "密码错误!"), response); return; } int crusrJob = coreUser.getCrusrJob(); if(2==crusrJob) {//集团管理员 String crusrCompany = coreUser.getCrusrCompany(); CoreCompany coreCompany = new CoreCompany(); coreCompany.setCrgroUuid(crusrCompany); coreCompany = coreCompanyService.getCoreCompany(coreCompany); if(null == coreCompany) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "所属集团已禁用,此账号不能登录!"), response); return; } } else if (4==crusrJob || 5==crusrJob || 6==crusrJob || 7==crusrJob || 8==crusrJob) {//4渠道5策划6营销总7项目总8财务 String crusrProject = coreUser.getCrusrProject(); CoreProject coreProject = new CoreProject(); coreProject.setCrproUuid(crusrProject); coreProject = coreProjectService.getCoreProject(coreProject); if(null == coreProject) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "所属项目已禁用,此账号不能登录!"), response); return; } } CoreUserVO vo = new CoreUserVO(); vo.convertPOToVO(coreUser); writeAjaxJSONResponse(ResultMessageBuilder.build(true, 1, "登录成功", vo), response); logger.info("[CoreUserController.login]:end login."); } /** * 修改密码 * * @param crusrUuid 用户标识 * @param oldPwd 旧密码 * @param newPwd 新密码 * @param confirmPwd 确认密码 * @param response */ @RequestMapping(value = "/update/pwd", method = RequestMethod.POST) public void updatePwd(String crusrUuid, String oldPwd, String newPwd, String confirmPwd, HttpServletResponse response) { logger.info("[CoreUserController.updatePwd]:begin updatePwd."); if (StringUtils.isBlank(crusrUuid)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "请输入uuid!"), response); return; } if (StringUtils.isBlank(oldPwd)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "请输入旧密码!"), response); return; } if (StringUtils.isBlank(newPwd)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "请输入新密码!"), response); return; } if (StringUtils.isBlank(confirmPwd)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "请输入确认密码!"), response); return; } if (!newPwd.equals(confirmPwd)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "密码输入不一致!"), response); return; } CoreUser coreUser = new CoreUser(); coreUser.setCrusrUuid(crusrUuid); coreUser = coreUserService.getCoreUser(coreUser); if(coreUser == null || !oldPwd.equals(coreUser.getCrusrPassword())) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "密码错误!"), response); return; } coreUser.setCrusrPassword(newPwd); coreUser.setCrusrUdate(new Date()); coreUserService.updateCoreUser(coreUser); writeAjaxJSONResponse(ResultMessageBuilder.build(true, 1, "修改密码成功!"), response); logger.info("[CoreUserController.updatePwd]:end updatePwd."); } /** * 添加(不能添加超级管理员) * * @param crusrName 登录名 * @param crusrCode 昵称姓名 * @param crusrPassword 登录密码(MD5) * @param confirmPwd 确认密码(MD5) * @param crusrJob 职位:2集团管理员3投资客4渠道5策划6营销总7项目总8财务 * @param crusrCompany 所属集团(集团管理员和项目人员) * @param crusrProject 所属项目(项目人员) * @param crusrCopper 铜宝宝(除超级管理员外) * @param crusrSilver 银宝宝(除超级管理员外) * @param crusrGold 金宝宝(除超级管理员外) * @param crusrYestIncome 昨日收益 * @param crusrEmail 电子邮件 * @param crusrMobile 手机号码 * @param crusrBirthday 生日 * @param crusrGender 性别:1男2女3其它 * @param crusrQq QQ * @param crusrAddress 地址 * @param crusrHead 头像路径 * @param crusrRemarks 备注 * @return */ @RequestMapping(value="/add/coreUser", method=RequestMethod.POST) public void addCoreUser (String crusrName, String crusrCode, String crusrPassword, String confirmPwd, Integer crusrJob, String crusrCompany, String crusrProject, Double crusrCopper, Double crusrSilver, Double crusrGold, Double crusrYestIncome, String crusrEmail, String crusrMobile, String crusrBirthday, Integer crusrGender, String crusrQq, String crusrAddress, String crusrHead, String crusrRemarks, String crcpaUser, HttpServletResponse response) { logger.info("[CoreUserController]:begin addCoreUser"); if (StringUtil.isEmpty(crusrName)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "[登录名]不能为空!"), response); return; } if (null == crusrJob || crusrJob > 8 || crusrJob < 2) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "请输入职位!"), response); return; } if (StringUtil.isEmpty(crusrPassword)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "[帐户密码]不能为空!"), response); return; } if (StringUtils.isBlank(confirmPwd)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "请输入确认密码!"), response); return; } if (!crusrPassword.equals(confirmPwd)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "密码输入不一致!"), response); return; } if (!StringUtil.isEmpty(crusrMobile)) { Pattern p = Pattern.compile(PHONE_PATTERN); Matcher m = p.matcher(crusrMobile); if(!m.matches()){ writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "手机号格式不正确!"), response); return; } } if (null == crusrCopper) { crusrCopper = 0.0; } if (crusrCopper > 10000) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "铜宝宝金额最多一万,其余请分配入银宝宝!"), response); return; } CoreUser coreUser = new CoreUser(); coreUser.setCrusrName(crusrName); if(coreUserService.getCoreUserByName(coreUser) != null) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "该账户名称已存在,请重新输入!"), response); return; } if (2 == crusrJob) { if (StringUtils.isBlank(crusrCompany)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "集团管理员必传所属集团!"), response); return; } } if (2 != crusrJob && 3 != crusrJob) { if (StringUtils.isBlank(crusrCompany)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "项目人员必传所属集团!"), response); return; } if (StringUtils.isBlank(crusrProject)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "项目人员必传所属项目!"), response); return; } } String uuid = RandomUtil.generateString(16); coreUser.setCrusrUuid(uuid); coreUser.setCrusrCode(crusrCode); coreUser.setCrusrPassword(crusrPassword); coreUser.setCrusrJob(crusrJob); coreUser.setCrusrCompany(crusrCompany); coreUser.setCrusrProject(crusrProject); coreUser.setCrusrMoney(0.0); coreUser.setCrusrCopper(crusrCopper); coreUser.setCrusrSilver(crusrSilver); coreUser.setCrusrGold(crusrGold); coreUser.setCrusrYestIncome(crusrYestIncome); coreUser.setCrusrTotalIncome(crusrYestIncome); //总收益暂时不使用,默认就是昨日收益 coreUser.setCrusrEmail(crusrEmail); coreUser.setCrusrMobile(crusrMobile); coreUser.setCrusrStatus(1); coreUser.setCrusrCdate(new Date()); coreUser.setCrusrUdate(new Date()); coreUser.setCrusrBirthday(crusrBirthday); coreUser.setCrusrGender(crusrGender); coreUser.setCrusrQq(crusrQq); coreUser.setCrusrAddress(crusrAddress); coreUser.setCrusrHead(crusrHead); coreUser.setCrusrRemarks(crusrRemarks); coreUserService.insertCoreUser(coreUser); writeAjaxJSONResponse(ResultMessageBuilder.build(true, 1, "新增成功!"),response); logger.info("[CoreUserController]:end addCoreUser"); } /** * 修改基本信息 * 修改时是否可为空只能界面判断了,单个更新,非空判断交给界面 * @param crusrUuid 标识UUID * @param crusrCode 昵称姓名 * @param crusrEmail 电子邮件 * @param crusrMobile 手机号码 * @param crusrBirthday 生日 * @param crusrGender 性别:1男2女3其它 * @param crusrQq QQ * @param crusrAddress 地址 * @param crusrHead 头像路径 * @param crusrRemarks 备注 * @return */ @RequestMapping(value="/update/coreUser", method=RequestMethod.POST) public void updateCoreUser (String crusrUuid, String crusrCode, String crusrEmail, String crusrMobile, String crusrBirthday, Integer crusrGender, String crusrQq, String crusrAddress, String crusrHead, String crusrRemarks, HttpServletResponse response) { logger.info("[CoreUserController]:begin updateCoreUser"); if (StringUtil.isEmpty(crusrUuid)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "[标识UUID]不能为空!"), response); return; } if (!StringUtil.isEmpty(crusrMobile)) { Pattern p = Pattern.compile(PHONE_PATTERN); Matcher m = p.matcher(crusrMobile); if(!m.matches()){ writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "手机号格式不正确!"), response); return; } } CoreUser coreUser = new CoreUser(); coreUser.setCrusrUuid(crusrUuid); coreUser.setCrusrCode(crusrCode); coreUser.setCrusrEmail(crusrEmail); coreUser.setCrusrMobile(crusrMobile); coreUser.setCrusrUdate(new Date()); coreUser.setCrusrBirthday(crusrBirthday); coreUser.setCrusrGender(crusrGender); coreUser.setCrusrQq(crusrQq); coreUser.setCrusrAddress(crusrAddress); coreUser.setCrusrHead(crusrHead); coreUser.setCrusrRemarks(crusrRemarks); coreUserService.updateCoreUser(coreUser); writeAjaxJSONResponse(ResultMessageBuilder.build(true, 1, "修改成功!"),response); logger.info("[CoreUserController]:end updateCoreUser"); } /** * 修改资金 * * @param crusrUuid 标识UUID * @param crusrCopper 铜宝宝(除超级管理员外) * @param crusrSilver 银宝宝(除超级管理员外) * @param crusrGold 金宝宝(除超级管理员外) * @param crusrYestIncome 昨日收益 * @return */ @RequestMapping(value="/update/coreUser/fee", method=RequestMethod.POST) public void updateCoreUserFee (String crusrUuid, Double crusrCopper, Double crusrSilver, Double crusrGold, Double crusrYestIncome, HttpServletResponse response) { logger.info("[CoreUserController]:begin updateCoreUserFee"); if (StringUtil.isEmpty(crusrUuid)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "[标识UUID]不能为空!"), response); return; } if (null != crusrCopper && crusrCopper > 10000) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "铜宝宝金额最多一万,其余请分配入银宝宝!"), response); return; } CoreUser coreUser = new CoreUser(); coreUser.setCrusrUuid(crusrUuid); coreUser.setCrusrCopper(crusrCopper); coreUser.setCrusrSilver(crusrSilver); coreUser.setCrusrGold(crusrGold); if (null != crusrYestIncome) { coreUser.setCrusrYestIncome(crusrYestIncome); coreUser.setCrusrTotalIncome(crusrYestIncome); //总收益暂时不使用,默认就是昨日收益 } coreUserService.updateCoreUser(coreUser); writeAjaxJSONResponse(ResultMessageBuilder.build(true, 1, "修改成功!"),response); logger.info("[CoreUserController]:end updateCoreUserFee"); } /** * 超级管理员资金变动(需要判断是否修改了资金额度,修改了记录日志表,资金更新说明后台拼接) * * @param crcpaUser 更新人 * @param crusrMoney 资金额度 * @param crcpaDesc 资金更新说明(后台拼接,前台不传"超级管理员:更新前:0,更新后:500") * @param crcpaBusi 更新对象 * @return */ @RequestMapping(value="/update/userCapital", method=RequestMethod.POST) public void updateUserCapital (String crcpaUser, Double crusrMoney, String crcpaBusi, HttpServletResponse response) { logger.info("[CoreUserController]:begin updateUserCapital"); if (StringUtil.isEmpty(crcpaUser)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "[更新人UUID]不能为空!"), response); return; } if (StringUtil.isEmpty(crcpaBusi)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "[更新对象UUID]不能为空!"), response); return; } if (null == crusrMoney) { crusrMoney = 0.0; } CoreUser user = new CoreUser(); user.setCrusrUuid(crcpaUser); user = coreUserService.getCoreUser(user); int crusrJob = user.getCrusrJob(); if(1 == crusrJob) {//更新人权限判断,只有超级管理员才能修改资金 CoreUser coreUser = new CoreUser(); coreUser.setCrusrUuid(crcpaBusi); coreUser = coreUserService.getCoreUser(coreUser); int busiCrusrJob = coreUser.getCrusrJob(); if(1 == busiCrusrJob){//判断是否是更新超级管理员 Double crusrMoneyOld=coreUser.getCrusrMoney();//旧资金 coreUser.setCrusrMoney(crusrMoney); coreUser.setCrusrUdate(new Date()); coreUserService.updateCoreUser(coreUser); //资金变动记录到资金池日志表 StringBuffer buffer = new StringBuffer(); if(crusrMoney.doubleValue() != crusrMoneyOld.doubleValue()) {//资金变动 buffer.append("超级管理员:更新前:"+crusrMoneyOld.doubleValue()+",").append("更新后:"+crusrMoney.doubleValue()+";"); addCoreCapitalLog(crcpaUser, crcpaBusi, buffer.toString(), 3); } } } else { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "此用户无权修改资金!"), response); return; } writeAjaxJSONResponse(ResultMessageBuilder.build(true, 1, "资金修改成功!"),response); logger.info("[CoreUserController]:end updateUserCapital"); } /** * 禁用操作 * * @param crusrUuid 标识UUID * @return */ @RequestMapping(value="/disable/coreUser", method=RequestMethod.POST) public void disableCoreUser (String crusrUuid, HttpServletResponse response) { logger.info("[CoreUserController]:begin disableCoreUser"); if (StringUtil.isEmpty(crusrUuid)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "[标识UUID]不能为空!"), response); return; } CoreUser coreUser = new CoreUser(); coreUser.setCrusrUuid(crusrUuid); coreUserService.disableCoreUser(coreUser); writeAjaxJSONResponse(ResultMessageBuilder.build(true, 1, "禁用成功!"),response); logger.info("[CoreUserController]:end disableCoreUser"); } /** * 获取单个 * * @param crusrUuid 标识UUID * @return */ @RequestMapping(value="/views", method=RequestMethod.POST) public void viewsCoreUser (String crusrUuid, HttpServletResponse response) { logger.info("[CoreUserController]:begin viewsCoreUser"); if (StringUtil.isEmpty(crusrUuid)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "[标识UUID]不能为空!"), response); return; } CoreUser coreUser = new CoreUser(); coreUser.setCrusrUuid(crusrUuid); coreUser = coreUserService.getCoreUser(coreUser); CoreUserVO coreUserVO = new CoreUserVO(); coreUserVO.convertPOToVO(coreUser); writeAjaxJSONResponse(ResultMessageBuilder.build(true, 1, "获取单个信息成功", coreUserVO), response); logger.info("[CoreUserController]:end viewsCoreUser"); } /** * 获取集团下的管理员列表(分页)<Page> * * @param pageNum 页数 * @param pageSize 每页条数 * @param crusrCompany 集团UUID * @return */ @RequestMapping(value="/find/coreUserForPagesByCompany", method=RequestMethod.POST) public void findCoreUserForPagesByCompany (Integer pageNum, Integer pageSize, String crusrCompany, HttpServletResponse response) { logger.info("[CoreUserController]:begin findCoreUserForPagesByCompany"); if (StringUtil.isEmpty(crusrCompany)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "[集团UUid]不能为空!"), response); return; } if (pageNum == null || pageNum == 0) { pageNum = 1; } if (pageSize == null || pageSize == 0) { pageSize = 10; } Page<CoreUser> page = coreUserService.findCoreUserForPagesByCompany(pageNum, pageSize, crusrCompany); Page<CoreUserVO> pageVO = new Page<CoreUserVO>(page.getPageNumber(), page.getPageSize(), page.getTotalCount()); List<CoreUserVO> vos = new ArrayList<CoreUserVO>(); CoreUserVO vo; for (CoreUser coreUser : page.getResult()) { vo = new CoreUserVO(); vo.convertPOToVO(coreUser); vos.add(vo); } pageVO.setResult(vos); writeAjaxJSONResponse(ResultMessageBuilder.build(true, 1, "集团下管理员page列表获取成功!", pageVO),response); logger.info("[CoreUserController]:end findCoreUserForPagesByCompany"); } /** * 项目下各职位人员分页列表,根据职位和所在项目查询<Page> * * @param pageNum 页数 * @param pageSize 每页条数 * @param crusrJob 职位 * @param crusrProject 项目uuid * @return */ @RequestMapping(value="/find/coreUserForPagesByProject", method=RequestMethod.POST) public void findCoreUserForPagesByProject (Integer pageNum, Integer pageSize, Integer crusrJob, String crusrProject, HttpServletResponse response) { logger.info("[CoreUserController]:begin findCoreUserForPagesByProject"); if (StringUtil.isEmpty(crusrProject)) { writeAjaxJSONResponse(ResultMessageBuilder.build(false, -1, "[项目UUid]不能为空!"), response); return; } if (pageNum == null || pageNum == 0) { pageNum = 1; } if (pageSize == null || pageSize == 0) { pageSize = 10; } Page<CoreUser> page = coreUserService.findCoreUserForPagesByProject(pageNum, pageSize, crusrJob, crusrProject); Page<CoreUserVO> pageVO = new Page<CoreUserVO>(page.getPageNumber(), page.getPageSize(), page.getTotalCount()); List<CoreUserVO> vos = new ArrayList<CoreUserVO>(); CoreUserVO vo; for (CoreUser coreUser : page.getResult()) { vo = new CoreUserVO(); vo.convertPOToVO(coreUser); vos.add(vo); } pageVO.setResult(vos); writeAjaxJSONResponse(ResultMessageBuilder.build(true, 1, "项目下各职位人员page列表获取成功!", pageVO),response); logger.info("[CoreUserController]:end findCoreUserForPagesByProject"); } /** * 投资客分页列表<Page> * * @param pageNum 页数 * @param pageSize 每页条数 * @return */ @RequestMapping(value="/find/coreUserForPagesByInvestors", method=RequestMethod.POST) public void findCoreUserForPagesByInvestors (Integer pageNum, Integer pageSize, HttpServletResponse response) { logger.info("[CoreUserController]:begin findCoreUserForPagesByInvestors"); if (pageNum == null || pageNum == 0) { pageNum = 1; } if (pageSize == null || pageSize == 0) { pageSize = 10; } Page<CoreUser> page = coreUserService.findCoreUserForPagesByInvestors(pageNum, pageSize); Page<CoreUserVO> pageVO = new Page<CoreUserVO>(page.getPageNumber(), page.getPageSize(), page.getTotalCount()); List<CoreUserVO> vos = new ArrayList<CoreUserVO>(); CoreUserVO vo; for (CoreUser coreUser : page.getResult()) { vo = new CoreUserVO(); vo.convertPOToVO(coreUser); vos.add(vo); } pageVO.setResult(vos); writeAjaxJSONResponse(ResultMessageBuilder.build(true, 1, "投资客page列表获取成功!", pageVO),response); logger.info("[CoreUserController]:end findCoreUserForPagesByInvestors"); } /** * 用户列表根据用户名或登录名或手机号模糊查询,超级管理员除外<Page> * * @param pageNum 页数 * @param pageSize 每页条数 * @param objectStr (用户名或登录名或手机号) * @return */ @RequestMapping(value="/find/coreUserForPagesLikes", method=RequestMethod.POST) public void findCoreUserForPagesLikes (Integer pageNum, Integer pageSize, String objectStr, HttpServletResponse response) { logger.info("[CoreUserController]:begin findCoreUserForPagesLikes"); if (pageNum == null || pageNum == 0) { pageNum = 1; } if (pageSize == null || pageSize == 0) { pageSize = 10; } if (StringUtil.isEmpty(objectStr)) { objectStr = ""; } Page<CoreUser> page = coreUserService.findCoreUserForPagesLikes(pageNum, pageSize, objectStr); Page<CoreUserVO> pageVO = new Page<CoreUserVO>(page.getPageNumber(), page.getPageSize(), page.getTotalCount()); List<CoreUserVO> vos = new ArrayList<CoreUserVO>(); CoreUserVO vo; for (CoreUser coreUser : page.getResult()) { vo = new CoreUserVO(); vo.convertPOToVO(coreUser); vos.add(vo); } pageVO.setResult(vos); writeAjaxJSONResponse(ResultMessageBuilder.build(true, 1, "查询用户列表获取成功!", pageVO),response); logger.info("[CoreUserController]:end findCoreUserForPagesLikes"); } /** * 资金变动添加日志 * * @param crcpaUser 更新人 * @param crcpaBusi 更新对象 * @param crcpaDesc 更新说明 * @param crcpaType 更新类型:1集团2项目3管理员 * @return */ public void addCoreCapitalLog (String crcpaUser, String crcpaBusi, String crcpaDesc, Integer crcpaType) { CoreCapitalLog coreCapitalLog = new CoreCapitalLog(); String uuid = RandomUtil.generateString(16); coreCapitalLog.setCrcpaUuid(uuid); coreCapitalLog.setCrcpaCdate(new Date()); coreCapitalLog.setCrcpaUser(crcpaUser); coreCapitalLog.setCrcpaBusi(crcpaBusi); coreCapitalLog.setCrcpaDesc(crcpaDesc); coreCapitalLog.setCrcpaType(crcpaType); coreCapitalLogService.insertCoreCapitalLog(coreCapitalLog); } }
[ "zhang135185yu" ]
zhang135185yu
67880c51a3dc6f42977d136991c45bc6c77493d3
789cbc525ece48f3a4ba960ac2cdb3a15a62b7ee
/src/hsh/anzh/jb/rg_qdxxl.java
c07389397c4c2d26b6b87f5d08cd7978bf6405f7
[ "Apache-2.0" ]
permissive
hgm714823/qianghongbao
4d4f7ea038b77eab9efdca1ce7a67ee40de58a6d
061f715cafbfe14b7ecec28402a571705d3bb9b3
refs/heads/master
2023-02-28T18:42:03.274269
2020-10-11T08:09:29
2020-10-11T08:09:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
49
java
package hsh.anzh.jb; public class rg_qdxxl { }
[ "290828340@qq.com" ]
290828340@qq.com
8ed81d2c6e9d59fd2ae9e9d083d8524dc3b84665
365b306e394643b9c57449d75565a572ed3f2e0b
/EhCacheUtils.java
3ff7c2c9fffcd182971a986b2be8760152053ecc
[]
no_license
0013lcw/gitlearning
8c0acf0484ab566240bf8f968b1777a420726f46
e4da253825719e4e3c6703d3d7919a8a761f90c0
refs/heads/master
2021-05-05T03:15:09.611337
2018-02-01T07:32:56
2018-02-01T07:32:56
119,792,907
0
0
null
null
null
null
UTF-8
Java
false
false
2,115
java
/** */ package com.example.demo.util; import org.springframework.beans.factory.annotation.Autowired; import net.sf.ehcache.Cache; import net.sf.ehcache.CacheManager; import net.sf.ehcache.Element; /** * Cache工具类 * @author lcw * @version 2017-12-22 */ public class EhCacheUtils { @Autowired private CacheManager cacheManager; //private static CacheManager cacheManager = ((CacheManager)SpringContextHolder.getBean("cacheManager")); //设备ID列表 public static final String CACHE_DEVICE_MAP = "deviceMap"; private static final String SYS_CACHE = "sysCache"; public static final String HOLIDAY_CACHE = "holidayCache"; /** * 获取SYS_CACHE缓存 * @param key * @return */ public Object get(String key) { return get(SYS_CACHE, key); } /** * 写入SYS_CACHE缓存 * @param key * @return */ public void put(String key, Object value) { put(SYS_CACHE, key, value); } /** * 从SYS_CACHE缓存中移除 * @param key * @return */ public void remove(String key) { remove(SYS_CACHE, key); } /** * 获取缓存 * @param cacheName * @param key * @return */ public Object get(String cacheName, String key) { Element element = getCache(cacheName).get(key); return element==null?null:element.getObjectValue(); } /** * 写入缓存 * @param cacheName * @param key * @param value */ public void put(String cacheName, String key, Object value) { Element element = new Element(key, value); getCache(cacheName).put(element); } /** * 从缓存中移除 * @param cacheName * @param key */ public void remove(String cacheName, String key) { getCache(cacheName).remove(key); } /** * 获得一个Cache,没有则创建一个。 * @param cacheName * @return */ private Cache getCache(String cacheName){ Cache cache = cacheManager.getCache(cacheName); if (cache == null){ cacheManager.addCache(cacheName); cache = cacheManager.getCache(cacheName); cache.getCacheConfiguration().setEternal(true); } return cache; } public CacheManager getCacheManager() { return cacheManager; } }
[ "26516@qq.com" ]
26516@qq.com
4c0260e7ef73b3eef4bb670a22701118256eddec
27ed88c7a9e7a6225d37896d3380bd5cd20aa55e
/eshop/shop-basic/shop-basics-springcloud-eureka/src/main/java/com/dragon/shop/EurekaApplication.java
257be0634070106106c5a94126cc5477f08e9923
[]
no_license
workerryan/distributed-architecture
4eea935a2c9b1b1cd051524f70bb971ca002a04c
baeb47eae6272e5f6ebb54121663b5c3c5281e9f
refs/heads/master
2022-12-27T03:20:38.416980
2020-10-05T13:34:18
2020-10-05T13:34:18
204,423,134
1
0
null
2022-12-16T00:01:50
2019-08-26T07:44:09
Java
UTF-8
Java
false
false
413
java
package com.dragon.shop; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; @SpringBootApplication @EnableEurekaServer public class EurekaApplication { public static void main(String[] args) { SpringApplication.run(EurekaApplication.class, args); } }
[ "wanglei@192.168.0.117" ]
wanglei@192.168.0.117
da68c1f730870d3f98f2e28e07d77650aefc308d
bc11ca095eb05e51f08a6f3ea8c43a70ee2053b9
/src/conference/manager/Conferencier.java
ac125fa4028cd6151ff24a865554fc0ef0231a95
[]
no_license
MaysaNefzi/java
17c15518d25f639c0cbad70cb91390fba1aebcbd
4df6a2d4c152473354fd5031bd6b19180fcbb9a6
refs/heads/master
2020-05-15T22:14:48.303658
2019-04-21T11:03:28
2019-04-21T11:03:28
182,521,708
0
0
null
null
null
null
UTF-8
Java
false
false
2,694
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package conference.manager; import java.util.Date; /** * * @author zaefdfyjhlk */ public class Conferencier { private int Id ,vol_d, vol_a; private String nom, prenom, pays,presentation; private Institution institut; private ComitéOr chargé; private Date arrivée , départ; public Conferencier (){} public Conferencier(int Id, int vol_d, String nom, String prenom, String pays, String presentation, Institution institut, ComitéOr chargé, Date arrivée, Date départ) { this.Id = Id; this.vol_d = vol_d; this.nom = nom; this.prenom = prenom; this.pays = pays; this.presentation = presentation; this.institut = institut; this.chargé = chargé; this.arrivée = arrivée; this.départ = départ; } public int getId() { return Id; } public void setId(int Id) { this.Id = Id; } public int getVol_d() { return vol_d; } public void setVol_d(int vol_d) { this.vol_d = vol_d; } public int getVol_a() { return vol_a; } public void setVol_a(int vol_a) { this.vol_a = vol_a; } public String getNom() { return nom; } public void setNom(String nom) { this.nom = nom; } public String getPrenom() { return prenom; } public void setPrenom(String prenom) { this.prenom = prenom; } public String getPays() { return pays; } public void setPays(String pays) { this.pays = pays; } public String getPresentation() { return presentation; } public void setPresentation(String presentation) { this.presentation = presentation; } public Institution getInstitut() { return institut; } public void setInstitut(Institution institut) { this.institut = institut; } public ComitéOr getChargé() { return chargé; } public void setChargé(ComitéOr chargé) { this.chargé = chargé; } public Date getArrivée() { return arrivée; } public void setArrivée(Date arrivée) { this.arrivée = arrivée; } public Date getDépart() { return départ; } public void setDépart(Date départ) { this.départ = départ; } }
[ "nefzimaysa27@gmail.com" ]
nefzimaysa27@gmail.com
c1dc543a8d2fdb03ffde88f341c43be81ed58e04
844d789431641146468378cb5a0516317f713965
/app/src/main/java/com/bahaa/eventorganizerapp/Activities/AdminActivity.java
444841510dc05b74db500c53d7c0b1d98660ea23
[]
no_license
Bahaaib/EventApp-Organizer
3d36ca1f1519426c2722d076f351693b28a287af
39e60c66620c095be9587081c24200c244e9eb06
refs/heads/master
2020-08-06T23:45:40.185621
2019-10-10T14:32:18
2019-10-10T14:32:18
213,204,435
0
0
null
null
null
null
UTF-8
Java
false
false
7,508
java
package com.bahaa.eventorganizerapp.Activities; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.util.Log; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.AppCompatButton; import androidx.appcompat.widget.Toolbar; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentTransaction; import androidx.preference.PreferenceManager; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.bahaa.eventorganizerapp.Adapters.HeadRecyclerAdapter; import com.bahaa.eventorganizerapp.Dialogs.AdminDialog; import com.bahaa.eventorganizerapp.Models.HeadModel; import com.bahaa.eventorganizerapp.R; import com.bahaa.eventorganizerapp.Root.DialogListener; import com.bahaa.eventorganizerapp.Root.HeadAdapterListener; import com.google.firebase.FirebaseApp; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.ValueEventListener; import java.util.ArrayList; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; public class AdminActivity extends AppCompatActivity implements DialogListener, HeadAdapterListener { private final String HEADS_DB = "head"; private final String TAG = "admin_dialg"; private DatabaseReference mRef; //Firebase Auth private FirebaseAuth mAuth; private boolean isAdmin; private SharedPreferences preferences; private String headPhoneNumber; private ArrayList<HeadModel> headsList; private HeadRecyclerAdapter adapter; private AdminDialog adminDialog; @BindView(R.id.heads_rv) RecyclerView recyclerView; @BindView(R.id.priv_toolbar) Toolbar toolbar; @BindView(R.id.admin_add_btn) AppCompatButton addButton; private Unbinder unbinder; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_admin); unbinder = ButterKnife.bind(this); toolbar = findViewById(R.id.priv_toolbar); setSupportActionBar(toolbar); //Init|Recall SharedPrefs.. preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); restoreSavedPrefs(); adminDialog = new AdminDialog(); addButton.setOnClickListener(v -> { FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); Fragment prev = getSupportFragmentManager().findFragmentByTag(TAG); if (prev != null) { transaction.remove(prev); } transaction.add(adminDialog, TAG).commit(); }); //Firebase DB FirebaseApp.initializeApp(this); //Firebase DB FirebaseDatabase database = FirebaseDatabase.getInstance(); mRef = database.getReference(); //Firebase Auth.. mAuth = FirebaseAuth.getInstance(); headsList = new ArrayList<>(); callHeadDatabase(); adapter = new HeadRecyclerAdapter(this, headsList); recyclerView.setAdapter(adapter); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this); recyclerView.setLayoutManager(linearLayoutManager); } private void callHeadDatabase() { mRef.child(HEADS_DB).addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { //Reset List of products headsList.clear(); fetchData(dataSnapshot); fetchPersonalData(dataSnapshot); } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); } private void fetchData(DataSnapshot dataSnapshot) { for (DataSnapshot db : dataSnapshot.getChildren()) { HeadModel model = db.getValue(HeadModel.class); assert model != null; model.setKey(db.getKey()); headsList.add(model); adapter.notifyDataSetChanged(); Log.i("Statuss", model.getName()); } } private void fetchPersonalData(DataSnapshot dataSnapshot) { boolean isMember = false; for (DataSnapshot db : dataSnapshot.getChildren()) { HeadModel model = db.getValue(HeadModel.class); assert model != null; model.setKey(db.getKey()); if (model.getPhone().equals(headPhoneNumber)) { //check admin account in case of De-activation isMember = model.getStatus(); //Check if still Admin isAdmin = model.getPrivilege().equals("admin"); } } if (!isAdmin) { displayToast(getString(R.string.priv_changed)); forceStepBack(); } if (!isMember) { displayToast(getString(R.string.priv_changed)); forceLogout(); } } private void forceStepBack() { Intent intent = new Intent(AdminActivity.this, HomeActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); startActivity(intent); finish(); } private void forceLogout() { Log.i("Statuss", "Logging out"); mAuth.signOut(); Intent intent = new Intent(AdminActivity.this, LoginActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); startActivity(intent); finish(); } private void restoreSavedPrefs() { String PHONE_KEY = "head_phone"; String EMPTY_KEY = "empty"; //headPhoneNumber = preferences.getString(PHONE_KEY, EMPTY_KEY); headPhoneNumber = "01009540399"; } private void displayToast(String message) { Toast.makeText(getApplicationContext(), message, Toast.LENGTH_LONG) .show(); } @Override public void onAdminDataChanged(HeadModel head) { if (head.getKey() != null) { mRef.child(HEADS_DB).child(head.getKey()) .child("name") .setValue(head.getName()); mRef.child(HEADS_DB).child(head.getKey()) .child("phone") .setValue(head.getPhone()); mRef.child(HEADS_DB).child(head.getKey()) .child("privilege") .setValue(head.getPrivilege()); mRef.child(HEADS_DB).child(head.getKey()) .child("status") .setValue(head.getStatus()); } else { mRef.child(HEADS_DB).push().setValue(head); } } @Override public void onDataRemoved(HeadModel head) { //Save head key before destroy the head.. String headKey = head.getKey(); head.setKey(null); mRef.child(HEADS_DB).child(headKey).setValue(head); } @Override protected void onDestroy() { unbinder.unbind(); super.onDestroy(); } }
[ "bahaasco@gmail.com" ]
bahaasco@gmail.com
b2b3d84781b1a99f69225440c65f484270332261
1752d07ecc1d98564d31a7c09e2a9ea54d7ad864
/metadata-service/auth-impl/src/test/java/com/datahub/authentication/authenticator/DataHubTokenAuthenticatorTest.java
8f96d114341396267cdc5f9f28e9d93e4b1f3f0a
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "BSD-2-Clause", "MIT" ]
permissive
keremsahin1/datahub
260a07ec4b9c3d95543e251a6ca50e31caba325e
3c32ac7916704ad8602aa768d7b30be8b36bae02
refs/heads/master
2022-06-07T15:06:17.010216
2022-05-16T20:51:19
2022-05-16T20:51:19
239,461,709
0
0
Apache-2.0
2020-02-10T08:26:22
2020-02-10T08:26:21
null
UTF-8
Java
false
false
4,311
java
package com.datahub.authentication.authenticator; import com.datahub.authentication.Actor; import com.datahub.authentication.ActorType; import com.datahub.authentication.Authentication; import com.datahub.authentication.AuthenticationException; import com.datahub.authentication.AuthenticatorContext; import com.datahub.authentication.token.TokenType; import com.google.common.collect.ImmutableMap; import java.util.Collections; import java.util.Map; import org.testng.annotations.Test; import static com.datahub.authentication.AuthenticationConstants.*; import static com.datahub.authentication.authenticator.DataHubTokenAuthenticator.*; import static com.datahub.authentication.token.TokenClaims.*; import static org.testng.Assert.*; public class DataHubTokenAuthenticatorTest { private static final String TEST_SIGNING_KEY = "WnEdIeTG/VVCLQqGwC/BAkqyY0k+H8NEAtWGejrBI94="; @Test public void testInit() { final DataHubTokenAuthenticator authenticator = new DataHubTokenAuthenticator(); assertThrows(() -> authenticator.init(null)); assertThrows(() -> authenticator.init(Collections.emptyMap())); assertThrows(() -> authenticator.init(ImmutableMap.of(SIGNING_KEY_CONFIG_NAME, TEST_SIGNING_KEY, SIGNING_ALG_CONFIG_NAME, "UNSUPPORTED_ALG"))); // Correct configs provided. authenticator.init(ImmutableMap.of(SIGNING_KEY_CONFIG_NAME, TEST_SIGNING_KEY, SIGNING_ALG_CONFIG_NAME, "HS256")); } @Test public void testAuthenticateFailureMissingAuthorizationHeader() { final DataHubTokenAuthenticator authenticator = new DataHubTokenAuthenticator(); authenticator.init(ImmutableMap.of(SIGNING_KEY_CONFIG_NAME, TEST_SIGNING_KEY, SIGNING_ALG_CONFIG_NAME, "HS256")); final AuthenticatorContext context = new AuthenticatorContext(Collections.emptyMap()); assertThrows(AuthenticationException.class, () -> authenticator.authenticate(context)); } @Test public void testAuthenticateFailureMissingBearerCredentials() { final DataHubTokenAuthenticator authenticator = new DataHubTokenAuthenticator(); authenticator.init(ImmutableMap.of(SIGNING_KEY_CONFIG_NAME, TEST_SIGNING_KEY, SIGNING_ALG_CONFIG_NAME, "HS256")); final AuthenticatorContext context = new AuthenticatorContext( ImmutableMap.of(AUTHORIZATION_HEADER_NAME, "Basic username:password") ); assertThrows(AuthenticationException.class, () -> authenticator.authenticate(context)); } @Test public void testAuthenticateFailureInvalidToken() { final DataHubTokenAuthenticator authenticator = new DataHubTokenAuthenticator(); authenticator.init(ImmutableMap.of(SIGNING_KEY_CONFIG_NAME, TEST_SIGNING_KEY, SIGNING_ALG_CONFIG_NAME, "HS256")); final AuthenticatorContext context = new AuthenticatorContext( ImmutableMap.of(AUTHORIZATION_HEADER_NAME, "Bearer someRandomToken") ); assertThrows(AuthenticationException.class, () -> authenticator.authenticate(context)); } @Test public void testAuthenticateSuccess() throws Exception { final DataHubTokenAuthenticator authenticator = new DataHubTokenAuthenticator(); authenticator.init(ImmutableMap.of(SIGNING_KEY_CONFIG_NAME, TEST_SIGNING_KEY, SIGNING_ALG_CONFIG_NAME, "HS256")); final String validToken = authenticator.tokenService.generateAccessToken( TokenType.PERSONAL, new Actor(ActorType.USER, "datahub") ); final String authorizationHeaderValue = String.format("Bearer %s", validToken); final AuthenticatorContext context = new AuthenticatorContext( ImmutableMap.of(AUTHORIZATION_HEADER_NAME, authorizationHeaderValue) ); final Authentication authentication = authenticator.authenticate(context); // Validate the resulting authentication object assertNotNull(authentication); assertEquals(authentication.getActor().getType(), ActorType.USER); assertEquals(authentication.getActor().getId(), "datahub"); assertEquals(authentication.getCredentials(), authorizationHeaderValue); Map<String, Object> claimsMap = authentication.getClaims(); assertEquals(claimsMap.get(TOKEN_VERSION_CLAIM_NAME), 1); assertEquals(claimsMap.get(TOKEN_TYPE_CLAIM_NAME), "PERSONAL"); assertEquals(claimsMap.get(ACTOR_TYPE_CLAIM_NAME), "USER"); assertEquals(claimsMap.get(ACTOR_ID_CLAIM_NAME), "datahub"); } }
[ "noreply@github.com" ]
noreply@github.com
a9da40ef36d973d09d016539ecd8a4b0cfd696f0
9cd474ff195074d2fa31cc6062e86ebd98e83329
/com.spark.psi.order.browser/src/com/spark/psi/order/browser/distribute/DistributeInfoWindow.java
cbd37fd684bc71990d82a1199b94b9ccaae4b0ab
[]
no_license
jideas/spark-whxc-psi
543c24abe53b3243876f4a90198fd2a18276562a
cb3160395c61421685a110628da1d82a761d483f
refs/heads/master
2021-01-10T09:07:46.430871
2013-05-11T13:46:55
2013-05-11T13:46:55
47,181,021
0
0
null
null
null
null
GB18030
Java
false
false
4,564
java
package com.spark.psi.order.browser.distribute; import com.jiuqi.dna.core.Context; import com.jiuqi.dna.core.type.GUID; import com.jiuqi.dna.ui.common.constants.JWT; import com.jiuqi.dna.ui.wt.graphics.Color; import com.jiuqi.dna.ui.wt.graphics.Point; import com.jiuqi.dna.ui.wt.layouts.GridData; import com.jiuqi.dna.ui.wt.layouts.GridLayout; import com.jiuqi.dna.ui.wt.widgets.Composite; import com.jiuqi.dna.ui.wt.widgets.Control; import com.jiuqi.dna.ui.wt.widgets.Label; import com.spark.common.components.table.SContentProvider; import com.spark.common.components.table.SLabelProvider; import com.spark.common.components.table.SNumberLabelProvider; import com.spark.common.components.table.STable; import com.spark.common.components.table.STableColumn; import com.spark.common.components.table.STableStatus; import com.spark.common.components.table.STableStyle; import com.spark.portal.browser.SMenuWindow; public class DistributeInfoWindow extends SMenuWindow { public DistributeInfoWindow(Control owner) { super(null, owner, Style.InfoWindow, Direction.Down, ActiveMode.Program); Composite contentArea = this.getContentArea(); GridLayout gl = new GridLayout(); gl.marginTop = gl.marginBottom = 5; gl.marginLeft = gl.marginRight = 5; contentArea.setLayout(gl); } public void refresh(String goodsItemInfo, String unAllocateCount, Item[] items, Point location) { // contentArea.clear(); contentArea.layout(); // Label label = new Label(contentArea); label.setText(goodsItemInfo); label = new Label(contentArea); label.setText("未分配数量:"+unAllocateCount); // TableProvider tableProvider = new TableProvider(items); STableColumn[] columns = new STableColumn[3]; columns[0] = new STableColumn("Name", 240, JWT.LEFT, "仓库名称"); columns[1] = new STableColumn("AvailableCount", 120, JWT.RIGHT, "可用数量"); columns[2] = new STableColumn("DistributeCount", 120, JWT.RIGHT, "已分配数量"); STableStyle tableStyle = new STableStyle(); tableStyle.setPageAble(false); // int n = items.length > 5 ? 5 : items.length; int tableHeight = tableStyle.getHeaderHeight() + tableStyle.getRowHeight() * n; // GridData gd = new GridData(); gd.widthHint = 480; gd.heightHint = tableHeight - 1; // if (items.length <= 5) { tableStyle.setNoScroll(true); gd.heightHint = tableHeight - 1; } else { gd.widthHint = 500; } // STable table = new STable(contentArea, columns, tableStyle); table.setContentProvider(tableProvider); table.setLabelProvider(tableProvider); table.render(); // table.setLayoutData(gd); // showMenu(location.x, location.y, 10, 25); } private static class TableProvider implements SContentProvider, SLabelProvider, SNumberLabelProvider { private Item[] items; public TableProvider(Item[] items) { this.items = items; } public Object[] getElements(Context context, STableStatus tablestatus) { return items; } public String getElementId(Object element) { Item item = (Item) element; return item.storeId.toString(); } public String getText(Object element, int columnIndex) { Item item = (Item) element; switch (columnIndex) { case 0: return item.storeName; case 1: return item.availableCount; case 2: return item.distributeCount; } return ""; } public int getDecimal(Object element, int columnIndex) { Item item = (Item) element; if (columnIndex > 0) { return item.decimal; } return -1; } // /////////// public boolean isSelected(Object element) { return false; } public boolean isSelectable(Object element) { return true; } public Color getBackground(Object element, int columnIndex) { return null; } public String getToolTipText(Object element, int columnIndex) { return null; } public Color getForeground(Object element, int columnIndex) { return null; } } public static class Item { private GUID storeId; private String storeName; private String availableCount; private String distributeCount; private int decimal; public Item(GUID storeId, String storeName, String availableCount, String distributeCount, int decimal) { super(); this.storeId = storeId; this.storeName = storeName; this.availableCount = availableCount; this.distributeCount = distributeCount; this.decimal = decimal; } } }
[ "weiyi1286@e4103974-2435-85cb-9e1d-4ec83b94b454" ]
weiyi1286@e4103974-2435-85cb-9e1d-4ec83b94b454
c36f64156e50fb4a0f6ee60788537fcbb05f6e43
2a30231bb1be46aff7e80727ff2a311527ff9e5a
/src/main/java/ValidateSubsequence.java
1a82cbdcb907cd6fb6234ca0df3a8cb60aa250ee
[]
no_license
bhanusisodia4/DS_algo
fd73ed33563fb9574c285c1ece2226972be06137
ea7c996712b6cc3ab14e30e8259ab4676cc35263
refs/heads/master
2023-08-17T07:56:26.718768
2023-08-13T11:03:55
2023-08-13T11:03:55
388,535,840
0
0
null
2023-08-13T11:03:56
2021-07-22T16:54:47
Java
UTF-8
Java
false
false
736
java
import java.util.Arrays; public class ValidateSubsequence { public static boolean valSubsequence(int arr[], int seq[]){ if(arr.length==0 || seq.length==0) return false; int check[] = new int[seq.length]; int k=0; for (int i=0; i< arr.length;i++){ for(int j=0;j<seq.length;j++){ if(seq[j]==arr[i]){ check[k]=arr[i]; k++; } } } if (Arrays.equals(seq,check)) return true; return false; } public static void main(String[] args) { int arr[] ={5,1,22,25,6,-1,8,10,30}; int seq[] = {1,6,-1,10}; System.out.println(valSubsequence(arr,seq)); } }
[ "34009711+bhanusisodia4@users.noreply.github.com" ]
34009711+bhanusisodia4@users.noreply.github.com
106e38111d795bc818718d33eb86da9e38996998
c1cd3bd85aa87d8a75e4a82e9b133164508169dc
/app/src/main/java/io/github/ovso/leztest/di/AppComponent.java
aa4fa39b6ac721086d3bc9effcfc269f58937c83
[]
no_license
ovso/LezTest
afa91a3f5caa8f5e04621394a118a42c1d4a3615
8d71b75a5f0d3135080f093979189cf5f2804bdc
refs/heads/master
2020-04-01T17:51:13.584234
2018-10-20T11:59:37
2018-10-20T11:59:37
153,454,535
0
0
null
null
null
null
UTF-8
Java
false
false
643
java
package io.github.ovso.leztest.di; import android.app.Application; import dagger.BindsInstance; import dagger.Component; import dagger.android.AndroidInjector; import dagger.android.DaggerApplication; import dagger.android.support.AndroidSupportInjectionModule; import io.github.ovso.leztest.App; @Component(modules = { AndroidSupportInjectionModule.class, AppModule.class, ActivityBuilder.class }) public interface AppComponent extends AndroidInjector<DaggerApplication> { @Component.Builder interface Builder { @BindsInstance Builder application(Application application); AppComponent build(); } void inject(App app); }
[ "ovsoce@gmail.com" ]
ovsoce@gmail.com
d9da58d641b42dba6130154d50c09f06da3df62b
d5e183284d4ae3b6d73e0299d4aee3feae53fb7e
/app/src/androidTest/java/com/technology/carrot/photogallery/ExampleInstrumentedTest.java
8c25ef0b4287e27f54c219bd8468e1fedcd10836
[]
no_license
helloyue/PhotoGallery
9956b10a40573ac56109f08d903ffd08741722db
ff1f9b007818edd11fddbf0c7f41cadb368e3f54
refs/heads/master
2021-09-05T04:04:55.259239
2018-01-24T02:48:26
2018-01-24T02:48:26
118,702,285
0
0
null
null
null
null
UTF-8
Java
false
false
772
java
package com.technology.carrot.photogallery; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumentation test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.technology.carrot.photogallery", appContext.getPackageName()); } }
[ "424266552@qq.com" ]
424266552@qq.com
9b56c2f75fb2e1bdfd7aa69ca648d6fbde3d3b6d
61008c5aff00dc2b9b5d59c06d7e829b0b429090
/src/main/java/com/bytatech/ayoos/client/patient_dms/model/SitePaging2.java
c633f0e0ec7e7388d6f2ace27bdf94d45a6f2692
[]
no_license
tayduivn/PATIENT-MICROSERVICE
85f6830a9d44087a96b27920393020865ab578d4
462ddc45881a0733940d2031d0045af14bf5239d
refs/heads/master
2022-11-13T17:50:59.065477
2019-10-31T07:58:27
2019-10-31T07:58:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,868
java
package com.bytatech.ayoos.client.patient_dms.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; import javax.validation.constraints.*; /** * SitePaging */ @Validated @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2019-05-10T09:58:46.053+05:30[Asia/Kolkata]") public class SitePaging2 { @JsonProperty("list") private Object list = null; /* public SitePaging list(Object list) { this.list = list; return this; } */ /** * Get list * @return list **/ @ApiModelProperty(required = true, value = "") @NotNull public Object getList() { return list; } public void setList(Object list) { this.list = list; } /*@Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SitePaging sitePaging = (SitePaging) o; return Objects.equals(this.list, sitePaging.list); } */ @Override public int hashCode() { return Objects.hash(list); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SitePaging {\n"); sb.append(" list: ").append(toIndentedString(list)).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 "); } }
[ "abdul.rafeek@lxisoft.com" ]
abdul.rafeek@lxisoft.com
fc91c277201745a962b4ea01e51a385a0634e8a7
5dd54d9de6968be56dc8e3fe44d023ea9c31e8d8
/src/main/java/com/ifelze/lms/security/AjaxAuthenticationSuccessHandler.java
da70c1a2bb64d5dca6ee46b6cf21c207cf6cd3a7
[]
no_license
Ifelze/ilms2
b7100b812b3367399883e0149d4401a2c803522b
261e59782ccbbe9290e18999e02e45d2d9fe1e2f
refs/heads/master
2021-07-13T02:02:51.371625
2017-01-11T08:11:01
2017-01-11T08:11:01
74,081,647
0
1
null
2020-09-18T15:50:09
2016-11-18T01:04:20
CSS
UTF-8
Java
false
false
839
java
package com.ifelze.lms.security; import org.springframework.security.core.Authentication; import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler; import org.springframework.stereotype.Component; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** * Spring Security success handler, specialized for Ajax requests. */ @Component public class AjaxAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuccessHandler { @Override public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { response.setStatus(HttpServletResponse.SC_OK); } }
[ "naga@ifelze.com" ]
naga@ifelze.com
5868f80b488627a2867b0b060c2fa5dda9f3faeb
c0542546866385891c196b665d65a8bfa810f1a3
/decompiled/android/bluetooth/le/ScanFilter.java
0d39427f3705706c377674f025635a824b366439
[]
no_license
auxor/android-wear-decompile
6892f3564d316b1f436757b72690864936dd1a82
eb8ad0d8003c5a3b5623918c79334290f143a2a8
refs/heads/master
2016-09-08T02:32:48.433800
2015-10-12T02:17:27
2015-10-12T02:19:32
42,517,868
5
1
null
null
null
null
UTF-8
Java
false
false
54,441
java
package android.bluetooth.le; import android.os.ParcelUuid; import android.os.Parcelable; import android.os.Parcelable.Creator; public final class ScanFilter implements Parcelable { public static final Creator<ScanFilter> CREATOR = null; private final String mDeviceAddress; private final String mDeviceName; private final byte[] mManufacturerData; private final byte[] mManufacturerDataMask; private final int mManufacturerId; private final byte[] mServiceData; private final byte[] mServiceDataMask; private final ParcelUuid mServiceDataUuid; private final ParcelUuid mServiceUuid; private final ParcelUuid mServiceUuidMask; public static final class Builder { private String mDeviceAddress; private String mDeviceName; private byte[] mManufacturerData; private byte[] mManufacturerDataMask; private int mManufacturerId; private byte[] mServiceData; private byte[] mServiceDataMask; private ParcelUuid mServiceDataUuid; private ParcelUuid mServiceUuid; private ParcelUuid mUuidMask; public Builder() { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.Builder.<init>():void at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:263) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.Builder.<init>():void at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 8 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e6 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 9 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.Builder.<init>():void"); } public android.bluetooth.le.ScanFilter build() { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.Builder.build():android.bluetooth.le.ScanFilter at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:263) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.Builder.build():android.bluetooth.le.ScanFilter at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 8 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 9 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.Builder.build():android.bluetooth.le.ScanFilter"); } public android.bluetooth.le.ScanFilter.Builder setDeviceAddress(java.lang.String r1) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.Builder.setDeviceAddress(java.lang.String):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:263) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.Builder.setDeviceAddress(java.lang.String):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 8 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e9 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 9 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.Builder.setDeviceAddress(java.lang.String):android.bluetooth.le.ScanFilter$Builder"); } public android.bluetooth.le.ScanFilter.Builder setDeviceName(java.lang.String r1) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.Builder.setDeviceName(java.lang.String):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:263) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.Builder.setDeviceName(java.lang.String):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 8 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e8 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 9 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.Builder.setDeviceName(java.lang.String):android.bluetooth.le.ScanFilter$Builder"); } public android.bluetooth.le.ScanFilter.Builder setManufacturerData(int r1, byte[] r2) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.Builder.setManufacturerData(int, byte[]):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:263) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.Builder.setManufacturerData(int, byte[]):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 8 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e6 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 9 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.Builder.setManufacturerData(int, byte[]):android.bluetooth.le.ScanFilter$Builder"); } public android.bluetooth.le.ScanFilter.Builder setManufacturerData(int r1, byte[] r2, byte[] r3) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.Builder.setManufacturerData(int, byte[], byte[]):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:263) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.Builder.setManufacturerData(int, byte[], byte[]):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 8 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 9 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.Builder.setManufacturerData(int, byte[], byte[]):android.bluetooth.le.ScanFilter$Builder"); } public android.bluetooth.le.ScanFilter.Builder setServiceData(android.os.ParcelUuid r1, byte[] r2) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.Builder.setServiceData(android.os.ParcelUuid, byte[]):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:263) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.Builder.setServiceData(android.os.ParcelUuid, byte[]):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 8 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e8 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 9 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.Builder.setServiceData(android.os.ParcelUuid, byte[]):android.bluetooth.le.ScanFilter$Builder"); } public android.bluetooth.le.ScanFilter.Builder setServiceData(android.os.ParcelUuid r1, byte[] r2, byte[] r3) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.Builder.setServiceData(android.os.ParcelUuid, byte[], byte[]):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:263) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.Builder.setServiceData(android.os.ParcelUuid, byte[], byte[]):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 8 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 9 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.Builder.setServiceData(android.os.ParcelUuid, byte[], byte[]):android.bluetooth.le.ScanFilter$Builder"); } public android.bluetooth.le.ScanFilter.Builder setServiceUuid(android.os.ParcelUuid r1) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.Builder.setServiceUuid(android.os.ParcelUuid):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:263) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.Builder.setServiceUuid(android.os.ParcelUuid):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 8 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e8 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 9 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.Builder.setServiceUuid(android.os.ParcelUuid):android.bluetooth.le.ScanFilter$Builder"); } public android.bluetooth.le.ScanFilter.Builder setServiceUuid(android.os.ParcelUuid r1, android.os.ParcelUuid r2) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.Builder.setServiceUuid(android.os.ParcelUuid, android.os.ParcelUuid):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:263) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.Builder.setServiceUuid(android.os.ParcelUuid, android.os.ParcelUuid):android.bluetooth.le.ScanFilter$Builder at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 8 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 9 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.Builder.setServiceUuid(android.os.ParcelUuid, android.os.ParcelUuid):android.bluetooth.le.ScanFilter$Builder"); } } private ScanFilter(java.lang.String r1, java.lang.String r2, android.os.ParcelUuid r3, android.os.ParcelUuid r4, android.os.ParcelUuid r5, byte[] r6, byte[] r7, int r8, byte[] r9, byte[] r10) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.<init>(java.lang.String, java.lang.String, android.os.ParcelUuid, android.os.ParcelUuid, android.os.ParcelUuid, byte[], byte[], int, byte[], byte[]):void at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.<init>(java.lang.String, java.lang.String, android.os.ParcelUuid, android.os.ParcelUuid, android.os.ParcelUuid, byte[], byte[], int, byte[], byte[]):void at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e8 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.<init>(java.lang.String, java.lang.String, android.os.ParcelUuid, android.os.ParcelUuid, android.os.ParcelUuid, byte[], byte[], int, byte[], byte[]):void"); } /* synthetic */ ScanFilter(java.lang.String r1, java.lang.String r2, android.os.ParcelUuid r3, android.os.ParcelUuid r4, android.os.ParcelUuid r5, byte[] r6, byte[] r7, int r8, byte[] r9, byte[] r10, android.bluetooth.le.ScanFilter.AnonymousClass1 r11) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.<init>(java.lang.String, java.lang.String, android.os.ParcelUuid, android.os.ParcelUuid, android.os.ParcelUuid, byte[], byte[], int, byte[], byte[], android.bluetooth.le.ScanFilter$1):void at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.<init>(java.lang.String, java.lang.String, android.os.ParcelUuid, android.os.ParcelUuid, android.os.ParcelUuid, byte[], byte[], int, byte[], byte[], android.bluetooth.le.ScanFilter$1):void at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 0073 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.<init>(java.lang.String, java.lang.String, android.os.ParcelUuid, android.os.ParcelUuid, android.os.ParcelUuid, byte[], byte[], int, byte[], byte[], android.bluetooth.le.ScanFilter$1):void"); } private boolean matchesServiceUuid(java.util.UUID r1, java.util.UUID r2, java.util.UUID r3) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.matchesServiceUuid(java.util.UUID, java.util.UUID, java.util.UUID):boolean at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.matchesServiceUuid(java.util.UUID, java.util.UUID, java.util.UUID):boolean at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e9 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.matchesServiceUuid(java.util.UUID, java.util.UUID, java.util.UUID):boolean"); } private boolean matchesServiceUuids(android.os.ParcelUuid r1, android.os.ParcelUuid r2, java.util.List<android.os.ParcelUuid> r3) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.matchesServiceUuids(android.os.ParcelUuid, android.os.ParcelUuid, java.util.List):boolean at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.matchesServiceUuids(android.os.ParcelUuid, android.os.ParcelUuid, java.util.List):boolean at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e9 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.matchesServiceUuids(android.os.ParcelUuid, android.os.ParcelUuid, java.util.List):boolean"); } public boolean equals(java.lang.Object r1) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.equals(java.lang.Object):boolean at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.equals(java.lang.Object):boolean at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e9 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.equals(java.lang.Object):boolean"); } public java.lang.String getDeviceAddress() { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.getDeviceAddress():java.lang.String at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.getDeviceAddress():java.lang.String at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.getDeviceAddress():java.lang.String"); } public java.lang.String getDeviceName() { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.getDeviceName():java.lang.String at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.getDeviceName():java.lang.String at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.getDeviceName():java.lang.String"); } public byte[] getManufacturerData() { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.getManufacturerData():byte[] at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.getManufacturerData():byte[] at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.getManufacturerData():byte[]"); } public byte[] getManufacturerDataMask() { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.getManufacturerDataMask():byte[] at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.getManufacturerDataMask():byte[] at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.getManufacturerDataMask():byte[]"); } public int getManufacturerId() { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.getManufacturerId():int at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.getManufacturerId():int at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e3 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.getManufacturerId():int"); } public byte[] getServiceData() { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.getServiceData():byte[] at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.getServiceData():byte[] at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.getServiceData():byte[]"); } public byte[] getServiceDataMask() { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.getServiceDataMask():byte[] at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.getServiceDataMask():byte[] at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.getServiceDataMask():byte[]"); } public android.os.ParcelUuid getServiceDataUuid() { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.getServiceDataUuid():android.os.ParcelUuid at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.getServiceDataUuid():android.os.ParcelUuid at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.getServiceDataUuid():android.os.ParcelUuid"); } public android.os.ParcelUuid getServiceUuid() { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.getServiceUuid():android.os.ParcelUuid at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.getServiceUuid():android.os.ParcelUuid at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.getServiceUuid():android.os.ParcelUuid"); } public android.os.ParcelUuid getServiceUuidMask() { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.getServiceUuidMask():android.os.ParcelUuid at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.getServiceUuidMask():android.os.ParcelUuid at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.getServiceUuidMask():android.os.ParcelUuid"); } public int hashCode() { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.hashCode():int at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.hashCode():int at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.hashCode():int"); } public boolean matches(android.bluetooth.le.ScanResult r1) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.matches(android.bluetooth.le.ScanResult):boolean at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.matches(android.bluetooth.le.ScanResult):boolean at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e9 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.matches(android.bluetooth.le.ScanResult):boolean"); } public java.lang.String toString() { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.toString():java.lang.String at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.toString():java.lang.String at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e9 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.toString():java.lang.String"); } public void writeToParcel(android.os.Parcel r1, int r2) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.writeToParcel(android.os.Parcel, int):void at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.writeToParcel(android.os.Parcel, int):void at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 7 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 8 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.writeToParcel(android.os.Parcel, int):void"); } public int describeContents() { return 0; } static { CREATOR = new Creator<ScanFilter>() { public android.bluetooth.le.ScanFilter createFromParcel(android.os.Parcel r1) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.bluetooth.le.ScanFilter.1.createFromParcel(android.os.Parcel):android.bluetooth.le.ScanFilter at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:263) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: android.bluetooth.le.ScanFilter.1.createFromParcel(android.os.Parcel):android.bluetooth.le.ScanFilter at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 8 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 00ea at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 9 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.bluetooth.le.ScanFilter.1.createFromParcel(android.os.Parcel):android.bluetooth.le.ScanFilter"); } public ScanFilter[] newArray(int size) { return new ScanFilter[size]; } }; } private boolean matchesPartialData(byte[] data, byte[] dataMask, byte[] parsedData) { if (parsedData == null || parsedData.length < data.length) { return false; } int i; if (dataMask == null) { for (i = 0; i < data.length; i++) { if (parsedData[i] != data[i]) { return false; } } return true; } for (i = 0; i < data.length; i++) { if ((dataMask[i] & parsedData[i]) != (dataMask[i] & data[i])) { return false; } } return true; } }
[ "itop.my@gmail.com" ]
itop.my@gmail.com
7e4b7dffd8eb03deebb46fdda1fcd6ad6e3833a4
d041df5e254e36c9c71c8ac4911d46f37e68821f
/DemoProject/src/com/capgemini/bean/Patientbean.java
ab768d24b9c45fcabfc501bfb0412891b051fbcf
[]
no_license
Kravanika/practice
c78cc1e99ef67620e738d9936c5d990837ab02b9
347f38def68010d6b701b975adbe09e91f49f290
refs/heads/master
2020-04-04T10:41:12.970279
2018-11-02T12:24:04
2018-11-02T12:24:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,822
java
package com.capgemini.bean; import java.util.Date; public class Patientbean { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((age == null) ? 0 : age.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((phoneNumber == null) ? 0 : phoneNumber.hashCode()); result = prime * result + ((productInterested == null) ? 0 : productInterested.hashCode()); //result = prime * result + ((regDate == null) ? 0 : regDate.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Patientbean other = (Patientbean)obj; if (age == null) { if (other.age != null) return false; } else if (!age.equals(other.age)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (phoneNumber == null) { if (other.phoneNumber != null) return false; } else if (!phoneNumber.equals(other.phoneNumber)) return false; if (productInterested == null) { if (other.productInterested != null) return false; } else if (!productInterested.equals(other.productInterested)) return false; /*if (regDate == null) { if (other.regDate != null) return false; } else if (!regDate.equals(other.regDate)) return false;*/ return true; } private String name; private String age; private String phoneNumber; private String productInterested; //private Date regDate; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAge() { return age; } public void setAge(String age) { this.age = age; } public String getPhoneNumber() { return phoneNumber; } public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } public String getProductInterested() { return productInterested; } public void setProductInterested(String productInterested) { this.productInterested = productInterested; } /*public Date getRegDate() { return regDate; } public void setRegDate(Date regDate) { this.regDate = regDate; } */ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("Printing Donor Details \n"); sb.append("Name: " +name +"\n"); sb.append("Age: " +age +"\n"); sb.append("Phone Number: "+ phoneNumber +"\n"); sb.append("Product Interested: "+ productInterested +"\n"); //sb.append("Reg Date: "+ regDate); return sb.toString(); } }
[ "noreply@github.com" ]
noreply@github.com
d0e02517f817fda4663226bf5441c7fded77a3fe
c6c34ac5a6d50236b45c3168fdd932b1817f8c08
/src/test/java/com/Ecommerce/testBase/BaseClass.java
87df8af24ef97b511b3e932cea855c0dcc4c9a1e
[]
no_license
BrandSSK/Ecommerce1
7d39789b0c56b9c127425c08428d6899490282eb
31c52f33e1fd5a4c097a592a90cb1daa5da954e0
refs/heads/master
2023-04-02T15:59:27.710524
2021-03-30T11:37:17
2021-03-30T11:37:17
352,978,285
0
0
null
null
null
null
UTF-8
Java
false
false
2,169
java
package com.Ecommerce.testBase; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Properties; import java.util.concurrent.TimeUnit; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.RandomStringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Parameters; import io.github.bonigarcia.wdm.WebDriverManager; public class BaseClass { public WebDriver driver; public Properties confgprobObj; public Logger logger=LogManager.getLogger(this.getClass()); @BeforeClass @Parameters("Browser") public void setup(String b) throws IOException { confgprobObj=new Properties(); FileInputStream fis=new FileInputStream(".\\resources\\config.properties"); confgprobObj.load(fis); if(b.equals("Chrome")) { WebDriverManager.chromedriver().setup(); driver=new ChromeDriver(); } else if(b.equals("FireFox")) { WebDriverManager.firefoxdriver().setup(); driver=new FirefoxDriver(); } driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); } @AfterClass public void tearDown() { driver.close(); } public void captureScreen(WebDriver driver, String tname) throws IOException { TakesScreenshot ts = (TakesScreenshot) driver; File source = ts.getScreenshotAs(OutputType.FILE); File target = new File(System.getProperty("user.dir") + "\\Screenshots\\" + tname + ".png"); FileUtils.copyFile(source, target); System.out.println("Screenshot taken"); } public String randomestring() { String generatedString1 = RandomStringUtils.randomAlphabetic(5); return (generatedString1); } public int randomeNum() { String generatedString2 = RandomStringUtils.randomNumeric(4); return (Integer.parseInt(generatedString2)); } }
[ "sudarshansk9@gmail.com" ]
sudarshansk9@gmail.com
02c279d39fad259fa2b54381aa23bc071d20ea93
5415391be062515ea9f113523b757a9e98cd7834
/SalonManagement/src/com/gss/testers/PayReservation.java
9f2d80a1df1e8c79e358c8c05ce3b416f930ee22
[]
no_license
JKSantos/RoadToPICC
660e5bf56db980c552661728a3fadc9305247451
ffe337596db6bee856fe47d1a7e074123c8e7238
refs/heads/master
2020-05-25T15:42:48.342064
2016-12-08T15:23:36
2016-12-08T15:23:36
62,955,782
0
0
null
null
null
null
UTF-8
Java
false
false
1,067
java
package com.gss.testers; import java.util.List; import java.sql.SQLException; import java.util.ArrayList; import java.util.Date; import com.gss.model.Discount; import com.gss.model.ExtraCharge; import com.gss.model.Invoice; import com.gss.model.Payment; import com.gss.model.ProductSales; import com.gss.model.Reservation; import com.gss.service.PaymentService; import com.gss.service.PaymentServiceImpl; public class PayReservation { public static void main(String[] args) throws SQLException{ // List<Discount> discountList = new ArrayList<Discount>(); // List<ExtraCharge> extraChargeList = new ArrayList<ExtraCharge>(); // // Payment payment = new Payment(62, 50, "FULL PAYMENT", 500, new Date()); // // // PaymentService service = new PaymentServiceImpl(); // // System.out.println(service.createReservationPayment(payment)); searchReservation(); } public static void searchReservation(){ List<Reservation> reservationList = Reservation.getAllReservationNoDetails(); System.out.println(reservationList.size()); } }
[ "santos.jeffrey0023@gmail.com" ]
santos.jeffrey0023@gmail.com
a2ad5d6f53e67bd380eae6dcbe77a926d915234f
ccdd9364d70254df5556263706b173da2a718b1c
/src/main/java/com/thoughworks/traning/jingyli/user_service/service/UserService.java
4a79744f9d9eb12f3ebe2e836887bfd1b938b9e0
[]
no_license
Kata1213/user-servier-micro-server
8f30e43bfa1fe98677d5d40d0d363aa27f5bff1e
2244d850f5424280bb11e1f7b18cab05ed4352a4
refs/heads/master
2020-03-29T23:07:26.220178
2018-09-28T00:37:01
2018-09-28T00:37:01
150,457,181
0
0
null
null
null
null
UTF-8
Java
false
false
1,444
java
package com.thoughworks.traning.jingyli.user_service.service; import com.thoughworks.traning.jingyli.user_service.exception.NotFoundException; import com.thoughworks.traning.jingyli.user_service.model.User; import com.thoughworks.traning.jingyli.user_service.repository.UserRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class UserService { @Autowired private UserRepository userRepository; @Autowired private TokenService tokenService; public User addUser(User user) { if (userRepository.findByName(user.getName()) == null) { return userRepository.save(user); } return user; } public String isLogIn(User user) throws NotFoundException { User user1 = userRepository.findByName(user.getName()); if (user1 != null && user.getPassword().equals(user.getPassword())) { return tokenService.createToken(user1); } throw new NotFoundException(); } public User findById(Long userId) { return userRepository.findOne(userId); } public User getUserByToken(String token){ Long userId = tokenService.parseToken(token); System.out.println("!!!!!!!!!!userId"+userId); User user=userRepository.findById(userId); System.out.println("!!!!!!!!!!!user shout return="+user); return user; } }
[ "jingyli@thoughtworks.com" ]
jingyli@thoughtworks.com
b07762ca58608c029c2c3a2a15d6f0e89ce0984f
3102b607cefa85ae1efed9453e6dad021d012f48
/src/main/java/com/example/demo/model/LikeImage.java
ac39603981d6ce7ca47db048381531e8f7d7c798
[]
no_license
phamdat95/personal-project
77d8efe9e528203799aa08f0ce3c2af04e3cbe5b
5e70c5ce94f07a76cea5f2098373b3a675a5a201
refs/heads/master
2020-05-16T08:10:34.685466
2019-05-09T03:05:30
2019-05-09T03:05:30
182,900,538
1
0
null
null
null
null
UTF-8
Java
false
false
1,018
java
package com.example.demo.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import javax.persistence.*; @Entity @Table(name = "likeImage") public class LikeImage { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; private String imageName; @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "userId") @JsonIgnoreProperties(value = "likeImages", allowSetters = true) private User user; public LikeImage() { } public LikeImage(String imageName, User user) { this.imageName = imageName; this.user = user; } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getImageName() { return imageName; } public void setImageName(String imageName) { this.imageName = imageName; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } }
[ "phamdat@gmail.com" ]
phamdat@gmail.com
086cb2a259ed5bfde11b503fb0fbcc2ff2b15e70
a1b22492103fb55ed7dd4dab870ab45facf7dde8
/maxerve.admin/src/main/java/kr/maxerve/admin/framework/Log.java
e2efa375eb952d2dae8491f823f0370ba23841a5
[]
no_license
rilak-kuma/sla
3c1b2dc9e0d3a0194d7ac1b2bd8e96187903c10a
b3410d58453450de022076b6e0e792e13735b904
refs/heads/master
2022-11-26T00:51:02.516357
2019-08-02T14:40:18
2019-08-02T14:40:18
137,425,300
1
0
null
2022-11-16T12:22:44
2018-06-15T01:12:39
Java
UTF-8
Java
false
false
320
java
package kr.maxerve.admin.framework; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface Log { String locCd() default "000"; }
[ "khs@leecjj-PC" ]
khs@leecjj-PC
9f3ad8d3ba65d7702218b1ff4a507e35c6c3abc4
3efa417c5668b2e7d1c377c41d976ed31fd26fdc
/src/br/com/mind5/dao/DaoStmtExec.java
2bd632995d23baffc1bce6a24535d62d3ddcdfa4
[]
no_license
grazianiborcai/Agenda_WS
4b2656716cc49a413636933665d6ad8b821394ef
e8815a951f76d498eb3379394a54d2aa1655f779
refs/heads/master
2023-05-24T19:39:22.215816
2023-05-15T15:15:15
2023-05-15T15:15:15
109,902,084
0
0
null
2022-06-29T19:44:56
2017-11-07T23:14:21
Java
UTF-8
Java
false
false
295
java
package br.com.mind5.dao; import java.sql.SQLException; import java.util.List; import br.com.mind5.info.InfoRecord; public interface DaoStmtExec<T extends InfoRecord> { public void executeStmt() throws SQLException; public List<T> getResultset(); public void close(); }
[ "mmaciel@mind5.com" ]
mmaciel@mind5.com
960ebe89af36b22eb712c160cd481227472fde77
57a3f4d6ec60b48d76ccbf1950451111e38552ad
/lanif-base-support/lanif-system/src/main/java/com/github/lanif/sys/modular/file/result/SysFileInfoResult.java
5d32830578d19ef0eecad05da60b51f5eb54c008
[ "Apache-2.0" ]
permissive
LANIF-BOOT/lanif-boot-admin
2a5b508be04a77230329be82e31d2c8703e86470
b7ada8f23d7a0e2a11da863c7f4541d1fd2759ea
refs/heads/master
2022-11-28T00:34:20.154554
2020-08-12T15:19:49
2020-08-12T15:19:49
142,227,983
0
0
null
null
null
null
UTF-8
Java
false
false
921
java
package com.github.lanif.sys.modular.file.result; import lombok.Data; /** * 文件信息结果集 * * @author * @date 2020/6/7 22:15 */ @Data public class SysFileInfoResult { /** * 主键id */ private Long id; /** * 文件存储位置(1:阿里云,2:腾讯云,3:minio,4:本地) */ private Integer fileLocation; /** * 文件仓库 */ private String fileBucket; /** * 文件名称(上传时候的文件名) */ private String fileOriginName; /** * 文件后缀 */ private String fileSuffix; /** * 文件大小kb */ private Long fileSizeKb; /** * 存储到bucket的名称(文件唯一标识id) */ private String fileObjectName; /** * 存储路径 */ private String filePath; /** * 文件的字节 */ private byte[] fileBytes; }
[ "6682220aabc@163.com" ]
6682220aabc@163.com
2f829df396d481d1b90ff20b1f0cec317872033c
254adde206e72bb7f19ce5f1b3377c48519ea296
/Microsoft!/SpiralOrderMatrixII.java
3628dd0ea6b04a86f5472ff60760d51c5490c214
[]
no_license
rukaiya2000/Competitive_Ques
35bc2438fc4a9adf392dbbf4f92d1be8d751dccd
3dc389f71350df9ff27e199bbabe9dc67af29253
refs/heads/master
2023-03-19T10:30:23.180945
2021-03-10T11:55:44
2021-03-10T11:55:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,267
java
public class Solution { public int[][] generateMatrix(int A) { int[][] arr = new int[A][A]; int t = 0; int l = 0; int r = A-1; int b = A-1; int p = 1; int d = 0; while(t<=b && l<=r) { if(d==0) { for(int i = l;i<=r;i++) { arr[t][i] = p; p++; } t++; } if(d==1) { for(int i = t;i<=b;i++) { arr[i][r] = p; p++; } r--; } if(d==2) { for(int i = r;i>=l;i--) { arr[b][i] = p; p++; } b--; } if(d==3) { for(int i = b;i>=t;i--) { arr[i][l] = p; p++; } l++; } d = (d+1)%4; } return arr; } }
[ "noreply@github.com" ]
noreply@github.com
644bb3a0a97634b26cf5a4f99f45459e57aed1f5
cd5d72dd200c69f04b60d5d2844e52e4269b9d23
/src/main/java/com/itcalf/renhe/eventbusbean/FinishActivityEvent.java
0dc639a0b26e8bf74d81f32a1af5e109ca2ee88c
[]
no_license
TAEYANG9527/myHlProject
39a34f9f8936a5fb198b99ebb5ad72dae0aaaef6
926fd23afb581466a696b57619caaa7cb0928d44
refs/heads/master
2020-12-25T10:37:47.554659
2016-07-20T02:43:00
2016-07-20T02:43:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
163
java
package com.itcalf.renhe.eventbusbean; /** * Created by wangning on 2016/5/13. */ public class FinishActivityEvent { public FinishActivityEvent() { } }
[ "280832809@qq.com" ]
280832809@qq.com
3990bdb4e1d2d1c4f864bc46c99d7629009a4bb0
f37e1ca927e235dc751841b8f36e0873b1b37810
/tat-core-data/src/main/java/com/retirement/tat/core/data/entity/TipEntity.java
91129e269e06b8d017ba6726f8477581c9535e7b
[]
no_license
saintkarl/tat
90906c744d443407e04c22015ecf4887223ddefd
ced44fa56d3ba72552f493af5f085170d9422c14
refs/heads/master
2021-01-11T00:44:57.683820
2016-11-09T13:50:18
2016-11-09T13:50:18
70,495,122
0
0
null
null
null
null
UTF-8
Java
false
false
4,893
java
package com.retirement.tat.core.data.entity; import javax.persistence.*; import java.sql.Timestamp; /** * Created by khanhcq on 16-Oct-16. */ @Entity @Table(name = "tip") public class TipEntity { private Long tipId; private String title; private String description; private String thumbnail; private String content; private String tags; private String source; private TipCategoryEntity tipCategory; private UsersEntity createdBy; private Timestamp createdDate; private Timestamp modifiedDate; @Id @Column(name = "tipid") @GeneratedValue(strategy = GenerationType.IDENTITY) public Long getTipId() { return tipId; } public void setTipId(Long tipId) { this.tipId = tipId; } @Basic @Column(name = "title") public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } @Basic @Column(name = "description") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } @Basic @Column(name = "thumbnail") public String getThumbnail() { return thumbnail; } public void setThumbnail(String thumbnail) { this.thumbnail = thumbnail; } @Basic @Column(name = "content") public String getContent() { return content; } public void setContent(String content) { this.content = content; } @Basic @Column(name = "tags") public String getTags() { return tags; } public void setTags(String tags) { this.tags = tags; } @Basic @Column(name = "source") public String getSource() { return source; } public void setSource(String source) { this.source = source; } @ManyToOne @JoinColumn(name = "createdby", referencedColumnName = "userid", nullable = false) public UsersEntity getCreatedBy() { return createdBy; } public void setCreatedBy(UsersEntity createdBy) { this.createdBy = createdBy; } @ManyToOne @JoinColumn(name = "categoryid", referencedColumnName = "tipcategoryid", nullable = false) public TipCategoryEntity getTipCategory() { return tipCategory; } public void setTipCategory(TipCategoryEntity tipCategory) { this.tipCategory = tipCategory; } @Basic @Column(name = "createddate") public Timestamp getCreatedDate() { return createdDate; } public void setCreatedDate(Timestamp createdDate) { this.createdDate = createdDate; } @Basic @Column(name = "modifieddate") public Timestamp getModifiedDate() { return modifiedDate; } public void setModifiedDate(Timestamp modifiedDate) { this.modifiedDate = modifiedDate; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TipEntity tipEntity = (TipEntity) o; if (tipId != tipEntity.tipId) return false; if (title != null ? !title.equals(tipEntity.title) : tipEntity.title != null) return false; if (description != null ? !description.equals(tipEntity.description) : tipEntity.description != null) return false; if (thumbnail != null ? !thumbnail.equals(tipEntity.thumbnail) : tipEntity.thumbnail != null) return false; if (content != null ? !content.equals(tipEntity.content) : tipEntity.content != null) return false; if (tags != null ? !tags.equals(tipEntity.tags) : tipEntity.tags != null) return false; if (source != null ? !source.equals(tipEntity.source) : tipEntity.source != null) return false; if (createdDate != null ? !createdDate.equals(tipEntity.createdDate) : tipEntity.createdDate != null) return false; if (modifiedDate != null ? !modifiedDate.equals(tipEntity.modifiedDate) : tipEntity.modifiedDate != null) return false; return true; } @Override public int hashCode() { int result = (int) (tipId ^ (tipId >>> 32)); result = 31 * result + (title != null ? title.hashCode() : 0); result = 31 * result + (description != null ? description.hashCode() : 0); result = 31 * result + (thumbnail != null ? thumbnail.hashCode() : 0); result = 31 * result + (content != null ? content.hashCode() : 0); result = 31 * result + (tags != null ? tags.hashCode() : 0); result = 31 * result + (source != null ? source.hashCode() : 0); result = 31 * result + (createdDate != null ? createdDate.hashCode() : 0); result = 31 * result + (modifiedDate != null ? modifiedDate.hashCode() : 0); return result; } }
[ "khanh.chu@hoanghoacgroup.com" ]
khanh.chu@hoanghoacgroup.com
31531d13d1b66883afba4c47ad6ef1ca8a14d027
3820f42b930648a696736903e1f024dd197c24f2
/Apps/CustomerApp/app/src/main/java/com/tysovsky/customerapp/arcsoft/sdk_demo/FacePermissionAcitivity.java
b89cb4710178f4211243811ed993696934e1bcb0
[]
no_license
msssaf/SE-2019
779b38a15120bf9fe211b1546f0055093d7cf0c0
8c7085a9cc66817bf606e38c84c6ddfc470f9409
refs/heads/master
2020-05-01T17:55:12.080785
2019-04-19T16:38:09
2019-04-19T16:38:09
177,612,193
0
0
null
2019-04-19T14:00:51
2019-03-25T15:19:23
Java
UTF-8
Java
false
false
3,177
java
package com.tysovsky.customerapp.arcsoft.sdk_demo; import android.Manifest; import android.app.Activity; import android.app.ProgressDialog; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; import android.os.Handler; import android.os.Process; import android.widget.Toast; import java.util.ArrayList; import java.util.List; public class FacePermissionAcitivity extends Activity { public static int PERMISSION_REQ = 0x123456; private String[] mPermission = new String[] { Manifest.permission.INTERNET, Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE }; private List<String> mRequestPermission = new ArrayList<String>(); /* (non-Javadoc) * @see android.app.Activity#onCreate(android.os.Bundle) */ ;@Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) { for (String one : mPermission) { if (PackageManager.PERMISSION_GRANTED != this.checkPermission(one, Process.myPid(), Process.myUid())) { mRequestPermission.add(one); } } if (!mRequestPermission.isEmpty()) { this.requestPermissions(mRequestPermission.toArray(new String[mRequestPermission.size()]), PERMISSION_REQ); return ; } } startActiviy(); } public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { // 版本兼容 if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.M) { return; } if (requestCode == PERMISSION_REQ) { for (int i = 0; i < grantResults.length; i++) { for (String one : mPermission) { if (permissions[i].equals(one) && grantResults[i] == PackageManager.PERMISSION_GRANTED) { mRequestPermission.remove(one); } } } startActiviy(); } } public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == PERMISSION_REQ) { if (resultCode == 0) { this.finish(); } } } public void startActiviy() { if (mRequestPermission.isEmpty()) { final ProgressDialog mProgressDialog = new ProgressDialog(this); mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); mProgressDialog.setTitle("loading register data..."); mProgressDialog.setCancelable(false); mProgressDialog.show(); new Thread(new Runnable() { @Override public void run() { FaceApplication app = (FaceApplication) FacePermissionAcitivity.this.getApplicationContext(); app.mFaceDB.loadFaces(); FacePermissionAcitivity.this.runOnUiThread(new Runnable() { @Override public void run() { mProgressDialog.cancel(); Intent intent = new Intent(FacePermissionAcitivity.this, FaceMainActivity.class); startActivityForResult(intent, PERMISSION_REQ); } }); } }).start(); } else { Toast.makeText(this, "PERMISSION DENIED!", Toast.LENGTH_LONG).show(); new Handler().postDelayed(new Runnable() { @Override public void run() { FacePermissionAcitivity.this.finish(); } }, 3000); } } }
[ "hongpeng_zhang@yeah.net" ]
hongpeng_zhang@yeah.net
ce442182ede174e2cf6b32422aa73880d6bbc103
ec93d3b1ea8788bf940bce15cbc909148d81157f
/Japp/smishingtotal/flask/backup/24ebf46d02be58d8195596904c9acad1/decom_source/org/apache/http/impl/conn/ProxySelectorRoutePlanner.java
a332be9f8eb89e6e670d1d3f75c3aaa545000c2e
[]
no_license
yeoungjun/Japp
d403f6a47432a7d21ef5b662e1c2a60231fcc261
79215a0cdb293336978fe9f85044b26147cf819d
refs/heads/master
2021-01-21T21:39:17.824052
2016-04-17T02:10:46
2016-04-17T02:10:46
32,616,137
0
0
null
null
null
null
UTF-8
Java
false
false
5,592
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: packimports(3) package org.apache.http.impl.conn; import java.net.*; import java.util.List; import org.apache.http.*; import org.apache.http.conn.params.ConnRouteParams; import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.routing.HttpRoutePlanner; import org.apache.http.conn.scheme.Scheme; import org.apache.http.conn.scheme.SchemeRegistry; import org.apache.http.protocol.HttpContext; import org.apache.http.util.Args; import org.apache.http.util.Asserts; public class ProxySelectorRoutePlanner implements HttpRoutePlanner { public ProxySelectorRoutePlanner(SchemeRegistry schemeregistry, ProxySelector proxyselector) { Args.notNull(schemeregistry, "SchemeRegistry"); schemeRegistry = schemeregistry; proxySelector = proxyselector; } protected Proxy chooseProxy(List list, HttpHost httphost, HttpRequest httprequest, HttpContext httpcontext) { Proxy proxy; int i; Args.notEmpty(list, "List of proxies"); proxy = null; i = 0; _L6: if(proxy != null || i >= list.size()) goto _L2; else goto _L1 _L1: Proxy proxy1 = (Proxy)list.get(i); static class _cls1 { static final int $SwitchMap$java$net$Proxy$Type[]; static { $SwitchMap$java$net$Proxy$Type = new int[java.net.Proxy.Type.values().length]; try { $SwitchMap$java$net$Proxy$Type[java.net.Proxy.Type.DIRECT.ordinal()] = 1; } catch(NoSuchFieldError nosuchfielderror) { } try { $SwitchMap$java$net$Proxy$Type[java.net.Proxy.Type.HTTP.ordinal()] = 2; } catch(NoSuchFieldError nosuchfielderror1) { } try { $SwitchMap$java$net$Proxy$Type[java.net.Proxy.Type.SOCKS.ordinal()] = 3; } catch(NoSuchFieldError nosuchfielderror2) { return; } } } _cls1..SwitchMap.java.net.Proxy.Type[proxy1.type().ordinal()]; JVM INSTR tableswitch 1 2: default 76 // 1 82 // 2 82; goto _L3 _L4 _L4 _L3: i++; continue; /* Loop/switch isn't completed */ _L4: proxy = proxy1; if(true) goto _L3; else goto _L2 _L2: if(proxy == null) proxy = Proxy.NO_PROXY; return proxy; if(true) goto _L6; else goto _L5 _L5: } protected HttpHost determineProxy(HttpHost httphost, HttpRequest httprequest, HttpContext httpcontext) throws HttpException { ProxySelector proxyselector = proxySelector; if(proxyselector == null) proxyselector = ProxySelector.getDefault(); if(proxyselector != null) { URI uri; Proxy proxy; try { uri = new URI(httphost.toURI()); } catch(URISyntaxException urisyntaxexception) { throw new HttpException((new StringBuilder()).append("Cannot convert host to URI: ").append(httphost).toString(), urisyntaxexception); } proxy = chooseProxy(proxyselector.select(uri), httphost, httprequest, httpcontext); if(proxy.type() == java.net.Proxy.Type.HTTP) if(!(proxy.address() instanceof InetSocketAddress)) { throw new HttpException((new StringBuilder()).append("Unable to handle non-Inet proxy address: ").append(proxy.address()).toString()); } else { InetSocketAddress inetsocketaddress = (InetSocketAddress)proxy.address(); return new HttpHost(getHost(inetsocketaddress), inetsocketaddress.getPort()); } } return null; } public HttpRoute determineRoute(HttpHost httphost, HttpRequest httprequest, HttpContext httpcontext) throws HttpException { Args.notNull(httprequest, "HTTP request"); HttpRoute httproute = ConnRouteParams.getForcedRoute(httprequest.getParams()); if(httproute != null) return httproute; Asserts.notNull(httphost, "Target host"); InetAddress inetaddress = ConnRouteParams.getLocalAddress(httprequest.getParams()); HttpHost httphost1 = determineProxy(httphost, httprequest, httpcontext); boolean flag = schemeRegistry.getScheme(httphost.getSchemeName()).isLayered(); HttpRoute httproute1; if(httphost1 == null) httproute1 = new HttpRoute(httphost, inetaddress, flag); else httproute1 = new HttpRoute(httphost, inetaddress, httphost1, flag); return httproute1; } protected String getHost(InetSocketAddress inetsocketaddress) { if(inetsocketaddress.isUnresolved()) return inetsocketaddress.getHostName(); else return inetsocketaddress.getAddress().getHostAddress(); } public ProxySelector getProxySelector() { return proxySelector; } public void setProxySelector(ProxySelector proxyselector) { proxySelector = proxyselector; } protected ProxySelector proxySelector; protected final SchemeRegistry schemeRegistry; }
[ "yeoung_jun@naver.com" ]
yeoung_jun@naver.com
471a90892662ca257faf902ed2643bbf0268a270
19d3210f0aeba87976e9f73a7778463a8ed57a96
/app/src/main/java/com/mualab/org/user/activity/tag_module/adapters/ServiceAdapter.java
90c384805483afe67bba62d38884387b3688de56
[]
no_license
anilmindiii/Koobi
9b3434b5e986ab1b5a6a79c991231d7b54a07c76
d3270c4acbbd96f4a6e6c0afacec6a0e7f49099a
refs/heads/master
2020-05-02T18:34:39.913262
2019-08-12T05:34:24
2019-08-12T05:34:24
170,526,841
0
0
null
null
null
null
UTF-8
Java
false
false
4,139
java
package com.mualab.org.user.activity.tag_module.adapters; import android.os.SystemClock; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.mualab.org.user.R; import com.mualab.org.user.activity.tag_module.callback.ServiceClickListener; import com.mualab.org.user.activity.tag_module.models.ServiceTagBean; import java.util.List; public class ServiceAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { private final int FEED_TYPE = 1; private final int VIEW_TYPE_LOADING = 2; private boolean showLoader; private long mLastClickTime = 0; private List<ServiceTagBean> serviceTagList; private ServiceClickListener listener; public ServiceAdapter(List<ServiceTagBean> serviceTagList) { this.serviceTagList = serviceTagList; } public void setListener(ServiceClickListener listener) { this.listener = listener; } public void showHideLoading(boolean bool) { showLoader = bool; } public void clear() { final int size = serviceTagList.size(); serviceTagList.clear(); notifyItemRangeRemoved(0, size); } @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view; switch (viewType) { case FEED_TYPE: return new Holder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_service_tag_list, parent, false)); /* case VIEW_TYPE_LOADING: view = LayoutInflater.from(parent.getContext()).inflate(R.layout.load_more_view, parent, false); return new FooterLoadingViewHolder(view);*/ } return null; } @Override public int getItemViewType(int position) { ServiceTagBean feed = serviceTagList.get(position); return feed == null ? VIEW_TYPE_LOADING : FEED_TYPE; } @Override public int getItemCount() { return serviceTagList.size(); } public void onBindViewHolder(@NonNull final RecyclerView.ViewHolder holder, int position) { /*if (holder instanceof FooterLoadingViewHolder) { FooterLoadingViewHolder loaderViewHolder = (FooterLoadingViewHolder) holder; if (showLoader) { loaderViewHolder.progressBar.setVisibility(View.VISIBLE); } else { loaderViewHolder.progressBar.setVisibility(View.GONE); } return; }*/ final ServiceTagBean searchTag = serviceTagList.get(position); final Holder h = ((Holder) holder); h.tvName.setText(searchTag.title); h.tvServiceAmt.setText(h.tvServiceAmt.getContext().getString(R.string.pond_symbol) .concat(searchTag.inCallPrice.equals("0.0") || searchTag.inCallPrice.isEmpty() ? searchTag.outCallPrice : searchTag.inCallPrice)); h.tvServiceTime.setText(searchTag.completionTime); } private class Holder extends RecyclerView.ViewHolder implements View.OnClickListener { private TextView tvName, tvServiceTime, tvServiceAmt; private Holder(View itemView) { super(itemView); tvName = itemView.findViewById(R.id.tvName); tvServiceAmt = itemView.findViewById(R.id.tvServiceAmt); tvServiceTime = itemView.findViewById(R.id.tvServiceTime); itemView.setOnClickListener(this); } @Override public void onClick(View v) { if (SystemClock.elapsedRealtime() - mLastClickTime < 700) { return; } mLastClickTime = SystemClock.elapsedRealtime(); int pos = getAdapterPosition(); if (serviceTagList.size() > pos) { ServiceTagBean searchTag = serviceTagList.get(getAdapterPosition()); if (listener != null) listener.onServiceClicked(searchTag, getAdapterPosition()); } } } }
[ "neha.mindiii@gmail.com" ]
neha.mindiii@gmail.com
5487d4b093447d251f1b0fe0ea932818ce82bffa
5d100cd947b08bf287719fff9d16c6db7093b1e4
/Android2021C/LogicalNot.java
9818709b2ce1f342310531cc4943b91471b353f3
[]
no_license
monpdev/Android
77ad2f7e1b636fd2cb1542ea25a299ac9fd6d315
79f4ba9e49327925d9fbffa7287765ed2085790a
refs/heads/main
2023-07-08T19:28:39.182072
2021-08-20T12:22:02
2021-08-20T12:22:02
377,775,176
0
0
null
null
null
null
UTF-8
Java
false
false
310
java
package monp.example.learnjava; import java.sql.SQLOutput; public class MyClass { public static void main(String[] args) { boolean isFunny = true; if (!isFunny) { System.out.println("Not funny"); } else { System.out.println("Funny"); } } }
[ "noreply@github.com" ]
noreply@github.com
6f32b1861d74fa8a3dd32fe209ba70e6c97c6c28
7433854de1a9a3d8feb03f7c83deff63fed69572
/commons-statistics-distribution/src/main/java/org/apache/commons/statistics/distribution/BinomialDistribution.java
97389be795299855219ac7abeda899e65b37ac0a
[ "BSD-3-Clause", "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
leventov/commons-statistics
35f32e2796de5b5b620293fc1607d8cf580f4c32
aa5cbad11346df9e3feb789c5e3e85df29c1e3cc
refs/heads/master
2023-06-03T00:27:26.641172
2018-05-15T19:06:19
2018-05-15T19:06:19
170,498,884
1
0
Apache-2.0
2019-02-13T11:46:39
2019-02-13T11:46:38
null
UTF-8
Java
false
false
5,054
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.statistics.distribution; import org.apache.commons.numbers.gamma.RegularizedBeta; /** * Implementation of the <a href="http://en.wikipedia.org/wiki/Binomial_distribution">binomial distribution</a>. */ public class BinomialDistribution extends AbstractDiscreteDistribution { /** The number of trials. */ private final int numberOfTrials; /** The probability of success. */ private final double probabilityOfSuccess; /** * Creates a binomial distribution. * * @param trials Number of trials. * @param p Probability of success. * @throws IllegalArgumentException if {@code trials < 0}, or if * {@code p < 0} or {@code p > 1}. */ public BinomialDistribution(int trials, double p) { if (trials < 0) { throw new DistributionException(DistributionException.NEGATIVE, trials); } if (p < 0 || p > 1) { throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1); } probabilityOfSuccess = p; numberOfTrials = trials; } /** * Access the number of trials for this distribution. * * @return the number of trials. */ public int getNumberOfTrials() { return numberOfTrials; } /** * Access the probability of success for this distribution. * * @return the probability of success. */ public double getProbabilityOfSuccess() { return probabilityOfSuccess; } /** {@inheritDoc} */ @Override public double probability(int x) { final double logProbability = logProbability(x); return logProbability == Double.NEGATIVE_INFINITY ? 0 : Math.exp(logProbability); } /** {@inheritDoc} **/ @Override public double logProbability(int x) { if (numberOfTrials == 0) { return (x == 0) ? 0. : Double.NEGATIVE_INFINITY; } double ret; if (x < 0 || x > numberOfTrials) { ret = Double.NEGATIVE_INFINITY; } else { ret = SaddlePointExpansion.logBinomialProbability(x, numberOfTrials, probabilityOfSuccess, 1.0 - probabilityOfSuccess); } return ret; } /** {@inheritDoc} */ @Override public double cumulativeProbability(int x) { double ret; if (x < 0) { ret = 0.0; } else if (x >= numberOfTrials) { ret = 1.0; } else { ret = 1.0 - RegularizedBeta.value(probabilityOfSuccess, x + 1.0, numberOfTrials - x); } return ret; } /** * {@inheritDoc} * * For {@code n} trials and probability parameter {@code p}, the mean is * {@code n * p}. */ @Override public double getMean() { return numberOfTrials * probabilityOfSuccess; } /** * {@inheritDoc} * * For {@code n} trials and probability parameter {@code p}, the variance is * {@code n * p * (1 - p)}. */ @Override public double getVariance() { final double p = probabilityOfSuccess; return numberOfTrials * p * (1 - p); } /** * {@inheritDoc} * * The lower bound of the support is always 0 except for the probability * parameter {@code p = 1}. * * @return lower bound of the support (0 or the number of trials) */ @Override public int getSupportLowerBound() { return probabilityOfSuccess < 1.0 ? 0 : numberOfTrials; } /** * {@inheritDoc} * * The upper bound of the support is the number of trials except for the * probability parameter {@code p = 0}. * * @return upper bound of the support (number of trials or 0) */ @Override public int getSupportUpperBound() { return probabilityOfSuccess > 0.0 ? numberOfTrials : 0; } /** * {@inheritDoc} * * The support of this distribution is connected. * * @return {@code true} */ @Override public boolean isSupportConnected() { return true; } }
[ "gilles@harfang.homelinux.org" ]
gilles@harfang.homelinux.org
e61b583ad3291cea289eb745811f868183ea059c
97c44f18459163c0baa546ab2578339b716c3238
/Java/cryptodemo-android/src/main/java/com/breadwallet/cryptodemo/TransferCreatePaymentActivity.java
4750e4ef57a5b5895900fc03150ac6192046b4b7
[ "MIT" ]
permissive
breadwallet/breadwallet-core
fe8a0ac99f3e47216860b2918c8ad14d3503b140
73566cb79f753954eccbf07d5ab25ca54741198e
refs/heads/develop
2023-08-21T22:27:45.735652
2020-02-06T18:43:51
2020-02-06T18:43:51
37,500,549
284
283
MIT
2023-03-21T09:07:32
2015-06-16T01:22:12
C
UTF-8
Java
false
false
19,917
java
/* * Created by Michael Carrara <michael.carrara@breadwallet.com> on 10/30/19. * Copyright (c) 2019 Breadwinner AG. All right reserved. * * See the LICENSE file at the project root for license information. * See the CONTRIBUTORS file at the project root for a list of contributors. */ package com.breadwallet.cryptodemo; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.text.Html; import android.widget.Button; import android.widget.EditText; import com.breadwallet.crypto.Address; import com.breadwallet.crypto.Amount; import com.breadwallet.crypto.NetworkFee; import com.breadwallet.crypto.PaymentProtocolPayment; import com.breadwallet.crypto.PaymentProtocolPaymentAck; import com.breadwallet.crypto.PaymentProtocolRequest; import com.breadwallet.crypto.PaymentProtocolRequestType; import com.breadwallet.crypto.Transfer; import com.breadwallet.crypto.TransferFeeBasis; import com.breadwallet.crypto.Wallet; import com.breadwallet.crypto.errors.FeeEstimationError; import com.breadwallet.crypto.errors.PaymentProtocolError; import com.breadwallet.crypto.utility.CompletionHandler; import com.google.common.base.Enums; import com.google.common.base.Optional; import org.jetbrains.annotations.NotNull; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import okhttp3.Call; import okhttp3.Callback; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; import okhttp3.ResponseBody; public class TransferCreatePaymentActivity extends AppCompatActivity { private static final Logger Log = Logger.getLogger(TransferCreatePaymentActivity.class.getName()); private static final String MIME_TYPE_PAYMENT_REQUEST_BIP70 = "application/bitcoin-paymentrequest"; private static final String MIME_TYPE_PAYMENT_REQUEST_BITPAY_V1 = "application/payment-request"; private static final String MIME_TYPE_PAYMENT_PAYMENT_BIP70 = "application/bitcoin-payment"; private static final String MIME_TYPE_PAYMENT_PAYMENT_BITPAY_V1 = "application/payment"; private static final String MIME_TYPE_PAYMENT_ACK_BIP70 = "application/bitcoin-paymentack"; private static final String MIME_TYPE_PAYMENT_ACK_BITPAY_V1 = "application/payment-ack"; private static final String EXTRA_WALLET_NAME = "com.breadwallet.cryptodemo,TransferCreatePaymentActivity.EXTRA_WALLET_NAME"; private static final String EXTRA_PROTOCOL = "com.breadwallet.cryptodemo,TransferCreatePaymentActivity.EXTRA_PROTOCOL"; public static void start(Activity callerActivity, Wallet wallet) { start(callerActivity, wallet, PaymentProtocolRequestType.BIP70); } public static void start(Activity callerActivity, Wallet wallet, PaymentProtocolRequestType type) { Intent intent = new Intent(callerActivity, TransferCreatePaymentActivity.class); intent.putExtra(EXTRA_WALLET_NAME, wallet.getName()); intent.putExtra(EXTRA_PROTOCOL, type.name()); callerActivity.startActivity(intent); } @Nullable private static Wallet getWallet(Intent intent) { String walletName = intent.getStringExtra(EXTRA_WALLET_NAME); for(Wallet wallet: CoreCryptoApplication.getSystem().getWallets()) { if (wallet.getName().equals(walletName)) { return wallet; } } return null; } @Nullable private static PaymentProtocolRequestType getProtocolType(Intent intent) { String typeString = Optional.fromNullable(intent.getStringExtra(EXTRA_PROTOCOL)).or(""); return Enums.getIfPresent(PaymentProtocolRequestType.class, typeString).orNull(); } private Wallet wallet; private PaymentProtocolRequestType type; private OkHttpClient client; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_transfer_create_payment); CoreCryptoApplication.initialize(this); Intent intent = getIntent(); wallet = getWallet(intent); if (null == wallet) { finish(); return; } type = getProtocolType(intent); if (null == type) { finish(); return; } client = new OkHttpClient(); Button payView = findViewById(R.id.pay_view); EditText urlView = findViewById(R.id.url_view); payView.setText(String.format("Pay with %s", getPaymentTypeString())); payView.setOnClickListener(v -> getProtocolRequest(urlView.getText().toString())); Toolbar toolbar = findViewById(R.id.toolbar_view); setSupportActionBar(toolbar); } private String getPaymentTypeString() { switch (type) { case BIP70: return "BIP-70"; case BITPAY: return "BitPay"; default: throw new IllegalStateException("Invalid type"); } } private String getProtocolRequestMimeType() { switch (type) { case BIP70: return MIME_TYPE_PAYMENT_REQUEST_BIP70; case BITPAY: return MIME_TYPE_PAYMENT_REQUEST_BITPAY_V1; default: throw new IllegalStateException("Invalid type"); } } private String getProtocolPaymentMimeType() { switch (type) { case BIP70: return MIME_TYPE_PAYMENT_PAYMENT_BIP70; case BITPAY: return MIME_TYPE_PAYMENT_PAYMENT_BITPAY_V1; default: throw new IllegalStateException("Invalid type"); } } private String getProtocolAckMimeType() { switch (type) { case BIP70: return MIME_TYPE_PAYMENT_ACK_BIP70; case BITPAY: return MIME_TYPE_PAYMENT_ACK_BITPAY_V1; default: throw new IllegalStateException("Invalid type"); } } // // Protocol Request // private void getProtocolRequest(String url) { String expectedMimeType = getProtocolRequestMimeType(); client .newCall( new Request.Builder() .url(url) .header("Accept", expectedMimeType) .get() .build() ).enqueue(new Callback() { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { if (!response.isSuccessful()) { showError("Failed with bad protocol request response code"); return; } String mimeType = response.header("Content-Type"); if (null == mimeType) { showError("Failed with missing protocol request content type"); return; } try (ResponseBody body = response.body()) { if (null == body || !mimeType.startsWith(expectedMimeType)) { showError("Failed with unexpected protocol request content type"); } else if (mimeType.startsWith(MIME_TYPE_PAYMENT_REQUEST_BIP70)) { handleProtocolRequestResponseForBip70(body.bytes()); } else if (mimeType.startsWith(MIME_TYPE_PAYMENT_REQUEST_BITPAY_V1)) { handleProtocolRequestResponseForBitPay(body.string()); } else { showError("Failed with unsupported protocol request content type"); } } } @Override public void onFailure(@NotNull Call call, @NotNull IOException e) { showError("Failed with protocol request exception"); } }); } private void handleProtocolRequestResponseForBip70(byte[] response) { Optional<PaymentProtocolRequest> maybeRequest = PaymentProtocolRequest.createForBip70(wallet, response); if (!maybeRequest.isPresent()) { showError("Failed to parse BIP-70 request"); return; } PaymentProtocolRequest request = maybeRequest.get(); logProtocolRequest(request); estimatePaymentFee(request); } private void handleProtocolRequestResponseForBitPay(String response) { Optional<PaymentProtocolRequest> maybeRequest = PaymentProtocolRequest.createForBitPay(wallet, response); if (!maybeRequest.isPresent()) { showError("Failed to parse BitPay request"); return; } PaymentProtocolRequest request = maybeRequest.get(); logProtocolRequest(request); estimatePaymentFee(request); } // // Fee Estimation // private void estimatePaymentFee(PaymentProtocolRequest request) { NetworkFee requiredFee = request.getRequiredNetworkFee().orNull(); NetworkFee defaultFee = wallet.getWalletManager().getDefaultNetworkFee(); NetworkFee transferFee = requiredFee == null ? defaultFee : (requiredFee.getConfirmationTimeInMilliseconds().compareTo(defaultFee.getConfirmationTimeInMilliseconds()) < 0 ? requiredFee : defaultFee); request.estimate(transferFee, new CompletionHandler<TransferFeeBasis, FeeEstimationError>() { @Override public void handleData(TransferFeeBasis feeBasis) { handlePaymentFeeEstimate(request, feeBasis); } @Override public void handleError(FeeEstimationError error) { showError("Failed to estimate transfer"); } }); } private void handlePaymentFeeEstimate(PaymentProtocolRequest request, TransferFeeBasis feeBasis) { logFeeEstimate(feeBasis); Optional<? extends Address> maybeAddress = request.getPrimaryTarget(); Optional<? extends Amount> maybeAmount = request.getTotalAmount(); if (!maybeAddress.isPresent()) { showError("Failed with missing address"); } else if (!maybeAmount.isPresent()) { showError("Failed with missing amount"); } else { Optional<PaymentProtocolError> maybeError = request.validate(); Optional<String> maybeCommonName = request.getCommonName(); Optional<String> maybeMemo = request.getMemo(); boolean isSecure = request.isSecure(); StringBuilder builder = new StringBuilder(); builder.append( String.format("<b>Secure</b>: %s", isSecure) ); if (maybeError.isPresent()) { builder.append( String.format("<br><b>Error</b>: %s", maybeError.get()) ); } if (maybeCommonName.isPresent()) { builder.append( String.format("<br><b>To:</b> %s (%s)", Html.escapeHtml(maybeCommonName.get()), Html.escapeHtml(maybeAddress.get().toString())) ); } else { builder.append( String.format("<br><b>Address:</b> %s", Html.escapeHtml(maybeAddress.get().toString())) ); } builder.append( String.format("<br><b>Amount:</b> %s", Html.escapeHtml(maybeAmount.get().toString())) ); builder.append( String.format("<br><b>Fee:</b> %s", Html.escapeHtml(feeBasis.getFee().toString())) ); if (maybeMemo.isPresent()) { builder.append( String.format("<br><b>Memo:</b> %s", Html.escapeHtml(maybeMemo.get())) ); } runOnUiThread(() -> new AlertDialog.Builder(this) .setTitle("Payment Details") .setMessage(Html.fromHtml(builder.toString())) .setNegativeButton("Cancel", (dialog, which) -> {}) .setPositiveButton("Continue", (dialog, which) -> { continuePayment(request, feeBasis); }) .show()); } } // // Protocol Payment // private void continuePayment(PaymentProtocolRequest request, TransferFeeBasis feeBasis) { Optional<? extends Transfer> maybeTransfer = request.createTransfer(feeBasis); if (!maybeTransfer.isPresent()) { showError("Failed to create transfer"); return; } Transfer transfer = maybeTransfer.get(); if (!request.signTransfer(transfer, CoreCryptoApplication.getPaperKey())) { showError("Failed to sign transfer"); return; } request.submitTransfer(transfer); Optional<? extends PaymentProtocolPayment> maybePayment = request.createPayment(transfer); if (!maybePayment.isPresent()) { showError("Failed to create payment"); return; } PaymentProtocolPayment payment = maybePayment.get(); Optional<byte[]> maybeEncoded = payment.encode(); if (!maybeEncoded.isPresent()) { showError("Failed to encode payment"); return; } byte[] encoded = maybeEncoded.get(); postProtocolPayment(request, encoded); } private void postProtocolPayment(PaymentProtocolRequest request, byte[] encoded) { Optional<String> maybePaymentUrl = request.getPaymentUrl(); if (!maybePaymentUrl.isPresent()) { return; } String expectedMimeType = getProtocolAckMimeType(); client .newCall( new Request.Builder() .url(maybePaymentUrl.get()) .header("Content-Type", getProtocolPaymentMimeType()) .header("Accept", expectedMimeType) .post(RequestBody.create(encoded)) .build() ).enqueue(new Callback() { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { if (!response.isSuccessful()) { showError("Failed with bad protocol payment response code"); return; } String mimeType = response.header("Content-Type"); if (null == mimeType) { showError("Failed with missing protocol payment content type"); return; } try (ResponseBody body = response.body()) { if (!mimeType.startsWith(expectedMimeType)) { showError("Failed with unexpected protocol payment content type"); } else if (mimeType.startsWith(MIME_TYPE_PAYMENT_ACK_BIP70)) { handleProtocolPaymentResponseForBip70(body.bytes()); } else if (mimeType.startsWith(MIME_TYPE_PAYMENT_ACK_BITPAY_V1)) { handleProtocolPaymentResponseForBitPay(body.string()); } else { showError("Failed with unsupported protocol payment content type"); } } } @Override public void onFailure(@NotNull Call call, @NotNull IOException e) { showError("Failed with protocol payment exception"); } }); } private void handleProtocolPaymentResponseForBip70(byte[] response) { Optional<PaymentProtocolPaymentAck> maybeAck = PaymentProtocolPaymentAck.createForBip70(response); if (!maybeAck.isPresent()) { showError("Failed to parse BIP-70 ack"); return; } PaymentProtocolPaymentAck ack = maybeAck.get(); logProtocolAck(ack); handleProtocolPaymentResponse(ack); } private void handleProtocolPaymentResponseForBitPay(String response) { Optional<PaymentProtocolPaymentAck> maybeAck = PaymentProtocolPaymentAck.createForBitPay(response); if (!maybeAck.isPresent()) { showError("Failed to parse BitPay ack"); return; } PaymentProtocolPaymentAck ack = maybeAck.get(); logProtocolAck(ack); handleProtocolPaymentResponse(ack); } private void handleProtocolPaymentResponse(PaymentProtocolPaymentAck ack) { Optional<String> maybeMemo = ack.getMemo(); StringBuilder builder = new StringBuilder("<b>Transaction:</b> Submitted"); if (maybeMemo.isPresent()) { builder.append( String.format("<br><b>Memo:</b> %s", Html.escapeHtml(maybeMemo.get())) ); } runOnUiThread(() -> new AlertDialog.Builder(this) .setTitle("Payment Received") .setMessage(Html.fromHtml(builder.toString())) .setCancelable(false) .setNeutralButton("Ok", (dialog, which) -> finish()) .show()); } // // Misc. // private void logProtocolRequest(PaymentProtocolRequest request) { String commonName = request.getCommonName().orNull(); String memo = request.getMemo().orNull(); String paymentUrl = request.getPaymentUrl().orNull(); Address address = request.getPrimaryTarget().orNull(); NetworkFee networkFee = request.getRequiredNetworkFee().orNull(); Amount amount = request.getTotalAmount().orNull(); boolean isSecure = request.isSecure(); PaymentProtocolError error = request.validate().orNull(); Log.log(Level.FINE, "Secure: " + isSecure); Log.log(Level.FINE, "Common Name: " + commonName); Log.log(Level.FINE, "Memo: " + memo); Log.log(Level.FINE, "Payment URL: " + paymentUrl); Log.log(Level.FINE, "Fee Required: " + (networkFee != null)); Log.log(Level.FINE, "Address: " + address); Log.log(Level.FINE, "Amount: " + amount); Log.log(Level.FINE, "Error: " + error); } private void logProtocolAck(PaymentProtocolPaymentAck ack) { String memo = ack.getMemo().orNull(); Log.log(Level.FINE, "Memo (ACK): " + memo); } private void logFeeEstimate(TransferFeeBasis feeBasis) { Log.log(Level.FINE, "Fee: " + feeBasis.getFee().toString()); } private void showError(String message) { runOnUiThread(() -> new AlertDialog.Builder(this) .setTitle("Error") .setMessage(message) .setCancelable(false) .setNeutralButton("Ok", (dialog, which) -> { }) .show()); } }
[ "michael.carrara@breadwallet.com" ]
michael.carrara@breadwallet.com
604617b85af6640135f6414ed50b8d4140d3ac14
3c030bb74c4ff7630ded11baa35082f0ae7599d2
/common_base/src/main/java/com/synjones/huixinexiao/common_base/utils/cache/CacheManager.java
19561684e24e116a18571b23be0b2c62469e6502
[]
no_license
haijdong/HuiXinEXiao
11abc0695b6b19dbee12f468a601b65ee2268e89
b3380cd17d8babbdc0818c7ebaff72122b2aee8c
refs/heads/master
2020-04-28T15:40:19.504722
2019-04-12T09:10:03
2019-04-12T09:10:03
161,611,538
0
0
null
null
null
null
UTF-8
Java
false
false
3,537
java
package com.synjones.huixinexiao.common_base.utils.cache; import android.content.Context; import android.graphics.Bitmap; import android.text.TextUtils; import com.orhanobut.logger.Logger; import java.io.Serializable; /** * author : donghaijun * data : 2019/3/9 * version : 1.0 * des : 存储信息工具类 */ public class CacheManager { public static final String TAG="CacheManager"; private static ACache mACache = null; public static void init(Context context) { mACache = ACache.get(context); } public static ACache getInStance() { return mACache; } /** * 存重要信息 * @param key * @param value * @param saveTime */ public static void putString(String key, String value, int saveTime) { if (TextUtils.isEmpty(key)) { Logger.e(TAG, "key is null"); return; } if (TextUtils.isEmpty(value)){ Logger.e(TAG, "value is null"); return; } mACache.put(key, value, saveTime); } /** * 存重要信息 * @param key * @param value */ public static void putString(String key, String value) { if (TextUtils.isEmpty(key)) { Logger.e(TAG, "key is null"); return; } if (TextUtils.isEmpty(value)){ Logger.e(TAG, "value is null"); return; } mACache.put(key, value); } /** * 取重要信息 * @param key * @return */ public static String getString(String key) { if (TextUtils.isEmpty(key)) { return ""; } String value = mACache.getAsString(key); if (TextUtils.isEmpty(value)){ return ""; } return value; } /** * 存序列化对象 * @param key * @param value * @param saveTime */ public static void putObject(String key, Serializable value, int saveTime) { if (TextUtils.isEmpty(key)) { Logger.e(TAG, "key is null"); return; } mACache.put(key, value, saveTime); } public static void putObject(String key, Serializable value) { if (TextUtils.isEmpty(key)) { Logger.e(TAG, "key is null"); return; } mACache.put(key, value); } /** * 取序列化对象 * @param key * @return */ public static Object getObject(String key) { if (TextUtils.isEmpty(key)) { Logger.e(TAG, "key is null"); return null; } return mACache.getAsObject(key); } /** * 存bitmap * @param key * @param value */ public static void putBitmap(String key, Bitmap value) { if (TextUtils.isEmpty(key)) { Logger.e(TAG, "key is null"); return; } mACache.put(key, value); } /** * 取bitmap * @param key * @return */ public static Bitmap getBitmap(String key) { if (TextUtils.isEmpty(key)) { Logger.e(TAG, "key is null"); return null; } return mACache.getAsBitmap(key); } /** * 移除缓存 * @param key */ public static void remove(String key) { if (TextUtils.isEmpty(key)) { Logger.e(TAG, "key is null"); return; } mACache.remove(key); } public static void clear() { mACache.clear(); } }
[ "dhj_33922@163.com" ]
dhj_33922@163.com
b44da0253cc55336dc56fa2ba3609fc278d4c2f8
935a346505658c20753bc12b1c61126c3550e163
/src/DaoImpl/CateImpl.java
7f445cea652999ddc2bc3dc55ac89bb67ee87e97
[]
no_license
ydyDeail/initBaseDao-PageBean
2bca7bfc964782e2ff67c000d0f33b2bef69e4da
608895a2c2286de7e763f76dce2fb3b36066adce
refs/heads/master
2020-03-29T04:32:57.739121
2018-09-20T02:07:57
2018-09-20T02:07:57
149,536,341
0
0
null
null
null
null
UTF-8
Java
false
false
2,083
java
package DaoImpl; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import entity.Category; import Dao.BaseDao; import Dao.Cate; public class CateImpl extends BaseDao implements Cate{ public int findAll() { // TODO Auto-generated method stub Connection con=null; PreparedStatement ps=null; ResultSet rs=null; int result=0; int count=0; try { con=this.getConnection(); ps=con.prepareStatement("SELECT COUNT(id) as c FROM news_category"); rs=ps.executeQuery(); if(rs.next()){ count=rs.getInt("c"); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return count; } public List<Category> findAllType(int pageNo, int pageSize) { // TODO Auto-generated method stub Connection con=null; PreparedStatement ps=null; ResultSet rs=null; List<Category> li=new ArrayList<Category>(); try { con=this.getConnection(); ps=con.prepareStatement("SELECT * FROM news_category limit ?,?"); ps.setInt(1, (pageNo-1)*pageSize); ps.setInt(2, pageSize); rs=ps.executeQuery(); while(rs.next()){ Category c=new Category(rs.getInt(1), rs.getString(2), rs.getTimestamp(3),rs.getString(4)); li.add(c); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally{ this.Close(con, rs, ps); } return li; } public int AddFindById(Category cg) { // TODO Auto-generated method stub Connection con=null; PreparedStatement ps=null; int result=0; Category c=null; try { con=this.getConnection(); ps=con.prepareStatement("INSERT INTO `news_category`(`name`,`createDate`,`pic`) VALUES (?,?,?)"); ps.setString(1, cg.getName()); ps.setTimestamp(2, cg.getCreateDate()); ps.setString(3, cg.getPic()); result=ps.executeUpdate(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally{ this.Close(con, null, ps); } return result; } }
[ "1741806942@qq.com" ]
1741806942@qq.com
e1abd5c7142e89848cccf013d89dd20eadd8e2c0
705c8229db46162f1809fee66e6014a36d3ca1c4
/src/main/java/com/hawksoft/platform/entity/Video.java
a6cfda3eba8e27ce0f24eb3c8865d0e930b352d2
[]
no_license
RoastEgg/intelligence_water
df4ff03d0baf37285e6651ee5a916c5c2b73e80f
6d663c97a9b72d4374b80e62a18d3f478f311df6
refs/heads/master
2021-04-12T08:32:45.099921
2019-03-12T06:29:07
2019-03-12T06:29:07
126,186,888
0
0
null
null
null
null
UTF-8
Java
false
false
702
java
package com.hawksoft.platform.entity; public class Video { private int id;//主键,自增 private int sthId;//站点ID private String type;//视频类型 private String url;//视频URL public int getId() { return id; } public void setId(int id) { this.id = id; } public int getSthId() { return sthId; } public void setSthId(int sthId) { this.sthId = sthId; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } }
[ "hzluhailong@163.com" ]
hzluhailong@163.com
907e1416733f8acd90c9efe79c4990ab33d645c2
4d13cd5de698fbc5c0ff5b5ce25f0783a9ef75c6
/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java
6c17acf124d81bbbee9c0cd77dc623c7e1315eef
[]
no_license
andyspb/java-test
359b3701540b59333325194c6fa4b6eae92d1e24
8249ced66a8592bcbca541b78300594e2f9b7176
refs/heads/master
2022-11-27T03:03:35.736337
2021-04-07T18:07:44
2021-04-07T18:07:44
39,451,885
0
0
null
2022-11-24T03:25:38
2015-07-21T14:55:46
Java
UTF-8
Java
false
false
12,527
java
/* * Copyright 2012-2020 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 * * https://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.data.jpa.repository.config; import static org.springframework.data.jpa.repository.config.BeanDefinitionNames.*; import lombok.experimental.UtilityClass; import java.lang.annotation.Annotation; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.LinkedHashSet; import java.util.Locale; import java.util.Optional; import java.util.Set; import javax.persistence.Entity; import javax.persistence.MappedSuperclass; import javax.persistence.PersistenceContext; import javax.persistence.PersistenceUnit; import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.annotation.AnnotationConfigUtils; import org.springframework.core.annotation.AnnotationAttributes; import org.springframework.core.io.ResourceLoader; import org.springframework.dao.DataAccessException; import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.support.DefaultJpaContext; import org.springframework.data.jpa.repository.support.EntityManagerBeanDefinitionRegistrarPostProcessor; import org.springframework.data.jpa.repository.support.JpaEvaluationContextExtension; import org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean; import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; import org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport; import org.springframework.data.repository.config.RepositoryConfigurationSource; import org.springframework.data.repository.config.XmlRepositoryConfigurationSource; import org.springframework.lang.Nullable; import org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor; import org.springframework.util.ClassUtils; import org.springframework.util.StringUtils; /** * JPA specific configuration extension parsing custom attributes from the XML namespace and * {@link EnableJpaRepositories} annotation. Also, it registers bean definitions for a * {@link PersistenceAnnotationBeanPostProcessor} (to trigger injection into {@link PersistenceContext}/ * {@link PersistenceUnit} annotated properties and methods) as well as * {@link PersistenceExceptionTranslationPostProcessor} to enable exception translation of persistence specific * exceptions into Spring's {@link DataAccessException} hierarchy. * * @author Oliver Gierke * @author Eberhard Wolff * @author Gil Markham * @author Thomas Darimont * @author Christoph Strobl * @author Mark Paluch */ public class JpaRepositoryConfigExtension extends RepositoryConfigurationExtensionSupport { private static final Class<?> PAB_POST_PROCESSOR = PersistenceAnnotationBeanPostProcessor.class; private static final String DEFAULT_TRANSACTION_MANAGER_BEAN_NAME = "transactionManager"; private static final String ENABLE_DEFAULT_TRANSACTIONS_ATTRIBUTE = "enableDefaultTransactions"; private static final String JPA_METAMODEL_CACHE_CLEANUP_CLASSNAME = "org.springframework.data.jpa.util.JpaMetamodelCacheCleanup"; private static final String ESCAPE_CHARACTER_PROPERTY = "escapeCharacter"; /* * (non-Javadoc) * @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#getModuleName() */ @Override public String getModuleName() { return "JPA"; } /* * (non-Javadoc) * @see org.springframework.data.repository.config.RepositoryConfigurationExtension#getRepositoryFactoryBeanClassName() */ @Override public String getRepositoryFactoryBeanClassName() { return JpaRepositoryFactoryBean.class.getName(); } /* * (non-Javadoc) * @see org.springframework.data.repository.config14.RepositoryConfigurationExtensionSupport#getModulePrefix() */ @Override protected String getModulePrefix() { return getModuleName().toLowerCase(Locale.US); } /* * (non-Javadoc) * @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#getIdentifyingAnnotations() */ @Override protected Collection<Class<? extends Annotation>> getIdentifyingAnnotations() { return Arrays.asList(Entity.class, MappedSuperclass.class); } /* * (non-Javadoc) * @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#getIdentifyingTypes() */ @Override protected Collection<Class<?>> getIdentifyingTypes() { return Collections.<Class<?>> singleton(JpaRepository.class); } /* * (non-Javadoc) * @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder, org.springframework.data.repository.config.RepositoryConfigurationSource) */ @Override public void postProcess(BeanDefinitionBuilder builder, RepositoryConfigurationSource source) { Optional<String> transactionManagerRef = source.getAttribute("transactionManagerRef"); builder.addPropertyValue("transactionManager", transactionManagerRef.orElse(DEFAULT_TRANSACTION_MANAGER_BEAN_NAME)); builder.addPropertyValue("entityManager", getEntityManagerBeanDefinitionFor(source, source.getSource())); builder.addPropertyValue(ESCAPE_CHARACTER_PROPERTY, getEscapeCharacter(source).orElse('\\')); builder.addPropertyReference("mappingContext", JPA_MAPPING_CONTEXT_BEAN_NAME); } /** * XML configurations do not support {@link Character} values. This method catches the exception thrown and returns an * {@link Optional#empty()} instead. */ private static Optional<Character> getEscapeCharacter(RepositoryConfigurationSource source) { try { return source.getAttribute(ESCAPE_CHARACTER_PROPERTY, Character.class); } catch (IllegalArgumentException ___) { return Optional.empty(); } } /* * (non-Javadoc) * @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder, org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource) */ @Override public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) { AnnotationAttributes attributes = config.getAttributes(); builder.addPropertyValue(ENABLE_DEFAULT_TRANSACTIONS_ATTRIBUTE, attributes.getBoolean(ENABLE_DEFAULT_TRANSACTIONS_ATTRIBUTE)); } /* * (non-Javadoc) * @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder, org.springframework.data.repository.config.XmlRepositoryConfigurationSource) */ @Override public void postProcess(BeanDefinitionBuilder builder, XmlRepositoryConfigurationSource config) { Optional<String> enableDefaultTransactions = config.getAttribute(ENABLE_DEFAULT_TRANSACTIONS_ATTRIBUTE); if (enableDefaultTransactions.isPresent() && StringUtils.hasText(enableDefaultTransactions.get())) { builder.addPropertyValue(ENABLE_DEFAULT_TRANSACTIONS_ATTRIBUTE, enableDefaultTransactions.get()); } } /* * (non-Javadoc) * @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#registerBeansForRoot(org.springframework.beans.factory.support.BeanDefinitionRegistry, org.springframework.data.repository.config.RepositoryConfigurationSource) */ @Override public void registerBeansForRoot(BeanDefinitionRegistry registry, RepositoryConfigurationSource config) { super.registerBeansForRoot(registry, config); Object source = config.getSource(); registerLazyIfNotAlreadyRegistered( () -> new RootBeanDefinition(EntityManagerBeanDefinitionRegistrarPostProcessor.class), registry, EM_BEAN_DEFINITION_REGISTRAR_POST_PROCESSOR_BEAN_NAME, source); registerLazyIfNotAlreadyRegistered(() -> new RootBeanDefinition(JpaMetamodelMappingContextFactoryBean.class), registry, JPA_MAPPING_CONTEXT_BEAN_NAME, source); registerLazyIfNotAlreadyRegistered(() -> new RootBeanDefinition(PAB_POST_PROCESSOR), registry, AnnotationConfigUtils.PERSISTENCE_ANNOTATION_PROCESSOR_BEAN_NAME, source); // Register bean definition for DefaultJpaContext registerLazyIfNotAlreadyRegistered(() -> { RootBeanDefinition contextDefinition = new RootBeanDefinition(DefaultJpaContext.class); contextDefinition.setAutowireMode(AbstractBeanDefinition.AUTOWIRE_CONSTRUCTOR); return contextDefinition; }, registry, JPA_CONTEXT_BEAN_NAME, source); registerIfNotAlreadyRegistered(() -> new RootBeanDefinition(JPA_METAMODEL_CACHE_CLEANUP_CLASSNAME), registry, JPA_METAMODEL_CACHE_CLEANUP_CLASSNAME, source); // EvaluationContextExtension for JPA specific SpEL functions registerIfNotAlreadyRegistered(() -> { Object value = AnnotationRepositoryConfigurationSource.class.isInstance(config) // ? config.getRequiredAttribute(ESCAPE_CHARACTER_PROPERTY, Character.class) // : config.getAttribute(ESCAPE_CHARACTER_PROPERTY).orElse("\\"); BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(JpaEvaluationContextExtension.class); builder.addConstructorArgValue(value); return builder.getBeanDefinition(); }, registry, JpaEvaluationContextExtension.class.getName(), source); } /* * (non-Javadoc) * @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#getConfigurationInspectionClassLoader(org.springframework.core.io.ResourceLoader) */ @Override protected ClassLoader getConfigurationInspectionClassLoader(ResourceLoader loader) { ClassLoader classLoader = loader.getClassLoader(); return classLoader != null && LazyJvmAgent.isActive(loader.getClassLoader()) ? new InspectionClassLoader(loader.getClassLoader()) : loader.getClassLoader(); } /** * Creates an anonymous factory to extract the actual {@link javax.persistence.EntityManager} from the * {@link javax.persistence.EntityManagerFactory} bean name reference. * * @param config * @param source * @return */ private static AbstractBeanDefinition getEntityManagerBeanDefinitionFor(RepositoryConfigurationSource config, @Nullable Object source) { BeanDefinitionBuilder builder = BeanDefinitionBuilder .rootBeanDefinition("org.springframework.orm.jpa.SharedEntityManagerCreator"); builder.setFactoryMethod("createSharedEntityManager"); builder.addConstructorArgReference(getEntityManagerBeanRef(config)); AbstractBeanDefinition bean = builder.getRawBeanDefinition(); bean.setSource(source); return bean; } private static String getEntityManagerBeanRef(RepositoryConfigurationSource config) { Optional<String> entityManagerFactoryRef = config.getAttribute("entityManagerFactoryRef"); return entityManagerFactoryRef.orElse("entityManagerFactory"); } /** * Utility to determine if a lazy Java agent is being used that might transform classes at a later time. * * @author Mark Paluch * @since 2.1 */ @UtilityClass static class LazyJvmAgent { private static final Set<String> AGENT_CLASSES; static { Set<String> agentClasses = new LinkedHashSet<>(); agentClasses.add("org.springframework.instrument.InstrumentationSavingAgent"); agentClasses.add("org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent"); AGENT_CLASSES = Collections.unmodifiableSet(agentClasses); } /** * Determine if any agent is active. * * @return {@literal true} if an agent is active. */ static boolean isActive(@Nullable ClassLoader classLoader) { return AGENT_CLASSES.stream() // .anyMatch(agentClass -> ClassUtils.isPresent(agentClass, classLoader)); } } }
[ "andrey.krutogolov@gmail.com" ]
andrey.krutogolov@gmail.com
39ac81f9e11c10ce269e831a89b64872c72fcdad
7c88e6cd7c2604a9bfebd197a9f192bdddfbcb7c
/Java/src/main/java/DesignPattern/Factory/package-info.java
497dd38816936d7ba4545aec21999fd0c6d05bc0
[]
no_license
fcy-nienan/Image
1bca0a42085d681f73f41420a242e2c4b542f0e7
168bc4b5a50d5887693ac4ac44bbee3447e84105
refs/heads/develop
2022-12-24T04:33:53.026049
2022-07-27T16:31:10
2022-07-27T16:31:10
154,528,986
0
0
null
2022-12-16T01:43:43
2018-10-24T15:56:29
Java
UTF-8
Java
false
false
377
java
/* * 工厂模式 * 普通工厂 通过switch生成对象 * 静态工厂 通过静态方法生成对象 * 抽象工厂 通过多个类生成对象 * * 可以看出三种分别是 代码级别的分离 方法级别的分离 类级别的分离 * 最后一种是工厂的工厂 也是代码级别的分离工厂对象 * */ package DesignPattern.Factory;
[ "807715333@qq.com" ]
807715333@qq.com
1ff71433b30e0aee286cf4aac72b78d2ae60d4ba
1c819645a3cd250a0f2c97e3f9eb2bcc86d04bb5
/daikon-audit/audit-log4j1/src/main/java/org/talend/logging/audit/log4j1/Log4j1Configurer.java
d864535a1c824e9ec5bdbcd8ec76d5305468d8b2
[ "Apache-2.0" ]
permissive
jiezhang-tlnd/daikon
763eb459905f64dc42033a7fe9478ace31ed8696
51426475d32355ba3b269fc9b60281ed2fb1624d
refs/heads/master
2021-11-23T16:50:55.437617
2021-10-27T12:00:48
2021-10-27T12:00:48
218,229,363
0
0
Apache-2.0
2019-10-29T07:35:24
2019-10-29T07:35:24
null
UTF-8
Java
false
false
6,763
java
package org.talend.logging.audit.log4j1; import org.apache.log4j.Appender; import org.apache.log4j.ConsoleAppender; import org.apache.log4j.Layout; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.RollingFileAppender; import org.apache.log4j.net.SocketAppender; import org.talend.daikon.logging.event.layout.Log4jJSONLayout; import org.talend.logging.audit.AuditLoggingException; import org.talend.logging.audit.LogAppenders; import org.talend.logging.audit.impl.AuditConfiguration; import org.talend.logging.audit.impl.AuditConfigurationMap; import org.talend.logging.audit.impl.EventFields; import org.talend.logging.audit.impl.LogAppendersSet; import org.talend.logging.audit.impl.LogTarget; import org.talend.logging.audit.impl.PropagateExceptions; import java.io.IOException; import java.util.HashMap; import java.util.Map; /** * */ public final class Log4j1Configurer { private Log4j1Configurer() { } public static void configure(AuditConfigurationMap config) { final LogAppendersSet appendersSet = AuditConfiguration.LOG_APPENDER.getValue(config, LogAppendersSet.class); if (appendersSet == null || appendersSet.isEmpty()) { throw new AuditLoggingException("No audit appenders configured."); } if (appendersSet.size() > 1 && appendersSet.contains(LogAppenders.NONE)) { throw new AuditLoggingException("Invalid configuration: none appender is used with other simultaneously."); } final Logger logger = Logger.getLogger(AuditConfiguration.ROOT_LOGGER.getString(config)); logger.setAdditivity(false); for (LogAppenders appender : appendersSet) { switch (appender) { case FILE: logger.addAppender(rollingFileAppender(config)); break; case SOCKET: logger.addAppender(socketAppender(config)); break; case CONSOLE: logger.addAppender(consoleAppender(config)); break; case HTTP: logger.addAppender(httpAppender(config)); break; case NONE: logger.setLevel(Level.OFF); break; default: throw new AuditLoggingException("Unknown appender " + appender); } } } private static Appender rollingFileAppender(AuditConfigurationMap config) { final RollingFileAppender appender = new RollingFileAppender(); appender.setName("auditFileAppender"); appender.setMaxBackupIndex(AuditConfiguration.APPENDER_FILE_MAXBACKUP.getInteger(config)); appender.setMaximumFileSize(AuditConfiguration.APPENDER_FILE_MAXSIZE.getLong(config)); appender.setEncoding(AuditConfiguration.ENCODING.getString(config)); appender.setImmediateFlush(true); appender.setLayout(logstashLayout(config)); try { appender.setFile(AuditConfiguration.APPENDER_FILE_PATH.getString(config), true, false, 8 * 1024); } catch (IOException e) { throw new AuditLoggingException(e); } return appender; } private static Appender socketAppender(AuditConfigurationMap config) { final SocketAppender appender = new SocketAppender(AuditConfiguration.APPENDER_SOCKET_HOST.getString(config), AuditConfiguration.APPENDER_SOCKET_PORT.getInteger(config)); appender.setName("auditSocketAppender"); appender.setLocationInfo(AuditConfiguration.LOCATION.getBoolean(config)); return appender; } private static Appender consoleAppender(AuditConfigurationMap config) { final LogTarget target = AuditConfiguration.APPENDER_CONSOLE_TARGET.getValue(config, LogTarget.class); final ConsoleAppender appender = new ConsoleAppender(); appender.setName("auditConsoleAppender"); appender.setEncoding(AuditConfiguration.ENCODING.getString(config)); appender.setTarget(target.getTarget()); appender.setLayout(new PatternLayout(AuditConfiguration.APPENDER_CONSOLE_PATTERN.getString(config))); appender.activateOptions(); return appender; } private static Appender httpAppender(AuditConfigurationMap config) { final Log4j1HttpAppender appender = new Log4j1HttpAppender(); appender.setName("auditHttpAppender"); appender.setLayout(logstashLayout(config)); appender.setUrl(AuditConfiguration.APPENDER_HTTP_URL.getString(config)); if (!AuditConfiguration.APPENDER_HTTP_USERNAME.getString(config).trim().isEmpty()) { appender.setUsername(AuditConfiguration.APPENDER_HTTP_USERNAME.getString(config)); } if (!AuditConfiguration.APPENDER_HTTP_PASSWORD.getString(config).trim().isEmpty()) { appender.setPassword(AuditConfiguration.APPENDER_HTTP_PASSWORD.getString(config)); } appender.setAsync(AuditConfiguration.APPENDER_HTTP_ASYNC.getBoolean(config)); appender.setConnectTimeout(AuditConfiguration.APPENDER_HTTP_CONNECT_TIMEOUT.getInteger(config)); appender.setReadTimeout(AuditConfiguration.APPENDER_HTTP_READ_TIMEOUT.getInteger(config)); appender.setEncoding(AuditConfiguration.ENCODING.getString(config)); switch (AuditConfiguration.PROPAGATE_APPENDER_EXCEPTIONS.getValue(config, PropagateExceptions.class)) { case ALL: appender.setPropagateExceptions(true); break; case NONE: appender.setPropagateExceptions(false); break; default: throw new AuditLoggingException("Unknown propagate exception value: " + AuditConfiguration.PROPAGATE_APPENDER_EXCEPTIONS.getValue(config, PropagateExceptions.class)); } return appender; } private static Layout logstashLayout(AuditConfigurationMap config) { Map<String, String> metaFields = new HashMap<>(); metaFields.put(EventFields.MDC_ID, EventFields.ID); metaFields.put(EventFields.MDC_CATEGORY, EventFields.CATEGORY); metaFields.put(EventFields.MDC_AUDIT, EventFields.AUDIT); metaFields.put(EventFields.MDC_APPLICATION, EventFields.APPLICATION); metaFields.put(EventFields.MDC_SERVICE, EventFields.SERVICE); metaFields.put(EventFields.MDC_INSTANCE, EventFields.INSTANCE); Log4jJSONLayout layout = new Log4jJSONLayout(); layout.setLocationInfo(AuditConfiguration.LOCATION.getBoolean(config)); layout.setHostInfo(AuditConfiguration.HOST.getBoolean(config)); layout.setMetaFields(metaFields); return layout; } }
[ "noreply@github.com" ]
noreply@github.com
d39490c726587bbee617c705b3e3bbb30235eae8
6370f68b38de960f63e4027e31572f973179c1c7
/Backend/core java/datastructures/src/com/caps/datastruc/algorithm/AlgoAnalysis.java
fb2b3b149a09a0b0a184bfc47f4b295278170163
[]
no_license
Harshith7829/TY_CG_HTD_BangloreNovember_JFS_HarshithCR
754e57bdd29f6eaa1261d0980685b47fdb2fb641
e8607748416234743cdf46884fd642597110e8da
refs/heads/master
2023-01-14T12:06:10.961634
2020-01-18T08:37:11
2020-01-18T08:37:11
225,846,066
0
0
null
2023-01-07T13:51:35
2019-12-04T11:00:51
Java
UTF-8
Java
false
false
1,382
java
package com.caps.datastruc.algorithm; import java.time.Duration; import java.time.Instant; public class AlgoAnalysis { public static void main(String[] args) { long number =99999999L; System.out.println(addUpto(number)); System.out.println(addUptoQuick(number)); coutingDuration1(); coutingDuration2(); } public static long addUpto(Long number) { Long total=0L; for(int i=0; i<= number;i++) { total= total+i; } return total; } public static long addUptoQuick(Long number) { return number * (number+1)/2; } public static void coutingDuration1() { long number =-9665443399999L; Instant start = Instant.now(); System.out.println("addUpto "+addUpto(number)); Instant end = Instant.now(); long duration= Duration.between(start, end).toMillis(); double seconds = duration/1000.0; System.out.println("addUpto time "+seconds+ " seconds"); } public static void coutingDuration2() { long number =-99999999L; Instant start = Instant.now(); System.out.println("addUpto "+addUptoQuick(number)); Instant end = Instant.now(); long duration= Duration.between(start, end).toMillis(); double seconds = duration/1000.0; System.out.println("addUpto time "+seconds+ " seconds"); } }
[ "harshithcrrpt@gmail.com" ]
harshithcrrpt@gmail.com
2e81653e4d9c9b4e88ee8e8528484762c8aa479a
5649694fb837ecf36986cb9f2a0efca87cef911f
/src/main/java/com/sapient/football/error/RestResponseEntityExceptionHandler.java
9f2549d6bb8e3e1f2b0049bbb6b6a329f2593237
[]
no_license
bikask/football-microservice
66147c892331e5160141500a95bcd9dc263c45f2
e609a45a5fef77f5886843d9005afebfc477b9e9
refs/heads/master
2022-11-30T02:25:08.186979
2020-08-17T14:03:06
2020-08-17T14:03:06
288,193,026
0
0
null
2020-08-17T13:56:41
2020-08-17T13:51:30
null
UTF-8
Java
false
false
1,332
java
package com.sapient.football.error; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.context.request.WebRequest; import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; import com.sapient.football.exception.TeamNotFoundException; @ControllerAdvice public class RestResponseEntityExceptionHandler extends ResponseEntityExceptionHandler { public RestResponseEntityExceptionHandler() { super(); } @ExceptionHandler(value = { TeamNotFoundException.class }) protected ResponseEntity<Object> handleNotFound(final TeamNotFoundException ex, final WebRequest request) { return handleExceptionInternal(ex, ex.getMessage(), new HttpHeaders(), HttpStatus.NOT_FOUND, request); } @ExceptionHandler(value = { Exception.class }) protected ResponseEntity<Object> handleAllException(final RuntimeException ex, final WebRequest request) { final String bodyOfResponse = "internalserver error"; return handleExceptionInternal(ex, bodyOfResponse, new HttpHeaders(), HttpStatus.INTERNAL_SERVER_ERROR, request); } }
[ "bikask" ]
bikask
c1811fc76a5526400a9c717862501ebf52ce12f6
ada0f1f1d41fe83d214ddecf77cdd483e39498e8
/src/main/java/com/eshipz/qa/utils/getNameOfWebElement.java
fa605b3a096302366cab76b8fa6ffacbda5d9b0a
[]
no_license
Ashzak009/Ashzak009
49d332015e3cd238672dcef9cab709114a0a4acc
554df622e1cafcd215817617056206484e1bae04
refs/heads/master
2023-06-22T11:32:01.600896
2021-06-28T09:01:03
2021-06-28T09:01:03
389,000,116
0
0
null
null
null
null
UTF-8
Java
false
false
158
java
package com.eshipz.qa.utils; import org.openqa.selenium.WebElement; public class getNameOfWebElement { public void getName(WebElement element) { } }
[ "krupa.ecourierz@gmail.com" ]
krupa.ecourierz@gmail.com
56effb5531a39795af9891d5bf38bfc33d4c2b13
d93d4f20b7233ed9e1e73f4667715c04504bd6ee
/Tele/app/src/main/java/com/example/dell/tele/util/ContactAdapter.java
8c9807d88f4f67a6cf8893d13bfa7cbcc8708660
[ "MIT" ]
permissive
woshicainiaoma/Telegram
9870ef1c4acd66183f76110c4f36a971cf12a2e8
f961556a937e089cb9f3951cbb6dcfb563625dd2
refs/heads/master
2021-01-19T06:36:03.978865
2016-06-24T09:31:06
2016-06-24T09:31:06
60,770,728
0
0
null
null
null
null
UTF-8
Java
false
false
1,919
java
package com.example.dell.tele.util; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import com.example.dell.tele.R; import com.example.dell.tele.model.ContractBean; import java.util.List; /** * Created by dell on 2016/6/7. */ public class ContactAdapter extends BaseAdapter { private Context context; private List<ContractBean> contacts; public ContactAdapter(Context context, List<ContractBean> contacts) { this.context = context; this.contacts = contacts; } @Override public int getCount() { return contacts.size(); } @Override public Object getItem(int position) { return contacts.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { final ContractBean mContent = contacts.get(position); ViewHolder holder; if (convertView == null) { holder = new ViewHolder(); convertView = View.inflate(context, R.layout.item_layout, null); //holder.tvLetter = (TextView) convertView.findViewById(R.id.catalog); holder.txl_name = (TextView) convertView.findViewById(R.id.txl_name); holder.txl_phone = (TextView) convertView.findViewById(R.id.txl_phone); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } ContractBean contact = (ContractBean) getItem(position); holder.txl_name.setText(contact.getName()); holder.txl_phone.setText(contact.getPhone()); return convertView; } static class ViewHolder { TextView txl_name; TextView txl_phone; // TextView tvLetter; } }
[ "ch_software00@163.com" ]
ch_software00@163.com
e5d10ddb1f23a9b398a54014b7d6825d74c8e35e
de4cb7b3f95f2a602cf64354a9464f19ee2c26c5
/app/src/main/java/com/example/admin/formviewmy/CustomImageView.java
51856ac3fa02bbddbfa246a79f71563a5cb2cee3
[]
no_license
RenXiaoTian1991/SqlFormView
7a349f00becc1c8873b2874e6c85368df4fbd2d1
130695d8b7f63e6a95635715758b1214d7654f7f
refs/heads/master
2021-01-19T06:52:42.304517
2016-09-20T05:14:25
2016-09-20T05:14:25
68,676,372
0
0
null
null
null
null
UTF-8
Java
false
false
3,754
java
package com.example.admin.formviewmy; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Paint.Style; import android.graphics.Rect; import android.text.TextPaint; import android.text.TextUtils; import android.util.AttributeSet; import android.util.Log; import android.widget.TextView; public class CustomImageView extends TextView { /** * �ؼ��Ŀ� */ private int mWidth; /** * �ؼ��ĸ� */ private int mHeight; /** * ͼƬ�Ľ��� */ private String mTitle; /** * �������ɫ */ private int mTextColor; /** * ����Ĵ�С */ private int mTextSize = 14; private Paint mPaint; /** * ���ı���Լ�� */ private Rect mTextBound; /** * �������岼�� */ private Rect rect; public CustomImageView(Context context, AttributeSet attrs) { this(context, attrs, 0); } public CustomImageView(Context context) { this(context, null); } /** * ��ʼ���������Զ������� * * @param context * @param attrs * @param defStyle */ public CustomImageView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); rect = new Rect(); mPaint = new Paint(); mTextBound = new Rect(); mPaint.setTextSize(mTextSize); mPaint.getTextBounds(getText().toString(), 0, getText().toString().length(), mTextBound); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { // super.onMeasure(widthMeasureSpec, heightMeasureSpec); /** * ���ÿ�� */ int specMode = MeasureSpec.getMode(widthMeasureSpec); int specSize = MeasureSpec.getSize(widthMeasureSpec); if (specMode == MeasureSpec.EXACTLY)// match_parent , accurate { mWidth = specSize; } else { int desireByTitle = getPaddingLeft() + getPaddingRight() + mTextBound.width(); if (specMode == MeasureSpec.AT_MOST)// wrap_content { mWidth = Math.min(desireByTitle, specSize); } } /*** * ���ø߶� */ specMode = MeasureSpec.getMode(heightMeasureSpec); specSize = MeasureSpec.getSize(heightMeasureSpec); if (specMode == MeasureSpec.EXACTLY)// match_parent , accurate { mHeight = specSize; } else { int desire = getPaddingTop() + getPaddingBottom() + mTextBound.height(); if (specMode == MeasureSpec.AT_MOST)// wrap_content { mHeight = Math.min(desire, specSize); } } setMeasuredDimension(mWidth, mHeight); } @Override protected void onDraw(Canvas canvas) { // super.onDraw(canvas); /** * �߿� */ mPaint.setStrokeWidth(4); mPaint.setStyle(Style.STROKE); mPaint.setColor(Color.CYAN); canvas.drawRect(0, 0, getMeasuredWidth(), getMeasuredHeight(), mPaint); rect.left = getPaddingLeft(); rect.right = mWidth - getPaddingRight(); rect.top = getPaddingTop(); rect.bottom = mHeight - getPaddingBottom(); mPaint.setColor(mTextColor); mPaint.setStyle(Style.FILL); /** * ��ǰ���õĿ��С��������Ҫ�Ŀ�ȣ��������Ϊxxx... */ if (mTextBound.width() > mWidth) { TextPaint paint = new TextPaint(mPaint); String msg = TextUtils.ellipsize(mTitle, paint, (float) mWidth - getPaddingLeft() - getPaddingRight(), TextUtils.TruncateAt.END).toString(); canvas.drawText(msg, getPaddingLeft(), mHeight - getPaddingBottom(), mPaint); } else { //������������������ canvas.drawText(mTitle, mWidth / 2 - mTextBound.width() * 1.0f / 2, mHeight - getPaddingBottom(), mPaint); } //ȡ��ʹ�õ��Ŀ� rect.bottom -= mTextBound.height(); } }
[ "rentianqiang@appnav.cn" ]
rentianqiang@appnav.cn
910dcf7e2404a4cf2c5fe70a61e5bd4c744f3139
0d59fad04def96e1bdc7895884ec1d615130ae6d
/linkedlists/DelMidNode.java
eba5c7e9606e4cf80aeb9febeb1d1cf932d08c04
[]
no_license
yorhodes/ctci
fdab48e51db2d0fca6f89e897bd1380d0d8208b8
9046d7f4444f781ea9ee9687b08f567baf214788
refs/heads/master
2020-03-26T07:32:15.170084
2018-08-16T18:08:19
2018-08-16T18:08:19
144,659,165
0
0
null
null
null
null
UTF-8
Java
false
false
831
java
package linkedlists; public class DelMidNode { public static void main(String[] args) { LinkedListNode<Character> head = new LinkedListNode<Character>('A') .appendData('B') .appendData('C') .appendData('D') .appendData('E') .appendData('F') .appendData('G'); System.out.println(head); System.out.println("delmidnode(C)..."); delmidnode(head.next.next); System.out.println(head); } private static void delmidnode(LinkedListNode<Character> mid) { if (mid != null && mid.next != null) { mid.data = mid.next.data; mid.next = mid.next.next; } else { System.err.println("Provided node may not be the last node"); } } }
[ "yorkerhodesiv@gmail.com" ]
yorkerhodesiv@gmail.com
e5c0ca2fa155fce0f130d117e3aec68f5c04fbe4
d136f7e4ebc2cd731213d391f58a03b5a781274b
/training/java/CaesarCipher.java
7b38d4bc3c64eb032bf476975c2a055cc1a7c74e
[]
no_license
guilhermesam/they-will-remember
5d63dd573a4057d3d67f4b31f8ffe540040378a8
4cd2d11883c1a0cd0fed703f78af0be8e89ac295
refs/heads/master
2022-12-29T03:18:10.349746
2020-10-13T22:56:26
2020-10-13T22:56:26
267,478,729
2
0
null
null
null
null
UTF-8
Java
false
false
3,285
java
import java.util.Scanner; public class CaesarCipher { /* * Julius Caesar used a system of cryptography, now known as Caesar Cipher, * which shifted each letter 2 places further through the alphabet (e.g. 'A' * shifts to 'C', 'R' shifts to 'T', etc.). At the end of the alphabet we wrap * around, that is 'Y' shifts to 'A'. We can, of course, try shifting by any * number. */ private String switchAlphabetRoot(int times) { String alphabetRoot = "abcdefghijklmnopqrstuvwxyz"; String pt1 = alphabetRoot.substring(times, alphabetRoot.length()); String pt2 = alphabetRoot.substring(0, times); String alphabetTarget = pt1.concat(pt2); return alphabetTarget; } public String encrypt(String message, int times) { char messageEncryptedVector[] = new char[message.length()]; String alphabetRoot = "abcdefghijklmnopqrstuvwxyz"; String messageEncrypted; for (int i = 0; i < message.length(); i++) { int index = alphabetRoot.indexOf(message.charAt(i)); messageEncryptedVector[i] = switchAlphabetRoot(times).charAt(index); } messageEncrypted = new String(messageEncryptedVector); return messageEncrypted; } public String decrypt(String message, int times) { char messageEncryptedVector[] = new char[message.length()]; String alphabetRoot = switchAlphabetRoot(times); String alphabet = "abcdefghijklmnopqrstuvwxyz"; String messageEncrypted; for (int i = 0; i < message.length(); i++) { int index = alphabetRoot.indexOf(message.charAt(i)); messageEncryptedVector[i] = alphabet.charAt(index); } messageEncrypted = new String(messageEncryptedVector); return messageEncrypted; } public void main() { Scanner input = new Scanner(System.in); String message; int times; char option, proceed; do { System.out.println("Caesar Cypher 1.0.0"); do { System.out.println("How many shifties?"); times = input.nextInt(); } while (times > 26 || times < 0); System.out.println("Do you want to encrypt or decrypt?"); System.out.println("D - Decrypt"); System.out.println("E - Encrypt"); option = input.next().toUpperCase().charAt(0); if (option == 'E') { System.out.println("Type a message without spaces: "); message = input.next(); System.out.println("The message encrypted is: " + encrypt(message, times)); } else if (option == 'D') { System.out.println("Type a message without spaces: "); message = input.next(); System.out.println("The message decrypted is: " + decrypt(message, times)); } else { System.err.println("Incorrect operation!"); } System.out.println("Do you want to try again?"); proceed = input.next().toUpperCase().charAt(0); } while(proceed == 'Y'); input.close(); } }
[ "noreply@github.com" ]
noreply@github.com
fc8c807fd2c37337f542a823d268bc59e403de9e
4d1fcb06fbb73b211bf3939d47811a824485dd6d
/iamazon/src/iamazon/arrays/SubSequence.java
e30369eeac485373f7cb01b010916db489dff0ea
[]
no_license
veladitya/training
67f3b5445a1b6e2245e8de6dafa85dd0c4379fa4
e67b9b801bf29481f8a08cca7120c2d916a90f6f
refs/heads/master
2020-04-09T09:24:46.761766
2019-12-17T18:00:42
2019-12-17T18:00:42
160,214,463
0
0
null
null
null
null
UTF-8
Java
false
false
812
java
package iamazon.arrays; import java.util.SortedSet; import java.util.TreeSet; public class SubSequence { // set to store all the subsequences static SortedSet<String> st = new TreeSet<>(); public static void subsequence(String str) { int count = str.length(); for (int i = 0; i < count; i++) { for (int j = count; j > i; j--) { String sub_str = str.substring(i, j); if (!st.contains(sub_str)) st.add(sub_str); for (int k = 0; k < sub_str.length(); k++) { StringBuffer sb = new StringBuffer(sub_str); sb.deleteCharAt(k); if (!st.contains(sb.toString())) st.add(sub_str); subsequence(sb.toString()); } } } } public static void main(String args[]) { subsequence("abc"); System.out.println(st); } }
[ "5288873@WHQ-3805065-L1.corp.ds.fedex.com" ]
5288873@WHQ-3805065-L1.corp.ds.fedex.com
fb33a5579f51deb8b5f3b1893ca4cc0415f0b95d
b1bfdcc3763df3e73580ef7b87ea5aea261aa999
/Opera-DataMapper/src/test/java/com/bullhorn/Misc.java
80db99d0bd209b5425e80ec42cfb03e82595d31c
[]
no_license
sachinjain0101/Opera
307972e2db3b1575015b38f558db8d639cc5e464
b115c8728e608a84eb2d35ca9cb8805a8b664d88
refs/heads/master
2020-03-17T14:10:27.342731
2018-05-24T14:37:18
2018-05-24T14:37:18
133,622,290
0
0
null
null
null
null
UTF-8
Java
false
false
1,787
java
package com.bullhorn; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; public class Misc { public static void main(String args[]) throws IOException { String sample = ""; sample = "[{\"EmployeeFirstName\":\"Sachin\",\"EmployeeLastName\":\"Jain\",\"EmployeeID\":\"1234\",\"EmployeeSSN\":\"987654321\"}]"; sample = "[{\"EmployeeFirstName\":\"Sachin\",\"EmployeeLastName\":\"Jain\",\"EmployeeID\":\"1234\",\"EmployeeSSN\":\"987654321\",\"Codes\":{\"X1\":\"Y1\",\"X2\":\"Y2\"}},{\"EmployeeFirstName\":\"Shalina\",\"EmployeeLastName\":\"Jain\",\"EmployeeID\":\"5678\",\"EmployeeSSN\":\"98989898\",\"Codes\":{\"X1\":\"Y1\"}}]"; //Gson gson = new Gson(); //Test[] emp1 = gson.fromJson(sample, Test[].class); JsonParser parser = new JsonParser(); JsonElement tree = parser.parse(sample); JsonArray arr = tree.getAsJsonArray(); System.out.println(arr.size()); List<Map<String, String>> assignmentList = new ArrayList<Map<String,String>>(); arr.forEach((element) -> { JsonObject o = element.getAsJsonObject(); Set<String> keys = o.keySet(); Map<String,String> kvMap = new HashMap<String,String>(); keys.forEach((k) -> { System.out.println("Key: " + k + "\t\tValue: " + o.get(k).toString()); kvMap.put(k, o.get(k).toString()); }); assignmentList.add(kvMap); }); System.out.println("\n============="); assignmentList.forEach((v)->{ System.out.println(v.toString() + "\n============="); }); System.out.println("--"); } }
[ "sachin.jain@192.168.0.17" ]
sachin.jain@192.168.0.17
e09e00af7fe555142e7387a15a552d21a69913ea
fc056f169fd1c861ae21b9275f0ff6f53b57af74
/app/src/main/java/com/tti/tlivemobile/adapter/InfoChannelAdapter.java
1e17ac946113127ecac8d86770e86eef7f00ad89
[]
no_license
JinRong1125/LiveMobile
3ac9868d7a52be42357166dfc6123a348819e9b9
bbf21683058b0fc9545e0186e6e2ce18b745346d
refs/heads/master
2020-03-22T21:06:58.067449
2019-01-31T10:58:27
2019-01-31T10:58:27
140,657,905
0
0
null
null
null
null
UTF-8
Java
false
false
2,657
java
package com.tti.tlivemobile.adapter; import android.content.Context; import android.graphics.Bitmap; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.ProgressBar; import com.bumptech.glide.Glide; import com.bumptech.glide.request.target.Target; import com.tti.tlivemobile.R; import com.tti.tlivemobile.model.Channel; import com.tti.tlivemobile.viewholder.InfoChannelItemViewHolder; import java.util.List; /** * Created by dylan_liang on 2017/3/20. */ public class InfoChannelAdapter extends RecyclerView.Adapter<InfoChannelItemViewHolder> { private InfoChannelItemViewHolder viewHolder; private Context context; private List<Channel> channelList; public InfoChannelAdapter(Context context, List<Channel> channelList) { this.context = context ; this.channelList = channelList; } @Override public InfoChannelItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.info_channel_item, parent, false); viewHolder = new InfoChannelItemViewHolder(view); return viewHolder; } @Override public void onBindViewHolder(InfoChannelItemViewHolder holder, int position) { holder.contentText.setText(channelList.get(position).getContentText()); setStreamImage(holder.contentImage, holder.progressBar, channelList.get(position).getContentImagePath()); } @Override public int getItemCount() { return channelList.size(); } private void setStreamImage(final ImageView imageView, final ProgressBar progressBar, final String photoPath) { Glide.with(context) .load(photoPath) .asBitmap() .error(R.drawable.stream_l) .listener(new com.bumptech.glide.request.RequestListener<String, Bitmap>() { @Override public boolean onException(Exception e, String model, Target<Bitmap> target, boolean isFirstResource) { progressBar.setVisibility(View.GONE); return false; } @Override public boolean onResourceReady(Bitmap resource, String model, Target<Bitmap> target, boolean isFromMemoryCache, boolean isFirstResource) { progressBar.setVisibility(View.GONE); return false; } }) .into(imageView); } }
[ "w842001@gmail.com" ]
w842001@gmail.com
6da82c306523e5e721dc0fa99541db0cf411f10a
63fbc4dbe0ea8b385262092388df6ac0056ab1e0
/src/main/java/org/ne81/sp/cmpp/CmppConnectResp.java
b3ac5929d8ca6a518381995df23458864c68229a
[]
no_license
lijiajia2023/cmpp
9543e7ef3281652f1f97e3922540c69361eb3354
2f5a8dffb8913932e92322be55b1908eb843dd74
refs/heads/master
2023-07-22T15:59:10.637020
2014-04-08T01:55:10
2014-04-08T01:55:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,942
java
package org.ne81.sp.cmpp; import java.math.BigInteger; import java.nio.ByteBuffer; public class CmppConnectResp extends CmppMessageHeader { /** * */ private static final long serialVersionUID = 247528552740058684L; int status; byte[] authenticatorISMG; byte version; int connectRespLen; protected CmppConnectResp(byte version) { super(Constants.CMPP_CONNECT_RESP, version); if (super.version == Constants.CMPP2_VERSION) { connectRespLen = Constants.CMPP_CONNECT_RESP_LEN; } else { connectRespLen = Constants.CMPP3_CONNECT_RESP_LEN; } totalLength = Constants.MESSAGE_HEADER_LEN + connectRespLen; } protected boolean readBody(ByteBuffer buf) { if (buf.remaining() < connectRespLen) { return false; } if (super.version == Constants.CMPP2_VERSION) status = buf.get(); else status = buf.getInt(); authenticatorISMG = new byte[16]; buf.get(authenticatorISMG); version = buf.get(); return true; } protected boolean writeBody(ByteBuffer buf) { if (buf.remaining() < connectRespLen) { return false; } if (super.version == Constants.CMPP2_VERSION) buf.put((byte) status); else buf.putInt(status); buf.put(authenticatorISMG); buf.put(version); return true; } public String toString() { return super.toString() + "Status=" + status + "\tauthenticatorISMG=" + String.format("%040x", new BigInteger(authenticatorISMG)) + "\tVersion=" + version; } public byte[] getAuthenticatorISMG() { return authenticatorISMG; } public void setAuthenticatorISMG(byte[] authenticatorISMG) { this.authenticatorISMG = authenticatorISMG; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } public byte getVersion() { return version; } public void setVersion(byte version) { this.version = version; } }
[ "j6832@hotmail.com" ]
j6832@hotmail.com
27505cf6dd3513fc218b8bc6315a4c583b107c35
114c665a1179b5b1dcaf01d862ff3d0b74ceff28
/demo-jdbc/src/main/java/com/examplejdbc/demojdbc/Book.java
1c5e4c2a7a9aa348f9b898c2546a9556b56ef1b2
[]
no_license
UtkarshSinha10/LibraryManagementSystem
5e36bacf398e09327c51b093c9bd2fbf1d81d706
3f54b7bbdf1f80c4d3783f873e46ca85daa599d7
refs/heads/master
2023-01-04T05:12:41.841922
2020-11-01T06:49:41
2020-11-01T06:49:41
282,709,571
1
0
null
null
null
null
UTF-8
Java
false
false
1,100
java
package com.examplejdbc.demojdbc; public class Book { private int id; private String name; private String authorName; private int cost; public Book(int id,String name, String authorName, int cost) { this.id=id; this.name = name; this.authorName = authorName; this.cost = cost; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAuthorName() { return authorName; } public void setAuthorName(String authorName) { this.authorName = authorName; } public int getCost() { return cost; } public void setCost(int cost) { this.cost = cost; } @Override public String toString() { return "Book{" + "name='" + name + '\'' + ", authorName='" + authorName + '\'' + ", cost=" + cost + '}'; } }
[ "66639860+UtkarshSinha10@users.noreply.github.com" ]
66639860+UtkarshSinha10@users.noreply.github.com
f4edf39feb4a8e63440dadf5a90ea219b3e8bbaf
fafaa409d1fe3391000c1bb78e5396ce33b5731c
/value-list-services/src/main/java/com/app/valueList/interfaces/valueList/service/impl/ValueListServiceImpl.java
8879e30a4f0b2a76842e67e251ddeb4942195ea4
[]
no_license
JhonMurillo/clima-repository
83416f67529986e61d02bd570b8aa8568803b8db
b5a416d7fbb2051bd49cc6d2e5d2fece7c480de8
refs/heads/master
2021-01-11T08:38:03.255124
2018-04-03T14:33:48
2018-04-03T14:33:48
76,269,997
0
0
null
null
null
null
UTF-8
Java
false
false
1,455
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.app.valueList.interfaces.valueList.service.impl; import com.app.valueList.domains.valueList.ValueList; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.app.valueList.domains.valueList.ValueListRepository; import com.app.valueList.interfaces.valueList.service.ValueListService; import java.util.List; /** * * @author DESARROLLO */ @Component("valueListService") public class ValueListServiceImpl implements ValueListService { @Autowired ValueListRepository valueListRepository; @Override public ValueList save(ValueList valueList) { return valueListRepository.save(valueList); } @Override public List<ValueList> findAll() { return (List<ValueList>) valueListRepository.findAll(); } @Override public ValueList findById(Long id) { return valueListRepository.findOne(id); } @Override public List<ValueList> findByCategory(String category) { return (List<ValueList>) valueListRepository.findByCategory(category); } @Override public ValueList findByCategoryAndValue(String category, String value) { return valueListRepository.findByCategoryAndValue(category, value); } }
[ "jhonmurillo2014@gmail.com" ]
jhonmurillo2014@gmail.com
c2da7310492a74fc5a2c194b2a7cad934788d483
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/p280ss/android/ugc/aweme/shortvideo/p1548ar/p1549a/C38465a.java
1ed1be00d44ad49006911ee9b88186271bc06db6
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,431
java
package com.p280ss.android.ugc.aweme.shortvideo.p1548ar.p1549a; import android.graphics.PointF; import android.view.MotionEvent; import android.view.ScaleGestureDetector; import com.p280ss.android.ugc.asve.recorder.effect.C20749b; import com.p280ss.android.ugc.aweme.base.utils.C23482j; import com.p280ss.android.ugc.aweme.common.C6907h; import com.p280ss.android.ugc.aweme.common.MobClick; import com.p280ss.android.ugc.aweme.port.p1479in.C35563c; import com.p280ss.android.ugc.aweme.shortvideo.C39804em; import com.p280ss.android.ugc.aweme.shortvideo.C39805en; import com.p280ss.android.ugc.aweme.shortvideo.gesture.C39944a; import com.p280ss.android.ugc.aweme.shortvideo.gesture.p1575a.C39949c; import com.p280ss.android.ugc.aweme.sticker.model.FaceStickerBean; /* renamed from: com.ss.android.ugc.aweme.shortvideo.ar.a.a */ public final class C38465a extends C39944a { /* renamed from: a */ private final C20749b f99997a; /* renamed from: b */ private FaceStickerBean f99998b; /* renamed from: c */ private int f99999c; /* renamed from: d */ private int f100000d; /* renamed from: e */ private int f100001e; /* renamed from: f */ private float f100002f = 1.0f; /* renamed from: g */ private float f100003g = 1.0f; /* renamed from: h */ private float f100004h; /* renamed from: i */ private boolean f100005i; /* renamed from: j */ private PointF f100006j = new PointF(-2.0f, -2.0f); /* renamed from: k */ private int f100007k; /* renamed from: l */ private int f100008l; /* renamed from: m */ private int f100009m; /* renamed from: n */ private int f100010n; /* renamed from: o */ private PointF f100011o = new PointF(); /* renamed from: a */ public final boolean mo96380a() { return false; } /* renamed from: a */ public final boolean mo96384a(ScaleGestureDetector scaleGestureDetector) { return true; } /* renamed from: a */ public final boolean mo96385a(C39949c cVar) { return true; } /* renamed from: b */ public final boolean mo96386b() { return false; } /* renamed from: b */ public final boolean mo96387b(float f) { this.f99997a.mo56103d(-f, 6.0f); return true; } /* renamed from: b */ public final boolean mo96388b(MotionEvent motionEvent) { m122954a(motionEvent.getX(), motionEvent.getY()); PointF b = m122955b(this.f100011o.x, this.f100011o.y); if (this.f99997a != null) { this.f99997a.mo56110e(b.x, b.y); } return true; } /* renamed from: c */ public final boolean mo96391c(float f) { this.f99997a.mo56103d(-f, 6.0f); C6907h.onEvent(MobClick.obtain().setEventName("ar_prop_spin").setLabelName("shoot_page").setExtValueLong(this.f99998b.getStickerId())); return true; } /* renamed from: d */ public final boolean mo96393d(MotionEvent motionEvent) { m122954a(motionEvent.getX(), motionEvent.getY()); this.f99997a.mo56047a(2, this.f100011o.x / ((float) this.f99999c), this.f100011o.y / ((float) this.f100000d), 0); this.f100005i = false; return false; } /* renamed from: a */ public final boolean mo96381a(float f) { C6907h.onEvent(MobClick.obtain().setEventName("ar_prop_scale").setLabelName("shoot_page").setExtValueLong(this.f99998b.getStickerId())); this.f100002f = 1.0f; this.f100003g = 1.0f; return true; } /* renamed from: c */ public final boolean mo96392c(MotionEvent motionEvent) { m122954a(motionEvent.getX(), motionEvent.getY()); this.f99997a.mo56047a(0, this.f100011o.x / ((float) this.f99999c), this.f100011o.y / ((float) this.f100000d), 0); this.f100005i = true; return false; } /* renamed from: a */ public final boolean mo96382a(MotionEvent motionEvent) { m122954a(motionEvent.getX(), motionEvent.getY()); PointF b = m122955b(this.f100011o.x, this.f100011o.y); this.f99997a.mo56044a(b.x, b.y); C6907h.onEvent(MobClick.obtain().setEventName("ar_prop_click").setLabelName("shoot_page").setExtValueLong(this.f99998b.getStickerId())); return true; } /* renamed from: b */ public final boolean mo96390b(ScaleGestureDetector scaleGestureDetector) { this.f100003g *= scaleGestureDetector.getScaleFactor(); this.f99997a.mo56094c(this.f100003g / this.f100002f, 3.0f); this.f100002f = this.f100003g; return true; } /* renamed from: a */ public final C38465a mo96379a(int i, int i2) { if (i == 0 || i2 == 0) { return this; } this.f100009m = i; this.f100010n = i2; return this; } /* renamed from: b */ private PointF m122955b(float f, float f2) { int i = (this.f100009m - this.f99999c) / 2; PointF pointF = new PointF(); pointF.x = (f + ((float) i)) / ((float) this.f100009m); pointF.y = f2 / ((float) this.f100010n); return pointF; } /* renamed from: a */ private void m122954a(float f, float f2) { int i; int i2; if (!C39805en.m127445a() || C39804em.f103458b == 0) { i = this.f100001e; } else { i = C39804em.f103458b; } this.f100000d = i; if (!C39805en.m127445a() || !C39804em.m127436a()) { i2 = 0; } else { i2 = C39804em.f103459c; } this.f100011o.set(f, f2); this.f100011o.offset(0.0f, (float) (-i2)); } public C38465a(FaceStickerBean faceStickerBean, C20749b bVar) { this.f99998b = faceStickerBean; this.f99997a = bVar; this.f99999c = C23482j.m77099c(); this.f100001e = C23482j.m77097b(); this.f100007k = C35563c.f93254q.getVideoWidth(); this.f100008l = C35563c.f93254q.getVideoHeight(); this.f100009m = this.f100007k; this.f100010n = this.f100008l; } /* renamed from: b */ public final boolean mo96389b(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) { C6907h.onEvent(MobClick.obtain().setEventName("ar_prop_control_alert").setLabelName("shoot_page")); return true; } /* renamed from: a */ public final boolean mo96383a(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) { if (this.f100005i) { this.f100006j.x = motionEvent.getX(); this.f100006j.y = motionEvent.getY(); this.f100005i = false; } float x = motionEvent2.getX() - this.f100006j.x; float y = motionEvent2.getY() - this.f100006j.y; m122954a(motionEvent2.getX(), motionEvent2.getY()); this.f99997a.mo56045a(this.f100011o.x / ((float) this.f99999c), this.f100011o.y / ((float) this.f100000d), x / ((float) this.f99999c), y / ((float) this.f100000d), 1.0f); this.f100006j.x = motionEvent2.getX(); this.f100006j.y = motionEvent2.getY(); if (!(motionEvent == null || motionEvent.getX() == this.f100004h)) { this.f100004h = motionEvent.getX(); C6907h.onEvent(MobClick.obtain().setEventName("ar_prop_drag").setLabelName("shoot_page").setExtValueLong(this.f99998b.getStickerId())); } return true; } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
21f47c8fdb36283d03833ca5335a987aa0afe1f1
8f72df0323c9967a295c5e50bf6e9c58fef3b125
/analytics-processor/src/main/java/com/appdynamics/analytics/processor/rest/availability/resource/ResourceAvailabilityResource.java
902bde7714d56ab9ecf1a21c04046e2ac6c146b1
[]
no_license
xushjie1987/appd-analytics
af53ba6a81f4721558f88b78df8fe0cd359cb27c
03bd095ea56a1990185041839e976b36952e365e
refs/heads/master
2021-01-10T01:19:51.523520
2016-03-11T14:47:35
2016-03-11T14:47:35
53,661,206
1
0
null
null
null
null
UTF-8
Java
false
false
7,304
java
/* */ package com.appdynamics.analytics.processor.rest.availability.resource; /* */ /* */ import com.appdynamics.analytics.processor.auth.SecureResource; /* */ import com.appdynamics.analytics.processor.rest.RestError; /* */ import com.appdynamics.analytics.processor.rest.StandardErrorCode; /* */ import com.appdynamics.analytics.processor.rest.availability.ResourceAvailabilityAdapter; /* */ import com.appdynamics.common.util.configuration.Reader; /* */ import com.fasterxml.jackson.databind.JsonNode; /* */ import com.fasterxml.jackson.databind.ObjectMapper; /* */ import com.fasterxml.jackson.databind.node.ArrayNode; /* */ import com.google.common.base.Throwables; /* */ import com.google.inject.Inject; /* */ import com.sun.jersey.spi.resource.Singleton; /* */ import javax.ws.rs.Consumes; /* */ import javax.ws.rs.DELETE; /* */ import javax.ws.rs.GET; /* */ import javax.ws.rs.POST; /* */ import javax.ws.rs.Path; /* */ import javax.ws.rs.Produces; /* */ import javax.ws.rs.WebApplicationException; /* */ import javax.ws.rs.core.Response; /* */ import javax.ws.rs.core.Response.ResponseBuilder; /* */ import org.apache.curator.framework.CuratorFramework; /* */ import org.apache.curator.framework.api.CreateBuilder; /* */ import org.apache.curator.framework.api.ExistsBuilder; /* */ import org.apache.curator.framework.api.GetDataBuilder; /* */ import org.apache.curator.framework.api.PathAndBytesable; /* */ import org.apache.curator.framework.api.SetDataBuilder; /* */ import org.apache.zookeeper.KeeperException.NoNodeException; /* */ import org.slf4j.Logger; /* */ import org.slf4j.LoggerFactory; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ @Singleton /* */ @Path("v1/resource/exclusions") /* */ @Produces({"application/json"}) /* */ @Consumes({"application/json"}) /* */ @SecureResource(roles={"OPS"}) /* */ public class ResourceAvailabilityResource /* */ { /* 61 */ private static final Logger log = LoggerFactory.getLogger(ResourceAvailabilityResource.class); /* */ /* */ /* 64 */ public static final String ZK_EXCLUSIONS_PATH = ResourceAvailabilityAdapter.ANALYTICS_RESOURCE_EXCLUSIONS_ZK_PATH; /* */ /* */ public static final String RESOURCE_FIELD = "resource"; /* */ /* */ public static final String HTTP_METHODS_FIELD = "httpMethods"; /* */ final ObjectMapper mapper; /* */ final CuratorFramework zkClient; /* */ /* */ @Inject /* */ public ResourceAvailabilityResource(CuratorFramework zkClient) /* */ { /* 75 */ this.zkClient = zkClient; /* 76 */ this.mapper = Reader.DEFAULT_JSON_MAPPER; /* */ } /* */ /* */ /* */ /* */ @GET /* */ public JsonNode listAllExclusions() /* */ { /* */ try /* */ { /* 86 */ byte[] data = (byte[])this.zkClient.getData().forPath(ZK_EXCLUSIONS_PATH); /* 87 */ return this.mapper.readTree(data); /* */ } /* */ catch (KeeperException.NoNodeException e) { /* 90 */ log.debug("Returning empty node for exclusions since ZK node [{}] doesn't exit.", ZK_EXCLUSIONS_PATH); /* 91 */ return this.mapper.createArrayNode(); /* */ } catch (Exception e) { /* 93 */ log.error("Could not list exclusions", e); /* 94 */ throw RestError.create(StandardErrorCode.CODE_UNKNOWN_FAILURE, "Could not list exclusions", Throwables.getStackTraceAsString(e)); /* */ } /* */ } /* */ /* */ /* */ /* */ /* */ /* */ @POST /* */ public Response setExclusions(ArrayNode body) /* */ { /* */ try /* */ { /* 107 */ String bodyStr = Reader.DEFAULT_JSON_MAPPER.writeValueAsString(body); /* 108 */ log.info("Setting resource exclusions as {}", bodyStr); /* */ /* 110 */ validateExclusionsPayload(body); /* */ PathAndBytesable operation; /* */ PathAndBytesable operation; /* 113 */ if (this.zkClient.checkExists().forPath(ZK_EXCLUSIONS_PATH) != null) { /* 114 */ operation = this.zkClient.setData(); /* */ } else { /* 116 */ operation = this.zkClient.create().creatingParentsIfNeeded(); /* */ } /* 118 */ operation.forPath(ZK_EXCLUSIONS_PATH, bodyStr.getBytes("UTF-8")); /* 119 */ return Response.noContent().build(); /* */ } catch (WebApplicationException e) { /* 121 */ throw e; /* */ } catch (Exception e) { /* 123 */ log.error("Could not set exclusions [{}] on zk node [{}]", new Object[] { body, ZK_EXCLUSIONS_PATH, e }); /* 124 */ throw RestError.create(StandardErrorCode.CODE_UNKNOWN_FAILURE, "Could not set exclusions", Throwables.getStackTraceAsString(e)); /* */ } /* */ } /* */ /* */ /* */ void validateExclusionsPayload(ArrayNode body) /* */ { /* 131 */ for (JsonNode exclusion : body) { /* 132 */ if (exclusion.get("resource") == null) { /* 133 */ throw RestError.create(StandardErrorCode.CODE_INVALID_REQUEST_BODY, "Field [resource] was missing from payload item."); /* */ } /* */ /* */ /* 137 */ JsonNode httpMethods = exclusion.get("httpMethods"); /* 138 */ if (httpMethods == null) { /* 139 */ throw RestError.create(StandardErrorCode.CODE_INVALID_REQUEST_BODY, "Field [httpMethods] was missing from payload item."); /* */ } /* 141 */ if (!(httpMethods instanceof ArrayNode)) { /* 142 */ throw RestError.create(StandardErrorCode.CODE_INVALID_REQUEST_BODY, "Field [httpMethods] must be an array."); /* */ } /* */ } /* */ } /* */ /* */ /* */ /* */ /* */ @DELETE /* */ public Response removeExclusions() /* */ { /* */ try /* */ { /* 155 */ log.info("Removing resource exclusions"); /* */ /* */ /* */ /* 159 */ if (this.zkClient.checkExists().forPath(ZK_EXCLUSIONS_PATH) != null) { /* 160 */ this.zkClient.setData().forPath(ZK_EXCLUSIONS_PATH, "[]".getBytes("UTF-8")); /* */ } /* */ /* 163 */ return Response.noContent().build(); /* */ } catch (KeeperException.NoNodeException e) { /* 165 */ log.debug("Did not delete exclusions since node [{}] doesn't exist in ZK.", ZK_EXCLUSIONS_PATH); /* 166 */ return Response.noContent().build(); /* */ } catch (Exception e) { /* 168 */ log.error("Could not remove all exclusions", e); /* 169 */ throw RestError.create(StandardErrorCode.CODE_UNKNOWN_FAILURE, "Could not remove all exclusions", Throwables.getStackTraceAsString(e)); /* */ } /* */ } /* */ } /* Location: /Users/gchen/Downloads/AppDynamics/events-service/lib/analytics-processor.jar!/com/appdynamics/analytics/processor/rest/availability/resource/ResourceAvailabilityResource.class * Java compiler version: 7 (51.0) * JD-Core Version: 0.7.1 */
[ "chenguancheng@gmail.com" ]
chenguancheng@gmail.com
4eadda71ed88c1224ef2382b1f3960a984913bc5
e29fdf3eada16aa2e265f0c4d87981739dab300c
/Practice/src/practice03/PTra03_06.java
fc6d05859ed62ea4efc3c6de99b0a037f7e2edc2
[]
no_license
murata-miku/JavaBasic
4ef5bea45c4bbb2a87be1a44da446a27bede3f68
7b6069a5c15d2a1c23c3e72cdbfc86dd702094fc
refs/heads/master
2021-09-09T07:15:05.931140
2018-03-14T06:48:49
2018-03-14T06:48:49
117,179,311
0
0
null
null
null
null
UTF-8
Java
false
false
1,194
java
package practice03; /* * PTra03_06.java * 作成 LIKEIT 2017 *------------------------------------------------------------ * Copyright(c) Rhizome Inc. All Rights Reserved. */ public class PTra03_06 { public static void main(String[] args) { int limitNumber = 100; // ランダムで数字を生成するプログラムです。 // 下記の命令を実行すると変数randomに、0以上、変数limitNumber未満の数字がランダムで代入されます int random = new java.util.Random().nextInt(limitNumber + 1); //---------------------ここから本題----------------------- /* * ★ 以下の仕様に沿ってプログラムを完成させてください * * ●変数randomの値から、出力する値を変更します。 * ● 100~71の場合 -> 「☆☆☆☆☆」 * ● 70~31の場合 -> 「☆☆☆☆」 * ● 上記以外の場合 -> 「☆☆☆」 * * ※ プログラムは何行書いても良いです */ if (random <= 100 && random >= 71) { System.out.println("☆☆☆☆☆"); } else if (random >=31) { System.out.println("☆☆☆☆"); } else { System.out.println("☆☆☆"); } } }
[ "mikkle0817@gmail.com" ]
mikkle0817@gmail.com
ffcea309288628725555c440c7ff86f46102f680
18dd8bc38483b108283204b12136ac2c22158845
/src/main/java/pucmm/edu/dhamarmj/Services/StartDatabase.java
c6be75d82edc9bde2b53e1b2ff62135dcf652a5b
[]
no_license
dhamarmj/blogorm
c093941e41d0e3daad156d3bfb601371b7cd25fd
4ab96f6969411370a9219def32f28f1978c8e497
refs/heads/master
2020-04-30T13:25:27.989339
2019-04-23T14:43:58
2019-04-23T14:43:58
176,857,548
0
0
null
null
null
null
UTF-8
Java
false
false
708
java
package pucmm.edu.dhamarmj.Services; import org.h2.tools.Server; import java.sql.SQLException; public class StartDatabase { private static StartDatabase instancia; private StartDatabase(){ } public static StartDatabase getInstancia(){ if(instancia == null){ instancia=new StartDatabase(); } return instancia; } public void startDb() { try { Server.createTcpServer("-tcpPort", "9092", "-tcpAllowOthers", "-tcpDaemon").start(); }catch (SQLException ex){ System.out.println("Problema con la base de datos: "+ex.getMessage()); } } }
[ "39349434+dhamarmj@users.noreply.github.com" ]
39349434+dhamarmj@users.noreply.github.com
07f14884bec6c6230ff18a4487f812525c8bf514
2fccb1ef547a476a2e4c3f5137936f0966dee9eb
/src/main/java/org/exemple/firstspring/dao/contracts/PersonDao.java
5cb5b686db31c0713021f968e93a4468070afdbc
[]
no_license
astracod/15_hometask_xml
9443dee38d0d4eaf21cd1721357b36330bb8ca68
7af997cd4b477fb80455c517792f2aa121143365
refs/heads/master
2023-02-15T13:43:14.413839
2021-01-07T14:49:52
2021-01-07T14:49:52
327,634,809
0
0
null
null
null
null
UTF-8
Java
false
false
241
java
package org.exemple.firstspring.dao.contracts; import org.exemple.firstspring.entities.Person; import java.util.List; public interface PersonDao { List<Person> getAll(); void addPerson(Person p); void removePerson(Long id); }
[ "titan_22@mail.ru" ]
titan_22@mail.ru
1c6dfc7d217a3e3c4685a524e0ec0e053f0f6330
abdabe37d3294a2b71f83b1dca434af23de045cb
/src/edu/ijse/gdse37/genius/view/admin/AddNewUniteForm.java
5ae1e892aea1ede559ff0d06cfa0d408f4396947
[]
no_license
dinuka-kasun-medis/Exam_simulator_java
121b89c8d240e0ae303dcf892566212ebaff97f7
c6cc4aebd14a7ffe86c8fce6d32959328fdf47a2
refs/heads/master
2020-03-22T00:37:03.979191
2018-06-30T17:25:49
2018-06-30T17:25:49
139,255,563
0
0
null
null
null
null
UTF-8
Java
false
false
11,277
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package edu.ijse.gdse37.genius.view.admin; import edu.ijse.gdse37.genius.connector.ServerConnector; import edu.ijse.gdse37.genius_common.controllers.IDController; import edu.ijse.gdse37.genius_common.controllers.SubjectController; import edu.ijse.gdse37.genius_common.controllers.UniteController; import edu.ijse.gdse37.genius_common.model.Subject; import edu.ijse.gdse37.genius_common.model.Unite; import java.awt.Toolkit; import java.io.IOException; import java.net.MalformedURLException; import java.rmi.NotBoundException; import java.rmi.RemoteException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JOptionPane; /** * * @author Dinuka */ public class AddNewUniteForm extends javax.swing.JDialog { private static String subject; /** * Creates new form AddNewSubjectForm * @param parent * @param modal */ public AddNewUniteForm(java.awt.Frame parent, boolean modal) { super(parent, modal); this.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/edu/ijse/gdse37/genius/view/images/iconGenius.png"))); initComponents(); setLocationRelativeTo(null); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); nameTxt = new javax.swing.JTextField(); addUniteBtn = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); unite_idTxt = new javax.swing.JTextField(); subjectTxt = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setLayout(null); nameTxt.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jPanel1.add(nameTxt); nameTxt.setBounds(170, 130, 240, 30); addUniteBtn.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N addUniteBtn.setText("Add"); addUniteBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addUniteBtnActionPerformed(evt); } }); jPanel1.add(addUniteBtn); addUniteBtn.setBounds(280, 180, 130, 30); jLabel4.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jLabel4.setText("Name :"); jPanel1.add(jLabel4); jLabel4.setBounds(50, 130, 120, 30); jLabel5.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jLabel5.setText("Unite Id :"); jPanel1.add(jLabel5); jLabel5.setBounds(50, 50, 120, 30); jLabel1.setBackground(new java.awt.Color(0, 0, 0)); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/ijse/gdse37/genius/view/images/logo2New.png"))); // NOI18N jPanel1.add(jLabel1); jLabel1.setBounds(0, 160, 190, 90); jLabel2.setFont(new java.awt.Font("Courier New", 0, 24)); // NOI18N jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setText("Add New Unite"); jPanel1.add(jLabel2); jLabel2.setBounds(120, 0, 220, 40); unite_idTxt.setEditable(false); unite_idTxt.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jPanel1.add(unite_idTxt); unite_idTxt.setBounds(170, 50, 240, 30); subjectTxt.setEditable(false); subjectTxt.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jPanel1.add(subjectTxt); subjectTxt.setBounds(170, 90, 240, 30); jLabel6.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jLabel6.setText("Subject :"); jPanel1.add(jLabel6); jLabel6.setBounds(50, 90, 120, 30); jLabel7.setBackground(new java.awt.Color(255, 255, 255)); jLabel7.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N jLabel7.setForeground(new java.awt.Color(235, 235, 239)); jLabel7.setText("GENIUS™ ©Dinuka_Kasun_Medis dinuka.kasunds@gmail.com / 2016"); jPanel1.add(jLabel7); jLabel7.setBounds(110, 220, 360, 30); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 467, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 247, javax.swing.GroupLayout.PREFERRED_SIZE) ); pack(); }// </editor-fold>//GEN-END:initComponents private void addUniteBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addUniteBtnActionPerformed try { UniteController uniteController=ServerConnector.getServerConnector().getUniteController(); SubjectController subjectController=ServerConnector.getServerConnector().getSubjectController(); String unite_id=unite_idTxt.getText(); String subjectName=subjectTxt.getText(); Subject subject=subjectController.searchSubject("subjectName", subjectName); String subject_id=subject.getSubject_id(); String name=nameTxt.getText(); Unite unite=new Unite(unite_id, subject_id, name); boolean isAdd=uniteController.isAddUnite(unite); if (isAdd) { JOptionPane.showMessageDialog(this, "Subject Added Sucsess.."); this.dispose(); } } catch (NotBoundException ex) { Logger.getLogger(AddNewUniteForm.class.getName()).log(Level.SEVERE, null, ex); } catch (MalformedURLException ex) { Logger.getLogger(AddNewUniteForm.class.getName()).log(Level.SEVERE, null, ex); } catch (RemoteException ex) { Logger.getLogger(AddNewUniteForm.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { Logger.getLogger(AddNewUniteForm.class.getName()).log(Level.SEVERE, null, ex); } }//GEN-LAST:event_addUniteBtnActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Windows".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(AddNewUniteForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(AddNewUniteForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(AddNewUniteForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(AddNewUniteForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { @Override public void run() { AddNewUniteForm dialog = new AddNewUniteForm(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton addUniteBtn; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JPanel jPanel1; private static javax.swing.JTextField nameTxt; private static javax.swing.JTextField subjectTxt; private static javax.swing.JTextField unite_idTxt; // End of variables declaration//GEN-END:variables /*Method for load new Id © Dinuka Kasun Medis * @param subjectName */ public static void loadNewId(String subjectName) { try { SubjectController subjectController=ServerConnector.getServerConnector().getSubjectController(); subjectTxt.setText(subjectName); Subject subject=subjectController.searchSubject("subjectName", subjectName); String subject_id=subject.getSubject_id(); IDController iDController = ServerConnector.getServerConnector().getIDController(); String newId = iDController.getLastUniteId(subject_id); unite_idTxt.setText(newId); } catch (NotBoundException ex) { Logger.getLogger(AddNewSubjectForm.class.getName()).log(Level.SEVERE, null, ex); } catch (MalformedURLException ex) { Logger.getLogger(AddNewSubjectForm.class.getName()).log(Level.SEVERE, null, ex); } catch (RemoteException ex) { Logger.getLogger(AddNewSubjectForm.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { Logger.getLogger(AddNewSubjectForm.class.getName()).log(Level.SEVERE, null, ex); } } }
[ "dinuka-kasun-medis@users.noreply.github.com" ]
dinuka-kasun-medis@users.noreply.github.com
8deb5a6abbe101d57e0abf5798159c57bced01c2
287245ed8e5eb6a1f9e30b4418b0ff9f3def321c
/IsTV/src/main/java/cn/aigestudio/datepicker/entities/EN.java
fe74da98b75c7dcb47c61fc294c0735ac766b380
[ "Apache-2.0" ]
permissive
ZhouYangGaoGao/ZhengZaiThrees
e5ae3dd48bcee9cef0bb06a6444c6868bd6325f2
9eb6b0399a3295f8422ce77713100089c97fd21f
refs/heads/master
2020-07-01T02:54:48.950595
2016-11-23T08:55:55
2016-11-23T08:55:55
74,558,006
0
2
null
null
null
null
UTF-8
Java
false
false
638
java
package main.java.cn.aigestudio.datepicker.entities; /** * 英文的默认实现类 * 如果你想实现更多的语言请参考Language{@link Language} * The implementation class of english. * You can refer to Language{@link Language} if you want to define more language. * * @author AigeStudio 2015-03-28 */ public class EN extends Language { @Override public String[] monthTitles() { return new String[]{"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; } @Override public String ensureTitle() { return "Ok"; } }
[ "zhouyang@zhengzai.tv" ]
zhouyang@zhengzai.tv
3627aec44aa3e33eb647545297253e2262998158
a12a0f98b7a768c02d8d8329d1c52e2610fc7c51
/app/src/main/java/in/vinkrish/quickwash/data/QuickWashDBHelper.java
34faeb64cb10c2208ec265c8da4eca2fc51c7953
[]
no_license
emppas/QuickWash
1bff50439f20f1089c4dd3bafa10616c9d5277c3
24cc2e04b61a06590927aeaeb848e26608f465f8
refs/heads/master
2021-08-30T07:16:57.983949
2017-12-16T17:16:54
2017-12-16T17:16:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,617
java
package in.vinkrish.quickwash.data; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import in.vinkrish.quickwash.data.QuickWashContract.QuickWashEntry; /** * Created by vinkrish on 04/12/15. */ public class QuickWashDBHelper extends SQLiteOpenHelper { private static final int DATABASE_VERSION = 1; static final String DATABASE_NAME = "quickwash.db"; public QuickWashDBHelper (Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { final String SQL_CREATE_QUICKWASH_TABLE = "CREATE TABLE " + QuickWashEntry.TABLE_NAME + " (" + QuickWashEntry._ID + " INTEGER PRIMARY KEY," + QuickWashEntry.COLUMN_NAME + " TEXT NOT NULL, " + QuickWashEntry.COLUMN_MOBILE + " TEXT NOT NULL, " + QuickWashEntry.COLUMN_ALTERNATE_MOBILE + " TEXT NOT NULL, " + QuickWashEntry.COLUMN_EMAIL + " TEXT NOT NULL, " + QuickWashEntry.COLUMN_ADDRESS + " TEXT NOT NULL, " + QuickWashEntry.COLUMN_PINCODE + " TEXT NOT NULL, " + QuickWashEntry.COLUMN_SERVICE + " TEXT NOT NULL, " + QuickWashEntry.COLUMN_DATE + " TEXT NOT NULL " + " );"; db.execSQL(SQL_CREATE_QUICKWASH_TABLE); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL("DROP TABLE IF EXISTS " + QuickWashEntry.TABLE_NAME); onCreate(db); } }
[ "vinaykrishna1989@gmail.com" ]
vinaykrishna1989@gmail.com
f45586b7d18ebcc56ebbc0d9de289f8282d08464
912e349fd16a7c213784c77607307af2cf20559e
/.svn/pristine/f4/f45586b7d18ebcc56ebbc0d9de289f8282d08464.svn-base
a1c8e2c77ecab6480147273d806cade6523b6e5e
[]
no_license
alittlebao/egou
2f35a19b1469fecdfc7657ad30df4ac5f23e9b37
6abded5db6b6c68d5e009809d210e7d475c3a12d
refs/heads/master
2021-01-12T17:22:52.686449
2016-10-21T10:09:32
2016-10-21T10:09:32
71,553,909
0
0
null
null
null
null
UTF-8
Java
false
false
181
package net.togogo.egou.common.utils; public interface Constants { /** * 另一个tomcat图片基本路径 */ String IMG_URL = "http://localhost:8088/imgweb/"; }
[ "walkwithdream@163.com" ]
walkwithdream@163.com
d9ce7aa3000691c87beceb183dfa422f989dc216
c9d0ad5eaad091ffa2ef046fe7ed97efe8e4de41
/app/src/main/java/com/us/prince/ui/SplashActivity.java
516cfca4fa36df9555356daea2e9283fb6028b9d
[]
no_license
upendrashah47/Prince
3c0075ed721c89c1ea64b8ecbc229eaf1f3c630a
205d2f6e61541cd1e708afe1f6a3cabcb97437fb
refs/heads/master
2021-01-01T18:40:56.607224
2017-08-17T13:15:12
2017-08-17T13:15:12
98,406,483
0
0
null
null
null
null
UTF-8
Java
false
false
4,231
java
package com.us.prince.ui; import android.content.Context; import android.content.Intent; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.us.prince.R; import com.us.prince.backend.ResponseListener; import com.us.prince.util.Config; import com.us.prince.util.Log; import com.us.prince.util.Pref; import com.us.prince.util.Utils; public class SplashActivity extends BaseActivity { private Context context; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); context = SplashActivity.this; // Log.WHICH_HOST = Utils.getResourceSting(context, R.string.apiHostData); Utils.systemUpgrade(SplashActivity.this); Utils.getDeviceID(context); // if (Utils.isOnline(context)) { // syncAPI(); // } else { try { Thread splashThread = new Thread() { public void run() { try { sleep(3000); } catch (InterruptedException e) { Log.error(getClass().getName() + ":splashThread", e); } handler.sendEmptyMessage(0); } }; splashThread.start(); } catch (Exception e) { Log.error(this.getClass() + "::splashThread::", e); } finally { Utils.freeMemory(); } // } } @Override public int getLayout() { return R.layout.activity_splash; } // private void syncAPI() { // if (Utils.isOnline(context)) { // syncAPI = new SyncAPI(context, responseListener); // syncAPI.execute(); // } else { // Pref.setValue(context, Config.PREF_IS_INTERNET_DIALOG_OPEN, 0); // if (Pref.getValue(context, Config.PREF_IS_LOGIN, 0) == 1) { // if (Pref.getValue(context, Config.PREF_ROLE, 0) == 2) { // Utils.intentCall(SplashActivity.this, ContributorDashboardActivity.class, true); // } else if (Pref.getValue(context, Config.PREF_ROLE, 0) == 3) { // Utils.intentCall(SplashActivity.this, MeetingActivity.class, true); // } // } else { // Utils.intentCall(SplashActivity.this, LoginActivity.class, true); // } // } // } // ResponseListener responseListener = new ResponseListener() { // @Override // public void onResponce(String tag, int result, Object obj) { // if (result == Config.API_SUCCESS) { // if (tag.equals(Utils.getResourceSting(context, R.string.syncTAG))) { // if (Pref.getValue(context, Config.PREF_IS_LOGIN, 0) == 1) { // if (Pref.getValue(context, Config.PREF_ROLE, 0) == 2) { // Utils.intentCall(SplashActivity.this, ContributorDashboardActivity.class, true); // } else if (Pref.getValue(context, Config.PREF_ROLE, 0) == 3) { // if (Pref.getValue(context, Config.PREF_PAYMENT_STATUS, 0) == 4) { // Utils.intentCall(SplashActivity.this, ProfileActivity.class, true); // } else { // Utils.intentCall(SplashActivity.this, MeetingActivity.class, true); // } // } // } else { // Utils.intentCall(SplashActivity.this, LoginActivity.class, true); // } // } // } // syncAPI = null; // } // }; private Handler handler = new Handler() { @Override public void handleMessage(android.os.Message msg) { // syncAPI(); if (Pref.getValue(context, Config.PREF_IS_LOGIN, 0) == 1) { Intent intent = new Intent(context, HomeActivity.class); startActivity(intent); } else { Intent intent = new Intent(context, LoginActivity.class); startActivity(intent); } } }; }
[ "upendra.esprit@gmail.com" ]
upendra.esprit@gmail.com
79afb20c96dadf31a8b5cffc2b07594f93eb08f7
08afb098bde7de0d273242770750845869fc2702
/itv-core-server/src/test/java/com/kwok/itvcoreserver/ItvCoreServerApplicationTests.java
a60b804ec5782f950a9084fd17c94cd80d6a55f6
[]
no_license
hbqjgq/itv-cloud
cd3fb008de5ea0062b1434c8631dafbadfaa1f4a
2e9f624c2b15ba9fad05398fbf291f963641a9b2
refs/heads/master
2020-03-29T09:08:13.350388
2018-09-21T09:41:59
2018-09-21T09:41:59
149,742,997
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package com.kwok.itvcoreserver; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class ItvCoreServerApplicationTests { @Test public void contextLoads() { } }
[ "458909264@qq.com" ]
458909264@qq.com
e6bb5a4034f0d141e169ad3c535e225b6a19376f
0ca09d8c64531d63297fdb5b3ae6eb6b5aef69df
/src/ru/job4j/condition/AlertDivByZero.java
502d38075a6f144ace600827ede374c3636b6106
[]
no_license
Bratetc/job4j_elementary
49a068456f6d1bbbef3fd65e2f8f47b0df18d2cc
a3f8c999ea32336eec4514702ef32fa53aaf225d
refs/heads/master
2022-04-22T16:35:52.267234
2020-04-29T14:23:58
2020-04-29T14:23:58
257,937,336
0
0
null
2020-04-22T15:10:42
2020-04-22T15:10:41
null
UTF-8
Java
false
false
404
java
package ru.job4j.condition; public class AlertDivByZero { public static void main(String[] args) { possibleDiv(-4); possibleDiv(0); } public static void possibleDiv(int number) { if (number == 0) { System.out.println("Could not div by 0."); } if (number < 0) { System.out.println("This is negative number."); } } }
[ "don.Sebastian.Pereira@mail.ru" ]
don.Sebastian.Pereira@mail.ru
081465d5b2d189c8629a972482ae7ef1792f67aa
8e78ff1aa54cf457560376cf2994379eef88d249
/src/Main.java
76c88c3adc20578c8f2784dbc16b955b8c2a4db9
[]
no_license
Arthurizijar/NLP-K_means
3e38d269b88fc39df590da6bf838be51c31fb70f
25b9305dab3db0fe1f0991b46d88f74ba78a811d
refs/heads/master
2020-06-18T19:23:01.774568
2019-07-17T07:48:03
2019-07-17T07:48:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,813
java
import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Main { public static void main(String[] args) { ArrayList<String> words = new ArrayList<>(); ArrayList<String> information = new ArrayList<>(); ArrayList<String> homoionym = new ArrayList<>(); try { FileInputStream fs = new FileInputStream("./案情特征词v1.1.txt"); readTxt(words, fs); } catch (FileNotFoundException e) { System.out.println("File 案情特征词 can not be found!"); } catch (IOException e) { System.out.println("File read error!"); } try { FileInputStream fs = new FileInputStream("./案情特征词近义词v1.0.txt"); readTxt(homoionym, fs); } catch (FileNotFoundException e) { System.out.println("File 案情近义词 can not be found!"); } catch (IOException e) { System.out.println("File read error!"); } KMeansTest kmeans = new KMeansTest(words, homoionym); try { FileInputStream fs = new FileInputStream("./案情.txt"); readTxt(information, fs); } catch (FileNotFoundException e) { System.out.println("File 案情 can not be found!"); } catch (IOException e) { System.out.println("File read error!"); } kmeans.setVector(information); KMeansData data = new KMeansData(kmeans.vector2Array(), information.size(), words.size()); // 初始化数据结构 KMeansParam param = new KMeansParam(); // 初始化参数结构 param.initCenterMehtod = KMeansParam.CENTER_RANDOM; // 设置聚类中心点的初始化模式为随机模式 // 做kmeans计算,分十四类 KMeans.doKmeans(14, data, param); // 创建Excel对象 HSSFWorkbook workbook = new HSSFWorkbook(); HSSFSheet sheet = workbook.createSheet("聚类情况"); // 查看每个点的所属聚类标号 //System.out.print("The labels of points is: "); HSSFRow title = sheet.createRow(0); title.createCell(0).setCellValue("编号"); title.createCell(1).setCellValue("聚类类号"); title.createCell(2).setCellValue("人工分类"); title.createCell(3).setCellValue("案情"); for (int i = 0; i < data.labels.length; i++) { HSSFRow row = sheet.createRow(i + 1); String[] cutter = information.get(i).split(","); row.createCell(0).setCellValue(cutter[0]); row.createCell(1).setCellValue(data.labels[i]); row.createCell(2).setCellValue(cutter[1]); row.createCell(3).setCellValue(cutter[2]); //System.out.print(data.labels[i] + " " + information.get(i)); } try { FileOutputStream output = new FileOutputStream("./案情输出.xls"); workbook.write(output); output.flush(); } catch (FileNotFoundException e) { System.out.println(e); } catch (IOException e) { System.out.println(e); } } private static void readTxt(ArrayList<String> words, FileInputStream fs) throws IOException { String str; InputStreamReader isr = new InputStreamReader(fs, "GB2312"); BufferedReader br = new BufferedReader(isr); while ((str = br.readLine()) != null) { str = str + "\n"; words.add(str); } } }
[ "17373545@buaa.edu.cn" ]
17373545@buaa.edu.cn
b7bd3c572d506921302bf9467867ead88a8fff8c
1ba33872823155f476a6f7e0c7074d0aa2432431
/src/main/java/de/hshannover/f4/trust/irongui/event/StatusChangedReceiver.java
67514a614a8301e406eb3d18781aa1b1cf0f54f8
[ "Apache-2.0" ]
permissive
trustathsh/irongui
15c7eafac686ed91b9a969ed5dc3c957a97333b0
7d48f795e2df5578bb364cd32c6048ebce49f5d9
refs/heads/master
2021-01-01T06:26:29.438446
2015-03-19T13:11:17
2015-03-19T13:11:17
9,518,232
2
1
null
null
null
null
UTF-8
Java
false
false
1,733
java
/* * #%L * ===================================================== * _____ _ ____ _ _ _ _ * |_ _|_ __ _ _ ___| |_ / __ \| | | | ___ | | | | * | | | '__| | | / __| __|/ / _` | |_| |/ __|| |_| | * | | | | | |_| \__ \ |_| | (_| | _ |\__ \| _ | * |_| |_| \__,_|___/\__|\ \__,_|_| |_||___/|_| |_| * \____/ * * ===================================================== * * Hochschule Hannover * (University of Applied Sciences and Arts, Hannover) * Faculty IV, Dept. of Computer Science * Ricklinger Stadtweg 118, 30459 Hannover, Germany * * Email: trust@f4-i.fh-hannover.de * Website: http://trust.f4.hs-hannover.de/ * * This file is part of irongui, version 0.4.8, * implemented by the Trust@HsH research group at the Hochschule Hannover. * %% * Copyright (C) 2010 - 2015 Trust@HsH * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ package de.hshannover.f4.trust.irongui.event; import de.hshannover.f4.trust.irongui.communication.Connection; /** * Interface for status changes * * @author Tobias * */ public interface StatusChangedReceiver { void processStatusEvent(Connection con, String event); }
[ "bahellma@googlemail.com" ]
bahellma@googlemail.com
9fa7e02eee5bca0f5ff92a876decf66599840be3
44a563cd25fe1b450811d6c7fbeec6dc226e0677
/part04-Part04_27.IsItInTheFile/src/main/java/IsItInTheFile.java
8e08b4a54a4b77b5e1a1516e21d98b58a0e435df
[ "MIT" ]
permissive
boardinary/JavaMooc1
ef24f77ae93b05b948f8d6082d7a43ce1c0d5e22
118852b3f3e292d2379cbee4c32b46aada5b1698
refs/heads/master
2022-12-25T22:33:55.990989
2020-04-25T12:54:51
2020-04-25T12:54:51
258,772,489
2
0
MIT
2020-10-13T21:29:52
2020-04-25T12:39:57
Java
UTF-8
Java
false
false
940
java
import java.nio.file.Paths; import java.util.Scanner; public class IsItInTheFile { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("Name of the file:"); String file = scanner.nextLine(); System.out.println("Search for:"); String searchedFor = scanner.nextLine(); boolean found = false; try (Scanner fileScanner = new Scanner(Paths.get(file))) { while (fileScanner.hasNextLine()) { if (fileScanner.nextLine().equals(searchedFor)) { System.out.println("Found!"); found = true; break; } } } catch (Exception e) { System.out.println("Reading the file " + file + " failed."); } if (found == false) { System.out.println("Not found."); } } }
[ "boardinary@gmail.com" ]
boardinary@gmail.com
493185155fbc5c4fcc0d0ec432c5b476519e83ee
abf52685452c08b0a95f3a3117cc0aff50fd163d
/zipMeAll.java
2ad2d4e0482b4f888d51dcccd1713567e285d119
[]
no_license
Niraj291/githubtest
c5775fa7fd51a11e55517a116527b8549a70273b
5b2e81af008a7a6c8b8cd70468a9f0c72eccd1e5
refs/heads/main
2023-08-10T18:32:27.203313
2021-09-24T11:50:07
2021-09-24T11:50:07
409,879,044
0
0
null
null
null
null
UTF-8
Java
false
false
354
java
class zipMeAll { public static void main(String[] args) { int arr1[] = {1,2}; int arr2[] = {3,4}; int n1 = arr1.length; int n2 = arr2.length; if(n1 == n2) { for(int i=0; i<n1; i++) { for(int j=i; j<=i;j++) { System.out.print("["+arr1[i]+","+arr2[j]+"],"); } } else { System.out.println("not same size of arrays"); } } } }
[ "noreply@github.com" ]
noreply@github.com
de4e394bf07a8619b0ae721999ebfb4099108eea
d74ae31c66c8493260e4dbf8b3cc87581337174c
/src/main/java/hello/service/Customer1924Service.java
dd7bf6cc41edf477a1ee0f49d886600e52f58607
[]
no_license
scratches/spring-data-gazillions
72e36c78a327f263f0de46fcee991473aa9fb92c
858183c99841c869d688cdbc4f2aa0f431953925
refs/heads/main
2021-06-07T13:20:08.279099
2018-08-16T12:13:37
2018-08-16T12:13:37
144,152,360
0
0
null
2021-04-26T17:19:34
2018-08-09T12:53:18
Java
UTF-8
Java
false
false
223
java
package hello.service; import org.springframework.stereotype.Service; import hello.repo.Customer1924Repository; @Service public class Customer1924Service { public Customer1924Service(Customer1924Repository repo) { } }
[ "dsyer@pivotal.io" ]
dsyer@pivotal.io
f42b5f7f2aa2dffe416cc684c78518396ec22c17
b14b5ca5f8768a19c7bb68447dfdff09d27f8c3b
/src/BracketTest.java
39cb950bf8c2997730d6dd376f50e7c46c83f471
[]
no_license
pit85/Excercises
f583cb299a88f7c441ede411e1fbd68900cb7900
b291822b056eaa40d2b34fd07f903c024aca2333
refs/heads/master
2021-01-20T00:33:19.625788
2017-04-23T16:03:43
2017-04-23T16:03:43
89,146,880
0
0
null
null
null
null
UTF-8
Java
false
false
815
java
public class BracketTest { public static void main(String[] args) { Bracket bracketTest = new Bracket(); String inputStr1 = "(a(c)"; String inputStr2 = ")b"; String inputStr3 = "(b(s))"; String inputStr4 = "(((b(s))adafasd))"; String inputStr5 = ""; System.out.println(inputStr1 + " - " + bracketTest.stringAnswer(bracketTest.isBracketClosed(inputStr1))); System.out.println(inputStr2 + " - " + bracketTest.stringAnswer(bracketTest.isBracketClosed(inputStr2))); System.out.println(inputStr3 + " - " + bracketTest.stringAnswer(bracketTest.isBracketClosed(inputStr3))); System.out.println(inputStr4 + " - " + bracketTest.stringAnswer(bracketTest.isBracketClosed(inputStr4))); System.out.println(inputStr5 + " - " + bracketTest.stringAnswer(bracketTest.isBracketClosed(inputStr5))); } }
[ "sierocinskipiotr@gmail.com" ]
sierocinskipiotr@gmail.com
dee829296802428d00e7d0675cacad7f68ce5c82
fec4c1754adce762b5c4b1cba85ad057e0e4744a
/jf-base/src/main/java/com/jf/dao/PropertyRightProsecutionLogMapper.java
9b1c3373465a73a08b7dbe7adda194d1d3719a1a
[]
no_license
sengeiou/workspace_xg
140b923bd301ff72ca4ae41bc83820123b2a822e
540a44d550bb33da9980d491d5c3fd0a26e3107d
refs/heads/master
2022-11-30T05:28:35.447286
2020-08-19T02:30:25
2020-08-19T02:30:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,319
java
package com.jf.dao; import com.jf.common.base.BaseDao; import com.jf.entity.PropertyRightProsecutionLog; import com.jf.entity.PropertyRightProsecutionLogExample; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; import java.util.List; @Repository public interface PropertyRightProsecutionLogMapper extends BaseDao<PropertyRightProsecutionLog, PropertyRightProsecutionLogExample> { int countByExample(PropertyRightProsecutionLogExample example); int deleteByExample(PropertyRightProsecutionLogExample example); int deleteByPrimaryKey(Integer id); int insert(PropertyRightProsecutionLog record); int insertSelective(PropertyRightProsecutionLog record); List<PropertyRightProsecutionLog> selectByExample(PropertyRightProsecutionLogExample example); PropertyRightProsecutionLog selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") PropertyRightProsecutionLog record, @Param("example") PropertyRightProsecutionLogExample example); int updateByExample(@Param("record") PropertyRightProsecutionLog record, @Param("example") PropertyRightProsecutionLogExample example); int updateByPrimaryKeySelective(PropertyRightProsecutionLog record); int updateByPrimaryKey(PropertyRightProsecutionLog record); }
[ "397716215@qq.com" ]
397716215@qq.com
ef3e8fdaf27f7fdd0612e71e679ba7bf23cb8c8b
228af32f0260126396f451ae215f580d5f8de8f0
/kafka-order/src/main/java/com/mz/kafka/api/OrderApi.java
11a1390973fdc822b7ff5fd6e92afd8429376e7d
[]
no_license
atlroc99/microservices-with-kafka
733957151e8c05a1a58c56c461d443bbdb29aa69
f8934d0994c09dba8dc6fe967d2a6e517d2a7817
refs/heads/master
2023-01-24T18:13:23.291395
2020-11-30T18:05:52
2020-11-30T18:05:52
316,769,693
0
0
null
null
null
null
UTF-8
Java
false
false
1,401
java
package com.mz.kafka.api; import com.mz.kafka.api.request.OrderRequest; import com.mz.kafka.api.resposne.OrderResponse; import com.mz.kafka.command.service.OrderService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/api/v1/orders") public class OrderApi { @Autowired OrderService orderService; @PostMapping(value = "/new-order", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<OrderResponse> createNewOrder(@RequestBody OrderRequest orderRequest) { // 1. use service to save order String orderNumber = orderService.saveOrder(); // 2.construct an order response -> we create a new instance of OrderResponse class by passing the orderNumber OrderResponse orderResponse = OrderResponse.builder().orderNumber(orderNumber).build(); //3. resturn the OrderResponse as ResponseEntity body return ResponseEntity.ok().body(orderResponse); } }
[ "jeffry.zaman@gmail.com" ]
jeffry.zaman@gmail.com
3615fd3bbf1b4d701d1eba5810abde01322f8ba3
09d5f13df9fe7dfc27769308f094459a0ee73870
/src/main/java/com/springlab/dao/Hibernate.java
3606d0895b49af23202516f1707b028948cb96e1
[]
no_license
DuyTang1112/Career_Development_Center
ad811a81c7ec2da98738ed1fec3ebbce84956140
3af40529e3b21f6883c8d7335bf7ad9fe5c21ab3
refs/heads/master
2020-03-16T13:19:42.254031
2018-05-09T01:50:02
2018-05-09T01:50:02
132,687,051
0
0
null
null
null
null
UTF-8
Java
false
false
2,365
java
package com.springlab.dao; import java.util.List; import com.springlab.hibernate.model.Department; import com.springlab.hibernate.model.Login; import com.springlab.hibernate.model.Post; import com.springlab.hibernate.model.Role; import com.springlab.hibernate.model.User; /** * Interface provides capability of a data access layer to database * @author Duy Tang * */ public interface Hibernate { /** * Get the list of all departments * @return list of all departments */ public List<Department> getDepartment(); /** * Get the list of all users * @return list of all users */ public List<User> getUsers(); /** * Get info of an user * @param id * @return User object */ public User getUser(Integer id); /** * Get the list of login infos * @return list of login infos */ public List<Login> getLoginInfo(); /** * get login info of an user * @param userid * @return */ public Login getLogin(Integer userid); /** * Get the list of posts * @return list of posts */ public List<Post> getPost(); /** * Get one post * @param postid * @return post if exist, else null */ public Post getOnePost(Integer postid); /** * Get the list of Roles * @return list of roles */ public List<Role> getRoles(); /** * Get role object based on id * @param roleid * @return */ public Role getOneRole(Integer roleid); /** * Add new user or update existing user * @param user, update - true if updating, false if not * @return id of user added or null if updated */ public Integer addUser(User user,boolean update); /** * Add new user or update existing post * @param post, update - true if updating, false if not * @return id of post added or null if updated */ public Integer addPost(Post post,boolean update); /** * Add new login info or update existing one * @param login, update - true if updating, false if not * @return userid added or null if updated */ public Integer addLogin(Login login,boolean update); /** * Delete user from the database * @param userid */ public void deleteUser(Integer userid); /** * Delete login info of an user from the database * @param userid */ public void deleteLogin(Integer userid); /** * Delete post from the database * @param postid */ public void deletePost(Integer postid); }
[ "anhduytang@gmail.com" ]
anhduytang@gmail.com
3268149899bb6b729b185cb4f92b4a4c8a83596c
36827991b258e7b128fbd53118520c80f178b9c7
/build/generated/src/org/apache/jsp/UserZone/usereditprofile_jsp.java
d0e69c94ee1d761173693e9dda5b4ac398d2713f
[]
no_license
Divyansh898/Online-Counselling-Management-System
d65cf7b511dc59184dbb620215a459d2430bd9b8
7d54871673666f0ea8b91d434fb399ffa94be09b
refs/heads/master
2023-08-14T23:30:17.223388
2021-10-19T13:06:44
2021-10-19T13:06:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
20,289
java
package org.apache.jsp.UserZone; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; public final class usereditprofile_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); private static java.util.List<String> _jspx_dependants; static { _jspx_dependants = new java.util.ArrayList<String>(2); _jspx_dependants.add("/UserZone/../UserZone/header.jsp"); _jspx_dependants.add("/UserZone/../UserZone/footer.jsp"); } private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector; public java.util.List<String> getDependants() { return _jspx_dependants; } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("<!DOCTYPE html>\n"); out.write("<html>\n"); out.write(" <head>\n"); out.write(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n"); out.write(" <link href=\"css/bootstrap.min.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"); out.write(" <link href=\"css/font-awesome.min.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"); out.write(" <script src=\"js/jquery.js\" type=\"text/javascript\"></script>\n"); out.write(" <script src=\"js/bootstrap.min.js\" type=\"text/javascript\"></script>\n"); out.write(" <script>\n"); out.write("function myFunction() {\n"); out.write(" var input, filter, ul, li, a, i;\n"); out.write(" input = document.getElementById(\"mySearch\");\n"); out.write(" filter = input.value.toUpperCase();\n"); out.write(" ul = document.getElementById(\"myMenu\");\n"); out.write(" li = ul.getElementsByTagName(\"li\");\n"); out.write(" for (i = 0; i < li.length; i++) {\n"); out.write(" a = li[i].getElementsByTagName(\"a\")[0];\n"); out.write(" if (a.innerHTML.toUpperCase().indexOf(filter) > -1) {\n"); out.write(" li[i].style.display = \"\";\n"); out.write(" } else {\n"); out.write(" li[i].style.display = \"none\";\n"); out.write(" }\n"); out.write(" }\n"); out.write("}\n"); out.write("</script>\n"); out.write("<style>\n"); out.write("#myMenu {\n"); out.write(" list-style-type: none;\n"); out.write(" padding: 0;\n"); out.write(" margin: 0;\n"); out.write("}\n"); out.write("\n"); out.write("#myMenu li a {\n"); out.write(" padding: 12px;\n"); out.write(" text-decoration: none;\n"); out.write(" color: black;\n"); out.write(" display: block\n"); out.write("}\n"); out.write("\n"); out.write("#myMenu li a:hover {\n"); out.write(" background-color: #eee;\n"); out.write("}\n"); out.write("</style>\n"); out.write(" </head>\n"); out.write(" <body>\n"); out.write(" "); out.write("\n"); out.write("\n"); out.write("\n"); out.write("<!DOCTYPE html>\n"); out.write("<html>\n"); out.write(" <head>\n"); out.write(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n"); out.write(" <title>JSP Page</title>\n"); out.write(" <link href=\"css/bootstrap.min.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"); out.write(" <link href=\"css/font-awesome.min.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"); out.write(" <script src=\"js/jquery.js\" type=\"text/javascript\"></script>\n"); out.write(" <script src=\"js/bootstrap.min.js\" type=\"text/javascript\"></script>\n"); out.write(" </head>\n"); out.write(" <body>\n"); out.write(" <div class=\"container-fluid\">\n"); out.write(" <div class=\"row\" style=\"background:#181f6d;min-height:70px;\">\n"); out.write(" <div class=\"col-sm-2\"> <img src=\"logooffrontpage1.jpg\" style=\"height:72px;width:100px;margin-left: -15px;\"/></div>\n"); out.write(" <div class=\"colsm-6\"><span style=\"color:white ;font-size: 50px;font-family: Imprint MT Shadow;;margin-left: -50px;margin-top: 50px;font-weight: bold;\">Online Counseling System For Admission</span></div>\n"); out.write(" <div class=\"col-sm-4\"></div>\n"); out.write(" </div>\n"); out.write(" <div class=\"row\" style=\"background:#fedbb4;min-height:50px;\">\n"); out.write(" <div class=\"col-sm-9\"> </div>\n"); out.write(" <div class=\"colsm-3\"><span style=\"color: white;font-size: 30px;font-family: Imprint MT Shadow;;margin-left: 0px;font-weight: bold;\">Welcome in User Zone</span></div>\n"); out.write(" \n"); out.write(" </div>\n"); out.write(" \n"); out.write(" </div>\n"); out.write(" </body>\n"); out.write("</html>\n"); out.write("\n"); out.write(" <div class=\"container-fluid\">\n"); out.write(" <div class=\"row\">\n"); out.write(" \n"); out.write(" <div class=\"col-sm-3\" style=\"background:#dc7503;min-height: 800px;\">\n"); out.write(" <div class=\"left\" style=\"background-color:#dc7503;\">\n"); out.write(" \n"); out.write(" \n"); out.write(" <input type=\"text\" id=\"mySearch\" class=\"form-control\" onkeyup=\"myFunction()\" placeholder=\"Search..\" title=\"Type in a category\" style=\"margin-top:30px;\">\n"); out.write(" <ul id=\"myMenu\" style=\"margin-top:30px;\">\n"); out.write(" <li><a href=\"dashboard.jsp\" class=\"btn btn-primary\" style=\"background: #fedbb4;border:1px solid #dc7503;color:#dc7503;font-size:20px;font-weight: bold;\">Home </a></li>\n"); out.write(" <li><a href=\"userdetail.jsp\" class=\"btn btn-primary\" style=\"background: #fedbb4;border:1px solid #dc7503;color:#dc7503;font-size:20px;font-weight: bold;\">Registration Details </a></li>\n"); out.write(" <li><a href=\"submitfees.jsp\" class=\"btn btn-primary\" style=\"background: #fedbb4;border:1px solid #dc7503;color:#dc7503;font-size:20px;font-weight: bold;\">Submit fee </a></li>\n"); out.write("\n"); out.write(" <li><a href=\"downloadadmitcard.jsp\" class=\"btn btn-primary\" style=\"background: #fedbb4;border:1px solid #dc7503;color:#dc7503;font-size:20px;font-weight: bold;\">Download admit card</a></li>\n"); out.write(" <li><a href=\"usernotification.jsp\" class=\"btn btn-primary\" style=\"background: #fedbb4;border:1px solid #dc7503;color:#dc7503;font-size:20px;font-weight: bold;\">Notifications</a></li>\n"); out.write(" <li><a href=\"usercourses.jsp\" class=\"btn btn-primary\" style=\"background: #fedbb4;border:1px solid #dc7503;color:#dc7503;font-size:20px;font-weight: bold;\">Courses</a></li>\n"); out.write(" <li><a href=\"feedbackform.jsp\" class=\"btn btn-default\" style=\"background: #fedbb4;color:#dc7503;font-size:20px;font-weight: bold;\">Feedback </a></li>\n"); out.write(" <div class=\"dropdown\" >\n"); out.write(" <button class=\" dropdown-toggle form-control btn btn-info\" type=\"button\" id=\"dropdownMenu1\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"true\" style=\"background: #fedbb4;border:1px solid #dc7503;color:#dc7503;font-size:20px;font-weight: bold;text-decoration-color:#dc7503; \">\n"); out.write(" Settings\n"); out.write(" <span class=\"caret\"></span>\n"); out.write(" </button>\n"); out.write(" <ul class=\"dropdown-menu form-control\" id=\"myMenu\" aria-labelledby=\"dropdownMenu1\" style=\"background:#dc7503;\">\n"); out.write(" <li><a href=\"userdetail.jsp\" class=\"btn btn-primary\" style=\"background: #fedbb4;border:1px solid #dc7503;color:#dc7503;font-size:20px;font-weight: bold;margin-top:-1px;\">View Profile</a></li>\n"); out.write(" <li><a href=\"usereditprofile.jsp\" class=\"btn btn-primary\" style=\"background: #fedbb4;border:1px solid #dc7503;color:#dc7503;font-size:20px;font-weight: bold;\">Edit Profile </a></li>\n"); out.write(" <li><a href=\"changepassword.jsp\" class=\"btn btn-primary\" style=\"background: #fedbb4;border:1px solid #dc7503;color:#dc7503;font-size:20px;font-weight: bold;\">Change Password</a></li>\n"); out.write(" <li><a href=\"Logout.html\" class=\"btn btn-primary\" style=\"background: #fedbb4;border:1px solid #dc7503; color:#dc7503;font-size:20px;font-weight: bold;\">Logout</a></li>\n"); out.write(" </ul>\n"); out.write(" </div>\n"); out.write(" \n"); out.write(" </ul>\n"); out.write(" </div>\n"); out.write(" \n"); out.write(" \n"); out.write(" </div>\n"); out.write(" <div class=\"col-sm-9\" style=\"background: #fcf4b6;min-height: 800px;\">\n"); out.write(" <div class=\"row\" style=\"min-height:100px;\"></div>\n"); out.write(" <div class=\"row\">\n"); out.write(" <div class=\"col-sm-4\"></div>\n"); out.write(" <div class=\"col-sm-5\" style=\"background:#181f6d;\">\n"); out.write(" <div class=\"row\" style=\"min-height:70px;\"> <span style=\"color:#43aada;font-size:30px;font-family: 'monotype corsiva';font-weight: bold;margin-left:40%\"> Edit Profile</span></div>\n"); out.write(" <form class=\"form-horizontal\" action=\"../editprofile\" method=\"POST\" enctype=\"multipart/form-data\" >\n"); out.write(" <div class=\"form-group\">\n"); out.write(" <label class=\"control-label col-sm-3\" style=\"color:#43aada\">Name</label>\n"); out.write(" <div class=\"col-sm-9\">\n"); out.write(" <input type=\"text\" class=\"form-control\" id=\"name\" name=\"name\" placeholder=\"Enter Name\">\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" <div class=\"form-group\">\n"); out.write(" <label class=\"control-label col-sm-3\" style=\"color:#43aada;\">Father Name</label>\n"); out.write(" <div class=\"col-sm-9\"> \n"); out.write(" <input type=\"text\" class=\"form-control\" id=\"fname\" name=\"Fname\" placeholder=\"Enter Father Name\">\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" <div class=\"form-group\">\n"); out.write(" <label class=\"control-label col-sm-3\" style=\"color:#43aada;\"> Gender</label>\n"); out.write(" <div class=\"col-sm-9\"> \n"); out.write(" <input type=\"radio\" name=\"gender\" value=\"Male\" style=\"color:red;font-size:20px;margin-left: 10px;\"/> <span style=\"color:#43aada;;font-size:20px;font-family: 'monotype corsiva';\">\n"); out.write(" Male</span>\n"); out.write(" <input type=\"radio\" name=\"gender\" value=\"Female\" checked=\"true\" style=\"color:white;font-size:20px;margin-left: 10px;\"/> <span style=\"color:#43aada;;font-size:20px;font-family: 'monotype corsiva';\">\n"); out.write(" Female</span>\n"); out.write(" <br>\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" <div class=\"form-group\">\n"); out.write(" <label class=\"control-label col-sm-3\" style=\"color:#43aada;\">Mobile No.</label>\n"); out.write(" <div class=\"col-sm-9\"> \n"); out.write(" <input type=\"number\" class=\"form-control\" id=\"mob\" name=\"mob\" placeholder=\"Enter Mobile No.\">\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" <div class=\"form-group\">\n"); out.write(" <label class=\"control-label col-sm-3\" style=\"color:#43aada;\">Email</label>\n"); out.write(" <div class=\"col-sm-9\"> \n"); out.write(" <input type=\"email\" class=\"form-control\" id=\"email\" name=\"email\" placeholder=\"Enter Email\">\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" <div class=\"form-group\">\n"); out.write(" <label class=\"control-label col-sm-3\" style=\"color:#43aada;\">Address</label>\n"); out.write(" <div class=\"col-sm-9\"> \n"); out.write(" <input type=\"text\" class=\"form-control\" id=\"address\" name=\"address\" placeholder=\"Enter Address\">\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" <div class=\"form-group\">\n"); out.write(" <label class=\"control-label col-sm-3\" style=\"color:#43aada;\">Picture</label>\n"); out.write(" <div class=\"col-sm-9\"> \n"); out.write(" <input type=\"file\" class=\"form-control\" id=\"pic\" name=\"pic\" >\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" \n"); out.write(" <div class=\"form-group\"> \n"); out.write(" <div class=\"col-sm-offset-2 col-sm-10\">\n"); out.write(" <div class=\"checkbox\">\n"); out.write(" <label style=\"color:#43aada;\"><input type=\"checkbox\"> Remember me</label>\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" <div class=\"form-group\"> \n"); out.write(" <div class=\"col-sm-offset-2 col-sm-10\">\n"); out.write(" <button type=\"submit\" class=\"btn btn-default\" style=\"background: #43aada;color:white;\">Submit</button>\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" \n"); out.write("</form>\n"); out.write(" \n"); out.write(" </div>\n"); out.write(" <div class=\"col-sm-3\"></div>\n"); out.write(" \n"); out.write(" </div>\n"); out.write(" \n"); out.write(" </div>\n"); out.write(" \n"); out.write("\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" "); out.write("\n"); out.write("\n"); out.write("\n"); out.write("<!DOCTYPE html>\n"); out.write("<html>\n"); out.write(" <head>\n"); out.write(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n"); out.write(" <title>JSP Page</title>\n"); out.write(" <link href=\"css/bootstrap.min.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"); out.write(" <link href=\"css/font-awesome.min.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"); out.write(" <script src=\"js/jquery.js\" type=\"text/javascript\"></script>\n"); out.write(" <script src=\"js/bootstrap.min.js\" type=\"text/javascript\"></script>\n"); out.write(" </head>\n"); out.write(" <body>\n"); out.write(" <div class=\"container-fluid\" style=\"background:#181f6d;\">\n"); out.write(" <div class=\"row\" >\n"); out.write(" <div class=\"col-sm-2\"><span style=\"color:#fcf4b6; font-size: 25px; font-family:'monotype corsiva';margin-left: 50px;\"><br>Quick Link<br><a href=\"#\" style=\"color:#fcf4b6;text-decoration-line: none\">Home</a><br><a href=\"#\" style=\"color:#fcf4b6;text-decoration-line: none\">Registration Detail</a><br><a href=\"#\" style=\"color:#fcf4b6;text-decoration-line: none\">Print form</a><br><a href=\"#\" style=\"color:#fcf4b6;text-decoration-line: none\">Feedback</a><br><a href=\"#\" style=\"color:#fcf4b6;text-decoration-line: none\">Setting</a><br></span></div>\n"); out.write("\t\t <div class=\"col-sm-2\" style=\"color:#fcf4b6; font-size: 25px; font-family:'monotype corsiva'\"> <br>Contact Us <br><span class=\"fa fa-phone\" style=\"color:skyblue\"></span> 6395078722<br><span class=\"fa fa-phone\" style=\"color:skyblue\"></span> 7830088134</div>\n"); out.write(" <div class=\"col-sm-5\"><span style=\"color:#fcf4b6; font-size: 25px; font-family:'monotype corsiva';margin:0px auto\"><br><center>Visit Us</center></span><br><iframe src=\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3558.915709771292!2d80.95625001499708!3d26.87441898314418!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x399bfdd563c25cbf%3A0xbcefbb4f300d416c!2sMecatredz+Technology+Pvt+Ltd+Lucknow!5e0!3m2!1sen!2sin!4v1564057154391!5m2!1sen!2sin\" width=\"100%\" height=\"200px\" frameborder=\"0\" style=\"border:0\" allowfullscreen></iframe></div>\n"); out.write(" \n"); out.write(" <div class=\"col-sm-3\" style=\"font-size:30px;color:#fcf4b6;margin-top:10px\">\n"); out.write("\t\t<span style=\"color:#fcf4b6; font-size: 25px; font-family:'monotype corsiva'\">Follow Us</span></br>\n"); out.write("\t\t\n"); out.write(" <a href=\"https://www.facebook.com/\"><span class=\"fa fa-facebook-square\" style=\"color:blue\"></span></a>\n"); out.write("<a href=\"https://www.twitter.com/\"><span class=\"fa fa-twitter-square\" style=\"color:skyblue;\"></span></a>\n"); out.write("<a href=\"https://www.instagram.com/\"><span class=\"fa fa-instagram\" style=\"color:pink\"></span></a>\n"); out.write("<a href=\"https://www.whatsapp.com/\"><span class=\"fa fa-whatsapp\" style=\"color:green\"></span></a>\n"); out.write("<a href=\"https://www.google.com/\"><span class=\"fa fa-google-plus \" style=\"color:white\"></span></a>\n"); out.write("<br><span style=\"color:#fcf4b6; font-size: 25px; font-family:'monotype corsiva'\" ><a href=\"https://mail.google.com\"><span class=\"glyphicon-envelope \" style=\"color:red;font-size: 30px;\"></span></a>divyanshvarshney143@gmail.com</span> \n"); out.write("</div>\n"); out.write("</div>\n"); out.write("<div class=\"row\" >\n"); out.write(" <div class=\"col-sm-12\" style=\"color:#fcf4b6; font-size: 25px; font-family:'monotype corsiva';margin-top:0px\" ><center><br>copyright@mecatredztechnology.pvt.lmt<br> Design by Divyansh GP Madhogarh</center> </div>\n"); out.write("</div>\n"); out.write("</div>\n"); out.write(" </body>\n"); out.write("</html>\n"); out.write(" \n"); out.write(" \n"); out.write(" </body>\n"); out.write("</html>\n"); out.write("\n"); out.write("\n"); } catch (Throwable t) { if (!(t instanceof SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }
[ "divyansh.1923cse1002@kiet.edu" ]
divyansh.1923cse1002@kiet.edu
818bd93534a94cd28c0eb6d69febf00961bf2cab
07f2fa83cafb993cc107825223dc8279969950dd
/game_logic_server/src/main/java/com/xgame/logic/server/core/db/cache/cache/LoadingCacheProxy.java
7f52846d26b6d07779b3bc53acdeeecf5cf55d4a
[]
no_license
hw233/x2-slg-java
3f12a8ed700e88b81057bccc7431237fae2c0ff9
03dcdab55e94ee4450625404f6409b1361794cbf
refs/heads/master
2020-04-27T15:42:10.982703
2018-09-27T08:35:27
2018-09-27T08:35:27
174,456,389
0
1
null
null
null
null
UTF-8
Java
false
false
89
java
package com.xgame.logic.server.core.db.cache.cache; public class LoadingCacheProxy { }
[ "ityuany@126.com" ]
ityuany@126.com
fca6cfb9ec9ff3460809b0dcca3f2bb2bf87d484
0583c5dc6d5f1c16fff54d56e46741c8ea32a9c1
/src/main/java/com/ups/hackathon/User.java
7e0694fe5724505d8a00828d48fef4a3c52a5834
[]
no_license
2020-IT-Hackathon/StepUPS
68cb332cc4f1396a2903d83de7bdb8e9019acc48
f0aabe70d3da5b64ca0c2bf5546bacbb223ff825
refs/heads/master
2022-11-19T11:00:34.602229
2020-07-17T12:38:18
2020-07-17T12:38:18
280,178,960
0
0
null
null
null
null
UTF-8
Java
false
false
3,460
java
package com.ups.hackathon; import java.util.List; import java.util.ArrayList; public class User { private String name; private String address; private String email; private String initiativeType; private List skills; public User(String name, String address, String email, String initiativeType, String skillA, String skillB, String skillC, String skillD, String skillE) { this.name = name; this.address = address; this.email = email; this.initiativeType = initiativeType; skills = new ArrayList<String>(); skills.add(skillA); skills.add(skillB); skills.add(skillC); skills.add(skillD); skills.add(skillE); } public User(String name, String address, String email, String initiativeType, String skillA, String skillB, String skillC, String skillD) { this.name = name; this.address = address; this.email = email; this.initiativeType = initiativeType; skills = new ArrayList<String>(); skills.add(skillA); skills.add(skillB); skills.add(skillC); skills.add(skillD); } public User(String name, String address, String email, String initiativeType, String skillA, String skillB, String skillC) { this.name = name; this.address = address; this.email = email; this.initiativeType = initiativeType; skills = new ArrayList<String>(); skills.add(skillA); skills.add(skillB); skills.add(skillC); } public User(String name, String address, String email, String initiativeType, String skillA, String skillB) { this.name = name; this.address = address; this.email = email; this.initiativeType = initiativeType; skills = new ArrayList<String>(); skills.add(skillA); skills.add(skillB); } public User(String name, String address, String email, String initiativeType, String skillA) { this.name = name; this.address = address; this.email = email; this.initiativeType = initiativeType; skills = new ArrayList<String>(); skills.add(skillA); } public User(String name, String address, String email, String initiativeType) { this.name = name; this.address = address; this.email = email; this.initiativeType = initiativeType; skills = new ArrayList<String>(); } public User(String name, String address, String email) { this.name = name; this.address = address; this.email = email; skills = new ArrayList<String>(); } public String getName() { return name; } public String getAddress() { return address; } public String getEmail() { return email; } public String getInitiative() { return initiativeType; } public String getSkills() { return skill; } public void setName(String newName) { name = newName; } public void setAddress(String newAddress) { address = newAddress; } public void setEmail(String newEmail) { email = newEmail; } public void addSkill(String newSkill) { if (skills.size() < 5) skills.add(newSkill); } public void removeSkill(String skillToRemove) { if (skills.contains(skillToRemove)) skills.remove(skillToRemove); } }
[ "DFV0NCL@aad.ups.com" ]
DFV0NCL@aad.ups.com
7efeea4e1587063fd0e012751fa1aa17861e371d
95d20c83d8aff34e314c56a3ecb2b87c9fa9fc86
/Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/CodeUnitMergeManager6Test.java
ae3364b4aa1b7ffeebd4e4e6e07a3eee77f2e74f
[ "GPL-1.0-or-later", "GPL-3.0-only", "Apache-2.0", "LicenseRef-scancode-public-domain", "LGPL-2.1-only", "LicenseRef-scancode-unknown-license-reference" ]
permissive
NationalSecurityAgency/ghidra
969fe0d2ca25cb8ac72f66f0f90fc7fb2dbfa68d
7cc135eb6bfabd166cbc23f7951dae09a7e03c39
refs/heads/master
2023-08-31T21:20:23.376055
2023-08-29T23:08:54
2023-08-29T23:08:54
173,228,436
45,212
6,204
Apache-2.0
2023-09-14T18:00:39
2019-03-01T03:27:48
Java
UTF-8
Java
false
false
8,468
java
/* ### * IP: GHIDRA * * 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 ghidra.app.merge.listing; import static org.junit.Assert.*; import org.junit.Test; import ghidra.program.database.OriginalProgramModifierListener; import ghidra.program.database.ProgramDB; import ghidra.program.model.address.AddressSet; import ghidra.program.model.listing.Instruction; import ghidra.program.model.listing.Listing; import ghidra.program.model.symbol.*; import ghidra.program.model.util.CodeUnitInsertionException; /** * Test the merge of the versioned program's listing. * Provides tests that create instructions with overrides in various combinations. * For tests with conflicts, checks selection of latest, my, or original code unit(s). */ public class CodeUnitMergeManager6Test extends AbstractListingMergeManagerTest { public CodeUnitMergeManager6Test() { super(); } @Test public void testAddLengthOverrideMyInstrPickMyInstr() throws Exception { mtf.initialize("DiffTestPgm1", new OriginalProgramModifierListener() { @Override public void modifyOriginal(ProgramDB program) throws Exception { int txId = program.startTransaction("Modify Original Program"); boolean commit = false; try { // nop #0x3 11011001 00110001 00000000 // imm r1,#0x300 00110001 00000000 // imm r0,#0x0 00000000 00000000 setBytes(program, "0x10013d9", new byte[] { (byte) 0xd9, 0x31, 0, 0, 0 }); commit = true; } finally { program.endTransaction(txId, commit); } } @Override public void modifyLatest(ProgramDB program) { int txId = program.startTransaction("Modify Latest Program"); boolean commit = false; try { disassemble(program, "0x10013d9", "0x10013dc"); commit = true; } finally { program.endTransaction(txId, commit); } } @Override public void modifyPrivate(ProgramDB program) { int txId = program.startTransaction("Modify My Program"); boolean commit = false; try { disassemble(program, "0x10013d9", "0x10013dc"); Listing listing = program.getListing(); Instruction instr = listing.getInstructionAt(addr(program, "0x10013d9")); try { instr.setLengthOverride(1); } catch (CodeUnitInsertionException e) { failWithException("Unexpected exception", e); } disassemble(program, "0x10013da", "0x10013db"); instr = listing.getInstructionAt(addr(program, "0x10013da")); assertNotNull("Failed to create overlapped instruction", instr); commit = true; } finally { program.endTransaction(txId, commit); } } }); executeMerge(ASK_USER); chooseCodeUnit("0x10013d9", "0x10013db", KEEP_MY); waitForMergeCompletion(); assertSameCodeUnits(resultProgram, myProgram, new AddressSet(addr("0x10013d9"), addr("0x10013db"))); ReferenceManager refMgr = resultProgram.getReferenceManager(); Reference[] refs = refMgr.getReferencesFrom(addr("0x10013d9")); assertEquals(1, refs.length); assertEquals(RefType.FALL_THROUGH, refs[0].getReferenceType()); assertEquals(addr("0x10013dc"), refs[0].getToAddress()); } @Test public void testModifyLengthOverrideMyInstrPickOriginalInstr() throws Exception { mtf.initialize("DiffTestPgm1", new OriginalProgramModifierListener() { @Override public void modifyOriginal(ProgramDB program) throws Exception { int txId = program.startTransaction("Modify Original Program"); boolean commit = false; try { // nop #0x3 11011001 00110001 00000000 // imm r1,#0x300 00110001 00000000 // imm r0,#0x0 00000000 00000000 setBytes(program, "0x10013d9", new byte[] { (byte) 0xd9, 0x31, 0, 0, 0 }); disassemble(program, "0x10013d9", "0x10013dc"); Listing listing = program.getListing(); Instruction instr = listing.getInstructionAt(addr(program, "0x10013d9")); try { instr.setLengthOverride(1); } catch (CodeUnitInsertionException e) { failWithException("Unexpected exception", e); } commit = true; } finally { program.endTransaction(txId, commit); } } @Override public void modifyLatest(ProgramDB program) { int txId = program.startTransaction("Modify Latest Program"); boolean commit = false; try { disassemble(program, "0x10013da", "0x10013db"); Listing listing = program.getListing(); Instruction instr = listing.getInstructionAt(addr(program, "0x10013da")); assertNotNull("Failed to create overlapped instruction", instr); commit = true; } finally { program.endTransaction(txId, commit); } } @Override public void modifyPrivate(ProgramDB program) { int txId = program.startTransaction("Modify My Program"); boolean commit = false; try { clear(program, "0x10013d9", "0x10013d9"); disassemble(program, "0x10013d9", "0x10013dc"); commit = true; } finally { program.endTransaction(txId, commit); } } }); executeMerge(ASK_USER); chooseCodeUnit("0x10013d9", "0x10013db", KEEP_ORIGINAL); waitForMergeCompletion(); assertSameCodeUnits(resultProgram, originalProgram, new AddressSet(addr("0x10013d9"), addr("0x10013db"))); ReferenceManager refMgr = resultProgram.getReferenceManager(); Reference[] refs = refMgr.getReferencesFrom(addr("0x10013d9")); assertEquals(1, refs.length); assertEquals(RefType.FALL_THROUGH, refs[0].getReferenceType()); assertEquals(addr("0x10013dc"), refs[0].getToAddress()); } @Test public void testAddLengthAndFallthroughOverrideMyInstrPickMyInstr() throws Exception { mtf.initialize("DiffTestPgm1", new OriginalProgramModifierListener() { @Override public void modifyOriginal(ProgramDB program) throws Exception { int txId = program.startTransaction("Modify Original Program"); boolean commit = false; try { // nop #0x3 11011001 00110001 00000000 // imm r1,#0x300 00110001 00000000 // imm r0,#0x0 00000000 00000000 setBytes(program, "0x10013d9", new byte[] { (byte) 0xd9, 0x31, 0, 0, 0 }); commit = true; } finally { program.endTransaction(txId, commit); } } @Override public void modifyLatest(ProgramDB program) { int txId = program.startTransaction("Modify Latest Program"); boolean commit = false; try { disassemble(program, "0x10013d9", "0x10013dc"); commit = true; } finally { program.endTransaction(txId, commit); } } @Override public void modifyPrivate(ProgramDB program) { int txId = program.startTransaction("Modify My Program"); boolean commit = false; try { disassemble(program, "0x10013d9", "0x10013dc"); Listing listing = program.getListing(); Instruction instr = listing.getInstructionAt(addr(program, "0x10013d9")); try { instr.setLengthOverride(1); } catch (CodeUnitInsertionException e) { failWithException("Unexpected exception", e); } instr.setFallThrough(addr(program, "0x10013de")); disassemble(program, "0x10013da", "0x10013db"); instr = listing.getInstructionAt(addr(program, "0x10013da")); assertNotNull("Failed to create overlapped instruction", instr); commit = true; } finally { program.endTransaction(txId, commit); } } }); executeMerge(ASK_USER); chooseCodeUnit("0x10013d9", "0x10013db", KEEP_MY); waitForMergeCompletion(); assertSameCodeUnits(resultProgram, myProgram, new AddressSet(addr("0x10013d9"), addr("0x10013db"))); ReferenceManager refMgr = resultProgram.getReferenceManager(); Reference[] refs = refMgr.getReferencesFrom(addr("0x10013d9")); assertEquals(1, refs.length); assertEquals(RefType.FALL_THROUGH, refs[0].getReferenceType()); assertEquals(addr("0x10013de"), refs[0].getToAddress()); } }
[ "ghidra1@users.noreply.github.com" ]
ghidra1@users.noreply.github.com
09eac6265072e603c0f9d2e679d41b1904717365
ff0c33ccd3bbb8a080041fbdbb79e29989691747
/jdk.localedata/sun/text/resources/cldr/ext/FormatData_es_AR.java
36a480528a1fb258b30a04661041bfe29a02d399
[]
no_license
jiecai58/jdk15
7d0f2e518e3f6669eb9ebb804f3c89bbfb2b51f0
b04691a72e51947df1b25c31175071f011cb9bbe
refs/heads/main
2023-02-25T00:30:30.407901
2021-01-29T04:48:33
2021-01-29T04:48:33
330,704,930
0
1
null
null
null
null
UTF-8
Java
false
false
6,313
java
/* * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * COPYRIGHT AND PERMISSION NOTICE * * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved. * Distributed under the Terms of Use in * http://www.unicode.org/copyright.html. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of the Unicode data files and any associated documentation * (the "Data Files") or Unicode software and any associated documentation * (the "Software") to deal in the Data Files or Software * without restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, and/or sell copies of * the Data Files or Software, and to permit persons to whom the Data Files * or Software are furnished to do so, provided that * (a) this copyright and permission notice appear with all copies * of the Data Files or Software, * (b) this copyright and permission notice appear in associated * documentation, and * (c) there is clear notice in each modified Data File or in the Software * as well as in the documentation associated with the Data File(s) or * Software that the data or software has been modified. * * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT OF THIRD PARTY RIGHTS. * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THE DATA FILES OR SOFTWARE. * * Except as contained in this notice, the name of a copyright holder * shall not be used in advertising or otherwise to promote the sale, * use or other dealings in these Data Files or Software without prior * written authorization of the copyright holder. */ package sun.text.resources.cldr.ext; import java.util.ListResourceBundle; public class FormatData_es_AR extends ListResourceBundle { @Override protected final Object[][] getContents() { final String[] metaValue_DayNarrows = new String[] { "D", "L", "M", "M", "J", "V", "S", }; final String[] metaValue_QuarterNames = new String[] { "1.er trimestre", "2.\u00ba trimestre", "3.er trimestre", "4.\u00ba trimestre", }; final String[] metaValue_AmPmMarkers = new String[] { "a.\u00a0m.", "p.\u00a0m.", }; final Object[][] data = new Object[][] { { "japanese.AmPmMarkers", metaValue_AmPmMarkers }, { "islamic.AmPmMarkers", metaValue_AmPmMarkers }, { "AmPmMarkers", metaValue_AmPmMarkers }, { "roc.QuarterNames", metaValue_QuarterNames }, { "islamic.DayNarrows", metaValue_DayNarrows }, { "abbreviated.AmPmMarkers", metaValue_AmPmMarkers }, { "DayNarrows", metaValue_DayNarrows }, { "japanese.abbreviated.AmPmMarkers", metaValue_AmPmMarkers }, { "buddhist.QuarterNames", metaValue_QuarterNames }, { "buddhist.abbreviated.AmPmMarkers", metaValue_AmPmMarkers }, { "roc.DayNarrows", metaValue_DayNarrows }, { "islamic.QuarterNames", metaValue_QuarterNames }, { "roc.AmPmMarkers", metaValue_AmPmMarkers }, { "islamic.abbreviated.AmPmMarkers", metaValue_AmPmMarkers }, { "latn.NumberElements", new String[] { ",", ".", ";", "%", "0", "#", "-", "E", "\u2030", "\u221e", "NaN", "", "", } }, { "buddhist.AmPmMarkers", metaValue_AmPmMarkers }, { "latn.NumberPatterns", new String[] { "#,##0.###", "\u00a4\u00a0#,##0.00", "#,##0\u00a0%", "\u00a4\u00a0#,##0.00;(\u00a4\u00a0#,##0.00)", } }, { "buddhist.DayNarrows", metaValue_DayNarrows }, { "japanese.DayNarrows", metaValue_DayNarrows }, { "QuarterNames", metaValue_QuarterNames }, { "field.dayperiod", "a.\u00a0m./p.\u00a0m." }, { "QuarterAbbreviations", metaValue_QuarterNames }, { "standalone.QuarterNames", metaValue_QuarterNames }, { "japanese.QuarterNames", metaValue_QuarterNames }, { "roc.abbreviated.AmPmMarkers", metaValue_AmPmMarkers }, }; return data; } }
[ "caijie2@tuhu.cn" ]
caijie2@tuhu.cn
96e0f4a355a9d919685a0096ee0901eccf4fd9fd
5db366fa3409f707634c5cbc401fc55ec7fe1c52
/orm/src/main/java/org/pms/orm/daoImpl/ChooseEmployeeDaoImpl.java
2a3f45d1aec347d96b7ebbc6b44d51688ffc0b88
[]
no_license
jsb9009/project_manager_spring
db4a4e3daaafb0bb252a5fbb5d274737815a4159
cf4cb910d25000bd6e9377e820eaef607f43f5e0
refs/heads/master
2021-01-01T06:57:02.009168
2017-07-31T07:53:04
2017-07-31T07:53:04
97,558,510
0
0
null
null
null
null
UTF-8
Java
false
false
2,761
java
package org.pms.orm.daoImpl; import org.pms.orm.ChooseEmployeeDao; import org.pms.orm.beans.AssignBean; import org.pms.orm.beans.ChooseEmployeeBean; import org.pms.orm.beans.EmployeeBean; import org.pms.orm.beans.ViewTasksBean; import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.ResultSetExtractor; import org.springframework.jdbc.core.support.JdbcDaoSupport; import org.springframework.stereotype.Repository; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; /** * Created by jaliya on 7/24/17. */ @Repository public class ChooseEmployeeDaoImpl implements ChooseEmployeeDao{ private JdbcTemplate jdbcTemplate; public void setJdbcTemplate(JdbcTemplate jdbcTemplate) { this.jdbcTemplate = jdbcTemplate; } public String chooseEmpoyeeNo(String emp_no) { // JdbcTemplate jdbcTemplate = new JdbcTemplate(); String sql1 = "select index_no from employee where employee_no=?"; String indexNo = jdbcTemplate.queryForObject( sql1, new Object[] { emp_no }, String.class); return indexNo; } public List<ChooseEmployeeBean> viewassignedTasks(String emp_no){ String indexNo = chooseEmpoyeeNo(emp_no); // JdbcTemplate jdbcTemplate = new JdbcTemplate(); String sql2 = "select task_no,task_name,project_no,no_of_hours from task,project,employee where task.index_no_project=project.index_no and task.index_no_employee=employee.index_no and index_no_employee=?"; // JdbcTemplate.queryForObject(sql2, new Object[] {indexNo}, String.class); // jdbcTemplate.queryForObject(sql2, new Object[] // {indexNo}); List<ChooseEmployeeBean> tasksList1 = jdbcTemplate.query(sql2,new Object[] {indexNo}, new ResultSetExtractor<List<ChooseEmployeeBean>>() { @Override public List<ChooseEmployeeBean> extractData(ResultSet rs) throws SQLException, DataAccessException { List<ChooseEmployeeBean> list1 = new ArrayList<ChooseEmployeeBean>(); while (rs.next()) { ChooseEmployeeBean chooseemployeeBean = new ChooseEmployeeBean(); chooseemployeeBean.setTask_number(rs.getString(1)); chooseemployeeBean.setTask_name(rs.getString(2)); chooseemployeeBean.setNo_of_hours(rs.getString(3)); chooseemployeeBean.setProject_number(rs.getString(4)); list1.add(chooseemployeeBean); } return list1; } }); return tasksList1; } }
[ "jaliya.bandara1992@gmail.com" ]
jaliya.bandara1992@gmail.com
5f375ae93529ba428b01833b2c752fadcb61ead0
9619bb11743ab3c03544b72856e0a018de728695
/app/src/main/java/com/example/attendance/activity/AddSubjectsActivity.java
7c93473ebe228089bf36f49afaa2261a2f050681
[]
no_license
janujahnavi123/DMSS
cf298a27784e29ccde6e413323ecb0430fe17421
324d0156d415ccbc2b8480a6a92beeefef88e0cd
refs/heads/master
2022-09-19T23:25:09.453675
2020-05-28T14:34:11
2020-05-28T14:34:11
255,542,648
0
0
null
null
null
null
UTF-8
Java
false
false
10,378
java
package com.example.attendance.activity; import android.os.Bundle; import android.text.TextUtils; import android.view.MenuItem; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.EditText; import android.widget.Spinner; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import com.example.attendance.R; import com.example.attendance.model.SubjectItem; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.ValueEventListener; import java.util.ArrayList; import java.util.List; public class AddSubjectsActivity extends AppCompatActivity { Spinner spinnerDept, spinnerYear, spinnerSemester; String subjectId, department, year, semester, subject, randomId,subjectRandomId; Button btnSubmit; EditText editSubject; DatabaseReference databaseReferenceDepartment; DatabaseReference databaseReferenceYear; DatabaseReference databaseReferenceSemester; DatabaseReference databaseReferenceSubject; List<String> departmentList; List<String> yearsList; List<String> semesterList; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_add_subjects); if (getSupportActionBar() != null) { getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true); getSupportActionBar().setTitle("Add Subject"); } departmentList = new ArrayList<>(); departmentList.add("Select Department"); yearsList = new ArrayList<>(); yearsList.add("Select Year"); semesterList = new ArrayList<>(); semesterList.add("Select Semester"); editSubject = findViewById(R.id.editSubject); spinnerDept = findViewById(R.id.spinnerDept); spinnerYear = findViewById(R.id.spinnerYear); spinnerSemester = findViewById(R.id.spinnerSemester); btnSubmit = findViewById(R.id.btnSubmit); databaseReferenceDepartment = FirebaseDatabase.getInstance().getReference("DepartmentDetails"); databaseReferenceYear = FirebaseDatabase.getInstance().getReference("YearDetails"); databaseReferenceSemester = FirebaseDatabase.getInstance().getReference("SemesterDetails"); databaseReferenceSubject = FirebaseDatabase.getInstance().getReference("SubjectDetails"); databaseReferenceDepartment.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { departmentList.clear(); departmentList.add("Select Department"); for (DataSnapshot subjectSnapshot : dataSnapshot.getChildren()) { String department = subjectSnapshot.child("department").getValue(String.class); departmentList.add(department); } ArrayAdapter<String> departmentAdapter = new ArrayAdapter<String>(AddSubjectsActivity.this, android.R.layout.simple_spinner_item, departmentList); departmentAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinnerDept.setAdapter(departmentAdapter); spinnerDept.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { department = spinnerDept.getSelectedItem().toString().trim(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { } }); } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); databaseReferenceYear.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { yearsList.clear(); yearsList.add("Select Year"); for (DataSnapshot subjectSnapshot : dataSnapshot.getChildren()) { String year = subjectSnapshot.child("year").getValue(String.class); yearsList.add(year); } ArrayAdapter<String> yearAdapter = new ArrayAdapter<String>(AddSubjectsActivity.this, android.R.layout.simple_spinner_item, yearsList); yearAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinnerYear.setAdapter(yearAdapter); spinnerYear.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { year = spinnerYear.getSelectedItem().toString().trim(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { } }); } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); databaseReferenceSemester.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { semesterList.clear(); semesterList.add("Select Semester"); for (DataSnapshot subjectSnapshot : dataSnapshot.getChildren()) { String semester = subjectSnapshot.child("semester").getValue(String.class); semesterList.add(semester); } ArrayAdapter<String> semesterAdapter = new ArrayAdapter<String>(AddSubjectsActivity.this, android.R.layout.simple_spinner_item, semesterList); semesterAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinnerSemester.setAdapter(semesterAdapter); spinnerSemester.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { semester = spinnerSemester.getSelectedItem().toString().trim(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { } }); } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); btnSubmit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { subjectId = databaseReferenceSubject.push().getKey(); subject = editSubject.getText().toString().trim(); randomId = department + "_" + year + "_" + semester; subjectRandomId = department + "_" + year + "_" + semester + "_" +subject; if (department.equals("Select Department")) { Toast.makeText(AddSubjectsActivity.this, "Please Select Department", Toast.LENGTH_SHORT).show(); } if (year.equals("Select Year")) { Toast.makeText(AddSubjectsActivity.this, "Please Select Year", Toast.LENGTH_SHORT).show(); } if (semester.equals("Select Semester")) { Toast.makeText(AddSubjectsActivity.this, "Please Select Semester", Toast.LENGTH_SHORT).show(); } if (TextUtils.isEmpty(subject)) { Toast.makeText(AddSubjectsActivity.this, "Please Enter Subject", Toast.LENGTH_SHORT).show(); } if (!subject.isEmpty() && !department.equals("Select Department") && !year.equals("Select Year") && !semester.equals("Select Semester")) { databaseReferenceSubject.child(subjectRandomId).addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { if (dataSnapshot.getValue() != null) { //user exists, do something Toast.makeText(AddSubjectsActivity.this, "Already Subject Exits", Toast.LENGTH_SHORT).show(); } else { SubjectItem subjectItem = new SubjectItem(subjectId, department, year, semester, subject, randomId,subjectRandomId); databaseReferenceSubject.child(subjectRandomId).setValue(subjectItem); Toast.makeText(AddSubjectsActivity.this, "Added Successfully", Toast.LENGTH_SHORT).show(); spinnerDept.setSelection(0); spinnerYear.setSelection(0); spinnerSemester.setSelection(0); editSubject.setText(""); } } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); } else { Toast.makeText(AddSubjectsActivity.this, "Enter Valid Details...!", Toast.LENGTH_SHORT).show(); } } }); } @Override public boolean onOptionsItemSelected(MenuItem item) { // handle arrow click here if (item.getItemId() == android.R.id.home) { onBackPressed(); // close this activity and return to preview activity (if there is any) } return super.onOptionsItemSelected(item); } }
[ "anilwesley94@gmail.com" ]
anilwesley94@gmail.com
ac83dc9c22df7b60b82f58e2b038990bd6a4b634
04e648896a9c96867a11a84a1ad2f3c60409f159
/src/test/java/StepFiles.java
a0c73a6bc3b44bc83ff99f0000929e2e6ab4f557
[]
no_license
abhisheaksoni/DBSEnggPractices
52ee9ac614246299486dda11e13b2a37f9b223f7
e4591ee15426c976333d037f6efeaa37cb0bf699
refs/heads/master
2020-07-01T22:14:45.250086
2016-11-21T06:39:07
2016-11-21T06:39:07
74,333,928
0
0
null
null
null
null
UTF-8
Java
false
false
1,366
java
package test.java; import cucumber.api.PendingException; import cucumber.api.java.en.Given; import cucumber.api.java.en.Then; import cucumber.api.java.en.When; public class StepFiles { @Given("^Numbers are (\\d+) and (\\d+) and operation is +$") public void Numbers_are_and_and_operation_is_add(int arg1, int arg2) throws Throwable { // Express the Regexp above with the code you wish you had throw new PendingException(); } @When("^I hit calculate$") public void I_hit_calculate() throws Throwable { // Express the Regexp above with the code you wish you had throw new PendingException(); } @Then("^the total sum should be (\\d+)$") public void the_total_sum_should_be(int arg1) throws Throwable { // Express the Regexp above with the code you wish you had throw new PendingException(); } @Given("^Numbers are (\\d+) and (\\d+) and operation is -$") public void Numbers_are_and_and_operation_is_sub(int arg1, int arg2) throws Throwable { // Express the Regexp above with the code you wish you had throw new PendingException(); } @Given("^Numbers are (\\d+) and (\\d+) and operation is \\*$") public void Numbers_are_and_and_operation_is_mul(int arg1, int arg2) throws Throwable { // Express the Regexp above with the code you wish you had throw new PendingException(); } }
[ "admin@admin-PC" ]
admin@admin-PC
ef044e9cbde0d138eab3134d1fbff580f9064330
1e9819332147bf0d8987a5d884c2dd815e30aaaf
/core/model/src/main/java/sh/isaac/model/statement/CircumstanceImpl.java
2b2e768d8206be5f3e070bf69325996ddd0dc27f
[ "Apache-2.0" ]
permissive
Sagebits/ISAAC
5d4d1bade39c06cd6d4ed0993f7bce47ee57be64
af62273159241162eee61134f21cc82219b8fc69
refs/heads/develop-fx11
2022-12-03T18:13:36.324085
2020-05-17T22:04:08
2020-05-17T22:04:08
195,490,068
0
1
Apache-2.0
2022-11-16T08:52:54
2019-07-06T02:49:49
Java
UTF-8
Java
false
false
2,355
java
/* * Copyright 2018 Organizations participating in ISAAC, ISAAC's KOMET, and SOLOR development include the US Veterans Health Administration, OSHERA, and the Health Services Platform Consortium.. * * 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 sh.isaac.model.statement; import javafx.beans.property.SimpleListProperty; import javafx.beans.property.SimpleObjectProperty; import javafx.collections.ObservableList; import sh.isaac.api.component.concept.ConceptChronology; import sh.isaac.api.coordinate.ManifoldCoordinate; import sh.isaac.api.statement.Circumstance; import sh.isaac.api.statement.Measure; import sh.isaac.model.observable.ObservableFields; /** * * @author kec */ public class CircumstanceImpl implements Circumstance { private final SimpleListProperty<ConceptChronology> purposeList = new SimpleListProperty(this, ObservableFields.CIRCUMSTANCE_PURPOSE_LIST.toExternalString()); private final SimpleObjectProperty<MeasureImpl> timing = new SimpleObjectProperty<>(this, ObservableFields.CIRCUMSTANCE_TIMING.toExternalString()); public CircumstanceImpl(ManifoldCoordinate manifold) { timing.setValue(new MeasureImpl(manifold)); } @Override public ObservableList<ConceptChronology> getPurposeList() { return purposeList.get(); } public SimpleListProperty<ConceptChronology> purposeListProperty() { return purposeList; } public void setPurposeList(ObservableList<ConceptChronology> purposeList) { this.purposeList.set(purposeList); } @Override public Measure getTiming() { return timing.get(); } public SimpleObjectProperty<MeasureImpl> timingProperty() { return timing; } public void setTiming(MeasureImpl timing) { this.timing.set(timing); } }
[ "campbell@informatics.com" ]
campbell@informatics.com
9e0928d40a56219f2df8813da5e556f1c4e71ded
b111b77f2729c030ce78096ea2273691b9b63749
/db-example-large-multi-project/project62/src/main/java/org/gradle/test/performance/mediumjavamultiproject/project62/p312/Production6244.java
d574684553843cd4902a2b128bd0f93f92312ff3
[]
no_license
WeilerWebServices/Gradle
a1a55bdb0dd39240787adf9241289e52f593ccc1
6ab6192439f891256a10d9b60f3073cab110b2be
refs/heads/master
2023-01-19T16:48:09.415529
2020-11-28T13:28:40
2020-11-28T13:28:40
256,249,773
1
0
null
null
null
null
UTF-8
Java
false
false
1,896
java
package org.gradle.test.performance.mediumjavamultiproject.project62.p312; public class Production6244 { private String property0; public String getProperty0() { return property0; } public void setProperty0(String value) { property0 = value; } private String property1; public String getProperty1() { return property1; } public void setProperty1(String value) { property1 = value; } private String property2; public String getProperty2() { return property2; } public void setProperty2(String value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "nateweiler84@gmail.com" ]
nateweiler84@gmail.com
0259d85b597f58b1d00286f2dc04775d42fd0a7b
d0ea95ba35dba7c9d36df8e2da500a373e898686
/src/test/java/org/qosslice/app/SliceTest.java
14f254ac77b6941212586bf321eacac2703889ca
[]
no_license
passCet46/QoS-Slicing
80af12389b973f136ce02633f2534d61855ec041
cadd8aeb91150618ab48a6148c6d1815a0f3b3c0
refs/heads/main
2023-07-17T14:15:36.291925
2021-08-30T13:08:11
2021-08-30T13:08:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
673
java
/* * Copyright 2017-present Open Networking Foundation * * 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.qosslice.app; public class SliceTest { }
[ "d.scano89@gmail.com" ]
d.scano89@gmail.com
27c8c7a24a8bc8f38fa12d6b4e6c54fd5350fd7c
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module1319_public/tests/unittests/src/java/module1319_public_tests_unittests/a/Foo3.java
d35d371513592e65e8d295d277d6fc6c51e6d247
[ "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,641
java
package module1319_public_tests_unittests.a; import java.beans.beancontext.*; import java.io.*; import java.rmi.*; /** * 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.io.File * @see java.rmi.Remote * @see java.nio.file.FileStore */ @SuppressWarnings("all") public abstract class Foo3<R> extends module1319_public_tests_unittests.a.Foo2<R> implements module1319_public_tests_unittests.a.IFoo3<R> { java.sql.Array f0 = null; java.util.logging.Filter f1 = null; java.util.zip.Deflater f2 = null; public R element; public static Foo3 instance; public static Foo3 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return module1319_public_tests_unittests.a.Foo2.create(input); } public String getName() { return module1319_public_tests_unittests.a.Foo2.getInstance().getName(); } public void setName(String string) { module1319_public_tests_unittests.a.Foo2.getInstance().setName(getName()); return; } public R get() { return (R)module1319_public_tests_unittests.a.Foo2.getInstance().get(); } public void set(Object element) { this.element = (R)element; module1319_public_tests_unittests.a.Foo2.getInstance().set(this.element); } public R call() throws Exception { return (R)module1319_public_tests_unittests.a.Foo2.getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
bb1ef77d2da5285c5df04f9956c8c7e53a01b748
7128c50b5efac11e85cb2381cdb50aa43b294646
/QueryApp/src/model/AbstractFactory.java
5a253a5900e9cb82d820110798973a4b0fd74999
[]
no_license
alvinalvord/ADVANDB-MCO1
c56d0f3b383e9990c541ed0d4578248467593c01
4bdbc5b6c63a0559de617dc75205b9184e8e5684
refs/heads/master
2021-07-16T11:11:09.395637
2017-10-22T21:29:03
2017-10-22T21:29:03
106,587,437
0
0
null
null
null
null
UTF-8
Java
false
false
117
java
package model; public abstract class AbstractFactory { public abstract QueryObject getQueryObject (int queryNum); }
[ "jasper_pillejera@dlsu.edu.ph" ]
jasper_pillejera@dlsu.edu.ph
322aa6233789b6d52e22cb07a9e40ff8e8d7b997
60bfe3535dd6d32ef3d6067e64bd3e6edd883ead
/shared-kernel/src/main/java/mk/ukim/finki/emt/sharedkernel/domain/base/DomainObjectId.java
99d59c837110a3da7bbc4986792874abe52c3157
[]
no_license
monndi/DDD-Car-Rental-Software
8a5c5bc5827b83febd0d1840490198c67ed70ee9
bb19051ff30db39a9dad6421109a055ae6cc0d94
refs/heads/main
2023-08-22T04:37:28.179293
2021-09-15T16:40:37
2021-09-15T16:40:37
401,416,503
0
1
null
null
null
null
UTF-8
Java
false
false
1,087
java
package mk.ukim.finki.emt.sharedkernel.domain.base; import com.fasterxml.jackson.annotation.JsonCreator; import lombok.Getter; import lombok.NonNull; import javax.persistence.Embeddable; import javax.persistence.MappedSuperclass; import java.io.Serializable; import java.util.Objects; import java.util.UUID; @MappedSuperclass @Embeddable @Getter public class DomainObjectId implements Serializable { private String id; @JsonCreator protected DomainObjectId(@NonNull String uuid) { this.id = Objects.requireNonNull(uuid, "uuid must not be null"); } /** * Creates a new, random instance of the given {@code idClass}. */ @NonNull public static <ID extends DomainObjectId> ID randomId(@NonNull Class<ID> idClass) { Objects.requireNonNull(idClass, "idClass must not be null"); try { return idClass.getConstructor(String.class).newInstance(UUID.randomUUID().toString()); } catch (Exception ex) { throw new RuntimeException("Could not create new instance of " + idClass, ex); } } }
[ "monikadimitrova@ymail.com" ]
monikadimitrova@ymail.com
6e875f61a8be407e7a1a86a43c4949e246d713f1
f1f1773820464a33e4dc473fc4fe645836f106b8
/SaintPmc/app/src/main/java/com/saintsung/saintpmc/tool/RoundImageView.java
859b66953310209bfecd9ec0095c085293dd99dd
[]
no_license
YinTx/SaintSungProject
ce5fbbce1833b87fd24c6a5ed1d523957d95e454
102e5e65579cf2bc458736aa2a0adf96c774fc42
refs/heads/master
2021-05-04T22:41:38.616604
2018-03-21T00:54:51
2018-03-21T00:54:51
120,055,564
0
0
null
null
null
null
UTF-8
Java
false
false
7,879
java
package com.saintsung.saintpmc.tool; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PorterDuff.Mode; import android.graphics.PorterDuffXfermode; import android.graphics.Rect; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.NinePatchDrawable; import android.util.AttributeSet; import android.widget.ImageView; import com.saintsung.saintpmc.R; import android.graphics.Paint; /** * 圆形ImageView,可设置最多两个宽度不同且颜色不同的圆形边框。 * 设置颜色在xml布局文件中由自定义属性配置参数指定 */ public class RoundImageView extends ImageView { private int mBorderThickness = 0; private Context mContext; private int defaultColor = 0xFFFFFFFF; // 如果只有其中一个有值,则只画一个圆形边框 private int mBorderOutsideColor = 0; private int mBorderInsideColor = 0; // 控件默认长、宽 private int defaultWidth = 0; private int defaultHeight = 0; public RoundImageView(Context context) { super(context); mContext = context; } public RoundImageView(Context context, AttributeSet attrs) { super(context, attrs); mContext = context; setCustomAttributes(attrs); } public RoundImageView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); mContext = context; setCustomAttributes(attrs); } private void setCustomAttributes(AttributeSet attrs) { TypedArray a = mContext.obtainStyledAttributes(attrs, R.styleable.roundedimageview); mBorderThickness = a.getDimensionPixelSize(R.styleable.roundedimageview_border_thickness, 0); mBorderOutsideColor = a.getColor(R.styleable.roundedimageview_border_outside_color,defaultColor); mBorderInsideColor = a.getColor(R.styleable.roundedimageview_border_inside_color, defaultColor); } @Override protected void onDraw(Canvas canvas) { Drawable drawable = getDrawable() ; if (drawable == null) { return; } if (getWidth() == 0 || getHeight() == 0) { return; } this.measure(0, 0); if (drawable.getClass() == NinePatchDrawable.class) return; Bitmap b = ((BitmapDrawable) drawable).getBitmap(); Bitmap bitmap = b.copy(Bitmap.Config.ARGB_8888, true); if (defaultWidth == 0) { defaultWidth = getWidth(); } if (defaultHeight == 0) { defaultHeight = getHeight(); } int radius = 0; if (mBorderInsideColor != defaultColor && mBorderOutsideColor != defaultColor) {// 定义画两个边框,分别为外圆边框和内圆边框 radius = (defaultWidth < defaultHeight ? defaultWidth : defaultHeight) / 2 - 2 * mBorderThickness; // 画内圆 drawCircleBorder(canvas, radius + mBorderThickness / 2,mBorderInsideColor); // 画外圆 drawCircleBorder(canvas, radius + mBorderThickness + mBorderThickness / 2, mBorderOutsideColor); } else if (mBorderInsideColor != defaultColor && mBorderOutsideColor == defaultColor) {// 定义画一个边框 radius = (defaultWidth < defaultHeight ? defaultWidth : defaultHeight) / 2 - mBorderThickness; drawCircleBorder(canvas, radius + mBorderThickness / 2, mBorderInsideColor); } else if (mBorderInsideColor == defaultColor && mBorderOutsideColor != defaultColor) {// 定义画一个边框 radius = (defaultWidth < defaultHeight ? defaultWidth : defaultHeight) / 2 - mBorderThickness; drawCircleBorder(canvas, radius + mBorderThickness / 2, mBorderOutsideColor); } else {// 没有边框 radius = (defaultWidth < defaultHeight ? defaultWidth : defaultHeight) / 2; } Bitmap roundBitmap = getCroppedRoundBitmap(bitmap, radius); canvas.drawBitmap(roundBitmap, defaultWidth / 2 - radius, defaultHeight / 2 - radius, null); } /** * 获取裁剪后的圆形图片 * @param radius半径 */ public Bitmap getCroppedRoundBitmap(Bitmap bmp, int radius) { Bitmap scaledSrcBmp; int diameter = radius * 2; // 为了防止宽高不相等,造成圆形图片变形,因此截取长方形中处于中间位置最大的正方形图片 int bmpWidth = bmp.getWidth(); int bmpHeight = bmp.getHeight(); int squareWidth = 0, squareHeight = 0; int x = 0, y = 0; Bitmap squareBitmap; if (bmpHeight > bmpWidth) {// 高大于宽 squareWidth = squareHeight = bmpWidth; x = 0; y = (bmpHeight - bmpWidth) / 2; // 截取正方形图片 squareBitmap = Bitmap.createBitmap(bmp, x, y, squareWidth, squareHeight); } else if (bmpHeight < bmpWidth) {// 宽大于高 squareWidth = squareHeight = bmpHeight; x = (bmpWidth - bmpHeight) / 2; y = 0; squareBitmap = Bitmap.createBitmap(bmp, x, y, squareWidth,squareHeight); } else { squareBitmap = bmp; } if (squareBitmap.getWidth() != diameter || squareBitmap.getHeight() != diameter) { scaledSrcBmp = Bitmap.createScaledBitmap(squareBitmap, diameter,diameter, true); } else { scaledSrcBmp = squareBitmap; } Bitmap output = Bitmap.createBitmap(scaledSrcBmp.getWidth(), scaledSrcBmp.getHeight(), Config.ARGB_8888); Canvas canvas = new Canvas(output); Paint paint = new Paint(); Rect rect = new Rect(0, 0, scaledSrcBmp.getWidth(),scaledSrcBmp.getHeight()); paint.setAntiAlias(true); paint.setFilterBitmap(true); paint.setDither(true); canvas.drawARGB(0, 0, 0, 0); canvas.drawCircle(scaledSrcBmp.getWidth() / 2, scaledSrcBmp.getHeight() / 2, scaledSrcBmp.getWidth() / 2, paint); paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN)); canvas.drawBitmap(scaledSrcBmp, rect, rect, paint); bmp = null; squareBitmap = null; scaledSrcBmp = null; return output; } /** * 边缘画圆 */ private void drawCircleBorder(Canvas canvas, int radius, int color) { Paint paint = new Paint(); /* 去锯齿 */ paint.setAntiAlias(true); paint.setFilterBitmap(true); paint.setDither(true); paint.setColor(color); /* 设置paint的 style 为STROKE:空心 */ paint.setStyle(Paint.Style.STROKE); /* 设置paint的外框宽度 */ paint.setStrokeWidth(mBorderThickness); canvas.drawCircle(defaultWidth / 2, defaultHeight / 2, radius, paint); } }
[ "1185313860@qq.com" ]
1185313860@qq.com
3ed91e48f68bad5b02934fce7edc97648bee8c8b
770bcdd42e8c0905b604d98664e150fd6f65bde0
/EchoServerWSPool.java
23613dada7535c192f458bdaa0a84f093575edb4
[]
no_license
DavidAllio/L3---Projet-R-seau-Chat
7c5c137f7c7f017327fd09408cc1919aaaf7c6de
e58b36806823b4fa5f53071a325e9edb2599604b
refs/heads/main
2023-01-19T00:00:42.512875
2020-11-24T15:24:25
2020-11-24T15:24:25
315,673,009
0
0
null
null
null
null
UTF-8
Java
false
false
3,629
java
import java.io.*; import java.net.*; import java.nio.ByteBuffer; import java.nio.channels.*; import java.nio.charset.StandardCharsets; import java.util.Iterator; import java.util.Scanner; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.regex.Pattern; public class EchoServerWSPool { public static void main(String[] args) throws IOException{ Integer port=0; Integer nbr_thread=0; String actual="",before=""; if(args.length==2) { port = Integer.parseInt(args[0]); nbr_thread = Integer.parseInt(args[1]); } else{ System.out.println("Non. L'usage. Java, puis serveur, port, et le nombre de threads voulus."); } Selector selector = Selector.open(); ServerSocketChannel ss = ServerSocketChannel.open(); ss.configureBlocking(false); ss.socket().bind(new InetSocketAddress("localhost",port)); ss.register(selector, SelectionKey.OP_ACCEPT); ByteBuffer msg= ByteBuffer.allocate(1000); ExecutorService executor = Executors.newWorkStealingPool(nbr_thread); while(selector.isOpen()) { try { selector.select(); Iterator<SelectionKey> keys = selector.selectedKeys().iterator(); while(keys.hasNext()){ SelectionKey key = keys.next(); if(!key.isValid()) { continue; } if(key.isAcceptable()){ SocketChannel client = ss.accept(); client.configureBlocking(false); client.register(selector, SelectionKey.OP_READ); System.out.println("Client Connecté "); } if (key.isReadable()) { msg.clear(); SocketChannel client = (SocketChannel) key.channel(); client.read(msg); String dis = new String(msg.array()); actual = dis; ss.configureBlocking(false); Socket sock = ss.socket().accept(); executor.submit(new ClientHandlerWSPool(sock, dis)); if(actual.equals(before)) { client.close(); } before=actual; } //keys.remove(); } selector.selectedKeys().clear(); } catch (Exception ex) { ex.printStackTrace(); } } } } class ClientHandlerWSPool extends Thread { final String dis; final Socket s; // Constructor public ClientHandlerWSPool(Socket s, String dis) { this.s = s; this.dis = dis; } @Override public void run() { String received; String toreturn; while (true) { long timeTest = System.nanoTime(); try { if(dis!=null){ System.out.println(">"+dis); System.out.println("From port : " + s.getPort()); System.out.println("temps d'execution : " + (System.nanoTime()-timeTest) +" Nanosecondes, soit "+ (System.nanoTime()-timeTest)/1000000 +" millisecondes"); } } catch (Exception ex) { ex.printStackTrace(); System.exit(0); } } } }
[ "44998218+DavidAllio@users.noreply.github.com" ]
44998218+DavidAllio@users.noreply.github.com
bea6f58a3e677c0305bf05a7911dc0dfb0a39f68
234c76334982aee9bb1d780db066254ee91d3299
/src/main/java/com/zhisland/data/crm_internet/data_dict/dto/City.java
1e28b635811118261a64830583386ae223a9199b
[]
no_license
mbear/crm-internet
f9be6f2582880e0ff899c0a299304221941fb15a
15252ab81ac15fe3cf62a80eb4736d902a2dfe1b
refs/heads/master
2021-01-25T05:16:11.429282
2014-10-21T10:08:06
2014-10-21T10:08:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
623
java
/** * */ package com.zhisland.data.crm_internet.data_dict.dto; /** * @author muzongyan * */ public class City { private int id; private String name; /** * @return the id */ public int getId() { return id; } /** * @param id * the id to set */ public void setId(int id) { this.id = id; } /** * @return the name */ public String getName() { return name; } /** * @param name * the name to set */ public void setName(String name) { this.name = name; } }
[ "muzongyan@163.com" ]
muzongyan@163.com
6717c5ec9b369406997c9f362a06c26293c5863c
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/schildbach_bitcoin-wallet/wallet/src/de/schildbach/wallet/data/WalletBalanceLiveData.java
b19143aa6dc70ce1c8befe34181a54a35569dcbe
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,703
java
// isComment package de.schildbach.wallet.data; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; import org.bitcoinj.utils.Threading; import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.Wallet.BalanceType; import org.bitcoinj.wallet.listeners.WalletChangeEventListener; import org.bitcoinj.wallet.listeners.WalletCoinsReceivedEventListener; import org.bitcoinj.wallet.listeners.WalletCoinsSentEventListener; import org.bitcoinj.wallet.listeners.WalletReorganizeEventListener; import de.schildbach.wallet.Configuration; import de.schildbach.wallet.Constants; import de.schildbach.wallet.WalletApplication; import android.content.SharedPreferences; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; import android.os.AsyncTask; /** * isComment */ public final class isClassOrIsInterface extends AbstractWalletLiveData<Coin> implements OnSharedPreferenceChangeListener { private final BalanceType isVariable; private final Configuration isVariable; public isConstructor(final WalletApplication isParameter, final BalanceType isParameter) { super(isNameExpr); this.isFieldAccessExpr = isNameExpr; this.isFieldAccessExpr = isNameExpr.isMethod(); } public isConstructor(final WalletApplication isParameter) { this(isNameExpr, isNameExpr.isFieldAccessExpr); } @Override protected void isMethod(final Wallet isParameter) { isMethod(isNameExpr); isNameExpr.isMethod(this); isMethod(); } @Override protected void isMethod(final Wallet isParameter) { isNameExpr.isMethod(this); isMethod(isNameExpr); } private void isMethod(final Wallet isParameter) { isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, isNameExpr); isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, isNameExpr); isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, isNameExpr); isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, isNameExpr); } private void isMethod(final Wallet isParameter) { isNameExpr.isMethod(isNameExpr); isNameExpr.isMethod(isNameExpr); isNameExpr.isMethod(isNameExpr); isNameExpr.isMethod(isNameExpr); } @Override protected void isMethod() { final Wallet isVariable = isMethod(); isNameExpr.isMethod(new Runnable() { @Override public void isMethod() { isNameExpr.isFieldAccessExpr.isFieldAccessExpr.isFieldAccessExpr.isMethod(isNameExpr.isFieldAccessExpr); isMethod(isNameExpr.isMethod(isNameExpr)); } }); } private final WalletListener isVariable = new WalletListener(); private class isClassOrIsInterface implements WalletCoinsReceivedEventListener, WalletCoinsSentEventListener, WalletReorganizeEventListener, WalletChangeEventListener { @Override public void isMethod(final Wallet isParameter, final Transaction isParameter, final Coin isParameter, final Coin isParameter) { isMethod(); } @Override public void isMethod(final Wallet isParameter, final Transaction isParameter, final Coin isParameter, final Coin isParameter) { isMethod(); } @Override public void isMethod(final Wallet isParameter) { isMethod(); } @Override public void isMethod(final Wallet isParameter) { isMethod(); } } @Override public void isMethod(final SharedPreferences isParameter, final String isParameter) { if (isNameExpr.isFieldAccessExpr.isMethod(isNameExpr)) isMethod(); } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
50d0daf9db439a9a6c1c11b63c73ff4c5276ef15
8bb6a5ef9c96167256acc8044f817a247503401d
/app/src/main/java/com/example/androidthings/gattserver/AwsIot.java
3f967022c4dba899f5e0e742d02ea52d9b8a0845
[ "Apache-2.0" ]
permissive
muros/ThermoThing
c80611048c36515a0248ebb72628450525cc16c2
34e46e4c006b98b3628ada41b2976ce237e5d93d
refs/heads/master
2020-04-11T18:14:15.496179
2018-12-19T22:02:19
2018-12-19T22:02:19
161,990,830
0
0
null
null
null
null
UTF-8
Java
false
false
7,465
java
/** * Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * <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://aws.amazon.com/apache2.0 * <p> * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES * OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and * limitations under the License. */ package com.example.androidthings.gattserver; import android.content.Context; import android.util.Log; import com.amazonaws.mobile.client.AWSMobileClient; import com.amazonaws.mobileconnectors.iot.AWSIotKeystoreHelper; import com.amazonaws.mobileconnectors.iot.AWSIotMqttClientStatusCallback; import com.amazonaws.mobileconnectors.iot.AWSIotMqttLastWillAndTestament; import com.amazonaws.mobileconnectors.iot.AWSIotMqttManager; import com.amazonaws.mobileconnectors.iot.AWSIotMqttNewMessageCallback; import com.amazonaws.mobileconnectors.iot.AWSIotMqttQos; import com.amazonaws.regions.Region; import com.amazonaws.regions.Regions; import com.amazonaws.services.iot.AWSIotClient; import java.io.UnsupportedEncodingException; import java.security.KeyStore; import java.util.UUID; import static com.amazonaws.mobile.auth.core.internal.util.ThreadUtils.runOnUiThread; public class AwsIot { private static final String TAG = AwsIot.class.getSimpleName(); // IoT endpoint // AWS Iot CLI describe-endpoint call returns: XXXXXXXXXX.iot.<region>.amazonaws.com private static final String CUSTOMER_SPECIFIC_ENDPOINT = "ahulwz4b2ag11-ats.iot.eu-central-1.amazonaws.com"; // Region of AWS IoT private static final Regions MY_REGION = Regions.EU_CENTRAL_1; // Filename of KeyStore file on the filesystem private static final String KEYSTORE_NAME = "awsiot"; // Password for the private key in the KeyStore private static final String KEYSTORE_PASSWORD = "changed"; // Certificate and key aliases in the KeyStore private static final String CERTIFICATE_ID = "awsiot"; AWSIotClient mIotAndroidClient; AWSIotMqttManager mqttManager; String clientId; String keystorePath; String keystoreName; String keystorePassword; KeyStore clientKeyStore = null; String certificateId; Context context; public AwsIot(Context context) { this.context = context; clientId = UUID.randomUUID().toString(); initIoTClient(); // // Initialize the AWS Cognito credentials provider // AWSMobileClient.getInstance().initialize(this.context, new Callback<UserStateDetails>() { // @Override // public void onResult(UserStateDetails result) { // initIoTClient(); // } // // @Override // public void onError(Exception e) { // Log.e(TAG, "onError: ", e); // } // }); } void initIoTClient() { Region region = Region.getRegion(MY_REGION); // MQTT Client mqttManager = new AWSIotMqttManager(clientId, CUSTOMER_SPECIFIC_ENDPOINT); // Set keepalive to 10 seconds. Will recognize disconnects more quickly but will also send // MQTT pings every 10 seconds. mqttManager.setKeepAlive(10); // Set Last Will and Testament for MQTT. On an unclean disconnect (loss of connection) // AWS IoT will publish this message to alert other clients. AWSIotMqttLastWillAndTestament lwt = new AWSIotMqttLastWillAndTestament("my/lwt/topic", "Android client lost connection", AWSIotMqttQos.QOS0); mqttManager.setMqttLastWillAndTestament(lwt); // IoT Client (for creation of certificate if needed) mIotAndroidClient = new AWSIotClient(AWSMobileClient.getInstance()); mIotAndroidClient.setRegion(region); keystorePath = context.getFilesDir().getPath(); keystoreName = KEYSTORE_NAME; keystorePassword = KEYSTORE_PASSWORD; certificateId = CERTIFICATE_ID; // To load cert/key from keystore on filesystem try { if (AWSIotKeystoreHelper.isKeystorePresent(keystorePath, keystoreName)) { if (AWSIotKeystoreHelper.keystoreContainsAlias(certificateId, keystorePath, keystoreName, keystorePassword)) { Log.i(TAG, "Certificate " + certificateId + " found in keystore - using for MQTT."); // load keystore from file into memory to pass on connection clientKeyStore = AWSIotKeystoreHelper.getIotKeystore(certificateId, keystorePath, keystoreName, keystorePassword); } else { Log.i(TAG, "Key/cert " + certificateId + " not found in keystore."); } } else { Log.i(TAG, "Keystore " + keystorePath + "/" + keystoreName + " not found."); } } catch (Exception e) { Log.e(TAG, "An error occurred retrieving cert/key from keystore.", e); } } public void connect() { Log.d(TAG, "clientId = " + clientId); try { mqttManager.connect(clientKeyStore, new AWSIotMqttClientStatusCallback() { @Override public void onStatusChanged(final AWSIotMqttClientStatus status, final Throwable throwable) { Log.d(TAG, "Status = " + String.valueOf(status)); } }); } catch (final Exception e) { Log.e(TAG, "Connection error.", e); } } public void subscribe(String topic) { Log.d(TAG, "topic = " + topic); try { mqttManager.subscribeToTopic(topic, AWSIotMqttQos.QOS0, new AWSIotMqttNewMessageCallback() { @Override public void onMessageArrived(final String topic, final byte[] data) { runOnUiThread(new Runnable() { @Override public void run() { try { String message = new String(data, "UTF-8"); Log.d(TAG, "Message arrived:"); Log.d(TAG, " Topic: " + topic); Log.d(TAG, " Message: " + message); } catch (UnsupportedEncodingException e) { Log.e(TAG, "Message encoding error.", e); } } }); } }); } catch (Exception e) { Log.e(TAG, "Subscription error.", e); } } public void publish(String topic, String msg) { try { mqttManager.publishString(msg, topic, AWSIotMqttQos.QOS0); } catch (Exception e) { Log.e(TAG, "Publish error.", e); } } public void disconnect() { try { mqttManager.disconnect(); } catch (Exception e) { Log.e(TAG, "Disconnect error.", e); } } }
[ "upumesar@gmail.com" ]
upumesar@gmail.com
a681e52f6cc294347dc85954f2d54cdccbc752ff
d7330886c0edcd6bea96754ea51be69bcda5c074
/ReturningValuFromMethod_6/RetrunningValueFromMethod.java
8ee0d33898b77555fa4352ea01f5cd0d4394f6dc
[]
no_license
uzzalmondalcse/JavaMasterOOPProgramingDone
308c6dd280dbaa9b931ec2f0eebec3350eb00ba8
39318f1414164852947a176f92ce8e6d1b51707b
refs/heads/master
2020-06-29T07:50:48.599775
2019-08-04T10:29:41
2019-08-04T10:29:41
200,478,490
1
0
null
null
null
null
UTF-8
Java
false
false
1,244
java
package MasterOOPBestJava.ReturningValuFromMethod_6; public class RetrunningValueFromMethod { // class return define method(); square. int square(int value) { // square method , return type int..) return value * 5; } // create a return define method. adding int add(int value) { return value + 10; } int subtractor (int value) { return value - 8; } // string data return.. String data (String name){ return name; } public static void main(String args[]) { // How to return a value from a method. RetrunningValueFromMethod rt = new RetrunningValueFromMethod(); int res = rt.square(5); System.out.println("Square Result " + res); RetrunningValueFromMethod rv = new RetrunningValueFromMethod(); System.out.println("The Adding result : " + rv.add(10)); RetrunningValueFromMethod sub = new RetrunningValueFromMethod(); System.out.println("The Subtractor result :"+sub.subtractor(20)); RetrunningValueFromMethod db = new RetrunningValueFromMethod(); System.out.println("Name :"+db.data("Uzzal Mondal")); } }
[ "noreply@github.com" ]
noreply@github.com
150eb96c92eedad430b203bce406209603cec14a
0d3780b02165a28c6e07b208ccb648486cf7dd9b
/app/src/main/java/net/awpspace/mynote/fcm/MyFirebaseMessaginService.java
105b32c38ef73ed8ab1d7c48ed111610dc45534f
[]
no_license
moonlsd/MyNote
ca78ad631707567916e8f62fb52c502f7fe37e11
773b4f18d72e884bc98143c32a3216c9469cc360
refs/heads/master
2021-06-05T01:27:14.685179
2016-08-30T16:31:31
2016-08-30T16:31:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,035
java
package net.awpspace.mynote.fcm; import android.util.Log; import com.google.firebase.messaging.FirebaseMessagingService; import com.google.firebase.messaging.RemoteMessage; /** * Created by tuanhai on 8/9/16. */ public class MyFirebaseMessaginService extends FirebaseMessagingService { public static final String TAG = "awpspace"; @Override public void onMessageReceived(RemoteMessage remoteMessage) { // TODO(developer): Handle FCM messages here. // Not getting messages here? See why this may be: https://goo.gl/39bRNJ Log.d(TAG, "From: " + remoteMessage.getFrom()); // Check if message contains a data payload. if (remoteMessage.getData().size() > 0) { Log.d(TAG, "Message data payload: " + remoteMessage.getData()); } // Check if message contains a notification payload. if (remoteMessage.getNotification() != null) { Log.e(TAG, "Message Notification Body: " + remoteMessage.getNotification().getBody()); } } }
[ "tuanhaicntt@gmail.com" ]
tuanhaicntt@gmail.com
d10ca927905a22c8c0a6159b9244bd63aef98b6a
659c0a5df8e147f1cb14ad1788e19da8f8b584e2
/app/src/test/java/cn/readsense/androidopenglesdemo/ExampleUnitTest.java
e6cba98392797d6aef81e7b9016613bf72f0bc70
[]
no_license
littledou/AndroidOpenGLESDemo
4ed0072e51e3ef695dc27c7fe3e32b71ea627e74
dd4283e26b82b16dc3aaa2f16209c18672e040da
refs/heads/master
2020-03-25T02:15:53.976413
2018-08-02T10:42:12
2018-08-02T10:42:12
143,281,009
0
0
null
null
null
null
UTF-8
Java
false
false
393
java
package cn.readsense.androidopenglesdemo; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "hongbin.dou@gmail.com" ]
hongbin.dou@gmail.com
0380e03d770e5316669507542a725a2605b20039
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/p280ss/android/deviceregister/p855c/C19321d.java
ae3be5bdde6b3defceb35af581140bbfb754fc15
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,085
java
package com.p280ss.android.deviceregister.p855c; import android.os.Build; import android.os.Build.VERSION; import com.bytedance.common.utility.C6319n; import com.p280ss.android.common.util.C6776h; /* renamed from: com.ss.android.deviceregister.c.d */ public final class C19321d { /* renamed from: a */ private static final CharSequence f52227a = "sony"; /* renamed from: b */ private static final CharSequence f52228b = "amigo"; /* renamed from: c */ private static final CharSequence f52229c = "funtouch"; /* renamed from: i */ private static boolean m63380i() { if (!C6319n.m19593a(C19322e.m63386a("ro.letv.release.version"))) { return true; } return false; } /* renamed from: b */ private static String m63373b() { StringBuilder sb = new StringBuilder(); sb.append(C19322e.m63386a("ro.build.uiversion")); sb.append("_"); sb.append(Build.DISPLAY); return sb.toString(); } /* renamed from: e */ private static boolean m63376e() { String a = C19322e.m63386a("ro.vivo.os.build.display.id"); if (C6319n.m19593a(a) || !a.toLowerCase().contains(f52229c)) { return false; } return true; } /* renamed from: f */ private static boolean m63377f() { if (C6319n.m19593a(Build.DISPLAY) || !Build.DISPLAY.toLowerCase().contains(f52228b)) { return false; } return true; } /* renamed from: g */ private static String m63378g() { StringBuilder sb = new StringBuilder(); sb.append(Build.DISPLAY); sb.append("_"); sb.append(C19322e.m63386a("ro.gn.sv.version")); return sb.toString(); } /* renamed from: l */ private static String m63383l() { String str = Build.DISPLAY; if (str == null || !str.toLowerCase().contains("flyme")) { return ""; } return str; } /* renamed from: m */ private static boolean m63384m() { String str = Build.MANUFACTURER; if (!C6319n.m19593a(str)) { return str.toLowerCase().contains("oppo"); } return false; } /* renamed from: c */ private static boolean m63374c() { StringBuilder sb = new StringBuilder(); sb.append(Build.MANUFACTURER); sb.append(Build.BRAND); String sb2 = sb.toString(); if (C6319n.m19593a(sb2)) { return false; } String lowerCase = sb2.toLowerCase(); if (lowerCase.contains("360") || lowerCase.contains("qiku")) { return true; } return false; } /* renamed from: d */ private static String m63375d() { StringBuilder sb = new StringBuilder(); sb.append(C19322e.m63386a("ro.vivo.os.build.display.id")); sb.append("_"); sb.append(C19322e.m63386a("ro.vivo.product.version")); return sb.toString(); } /* renamed from: h */ private static String m63379h() { if (!m63380i()) { return ""; } StringBuilder sb = new StringBuilder("eui_"); sb.append(C19322e.m63386a("ro.letv.release.version")); sb.append("_"); sb.append(Build.DISPLAY); return sb.toString(); } /* renamed from: j */ private static String m63381j() { if (!C6776h.m20950c()) { return ""; } StringBuilder sb = new StringBuilder("miui_"); sb.append(C19322e.m63386a("ro.miui.ui.version.name")); sb.append("_"); sb.append(VERSION.INCREMENTAL); return sb.toString(); } /* renamed from: k */ private static String m63382k() { String b = C6776h.m20946b(); if (b == null || !b.toLowerCase().contains("emotionui")) { return ""; } StringBuilder sb = new StringBuilder(); sb.append(b); sb.append("_"); sb.append(Build.DISPLAY); return sb.toString(); } /* renamed from: n */ private static String m63385n() { if (!m63384m()) { return ""; } StringBuilder sb = new StringBuilder("coloros_"); sb.append(C19322e.m63386a("ro.build.version.opporom")); sb.append("_"); sb.append(Build.DISPLAY); return sb.toString(); } /* renamed from: a */ public static String m63372a() { if (C6776h.m20950c()) { return m63381j(); } if (C6776h.m20953d()) { return m63383l(); } if (m63384m()) { return m63385n(); } String k = m63382k(); if (!C6319n.m19593a(k)) { return k; } if (m63376e()) { return m63375d(); } if (m63377f()) { return m63378g(); } if (m63374c()) { return m63373b(); } String h = m63379h(); if (!C6319n.m19593a(h)) { return h; } return Build.DISPLAY; } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
2a72f42e9d219879075ebebe5596e7a593a9286f
9f52a13e4f9f70453ac20f3ef8bfa1830466ead6
/src/main/java/hello/aop/LogAspect.java
ab656bbb6de95a975795247ae9b1dc9b1d6c2960
[]
no_license
kingflag/traceLog
6b42d2dfbfc6b2b4b8a6c8c164183a0a8bfb7299
4693c2fd0a01be56af40d4ffe305fcd8ac921615
refs/heads/master
2021-07-18T18:10:16.625844
2020-07-08T01:11:31
2020-07-08T01:11:31
190,108,989
0
0
null
2020-07-08T01:11:33
2019-06-04T01:40:54
Java
UTF-8
Java
false
false
1,184
java
package hello.aop; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Pointcut; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; /** * Created by kingflag.wang on 2020/4/22. */ @Aspect @Component public class LogAspect { private static final Logger logger = LoggerFactory.getLogger(LogAspect.class); /** * 定义切入点,切入点为com.example.demo.aop.AopController中的所有函数 * 通过@Pointcut注解声明频繁使用的切点表达式 */ @Pointcut("execution(public * hello.*..*.*(..))") public void log() { } /** * @description 在连接点执行之前执行的通知 */ @Before("log()") public void doBefore(JoinPoint joinPoint) { Object args = joinPoint.getArgs(); GsonBuilder gsonBuilder = new GsonBuilder(); gsonBuilder.setPrettyPrinting(); Gson gson = gsonBuilder.create(); logger.info("传入参数:" + gson.toJson(args)); } }
[ "1362168862@qq.com" ]
1362168862@qq.com
839c26f1f30ee7ef076f3514a50fc8503ac4eb35
6d07eea6a6197ebb92f87f5755b49262c134030b
/app/src/androidTest/java/test/jiling/com/jilintest/ExampleInstrumentedTest.java
2e315145b9931977db9a7b16bca0fcb693bb9071
[]
no_license
Lvfulongmy/JilinTest
220efeabf7a942e708ed1c8db11f6d983e644e87
c75e6b3d500e85e3aeee06120a69a7cd63776ac5
refs/heads/master
2021-04-12T05:02:27.064984
2018-04-06T09:09:30
2018-04-06T09:09:30
125,952,360
0
0
null
null
null
null
UTF-8
Java
false
false
751
java
package test.jiling.com.jilintest; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("test.jiling.com.jilintest", appContext.getPackageName()); } }
[ "lfl5516@163.com" ]
lfl5516@163.com
a02b3780bb42e19d11b700da32ec1f474b14219c
68c6337cd56c14c757349c4c0a33140073380138
/app/src/main/java/com/myf/baokuqzz/map/MassTransitRouteOverlay.java
3bcd2e202aafe8c550334d782405e2c74ac24411
[]
no_license
myf333/bkqzz
4e094c0718d3fa7b225d424025b0460ad73c5636
71c1a0b0440dcf8aba383be066079398f9078bce
refs/heads/master
2021-07-15T22:27:01.935883
2017-10-22T14:58:30
2017-10-22T14:58:30
103,118,208
0
0
null
null
null
null
UTF-8
Java
false
false
8,254
java
/* * Copyright (C) 2016 Baidu, Inc. All Rights Reserved. */ package com.myf.baokuqzz.map; import java.util.ArrayList; import java.util.List; import com.baidu.mapapi.map.BaiduMap; import com.baidu.mapapi.map.BitmapDescriptor; import com.baidu.mapapi.map.BitmapDescriptorFactory; import com.baidu.mapapi.map.Marker; import com.baidu.mapapi.map.MarkerOptions; import com.baidu.mapapi.map.OverlayOptions; import com.baidu.mapapi.map.Polyline; import com.baidu.mapapi.map.PolylineOptions; import com.baidu.mapapi.search.route.MassTransitRouteLine; import android.graphics.Color; import android.os.Bundle; public class MassTransitRouteOverlay extends OverlayManager { private MassTransitRouteLine mRouteLine; private boolean isSameCity; /** * 构造函数 * * @param baiduMap * 该TransitRouteOverlay引用的 BaiduMap 对象 */ public MassTransitRouteOverlay(BaiduMap baiduMap) { super(baiduMap); } /** * 设置路线数据 * * @param routeOverlay * 路线数据 */ public void setData(MassTransitRouteLine routeOverlay) { this.mRouteLine = routeOverlay; } public void setSameCity( boolean sameCity ) { isSameCity = sameCity; } /** * 覆写此方法以改变默认起点图标 * * @return 起点图标 */ public BitmapDescriptor getStartMarker() { return null; } /** * 覆写此方法以改变默认终点图标 * * @return 终点图标 */ public BitmapDescriptor getTerminalMarker() { return null; } public int getLineColor() { return 0; } @Override public List<OverlayOptions> getOverlayOptions() { if (mRouteLine == null) { return null; } List<OverlayOptions> overlayOptionses = new ArrayList<OverlayOptions>(); List<List<MassTransitRouteLine.TransitStep>> steps = mRouteLine.getNewSteps(); if (isSameCity ) { // 同城 (同城时,每个steps的get(i)对应的List是一条step的不同方案,此处都选第一条进行绘制,即get(0)) // step node for ( int i = 0; i < steps.size(); i++ ) { MassTransitRouteLine.TransitStep step = steps.get(i).get(0); Bundle b = new Bundle(); b.putInt("index", i + 1); if (step.getStartLocation() != null) { overlayOptionses.add((new MarkerOptions()).position(step.getStartLocation()) .anchor(0.5f, 0.5f).zIndex(10).extraInfo(b).icon(getIconForStep(step))); } // 最后一个终点 if ( (i == steps.size() - 1) && (step.getEndLocation() != null)) { overlayOptionses.add((new MarkerOptions()).position(step.getEndLocation()) .anchor(0.5f, 0.5f).zIndex(10) .icon(getIconForStep(step)) ); } } // polyline for ( int i = 0; i < steps.size(); i++ ) { MassTransitRouteLine.TransitStep step = steps.get(i).get(0); int color = 0; if (step.getVehileType() != MassTransitRouteLine.TransitStep .StepVehicleInfoType.ESTEP_WALK) { // color = Color.argb(178, 0, 78, 255); color = getLineColor() != 0 ? getLineColor() : Color.argb(178, 0, 78, 255); } else { // color = Color.argb(178, 88, 208, 0); color = getLineColor() != 0 ? getLineColor() : Color.argb(178, 88, 208, 0); } overlayOptionses.add(new PolylineOptions() .points(step.getWayPoints()).width(10).color(color) .zIndex(0)); } } else { // 跨城 (跨城时,每个steps的get(i)对应的List是一条step的子路线sub_step,需要将它们全部拼接才是一条完整路线) int stepSum = 0; for (int i = 0; i < steps.size(); i++ ) { stepSum += steps.get(i).size(); } // step node int k = 1; for ( int i = 0; i < steps.size(); i++ ) { for (int j = 0; j < steps.get(i).size(); j++ ) { MassTransitRouteLine.TransitStep step = steps.get(i).get(j); Bundle b = new Bundle(); b.putInt("index", k); if (step.getStartLocation() != null) { overlayOptionses.add((new MarkerOptions()).position(step.getStartLocation()) .anchor(0.5f, 0.5f).zIndex(10).extraInfo(b).icon(getIconForStep(step))); } // 最后一个终点 if ( (k == stepSum ) && (step.getEndLocation() != null)) { overlayOptionses.add((new MarkerOptions()).position(step.getEndLocation()) .anchor(0.5f, 0.5f).zIndex(10).icon(getIconForStep(step))); } k++; } } // polyline for ( int i = 0; i < steps.size(); i++ ) { for (int j = 0; j < steps.get(i).size(); j++ ) { MassTransitRouteLine.TransitStep step = steps.get(i).get(j); int color = 0; if (step.getVehileType() != MassTransitRouteLine.TransitStep .StepVehicleInfoType.ESTEP_WALK) { // color = Color.argb(178, 0, 78, 255); color = getLineColor() != 0 ? getLineColor() : Color.argb(178, 0, 78, 255); } else { // color = Color.argb(178, 88, 208, 0); color = getLineColor() != 0 ? getLineColor() : Color.argb(178, 88, 208, 0); } if (step.getWayPoints() != null ) { overlayOptionses.add(new PolylineOptions() .points(step.getWayPoints()).width(10).color(color) .zIndex(0)); } } } } // 起点 if (mRouteLine.getStarting() != null && mRouteLine.getStarting().getLocation() != null) { overlayOptionses.add((new MarkerOptions()).position(mRouteLine.getStarting().getLocation()) .icon(getStartMarker() != null ? getStartMarker() : BitmapDescriptorFactory.fromAssetWithDpi("Icon_start.png")) .zIndex(10)); } // 终点 if (mRouteLine.getTerminal() != null && mRouteLine.getTerminal().getLocation() != null) { overlayOptionses .add((new MarkerOptions()) .position(mRouteLine.getTerminal().getLocation()) .icon(getTerminalMarker() != null ? getTerminalMarker() : BitmapDescriptorFactory .fromAssetWithDpi("Icon_end.png")) .zIndex(10)); } return overlayOptionses; } private BitmapDescriptor getIconForStep(MassTransitRouteLine.TransitStep step) { switch (step.getVehileType()) { case ESTEP_WALK: return BitmapDescriptorFactory.fromAssetWithDpi("Icon_walk_route.png"); case ESTEP_TRAIN: return BitmapDescriptorFactory.fromAssetWithDpi("Icon_subway_station.png"); case ESTEP_DRIVING: case ESTEP_COACH: case ESTEP_PLANE: case ESTEP_BUS: return BitmapDescriptorFactory.fromAssetWithDpi("Icon_bus_station.png"); default: return null; } } @Override public boolean onMarkerClick(Marker marker) { return false; } @Override public boolean onPolylineClick(Polyline polyline) { return false; } }
[ "myf333@gmail.com" ]
myf333@gmail.com