From a54791651fc6b7c12ddf3ea39ca76955c3184beb Mon Sep 17 00:00:00 2001 From: Sherry Yang Date: Tue, 5 Mar 2019 15:25:54 +0100 Subject: [PATCH 01/11] XML cheat sheet Add first part of XML cheat sheet to the repository --- languages/XML.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 languages/XML.md diff --git a/languages/XML.md b/languages/XML.md new file mode 100644 index 0000000..adbac30 --- /dev/null +++ b/languages/XML.md @@ -0,0 +1,62 @@ +> announcement: this doc is a quiz-, interview-oriented cheatsheet, which desigend for those who want to have an overview of XML, when preparing for interviews. + +# What is XML +XML stands for eXtensible Markup Language, XML was designed to store and transport data. XML is often used for distributing data over the Internet(especial in web development). + +# Then how can XML store data +XML uses a DTD to describe the data. + +# The relation with HTML +* XML: is used to store or transport data. + So the XML is a **Complement** to HTML. +* HTML: is used to format and display the same data. + + +XML does not carry any information about how to be displayed. The same XML data can be used in many different presentation scenarios. +Because of this, with XML, there is a full separation between data and presentation. + +# What is XML Schema/DTD +The purpose of a DTD is to define the structure of an XML document. It defines the structure with a list of legal elements: + + +# When Not to Use a XML DTD/Sschema +XML does not require a DTD/Schema. + +When you are experimenting with XML, or when you are working with small XML files, creating DTDs may be a waste of time. + +If you develop applications, wait until the specification is stable before you add a document definition. Otherwise, your software might stop working because of validation errors. + + +# XML Syntax +The XML language has no predefined tags, but the syntax is rather logic and easy to learn. XML documents must contain one root element that is the parent of all other elements. + +``` + + + Harry Potter + J K. Rowling + 2005 + 29.99 + + + Learning XML + Erik T. Ray + 2003 + 39.95 + + +``` + +1. XML Tags are Case Sensitive +2. All XML Elements Must Have a Closeing Tag + +``` +

This is a paragraph.

