自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4447)
  • 收藏
  • 关注

转载 excel文件读写

首先,需要安装golang用来操作excel文档的类库:go get github.com/Luxurioust/excelize一、excel文件创建与写入package mainimport ( "log" "github.com/Luxurioust/excelize")func main() { //创建excel文件...

2019-09-30 17:38:00 567

转载 文件读写

一、文件读取1.将整个文件读取到内存中package mainimport ( "flag" "fmt" "io/ioutil")func main() { //从命令行标记参数中获取文件路径 fptr := flag.String("fpath", "test.txt", "the file path to read from")...

2019-09-30 15:34:00 527

转载 四种排序算法与二分查找

1.冒泡排序func BubbleSort(slice []int) []int { i, j, okay, count := 0, 0, true, len(slice) for i = 0; i < count-1; i++ { //最多需要进行count-1轮比较 okay = true for j = 0; j < count-i-1; ...

2019-09-30 15:18:00 626

转载 SPARK SQL ERROR: Detected cartesian product for INNER join between logical plans报错解决方法

SparkSql运行程序报错,Exception in thread "main" org.apache.spark.sql.AnalysisException: Detected cartesian product for INNER join between logical plans解决方式:设置spark.sql.crossJoin.enabled=true因为...

2019-09-29 09:59:00 4157

转载 Express配置ssl证书,为网站开启https

本文不对express多做介绍,下面直奔主题:一、下载证书(以腾讯云为例):  解压下载的压缩包,找到Nginx文件夹,里面有两个以crt和key结尾的文件,在你的项目根目录新建名为https的空文件夹,把crt文件和key文件复制到https文件夹中;二、项目配置:  1、找到bin文件夹下的www文件(你的项目中启动node server的文件,如果没有,那应该是ap...

2019-09-25 15:22:00 1472

转载 自启动脚本

https://www.cnblogs.com/dpf-learn/p/7783314.html转载于:https://www.cnblogs.com/vana/p/11569899.html

2019-09-22 23:12:00 165

转载 [Dart] Dynamic variable in Dart

First way to create dynamic variable is using 'dymaic' keywrod: dynamic a = 123; a = '123';Second way is using 'var' but unassign any value:void main() { var a; a = '123...

2019-09-22 19:35:00 153

转载 [NgRx] NgRx Runtime Checks

Turn on runtime check:@NgModule({ declarations: [AppComponent], imports: [ ..., StoreModule.forRoot(reducers, { metaReducers, runtimeChecks: { strictSta...

2019-09-22 17:16:00 198

转载 [NgRx] Setting up NgRx Router Store and the Time-Travelling Debugger

Make sure you have the@ngrx packages installed: "@ngrx/data": "^8.0.1", "@ngrx/effects": "^8.0.1", "@ngrx/entity": "^8.0.1", "@ngrx/router-store": "^8.0.1", "@ngrx/stor...

2019-09-22 17:08:00 123

转载 [RxJS] Convert a Node.js style callback to Observable: bindNodeCallback

It's just likebindCallback, but the callback is expected to be of typecallback(error, result).import * as fs from 'fs';const readFileAsObservable = bindNodeCallback(fs.readFile);const r...

2019-09-20 15:20:00 156

转载 [Flutter] Layout

https://medium.com/flutter-community/flutter-layout-cheat-sheet-5363348d037e转载于:https://www.cnblogs.com/Answer1215/p/11553548.html

2019-09-20 01:14:00 155

转载 [Cypress] install, configure, and script Cypress for JavaScript web applications -- part5

Use the Most Robust Selector for Cypress TestsWhich selectors your choose for your tests matter, a lot. In this lesson, we'll see the recommended Cypress best practices for selectors, and why w...

2019-09-19 16:01:00 167

转载 scala的lazy关键字

scala里面的lazy一般是一个关键字,多用于放在一个变量的前面,这样表示这个变量是一个惰性变量package day02/** * 在scala中用Lazy定义的变量叫惰性变量,会实现延迟加载,即在编译的时候并没有执行, * 惰性变量只能是不可变变量,且只有在调用惰性变量时,才会去实例化这个变量。 */object ScalaLazyDemo1 { def init(): Un...

2019-09-18 12:37:00 170

转载 scala集合三大类(seq序列,set集,map映射)——map映射

scala集合三大类(seq序列,set集,map映射)——map映射map映射:scala> import scala.collection.mutable.HashMap._import scala.collection.mutable.HashMap._scala> val map1 = new HashMap[String,Int]()map...

2019-09-18 12:15:00 520

转载 scala集合三大类(seq序列,set集,map映射)——set集合

scala集合三大类(seq序列,set集,map映射)——set集合set集合scala> import scala.collection.immutable.HashSet //导入不可变HashSet包import scala.collection.immutable.HashSetscala> val set1 = new HashSet[...

2019-09-18 11:57:00 216

转载 scala集合三大类(seq序列,set集,map映射)——list序列

scala集合三大类(seq序列,set集,map映射)seq序列:scala> val list1 = List(1,2,3)list1: List[Int] = List(1, 2, 3)scala> val list2 = 0 :: list1list2: List[Int] = List(0, 1, 2, 3)//下面两个方式效果一...

2019-09-18 11:20:00 569

转载 scala元组及拉链操作

scala元组及拉链操作:scala里面的元组是可是不同数据类型的scala> ("scala",1)res45: (String, Int) = (scala,1)scala> val t = ("scala",100L,3.14,("spark",1))t: (String, Long, Double, (String, Int)) = (...

2019-09-18 10:42:00 336

转载 scala的map映射

scala的map映射:scala> val map1 = Map("scala"->1, "java"->2,"python"->3) //定义map方法一,都是调用其静态方法map1: scala.collection.immutable.Map[String,Int] = Map(scala -> 1, java -&g...

2019-09-17 16:35:00 254

转载 scala数组

scala数组:分为定长数组和变长数组scala> val arr1 = new Array[Int](8) //只定义8个是整型类型的定长数组,没有赋值,每个数组里面的值是0arr1: Array[Int] = Array(0, 0, 0, 0, 0, 0, 0, 0)scala> val arr1 = new Array[S...

2019-09-17 16:04:00 313

转载 scala方法和涵数的声明以及方法转换成涵数

scala方法和涵数的声明以及方法转换成涵数:方法声明:scala> def m1(x:Int, y:Int) : Int = x + ym1: (x: Int, y: Int)Intscala> m1(3,4)res9: Int = 7x + y为涵数体涵数声明:scala> val f1 = (x: Int, y: Int) ...

2019-09-17 14:44:00 127

转载 scala的基础数据类型&if条件表达式&for循环

scala的基础数据类型有7种:(无引用类型)  Byte  Char  Short  Int  Long  Float  Double两种变量类型定义:val(常量)var(变量)使用val定义的常量,指引用的不可再改变,而用var变量引用的是可以进行改变,如下示:注:scala语言可以不用定义变量的数据类型,变量的数据类型...

2019-09-17 14:24:00 130

转载 Mac安装scala插件

作用homebrew命令进行安装终端:ruby-e"$(curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"(如果缺权限,提前输入sudo chmod -R g+w /usr/local)如果超时:/usr/bin/ruby -e \ "$(curl -...

2019-09-17 11:30:00 225

转载 MS yc

#word - operate标题栏菜单栏工具栏页面状态栏字体阴影 背景色 着重号 项目符号 数字编码 格式刷转载于:https://www.cnblogs.com/zhangchen-sx/p/11532602.html...

2019-09-17 11:29:00 89

转载 文本相关杂七杂八

一、词袋模型维度=|词典|; 稀疏向量假设词典里有7个单词【我们,去,爬山,今天,你们,昨天,运动】每个单词的表示:我们:[1,0,0,0,0,0,0]爬山:[0,0,1,0,0,0,0]运动:[0,0,1,0,0,0,1]句子的表示:我们今天去爬山:[1,1,1,1,0,0,0]你们昨天运动:[0,0,0,0,1,1,1]怎么表示句子的相关性?...

2019-09-16 23:35:00 139

转载 前端

//清空table中的html 使用td、th标签拼接而成$("#id名").html("");转载于:https://www.cnblogs.com/smallwangmusk/p/11528813.html

2019-09-16 18:14:00 93

转载 [CSS] Change the Alignment of a Single Flexed Item with 'align-self'

Inside of a flexed container, a single item can control its own flex withalign-self. The possible values areflex-start,flex-end,center, orstretchInside column layout, the ' stretch' is ...

2019-09-16 15:08:00 94

转载 [CSS] Change the off-axis Alignment of a Flexed Container with `align-items`

We changed the axis layout with 'justify-content', and the "off axis" layout is controlled by 'align-items'. The most common values areflex-start,flex-end, orcenter.body { display: flex...

2019-09-16 14:59:00 89

转载 [CSS] The :empty Pseudo Selector Gotchas

The:emptypseudo selector selects empty elements. We can use this to display useful messages instead of the empty content or hide the content completely. However, the:emptypseudo selector come...

2019-09-16 14:52:00 152

转载 [ARIA] What is Accessible Name Calculation?

What's in a name? In this lesson, I'll explain the concept of naming interactive elements for screen reader users, including forms, buttons, and links. You'll learn how to debug accessible names ...

2019-09-15 16:17:00 229

转载 [ARIA] Accessible animations with reduced motion

Animations can make people sick, or worse! By adding animation toggles and listening in to the user's system preference for reducing motion on OSX and iOS, we can give them more control over our ...

2019-09-15 16:01:00 122

转载 [ARIA] Accessible modal dialogs

Learn how to create a modal dialog with accessible keyboard and screen reader mechanics using the native HTML5 dialog element and experimental inert attribute (with polyfills) and JavaScript focu...

2019-09-15 15:51:00 124

转载 端口

今天要使用python写一个端口探测的小程序,以检测一些特定的服务端口有没有被占用,突然发现自己居然不知道在linux中如何查询端口被占用的情况,天呐,赶快学习一下。????Linux如何查看端口1、lsof -i:端口号 用于查看某一端口的占用情况,比如查看8000端口使用情况,lsof -i:8000# lsof -i:8000COMMAND PID USER...

2019-09-14 15:44:00 100

转载 Spring AOP知识点整理

Spring的两个核心知识点是:IOC和AOP。AOP是Spring 框架的一个关键组件,全称为Aspect-OrientedProgramming(面向切面编程),目前已是一种比较成熟的编程方式。AOP采取横向抽取机制,将分散在各个方法中的重复代码提取出来,然后在编译或运行的时候,再将这些代码应用到需要执行的地方。注:提取出来的代码应用到需要执行的地方,并不会把源代码加到需...

2019-09-08 12:41:00 205

转载 【转载】spring aop 面试考点

问:Spring的AOP是怎么实现的? 解: Spring AOP中的动态代理主要有两种方式,JDK动态代理和CGLIB动态代理。JDK动态代理通过反射来接收被代理的类,并且要求被代理的类必须实现一个接口。JDK动态代理的核心是InvocationHandler接口和Proxy类。如果目标类没有实现接口,那么Spring AOP会选择使用CGLIB来动态代理目标类。C...

2019-09-07 11:55:00 111

转载 【转载】MDC 是什么?

#分布式MDC 是什么?其实就是 Slf4j 提供的一种便于对用户请求的流程进行归类标记的机制。因为在大型的分布式系统环境下,一次用户请求的系统调用链可能很长,会涉及到多个上下游系统,那你怎么知道在不同的系统下的日志是属于某一次请求而产生的呢?通过 MDC 就可以做到。出现的背景?如今,在 Java 开发中,日志的打印输出是必不可少的,Slf4j + LogBack ...

2019-09-07 11:18:00 318

转载 【转载】在分布式项目中,每个服务器的日志从产生,到集中到一个统一日志平台的流程是什么,中间都有那些过程?...

elk原理看一下,应该可以理解。从框架整体性看,主要有三步:1.日志收集2.日志存储3.日志查询展示日志收集,在业务系统产生操作日志或者业务日志时,通过主动发送或者被动收集的方式获取分布式系统的日志,之后日志通过特定的过滤,转化,等等,发送到日志存储系统。这个环节涉及一些组件或者工具,比如elk中的 kafka.flume,或者更轻的工具。日志存储,通过日志收集组...

2019-09-07 11:16:00 270

转载 【转载】门面日志如何自动发现日志组件

common-logging 与 slf4j 都是日志实现门面,它们本身都不具体实现写日记操作,只是提供统一的接口。common-logging 是最早的日志门面实现,而 SLF4J 是较新的日志门面实现。因此 SLF4J 在性能以及兼容性处理会比 common-logging 要好。commons-loggingcommons-logging是apache提供的一个通用的日志接...

2019-09-07 10:49:00 147

转载 [AngularJS] Extend Controller

/** * Module definition and dependencies */angular.module('App.Child', [])/** * Component */.component('child', { templateUrl: 'child.html', controller: 'ChildCtrl',})...

2019-09-06 18:00:00 151

转载 [Dart] Manipulate Lists/Arrays in Dart

We will learn how to work with Lists using a variety of methods made available in thedart:corelibrary. We will explore the top methods for working with List type collections.Learn more about ...

2019-09-04 15:26:00 125

转载 [Dart] splitMapJoin

var str3 = '''Multi Line String'''; print( str3.splitMapJoin( RegExp(r'^', multiLine: true), // Matches the beginning of the line onMatch: (m) => '** ${m.group(0)}...

2019-09-04 15:18:00 483

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除