自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 mac os 配置hosts

仅写实践过的方法。1.终端命令行:% sudo vi /etc/hosts这条命令会以vim编辑器打开hosts文件,可以直接编辑修改。% sudo open /etc/hosts在我的设别环境中,这条命令用“文本编辑”的应用打开hosts文件,只能查看,不能编辑。当试图修改文件时,弹窗提示:您不是文件“hosts”的所有者,因此没有权限写到该文件。尽管命令用了sudo。2.配置hosts实际干了什么?主要是把形式为“xxx.xxx.xxx.xxx yyyyyyyy.c.

2021-09-19 10:50:01 2417 1

原创 jest debug:test互相影响,报错总在同一个位置

原因:test互相影响。表现/报错/情况:单独运行,测试通过。全部运行,测试报错。验证方法1:如果出现多个test代码相似,只有一个test报错,可以把代码相似的另一个test,与报错test的位置交换。如果交换位置后,是另一个test报错,可以判断,报错是因为test处于某位置,而非本身代码影响。验证方法2:注释掉报错test前面的其他test,再次运行。如果报错,必然是受到前面test的影响。...

2021-09-10 10:46:09 628 1

原创 error: Parameter ‘x’ of public method from exported class...external module “z” but cannot be named

记录实践中遇到的报错、解决方案和原理,以及参考来源。Parameter ‘x’ of public method from exported class has or is using name ‘y’ from external module “z” but cannot be named.报错场景:能正常运行代码,打包的时候报错。实际报错信息:Parameter 'db' of public method from exported class has or is using name

2021-09-09 09:42:19 768

原创 js setInterval setTimeout用法

主要讲setInterval()的用法。比较简单的内容,如果以后学到其他相关的,再补充吧。

2021-08-05 11:50:15 211

原创 git 常用命令 基础使用

git是一个分布式版本管理系统。记录一些常用命令,方便回顾。环境mac terminal创建版本库/仓库/repository:在一个合适的位置,创建空目录%mkdir dir_name//创建空目录%cd dir_name//进入空目录%pwd//显示当前目录/Users/user_name/dir_name//终端输出把目录变成git可以管理的仓库%git init//在上面创建的空目录dir_name中Initialized empty Git reposito

2021-07-06 20:02:29 270 1

原创 js 与 json

js语言 与 Json格式数据的增删改查。//demo for json//json object of jslet jsonObj_1 = { key1: 123 };let jsonObj_2 = { key1: 123, key2: "value2" };//json array of jslet jsonArr_1 = [ { key1: "value1", key2: "value2" }, { key1: "value3", key2: "value4" },];

2021-06-05 15:33:58 77

原创 excel计算 0值判断与类型转换

