自定义博客皮肤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)
  • 收藏
  • 关注

转载 [Dart] Capture and Handle Data Sequences with Streams in Dart

Streams represent a sequence of asynchronous events. Each event is either a data event, also called an element of the stream, or an error event, which is a notification that something has failed....

2019-09-03 17:21:00 71

转载 [Javascript] Run asynchronous functions in sequence using reduce

This can be handy if you have a rate limit on API requests or if you need to pass the result of each promise to the next one.function fetchMessages(username) { return fetch(`https://exa...

2019-09-03 13:06:00 71

转载 1

##处理图片 大于700的改为1024*1024 小于700的800*800 产品主体占主体75%-85%为好主图不包含其他不相关内容 配件 水印 不能出现中文 logo裁剪工具 正方形 单击 拉达拉小修补工具 右键点击 工具 框选不要的区域 拖到背景图层地方仿制图章 按住alt键鼠标点击 全放手 复制涂抹保存 ctrl shift ...

2019-09-02 18:44:00 70

转载 [Functional Programming] Rewrite a reducer with functional state ADT

For example we have a feature reducer like this:// selectCard :: String -> Action Stringexport const selectCard = createAction(SELECT_CARD)// showFeedback :: String -> Action S...

2019-09-02 16:27:00 100

转载 [Angular] Using Pipe for function memoization

Sometimes we might have some expensive function to calcuate state directly from template:<div class="chip"> {{ calculate (item.num)}}</div> calculate(num: number) {...

2019-09-02 15:40:00 68

转载 前端H5与安卓和ios之间通信

在一些app场景中,经常看到app里面嵌套H5页面,安卓和ios提供一个空壳子,方法两者互相调用。上一周就是写H5页面让安卓和ios调用使用,中间传参,接受参数。通过 window.wx 对象调用一些原生 app 的功能。这个H5页面,我用的是vue来写的。用到了vue全家桶。1.调用app方法。因为安卓和ios不同。需要写一个方法,来判断机型是安卓或者是ios;fun...

2019-09-02 14:50:00 516

转载 Electron-vue中通过WebAudioApi实现录音功能,并转换为mp3格式,实时监测音频设备变化...

实现以下功能:1、检测当前音频环境,是否支持录音(WebAudio Api);2、获取输入、输出设备列表,获取电脑默认的音频设备;3、试音功能,通过分析录音样本数据,判断是否录到声音;4、实时监听录音过程,根据样本片段展示录音音波;5、实时监听音频设备变化,有设备插入或拔出时给出相应反馈;6、生成wav文件;7、支持转换为mp3格式,由于是同步转换,所有...

2019-09-02 10:05:00 1100

转载 [React + GraphQL] Use useLazyQuery to manually execute a query with Apollo React Hooks

When usinguseQueryfrom Apollo React Hooks, the request will be sent automatically after the component has been mounted. This might not be the desired behaviour as we might want to send the requ...

2019-08-29 19:25:00 127

转载 [CSS] Conditionally Assign Style to a Parent Element with Focus-Within Pseudo-class

Use the focus-within pseudo-class to conditionally assign styling to a parent element when its child receives focus.HTML:import "./styles.css";document.getElementById("app").innerHTML =...

2019-08-29 17:15:00 77

转载 [Angular 8] Calculate and Measure Performance budgets with the Angular CLI

Measuring is extremely important, without numbers we don’t know about potential problems and we don’t have a base we can improve upon.Performance Budgetsare a way to impose limits on metrics th...

2019-08-29 17:12:00 58

转载 [Angular 8] Custom Route Preloading with ngx-quicklink and Angular

In aprevious lesson we learned about implementing a custom preloading strategy. That gives you a lot of control over which route to preload and which not, whether it is based on the user's permi...

2019-08-29 17:09:00 97

转载 [Angular 8] Implement a Custom Preloading Strategy with Angular

Preloading all modulesis quite an extreme approach and might not always be desirable. For instance, you don't want to preload lazy routes a user might not even have access to. Therefore, in this...

2019-08-29 17:06:00 85

转载 [Angular 8] Lazy loading with dynamic loading syntax

@NgModule({ declarations: [AppComponent, HomeComponent], imports: [ BrowserModule, MatSidenavModule, BrowserAnimationsModule, RouterModule.forRoot( [ {...

2019-08-29 17:02:00 112

转载 ubuntu 上开发.netcore

ubuntu需要安装的软件:1.sudo apt-get install openssh-server openssh-client2.sudo apt-get git3.安装vscode4.安装.Net Core SDK5.安装C#插件,C# Extensions 插件6.安装nuget package managervscode 常用扩展:1.C#...

2019-08-29 14:23:00 357

转载 使用python获取微医数据

用到的包:BeautifulSouppymysqlrequestsjson碰到的问题:1.医生查询分页数据不能超过38页,超过无法返回数据2.某些字段对应的html元素包含一些无效的class,导致通过BeautifulSoup获取不到该字段3.按地区搜索医院列表的分页数据不能超过100页,超过返回的重复数据,导致需要手工删除hospital,de...

2019-08-29 14:21:00 211

转载 amazon 1

# 跨境电商Amazon 丰富强大的海外站 开店流程 https://www.cifnews.com/article/48921注册事项以及二审怎么过 https://www.cifnews.com/article/48878什么是跟卖?重产品轻卖家 https://www.cifnews.com/article/48441Keepa就是一款用来监控跟卖亚马逊...

2019-08-28 23:09:00 247

转载 堆叠注入

什么是堆叠注入?顾名思义,堆叠注入就是将一堆sql语句叠加在一起执行,使用分号结束上一个语句再叠加其他语句一起执行。题目首先尝试闭合引号,并注释后面的内容。发现没有报错,那就判断一下有多少列。由此可以判断出有两列,接着判断回显位。发现回显了过滤规则,select是被过滤的,还有一些注入常用语句也被过滤了。这时就可以尝试一下堆叠注入。发现这里爆出了所有数据库,再...

2019-08-28 20:34:00 233

转载 [SCSS] SASS dynamic class properties

@mixin generateModifers($property) { #{$property}: $padding; &-large { #{$property}: $padding-large; } &-medium { #{$property}: 1.5rem; } &-small {...

2019-08-28 19:53:00 98

转载 在docker 安装gitlab

一、Centos7上安装官方文档:https://docs.docker.com/install/linux/docker-ce/centos/1.安装环境yuminstall-yyum-utilsdevice-mapper-persistent-datalvm22.设置源yum-config-manager\--add-rep...

2019-08-28 14:52:00 64

转载 安装新版本报错

https://about.gitlab.com/install/#centos-7搞半天还是官网的合适重装新版gitlab时遇到gitlab-rails database初始化失败gitlab使用了很久了,一直没有什么升级,自己测试环境的版本一直是8.8.5版,由于功能满足了就没有更新。本次因为测试需要,所以更换了一个比较新的版本。环境说明Centos7: ...

2019-08-28 10:20:00 395

转载 drf 组件

#中间件 request view exception response render_templatecsrf原理(在这个里面process_view) except protect rest 10个 https://www.cnblogs.com/wupeiqi/aticles/78053...

2019-08-28 00:09:00 119

转载 【转载】ArrayList从源码看扩容实现

public class ArrayList<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, java.io.SerializableArrayList类继承自抽象类AbstractList,实现了List接口,随机存取RandomAccess接...

2019-08-27 22:29:00 113

转载 [Angular] Show a Loading Indicator for Lazy Routes in Angular

We can easily code split and lazy load a route in Angular. However when the user then clicks that lazy loaded route, it make some time to actually fetch and run the JavaScript bundle. In this les...

2019-08-27 18:26:00 72

转载 爬虫学习推荐目录

01.jupyter环境安装02.Python网络爬虫第二弹《http和https协议》03.Python网络爬虫第一弹《Python网络爬虫相关基础概念》04.Python网络爬虫之requests模块(1)05.Python网络爬虫之三种数据解析方式06.Python网络爬虫之requests模块(2)07.验证码处理...

2019-08-26 19:06:00 80

转载 anaconda使用

安装时选择添加环境变量,如果开始菜单的这个文件夹里没有这个可视化工具,那么没有装好,重装环境变量没有配置,可以从这里打开jupyter notebook这里也能打开,但是根目录是默认的,不能切换目录。录入jupyter,开启一个进程,浏览器自动打开页面使用jupyter基于浏览器的可视化工具,工具中展示的是目录结构cmd终止命令,浏览器就...

2019-08-26 17:51:00 83

转载 Define Interfaces and Share Class Members through Mixins in Dart

In this lesson, we will cover Interfaces and Mixins. Interfaces act as a contract containing properties and methods that a class must define once it “implements” this interface. Mixins are Dart’s...

2019-08-25 19:42:00 67

转载 [Dart] Understand Classes and Inheritance in Dart

We will look at how we can create classes and explore some various features. Dart adopts a single-inheritance model, meaning that you can only extend a single class. We will therefore extend our ...

2019-08-25 19:29:00 77

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

Load Data from Test Fixtures in CypressWhen creating integration tests with Cypress, we’ll often want to stub network requests that respond with large datasets. All of this mock data can lead t...

2019-08-23 15:56:00 92

转载 dc

多线程获取列表元素,每个元素只能用一次列表去重转载于:https://www.cnblogs.com/machangwei-8/p/11398047.html

2019-08-23 09:20:00 114

转载 jQuery和使用oninput事件

转载于:https://www.cnblogs.com/machangwei-8/p/11395281.html

2019-08-22 16:49:00 2897

转载 [Angular] Lazy Load CSS at runtime with the Angular CLI

Ever had the need for multiple "app themes", or even to completely dynamically load CSS based on which customer logs into your application? You could of course bundle all of the various themes in...

2019-08-22 16:18:00 106

转载 【原创】Ajax实现方式

JQuery提供的Ajax方法: 1 commonAjax: function (actionName, message) { 2 var result; 3 $.ajax({ 4 async: false, 5 type: "post", 6 ...

2019-08-21 22:15:00 70

转载 python中分页使用

分页代码pagination.py如文件:from django.utils.safestring import mark_safefrom django.http.request import QueryDictclass Pagination: """ page: 当前的页码数 all_count: 总的数据量 p...

2019-08-21 16:22:00 767

转载 礼物播放功能

如上图所示,左侧是普通礼物,右侧是豪华礼物。下面重点说明如何实现豪华礼物。云豹直播APP源码中豪华礼物有gif和svga两种格式,全部是通过网络动态加载的,而不是硬编码到app中,这样可以有效减小app的体积。当用户给主播发送礼物时候,先请求一个后端的接口,给用户扣除金币,给主播增加映票数,然后生成一个token,返回给客户端。这个token用来标识一次送礼物的行为,仅一次有效。当客户端...

2019-08-21 12:06:00 133

转载 linux 添加用户、权限

# useradd –d /home/oaf -m oaf此命令创建了一个用户oaf,其中-d和-m选项用来为登录名oaf产生一个主目录/home/oaf(/usr为默认的用户主目录所在的父目录)。假设当前用户是oaf,则下面的命令修改该用户自己的口令:#passwdOld password:******New password:*******Re-ent...

2019-08-21 06:53:15 60

转载 【转载】servlet与springMVC的差别

一、servlet实现登录。咱们先来看一下servlet实现注册登录。<servlet> <servlet-name>LoginServlet</servlet-name> 3 <servlet-class>demo.servlet.Log...

2019-08-21 02:15:00 121

转载 【转载】serlvet

servlet的定义 Servlet的作用:1.接收用户发送的请求2.调用其他的java程序来处理请求3.根据处理结果,返回给用户一个页面如何使用:1.创建一个类并实现Servlet接口2.在web.xml文件中对Servlet进行配置Servlet的生命周期,指Servlet的对象从被创建到被销毁的过程。Servlet的生命周期方法:...

2019-08-21 00:30:00 70

转载 【转载】web.xml

1).context-param(上下文参数)2).listener(监听器配置参数)3).filter(过滤器配置参数)4).servlet(servlet页面参数)5).其他-读取顺序:1)>>>2)>>>3)>>>4)(5))(具体对应的执行顺序也是如此)-原理及过程1)应用在服务器上启动,容器按上述顺序自动读取web.xm...

2019-08-20 21:22:00 65

转载 [GraphQL] Query Lists of Multiple Types using a Union in GraphQL

Unions are used when we want a GraphQL field or list to handle multiple types of data. With a Union Type, we can define a field that could resolve completely different types of data. In this less...

2019-08-20 18:06:00 62

转载 [GraphQL] Query GraphQL Interface Types in GraphQL Playground

Interfaces are similar to Unions in that they provide a mechanism for dealing with different types of data. However, an interface is more suited for data types that include many of the same field...

2019-08-20 18:01:00 89

空空如也

空空如也

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

TA关注的人

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