自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 网站应用开发Web App Development:如何让前端与后端快速地跑起来

工作的第一个project。 先从GitHub上面将repository clone下来,然后按照指示, 将网页跑起来。指示说的是cd Company/project/client/srcnpm installnpm start然而网页并没有按期望的形式跑起来,而是只让前端跑起来,后端并没有相应。 当我按前端按钮是,console还会显示一下错误:Proxy error: Could not proxy request /favicon.ico from localhost:3000 to ht

2021-09-07 14:42:16 724

原创 React: How to generate and render components

首先,用React的 CLI 来generate 一个component, 指令如下:npx generate-react-cli component ComponentName所需要的文件会自动生成, 可以选择是否用typescript, 我选了yes, 但是并不能import component 文件, 因此我将.tsx直接改成.js后缀。 然后就可以在 index.js 里面import 和render component了。import React from 'react';import

2021-09-04 06:39:50 227

原创 React 里面的 App.js vs index.js

App.jsimport './App.css';function App() { return ( <p> Hello world </p> );}export default App;index.jsimport React from 'react';import ReactDOM from 'react-dom';import './index.css';import App from './App';import r

2021-09-04 06:02:56 3451

原创 Docker container 有什么优点?

Docker container 有什么优点?方便方便:工业生产中,每个产品的开发,都需要特别的开发环境,其中包括有相应的sdk,数据库等。infrastructure engineer 会配置好其他engineer所需的开发环境,生成一个image。其他工程师可以直接复制不需要自己配置环境,只需要将配置好的image复制过来,在docker container上run,则能生存开发所需环境。light weight传统的virtual machine也能生成虚拟系统,譬如能安装Ubuntu,L

2021-08-15 01:38:02 268

原创 340. Longest Substring with At Most K Distinct Characters解题报告

Given a string s and an integer k, return the length of the longest substring of s that contains at most k distinct characters.Example 1:Input: s = "eceba", k = 2Output: 3Explanation: The substring is "ece" with length 3.Example 2:Input: s = "aa", k

2021-08-05 06:32:02 227

原创 311. Sparse Matrix Multiplication解题报告

Given two sparse matrices mat1 of size m x k and mat2 of size k x n, return the result of mat1 x mat2. You may assume that multiplication is always possible.Example 1:Input: mat1 = [[1,0,0],[-1,0,3]], mat2 = [[7,0,0],[0,0,0],[0,0,1]]Output: [[7,0,0],[-7

2021-08-05 05:51:43 340

原创 695. Max Area of Island解题报告

You are given an m x n binary matrix grid. An island is a group of 1’s (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water.The area of an island is the number of cells w

2021-08-05 05:10:47 182

原创 781. Rabbits in Forest 解题报告

There is a forest with an unknown number of rabbits. We asked n rabbits “How many rabbits have the same color as you?” and collected the answers in an integer array answers where answers[i] is the answer of the ith rabbit.Given the array answers, return t

2021-08-05 04:39:06 236

原创 Virtaural DOM vs. DOM 面试准备

首先,virtual dom是react里面的一个概念,跟其他东西不相关。React引入virtual dom是为了提高update&render dom 的效率。传统的dom update 方法要update整个dom, 然后render整个。很费时。update virtual dom不需要render。很快。所以react在update真dom之前会先update virtual dom对比有什么component需要update的。然后直接update dom上需要update的compon

2021-08-03 14:54:45 103

原创 314. Binary Tree Vertical Order Traversal解题报告

Given the root of a binary tree, return the vertical order traversal of its nodes’ values. (i.e., from top to bottom, column by column).If two nodes are in the same row and column, the order should be from left to right.Input: root = [3,9,20,null,null,1

2021-08-03 09:14:59 207

原创 JWT Token 如何运作? 面试准备(Java + 前端)

直接上图:四个步骤:一、client(browser)访问login page, 输入登录信息,若信息无误,server就会generate一个jwt token.二、server将JWT token发到client side, 浏览器就会将该 JWT token 保存起来。之后每次与server交流,都会携带jwt token。三、如果client要访问一些特权服务(如VIP服务,编辑权限),server会先检查验证浏览器所携带的jwt token。四、然后server返回对应的结果到浏览器。

2021-08-03 06:24:32 383

原创 Autoboxing vs. Unboxing 面试准备(Java + 前端)

Autoboxing vs. UnboxingJava 有八种primitive type,每种primitive type都有其对应的object wrapper classes。 Autoboxing是将privative type 转换成其对应的object wrapper classes。 若反之,谓曰unboxing。为何需要Java毕竟是OOL,很多时候需要用到class。举一个重要的例子,知道JDK11.4,Java data structure 只能储存object,不能储存primi

2021-08-03 03:40:59 281

原创 121. Best Time to Buy and Sell Stock 解题报告

You are given an array prices where prices[i] is the price of a given stock on the ith day.You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock.Return the maximum profit

2021-08-02 12:02:43 123

原创 LC 43. Multiply Strings 记录、总结

Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.Note: You must not use any built-in BigInteger library or convert the inputs to integer directly.Example 1:Input: num

2021-07-15 06:20:05 126

原创 LC 17. Letter Combinations of a Phone Number记录、总结

Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 doe

2021-07-15 05:41:58 182

原创 LC 67. Add Binary 记录、总结

Given two binary strings a and b, return their sum as a binary string.Example 1:Input: a = "11", b = "1"Output: "100"Example 2:Input: a = "1010", b = "1011"Output: "10101"Constraints:1 <= a.length, b.length <= 104a and b consist only of ‘0

2021-07-15 05:27:21 234

原创 LC 169. Majority Element 分析、记录

Given an array nums of size n, return the majority element.The majority element is the element that appears more than ⌊n / 2⌋ times. You may assume that the majority element always exists in the array.Example 1:Input: nums = [3,2,3]Output: 3Example 2

2021-07-15 04:59:03 258

原创 2021-07-12

LC6 zigzag ConversionThe string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I I GY I RAnd then read line by l

2021-07-13 14:37:29 160

原创 2021-07-12

LC14 Longest Common PrefixWrite 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: strs = ["flower","flow","flight"]Output: "fl"Example 2:Input: s

2021-07-13 14:21:41 101

原创 2021-07-12

LC49 Group AnagramsGiven an array of strings strs, group the anagrams together. You can return the answer in any order.An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letter

2021-07-13 14:13:13 99

原创 2021-07-12

LC 136 Single NumberGiven a non-empty array of integers nums, every element appears twice except for one. Find that single one.You must implement a solution with a linear runtime complexity and use only constant extra space.Example 1:Input: nums = [2,2

2021-07-13 14:00:50 94

原创 2021-07-12

692 Top K Frequent Words 记录 分析python solution:题目如下:Given a non-empty list of words, return the k most frequent elements.Your answer should be sorted by frequency from highest to lowest. If two words have the same frequency, then the word with the lower

2021-07-13 13:47:43 126

空空如也

空空如也

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

TA关注的人

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