Tutorial by Examples: cs

Run interactive vim tutorials as many times as needed to feel comfortable with the basics. Vim features several modes, e.g. normal mode, insert mode and command-line mode. Normal mode is for editing and navigating text. In this mode h, j, k and l correspond to the cursor keys ←, ↓, ↑ and →. Most c...
filePath = "file.csv" data = np.genfromtxt(filePath) Many options are supported, see official documentation for full list: data = np.genfromtxt(filePath, dtype='float', delimiter=';', skip_header=1, usecols=(0,1,3) )
From within Emacs, type C-h t (Control-h, t) to get an excellent interactive tutorial within Emacs. The user learns basic navigation and editing by operating on the TUTORIAL text itself, as they read the tutorial. (Modifications to the tutorial are discarded when the tutorial is closed, so each ti...
English text has the occasional diacritics. Loan words, like née, café, entrée Names, like Noël and Chloë Place names, like Montréal and Québec
There are several ways of getting the data that you will bind to the DOM elements. The simpler one is having your data in your script as an array... var data = [ ... ]; But D3.js allows us to load data from an external file. In this example, we will see how to properly load and deal with data fr...
$ mysqlimport --fields-optionally-enclosed-by='"' --fields-terminated-by=, --lines-terminated-by="\r\n" mycompany employee.csv
This creates a variant (a tagged union) that can store either an int or a string. std::variant< int, std::string > var; We can store one of either type in it: var = "hello"s; And we can access the contents via std::visit: // Prints "hello\n": visit( [](auto&&a...
The %timeit magic runs the given code many times, then returns the speed of the fastest result. In [1]: %timeit sum(range(100000)) 100 loops, best of 3: 2.91 ms per loop The %%timeit cell magic can be used to time blocks of code. In [2]: %%timeit ...: a = 0 ...: for i in range(100000):...
There are two basic classes of exact numeric data types - Integer, and Fixed Precision and Scale. Integer Data Types bit tinyint smallint int bigint Integers are numeric values that never contain a fractional portion, and always use a fixed amount of storage. The range and storage sizes o...
float [(n)] real These data types are used to store floating point numbers. Since these types are intended to hold approximate numeric values only, these should not be used in cases where any rounding error is unacceptable. However, if you need to handle very large numbers, or numbers with an ...
Cross-site request forgery, also known as one-click attack or session riding and abbreviated as CSRF or XSRF, is a type of malicious exploit of a website where unauthorized commands are transmitted from a user that the website trusts. Learn more To enable CSRF protection, add the CsrfViewMid...
#include <iostream> #include <string> int main() { const char * C_String = "This is a line of text w"; const char * C_Problem_String = "This is a line of text ኚ"; std::string Std_String("This is a second line of text w"); std::string...
First, let's setup the example table. -- Create a table as an example CREATE TABLE SortOrder ( ID INT IDENTITY PRIMARY KEY, [Text] VARCHAR(256) ) GO -- Insert rows into the table INSERT INTO SortOrder ([Text]) SELECT ('Lorem ipsum dolor sit amet, consectetur adipiscing elit') U...
A. The syntax is presented above. The following selector matches all <input> elements in an HTML document that are not disabled and don't have the class .example: HTML: <form> Phone: <input type="tel" class="example"> E-mail: <input type="em...
By default, LESS will use its own calc() unless told otherwise. So: @column-count: 2; .class-example { width: calc(100% / @column-count); } Would compile to this: .class-example { width: 50%; } While it is our desired width, LESS has used it's own calc() function to calculate ...
function test($x) { return $x; } $server = new SoapServer(null, array('uri' => "http://test-uri/")); $server->addFunction("test"); $server->handle();
FIND command can scan large files line-by-line to find a certain string. It doesn't support wildcards in the search string. find /i "Completed" "%userprofile%\Downloads\*.log" >> %targetdir%\tested.log TYPE scan2.txt | FIND "Failed" /c && echo Scan fai...
Create a simple DataFrame. import numpy as np import pandas as pd # Set the seed so that the numbers can be reproduced. np.random.seed(0) df = pd.DataFrame(np.random.randn(5, 3), columns=list('ABC')) # Another way to set column names is "columns=['column_1_name','column_2_name','c...
Exporting using base R Data can be written to a CSV file using write.csv(): write.csv(mtcars, "mtcars.csv") Commonly-specified parameters include row.names = FALSE and na = "". Exporting using packages readr::write_csv is significantly faster than write.csv and does not ...
Components and Props As React concerns itself only with an application's view, the bulk of development in React will be the creation of components. A component represents a portion of the view of your application. "Props" are simply the attributes used on a JSX node (e.g. <SomeComponen...

Page 13 of 24