Ctrl+C&Ctrl+V
knight_black_bob · 共 487 篇文章
maven eclipse 编译错误 Dynamic Web Module 3.0 requires Java 1.6 or new
新建项目出现 Dynamic Web Module 3.0 requires Java 1.6 or new 编译器的java版本不同导致 解决方法:pom添加 这段,eclpise 一下 <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <dependencies> <dependency> <groupId>org.codehaus.plexus</groupId> <art…
2016-11-03 15:40 · maven · 评论(0) · Eclipse · maven · 编译 · 错误
checkstyle 解决 没有注释 没有括号问题 工具
checkstyle 解决 没有类注释 没有行注释 if else 没有括号问题 ,可以使用下面工具类,进行自动添加 ,节省修改时间 package com.xxx.checkstyle; public class SearchResult { String filename; String lineString; String error; int line; } package com.xxx.checkstyle; public interface IProcessLine { public String processLine(String line); public int get…
2016-10-24 15:46 · checkstyle · 评论(0) · 工具 · 问题 · CheckStyle
iOS qq布局
iOS qq布局 resideview leftmenuview -| uiviewcontroller contentview -| 一个tab bar controller =| 两个 navigation controller =|两个 uiview controller 1 捐助开发者 在兴趣的驱动下,写一个 免费 的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(右上角的爱心标志,支持支付宝和PayPal捐助),没钱捧个人场,谢谢各位。 谢谢您的赞助,我会做的更好!
2016-10-22 20:09 · ios · 评论(0) · iOS · QQ · 布局
iOS ReSideMenu 使用
pod 'RESideMenu', '~> 4.0.7' github 地址 ;https://github.com/romaonthego/RESideMenu 不缩放 self.scaleContentView = NO; 1. storyborad 添加 slideView 创建 一个 SlideViewController 继承 resideview main.storyBoard 中 class 是 SlideViewController 添加 storyboradId 用于区分 2. storyboard 添加 LeftMenuViewController 添加 storybor…
2016-10-22 17:10 · ios · 评论(0) · iOS · 使用
iOS afnetworking 使用
#import "AFHTTPSessionManager.h" AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; [manager GET:@"http://ods5pg0qp.bkt.clouddn.com/mysqlconsole/mysqlconsole.json" parameters:nil progress:^(NSProgress * _Nonnull downloadProgress) { }success:^(NSURLSessionDataTask * _Nonnull task, id _N…
2016-10-21 22:05 · ios · 评论(0) · iOS · 使用
iOS coredata 使用
// // AppDelegate.h // IteyeBlog // // Created by youbao on 16/9/24. // Copyright © 2016年 youbao. All rights reserved. // #import <UIKit/UIKit.h> #import <CoreData/CoreData.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @property (rea…
2016-10-21 21:58 · ios · 评论(0) · iOS · 使用 · coredata
iOS sdwebimage 使用
#import "UIImageView+WebCache.h" [self.image sd_setImageWithURL:[NSURL URLWithString:@"http://ods5pg0qp.bkt.clouddn.com/iteyeblog/icon.png"] placeholderImage:[UIImage imageNamed:@"placeholder.png"]]; 捐助开发者 在兴趣的驱动下,写一个 免费 的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(右上角的爱心标志,支持支付宝和PayPal捐助),没钱捧个人场,谢谢…
2016-10-21 21:56 · ios · 评论(0) · iOS · 使用 · SDWebImage
iOS mjrefresh 使用
TableViewController.h // // TableViewContoller.h // IteyeBlog // // Created by youbao on 16/10/15. // Copyright © 2016年 youbao. All rights reserved. // #import <UIKit/UIKit.h> @interface TableViewContoller : UIViewController @end TableViewController.m // // TableViewContoller.m // IteyeBlog // // C…
2016-10-21 21:39 · ios · 评论(0) · iOS · 使用
junit 单元测试覆盖率 插件
junit 单元测试覆盖率 插件 <!-- Maven jacoco begin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.10</version> <configuration> <testFailureIgnore>true</testFailureIgnore> <argLine>${argLine}</argLine> </configuration> </plugin> <plugin> <gro…
2016-10-20 16:26 · junit · 评论(0) · junit · 插件 · 测试 · 覆盖率
Ios cocoapods 安装及使用
更新ruby 1.安装 rvm RVM:Ruby Version Manager,Ruby版本管理器,包括Ruby的版本管理和Gem库管理(gemset) 1.安装rvm curl -L get.rvm.io | bash -s stable 2. source ~/.bashrc source ~/.bash_profile 3.显示本机版本 rvm -v 我电脑上是 2.0.0 4.列出所有版本 rvm list known 5. 安装2.3.0 rvm install 2.3 6.测试验证 rvm -v 更新 gem 1. gem sources -l 默认 *** CURRENT S…
2016-10-18 22:35 · ios · 评论(0) · iOS · 安装 · 使用
addroid 自定义布局
Activity类部分代码: RelativeLayout rl = new RelativeLayout(this); //设置RelativeLayout布局的宽高 RelativeLayout.LayoutParams relLayoutParams=new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT); TextView temp = new TextView(this); temp .setId(1); temp.setText(“图片”); rl.addView(t…
2016-10-14 18:02 · android · 评论(0) · Android · 自定义 · 布局
findbugs eclipse 插件 及使用
1.下载 findbugs插件 地址:http://download.csdn.net/download/knight_black_bob/9652590 edu.umd.cs.findbugs.plugin.eclipse_3.0.1.20150306-5afe4d1 解压到features中,重启eclipse 2.右击项目 > properties 会发现有 findbugs 插件 3.maven pom 中添加 插件信息 用于jenkins 验证 <reporting> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <…
2016-10-13 11:20 · Findbugs · 评论(0) · Eclipse · 插件 · FindBugs · 使用
findbugs 常见问题 及解决方案
1 Bad practice 坏的实践 一些不好的实践,下面列举几个: HE:类定义了equals(),却没有hashCode();或类定义了equals(),却使用Object.hashCode();或类定义了hashCode(),却没有equals();或类定义了hashCode(),却使用Object.equals();类继承了equals(),却使用Object.hashCode()。 SQL:Statement 的execute方法调用了非常量的字符串;或Prepared Statement是由一个非常量的字符串产生。 DE:方法终止或不处理异常,一般情况下,异常应该被处理或报告,…
2016-10-13 11:14 · Findbugs · exception · 评论(0) · FindBugs · 解决 · 问题 · 方案
Java编码规范V1.0
Java编码规范V1.0 1 代码总体原则 1. 清晰第一 清晰性是易于维护、易于重构的程序必需具备的特征。代码首先 是给人读的,其次才给机器用来执行。 目前软件维护期成本占整个生命周期成本的 40%~90%。根据业界经 验,维护期变更代码的成本,小型系统是开发期的 5 倍,大型系统 (100 万行代码以上)可以达到 100 倍。业界的调查指出,开发组平 均大约一半的人力用于弥补过去的错误,而不是添加新的功能来帮助 公司提高竞争力。可见代码清晰的重要。 2. 简洁为美 简洁就是易于理解并且易于实现。代码越长越难以看懂,也就越容易 在修改时引入错误。写的代码越多,意味着出错的地方越多,也就意 …
2016-10-08 10:59 · java · 评论(0) · Java · 规范 · 编码
checkstyle 使用
下载: checkstyle 规范 (包含 codeformatter codetemplates checkstyle 文件) http://download.csdn.net/download/knight_black_bob/9640991 下载 checkstyle 插件 http://download.csdn.net/download/knight_black_bob/9643244 一、配置 Code Templates 设置 Eclipse 代码模版 打开 Eclipse 设置面板,选择 Java -> Code Style -> Code Templates, 如图: 点击…
2016-09-26 17:45 · checkstyle · 评论(0) · 规范 · CheckStyle