Bài đăng

Wordpress - How to Add or Update Content on Your WordPress Website

Hình ảnh
  In order to add or update content on a WordPress website, you must have Administrator, Editor, Author or Contributor privileges. Background: Content can be added to a WordPress website in one of two formats: as a  Page  or as a  Post . A  page  is for content that is not time-dependent eg. ‘About’ or ‘Contact’ pages A  post  is for content that is time-relevant and is typically displayed in reverse-chronological order. Posts can have comments and an associated RSS feed. Examples of ‘post’-appropriate content would be ‘News’ or ‘Events’. Both Pages and Posts have associated titles and content and the Look and Feel of the website will not change between the two. Before you start in WordPress, assess your content Decide if your current content needs editing or if you need to add new content to your site. How to edit current content: Log into your WordPress website If you are editing a Post: Click on Post > All Posts Find the Post you would like ...

SQL SERVER: Tính năng range datetime

Hình ảnh
Day Day Range Tìm thời gian bắt đầu và ngày kết thúc của một ngày. Hide     DECLARE @dateTimeNow DATETIME = ' 2019-07-01 17:20:00' /* yyyy-MM-dd HH:mm:ss*/ -- DECLARE @dateTimeNow DATETIME = GETDATE(); /*now*/ SELECT [StartDateTime] = DATEADD(DAY, DATEDIFF(DAY, 0 , @dateTimeNow ), 0 ), [EndDateTime] = DATEADD(SECOND, -1, DATEADD(DAY, DATEDIFF(DAY, 0 , @dateTimeNow ) + 1 , 0 )); Populate Days With Range Tạo danh sách ngày với phạm vi hàng ngày: Hide     DECLARE @startDateTime DATETIME = ' 2019-09-21' , _ @endDateTime DATETIME = ' 2019-09-30' ; /* yyyy-MM-dd*/ -- SET @startDateTime = GETDATE(); _ SET @endDateTime = @startDateTime + 10 ; /* now*/ WITH Dates([ Date ]) AS ( SELECT [ Date ]= @startDateTime UNION ALL SELECT [ Date ] + 1 FROM Dates WHERE [ Date ] + 1 <= @endDateTime ), DateRange(...

Commonly use sql function Part II

String Functions Đôi khi một số hàm String rất tiện dụng. Hãy thảo luận về chúng từng cái một. ASCII() Trả về giá trị mã ASCII của ký tự ngoài cùng bên trái của biểu thức ký tự. Syntax ASCII ( character_expression ) Arguments:  character_expression : Là một biểu thức của kiểu char hoặc varchar. Return Types: Int   Example :    SELECT ASCII( ' A' ) SET TEXTSIZE 0 SET NOCOUNT ON -- Create the variables for the current character string position -- and for the character string. DECLARE @position int , @string char ( 15 ) -- Initialize the variables. SET @position = 1 SET @string = ' The codeProject' WHILE @position <= DATALENGTH( @string ) BEGIN SELECT ASCII(SUBSTRING( @string , @position , 1 )), CHAR (ASCII(SUBSTRING( @string , @position , 1 ))) SET @position = @position + 1 END SET NOCOUNT OFF Output: -- --------- 65 -- --------- ---- 84 T -- --------- ---- 104 ...