learning image html

Personal learning note from udemy. image tag: From MDN, image tag must have start tag, must not have an end tag. Here is the reason i got from stackoverflow, but i still dont understand it. Thus, the most common way is  <img src="smiley.gif" alt="Smiley face" height="42" width="42"/> And we need to add "alt" in case the picture is not displayed. … Continue reading learning image html

Advertisements

CSS-selectors

Here is the most common selectors for beginners(including me): descendant selector:one more example:one mistake I made before: adjacent selector: if tags ul does not immediately follow tag p:if tags ul is not tag p siblings: attribute selector:one more example: nth of type: child selectorMention:  difference between child selector and descendant selector:check this example

SQL basic command

create table : CREATE TABLE Project ( ProjectID int NOT NULL IDENTITY(1,1), ProjectName varchar(255) NOT NULL, CreatedDate datetime , Price int, FactoryName varchar(255), Status varchar(255), CustomerName varchar(255), Location varchar(255) ) Add constraints: ALTER TABLE @tablename ADD CONSTRAINT @defaultconstraint_name DEFAULT GETUTCDATE() FOR @columnname same as other constraints Insert data: Insert into project(ProjectName, Price, FactoryName, Status, CustomerName, Location) … Continue reading SQL basic command

SQL default constraint problem

Briefly, how to get default constraint name: -- returns name of a column's default value constraint SELECT default_constraints.name FROM sys.all_columns INNER JOIN sys.tables ON all_columns.object_id = tables.object_id INNER JOIN sys.schemas ON tables.schema_id = schemas.schema_id INNER JOIN sys.default_constraints ON all_columns.default_object_id = default_constraints.object_id WHERE schemas.name = 'dbo' AND tables.name = 'tablename' AND all_columns.name = 'columnname' This answer … Continue reading SQL default constraint problem

Template literals

It is a time to learn something new of ES6, which is famous as `Template literals`. Here is the link of resources, in english https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals. Here is my notebook: Template literals are enclosed by the back-tick ( ``) character instead of double or single quotes.  One of good advantages is that it can achieve the multi-line strings. As … Continue reading Template literals