diff --git a/README.md b/README.md index 17bccb2..ec964ba 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d + diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 99cac24..60c05b6 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -1,4 +1,29 @@ - [](WikiSyllabus/SUMMARY.md) +- [CUSAT](./WikiSyllabus/CUSAT/SUMMARY.md) + - [2023_Scheme](./WikiSyllabus/CUSAT/2023_Scheme/SUMMARY.md) + - [S1 & S2](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/SUMMARY.md) + - [23-200-0106B](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/SUMMARY.md) + - [Introduction to C Programming](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/1intro.md) + - [Variables and Keywords](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/2variables_keywords.md) + - [Datatypes](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/3datatypes.md) + - [Constants](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/4constants.md) + - [Operators](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/5operators.md) + - [Control Statements](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/6control_statements.md) + - [goto statement](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/7goto.md) + - [Switch Statement](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/8switch_statement.md) + - [break Statement](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/9break.md) + - [Continue Statement](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/10continue.md) + - [Loops](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/11loops.md) + - [Functions](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/12functions.md) + - [Calling Functions](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/13function_arguments.md) + - [Library Functions](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/14library_functions.md) + - [Recursion](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/15recursion.md) + - [Storage Classes](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/16storage_classes.md) + - [Array](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/17arrays.md) + - [Pointers](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/18pointer_arithmetic.md) + - [Pointer to Pointer](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/19pointer_to_pointer.md) + - [Strings](./WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/20strings.md) + - [KTU](./WikiSyllabus/KTU/SUMMARY.md) - [2019_Scheme](./WikiSyllabus/KTU/2019_Scheme/SUMMARY.md) - [S1 & S2](./WikiSyllabus/KTU/2019_Scheme/S1-S2/SUMMARY.md) diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/10continue.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/10continue.md new file mode 100644 index 0000000..dfbc95f --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/10continue.md @@ -0,0 +1,24 @@ +# continue Statement + +Continue is also a loop control statement just like the break statement. Continue statement is opposite to that of break _statement_, instead of terminating the loop, it forces to execute the next iteration of the loop. + +As the name suggest the continue statement forces the loop to continue or execute the next iteration. When the continue statement is executed in the loop, the code inside the loop following the continue statement will be skipped and next iteration of the loop will begin. + +![](assets/continue_syntax.png) + +**Example** : + +Consider the situation when you need to write a program which prints number from 1 to 10 and but not 6. It is specified that you have to do this using loop and only one loop is allowed to use. + +Here comes the usage of continue statement. What we can do here is we can run a loop from 1 to 10 and every time we have to compare the value of iterator with 6. If it is equal to 6 we will use the _continue_ statement to continue to next iteration without printing anything otherwise we will print the value. + +Below is the implementation of the above idea: + +![](assets/continue_example.png) + +**Output:** + +![](assets/continue_ex_output.png) + +The _continue_ statement can be used with any other loop also like while or do while in a similar way as it is used with for loop above. + diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/11loops.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/11loops.md new file mode 100644 index 0000000..6f31515 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/11loops.md @@ -0,0 +1,173 @@ +# Loops + +Looping Statements in C execute the sequence of statements many times until the stated condition becomes false. A loop in C consists of two parts, a body of a loop and a control statement. The control statement is a combination of some conditions that direct the body of the loop to execute until the specified condition becomes false. The purpose of the C loop is to repeat the same code a number of times. + +## Types of Loops in C + +Depending upon the position of a control statement in a program, looping statement in C is classified into two types: + +1. Entry controlled loop + +2. Exit controlled loop + +### 1. Entry controlled loop + +In an entry control loop in C, a condition is checked before executing the body of a loop. It is also called as a pre-checking loop. + +In an exit controlled loop, a condition is checked after executing the body of a loop. It is also called as a post-checking loop. + +![](assets/entryloopflow.png) + +'C' programming language provides us with three types of loop constructs: + +1. The while loop + +2. The do-while loop + +3. The for loop + +| **Sr. No.** | **Loop Type** | **Description** | +| --- | --- | --- | +| 1. | While Loop | In while loop, a condition is evaluated before processing a body of the loop. If a condition is true then and only then the body of a loop is executed. | +| --- | --- | --- | +| 2. | Do-While Loop | In a do...while loop, the condition is always executed after the body of a loop. It is also called an exit-controlled loop. | +| 3. | For Loop | In a for loop, the initial value is performed only once, then the condition tests and compares the counter to a fixed value after each iteration, stopping the for loop when false is returned. | + +## While Loop in C + +A while loop is the most straightforward looping structure. While loop syntax in C programming language is as follows: + +Syntax of While Loop in C: + + while (condition) { + + statements; + + } + +It is an entry-controlled loop. In while loop, a condition is evaluated before processing a body of the loop. If a condition is true then and only then the body of a loop is executed. After the body of a loop is executed then control again goes back at the beginning, and the condition is checked if it is true, the same process is executed until the condition becomes false. Once the condition becomes false, the control goes out of the loop. + +After exiting the loop, the control goes to the statements which are immediately after the loop. The body of a loop can contain more than one statement. If it contains only one statement, then the curly braces are not compulsory. It is a good practice though to use the curly braces even we have a single statement in the body. + +Following program illustrates while loop in C programming example: + + #include + #include + int main() + { + int num=1; //initializing the variable + while(num<=10) //while loop with condition + { + printf("%d\n",num); + num++; //incrementing operation + } + return 0; + } +Output: + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + +## **Do-While loop in C** + +A do...while loop in C is similar to the while loop except that the condition is always executed after the body of a loop. It is also called an exit-controlled loop. + +Syntax of do while loop in C programming language is as follows: + +**Syntax of Do-While Loop in C:** + + do { + + statements + + } while (expression); + +As we saw in a while loop, the body is executed if and only if the condition is true. In some cases, we have to execute a body of the loop at least once even if the condition is false. This type of operation can be achieved by using a do-while loop. + +In the do-while loop, the body of a loop is always executed at least once. After the body is executed, then it checks the condition. If the condition is true, then it will again execute the body of a loop otherwise control is transferred out of the loop. + +Similar to the while loop, once the control goes out of the loop the statements which are immediately after the loop is executed. + +The following loop program in C illustrates the working of a do-while loop: + +Below is a do-while loop in C example to print a table of number 2: + + #include + #include + int main() + { + int num=1; //initializing the variable + do //do-while loop + { + printf("%d\n",2*num); + num++; //incrementing operation + }while(num<=10); + return 0; + } +Output: + + 2 + 4 + 6 + 8 + 10 + 12 + 14 + 16 + 18 + 20 + + +## For loop in C + +A for loop is a more efficient loop structure in 'C' programming. The general structure of for loop syntax in C is as follows: + +### Syntax of For Loop in C: + + for (initial value; condition; incrementation or decrementation ) + + { + + statements; + + } + +- The initial value of the for loop is performed only once. +- The condition is a Boolean expression that tests and compares the counter to a fixed value after each iteration, stopping the for loop when false is returned. +- The incrementation/decrementation increases (or decreases) the counter by a set value. + +Following program illustrates the for loop in C programming example: + + #include + int main() + { + int number; + for(number=1;number<=10;number++) //for loop to print 1-10 numbers + { + printf("%d\n",number); //to print the number + } + return 0; + } +Output: + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + + + diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/12functions.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/12functions.md new file mode 100644 index 0000000..cc35913 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/12functions.md @@ -0,0 +1,94 @@ +# Functions + +#### Function is a self-contained block of statements that can be executed repeatedly whenever we need it. + +## **Benefits of using the function in C** + +1. The function provides modularity. +2. The function provides reusable code. +3. In large programs, debugging and editing tasks is easy with the use of functions. +4. The program can be modularized into smaller parts. +5. Separate function independently can be developed according to the needs. + +## **There are two types of functions in C** + +```text +## **Built-in(Library) Functions** + + The system provided these functions and stored in the library. Therefore it is also called Library Functions. + e.g. scanf(), printf(), strcpy, strlwr, strcmp, strlen, strcat etc. + To use these functions, you just need to include the appropriate C header files. + +## **User Defined Functions** + + These functions are defined by the user at the time of writing the program. +``` + +### **Parts of Function** + +#### 1. Function Prototype + +#### 2. Function Definition + +#### 3. Calling a function in C + +### 1. Function Prototype + +**Syntax:** + +dataType functionName \(Parameter List\) + +**Example:** + +```text + int addition(); +``` + +### 2. Function Definition + +**Syntax:** + +```text + returnType functionName(Function arguments){ + //body of the function + } + ####Example: + int addition() + { + + } +``` + +### 3. Calling a function in C + +**Program to illustrate the Addition of Two Numbers using User Defined Function** + +**Example** + +```text + #include + /* function declaration */int addition(); + int main() + { + /* local variable definition */ int answer; + +/* calling a function to get addition value */ answer = addition(); + +printf("The addition of the two numbers is: %d\n",answer); +return 0; + } + + /* function returning the addition of two numbers */int addition() + { + /* local variable definition */ int num1 = 10, num2 = 5; + return num1+num2; + + } +``` + +### Program Output: + +```text + The addition of the two numbers is: 15 +``` + diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/13function_arguments.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/13function_arguments.md new file mode 100644 index 0000000..8f82544 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/13function_arguments.md @@ -0,0 +1,78 @@ +# Function Arguments + +#### While calling a function, the arguments can be passed to a function in two ways, Call by value and c + +```text +Type Description + +Call by Value The actual parameter is passed to a function + New memory area created for the passed parameters, can be used only within the function. + The actual parameters cannot be modified here. + +Call by Reference Instead of copying variable; an address is passed to function as parameters. + Address operator(&) is used in the parameter of the called function. + Changes in function reflect the change of the original variables. +``` + +## Call by Value + +### Example: + +```text + #include + + /* function declaration */int addition(int num1, int num2); + + int main() + { + /* local variable definition */ int answer; + int num1 = 10; + int num2 = 5; + + /* calling a function to get addition value */ answer = addition(num1,num2); + + printf("The addition of two numbers is: %d\n",answer); + return 0; + } + + /* function returning the addition of two numbers */int addition(int a,int b) + { + return a + b; + } +``` + +Program output: + +The addition of two numbers is: 15 + +## Call by Reference + +### Example: + +```text + #include + + /* function declaration */int addition(int *num1, int *num2); + + int main() + { + /* local variable definition */ int answer; + int num1 = 10; + int num2 = 5; + + /* calling a function to get addition value */ answer = addition(&num1,&num2); + + printf("The addition of two numbers is: %d\n",answer); + return 0; + } + + /* function returning the addition of two numbers */int addition(int *a,int *b) + { + return *a + *b; + } +``` + +Program output: + +The addition of two numbers is: 15 + diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/14library_functions.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/14library_functions.md new file mode 100644 index 0000000..89385b7 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/14library_functions.md @@ -0,0 +1,43 @@ +# Library Functions + +### The library functions are provided by the system and stored in the library. The C library function is also called an inbuilt function in C programming. + +To use Inbuilt Function in C, you must include their respective header files, which contain prototypes and data definitions of the function. + +C program to Demonstrate the use of Library functions + +## Example: + +```text + #include + #include + #include + + void main() + { + int i = -10, e = 2, d = 10; /* Variables Defining and Assign values */ float rad = 1.43; + double d1 = 3.0, d2 = 4.0; + + printf("%d\n", abs(i)); + printf("%f\n", sin(rad)); + printf("%f\n", cos(rad)); + printf("%f\n", exp(e)); + printf("%d\n", log(d)); + printf("%f\n", pow(d1, d2)); + } +``` + +Program output: +```text +10 + +0.990105 + +0.140332 + +7.389056 + +-1145744106 + +81.000000 +``` \ No newline at end of file diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/15recursion.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/15recursion.md new file mode 100644 index 0000000..8e49a7c --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/15recursion.md @@ -0,0 +1,79 @@ +# Recursion + +C is a powerful programming language having capabilities like an iteration of a set of statements 'n' number of times. The same concepts can be done using functions also. In this chapter, you will be learning about recursion concept and how it can be used in the C program. + +## What is Recursion + +Recursion can be defined as the technique of replicating or doing again an activity in a self-similar way calling itself again and again, and the process continues till specific condition reaches. In the world of programming, when your program lets you call that specific function from inside that function, then this concept of calling the function from itself can be termed as recursion, and the function in which makes this possible is called recursive function. + +## Here's an example of how recursion works in a program: + +#### Example Syntax: + +```text +void rec_prog(void) { + rec_prog(); /* function calls itself */} + + int main(void) { + rec_prog(); + return 0; + } +``` + +C program allows you to do such calling of function within another function, i.e., recursion. But when you implement this recursion concept, you have to be cautious in defining an exit or terminating condition from this recursive function, or else it will continue to an infinite loop, so make sure that the condition is set within your program. + +### Factorial Program + +#### Example: + +```text +#include +#include + +int fact(int f) { + if (f & lt; = 1) { + printf("Calculated Factorial"); + return 1; + } + return f * fact(f - 1); +} + +int main(void) { + int f = 12; + clrscr(); + printf("The factorial of %d is %d \n", f, fact(f)); + getch(); + return 0; +} +``` + +### Fibonacci Program + +#### Example: + +```text + #include + #include + + int fibo(int g) { + if (g == 0) { + return 0; + } + + if (g == 1) { + return 1; + } + return fibo(g - 1) + fibo(g - 2); + } + + int main(void) { + int g; + clrscr(); + for (g = 0; g & lt; 10; g++) { + printf("\nNumbers are: %d \t ", fibonacci(g)); + } + getch(); + return 0; + } +``` + diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/16storage_classes.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/16storage_classes.md new file mode 100644 index 0000000..0708b62 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/16storage_classes.md @@ -0,0 +1,94 @@ +# Storage Classes + +Storage Classes are associated with variables for describing the features of any variable or function in the C program. These storage classes deal with features such as scope, lifetime and visibility which helps programmers to define a particular variable during the program's runtime. These storage classes are preceded by the data type which they had to modify. + +There are four storage classes types in C: + +```text + auto + register + static + extern +``` + +## Auto Storage Class + +Auto comes by default with all local variables as its storage class. The keyword auto is used to define this storage class explicitly + +### Syntax: + +```text + int roll; // contains auto by default +``` + +is the same as: + +```text + auto int roll; // in addition, we can use auto keyword +``` + +The above example has a variable name roll with auto as a storage class. This storage class can only be implemented with the local variables. + +## Register Storage Class + +This storage class is implemented for classifying local variables whose value needs to be saved in a register in place of RAM \(Random Access Memory\). This is implemented when you want your variable the maximum size equivalent to the size of the register. It uses the keyword register. + +### Syntax: + +```text + register int counter; +``` + +Register variables are used when implementing looping in counter variables to make program execution fast. Register variables work faster than variables stored in RAM \(primary memory\) + +### Example: + +```text + for(register int counter=0; counter<=9; counter++) + { + // loop body + } +``` + +## Static Storage Class + +This storage class uses static variables that are used popularly for writing programs in C language. Static variables preserve the value of a variable even when the scope limit exceeds. Static storage class has its scope local to the function in which it is defined. + +On the other hand, global static variables can be accessed in any part of your program. The default value assigned is '0' by the C compiler. The keyword used to define this storage class is static. + +### Example: + +```text + static int var = 6; +``` + +## Extern Storage Class + +The extern storage class is used to feature a variable to be used from within different blocks of the same program. Mainly, a value is set to that variable which is in a different block or function and can be overwritten or altered from within another block as well. Hence it can be said that an extern variable is a global variable which is assigned with a value that can be accessed and used within the entire program. Moreover, a global variable can be explicitly made an extern variable by implementing the keyword 'extern' preceded the variable name. + +### Example 1 : + +```text + #include + + int val; + extern void funcExtern(); + + main() + { + val = 10; + funcExtern(); + } + + #### Example 2 : + #include + + extern int val; // now the variable val can be accessed and used from anywhere + + // within the program + void funcExtern() + { + printf("Value is: %d\n", val); + } +``` + diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/17arrays.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/17arrays.md new file mode 100644 index 0000000..fc3e7ed --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/17arrays.md @@ -0,0 +1,107 @@ +# Arrays + +An array is an **indexed** collection of data elements of the **same type**. +1. **Indexed** means that the array elements are numbered starting from 0. +2. The restriction of the **same type** is an important one, because arrays are stored in consecutive memory cells. Every cell must be the same data type and therefore, the same size. + +```text +Example: +int age[5] = {13, 26, 57, 76, 45}; +``` +Here the array named 'age' declared with the datatype of integer(int). The array age is given a size of 5 and indexed as, + +| index number (of the array) | 0 | 1 | 2 | 3 | 4 | +| :--- | :--- | :--- | :--- | :--- | :--- | +| array elements of age (name of the array) | 13 | 26 | 57 | 76 | 45 | + +## **Declaration of Arrays** + + +An array declaration is similar to the form of a normal declaration [ dataType variableName], but here we add on a size: +```text + dataType variableName[size]; +``` +This declares an array with the specified size, named variableName, of a particular dataType. +The array is indexed from 0 to size-1. The size in brackets must be an integer literal or a constant variable. The compiler uses the size to determine how much space to allocate. + +Examples: +```text + int list[30]; // an array of 30 integers + char name[20]; // an array of 20 characters + double nums[50]; // an array of 50 decimals + int table[5][10]; // a two dimensional array of integers +``` + +The first three examples are one dimensional array containing a single row and meantioned number of columns. +And the last example illustrates a two dimensional array which we often like to think about as a table with both rows and columns specified. + +We usually think of the first size as rows, and the second as columns, but it really does not matter, as long as you are consistent! +So, we could think of the last declaration as a table with 5 rows and 10 columns + +## **Initializing Arrays** + + +With normal variables, we could declare on one line, then initialize on the next: +```text + int x; + x = 0; +``` +Or, we could simply initialize the variable in the declaration statement itself: +```text + int x = 0; +``` +Can we do the same for arrays? Yes, for the built-in types. Simply list the array values (literals) in set notation { } after the declaration. Here are some examples: +```text + int list[4] = {1, 2, 3, 4}; + char letters[5] = {'a', 'e', 'i', 'o', 'u'}; + double numbers[3] = {3.45, 2.39, 9.1}; + int table[3][2] = {{2, 5} , {3,1} , {4,9}}; +``` + + +Array declarations must contain the information about the size of the array. It is possible to leave the size out of the [....] in the declaration as long as you +initialize the array inline, in which case the array is made just large enough to capture the initialized data. +Examples: +```text + char name[] = "Charlie"; // size is 7 + int list[] = {1, 1, 2, 3, 5}; // size is 5 +``` +Another shortcut with initializer sets is to use fewer elements than the size specifies. Remaining elements will default to 0. +It is illegal to use a set containing more elements than the allocated size. +```text + int list[5] = {1, 2}; // array is {1, 2, 0, 0, 0} + int nums[3] = {1, 2, 3, 4}; // illegal declaration. +``` + +## **Initializing using For-Loop** + + +Using initializers on the declaration, as in the examples above, is probably not going to be as desirable with very large arrays. + +Another common way to initialize an array is with a **for loop**: +This example initializes the array numList to {1, 1, 2, 3, 5, 8, 13, 21, 34, 55}. +```text + int numList[10]; + int i; + for (i = 0; i < 10; i++) + numList[i] = i * 2; +``` + +## **Accessing Array elements from the Array** + +```text + int myArray[5]; + int i; + + // Initializing elements of array individually + for(i=0 ; n < sizeof(myArray) ; i++) + { + myArray[i] = i; + } +``` +Once your arrays are declared, you access the elements in an array with the array name and the index number inside brackets[] + +```text + int a = myArray[3]; // Assigning 3rd element of array value to integer 'a'. +``` +Here myArray is declared as int myArray[5], then the element with index 3 is referred to as myArray[3] diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/18pointer_arithmetic.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/18pointer_arithmetic.md new file mode 100644 index 0000000..e8cc661 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/18pointer_arithmetic.md @@ -0,0 +1,260 @@ +# **Pointer Arithmetic** + +We can perform arithmetic operations on the pointers like addition, subtraction, etc. However, as we know that pointer contains the address, the result of an arithmetic operation performed on the pointer will also be a pointer if the other operand is of type integer. In pointer-from-pointer subtraction, the result will be an integer value. Following arithmetic operations are possible on the pointer in C language: + + 1. Increment + 2. Decrement + 3. Addition + 4. Subtraction + 5. Comparison + +## Incrementing Pointer in C + +If we increment a pointer by 1, the pointer will start pointing to the immediate next location. This is somewhat different from the general arithmetic since the value of the pointer will get increased by the size of the data type to which the pointer is pointing. + +We can traverse an array by using the increment operation on a pointer which will keep pointing to every element of the array, perform some operation on that, and update itself in a loop. + +The Rule to increment the pointer is given below: + +```c +new_address= current_address + i * size_of(data type) +``` + +Where i is the number by which the pointer get increased. + +32-bit +For 32-bit int variable, it will be incremented by 2 bytes. + +64-bit +For 64-bit int variable, it will be incremented by 4 bytes. + +Example: + +```c +#include +int main(){ +int number=50; +int *p;//pointer to int +p=&number;//stores the address of number variable +printf("Address of p variable is %u \n",p); +p=p+1; +printf("After increment: Address of p variable is %u \n",p); // in our case, p will get incremented by 4 bytes. +return 0; +} +``` +Output +```text +Address of p variable is 3214864300 +After increment: Address of p variable is 3214864304 +``` + +## Traversing an array by using pointer +```c +#include +void main () +{ + int arr[5] = {1, 2, 3, 4, 5}; + int *p = arr; + int i; + printf("printing array elements...\n"); + for(i = 0; i< 5; i++) + { + printf("%d ",*(p+i)); + } +} +``` +Output + +```text +printing array elements... +1 2 3 4 5 +``` +## Decrementing Pointer in C + +Like increment, we can decrement a pointer variable. If we decrement a pointer, it will start pointing to the previous location. The formula of decrementing the pointer is given below: + +```c +new_address= current_address - i * size_of(data type) +``` +32-bit +For 32-bit int variable, it will be decremented by 2 bytes. + +64-bit +For 64-bit int variable, it will be decremented by 4 bytes. + +Example: + +```c +#include +void main(){ +int number=50; +int *p;//pointer to int +p=&number;//stores the address of number variable +printf("Address of p variable is %u \n",p); +p=p-1; +printf("After decrement: Address of p variable is %u \n",p); // P will now point to the immidiate previous location. +} +``` +Output + +```text +Address of p variable is 3214864300 +After decrement: Address of p variable is 3214864296 +``` +## C Pointer Addition + +We can add a value to the pointer variable. The formula of adding value to pointer is given below: +```c +new_address= current_address + (number * size_of(data type)) +``` +32-bit +For 32-bit int variable, it will add 2 * number. + +64-bit +For 64-bit int variable, it will add 4 * number. + +Example: +```c +#include +int main(){ +int number=50; +int *p;//pointer to int +p=&number;//stores the address of number variable +printf("Address of p variable is %u \n",p); +p=p+3; //adding 3 to pointer variable +printf("After adding 3: Address of p variable is %u \n",p); +return 0; +} +``` +Output + +```text +Address of p variable is 3214864300 +After adding 3: Address of p variable is 3214864312 +``` +As you can see, the address of p is 3214864300. But after adding 3 with p variable, it is 3214864312. Since we are using 64-bit architecture, it increments 12. But if we were using 32-bit architecture, it was incrementing to 6 only, i.e. As integer value occupies 2-byte memory in 32-bit OS. + +## C Pointer Subtraction + +Like pointer addition, we can subtract a value from the pointer variable. Subtracting any number from a pointer will give an address. The formula of subtracting value from the pointer variable is given below: +```c +new_address= current_address - (number * size_of(data type)) +``` +32-bit +For 32-bit int variable, it will subtract 2 * number. + +64-bit +For 64-bit int variable, it will subtract 4 * number. + +Example: +```c +#include +int main(){ +int number=50; +int *p;//pointer to int +p=&number;//stores the address of number variable +printf("Address of p variable is %u \n",p); +p=p-3; //subtracting 3 from pointer variable +printf("After subtracting 3: Address of p variable is %u \n",p); +return 0; +} +``` + +Output +```text +Address of p variable is 3214864300 +After subtracting 3: Address of p variable is 3214864288 +``` + +You can see after subtracting 3 from the pointer variable, it is 12 (4*3) less than the previous address value. + +However, instead of subtracting a number, we can also subtract an address from another address (pointer). This will result in a number. It will not be a simple arithmetic operation, but it will follow the following rule. + +If two pointers are of the same type, +```c +Address2 - Address1 = (Subtraction of two addresses)/size of data type which pointer points +``` + +Consider the following example to subtract one pointer from an another. + +```c +#include +void main () +{ + int i = 100; + int *p = &i; + int *temp; + temp = p; + p = p + 3; + printf("Pointer Subtraction: %d - %d = %d",p, temp, p-temp); +} +``` +Output +```text +Pointer Subtraction: 1030585080 - 1030585068 = 3 +``` + +## Pointer to function in C + +As we discussed in the previous chapter, a pointer can point to a function in C. However, the declaration of the pointer variable must be the same as the function. Consider the following example to make a pointer pointing to the function. +```c +#include +int addition (); +int main () +{ + int result; + int (*ptr)(); + ptr = &addition; + result = (*ptr)(); + printf("The sum is %d",result); +} +int addition() +{ + int a, b; + printf("Enter two numbers?"); + scanf("%d %d",&a,&b); + return a+b; +} +``` + +Output +```text +Enter two numbers?10 15 +The sum is 25 +``` +## Pointer to Array of functions in C + +To understand the concept of an array of functions, we must understand the array of function. Basically, an array of the function is an array which contains the addresses of functions. In other words, the pointer to an array of functions is a pointer pointing to an array which contains the pointers to the functions. Consider the following example. +```c +#include +int show(); +int showadd(int); +int (*arr[3])(); +int (*(*ptr)[3])(); + +int main () +{ + int result1; + arr[0] = show; + arr[1] = showadd; + ptr = &arr; + result1 = (**ptr)(); + printf("printing the value returned by show : %d",result1); + (*(*ptr+1))(result1); +} +int show() +{ + int a = 65; + return a++; +} +int showadd(int b) +{ + printf("\nAdding 90 to the value returned by show: %d",b+90); +} +``` + +Output +```text +printing the value returned by show : 65 +Adding 90 to the value returned by show: 155 +``` \ No newline at end of file diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/19pointer_to_pointer.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/19pointer_to_pointer.md new file mode 100644 index 0000000..76ebf50 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/19pointer_to_pointer.md @@ -0,0 +1,98 @@ +# **C Pointer to Pointer** + +As we know that, a pointer is used to store the address of a variable in C. Pointer reduces the access time of a variable. However, In C, we can also define a pointer to store the address of another pointer. Such pointer is known as a double pointer (pointer to pointer). The first pointer is used to store the address of a variable whereas the second pointer is used to store the address of the first pointer. Let's understand it by the diagram given below. + +![](assets/pointertopointer1.jpg) + +Syntax: + +```text +int **p; // pointer to a pointer which is pointing to an integer. +``` + +Example: +```c +#include +void main (){ + int a = 10; + int *p; + int **pp; + p = &a; // pointer p is pointing to the address of a + pp = &p; // pointer pp is a double pointer pointing to the address of pointer p + printf("address of a: %x\n",p); // Address of a will be printed + printf("address of p: %x\n",pp); // Address of p will be printed + printf("value stored at p: %d\n",*p); // value stoted at the address contained by p i.e. 10 will be printed + printf("value stored at pp: %d\n",**pp); // value stored at the address contained by the pointer stoyred at pp + } +``` + +Output + +```text +address of a: d26a8734 +address of p: d26a8738 +value stored at p: 10 +value stored at pp: 10 +``` +## C double pointer example + +Example: + +![](assets/cpointertopointerexample.jpg) + +As you can see in the above figure, p2 contains the address of p (fff2), and p contains the address of number variable (fff4). + +```c +#include +int main(){ + int number=50; + int *p;//pointer to int + int **p2;//pointer to pointer + p=&number;//stores the address of number variable + p2=&p; + printf("Address of number variable is %x \n",&number); + printf("Address of p variable is %x \n",p); + printf("Value of *p variable is %d \n",*p); + printf("Address of p2 variable is %x \n",p2); + printf("Value of **p2 variable is %d \n",*p); + return 0; + } +``` +Output +```text +Address of number variable is fff4 +Address of p variable is fff4 +Value of *p variable is 50 +Address of p2 variable is fff2 +Value of **p variable is 50 +``` + +## Q. What will be the output of the following program? + +```c +#include +void main (){ + int a[10] = {100, 206, 300, 409, 509, 601}; //Line 1 + int *p[] = {a, a+1, a+2, a+3, a+4, a+5}; //Line 2 + int **pp = p; //Line 3 + pp++; // Line 4 + printf("%d %d %d\n",pp-p,*pp - a,**pp); // Line 5 + *pp++; // Line 6 + printf("%d %d %d\n",pp-p,*pp - a,**pp); // Line 7 + ++*pp; // Line 8 + printf("%d %d %d\n",pp-p,*pp - a,**pp); // Line 9 + ++**pp; // Line 10 + printf("%d %d %d\n",pp-p,*pp - a,**pp); // Line 11 + } +``` + + ## Explanation: +![](assets/double_pointer_question.png) + +Output +```text +1 1 206 +2 2 300 +2 3 409 +2 3 410 +``` \ No newline at end of file diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/1intro.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/1intro.md new file mode 100644 index 0000000..e298644 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/1intro.md @@ -0,0 +1,70 @@ +# Introduction to C Programming + +**'C'** is a procedural programming language. It was initially developed by Dennis Ritchie in the year 1972. It was mainly developed as a system programming language to write an operating system. The main features of the C language include low-level memory access, a simple set of keywords, and a clean style, these features make C language suitable for system programmings like an operating system or compiler development. Many later languages have borrowed syntax/features directly or indirectly from the C language. Like syntax of Java, PHP, JavaScript, and many other languages are mainly based on the C language. C++ is nearly a superset of C language \(Few programs may compile in C, but not in C++\). + +## **Beginning with C programming:** + +### 1. **Structure of a C Program:** + +After the above discussion, we can formally assess the structure of a C program. By structure, it is meant that any program can be written in this structure only. Writing a C program in any other structure will hence lead to a Compilation Error. The structure of a C program is as follows: + +![](assets/c_structure.png) + +### 2. **Header Files Inclusion:** + +The first and foremost component is the inclusion of the Header files in a C program. A header file is a file with extension .h which contains C function declarations and macro definitions to be shared between several source files. Some of C Header files: 1. stdio.h – Defines core input and output functions 2. stdint.h – Defines exact width integer types. 3. stdlib.h – Defines numeric conversion functions, pseudo-random network generator, memory allocation 4. string.h – Defines string handling functions 5. math.h – Defines common mathematical functions + +### 3. **Main Method Declaration:** + +The next part of a C program is to declare the main\(\) function. The syntax to declare the main function is: **Syntax to Declare the** **main method:** + +```text + int main() + + {} +``` + +### 4. **Variable Declaration:** + +The next part of any C program is the variable declaration. It refers to the variables that are to be used in the function. Please note that in the C program, no variable can be used without being declared. Also in a C program, the variables are to be declared before any operation in the function. **Example:** + +```text + int main() + + { + + int a; +``` + +### 5. **Body:** + +The body of a function in the C program, refers to the operations that are performed in the functions. It can be anything like manipulations, searching, sorting, printing, etc. **Example:** + +```text + int main() + + { + + int a; + + printf('%d";, a); +``` + +### 6. **Return Statement:** + +The last part of any C program is the return statement. The return statement refers to the returning of the values from a function. This return statement and return value depend upon the return type of the function. For example, if the return type is void, then there will be no return statement. In any other case, there will be a return statement and the return value will be of the type of the specified return type. **Example:** + +```text + int main() + + { + + int a; + + printf("%d";, a); + + return 0; + + } +``` + diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/20strings.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/20strings.md new file mode 100644 index 0000000..72a40f5 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/20strings.md @@ -0,0 +1,63 @@ +# Strings + +Strings are actually **one-dimensional array** of characters terminated by a null character '\0'. Thus a null-terminated string contains the characters that comprise the string followed by a null. + +## Declaring a String + +```c +char str_name[size]; +``` +## Methods of Initializing String + +```c +1. char str[] = "Hello World"; + +2. char str[50] = "Hello World"; + +3. char str[] = {'H','e','l','l','o',' ','W','o','r','l','d','\0'}; + +4. char str[12] = {'H','e','l','l','o',' ','W','o','r','l','d','\0'}; +``` + +To hold the null character at the end of the array, the size of the character array containing the string is one more than the number of characters in the word. + +## Input / Output a String + +The C programming language doesn't provide an inbuilt datatype for Strings, but it has an access specifier `%s`. + +### Input a String + +```c +#include + +int main () { + + char greeting[100]; + scanf("%s", greeting); + return 0; +} +``` +> Note that scanf can't be used to input string with spaces or newlines. + +### Output a String + +```c +#include + +int main () { + + char greeting[] = "Hello World"; + printf("%s\n", greeting); + return 0; +} +``` +## String Functions + +| No. | Functions | Used for | +| --- |:-----------------:| :--------- | +| 1 | `strcpy(s1, s2);` | Copies string s2 into string s1. | +| 2 | `strcat(s1, s2);` | Concatenates string s2 onto the end of string s1.| +| 3 | `strlen(s1);` | Returns the length of string s1. | +| 4 | `strcmp(s1, s2);` | Returns 0 if s1 and s2 are the same; less than 0 if s1s2.| +| 5 | `strchr(s1, ch);` | Returns a pointer to the first occurrence of character ch in string s1.| +| 6 | `strstr(s1, s2);` | Returns a pointer to the first occurrence of string s2 in string s1.| \ No newline at end of file diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/2variables_keywords.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/2variables_keywords.md new file mode 100644 index 0000000..ce06ee3 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/2variables_keywords.md @@ -0,0 +1,189 @@ +# Variables and Keywords + +## **Variables and Keywords in C** + +A variable in simple terms is a storage place which has some memory allocated to it. Basically, a variable used to store some form of data. Different types of variables require different amounts of memory, and have some specific set of operations which can be applied on them. + +### 1.Variable Declaration: + +A typical variable declaration is of the form: + +```text + type variable\_name; + + or for multiple variables: + + type variable1\_name, variable2\_name, variable3\_name; +``` + +A variable name can consist of alphabets \(both upper and lower case\), numbers and the underscore '\_' character. However, the name must not start with a number. + +### 2.Difference b/w variable declaration and definition + +Variable declaration refers to the part where a variable is first declared or introduced before its first use. Variable definition is the part where the variable is assigned a memory location and a value. Most of the times, variable declaration and definition are done together. + +See the following C program for better clarification: + +```text + #include + int main() + { + // declaration and definition of variable 'a123' + char a123 = 'a'; + + // This is also both declaration and definition as 'b' is allocated + // memory and assigned some garbage value. + float b; + + // multiple declarations and definitions + int _c, _d45, e; + + // Let us print a variable + printf("%c \n", a123); + + return 0; + } +``` + +**Output:** + +```text + a +``` + +### 3.Rules for defining variables + +A variable can have alphabets, digits, and underscore. + +A variable name can start with the alphabet, and underscore only. It can't start with a digit. + +No whitespace is allowed within the variable name. + +A variable name must not be any reserved word or keyword, e.g. int, goto , etc. + +### 4.Types of Variables in C + +#### **1. Local Variable** + +A variable that is declared and used inside the function or block is called local variable. + +It's scope is limited to function or block. It cannot be used outside the block.Local variables need + +to be initialized before use. + +Example – + +```text + #include + void function() { + int x = 10; // local variable + } + + int main() + { + function(); + } +``` + +In the above code x can be used only in the scope of function\(\) . Using it in main function will give error. + +#### **2. Global Variable** + +A variable that is declared outside the function or block is called a global variable. + +It is declared at the starting of program. It is available to all the functions. + +Example – + +```text + #include + + int x = 20;//global variable + void function1() + { + printf("%d\n" , x); + } + void function2() + { + printf("%d\n" , x); + } + int main() { + + function1(); + function2(); + return 0; + } +``` + +**Output** + +```text + 20 + + 20 +``` + +In the above code both the functions can use global variable x as we already global variables are accessible by all the functions. + +#### **3.Static Variable** + +A variable that retains its value between multiple function calls is known as static variable. + +It is declared with the static keyword. + +Example- + +```text + #include + void function(){ + int x = 20;//local variable + static int y = 30;//static variable + x = x + 10; + y = y + 10; + printf("\n%d,%d",x,y); + } + int main() { + + function(); + function(); + function(); + return 0; + } +``` + +**Output** + +```text + 30,40 + + 30,50 + + 30,60 +``` + +In the above example , local variable will always print same value whenever function will be called whereas static variable will print the incremented value in each function call. + +## Scope + +A scope is a region of the program, and the scope of variables refers to the area of the program where the variables can be accessed after its declaration. + +In C every variable defined in scope. You can define scope as the section or region of a program where a variable has its existence; moreover, that variable cannot be used or accessed beyond that region. + +In C programming, variable declared within a function is different from a variable declared outside of a function. The variable can be declared in three places. These are: + +| Position | Type | +| :--- | :--- | +| Inside a function or a block. | local variables | +| Out of all functions. | Global variables | +| In the function parameters. | Formal parameters | + +## Keywords in C + +Keywords are specific reserved words in C each of which has a specific feature associated with it. Almost all of the words which help us use the functionality of the C language are included in the list of keywords. + +There are a total of 44 keywords in C \(C89 – 32, C99 – 5, C11 – 7\): + +![](https://github.com/AswinS07/C_programming/tree/82e0997762ed854b7866a18af2d94261b81a2838/_includes/keywords.png) + +Most of these keywords have already been discussed in the various sub-sections of the C language, like Data Types, Storage Classes, Control Statements, Functions etc. + diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/3datatypes.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/3datatypes.md new file mode 100644 index 0000000..7c61781 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/3datatypes.md @@ -0,0 +1,209 @@ +# Datatypes + +Data types specify how we enter data into our programs and what type of data we enter. C language has some predefined set of data types to handle various kinds of data that we can use in our program. These datatypes have different storage capacities. + +There are 4 Data types in C: 1. Basic 2. Derived 3. Void 4. Enumeration + +![](assets/datatypes_c.jpg) + +## BASIC DATATYPES + +These are also termed as primary or fundamental data types. All the names mean the same thing. Suppose we have to store student details like name, id, group, avg\_marks, interest\_on\_fees. + +We can use basic data types to store each of these data: + +```c +char name[25]; +int id; +char group; +float marks[5]; +double interest; +``` + +### INT DATATYPE + +Integers are used to store whole numbers. + +| Type | Size\(bytes\) | Range | +| :--- | :--- | :--- | +| int or signed int | 2 | -32,768 to 32767 | +| unsigned int | 2 | 0 to 65535 | +| short int or signed short int | 1 | -128 to 127 | +| unsigned short int | 1 | 0 to 255 | +| long int or signed long int | 4 | -2,147,483,648 to 2,147,483,647 | +| unsigned long int | 4 | 0 to 4,294,967,295 | + +Example: + +```c +int number = 456; +long prime = 12230234029; +``` + +### FLOAT DATATYPE + +Floating types are used to store real numbers. + +| Type | Size\(bytes\) | Range | +| :--- | :--- | :--- | +| float | 4 | 3.4E-38 to 3.4E+38 | + +Example: + +```c + float average = 97.665; + float mark = 67; + printf("average is %f", average); + printf(" mark is %f", mark); +``` + +The result of the mark will be 67.00000. + +### DOUBLE DATATYPE + +Double is 8 bytes, which means you can have more precision than float. This is useful in scientific programs that require precision. Float is just a single-precision data type; double is the double-precision data type. Long Double is treated the same as double by most compilers; however, it was made for quadruple data precision. + +| Type | Size\(bytes\) | Range | +| :--- | :--- | :--- | +| double | 8 | 1.7E-308 to 1.7E+308 | +| long double | 10 | 3.4E-4932 to 1.1E+4932 | + +Example: + +```c +double average = 679999999.454; +float score = 679999999.454; +printf("average is %lf", average); +printf(", score is %f", score); +``` + +The outputs are – the average is 679999999.454000, the score is 680000000.000000 Note the difference in outputs – while double prints the exact value, float value is rounded off to the nearest number. + +### CHAR DATATYPE + +Character types are used to store characters value. + +| Type | Size\(bytes\) | Range | +| :--- | :--- | :--- | +| char or signed char | 1 | -128 to 127 | +| unsigned char | 1 | 0 to 255 | + +Example: + +```c +char group = 'B'; +char name[30] = "Student1"; +printf("group is %c, name is %s", group, name); +``` + +## DERIVED DATATYPES + +Array, pointers, struct, and union are the derived data types in C. + +### ARRAYS + +Same as any other language, Array in C stores multiple values of the same data type. That means we can have an array of integers, chars, floats, doubles, etc + +```c +int numbers[] = ; +double marks[7]; +float interest[5] = ; +``` + +The array needs to be either initialized, or the size needs to be specified during the declaration. + +### POINTERS + +A pointer can store the address of variables of any data types. This allows for dynamic memory allocation in C. The pointer is defined by using a β€˜\*’ operator. + +```c +int *ptr; +``` + +This indicates ptr stores an address and not a value. To get the address of the variable, we use the dereference operator β€˜&.’ The size of a pointer is 2 bytes. Pointers cannot be added, multiplied, or divided. However, we can subtract them. Here is a simple program that illustrates pointer . + +```c +#include +int main(void) { + int *ptr1; + int *ptr2; + int a = 5; + int b = 10; + /* address of a is assigned to ptr1*/ + ptr1 = &a; + /* address of b is assigned to ptr2*/ + ptr2 = &b; + /* display value of a and b using pointer variables */ + printf("%d", *ptr1); //prints 5 + printf("\n%d", *ptr2); //prints 10 + //print address of a and b + printf("\n%d", ptr1); // prints address like -599163656 + printf("\n%d", ptr2); // prints address like -599163652 + // pointer subtraction + int minus = ptr2 - ptr1; + printf("\n%d", minus); // prints the difference (in this case 1) +return 0; +} +``` + +### STRUCTS + +A struct is a composite structure that can contain variables of different data types. Here all the basic data types can be put under one structure. + +```c +typedef struct{ +char name[25]; +int id; +char group; +float marks[5]; +double interest; +}Student; +``` + +Structs are simple to use and combine data in a neat way. + +### UNION + +With a union, you can store different data types in the same memory location. The union can have many members, but only one member can have a value at one time. Union, is thus, a special kind of data type in C. + +The union is defined in the same way as a structure but with the keyword union. + +```c +union Student{ + char name[25]; + int id; + char group; + float marks[5]; + double interest; + }st1, st2; +``` + +## ENUMERATION DATATYPE + +Enumeration data types enhance the readability of the code. If you have integer constants in the code that can be reused or clubbed together, we can use enums to define the constants. + +The most common example of this is the days of the week. + +```c +enum weekdays; +enum weekend; +``` + +Internally, C will store MON as 0, TUE as 1, and so on. We can assign values to the enum as well. + +```c +enum weekdays; +If we print each of the enum values, the output will be – +1, 2, 6, 7, 8 +``` + +## VOID DATATYPE + +The void is just an empty data type used as a return type for functions. The absence of any other data type is void. When you declare a function as void, it doesn’t have to return anything. Example: + +```c +void swapNumbers(int a, int b){ +//multiple lines of code here +} +``` + diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/4constants.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/4constants.md new file mode 100644 index 0000000..db97e22 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/4constants.md @@ -0,0 +1,337 @@ +# Constants +## **Definition** +C Constants is the most fundamental and essential part of the C programming language. Constants in C are the fixed values that are used in a program, and its value remains the same during the entire execution of the program. + +* Constants are also called literals. +* Constants can be any of the data types. +* It is considered best practice to define constants using only upper-case names. + +## Constant definition in C + +#### Syntax: + +```text + const type constant_name; +``` + +#### Example: + +```text + #include + main() + { + const int SIDE = 10; + int area; + area = SIDE*SIDE; + printf("The area of the square with side: %d is: %d sq. units", SIDE, area); + } +``` + +#### Program Output: + +![](assets/c-constants.jpg) + +## Constant Types in C + +Constants are categorized into two basic types, and each of these types has its subtypes/categories. These are: + +### Primary Constants + +1. Numeric Constants + * Integer Constants + * Real Constants +2. Character Constants + * Single Character Constants + * String Constants + * Backslash Character Constants + +## Integer Constant + +It's referring to a sequence of digits. Integers are of three types viz: + +1. Decimal Integer +2. Octal Integer +3. Hexadecimal Integer + + **Example:** + + 15, -265, 0, 99818, +25, 045, 0X6 + +## Real Constant + +The numbers containing fractional parts like 99.25 are called real or floating points constant. + +## Single Character Constant + +It simply contains a single character enclosed within ' and ' \(a pair of single quote\). It is to be noted that the character '8' is not the same as 8. Character constants have a specific set of integer values known as ASCII values \(American Standard Code for Information Interchange\). + +### Example: + +```text +'X', '5', ';' +``` + +## String Constant + +These are a sequence of characters enclosed in double quotes, and they may include letters, digits, special characters, and blank spaces. It is again to be noted that "G" and 'G' are different - because "G" represents a string as it is enclosed within a pair of double quotes whereas 'G' represents a single character. + +### Example: + +```text +"Hello!", "2015", "2+1" +``` + +## Backslash Character Constant + +C supports some character constants having a backslash in front of it. The lists of backslash characters have a specific meaning which is known to the compiler. They are also termed as "Escape Sequence". + +```text + Constants Meaning + + \a beep sound + \b backspace + \f form feed + \n new line + \r carriage return + \t horizontal tab + \v vertical tab + \' single quote + \" double quote + \\ backslash + \0 null +``` + +### Secondary Constants + +* Array +* Pointer +* Structure +* Union +* Enum + + **Array** + + The array is a data structure in C programming, which can store a fixed-size sequential collection of elements of the same data type. For example, if you want to store ten numbers, it is easier to define an array of 10 lengths, instead of defining ten variables. + + In the C programming language, an array can be One-Dimensional, Two-Dimensional, and Multidimensional. + + **Define an array in C** + + **Syntax:** + + type arrayName \[ size \]; + + **Example:** + + ```text + double amount[5]; + ``` + + **Initialize an array in C** + + int age\[5\]={22,25,30,32,35}; + + **Accessing array elements** + + int myArray\[5\]; int n = 0; + + ```text + // Initializing elements of array seperately + ``` + + for\(n=0;n<sizeof\(myArray\)/sizeof\(myArray\[0\]\);n++\) { myArray\[n\] = n; } + + ```text + int a = myArray[3]; // Assigning 3rd element of array value to integer 'a'. + ``` + +## Pointer + +A pointer is a variable in C, and pointers value is the address of a memory location. + +### Pointer definition in C + +#### Syntax: + +```text + type *variable_name; +``` + +#### Example: + +```text + int *width; + char *letter; +``` + +### Benefits of using Pointers + +* Pointers allow passing of arrays and strings to functions more efficiently. +* Pointers make it possible to return more than one value from the function. +* Pointers reduce the length and complexity of a program. +* Pointers increase the processing speed. +* Pointers save the memory. + +## Structure + +The structure is a user-defined data type in C, which is used to store a collection of different kinds of data. + +* The structure is something similar to an array; the only difference is array is used to store the same data types. +* struct keyword is used to declare the structure in C. +* Variables inside the structure are called members of the structure. + +### Defining a structure in C + +#### Syntax: + +```text + struct structureName + { + //member definitions + }; +``` + +#### Example: + +```text + struct Courses + { + char WebSite[50]; + char Subject[50]; + int Price; + }; +``` + +### Accessing structure members + +#### Example: + +```text + #include + #include + + struct Courses + { + char WebSite[50]; + char Subject[50]; + int Price; + }; + + void main( ) + { + struct Courses C; + + //Initialization + strcpy( C.WebSite, "w3schools.in"); + strcpy( C.Subject, "The C Programming Language"); + C.Price = 0; + + //Print + printf( "WebSite : %s\n", C.WebSite); + printf( "Book Author : %s\n", C.Subject); + printf( "Book Price : %d\n", C.Price); + } +``` + +#### Output: + +```text + WebSite : w3schools.in + + Book Author: The C Programming Language + + Book Price : 0 +``` + +## Unions + +Unions are user-defined data type in C, which is used to store a collection of different kinds of data, just like a structure. However, with unions, you can only store information in one field at any one time. + +* Unions are like structures except it used less memory. +* The keyword union is used to declare the structure in C. +* Variables inside the union are called members of the union. + + **Defining a union** + + **Syntax:** + + ```text + union unionName + { + //member definitions + }; + ``` + + **Example:** + + ```text + union Courses + { + char WebSite[50]; + char Subject[50]; + int Price; + }; + ``` + +### Accessing union members + +#### Example: + +```text + #include + #include + + union Courses + { + char WebSite[50]; + char Subject[50]; + int Price; + }; + + void main( ) + { + union Courses C; + + strcpy( C.WebSite, "w3schools.in"); + printf( "WebSite : %s\n", C.WebSite); + + strcpy( C.Subject, "The C Programming Language"); + printf( "Book Author : %s\n", C.Subject); + + C.Price = 0; + printf( "Book Price : %d\n", C.Price); + } +``` + +#### Output: + +```text + WebSite : w3schools.in + + Book Author: The C Programming Language + + Book Price : 0 +``` + +## Enums + +In C programming, an enumeration type \(also called enum\) is a data type that consists of integral constants. To define enums, the enum keyword is used. + +#### Syntax: + +```text + enum flag {const1, const2, ..., constN}; +``` + +By default, const1 is 0, const2 is 1 and so on. You can change default values of enum elements during declaration \(if necessary\). + +```text + // Changing default values of enum constants + enum suit { + club = 0, + diamonds = 10, + hearts = 20, + spades = 3, + }; +``` + diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/5operators.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/5operators.md new file mode 100644 index 0000000..a80da76 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/5operators.md @@ -0,0 +1,90 @@ +# Operators + +C language supports a rich set of built-in operators. An operator is a symbol that tells the compiler to perform a certain mathematical or logical manipulation. Operators are used in programs to manipulate data and variables. + +C operators can be classified into following types: 1. Arithmetic operators 2. Relational operators 3. Logical operators 4. Bitwise operators 5. Assignment operators 6. Conditional operators 7. Special operators + +## ARITHMETIC OPERATORS + +C supports all the basic arithmetic operators. The following table shows all the basic arithmetic operators + +| Operator | Description | +| :--- | :--- | +| + | adds two operands | +| - | subtract second operands from first | +| \* | multiply two operand | +| / | divide numerator by denominator | +| % | remainder of division | +| ++ | Increment operator - increases integer value by one | +| -- | Decrement operator - decreases integer value by one | + +## RELATIONAL OPERATORS + +The following table shows all relation operators supported by C. + +| Operator | Description | +| :--- | :--- | +| == | Check if two operand are equal | +| != | Check if two operand are not equal. | +| > | Check if operand on the left is greater than operand on the right | +| < | Check operand on the left is smaller than right operand | +| >= | check left operand is greater than or equal to right operand | +| <= | Check if operand on left is smaller than or equal to right operand | + +## LOGICAL OPERATORS + +C language supports following 3 logical operators. Suppose a = 1 and b = 0, + +| Operator | Description | +| :--- | :--- | +| && | Logical AND | +| | Logical OR | +| ! | Logical NOT | + +## BITWISE OPERATORS + +Bitwise operators perform manipulations of data at bit level. These operators also perform shifting of bits from right to left. Bitwise operators are not applied to float or double. + +| Operator | Description | +| :--- | :--- | +| & | Bitwise AND | +| | Bitwise OR | +| ^ | Bitwise exclusive OR | +| << | left shift | +| >> | right shift | + +## ASSIGNMENT OPERATORS + +Assignment operators supported by C language are as follows. + +| Operator | Description | Example | +| :--- | :--- | :--- | +| = | assigns values from right side operands to left side operand | a=b | +| += | adds right operand to the left operand and assign the result to left | a+=b is same as a=a+b | +| -= | subtracts right operand from the left operand and assign the result to left operand | a-=b is same as a=a-b | +| \*= | mutiply left operand with the right operand and assign the result to left operand | a_=b is same as a=a_b | +| /= | divides left operand with the right operand and assign the result to left operand | a/=b is same as a=a/b | +| %= | calculate modulus using two operands and assign the result to left operand | a%=b is same as a=a%b | + +## CONDITIONAL OPERATORS + +Conditional operators in C language are known by two more names 1. Ternary Operator 2. ? : Operator + +It is actually the if condition that we use in C language decision making, but using conditional operator, we turn the if condition statement into a short and simple operator. + +The syntax of a conditional operator is : + +```c +expression 1 ? expression 2: expression 3 +``` + +Explanation: 1. The question mark "?" in the syntax represents the if part. 2. The first expression \(expression 1\) generally returns either true or false, based on which it is decided whether \(expression 2\) will be executed or \(expression 3\) 3. If \(expression 1\) returns true then the expression on the left side of " : " i.e \(expression 2\) is executed. 4. If \(expression 1\) returns false then the expression on the right side of " : " i.e \(expression 3\) is executed. + +## SPECIAL OPERATORS + +| Operator | Description | Example | +| :--- | :--- | :--- | +| sizeof | Returns the size of an variable | sizeof\(x\) return size of the variable x | +| & | Returns the address of an variable | &x ; return address of the variable x | +| \* | Pointer to a variable | \*x ; will be pointer to a variable x | + diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/6control_statements.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/6control_statements.md new file mode 100644 index 0000000..82d1023 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/6control_statements.md @@ -0,0 +1,94 @@ +# Control Statements + +If statements in C are used to control the program flow based on some condition, it is used to execute some statement code block if the expression is evaluated to true. Otherwise, it will get skipped. This is the simplest way to modify the control flow of the program + +The if statement in C can be used in various forms depending on the situation and complexity. + +There are four different types of if statement in C. These are: + +* Simple if Statement +* if-else Statement +* Nested if-else Statement +* else-if Ladder + +## Simple if Statement + +The basic format of if statement is: + +```text +if(test_expression) +{ + statement 1; + statement 2; + ... +} +``` + +'Statement n' can be a statement or a set of statements, and if the test expression is evaluated to true, the statement block will get executed, or it will get skipped. + +Flowchart + +![](https://github.com/AswinS07/C_programming/tree/82e0997762ed854b7866a18af2d94261b81a2838/_includes/c-if.png) + +## if-else Statement + +If else statements in C are also used to control the program flow based on some condition, only the difference is: it is used to execute some statement code block if the expression is evaluated to true, otherwise executes else statement code block. + +The basic format of if else statement is: + +```text +if(test_expression) +{ + //execute your code +} +else +{ + //execute your code +} +``` + +Flowchart + +![](https://github.com/AswinS07/C_programming/tree/82e0997762ed854b7866a18af2d94261b81a2838/_includes/c-if-else.png) + +## Nested if-else Statement + +Nested if-else statements play an important role in C programming, it means you can use conditional statements inside another conditional statement. + +The basic format of Nested if-else statement is: + +```text +if(test_expression one) +{ + if(test_expression two) { + + //Statement block Executes when the boolean test expression two is true. + } +} +else +{ + //else statement block +} +``` + +## else-if Ladder + +else-if statements in C is like another if condition, it's used in a program when if statement having multiple decisions. + +The basic format of else-if statement is: + +```text +if(test_expression) +{ + //execute your code +} +else if(test_expression n) +{ + //execute your code +} +else +{ + //execute your code +} +``` + diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/7goto.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/7goto.md new file mode 100644 index 0000000..05bbef8 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/7goto.md @@ -0,0 +1,37 @@ +# goto statement + +The goto statement is a jump statement which is sometimes also referred to as unconditional jump statement. The goto statement can be used to jump from anywhere to anywhere within a function. + +**Syntax** : + +![](assets/goto_syntax.png) + +In the above syntax, the first line tells the compiler to go to or jump to the statement marked as a label. Here label is a user-defined identifier which indicates the target statement. The statement immediately followed after 'label:' is the destination statement. The 'label:' can also appear before the 'goto label;' statement in the above syntax. + +![](assets/flowchart_goto_statement.png) + +Below are some examples on how to use goto statement: + +**Examples:** + + +- ### **Type 1** : +In this case, we will see a situation similar to as shown in Syntax1 above. Suppose we need to write a program where we need to check if a number is even or not and print accordingly using the goto statement. Below program explains how to do this: + +![](assets/goto_example1.png) +**Output:** +![](assets/goto_out1.png) + + - ### **Type 2:** : +In this case, we will see a situation similar to as shown in Syntax1 above. Suppose we need to write a program which prints numbers from 1 to 10 using the goto statement. Below program explains how to do this. + +![](assets/goto_example2.png) + +**Output:** +[](assets/goto_out2.png) + +## **Disadvantages of using goto statement:** + +- The use of goto statement is highly discouraged as it makes the program logic very complex. +- use of goto makes the task of analyzing and verifying the correctness of programs (particularly those involving loops) very difficult. +- Use of goto can be simply avoided using break and continue statements. diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/8switch_statement.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/8switch_statement.md new file mode 100644 index 0000000..d1acff6 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/8switch_statement.md @@ -0,0 +1,80 @@ +# switch Statement + +##### A switch Statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each switch case. + +### Syntax +The syntax for a switch statement in C programming language is as follows βˆ’ + +```c + +switch(expression) + { + case constant-expression : + statement(s); + break; /* optional */ + + case constant-expression : + statement(s); + break; /* optional */ + + /* you can have any number of case statements */ + default : /* Optional */ + statement(s); + } +``` + +The following rules apply to a **switch** statement βˆ’ + +* The expression used in a switch statement must have an integral or enumerated type, or be of a class type in which the class has a single conversion function to an integral or enumerated type. + +* You can have any number of case statements within a switch. Each case is followed by the value to be compared to and a colon. + +* The constant-expression for a case must be the same data type as the variable in the switch, and it must be a constant or a literal. + +* When the variable being switched on is equal to a case, the statements following that case will execute until a break statement is reached. + +* When a break statement is reached, the switch terminates, and the flow of control jumps to the next line following the switch statement. + +* Not every case needs to contain a break. If no break appears, the flow of control will fall through to subsequent cases until a break is reached. + +* A switch statement can have an optional default case, which must appear at the end of the switch. The default case can be used for performing a task when none of the cases is true. No break is needed in the default case. + +## Example + +```c +#include + int main () + { + /* local variable definition */ + char grade = 'B'; + + switch(grade) { + case 'A' : + printf("Excellent!\n" ); + break; + case 'B' : + case 'C' : + printf("Well done\n" ); + break; + case 'D' : + printf("You passed\n" ); + break; + case 'F' : + printf("Better try again\n" ); + break; + default : + printf("Invalid grade\n" ); + } + + printf("Your grade is %c\n", grade ); + + return 0; + } +``` + +#### When the above code is compiled and executed, it produces the following result βˆ’ + +```text +Well done +Your grade is B +``` \ No newline at end of file diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/9break.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/9break.md new file mode 100644 index 0000000..2eceda3 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/9break.md @@ -0,0 +1,47 @@ +# break Statement + +The break in C or C++ is a loop control statement which is used to terminate the loop. As soon as the break statement is encountered from within a loop, the loop iterations stops there and control returns from the loop immediately to the first statement after the loop. + +**Syntax:** + +![](Breaksyntax.png) + +Basically break statements are used in the situations when we are not sure about the actual number of iterations for the loop or we want to terminate the loop based on some condition. + +![](Breakflowchart.png) + +**We will see here the usage of break statement with three different types of loops:** + +1. Simple loops +2. Nested loops +3. Infinite loops + +Let us now look at the examples for each of the above three types of loops using break statement. + +## 1. **Simple loops** : +Consider the situation where we want to search an element in an array. To do this, use a loop to traverse the array starting from the first index and compare the array elements with the given key. + + Below is the implementation of this idea: + +![](breaksimpleloops.png) + +**Output:** +![](Breaksimpleloopsoutput.png) + +The above code runs fine with no errors. But the above code is not efficient. The above code completes all the iterations even after the element is found. Suppose there are **1000** elements in the array and the key to be searched is present at 1st position so the above approach will execute **999** iterations which are of no purpose and are useless. To avoid these useless iterations, we can use the break statement in our program. Once the break statement is encountered the control from the loop will return immediately after the condition gets satisfied. So will use the break statement with the if condition which compares the key with array elements as shown below: + +![](breaksimpleloops2.png) +**Output:** + +![](breaksimpleloops2output.png) + +## 2. **Nested Loops** : + We can also use break statement while working with nested loops. If the break statement is used in the innermost loop. The control will come out only from the innermost loop. Below is the example of using break with nested loops: + +![](Breaknestedloops.png) +**Output:** + +![](Breaknestedloopsoutput.png) + +In the above code we can clearly see that the inner loop is programmed to execute for 10 iterations. But as soon as the value of **j** becomes greater than 3 the inner loop stops executing which restricts the number of iteration of the inner loop to 3 iterations only. However the iteration of outer loop remains unaffected. **Therefore, break applies to only the loop within which it is present.** + diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/SUMMARY.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/SUMMARY.md new file mode 100644 index 0000000..dcfbf74 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/SUMMARY.md @@ -0,0 +1,24 @@ +# 23-200-0106B COMPUTER PROGRAMMING + +#### INDEX + +- [Introduction to C Programming](./1intro.md) +- [Variables and Keywords](./2variables_keywords.md) +- [Datatypes](./3datatypes.md) +- [Constants](./4constants.md) +- [Operators](./5operators.md) +- [Control Statements](./6control_statements.md) +- [goto statement](./7goto.md) +- [Switch Statement](./8switch_statement.md) +- [break Statement](./9break.md) +- [Continue Statement](./10continue.md) +- [Loops](./11loops.md) +- [Functions](./12functions.md) +- [Calling Functions](./13function_arguments.md) +- [Library Functions](./14library_functions.md) +- [Recursion](./15recursion.md) +- [Storage Classes](./16storage_classes.md) +- [Array](./17arrays.md) +- [Pointers](./18pointer_arithmetic.md) +- [Pointer to Pointer](./19pointer_to_pointer.md) +- [Strings](./20strings.md) \ No newline at end of file diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/Breakflowchart.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/Breakflowchart.png new file mode 100644 index 0000000..8e0e658 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/Breakflowchart.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/Breaknestedloops.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/Breaknestedloops.png new file mode 100644 index 0000000..8b772e2 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/Breaknestedloops.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/Breaknestedloopsoutput.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/Breaknestedloopsoutput.png new file mode 100644 index 0000000..0759c63 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/Breaknestedloopsoutput.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/Breaksimpleloopsoutput.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/Breaksimpleloopsoutput.png new file mode 100644 index 0000000..59e6131 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/Breaksimpleloopsoutput.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/Breaksyntax.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/Breaksyntax.png new file mode 100644 index 0000000..6b5abfa Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/Breaksyntax.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/breaksimpleloops.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/breaksimpleloops.png new file mode 100644 index 0000000..4457b3e Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/breaksimpleloops.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/breaksimpleloops2.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/breaksimpleloops2.png new file mode 100644 index 0000000..6fd1bca Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/breaksimpleloops2.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/breaksimpleloops2output.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/breaksimpleloops2output.png new file mode 100644 index 0000000..39c92f2 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/breaksimpleloops2output.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/c-constants.jpg b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/c-constants.jpg new file mode 100644 index 0000000..6e1c03c Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/c-constants.jpg differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/c-if-else.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/c-if-else.png new file mode 100644 index 0000000..8b60efe Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/c-if-else.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/c-if.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/c-if.png new file mode 100644 index 0000000..cde9db1 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/c-if.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/c_structure.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/c_structure.png new file mode 100644 index 0000000..532d13d Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/c_structure.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/continue_ex_output.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/continue_ex_output.png new file mode 100644 index 0000000..c102f9a Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/continue_ex_output.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/continue_example.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/continue_example.png new file mode 100644 index 0000000..9d8cb37 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/continue_example.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/continue_syntax.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/continue_syntax.png new file mode 100644 index 0000000..c6b5f12 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/continue_syntax.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/cpointertopointerexample.jpg b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/cpointertopointerexample.jpg new file mode 100644 index 0000000..743a882 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/cpointertopointerexample.jpg differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/cpointertopointerexample.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/cpointertopointerexample.png new file mode 100644 index 0000000..41576f9 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/cpointertopointerexample.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/datatypes_c.jpg b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/datatypes_c.jpg new file mode 100644 index 0000000..d648d0c Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/datatypes_c.jpg differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/datatypes_c.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/datatypes_c.png new file mode 100644 index 0000000..b1b7c62 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/datatypes_c.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/double_pointer_question.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/double_pointer_question.png new file mode 100644 index 0000000..64f50d1 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/double_pointer_question.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/entryloopflow.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/entryloopflow.png new file mode 100644 index 0000000..a852492 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/entryloopflow.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/flowchart_goto_statement.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/flowchart_goto_statement.png new file mode 100644 index 0000000..e82bdac Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/flowchart_goto_statement.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/goto_example1.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/goto_example1.png new file mode 100644 index 0000000..a51c58d Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/goto_example1.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/goto_example2.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/goto_example2.png new file mode 100644 index 0000000..19a05d8 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/goto_example2.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/goto_out1.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/goto_out1.png new file mode 100644 index 0000000..93545d4 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/goto_out1.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/goto_out2.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/goto_out2.png new file mode 100644 index 0000000..a789406 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/goto_out2.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/goto_syntax.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/goto_syntax.png new file mode 100644 index 0000000..d83a58d Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/goto_syntax.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/keywords.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/keywords.png new file mode 100644 index 0000000..b076353 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/keywords.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/pointertopointer1.jpg b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/pointertopointer1.jpg new file mode 100644 index 0000000..013e816 Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/pointertopointer1.jpg differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/pointertopointer1.png b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/pointertopointer1.png new file mode 100644 index 0000000..bf6d91f Binary files /dev/null and b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/23-200-0106B/assets/pointertopointer1.png differ diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/SUMMARY.md b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/SUMMARY.md new file mode 100644 index 0000000..1be660c --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/S1-S2/SUMMARY.md @@ -0,0 +1,5 @@ +# S1 & S2 +### ALL BRANCHES +#### CONTEXT + +- [23-200-0106B - Computer Programming](./23-200-0106B/SUMMARY.md) diff --git a/src/WikiSyllabus/CUSAT/2023_Scheme/SUMMARY.md b/src/WikiSyllabus/CUSAT/2023_Scheme/SUMMARY.md new file mode 100644 index 0000000..d2841b7 --- /dev/null +++ b/src/WikiSyllabus/CUSAT/2023_Scheme/SUMMARY.md @@ -0,0 +1,5 @@ +# 2023 SCHEME + +#### CONTEXT + +- [S1 & S2](./S1-S2/SUMMARY.md) \ No newline at end of file diff --git a/src/WikiSyllabus/CUSAT/SUMMARY.md b/src/WikiSyllabus/CUSAT/SUMMARY.md new file mode 100644 index 0000000..2277dcf --- /dev/null +++ b/src/WikiSyllabus/CUSAT/SUMMARY.md @@ -0,0 +1,5 @@ +# CUSAT + +#### CONTEXT + +- [2023 Scheme](./2023_Scheme/SUMMARY.md) \ No newline at end of file diff --git a/src/WikiSyllabus/SUMMARY.md b/src/WikiSyllabus/SUMMARY.md index 62dee50..852b474 100644 --- a/src/WikiSyllabus/SUMMARY.md +++ b/src/WikiSyllabus/SUMMARY.md @@ -2,4 +2,5 @@ #### CONTEXT +- [CUSAT](./WikiSyllabus/CUSAT/SUMMARY.md) - [KTU](./WikiSyllabus/KTU/SUMMARY.md) \ No newline at end of file diff --git a/src/src/SUMMARY.md b/src/src/SUMMARY.md new file mode 100644 index 0000000..7390c82 --- /dev/null +++ b/src/src/SUMMARY.md @@ -0,0 +1,3 @@ +# Summary + +- [Chapter 1](./chapter_1.md) diff --git a/src/src/chapter_1.md b/src/src/chapter_1.md new file mode 100644 index 0000000..b743fda --- /dev/null +++ b/src/src/chapter_1.md @@ -0,0 +1 @@ +# Chapter 1 diff --git a/src/theme/book.css b/src/theme/book.css new file mode 100644 index 0000000..f0967be --- /dev/null +++ b/src/theme/book.css @@ -0,0 +1,1002 @@ +html, +body { + font-family: "Open Sans", sans-serif; + color: #333; +} +body { + margin: 0; + font-size: 1rem; +} +code { + font-family: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace; + font-size: 0.875em; +} +.left { + float: left; +} +.right { + float: right; +} +.hidden { + display: none; +} +.play-button.hidden { + display: none; +} +h2, +h3 { + margin-top: 2.5em; +} +h4, +h5 { + margin-top: 2em; +} +.header + .header h3, +.header + .header h4, +.header + .header h5 { + margin-top: 1em; +} +table { + margin: 0 auto; + border-collapse: collapse; +} +table td { + padding: 3px 20px; + border: 1px solid; +} +table thead td { + font-weight: 700; +} +.sidebar { + position: fixed; + left: 0; + top: 0; + bottom: 0; + width: 300px; + overflow-y: auto; + padding: 10px 10px; + font-size: 0.875em; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-overflow-scrolling: touch; + -webkit-transition: left 0.5s; + -moz-transition: left 0.5s; + -o-transition: left 0.5s; + -ms-transition: left 0.5s; + transition: left 0.5s; +} +@media only screen and (max-width: 1060px) { + .sidebar { + left: -300px; + } +} +.sidebar code { + line-height: 2em; +} +.sidebar-hidden .sidebar { + left: -300px; +} +.sidebar-visible .sidebar { + left: 0; +} +.chapter { + list-style: none outside none; + padding-left: 0; + line-height: 2.2em; +} +.chapter li a { + padding: 5px 0; + text-decoration: none; +} +.chapter li a:hover { + text-decoration: none; +} +.chapter .spacer { + width: 100%; + height: 3px; + margin: 10px 0px; +} +.section { + list-style: none outside none; + padding-left: 20px; + line-height: 1.9em; +} +.section li { + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +} +.page-wrapper { + padding-left: 300px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + min-height: 100%; + -webkit-transition: padding-left 0.5s; + -moz-transition: padding-left 0.5s; + -o-transition: padding-left 0.5s; + -ms-transition: padding-left 0.5s; + transition: padding-left 0.5s; +} +@media only screen and (max-width: 1060px) { + .page-wrapper { + padding-left: 0; + } +} +.sidebar-hidden .page-wrapper { + padding-left: 0; +} +.sidebar-visible .page-wrapper { + padding-left: 300px; +} +.page { + outline: 0; + padding: 0 15px; +} +.content { + margin-left: auto; + margin-right: auto; + max-width: 750px; + padding-bottom: 50px; +} +.content a { + text-decoration: none; +} +.content a:hover { + text-decoration: underline; +} +.content img { + max-width: 100%; +} +.menu-bar { + position: relative; + height: 50px; +} +.menu-bar i { + position: relative; + margin: 0 10px; + z-index: 10; + line-height: 50px; + -webkit-transition: color 0.5s; + -moz-transition: color 0.5s; + -o-transition: color 0.5s; + -ms-transition: color 0.5s; + transition: color 0.5s; +} +.menu-bar i:hover { + cursor: pointer; +} +.menu-bar .left-buttons { + float: left; +} +.menu-bar .right-buttons { + float: right; +} +.menu-title { + display: inline-block; + font-weight: 200; + font-size: 20px; + line-height: 50px; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + text-align: center; + margin: 0; + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + -webkit-transition: opacity 0.5s ease-in-out; + -moz-transition: opacity 0.5s ease-in-out; + -o-transition: opacity 0.5s ease-in-out; + -ms-transition: opacity 0.5s ease-in-out; + transition: opacity 0.5s ease-in-out; +} +.menu-bar:hover .menu-title { + opacity: 1; + -ms-filter: none; + filter: none; +} +.nav-chapters { + font-size: 2.5em; + text-align: center; + text-decoration: none; + position: fixed; + top: 50px /* Height of menu-bar */; + bottom: 0; + margin: 0; + max-width: 150px; + min-width: 90px; + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: box; + display: flex; + -webkit-box-pack: center; + -moz-box-pack: center; + -o-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -ms-flex-line-pack: center; + -webkit-align-content: center; + align-content: center; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -o-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-transition: color 0.5s; + -moz-transition: color 0.5s; + -o-transition: color 0.5s; + -ms-transition: color 0.5s; + transition: color 0.5s; +} +.mobile-nav-chapters { + display: none; +} +.nav-chapters:hover { + text-decoration: none; +} +.previous { + left: 315px; + -webkit-transition: left 0.5s; + -moz-transition: left 0.5s; + -o-transition: left 0.5s; + -ms-transition: left 0.5s; + transition: left 0.5s; +} +@media only screen and (max-width: 1060px) { + .previous { + left: 15px; + } +} +.next { + right: 15px; +} +.sidebar-hidden .previous { + left: 15px; +} +.sidebar-visible .previous { + left: 315px; +} +.theme-popup { + position: absolute; + left: 10px; + z-index: 1000; + border-radius: 4px; + font-size: 0.7em; +} +.theme-popup .theme { + margin: 0; + padding: 2px 10px; + line-height: 25px; + white-space: nowrap; + cursor: pointer; +} +.theme-popup .theme:hover:first-child, +.theme-popup .theme:hover:last-child { + border-top-left-radius: inherit; + border-top-right-radius: inherit; +} +@media only screen and (max-width: 1250px) { + .nav-chapters { + display: none; + } + .mobile-nav-chapters { + font-size: 2.5em; + text-align: center; + text-decoration: none; + max-width: 150px; + min-width: 90px; + -webkit-box-pack: center; + -moz-box-pack: center; + -o-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -ms-flex-line-pack: center; + -webkit-align-content: center; + align-content: center; + position: relative; + display: inline-block; + margin-bottom: 50px; + border-radius: 5px; + } + .next { + float: right; + } + .previous { + float: left; + } +} +.light { + color: #333; + background-color: #fff; +/* Inline code */ +} +.light .content .header:link, +.light .content .header:visited { + color: #333; + pointer: cursor; +} +.light .content .header:link:hover, +.light .content .header:visited:hover { + text-decoration: none; +} +.light .sidebar { + background-color: #fafafa; + color: #364149; +} +.light .chapter li { + color: #aaa; +} +.light .chapter li a { + color: #364149; +} +.light .chapter li .active, +.light .chapter li a:hover { +/* Animate color change */ + color: #008cff; +} +.light .chapter .spacer { + background-color: #f4f4f4; +} +.light .menu-bar, +.light .menu-bar:visited, +.light .nav-chapters, +.light .nav-chapters:visited, +.light .mobile-nav-chapters, +.light .mobile-nav-chapters:visited, +.light .menu-bar a i { + color: #ccc; +} +.light .menu-bar i:hover, +.light .nav-chapters:hover, +.light .mobile-nav-chapters i:hover { + color: #333; +} +.light .mobile-nav-chapters i:hover { + color: #364149; +} +.light .mobile-nav-chapters { + background-color: #fafafa; +} +.light .content a:link, +.light a:visited, +.light a > .hljs { + color: #4183c4; +} +.light .theme-popup { + color: #333; + background: #fafafa; + border: 1px solid #ccc; +} +.light .theme-popup .theme:hover { + background-color: #e6e6e6; +} +.light .theme-popup .default { + color: #ccc; +} +.light blockquote { + margin: 20px 0; + padding: 0 20px; + color: #333; + background-color: #f2f7f9; + border-top: 0.1em solid #e1edf1; + border-bottom: 0.1em solid #e1edf1; +} +.light table td { + border-color: #f2f2f2; +} +.light table tbody tr:nth-child(2n) { + background: #f7f7f7; +} +.light table thead { + background: #ccc; +} +.light table thead td { + border: none; +} +.light table thead tr { + border: 1px #ccc solid; +} +.light :not(pre) > .hljs { + display: inline-block; + vertical-align: middle; + padding: 0.1em 0.3em; + border-radius: 3px; + color: #6e6b5e; +} +.light a:hover > .hljs { + text-decoration: underline; +} +.light pre { + position: relative; +} +.light pre > .buttons { + position: absolute; + z-index: 100; + right: 5px; + top: 5px; + color: #364149; + cursor: pointer; +} +.light pre > .buttons :hover { + color: #008cff; +} +.light pre > .buttons i { + margin-left: 8px; +} +.light pre > .result { + margin-top: 10px; +} +.coal { + color: #98a3ad; + background-color: #141617; +/* Inline code */ +} +.coal .content .header:link, +.coal .content .header:visited { + color: #98a3ad; + pointer: cursor; +} +.coal .content .header:link:hover, +.coal .content .header:visited:hover { + text-decoration: none; +} +.coal .sidebar { + background-color: #292c2f; + color: #a1adb8; +} +.coal .chapter li { + color: #505254; +} +.coal .chapter li a { + color: #a1adb8; +} +.coal .chapter li .active, +.coal .chapter li a:hover { +/* Animate color change */ + color: #3473ad; +} +.coal .chapter .spacer { + background-color: #393939; +} +.coal .menu-bar, +.coal .menu-bar:visited, +.coal .nav-chapters, +.coal .nav-chapters:visited, +.coal .mobile-nav-chapters, +.coal .mobile-nav-chapters:visited, +.coal .menu-bar a i { + color: #43484d; +} +.coal .menu-bar i:hover, +.coal .nav-chapters:hover, +.coal .mobile-nav-chapters i:hover { + color: #b3c0cc; +} +.coal .mobile-nav-chapters i:hover { + color: #a1adb8; +} +.coal .mobile-nav-chapters { + background-color: #292c2f; +} +.coal .content a:link, +.coal a:visited, +.coal a > .hljs { + color: #2b79a2; +} +.coal .theme-popup { + color: #98a3ad; + background: #141617; + border: 1px solid #43484d; +} +.coal .theme-popup .theme:hover { + background-color: #1f2124; +} +.coal .theme-popup .default { + color: #43484d; +} +.coal blockquote { + margin: 20px 0; + padding: 0 20px; + color: #98a3ad; + background-color: #242637; + border-top: 0.1em solid #2c2f44; + border-bottom: 0.1em solid #2c2f44; +} +.coal table td { + border-color: #1f2223; +} +.coal table tbody tr:nth-child(2n) { + background: #1b1d1e; +} +.coal table thead { + background: #3f4649; +} +.coal table thead td { + border: none; +} +.coal table thead tr { + border: 1px #3f4649 solid; +} +.coal :not(pre) > .hljs { + display: inline-block; + vertical-align: middle; + padding: 0.1em 0.3em; + border-radius: 3px; + color: #c5c8c6; +} +.coal a:hover > .hljs { + text-decoration: underline; +} +.coal pre { + position: relative; +} +.coal pre > .buttons { + position: absolute; + z-index: 100; + right: 5px; + top: 5px; + color: #a1adb8; + cursor: pointer; +} +.coal pre > .buttons :hover { + color: #3473ad; +} +.coal pre > .buttons i { + margin-left: 8px; +} +.coal pre > .result { + margin-top: 10px; +} +.navy { + color: #bcbdd0; + background-color: #161923; +/* Inline code */ +} +.navy .content .header:link, +.navy .content .header:visited { + color: #bcbdd0; + pointer: cursor; +} +.navy .content .header:link:hover, +.navy .content .header:visited:hover { + text-decoration: none; +} +.navy .sidebar { + background-color: #282d3f; + color: #c8c9db; +} +.navy .chapter li { + color: #505274; +} +.navy .chapter li a { + color: #c8c9db; +} +.navy .chapter li .active, +.navy .chapter li a:hover { +/* Animate color change */ + color: #2b79a2; +} +.navy .chapter .spacer { + background-color: #2d334f; +} +.navy .menu-bar, +.navy .menu-bar:visited, +.navy .nav-chapters, +.navy .nav-chapters:visited, +.navy .mobile-nav-chapters, +.navy .mobile-nav-chapters:visited, +.navy .menu-bar a i { + color: #737480; +} +.navy .menu-bar i:hover, +.navy .nav-chapters:hover, +.navy .mobile-nav-chapters i:hover { + color: #b7b9cc; +} +.navy .mobile-nav-chapters i:hover { + color: #c8c9db; +} +.navy .mobile-nav-chapters { + background-color: #282d3f; +} +.navy .content a:link, +.navy a:visited, +.navy a > .hljs { + color: #2b79a2; +} +.navy .theme-popup { + color: #bcbdd0; + background: #161923; + border: 1px solid #737480; +} +.navy .theme-popup .theme:hover { + background-color: #282e40; +} +.navy .theme-popup .default { + color: #737480; +} +.navy blockquote { + margin: 20px 0; + padding: 0 20px; + color: #bcbdd0; + background-color: #262933; + border-top: 0.1em solid #2f333f; + border-bottom: 0.1em solid #2f333f; +} +.navy table td { + border-color: #1f2331; +} +.navy table tbody tr:nth-child(2n) { + background: #1b1f2b; +} +.navy table thead { + background: #39415b; +} +.navy table thead td { + border: none; +} +.navy table thead tr { + border: 1px #39415b solid; +} +.navy :not(pre) > .hljs { + display: inline-block; + vertical-align: middle; + padding: 0.1em 0.3em; + border-radius: 3px; + color: #c5c8c6; +} +.navy a:hover > .hljs { + text-decoration: underline; +} +.navy pre { + position: relative; +} +.navy pre > .buttons { + position: absolute; + z-index: 100; + right: 5px; + top: 5px; + color: #c8c9db; + cursor: pointer; +} +.navy pre > .buttons :hover { + color: #2b79a2; +} +.navy pre > .buttons i { + margin-left: 8px; +} +.navy pre > .result { + margin-top: 10px; +} +.rust { + color: #262625; + background-color: #e1e1db; +/* Inline code */ +} +.rust .content .header:link, +.rust .content .header:visited { + color: #262625; + pointer: cursor; +} +.rust .content .header:link:hover, +.rust .content .header:visited:hover { + text-decoration: none; +} +.rust .sidebar { + background-color: #3b2e2a; + color: #c8c9db; +} +.rust .chapter li { + color: #505254; +} +.rust .chapter li a { + color: #c8c9db; +} +.rust .chapter li .active, +.rust .chapter li a:hover { +/* Animate color change */ + color: #e69f67; +} +.rust .chapter .spacer { + background-color: #45373a; +} +.rust .menu-bar, +.rust .menu-bar:visited, +.rust .nav-chapters, +.rust .nav-chapters:visited, +.rust .mobile-nav-chapters, +.rust .mobile-nav-chapters:visited, +.rust .menu-bar a i { + color: #737480; +} +.rust .menu-bar i:hover, +.rust .nav-chapters:hover, +.rust .mobile-nav-chapters i:hover { + color: #262625; +} +.rust .mobile-nav-chapters i:hover { + color: #c8c9db; +} +.rust .mobile-nav-chapters { + background-color: #3b2e2a; +} +.rust .content a:link, +.rust a:visited, +.rust a > .hljs { + color: #2b79a2; +} +.rust .theme-popup { + color: #262625; + background: #e1e1db; + border: 1px solid #b38f6b; +} +.rust .theme-popup .theme:hover { + background-color: #99908a; +} +.rust .theme-popup .default { + color: #737480; +} +.rust blockquote { + margin: 20px 0; + padding: 0 20px; + color: #262625; + background-color: #c1c1bb; + border-top: 0.1em solid #b8b8b1; + border-bottom: 0.1em solid #b8b8b1; +} +.rust table td { + border-color: #d7d7cf; +} +.rust table tbody tr:nth-child(2n) { + background: #dbdbd4; +} +.rust table thead { + background: #b3a497; +} +.rust table thead td { + border: none; +} +.rust table thead tr { + border: 1px #b3a497 solid; +} +.rust :not(pre) > .hljs { + display: inline-block; + vertical-align: middle; + padding: 0.1em 0.3em; + border-radius: 3px; + color: #6e6b5e; +} +.rust a:hover > .hljs { + text-decoration: underline; +} +.rust pre { + position: relative; +} +.rust pre > .buttons { + position: absolute; + z-index: 100; + right: 5px; + top: 5px; + color: #c8c9db; + cursor: pointer; +} +.rust pre > .buttons :hover { + color: #e69f67; +} +.rust pre > .buttons i { + margin-left: 8px; +} +.rust pre > .result { + margin-top: 10px; +} +.ayu { + color: #c5c5c5; + background-color: #0f1419; +/* Inline code */ +} +.ayu .content .header:link, +.ayu .content .header:visited { + color: #c5c5c5; + pointer: cursor; +} +.ayu .content .header:link:hover, +.ayu .content .header:visited:hover { + text-decoration: none; +} +.ayu .sidebar { + background-color: #14191f; + color: #c8c9db; +} +.ayu .chapter li { + color: #5c6773; +} +.ayu .chapter li a { + color: #c8c9db; +} +.ayu .chapter li .active, +.ayu .chapter li a:hover { +/* Animate color change */ + color: #ffb454; +} +.ayu .chapter .spacer { + background-color: #2d334f; +} +.ayu .menu-bar, +.ayu .menu-bar:visited, +.ayu .nav-chapters, +.ayu .nav-chapters:visited, +.ayu .mobile-nav-chapters, +.ayu .mobile-nav-chapters:visited, +.ayu .menu-bar a i { + color: #737480; +} +.ayu .menu-bar i:hover, +.ayu .nav-chapters:hover, +.ayu .mobile-nav-chapters i:hover { + color: #b7b9cc; +} +.ayu .mobile-nav-chapters i:hover { + color: #c8c9db; +} +.ayu .mobile-nav-chapters { + background-color: #14191f; +} +.ayu .content a:link, +.ayu a:visited, +.ayu a > .hljs { + color: #0096cf; +} +.ayu .theme-popup { + color: #c5c5c5; + background: #14191f; + border: 1px solid #5c6773; +} +.ayu .theme-popup .theme:hover { + background-color: #191f26; +} +.ayu .theme-popup .default { + color: #737480; +} +.ayu blockquote { + margin: 20px 0; + padding: 0 20px; + color: #c5c5c5; + background-color: #262933; + border-top: 0.1em solid #2f333f; + border-bottom: 0.1em solid #2f333f; +} +.ayu table td { + border-color: #182028; +} +.ayu table tbody tr:nth-child(2n) { + background: #141b22; +} +.ayu table thead { + background: #324354; +} +.ayu table thead td { + border: none; +} +.ayu table thead tr { + border: 1px #324354 solid; +} +.ayu :not(pre) > .hljs { + display: inline-block; + vertical-align: middle; + padding: 0.1em 0.3em; + border-radius: 3px; + color: #ffb454; +} +.ayu a:hover > .hljs { + text-decoration: underline; +} +.ayu pre { + position: relative; +} +.ayu pre > .buttons { + position: absolute; + z-index: 100; + right: 5px; + top: 5px; + color: #c8c9db; + cursor: pointer; +} +.ayu pre > .buttons :hover { + color: #ffb454; +} +.ayu pre > .buttons i { + margin-left: 8px; +} +.ayu pre > .result { + margin-top: 10px; +} +@media only print { + #sidebar, + #menu-bar, + .nav-chapters, + .mobile-nav-chapters { + display: none; + } + #page-wrapper { + left: 0; + overflow-y: initial; + } + #page-wrapper.page-wrapper { + padding-left: 0px; + } + #content { + max-width: none; + margin: 0; + padding: 0; + } + .page { + overflow-y: initial; + } + code { + background-color: #666; + border-radius: 5px; +/* Force background to be printed in Chrome */ + -webkit-print-color-adjust: exact; + } + pre > .buttons { + z-index: 2; + } + a, + a:visited, + a:active, + a:hover { + color: #4183c4; + text-decoration: none; + } + h1, + h2, + h3, + h4, + h5, + h6 { + page-break-inside: avoid; + page-break-after: avoid; +/*break-after: avoid*/ + } + pre, + code { + page-break-inside: avoid; + white-space: pre-wrap /* CSS 3 */; + white-space: -moz-pre-wrap /* Mozilla, since 1999 */; + white-space: -pre-wrap /* Opera 4-6 */; + white-space: -o-pre-wrap /* Opera 7 */; + word-wrap: break-word /* Internet Explorer 5.5+ */; + } +} +.tooltiptext { + position: absolute; + visibility: hidden; + color: #fff; + background-color: #333; + -webkit-transform: translateX(-50%); + -moz-transform: translateX(-50%); + -o-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */ + left: -8px; /* Half of the width of the icon */ + top: -35px; + font-size: 0.8em; + text-align: center; + border-radius: 6px; + padding: 5px 8px; + margin: 5px; + z-index: 1000; +} +.tooltipped .tooltiptext { + visibility: visible; +} diff --git a/src/theme/book.js b/src/theme/book.js new file mode 100644 index 0000000..855e5b9 --- /dev/null +++ b/src/theme/book.js @@ -0,0 +1,394 @@ +$( document ).ready(function() { + + // url + var url = window.location.pathname; + + // Fix back button cache problem + window.onunload = function(){}; + + // Set theme + var theme = store.get('mdbook-theme'); + if (theme === null || theme === undefined) { theme = 'light'; } + + set_theme(theme); + + // Syntax highlighting Configuration + hljs.configure({ + tabReplace: ' ', // 4 spaces + languages: [], // Languages used for auto-detection + }); + + if (window.ace) { + // language-rust class needs to be removed for editable + // blocks or highlightjs will capture events + $('code.editable').removeClass('language-rust'); + + $('code').not('.editable').each(function(i, block) { + hljs.highlightBlock(block); + }); + } else { + $('code').each(function(i, block) { + hljs.highlightBlock(block); + }); + } + + // Adding the hljs class gives code blocks the color css + // even if highlighting doesn't apply + $('code').addClass('hljs'); + + var KEY_CODES = { + PREVIOUS_KEY: 37, + NEXT_KEY: 39 + }; + + $(document).on('keydown', function (e) { + if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { return; } + switch (e.keyCode) { + case KEY_CODES.NEXT_KEY: + e.preventDefault(); + if($('.nav-chapters.next').length) { + window.location.href = $('.nav-chapters.next').attr('href'); + } + break; + case KEY_CODES.PREVIOUS_KEY: + e.preventDefault(); + if($('.nav-chapters.previous').length) { + window.location.href = $('.nav-chapters.previous').attr('href'); + } + break; + } + }); + + // Interesting DOM Elements + var sidebar = $("#sidebar"); + + // Help keyboard navigation by always focusing on page content + $(".page").focus(); + + // Toggle sidebar + $("#sidebar-toggle").click(sidebarToggle); + + // Hide sidebar on section link click if it occupies large space + // in relation to the whole screen (phone in portrait) + $("#sidebar a").click(function(event){ + if (sidebar.width() > window.screen.width * 0.4) { + sidebarToggle(); + } + }); + + // Scroll sidebar to current active section + var activeSection = sidebar.find(".active"); + if(activeSection.length) { + sidebar.scrollTop(activeSection.offset().top); + } + + + // Theme button + $("#theme-toggle").click(function(){ + if($('.theme-popup').length) { + $('.theme-popup').remove(); + } else { + var popup = $('
') + .append($('
Light (default)
')) + .append($('
Rust
')) + .append($('
Coal
')) + .append($('')) + .append($('
Ayu
')); + + + popup.insertAfter(this); + + $('.theme').click(function(){ + var theme = $(this).attr('id'); + set_theme(theme); + }); + } + }); + + // Hide theme selector popup when clicking outside of it + $(document).click(function(event){ + var popup = $('.theme-popup'); + if(popup.length) { + var target = $(event.target); + if(!target.closest('.theme').length && !target.closest('#theme-toggle').length) { + popup.remove(); + } + } + }); + + function set_theme(theme) { + let ace_theme; + + if (theme == 'coal' || theme == 'navy') { + $("[href='ayu-highlight.css']").prop('disabled', true); + $("[href='tomorrow-night.css']").prop('disabled', false); + $("[href='highlight.css']").prop('disabled', true); + + ace_theme = "ace/theme/tomorrow_night"; + } else if (theme == 'ayu') { + $("[href='ayu-highlight.css']").prop('disabled', false); + $("[href='tomorrow-night.css']").prop('disabled', true); + $("[href='highlight.css']").prop('disabled', true); + + ace_theme = "ace/theme/tomorrow_night"; + } else { + $("[href='ayu-highlight.css']").prop('disabled', true); + $("[href='tomorrow-night.css']").prop('disabled', true); + $("[href='highlight.css']").prop('disabled', false); + + ace_theme = "ace/theme/dawn"; + } + + if (window.ace && window.editors) { + window.editors.forEach(function(editor) { + editor.setTheme(ace_theme); + }); + } + + store.set('mdbook-theme', theme); + + $('body').removeClass().addClass(theme); + } + + + // Hide Rust code lines prepended with a specific character + var hiding_character = "#"; + + $("code.language-rust").each(function(i, block){ + + var code_block = $(this); + var pre_block = $(this).parent(); + // hide lines + var lines = code_block.html().split("\n"); + var first_non_hidden_line = false; + var lines_hidden = false; + + for(var n = 0; n < lines.length; n++){ + if($.trim(lines[n])[0] == hiding_character){ + if(first_non_hidden_line){ + lines[n] = "" + "\n" + lines[n].replace(/(\s*)# ?/, "$1") + ""; + } + else { + lines[n] = "" + lines[n].replace(/(\s*)# ?/, "$1") + "\n" + ""; + } + lines_hidden = true; + } + else if(first_non_hidden_line) { + lines[n] = "\n" + lines[n]; + } + else { + first_non_hidden_line = true; + } + } + code_block.html(lines.join("")); + + // If no lines were hidden, return + if(!lines_hidden) { return; } + + // add expand button + pre_block.prepend("
"); + + pre_block.find("i").click(function(e){ + if( $(this).hasClass("fa-expand") ) { + $(this).removeClass("fa-expand").addClass("fa-compress"); + $(this).attr("title", "Hide lines"); + pre_block.find("span.hidden").removeClass("hidden").addClass("unhidden"); + } + else { + $(this).removeClass("fa-compress").addClass("fa-expand"); + $(this).attr("title", "Show hidden lines"); + pre_block.find("span.unhidden").removeClass("unhidden").addClass("hidden"); + } + }); + }); + + // Process playpen code blocks + $(".playpen").each(function(block){ + var pre_block = $(this); + // Add play button + var buttons = pre_block.find(".buttons"); + if( buttons.length === 0 ) { + pre_block.prepend("
"); + buttons = pre_block.find(".buttons"); + } + buttons.prepend(""); + buttons.prepend(""); + + let code_block = pre_block.find("code").first(); + if (window.ace && code_block.hasClass("editable")) { + buttons.prepend(""); + } + + buttons.find(".play-button").click(function(e){ + run_rust_code(pre_block); + }); + buttons.find(".clip-button").mouseout(function(e){ + hideTooltip(e.currentTarget); + }); + buttons.find(".reset-button").click(function() { + if (!window.ace) { return; } + let editor = window.ace.edit(code_block.get(0)); + editor.setValue(editor.originalCode); + editor.clearSelection(); + }); + }); + + var clipboardSnippets = new Clipboard('.clip-button', { + text: function(trigger) { + hideTooltip(trigger); + let playpen = $(trigger).parents(".playpen"); + return playpen_text(playpen); + } + }); + clipboardSnippets.on('success', function(e) { + e.clearSelection(); + showTooltip(e.trigger, "Copied!"); + }); + clipboardSnippets.on('error', function(e) { + showTooltip(e.trigger, "Clipboard error!"); + }); + + $.ajax({ + url: "https://play.rust-lang.org/meta/crates", + method: "POST", + crossDomain: true, + dataType: "json", + contentType: "application/json", + success: function(response){ + // get list of crates available in the rust playground + let playground_crates = response.crates.map(function(item) {return item["id"];} ); + $(".playpen").each(function(block) { + handle_crate_list_update($(this), playground_crates); + }); + }, + }); + +}); + +function playpen_text(playpen) { + let code_block = playpen.find("code").first(); + + if (window.ace && code_block.hasClass("editable")) { + let editor = window.ace.edit(code_block.get(0)); + return editor.getValue(); + } else { + return code_block.get(0).textContent; + } +} + +function handle_crate_list_update(playpen_block, playground_crates) { + // update the play buttons after receiving the response + update_play_button(playpen_block, playground_crates); + + // and install on change listener to dynamically update ACE editors + if (window.ace) { + let code_block = playpen_block.find("code").first(); + if (code_block.hasClass("editable")) { + let editor = window.ace.edit(code_block.get(0)); + editor.on("change", function(e){ + update_play_button(playpen_block, playground_crates); + }); + } + } +} + +// updates the visibility of play button based on `no_run` class and +// used crates vs ones available on http://play.rust-lang.org +function update_play_button(pre_block, playground_crates) { + var play_button = pre_block.find(".play-button"); + + var classes = pre_block.find("code").attr("class").split(" "); + // skip if code is `no_run` + if (classes.indexOf("no_run") > -1) { + play_button.addClass("hidden"); + return; + } + + // get list of `extern crate`'s from snippet + var txt = playpen_text(pre_block); + var re = /extern\s+crate\s+([a-zA-Z_0-9]+)\s*;/g; + var snippet_crates = []; + while (item = re.exec(txt)) { + snippet_crates.push(item[1]); + } + + // check if all used crates are available on play.rust-lang.org + var all_available = snippet_crates.every(function(elem) { + return playground_crates.indexOf(elem) > -1; + }); + + if (all_available) { + play_button.removeClass("hidden"); + } else { + play_button.addClass("hidden"); + } +} + +function hideTooltip(elem) { + elem.firstChild.innerText=""; + elem.setAttribute('class', 'fa fa-copy clip-button'); +} + +function showTooltip(elem, msg) { + elem.firstChild.innerText=msg; + elem.setAttribute('class', 'fa fa-copy tooltipped'); +} + +function sidebarToggle() { + var html = $("html"); + if ( html.hasClass("sidebar-hidden") ) { + html.removeClass("sidebar-hidden").addClass("sidebar-visible"); + store.set('mdbook-sidebar', 'visible'); + } else if ( html.hasClass("sidebar-visible") ) { + html.removeClass("sidebar-visible").addClass("sidebar-hidden"); + store.set('mdbook-sidebar', 'hidden'); + } else { + if($("#sidebar").position().left === 0){ + html.addClass("sidebar-hidden"); + store.set('mdbook-sidebar', 'hidden'); + } else { + html.addClass("sidebar-visible"); + store.set('mdbook-sidebar', 'visible'); + } + } +} + +function run_rust_code(code_block) { + var result_block = code_block.find(".result"); + if(result_block.length === 0) { + code_block.append(""); + result_block = code_block.find(".result"); + } + + let text = playpen_text(code_block); + + var params = { + channel: "stable", + mode: "debug", + crateType: "bin", + tests: false, + code: text, + } + + if(text.indexOf("#![feature") !== -1) { + params.channel = "nightly"; + } + + result_block.text("Running..."); + + $.ajax({ + url: "https://play.rust-lang.org/execute", + method: "POST", + crossDomain: true, + dataType: "json", + contentType: "application/json", + data: JSON.stringify(params), + timeout: 15000, + success: function(response){ + result_block.text(response.success ? response.stdout : response.stderr); + }, + error: function(qXHR, textStatus, errorThrown){ + result_block.text("Playground communication " + textStatus); + }, + }); +} diff --git a/src/theme/favicon.png b/src/theme/favicon.png new file mode 100644 index 0000000..a5b1aa1 Binary files /dev/null and b/src/theme/favicon.png differ diff --git a/src/theme/header.hbs b/src/theme/header.hbs new file mode 100644 index 0000000..26fa2d2 --- /dev/null +++ b/src/theme/header.hbs @@ -0,0 +1 @@ +{{!-- Put your header HTML text here --}} \ No newline at end of file diff --git a/src/theme/highlight.css b/src/theme/highlight.css new file mode 100644 index 0000000..c667e3a --- /dev/null +++ b/src/theme/highlight.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Dune Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Dune Comment */ +.hljs-comment, +.hljs-quote { + color: #AAA; +} + +/* Atelier-Dune Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d73737; +} + +/* Atelier-Dune Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b65611; +} + +/* Atelier-Dune Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #60ac39; +} + +/* Atelier-Dune Blue */ +.hljs-title, +.hljs-section { + color: #6684e1; +} + +/* Atelier-Dune Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b854d4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f1f1f1; + color: #6e6b5e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/src/theme/highlight.js b/src/theme/highlight.js new file mode 100644 index 0000000..bb48d11 --- /dev/null +++ b/src/theme/highlight.js @@ -0,0 +1,2 @@ +/*! highlight.js v9.12.0 | BSD3 License | git.io/hljslicense */ +!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/&/g,"&").replace(//g,">")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return w(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||w(i))return i}function o(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return r.forEach(function(e){for(n in e)t[n]=e[n]}),t}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset"}function u(e){s+=""}function c(e){("start"===e.event?o:u)(e.node)}for(var l=0,s="",f=[];e.length||r.length;){var g=i();if(s+=n(a.substring(l,g[0].offset)),l=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===l);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return s+n(a.substr(l))}function l(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(n){return o(e,{v:null},n)})),e.cached_variants||e.eW&&[o(e)]||[e]}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var o={},u=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");o[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?u("keyword",a.k):x(a.k).forEach(function(e){u(e,a.k[e])}),a.k=o}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]),a.c=Array.prototype.concat.apply([],a.c.map(function(e){return l("self"===e?a:e)})),a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var c=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=c.length?t(c.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function l(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function p(e,n,t,r){var a=r?"":I.classPrefix,i='',i+n+o}function h(){var e,t,r,a;if(!E.k)return n(k);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(k);r;)a+=n(k.substring(t,r.index)),e=l(E,r),e?(B+=e[1],a+=p(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(k);return a+n(k.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!y[E.sL])return n(k);var t=e?f(E.sL,k,!0,x[E.sL]):g(k,E.sL.length?E.sL:void 0);return E.r>0&&(B+=t.r),e&&(x[E.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){L+=null!=E.sL?d():h(),k=""}function v(e){L+=e.cN?p(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(k+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?k+=n:(t.eB&&(k+=n),b(),t.rB||t.eB||(k=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?k+=n:(a.rE||a.eE||(k+=n),b(),a.eE&&(k=n));do E.cN&&(L+=C),E.skip||(B+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"")+'"');return k+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var R,E=i||N,x={},L="";for(R=E;R!==N;R=R.parent)R.cN&&(L=p(R.cN,"",!0)+L);var k="",B=0;try{for(var M,j,O=0;;){if(E.t.lastIndex=O,M=E.t.exec(t),!M)break;j=m(t.substring(O,M.index),M[0]),O=M.index+j}for(m(t.substr(O)),R=E;R.parent;R=R.parent)R.cN&&(L+=C);return{r:B,value:L,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function g(e,t){t=t||I.languages||x(y);var r={r:0,value:n(e)},a=r;return t.filter(w).forEach(function(n){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function p(e){return I.tabReplace||I.useBR?e.replace(M,function(e,n){return I.useBR&&"\n"===e?"
":I.tabReplace?n.replace(/\t/g,I.tabReplace):""}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function d(e){var n,t,r,o,l,s=i(e);a(s)||(I.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):n=e,l=n.textContent,r=s?f(s,l,!0):g(l),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),l)),r.value=p(r.value),e.innerHTML=r.value,e.className=h(e.className,s,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function b(e){I=o(I,e)}function v(){if(!v.called){v.called=!0;var e=document.querySelectorAll("pre code");E.forEach.call(e,d)}}function m(){addEventListener("DOMContentLoaded",v,!1),addEventListener("load",v,!1)}function N(n,t){var r=y[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function R(){return x(y)}function w(e){return e=(e||"").toLowerCase(),y[e]||y[L[e]]}var E=[],x=Object.keys,y={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="
",I={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};return e.highlight=f,e.highlightAuto=g,e.fixMarkup=p,e.highlightBlock=d,e.configure=b,e.initHighlighting=v,e.initHighlightingOnLoad=m,e.registerLanguage=N,e.listLanguages=R,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/={3,}/,e:/$/},{b:/^\-{3}/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+{3}/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}});hljs.registerLanguage("nginx",function(e){var r={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},b={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,r],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[r]},{cN:"regexp",c:[e.BE,r],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},r]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:b}],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},_={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},i=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:_,l:i,i:""}]}]},{cN:"class",b:"("+n.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:n,l:i,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}});hljs.registerLanguage("xml",function(s){var e="[A-Za-z0-9\\._:-]+",t={eW:!0,i:/`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"|$)",e:">",k:{name:"style"},c:[t],starts:{e:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"|$)",e:">",k:{name:"script"},c:[t],starts:{e:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},t]}]}});hljs.registerLanguage("handlebars",function(e){var a={"builtin-name":"each in with if else unless bindattr action collection debugger log outlet template unbound view yield"};return{aliases:["hbs","html.hbs","html.handlebars"],cI:!0,sL:"xml",c:[e.C("{{!(--)?","(--)?}}"),{cN:"template-tag",b:/\{\{[#\/]/,e:/\}\}/,c:[{cN:"name",b:/[a-zA-Z\.-]+/,k:a,starts:{eW:!0,r:0,c:[e.QSM]}}]},{cN:"template-variable",b:/\{\{/,e:/\}\}/,k:a}]}});hljs.registerLanguage("ini",function(e){var b={cN:"string",c:[e.BE],v:[{b:"'''",e:"'''",r:10},{b:'"""',e:'"""',r:10},{b:'"',e:'"'},{b:"'",e:"'"}]};return{aliases:["toml"],cI:!0,i:/\S/,c:[e.C(";","$"),e.HCM,{cN:"section",b:/^\s*\[+/,e:/\]+/},{b:/^[a-z0-9\[\]_-]+\s*=\s*/,e:"$",rB:!0,c:[{cN:"attr",b:/[a-z0-9\[\]_-]+/},{b:/=/,eW:!0,r:0,c:[{cN:"literal",b:/\bon|off|true|false|yes|no\b/},{cN:"variable",v:[{b:/\$[\w\d"][\w\d_]*/},{b:/\$\{(.*?)}/}]},b,{cN:"number",b:/([\+\-]+)?[\d]+_[\d_]+/},e.NM]}]}]}});hljs.registerLanguage("javascript",function(e){var r="[A-Za-z$_][0-9A-Za-z$_]*",t={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:t,c:[]},c={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,c,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:t,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,c,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:r+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:r,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+r+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:r},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,c:s}]}]},{b://,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:r}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("python",function(e){var r={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},b={cN:"meta",b:/^(>>>|\.\.\.) /},c={cN:"subst",b:/\{/,e:/\}/,k:r,i:/#/},a={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[b],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[b],r:10},{b:/(fr|rf|f)'''/,e:/'''/,c:[b,c]},{b:/(fr|rf|f)"""/,e:/"""/,c:[b,c]},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},{b:/(fr|rf|f)'/,e:/'/,c:[c]},{b:/(fr|rf|f)"/,e:/"/,c:[c]},e.ASM,e.QSM]},s={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},i={cN:"params",b:/\(/,e:/\)/,c:["self",b,s,a]};return c.c=[a,s,b],{aliases:["py","gyp"],k:r,i:/(<\/|->|\?)|=>/,c:[b,s,a,e.HCM,{v:[{cN:"function",bK:"def"},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,i,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}});hljs.registerLanguage("php",function(e){var c={b:"\\$+[a-zA-Z_-ΓΏ][a-zA-Z0-9_-ΓΏ]*"},i={cN:"meta",b:/<\?(php)?|\?>/},t={cN:"string",c:[e.BE,i],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},a={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.HCM,e.C("//","$",{c:[i]}),e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},i,{cN:"keyword",b:/\$this\b/},c,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",c,e.CBCM,t,a]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},t,a]}});hljs.registerLanguage("d",function(e){var t={keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},r="(0|[1-9][\\d_]*)",a="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",i="0[bB][01_]+",n="([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)",_="0[xX]"+n,c="([eE][+-]?"+a+")",d="("+a+"(\\.\\d*|"+c+")|\\d+\\."+a+a+"|\\."+r+c+"?)",o="(0[xX]("+n+"\\."+n+"|\\.?"+n+")[pP][+-]?"+a+")",s="("+r+"|"+i+"|"+_+")",l="("+o+"|"+d+")",u="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",b={cN:"number",b:"\\b"+s+"(L|u|U|Lu|LU|uL|UL)?",r:0},f={cN:"number",b:"\\b("+l+"([fF]|L|i|[fF]i|Li)?|"+s+"(i|[fF]i|Li))",r:0},g={cN:"string",b:"'("+u+"|.)",e:"'",i:"."},h={b:u,r:0},p={cN:"string",b:'"',c:[h],e:'"[cwd]?'},m={cN:"string",b:'[rq]"',e:'"[cwd]?',r:5},w={cN:"string",b:"`",e:"`[cwd]?"},N={cN:"string",b:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',r:10},A={cN:"string",b:'q"\\{',e:'\\}"'},F={cN:"meta",b:"^#!",e:"$",r:5},y={cN:"meta",b:"#(line)",e:"$",r:5},L={cN:"keyword",b:"@[a-zA-Z_][a-zA-Z_\\d]*"},v=e.C("\\/\\+","\\+\\/",{c:["self"],r:10});return{l:e.UIR,k:t,c:[e.CLCM,e.CBCM,v,N,p,m,w,A,f,b,g,F,y,L]}});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}});hljs.registerLanguage("go",function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],k:t,i:"{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},i=[e.BE,r,n],o=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),s,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return r.c=o,s.c=o,{aliases:["pl","pm"],l:/[\w\.]+/,k:t,c:o}});hljs.registerLanguage("rust",function(e){var t="([ui](8|16|32|64|128|size)|f(32|64))?",r="alignof as be box break const continue crate do else enum extern false fn for if impl in let loop match mod mut offsetof once priv proc pub pure ref return self Self sizeof static struct super trait true type typeof unsafe unsized use virtual while where yield move default",n="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!";return{aliases:["rs"],k:{keyword:r,literal:"true false Some None Ok Err",built_in:n},l:e.IR+"!?",i:""}]}});hljs.registerLanguage("ruby",function(e){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},c={cN:"doctag",b:"@[A-Za-z]+"},a={b:"#<",e:">"},s=[e.C("#","$",{c:[c]}),e.C("^\\=begin","^\\=end",{c:[c],r:10}),e.C("^__END__","\\n$")],n={cN:"subst",b:"#\\{",e:"}",k:r},t={cN:"string",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{b:/<<(-?)\w+$/,e:/^\s*\w+$/}]},i={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:r},d=[t,a,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(s)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:b}),i].concat(s)},{b:e.IR+"::"},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":(?!\\s)",c:[t,{b:b}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{cN:"params",b:/\|/,e:/\|/,k:r},{b:"("+e.RSR+"|unless)\\s*",k:"unless",c:[a,{cN:"regexp",c:[e.BE,n],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(s),r:0}].concat(s);n.c=d,i.c=d;var l="[>?]>",o="[\\w#]+\\(\\w+\\):\\d+:\\d+>",u="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",w=[{b:/^\s*=>/,starts:{e:"$",c:d}},{cN:"meta",b:"^("+l+"|"+o+"|"+u+")",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,i:/\/\*/,c:s.concat(w).concat(d)}});hljs.registerLanguage("makefile",function(e){var i={cN:"variable",v:[{b:"\\$\\("+e.UIR+"\\)",c:[e.BE]},{b:/\$[@%] *$",rE:!0,c:l.c,e:t.v[0].b},{b:"<%[%=-]?",e:"[%-]?%>",sL:"ruby",eB:!0,eE:!0,r:0},{cN:"type",b:"!!"+e.UIR},{cN:"meta",b:"&"+e.UIR+"$"},{cN:"meta",b:"\\*"+e.UIR+"$"},{cN:"bullet",b:"^ *-",r:0},e.HCM,{bK:b,k:{literal:b}},e.CNM,l]}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/},{b:/\(/,e:/\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",i:/:/,c:[{cN:"keyword",b:/\w+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:c,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}});hljs.registerLanguage("java",function(e){var a="[Γ€-ΚΈa-zA-Z_$][Γ€-ΚΈa-zA-Z_$0-9]*",t=a+"(<"+a+"(\\s*,\\s*"+a+")*>)?",r="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",s="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",c={cN:"number",b:s,r:0};return{aliases:["jsp"],k:r,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+t+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:r,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:r,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},c,{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("armasm",function(s){return{cI:!0,aliases:["arm"],l:"\\.?"+s.IR,k:{meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @"},c:[{cN:"keyword",b:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?",e:"\\s"},s.C("[;@]","$",{r:0}),s.CBCM,s.QSM,{cN:"string",b:"'",e:"[^\\\\]'",r:0},{cN:"title",b:"\\|",e:"\\|",i:"\\n",r:0},{cN:"number",v:[{b:"[#$=]?0x[0-9a-f]+"},{b:"[#$=]?0b[01]+"},{b:"[#$=]\\d+"},{b:"\\b\\d+"}],r:0},{cN:"symbol",v:[{b:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{b:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{b:"[=#]\\w+"}],r:0}]}});hljs.registerLanguage("swift",function(e){var i={keyword:"__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},t={cN:"type",b:"\\b[A-Z][\\wΓ€-ΚΈ']*",r:0},n=e.C("/\\*","\\*/",{c:["self"]}),r={cN:"subst",b:/\\\(/,e:"\\)",k:i,c:[]},a={cN:"number",b:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",r:0},o=e.inherit(e.QSM,{c:[r,e.BE]});return r.c=[a],{k:i,c:[o,e.CLCM,n,t,a,{cN:"function",bK:"func",e:"{",eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{b://},{cN:"params",b:/\(/,e:/\)/,endsParent:!0,k:i,c:["self",a,o,e.CBCM,{b:":"}],i:/["']/}],i:/\[|%/},{cN:"class",bK:"struct protocol class extension enum",k:i,e:"\\{",eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{cN:"meta",b:"(@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain)"},{bK:"import",e:/$/,c:[e.CLCM,n]}]}});hljs.registerLanguage("cpp",function(t){var e={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[{b:'(u8?|U)?L?"',e:'"',i:"\\n",c:[t.BE]},{b:'(u8?|U)?R"',e:'"',c:[t.BE]},{b:"'\\\\?.",e:"'",i:"."}]},s={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},i={cN:"meta",b:/#\s*[a-z]+\b/,e:/$/,k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},c:[{b:/\\\n/,r:0},t.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:/<[^\n>]*>/,e:/$/,i:"\\n"},t.CLCM,t.CBCM]},a=t.IR+"\\s*\\(",c={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and or not",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},n=[e,t.CLCM,t.CBCM,s,r];return{aliases:["c","cc","h","c++","h++","hpp"],k:c,i:"",k:c,c:["self",e]},{b:t.IR+"::",k:c},{v:[{b:/=/,e:/;/},{b:/\(/,e:/\)/},{bK:"new throw return else",e:/;/}],k:c,c:n.concat([{b:/\(/,e:/\)/,k:c,c:n.concat(["self"]),r:0}]),r:0},{cN:"function",b:"("+t.IR+"[\\*&\\s]+)+"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\w\s\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,s,e]},t.CLCM,t.CBCM,i]},{cN:"class",bK:"class struct",e:/[{;:]/,c:[{b://,c:["self"]},t.TM]}]),exports:{preprocessor:i,strings:r,k:c}}});hljs.registerLanguage("x86asm",function(s){return{cI:!0,l:"[.%]?"+s.IR,k:{keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},c:[s.C(";","$",{r:0}),{cN:"number",v:[{b:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",r:0},{b:"\\$[0-9][0-9A-Fa-f]*",r:0},{b:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{b:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},s.QSM,{cN:"string",v:[{b:"'",e:"[^\\\\]'"},{b:"`",e:"[^\\\\]`"}],r:0},{cN:"symbol",v:[{b:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{b:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],r:0},{cN:"subst",b:"%[0-9]+",r:0},{cN:"subst",b:"%!S+",r:0},{cN:"meta",b:/^\s*\.[\w_-]+/}]}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/\b-?[a-z\._]+\b/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}});hljs.registerLanguage("shell",function(s){return{aliases:["console"],c:[{cN:"meta",b:"^\\s{0,3}[\\w\\d\\[\\]()@-]*[>%$#]",starts:{e:"$",sL:"bash"}}]}});hljs.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}});hljs.registerLanguage("cs",function(e){var i={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long nameof object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},t={cN:"string",b:'@"',e:'"',c:[{b:'""'}]},r=e.inherit(t,{i:/\n/}),a={cN:"subst",b:"{",e:"}",k:i},c=e.inherit(a,{i:/\n/}),n={cN:"string",b:/\$"/,e:'"',i:/\n/,c:[{b:"{{"},{b:"}}"},e.BE,c]},s={cN:"string",b:/\$@"/,e:'"',c:[{b:"{{"},{b:"}}"},{b:'""'},a]},o=e.inherit(s,{i:/\n/,c:[{b:"{{"},{b:"}}"},{b:'""'},c]});a.c=[s,n,t,e.ASM,e.QSM,e.CNM,e.CBCM],c.c=[o,n,r,e.ASM,e.QSM,e.CNM,e.inherit(e.CBCM,{i:/\n/})];var l={v:[s,n,t,e.ASM,e.QSM]},b=e.IR+"(<"+e.IR+"(\\s*,\\s*"+e.IR+")*>)?(\\[\\])?";return{aliases:["csharp"],k:i,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:""},{b:""}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},l,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{cN:"meta",b:"^\\s*\\[",eB:!0,e:"\\]",eE:!0,c:[{cN:"meta-string",b:/"/,e:/"/}]},{bK:"new return throw await else",r:0},{cN:"function",b:"("+b+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:i,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:i,r:0,c:[l,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("coffeescript",function(e){var c={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super yield import export from as default await then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",r={cN:"subst",b:/#\{/,e:/}/,k:c},i=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,r]},{b:/"/,e:/"/,c:[e.BE,r]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[r,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{b:"@"+n},{sL:"javascript",eB:!0,eE:!0,v:[{b:"```",e:"```"},{b:"`",e:"`"}]}];r.c=i;var s=e.inherit(e.TM,{b:n}),t="(\\(.*\\))?\\s*\\B[-=]>",o={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:c,c:["self"].concat(i)}]};return{aliases:["coffee","cson","iced"],k:c,i:/\/\*/,c:i.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+n+"\\s*=\\s*"+t,e:"[-=]>",rB:!0,c:[s,o]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:t,e:"[-=]>",rB:!0,c:[o]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[s]},s]},{b:n+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*#]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",e:/;/,eW:!0,l:/[\w\.]+/,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage("apache",function(e){var r={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:""},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"meta",b:"\\s\\[",e:"\\]$"},{cN:"variable",b:"[\\$%]\\{",e:"\\}",c:["self",r]},r,e.QSM]}}],i:/\S/}});hljs.registerLanguage("haskell",function(e){var i={v:[e.C("--","$"),e.C("{-","-}",{c:["self"]})]},a={cN:"meta",b:"{-#",e:"#-}"},l={cN:"meta",b:"^#",e:"$"},c={cN:"type",b:"\\b[A-Z][\\w']*",r:0},n={b:"\\(",e:"\\)",i:'"',c:[a,l,{cN:"type",b:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TM,{b:"[_a-z][\\w']*"}),i]},s={b:"{",e:"}",c:n.c};return{aliases:["hs"],k:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",c:[{bK:"module",e:"where",k:"module where",c:[n,i],i:"\\W\\.|;"},{b:"\\bimport\\b",e:"$",k:"import qualified as hiding",c:[n,i],i:"\\W\\.|;"},{cN:"class",b:"^(\\s*)?(class|instance)\\b",e:"where",k:"class family instance where",c:[c,n,i]},{cN:"class",b:"\\b(data|(new)?type)\\b",e:"$",k:"data family type newtype deriving",c:[a,c,n,s,i]},{bK:"default",e:"$",c:[c,n,i]},{bK:"infix infixl infixr",e:"$",c:[e.CNM,i]},{b:"\\bforeign\\b",e:"$",k:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",c:[c,e.QSM,i]},{cN:"meta",b:"#!\\/usr\\/bin\\/env runhaskell",e:"$"},a,l,e.QSM,e.CNM,c,e.inherit(e.TM,{b:"^[_a-z][\\w']*"}),i,{b:"->|<-"}]}});hljs.registerLanguage("scala",function(e){var t={cN:"meta",b:"@[A-Za-z]+"},a={cN:"subst",v:[{b:"\\$[A-Za-z0-9_]+"},{b:"\\${",e:"}"}]},r={cN:"string",v:[{b:'"',e:'"',i:"\\n",c:[e.BE]},{b:'"""',e:'"""',r:10},{b:'[a-z]+"',e:'"',i:"\\n",c:[e.BE,a]},{cN:"string",b:'[a-z]+"""',e:'"""',c:[a],r:10}]},c={cN:"symbol",b:"'\\w[\\w\\d_]*(?!')"},i={cN:"type",b:"\\b[A-Z][A-Za-z0-9_]*",r:0},s={cN:"title",b:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,r:0},n={cN:"class",bK:"class object trait type",e:/[:={\[\n;]/,eE:!0,c:[{bK:"extends with",r:10},{b:/\[/,e:/\]/,eB:!0,eE:!0,r:0,c:[i]},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,r:0,c:[i]},s]},l={cN:"function",bK:"def",e:/[:={\[(\n;]/,eE:!0,c:[s]};return{k:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},c:[e.CLCM,e.CBCM,r,c,i,l,n,e.CNM,t]}}); \ No newline at end of file diff --git a/src/theme/index.hbs b/src/theme/index.hbs new file mode 100644 index 0000000..2a6c34e --- /dev/null +++ b/src/theme/index.hbs @@ -0,0 +1,181 @@ + + + + + {{ title }} + + + + + + + + + + + + + + + + + + + + + {{#each additional_css}} + + {{/each}} + + {{#if mathjax_support}} + + + {{/if}} + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ {{> header}} + + +
+ {{{ content }}} +
+ + + {{#previous}} + + {{/previous}} + + {{#next}} + + {{/next}} + +
+ + {{#previous}} + + {{/previous}} + + {{#next}} + + {{/next}} + +
+ + + + + + + {{{livereload}}} + + {{#if google_analytics}} + + + {{/if}} + + {{#if playpens_editable}} + + + + + + {{/if}} + + {{#if is_print}} + + {{/if}} + + + + + + {{#each additional_js}} + + {{/each}} + + +

Abhinav Sanal

πŸ“–

Chaitanya Liz

πŸ’»

Uma V Menon

πŸ’»

Angel Rose

πŸ’»