Pylon's Blog


  • 首页

  • 分类

  • 归档

  • 标签

  • 关于作者

  • 搜索

一按钮不正常显示的 Debug 记录

发表于 2020-09-16 | 分类于 Experience , Debugging
本文记录了一个前端按钮没有按照正常逻辑显示的 Debug 过程。有一个容器中有三个 Tile,如下定义容器的三种显示状态:三个 Tile 可以并列显示在一排时的状态为 Normal;当三个 Tile 无法一排显示在一排,其中有一个或者两个 Tile 处于 Overflow 的状态为 Collapsed;三个 Tile 显示在多排的状态为 Expanded。
阅读全文 »

搭建 SAPUI5 开发环境

发表于 2020-08-29 | 分类于 Experience , Guide
SAPUI5 是 SAP 广泛使用的主要前端框架,本文记录了如何快速从零搭建 SAPUI5 的开发环境。
阅读全文 »

INVALID_STATE_ERR Debug 记录

发表于 2020-05-28 | 分类于 Experience , Debugging
本文记录了 INVALID_STATE_ERR 排查过程。项目前端使用 SAPUI5 开发,运行集成测试时,所有的 AJAX 请求都会被 Mock。今天遇到一个问题,一些 URL 改动后集成测试运行失败, 报了个 INVALID_STATE_ERR 的错误。
阅读全文 »

HTTP 缓存不完全指南

发表于 2020-05-18 | 分类于 Fundamental , Network , HTTP

Cache is a hardware or software component that stores data so that future requests for that data can be served faster.

按照维基百科的定义,缓存是一种用来存储数据的硬件或者软件,它使得后续的信息传输更快。

阅读全文 »

LRU 实现

发表于 2020-04-20 | 分类于 Fundamental , Algorithm

LRU 概述

This algorithm requires keeping track of what was used when, which is expensive if one wants to make sure the algorithm always discards the least recently used item. General implementations of this technique require keeping “age bits” for cache-lines and track the “Least Recently Used” cache-line based on age-bits. – from Wikipedia

LRU 算法的思想是淘汰最近没有使用的缓存。

阅读全文 »

HTTPS 原理不完全指北

发表于 2020-04-12 | 分类于 Fundamental , Network

女朋友最近在学习 wireshark 时候问了我一个问题:为什么使用 http.host == baidu.com 过滤不到请求数据?

明明已经在 Chrome 上输入了 baidu.com,也看到返回结果了,为什么通过 http.host == baidu.com 过滤不到数据包呢?

阅读全文 »

新一代的 JavaScript/TypeScript 运行时 —— Deno

发表于 2020-04-09 | 分类于 Fundamental , Programing-language , JavaScript

Deno 是什么?

Deno 是新一代的 JavaScrip 和 TypeScript 运行时环境。建立在 V8, Rust, TypeSctipt 之上。

阅读全文 »

LeetCode 80 Remove Duplicates from Sorted Array II

发表于 2020-03-10 | 分类于 Fundamental , Algorithm

描述

给定一个数组,删除部分元素使得所有元素最多重复两次。

Example 1:

1
2
3
4
5
Given nums = [1,1,1,2,2,3],

Your function should return length = 5, with the first five elements of nums being 1, 1, 2, 2 and 3 respectively.

It doesn't matter what you leave beyond the returned length.
阅读全文 »

1296. Divide Array in Sets of K Consecutive Numbers

发表于 2019-12-30 | 分类于 Fundamental , Algorithm

描述

题目描述 - https://leetcode.com/problems/divide-array-in-sets-of-k-consecutive-numbers
给定一个数组 nums 和整数 k,判断是否将数组 nums 分成有 k 个连续数字组成的若干子数组。

Example 1:

1
2
3
Input: nums = [1,2,3,3,4,4,5,6], k = 4
Output: true
Explanation: Array can be divided into [1,2,3,4] and [3,4,5,6].

Example 2:

1
2
3
Input: nums = [1,2,3,4], k = 3
Output: false
Explanation: Each array should be divided in subarrays of size 3.
阅读全文 »

Leetcode-241 —— different ways to add parentheses

发表于 2019-12-15 | 分类于 Fundamental , Algorithm

题目描述

给定一个有数字和运算符组成的字符串,计算不同优先级的情况下的返回结果。

Example 1:

1
2
3
4
5
6
7
8
Input: "2*3-4*5"
Output: [-34, -14, -10, -10, 10]
Explanation:
(2*(3-(4*5))) = -34
((2*3)-(4*5)) = -14
((2*(3-4))*5) = -10
(2*((3-4)*5)) = -10
(((2*3)-4)*5) = 10
阅读全文 »
123…9
Pylon, Syncher

Pylon, Syncher

85 日志
14 分类
86 标签
GitHub GMail LeetCode
友情链接
  • 东阳兄
© 2023 Pylon, Syncher
由 Hexo 强力驱动
Hosted by GitHub && Coding.net
主题 - NexT.Mist