In this lesson we'll use prettier and lint-staged to run prettier only on files that have been changed and committed to git. This will allow you to prettify files as you change them, and prevent massive lint only git check ins. Install: npm i husky l…
重装操作系统之后,或者破坏了Android的开发环境之后,需要重新配置好Android的开发环境.但是配置好后,导入原有的项目时,报错: Android requires compiler compliance level 5.0 or 6.0. Found '1.8' instead. Please use Android Tools>Fix project Properties. 解决方法: 1.按照报错的提示,项目右击-->Android Tools-->Fix project P…
Creating Markdown files from a template is a straightforward process with Node.js and Mustache. You can define a template, load it into your script, then push whatever data you have into your template, then write the files back out. Node.js built-in…
1 问题描述 HDFS在机器断电或意外崩溃的情况下,有可能出现正在写的数据(例如保存在DataNode内存的数据等)丢失的问题.再次重启HDFS后,发现hdfs无法启动,查看日志后发现,一直处于安全模式. 2 原因分析 出现前面提到的问题主要原因是客户端写入的数据没有及时保存到磁盘中,从而导致数据丢失:又因为数据块丢失达到一定的比率,导致hdfs启动进入安全模式. 为了弄清楚导致安全模式的原因,下面主要对hdfs安全模式和如何退出安全模式进行分析. 2.1 安全模式 当 hdfs的NameNod…
创建TypeScript代码模板(NVS+Yarn+ESLint+Prettier+Husky) Cui, Richard Chikun 本文笔者将带你在Github代码仓库创建TypeScript代码模板,并集成最新的代码开发工具,如:Node.js版本管理工具NVM for Windows.包管理器Yarn.静态代码检查工具ESLint.代码格式化工具Prettier.Git钩子(Hook)工具Husky等. 安装Visual Studio Code 在开始进行TypeScript开发之前,…
Question: I have the 64bit version of the jdk installed on windows 7. I installed the 32 bit version of the jre as websites complained that I didn't have the java plugin. I tried in vain to get firefox to recognize the 64bit jre probably because fire…
问题背景 通常使用 ESLint做代码风格检查检查, 和部分代码质量检查. 但是使用ESLint在入库时候, 会产生很多的代码修正工作, 需要开发者一个一个的修改. 如果很多,并且时间紧迫,甚是尴尬. ESLint http://eslint.cn/ ESLint最初是由Nicholas C. Zakas 于2013年6月创建的开源项目.它的目标是提供一个插件化的javascript代码检测工具. 代码检查是一种静态的分析,常用于寻找有问题的模式或者代码,并且不依赖于具体的编码风格.对大多数编程…
简化dba的管理操作 1:启用 omf 23:16:04 SYS@orcl> show parameter DB_CREATE_FILE_DEST NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_create_file_dest string 23:16:17 SYS@orcl> select distinct t1.name,t2.name d…
代码规范是软件开发领域经久不衰的话题,几乎所有工程师在开发过程中都会遇到或思考过这一问题.而随着前端应用的大型化和复杂化,越来越多的前端团队也开始重视代码规范.同样,前段时间,笔者所在的团队也开展了一波开源治理,而其中代码规范就占据了很重要的一项.接下来的几篇文章,将会对JS代码规范.CSS规范.Git工作流规范以及文档规范进行详细的介绍~ 系列文章: 前端规范之JS代码规范(ESLint + Prettier) 前端规范之CSS规范(Stylelint) 前端规范之Gti工作流规范(Husky…
安装Prettier Prettier是优化代码格式的工具,可优化JavaScript.TypeScript.JSON等代码及配置文件. 使用命令yarn add -D --exact prettier安装Prettier. 创建文件.prettierrc.json,内容如下: {} 创建文件.prettierignore,内容如下: # Ignore artifacts: build coverage 执行命令优化文件格式:yarn prettier --write . 执行命令检查文件格式:…
From: http://www.vogella.com/tutorials/Git/article.html Git - Tutorial Lars Vogel Version 5.6 Copyright © 2009, 2010, 2011, 2012, 2013, 2014 Lars Vogel 08.02.2014 Revision History Revision 0.1 - 5.6 13.09.2009 - 08.02.2014 LarsVogel bug fixes and imp…
转自:http://www.vogella.com/tutorials/Git/article.html#git_rename_branch Lars Vogel Version 5.8 Copyright © 2009-2015 vogella GmbH 10.08.2015 Git Tutorial This tutorial explains the usage of the distributed version control system Git via the command li…
主要参考: 官方书籍: Pro Git 中文版:http://git.perlchina.org/book/zh 英文版:http://git.perlchina.org/book http://git-scm.com 因一些原因无法访问,perlchina 社区制作了这个网站的实时镜像. http://git.perlchina.org 还有一个比较好的站点:http://gitref.cyj.me/zh/ http://www.worldhello.net/gotgithub/ Git Co…
https://www.ntu.edu.sg/home/ehchua/programming/howto/Git_HowTo.html#zz-7. 1.  Introduction GIT is a Version Control System (VCS) (aka Revision Control System (RCS), Source Code Manager (SCM)). A VCS serves as a Repository (or repo) of program codes,…
Help on module guestfs: NAME guestfs - Python bindings for libguestfs FILE /usr/lib64/python2.7/site-packages/guestfs.py DESCRIPTION import guestfs g = guestfs.GuestFS(python_return_dict=True) g.add_drive_opts("guest.img", format="raw"…
Awesome系列的JavaScript资源整理.awesome-javascript是sorrycc发起维护的 JS 资源列表,内容包括:包管理器.加载器.测试框架.运行器.QA.MVC框架和库.模板引擎.数据可视化.时间轴.编辑器等. 前端MVC框架与库 angular.js - 前端MVVM框架,支持双向绑定,实现MVC架构,增强Web应用 aurelia - A Javascript client framework for mobile, desktop and web. backbo…
Android Lint Checks Here are the current list of checks that lint performs as of Android Studio 2.3 dev:     Correctness ===========   AdapterViewChildren ------------------- Summary: AdapterViews cannot have children in XML   Priority: 10 / 10 Sever…
一.导入的jar包不存在: 右键工程属性查看: 导入的第三方jar包不存在: 解决方法: 删除该jar包,得到该jar包并存至本地,再导入该jar包 二.中文字符乱码: 解决方法: 右键项目属性: 修改字符编码方式即可 三.编译器版本不同: 解决方法: 右键项目属性: 修改成相应版本即可 四.R.java丢失: R,java出现错误后,先clean一下project,这样R.java就丢失了,但是别担心,刷新项目,R文件会自动更新出来,如果不更新的话一定是程序中有错误,一般情况下是命名问题. 我…
调试SQLSERVER (三)使用Windbg调试SQLSERVER的一些命令 调试SQLSERVER (一)生成dump文件的方法调试SQLSERVER (二)使用Windbg调试SQLSERVER的环境设置 windbg命令分为标准命令.元命令.扩展命令 标准命令提供最基本的调试功能,不区分大小写.如:bp g dt dv k等 元命令提供标准命令没有提供的功能,也内建在调试引擎中,以.开头.如.sympath .reload等 扩展命令用于扩展某一方面的调试功能,实现在动态加载的扩展模块中…
In this post I'm going to help you understand how Kafka stores its data. I've found understanding this useful when tuning Kafka's performance and for context on what each broker configuration actually does. I was inspired by Kafka's simplicity and us…
Reference Genome Components 1. GRCh38 is special because it has alternate contigs that represent population haplotypes. Don't know alternate contig from alternate dimension? Spend five minutes now to review terminology in our Dictionary entryReferenc…
How To Use Git Source Control with Xcode in iOS 6 If you're new here, you may want to subscribe to my RSS feed or follow me on Twitter. Thanks for visiting! How to use Git source control with Xcode This tutorial is by Malek Trabelsi, a passionate iOS…
什么是JNI内存泄露,基本的避免方法 : http://www.ibm.com/developerworks/cn/java/j-lo-jnileak/ 最近的课题中需要用到Spark,同组同学负责的算法用c++写的,数据库读取及调用算法用的是java,因此在整合的时候用到了jni. 因为任务需要并行,因此想到了用多线程实现. 程序在单机单线程的情况下运行没问题,当开两个线程的时候就出现了如下错误: # A fatal error has been detected by the Java Ru…
[错误信息] [2011-01-19 16:39:10 - ApiDemos] WARNING: Application does not specify an API level requirement![2011-01-19 16:39:10 - ApiDemos] Device API version is 8 (Android 2.2) 原因: 不影响正常运行.在AndroidManifest.xml文件中没有加API的版本号,在<manifest> </manifest>…
待计算的wordCount文件放在HDFS上. wc.txt: hive hadoop hello hello world hbase hive 目标:进行WordCount计算,把结果输出到HBase表中 1.先在HBase中创建表wc create 'wc','cf' 2. WCRunner.class package com.bjsxt.wc; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.…
Linux target framework (tgt) aims to simplify various SCSI target driver (iSCSI, Fibre Channel, SRP, etc) creation and maintenance. The key goals are the clean integration into the scsi-mid layer and implementing a great portion of tgt in user space.…
在java开发中,或许会出现如下错误,这种错误大多出现在开发中涉及本地代码的地方. ## A fatal error has been detected by the Java Runtime Environment:##  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000057441b5f, pid=9272, tid=0x0000000000004534#           信号名称             信号码       …
一.JAVA中获取JVM的信息 原理,利用JavaSDK自带的ManagementFactory类来获取. 二.获取信息 1.获取进程ID @Test public void test1() { RuntimeMXBean mxb = ManagementFactory.getRuntimeMXBean(); System.out.println(mxb.getName()); //2668@Sindrol-PC } 2.获取ManagementFactory.getRuntimeMXBean(…
文件位于system/core/common.php,是框架核心文件. 该文件中定义了一系列的函数,都是框架运行中经常需要用到的.下面逐一介绍. is_php /** * Determines if the current version of PHP is equal to or greater than the supplied value * * @param string * @return bool TRUE if the current version is $version or…
Redis 5.0 release notes ======================= -------------------------------------------------------------------------------- Upgrade urgency levels: LOW: No need to upgrade unless there are new features you want to use. MODERATE: Program an upgra…