+
+``` +3. XML Attribute Values Must Always be Quoted +4. Pay attention to the name rules. + +# Reference +1. (W3School) [https://www.w3schools.com/xml/] +2. [cheat sheet in German](https://www.i-d-e.de/wp-content/uploads/2015/02/ide-xml-kurzreferenz.pdf) From c946fe9b67aba7682b1749dab4a711a34c0482bf Mon Sep 17 00:00:00 2001 From: XVR147 Date: Wed, 16 Oct 2019 20:39:29 +0200 Subject: [PATCH 02/11] Fix small errors in HTML cheatsheet Just some casing and misspelling fixes. --- frontend/html5.html | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/frontend/html5.html b/frontend/html5.html index e40173c..5072fb1 100644 --- a/frontend/html5.html +++ b/frontend/html5.html @@ -28,7 +28,7 @@

...

-
+


@@ -39,7 +39,7 @@ and and - +
                                       
 
@@ -54,13 +54,13 @@ - + -text +text @@ -70,7 +70,7 @@
  • -
    +
    @@ -85,7 +85,7 @@ enctype="" novalidate accept-charset="" -target="" +target=""
    @@ -105,16 +105,16 @@ step="" - + name="" size="" multiple required -autofocus +autofocus - + @@ -136,7 +136,7 @@ autofocus - + type="" @@ -146,7 +146,7 @@ usemap="" -scr="" +src="" width="" @@ -155,7 +155,7 @@ width=""
    -
    +
    @@ -177,7 +177,7 @@ width="" - + " " Quotation Marks - " From 1eec2b0273532dd2176e8f58723d76429ce2a2c9 Mon Sep 17 00:00:00 2001 From: XVR147 Date: Wed, 16 Oct 2019 20:39:29 +0200 Subject: [PATCH 03/11] Fix small errors in HTML cheatsheet Just some casing, spacing and misspelling fixes. --- frontend/html5.html | 52 ++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/frontend/html5.html b/frontend/html5.html index e40173c..c9a0154 100644 --- a/frontend/html5.html +++ b/frontend/html5.html @@ -10,28 +10,28 @@ - + - - - + + + -

    ...
    -

    -
    - -
    -
    +

    ...
    +

    +
    + +
    +
    @@ -39,10 +39,10 @@ and and - +
                                           
     
    - +
    @@ -54,13 +54,13 @@ - + -text +text @@ -70,7 +70,7 @@
    • -
      +
      @@ -80,12 +80,12 @@
      -method="somefunction()" +method="somefunction()" enctype="" autocomplete="" novalidate accept-charset="" -target="" +target=""
      @@ -105,16 +105,16 @@ step="" - + name="" -size="" +size="" multiple required -autofocus +autofocus - + @@ -136,17 +136,17 @@ autofocus - + type="" -height="" +height="" width="" usemap="" -scr="" +src="" width="" @@ -155,7 +155,7 @@ width=""
      -
      +
      @@ -177,7 +177,7 @@ width="" - + " " Quotation Marks - " From f0fae838f811faed8d06ab08c5e671ba8f68821a Mon Sep 17 00:00:00 2001 From: Alexound Date: Thu, 24 Oct 2019 11:21:36 +0400 Subject: [PATCH 04/11] Added match '*.swp' to work with Vim in 'gitgnore'. --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 54166b9..83f1989 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ # Editors .vscode/ + +# Vim +*.swp From d2c01dccd4fb326b5f03302db1913a5060f8acce Mon Sep 17 00:00:00 2001 From: Alexound Date: Thu, 24 Oct 2019 11:41:37 +0400 Subject: [PATCH 05/11] Fixed and improved SHORTCUTS module. Now it's 'SHORTCUTS and HISTORY'. --- languages/bash.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/languages/bash.sh b/languages/bash.sh index 0fe147c..d738b2c 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -1,9 +1,8 @@ #!/bin/bash ############################################################################## -# SHORTCUTS +# SHORTCUTS and HISTORY ############################################################################## - CTRL+A # move to beginning of line CTRL+B # moves backward one character CTRL+C # halts the current command @@ -11,6 +10,7 @@ CTRL+D # deletes one character backward or logs out of current session, similar CTRL+E # moves to end of line CTRL+F # moves forward one character CTRL+G # aborts the current editing command and ring the terminal bell +CTRL+H # deletes one character under cursor (same as DELETE) CTRL+J # same as RETURN CTRL+K # deletes (kill) forward to end of line CTRL+L # clears screen and redisplay the line @@ -31,10 +31,17 @@ CTRL+Z # stops the current command, resume with fg in the foreground or bg in t ALT+B # moves backward one word ALT+D # deletes next word ALT+F # moves forward one word +ALT+H # deletes one character backward -DELETE # deletes one character backward -!! # repeats the last command -exit # logs out of current session +BACKSPACE # deletes one character backward +DELETE # deletes one character under cursor + +history # shows command line history +!! # repeats the last command +! # refers to command line 'n' +! # refers to command starting with 'string' + +exit # logs out of current session ############################################################################## From aa8b4efb860c9863ae8c117f53f600392ab6023e Mon Sep 17 00:00:00 2001 From: Alexound Date: Thu, 24 Oct 2019 11:52:27 +0400 Subject: [PATCH 06/11] Fixed tabs and spaces. --- languages/bash.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/languages/bash.sh b/languages/bash.sh index d738b2c..774ef51 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -10,7 +10,7 @@ CTRL+D # deletes one character backward or logs out of current session, similar CTRL+E # moves to end of line CTRL+F # moves forward one character CTRL+G # aborts the current editing command and ring the terminal bell -CTRL+H # deletes one character under cursor (same as DELETE) +CTRL+H # deletes one character under cursor (same as DELETE) CTRL+J # same as RETURN CTRL+K # deletes (kill) forward to end of line CTRL+L # clears screen and redisplay the line @@ -31,14 +31,14 @@ CTRL+Z # stops the current command, resume with fg in the foreground or bg in t ALT+B # moves backward one word ALT+D # deletes next word ALT+F # moves forward one word -ALT+H # deletes one character backward +ALT+H # deletes one character backward BACKSPACE # deletes one character backward DELETE # deletes one character under cursor history # shows command line history !! # repeats the last command -! # refers to command line 'n' +! # refers to command line 'n' ! # refers to command starting with 'string' exit # logs out of current session From 6fe0435c7777df8de98b5d9f3536820c6a39c431 Mon Sep 17 00:00:00 2001 From: Alexound Date: Thu, 24 Oct 2019 12:02:15 +0400 Subject: [PATCH 07/11] Keep working on 'bash' cheetsheet. Minor corrections. --- languages/bash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages/bash.sh b/languages/bash.sh index 774ef51..780e98c 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -54,7 +54,7 @@ echo $SHELL # displays the shell you're using echo $BASH_VERSION # displays bash version bash # if you want to use bash (type exit to go back to your previously opened shell) -whereis bash # finds out where bash is on your system +whereis bash # locates the binary, source and manual-page for a command which bash # finds out which program is executed as 'bash' (default: /bin/bash, can change across environments) clear # clears content on window (hide displayed lines) From de864ea195efc883675a2e91834d3f9f39659389 Mon Sep 17 00:00:00 2001 From: Alexound Date: Fri, 25 Oct 2019 01:37:20 +0400 Subject: [PATCH 08/11] Updated VIM cheatsheet a bit. Ignore case while searching: on and off command. Run command in multiple buffers with 'bufdo'. --- tools/vim.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/vim.txt b/tools/vim.txt index 5efe85e..5832df3 100644 --- a/tools/vim.txt +++ b/tools/vim.txt @@ -232,6 +232,8 @@ n repeat search in same direction N repeat search in opposite direction * search forward, word under cursor # search backward, word under cursor +set ic ignore case: turn on +set noic ignore case: turn off :%s/old/new/g replace all old with new throughout file :%s/old/new/gc replace all old with new throughout file with confirmation :argdo %s/old/new/gc | wq open multiple files and run this command to replace old @@ -251,6 +253,7 @@ N repeat search in opposite direction :bd delete a buffer (close a file) :b1 show buffer 1 :b vimrc show buffer whose filename begins with "vimrc" +:bufdo run 'command(s)' in all buffers ############################################################################## From c3ad4a15ab9d24ad72534d9eacf940bb8ee71a94 Mon Sep 17 00:00:00 2001 From: Alexound Date: Fri, 25 Oct 2019 01:41:59 +0400 Subject: [PATCH 09/11] Minor additions. --- tools/vim.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/vim.txt b/tools/vim.txt index 5832df3..2a55240 100644 --- a/tools/vim.txt +++ b/tools/vim.txt @@ -254,6 +254,7 @@ set noic ignore case: turn off :b1 show buffer 1 :b vimrc show buffer whose filename begins with "vimrc" :bufdo run 'command(s)' in all buffers +:[range]bufdo run 'command(s)' for buffers in 'range' ############################################################################## From d9ff0ab37984971a83e60d7934dad665ef7d5a5f Mon Sep 17 00:00:00 2001 From: JenniferStamm Date: Fri, 1 Nov 2019 12:41:06 +0100 Subject: [PATCH 10/11] update redis cheatsheet HLEN had the same description as HKEYS. Fixed it to say that it gets the number of fields instead of the fields themselves. --- databases/redis.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/databases/redis.sh b/databases/redis.sh index 5665af4..9fbce26 100644 --- a/databases/redis.sh +++ b/databases/redis.sh @@ -115,7 +115,7 @@ HINCRBY key field increment # increment value in hash by X HDEL key field [field ...] # delete one or more hash fields HEXISTS key field # determine if a hash field exists HKEYS key # get all the fields in a hash -HLEN key # get all the fields in a hash +HLEN key # get the number of fields in a hash HSTRLEN key field # get the length of the value of a hash field HVALS key # get all the values in a hash From b7a5aa284c0cd19d847d9ac7c04a16a6471f7ac9 Mon Sep 17 00:00:00 2001 From: pfeinsondev <58021443+pfeinsondev@users.noreply.github.com> Date: Wed, 20 Nov 2019 21:37:39 -0800 Subject: [PATCH 11/11] Update django.py Ammend runserver with optional port parameter. Useful if 8000 is unavailable. --- backend/django.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/django.py b/backend/django.py index 12a33ee..f9347ea 100644 --- a/backend/django.py +++ b/backend/django.py @@ -61,7 +61,7 @@ django-admin help # display usage information and a list django-admin makemigrations # create new migrations to the database based on the changes detected in the models django-admin migrate # synchronize the database state with your current state project models and migrations django-admin remove_stale_contenttypes # Deletes stale content types (from deleted models) in your database.y. -django-admin runserver # start the development webserver at 127.0.0.1 with the port 8000 +django-admin runserver # start the development webserver at 127.0.0.1 with the port default 8000 django-admin sendtestemail # Sends a test email to the email addresses specified as arguments. django-admin shell # Runs a Python interactive interpreter. Tries to use IPython or bpython, if one of them is available. Any standard input is executed as code. django-admin showmigrations # Shows all available migrations for the current project.