Jack N @ GitHub

Full stack AI Engineer, focus on: React, Next.js, node.js and .Net

Error on renaming database in SQL Server, when rename the database:

1
ALTER DATABASE MY_DB MODIFY NAME = [MY_DB_bak]

But it shows an error when executing:

1
The database could not be exclusively locked to perform the operation.

The solution is setting the database to single user mode.

1
2
3
4
use master
ALTER DATABASE MY_DB SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE MY_DB MODIFY NAME = [MY_DB_bak]
ALTER DATABASE MY_DB_bak SET MULTI_USER

Why Hexo

I’m a fan of Node.js, and github, and I want to choose a tool written in node.js to help me write blogs.
And it is Hexo! It is a fast, simple & powerful blog framework, powered by Node.js.

Features of Hexo

  • Blazing fast generating
  • Support for GitHub Flavored Markdown and most Octopress plugins
  • One-command deploy to GitHub Pages, Heroku, etc.
  • Powerful plugin system

Several Node.js Static Site Generators

I like Node.js, so I give you several choose beside the Hexo!

Metalsmith

Metalsmith immediately caught my attention not only thanks to its beautiful and minimal design, but also because of the following tagline: An extremely simple, pluggable static site generator. The first blurb goes on to explain that all of the logic in Metalsmith is handled by plugins. You simply chain them together. This makes Metalsmith the most versatile of all the systems presented here.

Wintersmith

Wintersmith claims to be a flexible, minimalistic, multi-platform static site generator built on top of Node.js. Certainly, minimalistic is the key word! Wintersmith isn’t suited for beginners, but it’s perfectly fine for intermediate or advanced developers looking to get up and running with little fuss. Wintersmith’s approach isn’t the only thing that’s minimal. It was coded in CoffeeScript and ships with Jade and Markdown ready to go.

Assemble

Assemble is a powerful tool that integrates Grunt and Yeoman into its workflow. Like Punch and DocPad discussed later in this article, Assemble tries to get designers and developers on the same page. For example, Assemble comes pre-packaged with Handlebars, one of the most widely used and beginner-friendly templating systems available.

0%