This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add all files to the index of the | |
# Git repository | |
git add . | |
# commit your file to the local repository | |
git commit -m "Initial commit" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hours and minutes, 12-hour clock: | |
┌──────────────────────────────────────────────┐ | |
│ ^(1[0-2]|0?[1-9]):([0-5]?[0-9])(●?[AP]M)?$ │ | |
└──────────────────────────────────────────────┘ | |
Hours and minutes, 24-hour clock: | |
┌──────────────────────────────────────────────┐ | |
│ ^(2[0-3]|[01]?[0-9]):([0-5]?[0-9])$ │ | |
└──────────────────────────────────────────────┘ | |
Hours, minutes, and seconds, 12-hour clock: | |
┌──────────────────────────────────────────────────────────────┐ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--TSQL | |
create procedure uspPhoneNumberInsertUpdateSingleItem | |
@id int, | |
@phonenumber nvarchar(20), | |
@phonenumbertype int, | |
@contactpersonid int | |
as | |
declare @ReturnValue int | |
if(@id is null) --new Item | |
begin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create procedure uspContactPersonDeleteSingleItem | |
@id int | |
as | |
begin tran | |
delete from address where contactpersonid = @id; | |
if @@ERROR <> 0 | |
begin | |
rollback tran | |
return -1 | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--► The CHECK constraint is used to limit the value range that can be placed in a column. | |
--► If you define a CHECK constraint on a single column it allows only certain values for this column. | |
--► If you define a CHECK constraint on a table it can limit the values in certain columns based on values in other columns | |
-- in the row. | |
--MySQL: | |
CREATE TABLE Persons | |
( | |
P_Id int NOT NULL, | |
LastName varchar(255) NOT NULL, | |
FirstName varchar(255), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private DataTable GetDataTable() | |
{ | |
string sql = "SELECT Id, Description FROM MyTable"; | |
using (SqlConnection myConnection = new SqlConnection(connectionString)) | |
{ | |
using (SqlCommand myCommand = new SqlCommand(sql, myConnection)) | |
{ | |
myConnection.Open(); | |
using (SqlDataReader myReader = myCommand.ExecuteReader()) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--atach file | |
CREATE DATABASE [SchoolDB] ON | |
( FILENAME = N'D:\SchoolDB.mdf' ), | |
( FILENAME = N'c:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\SchoolDB_log.ldf' ) | |
FOR ATTACH | |
GO | |
--attach file | |
create database SchoolDB ON | |
( filename = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\SchoolDB.mdf') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//css | |
jtable td{font-weight: bold;} | |
//js | |
$().ready(function(){ | |
$(".jtable th").each(function(){ | |
$(this).addClass("ui-state-default"); | |
}); | |
$(".jtable td").each(function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ wget \ | |
--recursive \ | |
--no-clobber \ | |
--page-requisites \ | |
--html-extension \ | |
--convert-links \ | |
--restrict-file-names=windows \ | |
--domains website.org \ | |
--no-parent \ | |
www.website.org/tutorials/html/ |