- 博客(50)
- 资源 (5)
- 收藏
- 关注
原创 面试官:如何保障数据库和redis缓存的一致性
随着互联网的高速发展,使用互联网产品的人也越来越多,团队不可避免得也会面对越来越复杂的高并发业务场景(如下图),比如热点视频/文章的观看(读场景),热点视频/文章的评论,点赞等(写场景)。众所周知,数据库是把数据存储在磁盘上,访问时需要进行IO操作,在请求量小的情况下,耗时还比较低。但随着数据量的增大,访问量的集中,整个数据库负担加重,响应就会变慢,请求延时上升。进而导致用户侧...
2020-03-28 21:51:28 3214 3
原创 你不知道的Golang 在json反序列化时interface{}对int64做的特殊处理
问题最近在项目中遇到一个坑,Go语言在json反序列化时,如果未指定类型,则数字(比如int64)会默认是 float64,这样再次序列化的时候造成了精度丢失。具体可以看如下代码package mainimport ( "fmt" jsoniter "github.com/json-iterator/go")func main() { s := "{\"a\":667...
2020-03-18 23:43:29 4350
原创 微信小程序实战之菜谱小程序
最近突发奇想,想要自己搞个小程序玩儿玩儿,但是鉴于自己是搞后端服务器出身,对于偏前端的微信小程序开发实在是一知半解,尤其是对于css类样式相关,更是无从下手,于是乎,只能从晚上找了一个demo,对其进行了一番改造,然后进行上线,也算是基本完整的走了一遍小程序开发的简单流程,本篇文章就是对这次实践的简单介绍。先放个二维码压压惊~原文地址:http://www.darylliu.cn/arch...
2019-04-27 21:55:07 13461 13
原创 编程视频资源教程汇总
本人整理了一些编程视频资源,方便大家查询和学习,本篇会持续更新,内容横跨前端,后端,包括但不限于数据结构,Python,Java,redis,Kafka,Javascript,C++等等。感兴趣的可以收藏下~原文地址,也就是我的个人博客~上面有很多分享链接,可以上去看下:https://darylliu.github.io/archives/a4ffb3c8.html...
2019-04-21 13:11:15 556
原创 从同步阻塞聊到Java三种IO方式
对于刚刚成为程序猿不久的人,可能常常会被以下几个概念所混淆:同步,异步,阻塞,非阻塞?以及从这几个概念中衍生出的几个概念,同步阻塞,同步非阻塞,异步阻塞,异步非阻塞?小编从网上查了一些资料,发现对于这些概念的解释,要么过于简单随性,以偏概全,要么过于底层,不利于初学者记忆,反而加深了混淆。今天小编特意从网上和书籍中收集的答案进行整理,抛砖引玉,跟大家简单聊聊这几个概念。快速理解首...
2018-03-10 14:14:16 578
原创 AWK命令打开的正确方式
在最开始实习的时候,小编跟了一位shell大神一起做项目,当时对于他能够随手使用shell脚本,完成很多日常工作非常羡慕,于是对于shell的使用萌发了学习的念头。在 linux 系统日常处理工作中,经常会遇到对文本进行处理的业务场景:比如对从数据库中查询的数据进行信息抽取和处理,又或者对于不同接口传递来的消息进行处理。在此过程中,awk作为最常用的文本处理工具之一,在实际的开发中发挥着非...
2018-03-06 18:33:55 733
原创 快速记忆:List以及它的小伙伴们
一直以来,ArrayList和LinkedList的区别,ArrayList和Vector的区别,List下不同实现类的相关知识点都是Java开发人员在开发过程中必须要掌握的基础知识,也是在面试过程中最常见的问题之一。在这里,本文会将这些知识点加以整理,提取出最精华,最容易使用到的部分给大家,方便记忆。ListList是一个继承于Collection的接口,ArrayList,Link...
2018-02-02 15:30:30 397
原创 面试官:请你谈谈Java的类加载过程
刚刚走出校门的应届毕业生,如果在去寻求一份Java开发的工作时,你的面试官很有可能一边看着你的简历,一边漫不经心地问你:了解过Java类的加载过程吗?这个时候你一定要注意了,虽然这是一个老生常谈的问题,但是这也是一个非常能够考验你Java功底的问题。如果你答好了,这是你应该的;如果你没答好,那么对不起,面试官心中已经给了你不及格。今天,小编就Java类加载过程这个问题,抛砖引玉,说一下...
2018-02-01 00:08:28 51711 17
原创 初识-数据库事务隔离级别
初识-数据库事务隔离级别详情请到:https://darylliu.github.io/archives/228096a5.html公众号:IT程序猿进化史学习数据库的时候常常会接触到事务, ACID等概念,那么到底什么是数据库的事务,数据库事务又具有哪些特点,和ACID有怎样的关系,事务的隔离级别又是做什么的呢?注:本文参考自<<从Paxos到ZooKeep...
2018-01-24 23:03:13 300
原创 你不理财,财不理你
身为一只互联网程序猿,懒和宅的属性是必不可少的,偏偏自己又处于缺钱花的阶段,所以不可避免的就会萌生理财的念头。可是你让我走出家门,去银行排号,排队...办理理财产品?或者让我去证券公司开户,每天盯着股票走势?突然想到,老子可是资深程序猿一只,理财这种事,怎么能少得了互联网呢,于是便一头扎进了互联网理财的海洋中。真是不看不知道,本来以为简简单单的理财问题,居然会有如此多...
2017-12-12 16:14:23 612
原创 SpringBoot学习6之Logback日志导入mongodb
SpringBoot学习6之Logback日志导入mongodb微信公众号" IT程序猿进化史", 共同学习进化~正如前文所说,springboot自带logback作为其日志新系统,但是在实际工作中,我们常常需要对日志进行管理或分析,如果只是单纯的将日志导入文本文件,则在查询时操作过于繁琐,如果将其导入mysql等关系型数据库进行存储,又太影响系统性能,同时由于Mysql其结构化...
2017-11-22 21:21:48 2629 5
转载 MongoDB主从复制与分片技术,和运维技术的状态查询
主从复制 我们知道sql server能够做到读写分离,双机热备份和集群部署,当然MongoDB也能做到,实际应用中我们不希望数据库采用单点部署,如果碰到数据库宕机或者被毁灭性破坏那是多么的糟糕。 一:主从复制1: 首先看看模型图 2: 从上面的图形中我们可以分析出这种架构有如下的好处: 数据备份。
2017-05-23 10:36:29 828
转载 图文讲解jenkins的安装与配置---远程发布、自动监测代码更新
什么是jenkinsJenkins,之前叫做Hudson,是基于Java开发的一种持续集成工具,用于监控持续重复的工作,包括:1、持续的软件版本发布/测试项目。2、监控一些定时调用执行的工作。通俗的说 jenkins 可以帮助我们编译发布代码,比如我们提交到SVN后,要发布运行,就可以用过jenkins进行编译运行。在没使用
2017-05-15 18:03:43 10541 1
原创 Redis学习1之快速入门
Redis学习1之快速入门微信公众号:IT程序猿进化史Redis简介redis是一个高性能的key-value数据库(可以理解成一个hashmap)Redis安装下载地址:https://github.com/MSOpenTech/redis/releases将下载好的压缩包(Redis-x64-3.2.100.zip)解压到某目录下(D:\ redis)打开cmd...
2017-05-10 16:39:05 444
原创 SpringBoot学习4之Logback使用
SpringBoot学习4之Logback使用微信公众号"IT程序猿进化史", 共同学习进化~https://darylliu.github.io/archives/95f4c9d7.html在开发过程中,为了能够看到一些程序执行的中间结果,往往会在代码中加入一些标准输出到屏幕(Java中一般使用System.out.println),但是由由于IO操作也是由...
2017-05-10 16:29:58 1835
原创 SpringBoot学习3之数据库集成mybatis
SpringBoot学习3之数据库集成mybatis微信公众号"IT程序猿进化史", 共同学习进化~https://darylliu.github.io/archives/6c6770f1.html作为一个Web框架,必然要与数据库打交道,这里介绍了如何将SpringBoot与mybatis进行集成的方法添加相关依赖pom.xml如下 ...
2017-05-10 16:28:26 445
原创 SpringBoot学习2之配置文件
SpringBoot学习2之配置文件微信公众号"IT程序猿进化史", 共同学习进化~https://darylliu.github.io/archives/c3b398db.html虽然SpringBoot号称零配置,但是在实际开发过程中,我们常常需要进行一些额外信息的配置,比如数据库连接的一些参数,或者分布式服务的相关配置等等,那么这个时候就有可能用到我们本...
2017-05-10 16:26:46 517
原创 SpringBoot学习1之快速入门
SpringBoot学习1之快速入门https://darylliu.github.io/archives/c3b398db.html微信公众号:IT程序猿进化史环境准备Java环境一个趁手的IDE(本文使用Eclipse)Maven环境(可以自己安装或者使用IDE内置的maven)创建一个简单的Spring-boot应用首先创建一个maven项目...
2017-05-10 16:25:26 676
原创 hexo搭建个人博客
hexo搭建个人博客微信公众号:IT程序猿进化史https://darylliu.github.io/archives/64e2e0e2.html前言最近突然心血来潮想要搭建自己的博客,就去调研了几种方案:租个服务器。在上面搭建网站,数据库,优点是可以自己随时备份修改,很方便;缺点是花销比较大,不适合学生党,同时需要自己维护,而自己主要目的是去写文章,而没有精力去维...
2017-04-26 11:35:23 624
原创 maven仓库加载问题
maven仓库加载问题https://darylliu.github.io/archives/4f1a6c5c.html微信公众号:IT程序猿进化史前言maven是当前非常流行的项目管理工具,各大公司几乎都在使用,然而本人在使用maven的过程中总是或多或少遇到一些问题,特此整理并记录下来,方便以后再次遇到这些问题时能够及时解决。maven仓库介绍本地仓库本地仓库在...
2017-04-26 11:32:37 1676
转载 在linux命令行中编译和运行java文件
同时加载编译多个jar包和java文件在个人平常使用或者当我们把代码部署到Linux服务器上的时候,我们经常需要通过命令行编译和运行Java文件,网上关于这个的方法大多是通过javac -cp filePath/jarName.jar javaName.java11这种方法。但是加入在filepath文件夹下面有好几个jar包,在src文件夹中有好几个java文件
2017-04-20 16:33:41 796
原创 LeetCode OJ 系列之151 Reverse Words in a String --Python
Problem:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C programmers: Try to so
2015-12-09 01:42:17 503
原创 LeetCode OJ 系列之165 Compare Version Numbers --Python
Problem:Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 version2 return -1, otherwise return 0.You may assume that the version strings are non-
2015-12-09 01:40:18 857
原创 LeetCode OJ 系列之75 Sort Colors --Python
Problem:Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use
2015-12-09 01:37:59 711
原创 LeetCode OJ 系列之58 Length of Last Word --Python
Problem:Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.
2015-12-09 01:36:21 774
原创 LeetCode OJ 系列之65 Valid Number --Python
Problem:Validate if a given string is numeric.Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => trueNote: It is intended for the problem state
2015-12-09 01:34:44 1146
原创 LeetCode OJ 系列之66 Plus One --Python
Problem:Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.Answ
2015-12-09 01:32:51 1188
原创 LeetCode OJ 系列之73 Set Matrix Zeroes --Python
Problem:Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.Answer:class Solution(object): def setZeroes(self, matrix): """
2015-12-09 01:31:29 495
原创 LeetCode OJ 系列之118 Pascal's Triangle --Python
Problem:Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]]
2015-12-09 01:28:59 647
原创 LeetCode OJ 系列之63 Unique Paths II --Python
Problem:Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 0 respecti
2015-11-27 12:05:38 436
原创 LeetCode OJ 系列之62 Unique Paths --Python
Problem:A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any point in time. The robot is trying
2015-11-27 12:04:08 348
原创 LeetCode OJ 系列之1 Two Sum --Python
Problem:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to t
2015-11-27 12:02:31 387
原创 LeetCode OJ 系列之122 Best Time to Buy and Sell Stock II --Python
Problem:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete as many transactions as you li
2015-11-26 09:21:04 431
原创 LeetCode OJ 系列之121 Best Time to Buy and Sell Stock --Python
Problem:Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share
2015-11-26 09:10:53 421
原创 LeetCode OJ 系列之169 Majority Element --Python
Problem:Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the maj
2015-11-24 09:06:41 808
原创 LeetCode OJ 系列之287 Find the Duplicate Number --Python
Problem:Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplic
2015-11-23 22:00:40 407
原创 LeetCode OJ 系列之219 Contains Duplicate II --Python
Problem:Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between i and jis a
2015-11-23 14:49:36 412
原创 LeetCode OJ 系列之217 Contains Duplicate --Python
Problem:Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if ever
2015-11-23 14:30:14 705
原创 LeetCode OJ 系列之78 Subsets --Python
Problem:Given a set of distinct integers, nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain duplicate subset
2015-11-18 22:07:50 1813
原创 LeetCode OJ 系列之26 Remove Duplicates from Sorted Array --Python
Problem:Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this
2015-11-18 17:02:34 452
UNIX环境下C/C++程序的设计(超市帐务管理程序)
2013-05-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人