2018.08.31 10:57 swift learning experience

  Actually, I’ve always liked swift. I think Xcode is very advanced. I can operate it by buying a MacBook. That’s good. var str = "Hello, playground" var myVariable = 42 myVariable = 50 let myConstant = 42 let implicitInteger = 70 let implicitDouble = 70.0 let explicitDouble: Double = 70 let label = "The width is " let width = 94 let widthLabel = label + String(width) let apples = 3 let oranges = 5 let appleSummary = "I have \(apples) apples." let fruitSummary = "I have \(apples + oranges) pieces of fruit." swiftCode

Detailed explanation of echo command

Basic command learning directory shellIn the script, echo shows the content with color display, echo display with color, and needs parameter -e. The format is as follows: echo -e "\033[Word background color; text color M string \033[0m " For example: echo -e "\033[41;36m something here \033[0m" 41 of the positions represent the background color, and 36 of the positions represent the colors of the characters. Note: 1、The word background color and text color are in English. 2、There is a m behind the text color. 3、There is no space before and after the string, and if so, the output is ...

What is SG? +SG template

First, define the status Position P first hand must lose N x first win. Operation method: reverse transfer  A pair with the same status and different location is equivalent to none. For ICG games, we can represent every possible situation in the game as a point. And if there is a situation I and a situation J, and j is the successor of the situation I (that is, situation I can be transformed into a situation j), we use a directed edge, starting from I to J, to connect the points representing the situation I and the situation J.Then the whole game can be represented as a directed acyclic grap...

JS seamless rotation

Method manual settingHTML:<!--<div class="box"> <div class="winBox"> <ul class="scroll"> <li><a href="#">Fashion casual pants 68 yuan < /a> < /li>< li> < a href="#">Woolen sweater 38 yuan < /a> < /li>< li> < a href="#">The new snow boots are 88 yuan < /a> < /li>< li> < a href="#">Thickening flannel 108 yuan < /a> < /li>< li> < a href="#">Panty hose 19 yuan, 2 pairs of < /a> < /li>< li> < a href="#">Fashion...

Vue-slot slot

The components you want to provide contain a reusable slot that can get data from the sub components. It is hoped that each independent item will render something different. This is also the application of scope slot. todo-listComponents: <ul> <li v-for="todo in todos" v-bind:key="todo.id" > {{ todo.text }} </li></ul> To make this feature possible, all you need to do is wrap the to-do items in one<slot> Element and then pass all the data related to its context to this slot: In this case, the data istodo Object: <ul> <li v-for="todo in t...

Python basic tutorial [directory]

This blog is a basic knowledge of python, most of which are based on personal opinions from various sources. We welcome to learn together, supplement our knowledge and correct our mistakes. PythonFoundation [directory] PythonFoundation [first]: introduction and installation of Python PythonFoundation [Second]: Python appetizers PythonFoundation [Third articles]: variables and operators PythonFoundation [Fourth articles]: basic data type (numeric type) PythonFoundation [Fifth articles]: basic data type (character type) PythonFoundation [sixth articles]: basic data type (list) PythonFoundation...

Python Foundation

variable Variable type Variables can specify different data types, which can store integers, decimal or characters.         2.Variable assignment Each variable must be assigned before it is used, and the variable will be created after assignment. An equal sign (=) is used to assign variables. The equality sign (=) operator has a variable name on the left, and the equality sign (=) operator has a value stored in the variable on the right. For example: 1 # autor:guangqing xu 2 counter =100 #Assigned integer variables 3 miles = 1000.0 #float 4 name = "guangqing" #Character 5 print(cou...