At my current work, we are trying to migrate the vue2 project to use composition API. One question that came up from my co-worker is can we still mock the composition function easily like what we did for services classes. That is a very good question, but I don't see anything that could block us to mock it. First of all, the class is just syntax sugar for functions in JS. Secondly, the Vue composition function is just a regular JS factory function that returns a bunch of Vue specifically stuff like refs, etc.

From what I research on the…


Previously at work I created our own SasS deployment management tool. One pain problem in this project is running kubectl command inside the container. By that time, time for the project is limited, I have to hack this part up by installing gcloud into the project container and authenticate with GCP at container boot time. Now I finally got some time to do some search on how to do it right. This post is my summary of the process:

Step 1

Well, unfortunately we still need to use gcloud do authenticate for the first time to setup in order to make the…


This post is the wrap up of my talk at WinnipegJS meetup #6.

In this talk, I’m going to talk about reactivity system in vue. But what is reactivity?

To Me, reactivity simply means when one state changed, the side effect of it get updated automatically.

If I explain it in mathematical definition, for example we have a equation that y = x + 1, x is our independent variable and y is our dependent variable. Why y is called dependent variable? Well because its value depends on value of x!

A well known example of reactivity system is spreadsheet.

Step 1


Groph is my new personal project to study big data analysis.

Data set

tencent qq group leak data around 2012.

Tech Stack:

  • Sql server 2008 r2, to restore the original data set.
  • Neo4j, graph database to store data and relations
  • python3, lib:
  • pipenv: setup virtualenv
  • pymssql: python lib to connect to sql server

Day 0

  • install sql server
  • WIP import data into sql server
  • import query: sp_attach_single_file_db @dbname='GroupData5_Data' . @physname='[path to your data set folder]\GroupData5_Data.MDF'

Day 1, 2017–3–30

  • init git repo, github
  • setup python virtualenv use pipenv
  • connect sql server from python script
  • need to config sql server to enable tcp/ip connection first, doc. run C:\Windows\SysWOW64\SQLServerManager10.msc

本文系原博客归档, 内容未必有效。

写在最前

去年TI5前开发了dotaonly.com,网站需要用到各个直播平台API。不像国外网站Twitch那样开放,都有现成的API可用,国内网站都很封闭,对开发者不太友好。本文所涉及API皆抓取自斗鱼IOS手机客户端。

首先是不需要登录的API

获取当前全部直播

请求地址:
http://capi.douyucdn.cn/api/v1/live?limit=20&offset=0
参数:
limit: 一次获取的个数
offset:起始位置,比如要获取前20个之后的 offset=20, 下同
返回数据

{
"error": 0,
"data": [
{
"room_id": "16101",
"room_src": "http://rpi …


You can add the redis-cli command in your pod as liveness probe.


for some reason in chrome 65 the position sticky element with a z-index will covered by its sibling element on scroll.

I didn’t find any real solution to fix it but the following hack do the trick:

.header {
position: sticky;
z-index: 1000;
transform: translateZ(0);
}

An Xie

Passion Driven Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store