Code Monkey home page Code Monkey logo

fish-404.github.io's Introduction

fish-404.github.io's People

Contributors

fish-404 avatar

Watchers

 avatar

fish-404.github.io's Issues

SQL - Null

Null in SQL is more complex than I think before, will open a new post to record learning.

  • null with max()
  • null with count()
  • null in join
  • null with not in
  • case without else
  • null in Aggregate, Analytic functions
  • null in Date & time functions
  • null with FIRST_VALUE | LAST_VALUE
  • null with order by

Reference:

Change One Command Deploy to GitHub Action Deploy

Would like to realize:

  1. use a GitHub action to sync public repo issues to private issues (open, reopen, closed)
  2. use a GitHub action to sync branches between public and private
  3. when new commits push to private repo, deploy to public repo in a preview status
  4. when preview confirmed, publish

Reference :
GitHub Pages | Hexo

SQL - Window Functions

SQL - Query Plan & Parameterized SQL

Background:

Many applications I managed has string connected SQL methods. It's hard to read and debug and maintain. When I try out to find some better methods to write SQL in C#, find something more about this problem. It seems a topic which deserve to deep into.

  1. Concatenated SQL
  2. Parameterized SQL
  3. SQL Injection
  4. Query Plan
  5. Table-Valued Parameter (maybe a post)

.Net - How to get current folder ?

.Net seems have many methods to get the current folder. For different types of the application/service, use the some method to get folder may get nothing.

Write logs usually need to get folder first and write the log. If you can't get the folder, you also can't write the log.

Reference:

SQL - Hierarchical data in RDBMS

SQL - Group by Time Based on Interval

Image you have a group of data struct like below, and you need order and group each card_id in a certain time interval, after the interval, you should open a new group.

DB Fiddle

card_id timestamp
100000 2022-01-01 07:10:30
100001 2022-01-01 07:10:31
100000 2022-01-01 07:10:35
100000 2022-01-01 07:11:01
100001 2022-01-01 07:11:30
100000 2022-01-01 07:12:30
100001 2022-01-01 07:12:31
100000 2022-01-01 07:13:35
100000 2022-01-01 07:14:01
100001 2022-01-01 07:15:30

If the time interval is 2 minutes, you want get this:

card_id timestamp sort
100000 2022-01-01 07:10:30 1
100001 2022-01-01 07:10:31 1
100000 2022-01-01 07:10:35 2
100000 2022-01-01 07:11:01 3
100001 2022-01-01 07:11:30 2
100000 2022-01-01 07:12:30 3
100001 2022-01-01 07:12:31 3
100000 2022-01-01 07:13:35 1
100000 2022-01-01 07:14:01 2
100001 2022-01-01 07:15:30 1

Reference:

https://stackoverflow.com/questions/49830909/partition-by-time-interval/49831036#49831036

Run Mastodon in Centos7 (troubleshoot record)

Packages:

  • imagemagick - ImageMagick
  • ffmpeg1
  • libxml2-dev - libxml2-devel
  • libxslt1-dev - libxslt-devel
  • libyaml-dev - libyaml-devel
  • libffi-dev - libffi-devel
  • g++ gcc autoconf build-essential - group 'Development Tools' 23
  • redis-server redis-tools - redis 4
  • libjemalloc-dev - jemalloc-devel 5
  • libssl-dev - openssl-devel
  • pkg-config - pkgconfig
  • libprotobuf-dev - protobuf-devel
  • libgdbm-dev - gdbm-devel
  • libreadline6-dev - readline-devel
  • zlib1g-dev - zlib-devel
  • libidn11-dev - libidn-devel
  • libncurses5-dev - ncurses-devel

Some deploy guide6 writes clearly, but miss some packages after mastodon has upgraded to a new version.

About Node.js and Yarn:

  • When you read guides for installation, you sometimes find curl https://xxxxxxx/setup_[version].x, be careful with the version.7

  • If you have installed Node.js from other source, you will get a warning, follow the installation hint to install Yarn package manager.

     curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
     sudo yum install yarn

Useful websites:

Footnotes

  1. How to Install and Use FFmpeg on CentOS 7 | Linuxize

  2. How to install GCC Compiler on CentOS 7 | Linuxize](https://linuxize.com/post/how-to-install-gcc-compiler-on-centos-7/)

  3. software installation - Can't Install build-essential on CentOS - Unix & Linux Stack Exchange

  4. jemalloc package will also be installed

  5. Require jemalloc package

  6. Deploying a Mastodon Instance on CentOS7 | by Grant 'Faceman' Foster | Medium

  7. According to the NodeSource repository, CentOS 7 (64-bit) BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+

Upgrade NexT

根据 next-theme/hexo-theme-next#4 的说明,NexT 社区仓库已经迁移, 新版本的发布都在新仓库进行

一些需要前置处理的问题背景:

  • NexT 8.0 版本已不再支持 Valine 作为内置评论服务
  • LeanCloud 于2022-08-01起将停止向国内提供国际版服务
  • NexT 将不再支持任何与 LeanCloud 相关的评论系统,也不再支持类 Valine 的衍生评论系统

Related: #2 #9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.