提前说明:该问题我也没能解决,只是作为记录。猜测与强制类型转换、减法精度有关。问题概括:使用excel的公式进行计算,发现涉及0.07,0.14,0.28这几个数字,出现计算问题,表现形式为7-7不等于0,LOOKUP二分查找不能识别0.07。文件类型:Microsoft Excel 97-2003 工作表 (.xls)场景:使用EXCEL的公式进行计算。公式:=IF(A2<=0.5,IF((A2*100-INT(A2*100))>0,LOOKUP(INT(A2*100)/100

2021-03-30 21:41:49 1147

原创 exe文件运行时消失

顺利安装好软件后,一运行,exe文件就自动消失,跑不了软件。不用想了,十有八九是被当作病毒或者恶意软件删了,关了360,关了防火墙,再安装运行试试。如果关了一切安全相关的功能,仍会出现运行时exe文件消失的情况,别怀疑,绝对还有安全相关的功能没关。...

2019-11-17 11:43:47 5481

原创 C#学习003

------ 理论知识 -------C# Hello World 实例一个 C# 程序主要包括以下部分:命名空间声明(Namespace declaration) 一个 class Class 方法 Class 属性 一个 Main 方法 语句(Statements)& 表达式(Expressions) 注释------ 代码知识 ------一个程序可以包...

2019-08-25 22:45:55 141

原创 C#学习002

尽可能将学习内容分为三部分,一部分是需要记一下的理论知识,一部分是编程知识,一部分是代码。感觉这样会清晰一些。蓝色字体是我自己的一些理解和解说,可能有误,当是参考吧。------ 理论知识 ------C# 是一个现代的、通用的、面向对象的编程语言。通用的:是指用C#可以解决各种类型的问题。面向对象的:学过C++,就会明白的,不解释。还是讲一讲吧,简单来说,就是具体编程时,不仅...

2019-08-25 22:13:12 111

原创 C#学习001

以菜鸟教程为主线,学习总结C#的使用。菜鸟教程:https://www.runoob.com/csharp/csharp-tutorial.html菜鸟教程提供在线编译:https://www.runoob.com/try/runcode.php?filename=HelloWorld&type=cs还是有自己的编程软件会比较方便。本来想用sublime编辑器,号称只要安装了插...

2019-08-25 22:00:52 317

原创 ANSI编码

https://blog.csdn.net/qlexcel/article/details/84564024学习了。

2019-07-28 16:16:51 264

原创 MYSQL·命令总结大全(并不是)的实际运用及其结果展示

Microsoft Windows [版本 10.0.17134.765](c) 2018 Microsoft Corporation。保留所有权利。--进入mysqlC:\WINDOWS\system32>F:F:\>cd mysql-8.0.16-winx64\binF:\mysql-8.0.16-winx64\bin>mysql -u root -pEn...

2019-06-06 11:51:11 1156

原创 MYSQL命令总结大全(并不是)

--MYSQL8.0.16--进入MYSQLmysql -u root -p--然后会提示输入密码,输入即可进入mysql--退出quit--或者exit--如果不想执行正在输入的命令,即,在命令输入到一半时,使其停止\c--查看数据库版本SELECT VERSION();--展示用户SELECT USER();--创建数据库CREATE DATABASE...

2019-06-06 00:00:41 253

原创 MYSQL·其五

基本是官网的内容翻译过来:https://dev.mysql.com/doc/refman/8.0/en/working-with-null.html关于空值NULL。NULL是没有值,是缺失的。举个栗子,之前载入日期数据时,因为没有指定换行符,本设定为NULL的值,变成0000-00-00,是不同的。要测试空值,请使用is null和is not null运算符,如下所示:...

2019-06-03 17:08:11 140

原创 MYSQL·其四·SELECT,

对照着官网展示的结果,发现我上一篇自己打的Txt文件跟官网不同……所以结果不同,算了,不是很重要。往下看吧。4.1 SELECT选择语句SELECT语句用于从表格中获取信息,一般格式为:SELECT what_to_select --字段名。*符号表示全部字段FROM which_table --表名WHERE conditions_to_s...

2019-06-03 16:53:57 214

原创 MYSQL·其三·创建和使用数据库

依旧是跟着官网学习:https://dev.mysql.com/doc/refman/8.0/en/database-use.html菜鸟教程有MYSQL的教程,以及使用PHP脚本的相应展示:https://www.runoob.com/mysql/mysql-create-database.html不用菜鸟教程,主要是因为在这样的基础入门内容中,加了很多额外的参数内容,对初学者不友好。...

2019-06-03 01:03:11 256

原创 MYSQL·其二·一些命令的练习和命令输入格式

这篇MYSQL·其二,主要借用官网的说明来练习使用MYSQL,认识MYSQL的基础知识。官网网址:https://dev.mysql.com/doc/refman/8.0/en/entering-queries.html3、查看数据库select version();可以看到版本是8.0.16。PS:输入命令不要忘记结尾分号;表示结束。SELECT VERSION(...

2019-06-02 17:36:18 199

原创 MYSQL·其一·安装与登陆退出

1、安装MYSQL安装的是windows版本,比较简单,参考菜鸟教程:https://www.runoob.com/mysql/mysql-install.html先去这个网站下载安装包,下面有个不明显的无需登陆的直接下载选项。https://dev.mysql.com/downloads/mysql/下载后解压到安装目录。我的软件统一安装在F盘,所以地址是F:\mysql-...

2019-06-02 16:59:15 167

原创 安装python

参考菜鸟教程:https://www.runoob.com/python/python-install.html1、确认是否已有python。打开cmd,输入python。查看是否已经安装了python。没有则没有相关信息;有,则可以看到版本号等相关信息。2、安装python。没有安装,则进行下一步,安装python。首先去python官网下载源码,选择合适自己的版本。...

2019-05-30 17:06:25 165

原创 【系统重装】没有输出音频设备

问题:如题。图片展示:解决办法:百度。略。不过,放鼠标在小喇叭上随便点点也可以整出一下画面。整出来就差不多了,等它自己慢慢检索,最后重启就OK了。不是什么大问题。我猜是驱动器的问题?...

2019-05-30 16:35:21 905

原创 【系统重装】惠普win10防火墙和网络安全功能打不开

问题:如题所述。系统重装后,自带的防火墙和网络安全功能打不开了。提示打开迈克菲防火墙,但点击没反应。之前点击有反应时,表示要付费。但一开始使用这台笔记本电脑就没有付过这些,至少明面上没有付过,所以不想支付。在window defender安全中心,显示如下图。解决方法:百度。关键词:迈克菲防火墙。补充:有问题还是先百度,网友智慧多。迈克菲防火墙不是系统自带的,而是厂商整进...

2019-05-30 12:00:57 1015

转载 【系统重置】惠普win10系统后桌面右键慢

遇到的问题:在桌面上,点击鼠标右键没反应,或者说慢到出奇。解决:百度。网上已有方法。使用了修改注册表的方法。“修改注册表”看起来怪吓人的,其实操作很快。具体操作如下。方法来源:https://jingyan.baidu.com/article/adc815137a9dfff723bf73fa.html为避免内容的消失,在这里简单拷贝一下。出现这种现象的原因:不是系统问题,而是注册表...

2019-05-30 11:26:25 2270

原创 Leetcode-Search a 2D Matrix II

Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted in ascending from left to right.Integers i

2018-01-12 18:27:39 197

原创 Leetcode Best Time to Buy and Sell Stock III

题目:Say you have an array for which the ith element is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete at mosttwo transactions.Note:

2018-01-12 18:11:41 257

原创 Leetcode Best Time to Buy and Sell Stock II

题目:Say you have an array for which the ith element is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie

2018-01-12 17:11:29 241

原创 Leetcode Best Time to Buy and Sell Stock

题目:Say you have an array for which the ith element is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the

2018-01-12 16:43:34 175

原创 Leetcode-Longest Common Prefix

题目:Write a function to find the longest common prefix string amongst an array of strings.要求找出所有string的最长前缀。可以选择横向比较,两两比较找出最长的前缀,不断比较,不断更新,但考虑了极端情况,假设相同的最长前缀呈阶梯分布,则做了许多无用功。纵向逐个字符比较,显然简单许多。代码如下:cl

2017-12-24 12:46:18 172

原创 Leetcode_Divide Two Integers

题目:Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.最直接的方法是,用加减法。除了加减乘除,我们还可以用的是,位算法。位算法可以使得计算速度更快。答案:class Solution {public

2017-12-17 20:03:08 177

原创 Leetcode_3Sum Closest

题目:Given an array S ofn integers, find three integers inS such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have

2017-12-10 20:46:51 282

原创 //Leedcode-Valid Parentheses

题目:Given a string containing just the characters '(', ')','{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are all

2017-11-26 20:27:07 153

原创 Leetcode-Remove Element

题目:Given an array and a value, remove all instances of that value in place and return the new length.Do not allocate extra space for another array, you must do this in place with constant memory

2017-10-31 21:11:38 211

原创 Leetcode_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: The solution set must not contain du

2017-10-23 19:59:20 246

原创 Leetcode-Roman to Integer

题目:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.题目要求,将给出的罗马数字转换为整数。罗马数字是最早的数字表示方式,比阿拉伯数字早2000多年,起源于罗马。如今我们最常见的罗马数字就是钟表的表盘符号:Ⅰ

2017-10-21 09:58:14 195

原创 Leetcode-Palindrome Number

Determine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of converting the integer to string, note

2017-10-14 22:36:44 328

原创 Leetcode-Longest Substring Without Repeating Characters

题目:Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "...

2017-09-29 11:19:15 244

原创 LeetCode-Reverse Integer

Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321 click to show spoilers.Have you thought about this?Here are some good questions to ask before coding

2017-09-23 14:39:49 176

原创 Leetcode-Add Two Numbers

question:You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers

2017-09-16 17:19:19 244

原创 LeetCode-Two Sum

Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the same ...

2017-09-10 20:16:15 239

空空如也

空空如也

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

TA关注的人

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