fish-404 / fish-404.github.io Goto Github PK
View Code? Open in Web Editor NEWblog
Home Page: https://fish-404.github.io/
blog
Home Page: https://fish-404.github.io/
Null in SQL is more complex than I think before, will open a new post to record learning.
max()
count()
not in
case
without else
FIRST_VALUE | LAST_VALUE
order by
Reference:
Would like to realize:
Reference :
GitHub Pages | Hexo
LAST_VALUE
FIRST_VALUE
ROW_NUMBER
Reference (checkbox means has read completely or not)
Case:
May related to #3
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.
Reference:
.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.
HttpServerUtility.MapPath(String)
HostingEnvironment.MapPath(String)
HttpRequest.MapPath(String)
Assembly.Location
Directory.GetCurrentDirectory()
Reference:
Troels' links: Relational database systems
https://learn.microsoft.com/en-us/sql/t-sql/data-types/hierarchyid-data-type-method-reference?view=sql-server-ver16&source=docs
https://learn.microsoft.com/en-us/sql/t-sql/queries/with-common-table-expression-transact-sql?view=sql-server-ver16#guidelines-for-creating-and-using-common-table-expressions
https://stackoverflow.com/questions/51176971/how-do-recursive-ctes-work-in-sql-server
Tutorial: Using the hierarchyid Data Type - SQL Server | Microsoft Learn
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.
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
Packages:
imagemagick
- ImageMagick
ffmpeg
1libxml2-dev
- libxml2-devel
libxslt1-dev
- libxslt-devel
libyaml-dev
- libyaml-devel
libffi-dev
- libffi-devel
g++
gcc
autoconf
build-essential
- group 'Development Tools'
23redis-server
redis-tools
- redis
4libjemalloc-dev
- jemalloc-devel
5libssl-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:
How to install GCC Compiler on CentOS 7 | Linuxize](https://linuxize.com/post/how-to-install-gcc-compiler-on-centos-7/) ↩
software installation - Can't Install build-essential on CentOS - Unix & Linux Stack Exchange ↩
jemalloc
package will also be installed ↩
Require jemalloc
package ↩
Deploying a Mastodon Instance on CentOS7 | by Grant 'Faceman' Foster | Medium ↩
According to the NodeSource repository, CentOS 7 (64-bit) BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+ ↩
根据 next-theme/hexo-theme-next#4 的说明,NexT 社区仓库已经迁移, 新版本的发布都在新仓库进行
一些需要前置处理的问题背景:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.