自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(119)
  • 资源 (8)
  • 问答 (2)
  • 收藏
  • 关注

原创 postgre 基本操作

给已经创建好的table 添加主键,在postgrep中添加主键,才可以在pgAdmin中修改表中内容。给表添加json数据。

2023-08-25 13:30:23 160

原创 高阶函数1

JavaScript 语言中内置了一些高阶函数,比如 Array.prototype.map,Array.prototype.filter 和 Array.prototype.reduce,它们接受一个函数作为参数,并应用这个函数到列表的每一个元素。接收的参数和 map 是一样的,其返回值是一个新数组、由通过测试的所有元素组成,如果没有任何数组元素通过测试,则返回空数组。,我们想要生成一个新数组,其每个元素皆是之前数组的两倍,那么我们有下面两种使用高阶和不使用高阶函数的方式来实现。

2022-09-28 23:30:38 198 1

原创 33388

jsshiyong

2022-09-28 13:16:54 318

原创 一张表格告诉你JS数组中数组的使用方法

2021-01-03 19:14:11 196 1

原创 pymongo中如何将数据filter并且group后取出若干条?

在pymongo中如何将数据filter并且group后取出若干条?如果我们要在MongoDB查询分组并获取TopN数据数据为[ { "name": "刘大", "age": 28, "status": "active" }, { "name": "陈二", "age": 25, "status": "active" }, { "name": "张三", "age": 25, "status": "active" }, { "name": "李四", "age": 25, "s

2021-01-03 18:57:08 653

原创 14. Longest Common Prefix

Write a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string`""`.Example 1:Input: ["flower","flow","flight"]Outpu...

2019-11-23 10:28:50 103

原创 leetcode 118. Pascal's Triangle

Given a non-negative integer*numRows*, generate the first*numRows*of Pascal's triangle.In Pascal's triangle, each number is the sum of the two numbers directly above it.Input: 5Output:...

2019-11-21 13:45:13 99

原创 jupyter notebook安装

### 1.首先将自己的电脑升级到python3### 安装brew~ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"最好将python升级到3版本brew install pythonmac中升级python...

2019-09-20 16:27:02 113

原创 数组扁平化并去重排序

题目var arr=[ [1, 2, 2], [3, 4, 5, 5], [6, 7, 8, 9, [11, 12, [12, 13, [14] ] ] ], 10];1 .Array.from(new Set(arr.flat(Infinity))).sort((a,b)=>{ return a-b})2 .function flatten(arr) ...

2019-08-09 16:46:30 352

原创 jQuery实现九宫格抽奖游戏

# 九宫格抽奖游戏本项目在github [链接]([https://github.com/freya0608/squaredUp](https://github.com/freya0608/squaredUp)1. 前端布局将未选中的和选中的图片定位好<div class="nomal"> <img class="quanNomal quan...

2019-08-05 15:29:24 776

原创 react+koa实现图片上传功能

技术栈koa2 + react16.8github 地址[链接](https://github.com/freya0608/react-imgUpload.git)项目步骤前端开发 1.创建`react app` `yarn create react-app my-app` 2.用`material-ui`编写页面,代码如下 ...

2019-08-01 15:46:56 264

原创 设计模式-观察者模式

// 主题,接收状态变化,触发每个观察者class Subject { constructor() { this.state = 0 this.observers = [] } getState() { return this.state } setState(state) { this.s...

2019-06-30 15:25:21 84

原创 设计模式-适配器模式

class Adaptee { specificRequest(){ return '德国标准插头' }}class Target { constructor(){ this.adaptee = new Adaptee() } request(){ let info = this.adaptee.spec...

2019-06-30 15:13:32 76

原创 设计模式-工厂模式

class Product { constructor(name){ this.name = name; } init(){ alert('init'); } fun1(){ alert('fun1') } fun2(){ alert('fun2') }}class...

2019-06-30 15:11:48 82

原创 好用的chrome工具

chrome有很多适合开发使用的插件: json-handle是一款将数据转为json的插件,每次在浏览器打开的数据,都会被转为json,清晰方便查看。 Restlet Client与postman类似,是后端开发人员必备的插件。 appear.in screen sharing 是一款分享屏幕的插件,延时比较少,清晰度不错。 Octotree是github上一...

2019-06-30 15:02:21 259

原创 plop的用法

每次写重复的代码是不是很浪费时间呢?接下来介绍一款用命令行就可以自动生成代码的工具。plop的介绍 https://www.npmjs.com/package/plop1.在项目中安装plop;npm install --save-dev plop2.全局安装,这样就可以用plop命令了;npm install -g plopmac 使用sudonpmins...

2019-06-30 15:00:33 8202

转载 Js-leetcode 867. Transpose Matrix

Given a matrix A, return the transpose of A.The transpose of a matrix is the matrix flipped over it's main diagonal, switching the row and column indices of the matrix.Example 1:Input: [[1,2,3]...

2018-09-28 16:07:26 125

原创 从0开始用react构建音乐播放器

1: 新建文件夹react-music-player 2: npm init 会生成一个package .json文件 3: npm install react –save,在node_modules下安装对应依赖。

2017-12-19 12:56:03 306

原创 python学习笔记2

变量作用域 Python 中,程序的变量并不是在哪个位置都可以访问的,访问权限决定于这个变量是在哪里赋值的。 变量的作用域决定了在哪一部分程序可以访问哪个特定的变量名称。Python的作用域一共有4种,分别是: L (Local) 局部作用域 E (Enclosing) 闭包函数外的函数中 G (Global) 全局作用域 B (Built-in) 内建作用域 以 L –> E –>

2017-11-22 18:58:12 127

原创 python学习1

Python3 中有六个标准的数据类型:Number(数字)String(字符串)List(列表)Tuple(元组)Sets(集合)Dictionary(字典)Python3 支持 int、float、bool、complex(复数)。 在Python 3里,只有一种整数类型 int,表示为长整型,没有 python2 中的 Long。内置的 type() 函数可以用来查询变量所指的对象

2017-11-22 12:28:33 258

原创 mac快捷键

command+W,关闭网页

2017-11-08 15:46:39 155

原创 webstorm快捷键

Ctrl+Alt+l格式化

2017-11-07 11:12:15 226

原创 git学习3

git log 命令查看分叉历史。 运行 git log –oneline –decorate –graph –all ,它会输出你的提交历史、各个分支的指向以及项目的分支分叉情况。$ git log –oneline –decorate –graph –all

2017-08-29 19:10:35 302 1

原创 git学习2

指定选项 -v,会显示需要读写远程仓库使用的 Git 保存的简写与其对应的 URL。$ git remote -v

2017-08-28 14:51:19 167

转载 vim命令

原文:(http://www.cnblogs.com/softwaretesting/archive/2011/07/12/2104435.html)命令历史以:和/开头的命令都有历史纪录,可以首先键入:或/然后按上下箭头来选择某个历史命令。启动vim在命令行窗口中输入以下命令即可vim 直接启动vimvim filename 打开vim并创建名为filename的文件文件命令打开单个文件vim f

2017-08-25 10:47:24 152

转载 linux指令

常用指令ls   显示文件或目录 -l 列出文件详细信息l(list) -a 列出当前目录下所有文件及目录,包括隐藏的a(all)mkdir 创建目录 -p 创建目录,若无父目录,则创建p(parent)cd 切换目录touch 创建空文件echo

2017-08-25 10:22:47 4424

原创 git学习1

git add 命令, 这是个多功能命令:可以用它开始跟踪新文件,或者把已跟踪的文件放到暂存区,还能用于合并时把有冲突的文件标记为已解决状态等。 将这个命令理解为“添加内容到下一次提交中”而不是“将一个文件添加到项目中”要更加合适。 Git 只不过暂存了你运行 git add 命令时的版本, 如果你现在提交,CONTRIBUTING.md 的版本是你最后一次运行 git add 命令时的那个版本

2017-08-10 11:01:41 305

原创 工具类

1:github上左侧栏目录小工具   Octotree

2017-07-24 12:28:00 152

原创 金融名词

金融名词新三板: 全国性的非上市股份有限公司股权交易平台,主要针对的是中小微型企业。红筹回归 基于西方国家将中国称为“红色中国”的惯例,他们将在境外上市的来自中国的公司,也就是中资控股公司的股票称为红筹股。1997年4月,恒生指数服务公司着手编制恒生红筹股指数时,就是按这一标准来划定红筹股的。END注意事项 香港媒体曾报道,包括中国移动、联想集团、中海油、中国网通及一家电子元件制造商在内的5

2017-05-04 11:02:55 479

原创 JS原生方法

操作方法slice(起始位置,结束位置)方法不影响原始数组,返回起始到结尾的项; shift()头部移除,并返回该项; unshift()头部添加,返回数组长度; push()尾部添加,返回数组长度; pop()尾部移除,返回该项; splice():删除splice(0,2),删除前两项; 插入splice(2,0,'red','green'),从数组的位置2开

2017-04-19 00:47:20 632

翻译 css选择器

.class .intro 选择 class="intro" 的所有元素。#id #firstname 选择 id="firstname" 的所有元素。* * 选择所有元素。element p 选择所有 p 元素。element,element div,p 选择所有 div 元素和所有 p 元素。element element div p 选择 div 元素内部的所有p 元

2016-12-02 15:27:08 249

转载 344. Reverse String

Write a function that takes a string as input and returns the string reversed.Example:Given s = "hello", return "olleh".Subscribe to see which companies asked this questionpublic class

2016-09-03 23:41:59 234

原创 phpstorm中的项目配置开发环境

1:在电脑的某个文件下新建文件 git mkdir public_html; 2:在当前文件下:git clone "github上的地址" 3:在phpstorm中打开clone下来的文件; 4:配置环境:左上角的:phpstorm>Preferences,在search中搜索deployment,点击左上角的+,填写name,选择type, 点击ok; 5: (1)sf

2016-05-20 23:40:05 2637

转载 前端面试题目总结

https://segmentfault.com/u/trigkit4https://github.com/hawx1993/Front-end-Interview-questions/blob/master/README.mdhttp://www.oschina.net/question/2012764_243956

2016-04-28 19:38:28 318

转载 7. Reverse Integer

Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321public class Solution { public int reverse(int x) { int negative=1; //负数先转正,用negative保存其

2016-04-26 20:55:55 199

转载 8. String to Integer (atoi)

mplement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.No

2016-04-26 20:55:18 198

转载 12. Integer to Roman

Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.public class Solution { public String intToRoman(int num) { Map<Integer, String> ma

2016-04-26 20:54:26 224

转载 13. Roman to Integer

Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.public class Solution { public int romanToInt(String s) { Map<Character, Integer> m

2016-04-26 20:53:31 198

转载 15. 3Sum

Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: Elements in a triplet (a,b,c) must be i

2016-04-26 20:52:43 293

转载 18. 4Sum

Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note: Elements in a quad

2016-04-26 20:51:58 190

js-HTML-css大全

js-HTML-css大全

2022-09-28

前端进阶函数科利华,高阶函数

前端进阶函数科利华,高阶函数

2022-09-28

原生js2020年最新整理

原生js2020年最新整理

2022-09-28

原生js-2018-06031912.pdf

原生js-2018-06031912.pdf

2022-09-28

计算机科学导论_佛罗赞

计算机科学导论_佛罗赞

2017-01-20

CSS揭秘书籍

CSS揭秘

2017-01-18

数据结构与算法JavaScript描述

数据结构与算法JavaScript描述

2017-01-10

web新技术scss

web新技术scss

2016-03-14

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

TA关注的人

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