虽然一直知道很多公众号是拿钱办事或者为钱办事,但总觉得那几个业内著名公众号也许会为了自己未来钱途总会对自己的内容有所把关。直到近来目睹了如何将一个口胡出来的排行榜推上各大著名科技公众号的主推内容里,才恍然大悟为何这么多公众号能够每天发布一些看起来非常有道理的所谓干货。
痛定思痛,立马取关,新的一年,安静的自我学习 =-= 提升自我
乖巧.jpg
虽然一直知道很多公众号是拿钱办事或者为钱办事,但总觉得那几个业内著名公众号也许会为了自己未来钱途总会对自己的内容有所把关。直到近来目睹了如何将一个口胡出来的排行榜推上各大著名科技公众号的主推内容里,才恍然大悟为何这么多公众号能够每天发布一些看起来非常有道理的所谓干货。
痛定思痛,立马取关,新的一年,安静的自我学习 =-= 提升自我
乖巧.jpg
When I set up this website, I find I need to have some nested git repo hierarchy. For example, the theme always has an individual repo and I also put the entire hexo website in a git repo. To make this hierarchy more manageable, it is a good practice to add sub git repo as submodules.
If you are using git server such as github, then you are set by simply typing the commands to set up two git repo and push to remote server and then use
1 | git submodule add ./dir/to/submodule |
to put everything not ignored to the server.
However, if you are using a git server set up by yourself, you may wonder how you should set the remote URLs for the main git repo and submodule git repo.
Instead of create two git repos in same directory to make the two repos for main and submodule are in the same level on server, we should create the server repos nested.
For example, if our main git repo named main, and our submodule repo named submodule, then we might need to perform the following actions and get the following hierarchies.
On Server:
1 | # go to needed dir |
On Local Machine with initial or developed codes:
1 | # get into directory and create file |
On another Local Machine which want to clone this repo:
1 | # clone a repo with all submoduel |
Then you will have a repo named main with submodule named submodule.
Since I am new to perl and here are some notes for writing perl in OOP without using package without using Moose module.
It is recommended to include
1 | use strict; |
at the very beginning of your code to make your code easier for others to read and understand.
So class in perl is basically a module. With the constructor subroutine and bless
, it is easy to act like a class.
First of all, put your class in the file <classname>.pm . It is the module for the implementation of your class.
This module will have a constructor and some methods:
1 | package <classname>; |
The constructor subroutine is not necessary to be named new
.
In your perl file, after include this module with use <classname>;
, you could create a new class instance in the following way and call its methods:
1 | my $instance = <classname> -> new ( \%args ); |
For above codes, an class instance is created by new ( \%args );
. It returns a handler and store in $instance
. Actually, it is a hash in perl. All subroutines can be called in the way of $classname -> subroutineName()
like methods of class. All the attributes are stored in the hash, which is binded to $class
by bless
. You can directly access the attributes by $class -> {$key}
, which is not recommended.
That is all about writing perl in OOP.
In linux system, backlog
specify the accepted queue size (the number of established status packets). If the accepted queue is full, further SYN RECEIVED packets will be ignored. If you are using TCP, then TCP will simply resend this packet, for the sender does not receive ACK. But for UDP, you will deal with it in another way.
For further reading, here is a good blog post.
When you need to use CGEvent to create Quartz Event to mimic keyboard input for your macOS program, if you need to mimic the function of shift, control, command, option
, then you need to set flag for CGEvent instance’s flag
property. Meanwhile, if you want to set more than one flag, then you should or the rawvalue
of flag together.
The example is shown here:
1 | let opt1d = CGEvent(keyboardEventSource: src, virtualKey: kVK_Option), keyDown: true) |
Here is a great tutorial about how to establish the connection using MultipeerConnectivity framwork. Updated in 2017.2
https://www.ralfebert.de/tutorials/ios-swift-multipeer-connectivity/
近来看了一本亚马逊的网播剧,_The Man in the High Castle_,想来也是高考以后除了GOT看的唯一一本美剧了,为其质量感叹的同时也决定为其做一个小评。额评论也称不上,毕竟是没有看过萝卜忑之卖基的_故事_,不过这书中文版已然买了许久让其积灰多月,自然也应该让我沾了些许评论的灵气吧。。 more >>
2014.11
2015.10.16 Updated
在Discrete考试之前又温习了一遍。。
感觉最害怕的还是那种大家都放弃了的感觉。电影的设定背景其实离现在很远,但是经历科技爆炸之后,人们却迎来了科技退步,于是八十年代美国乡村风光让人感到一种就在现在的亲切感。。更是令人感到害怕。
有的时候明知道要失败,那是否还要继续斗争下去,还是go gentle into that night呢? more >>
Since this is my first post, so I would like to write something for WordPress.
First, I assume you have an ubuntu 14.04 on your vps.
Then under the guideline in Initial Server Setup with Ubuntu 14.04 and then the guideline in How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 14.04 and then How To Install Wordpress on Ubuntu 14.04.
Quite easy right?
But you may find that you cannot update or download things on WordPress.
So second you need to change the permission of your web server:
sudo chown -R www-data:www-data your-wordpress-directory
and then you can do anything you want on WordPress!
However, your friends might complain that they cannot receive the registration email from your blog. The reason is that you do not set the mail server on your VPS.
Here is an easy way for you to send registration emails from your VPS without doing some tedious things if you just want your WordPress can send out emails.
Just Go To Plugins and add a SMTP setting plugin. QUITE EASY RIGHT?
For the recommendation, I use Configure SMTP right now.
P.S. if you do not want the link of the WordPress be directly your IP, then you can create sub-folder under the initial folder (for me it is /var/www/html)
tag:
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true