Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment
Flutter 环境搭建之过五关斩六将
Running Gradle task ‘assembleDebug’
android 首次打包很慢的问题
断开连接
too slow
Running “flutter pub get”
too slow
“flutter packages get: running…”一直一直一直在,把它放在那, 就会发现获取失败…。
解决方法修改镜像地址1.cmd ro powershell env
2.切记是用户变量 、 系统变量我是没有见效的
Properties
123PUB_HOSTED_URL=https://pub.flutter-io.cn FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
删除flutter安装路径下的lockfile文件
重启编译器并重新get依赖包get之前可以最好先flutter doctor一下
然后ojbk👹
Synchronized in Java
Synchronized in JavaSynchronized In Java
Last Updated: 15-10-2019
Multi-threaded programs may often come to a situation(情况) where multiple threads try to access the same resources and finally produce erroneous and unforeseen results.
So it needs to be made sure by some synchronization method that only one thread can access the resource at a given point of time.
在使用多线程程序时 可能经常会遇到多个线程尝试访问相同资源并最终产生错误和无法预料的结果的情况。
因此,多线程程序需要通过某种同步方法来确保在给定的时间点只有一个线程可以访问资源。
Java provides a way of creating threads and ...
97 Things Every Programmer Should Know
Act with Prudence
Apply Functional Programming Principles
Ask, “What Would the User Do?” (You Are Not the User)
Automate Your Coding Standard
Beauty Is in Simplicity
Before You Refactor
Beware the Share
Check Your Code First Before Looking to Blame Others
Choose Your Tools with Care
Code in the Language of the Domain
Code Is Design
Code Layout Matters
Code Reviews
Coding with Reason
A Comment on Comments
Comment Only What the Code Cannot Say
Continuous Learning
Convenience Is Not an -ility
Depl ...
Git Command Line
简介
Git 是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目。
Git 是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软件。
Git 与常用的版本控制工具 CVS, Subversion 等不同,它采用了分布式版本库的方式,不必服务器端软件支持。
参数说明:
**repo:**Git 仓库。
**directory:**本地目录。
git init
Git 使用 git init 命令来初始化一个 Git 仓库,Git 的很多命令都需要在 Git 的仓库中运行,所以 git init 是使用 Git 的第一个命令。
在执行完成 git init 命令后,Git 仓库会生成一个 .git 目录,该目录包含了资源的所有元数据,其他的项目目录保持不变(不像 SVN 会在每个子目录生成 .svn 目录,Git 只在仓库的根目录生成 .git 目录)。
git init newrepo
建议下面方式创建初始化仓库来获得.git文件信息
进入gitee或github新建一个仓库,生产readme等关键文件
进入到 ...
Idea源码阅读技巧
Call Hierarchy(唤起 层次结构)
Navigate | Call Hierarchy命令查看一个Java方法调用树(caller和callee两个方向)
Caller(呼叫者)
callee(被呼叫者)
Data Flow from / to Here(数据流)
选择Analyze | Dataflow from/to Here两个命令查看表达式、变量和方法参数的传递关系树。
from
to
Find Usage(找寻使用)
Find Usage 可以查看一个Java类、方法或变量的直接使用情况
Diagram(图表)
在包或类上右键点击Diagram或者用快捷键Ctrl+Alt+U
在包或类上右键点击Diagram或者某个包上使用(包括第三方jar包上使用)
因此可是很方便的用来研究三方的包中代码和包之间的关系。在项目上使用可以查看各个package之间的关系,十分方便,只需要将需要查看的类托人,当前类的Diagram;
structure(结构体)
Lambda Expressions in Java 8
Lambda expressions basically express instances of functional interfaces
(An interface with single abstract method is called functional interface. An example is java.lang.Runnable). lambda expressions implement the only abstract function and therefore implement functional interfaces
lambda expressions are added in Java 8 and provide below functionalities.
Enable to treat functionality as a method argument, or code as data.
A function that can be created without belonging to any class.
A lambda e ...
HashTable
Hash结构优势
散列表(Hash table,也叫哈希表),是根据关键码值(Key value)而直接进行访问的数据结构。也就是说,它通过把关键码值映射到表中一个位置来访问记录,以加快查找的速度。这个映射函数叫做散列函数 》Hash🤞 ,存放记录的数组叫做散列表。
这样的合理安排的数据结构,便可以是得我们可以利用分而治之的思想进行数据的处理于存储,而不同于链表与数组有着先天性的限制。
当然Hash也是有着美中不足的缺陷的,比如表需要安排多少个链表,hash值又该任何分配,这都是需要灵活变化的。对于小白来说看一下主流语言的API实现或许就有启发。
散列函数
关键代码
1234567891011private int hashFun(int id) { int hashIndex = id % size; if (hashIndex < size) { return hashIndex; } else { System.out.println("hashTable‘s ...
MicroServices OverView
转载网址
前言
最近几年微服务很火,大家都在建设微服务,仿佛不谈点微服务相关的技术,都显得不是那么主流了。
近几年见识到身边朋友的很多公司和团队都在尝试进行微服务的改变,但很多团队并没有实际微服务踩坑经验,很多团队甚至强行为了微服务而去微服务,最终写成一个大型的分布式单体应用,就是改造后的系统既没有微服务的快速扩容,灵活发布的特性,也让原本的单体应用失去了方便开发,部署容易的特性(项目拆为多份,开发部署复杂度都提高了),不得不说是得不偿失。
什么是微服务?为什么要用微服务?
微服务解决什么问题,又引入了什么问题?
使用微服务应该要遵循哪些原则?什么样的情况你不应该使用微服务?
(PS:因为市面上太多对如果使用微服务框架工具的教程,所以本篇只是一篇关于微服务的总体概述性文章,不涉及各种微服务框架的安装和使用教程,我们只谈论微服务本身的设计模式的优缺点和适合应用的场景)
什么是微服务?为什么要用微服务?
什么是微服务?
简单举例:看军事新闻的同学应该都知道,一艘航空母舰作战能力虽然很强,但是弱点太明显,就是防御能力太差,单艘的航空母舰很少单独行动,通常航空母舰战斗群才是主 ...
Why choose Flutter
大公司背景
Google(开发 维护)
Flutter是一个免费和开放源代码的Google移动用户界面框架,为开发人员提供了一种快速而富有表现力的方式,使其可以在IOS和Android上构建本机应用程序。
阿里巴巴(使用 推广)
FlutterGo由阿里巴巴前端技术团队开发的Flutter 开发者帮助 APP,包含 flutter 常用 140+ 组件的demo 演示与中文文档,是学习Flutter开发的必备手册。
界面amazing
移动用户希望他们的应用程序具有精美的设计,流畅的动画和出色的性能,以交付给开发人员,他们需要比以往更快地创建新功能,而又不影响质量或性能。这就是Google蓬勃发展的原因。
一端开发多端使用热加载
Flutter是可以热加载(hot reload),即不需要重新compile, SDK自动渲染更新的部分
高性能Flutter不需要Javascript桥接器,而且速度要快得多。
和 React Native 一样,Flutter 也提供响应式的视图,Flutter 采用不同的方法避免由 JavaScript 桥接器引起的性能问题,即用名为 ...