Tutorial by Examples: is

Use the HTML or <audio> element to embed video/audio content in a document. The video/audio element contains one or more video/audio sources. To specify a source, use either the src attribute or the <source> element; the browser will choose the most suitable one. Audio tag example: &...
By recursion let rec sumTotal list = match list with | [] -> 0 // empty list -> return 0 | head :: tail -> head + sumTotal tail The above example says: "Look at the list, is it empty? return 0. Otherwise it is a non-empty list. So it could be [1], [1; 2], [1; 2; 3] ...
All files are in folder files. First create list of DataFrames and then concat them: import pandas as pd import glob #a.csv #a,b #1,2 #5,8 #b.csv #a,b #9,6 #6,4 #c.csv #a,b #4,3 #7,0 files = glob.glob('files/*.csv') dfs = [pd.read_csv(fp) for fp in files] #duplicated ind...
The bitwise NOT (~) performs a NOT operation on each bit in a value. Syntax: ~expression Returns: a Number. Description The truth table for the NOT operation is: aNOT a01101337 (base 10) = 0000010100111001 (base 2) ~1337 (base 10) = 1111101011000110 (base 2) = -1338 (base 10) A bit...
When SQL/Plus or SQL Developer display dates they will perform an implicit conversion to a string using the default date format model (see the Setting the Default Date Format Model example). You can change how a date is displayed by changing the NLS_DATE_FORMAT parameter.
package { import flash.text.TextField; import flash.display.Sprite; public class TextHello extends Sprite { public function TextHello() { var tf:TextField = new TextField(); tf.text = "Hello World!" tf.x = 50; tf...
Sometimes developers write some code that desires access to stage, or Flash stage, to add listeners. It can work for the first time, then all of a sudden fail to work and produce the error 1009. The code in question can even be on the timeline, as it's the first initiative to add code there, and man...
addEventListener(Event.ENTER_FRAME,moveChild); function moveChild(e:Event):void { childMC.x++; if (childMC.x>1000) { gotoAndStop(2); } } This example will move the childMC (added to Main at design time) but will instantly throw a 1009 as soon as gotoAndStop() is invok...
Get the list of inialized indexes in an array $ arr[2]='second' $ arr[10]='tenth' $ arr[25]='twenty five' $ echo ${!arr[@]} 2 10 25
If you have your data stored in a list and you want to convert this list to a data frame the do.call function is an easy way to achieve this. However, it is important that all list elements have the same length in order to prevent unintended recycling of values. dataList <- list(1:3,4:6,7:9) ...
OnClick Listener: @OnClick(R.id.login) public void login(View view) { // Additional logic } All arguments to the listener method are optional: @OnClick(R.id.login) public void login() { // Additional logic } Specific type will be automatically casted: @OnClick(R.id.submit) publi...
You can get list of available commands by following way: >>> python manage.py help If you don't understand any command or looking for optional arguments then you can use -h argument like this >>> python manage.py command_name -h Here command_name will be your desire command...
Descriptive statistics (mean, standard deviation, number of observations, minimum, maximum, and quartiles) of numerical columns can be calculated using the .describe() method, which returns a pandas dataframe of descriptive statistics. In [1]: df = pd.DataFrame({'A': [1, 2, 1, 4, 3, 5, 2, 3, 4, 1],...
In the app folder find package.json and modify the following line to include the latest version, save the file and close. "react-native": "0.32.0" In terminal: $ npm install Followed by $ react-native upgrade
You can also pattern match on Elixir Data Structures such as Lists. Lists Matching on a list is quite simple. [head | tail] = [1,2,3,4,5] # head == 1 # tail == [2,3,4,5] This works by matching the first (or more) elements in the list to the left hand side of the | (pipe) and the rest of the ...
Open the Settings or Preferences dialog: On Windows or Linux, select File > Settings from the main menu. On Mac OSX, select Android Studio > Preferences from the main menu. Navigate to Build, Execution, Deployment > Compiler. In the text field next to Command-line Options, enter...
Keyword lists are tuples of key/value, generally used as options for a function call. [{:a, 1}, {:b, 2}] // creates a non-empty keyword list Keyword lists can have the same key repeated more than once. [{:a, 1}, {:a, 2}, {:b, 2}] [{:a, 1}, {:b, 2}, {:a, 2}] Keys and values can be any type: ...
When Intel defined the original 8086, it was a 16-bit processor with a 20-bit address bus (see below). They defined 8 general-purpose 16-bit registers - but gave them specific roles for certain instructions: AX The Accumulator register. Many opcodes either assumed this register, or were faster i...
When Intel produced the 80386, they upgraded from a 16-bit processor to a 32-bit one. 32-bit processing means two things: both the data being manipulated was 32-bit, and the memory addresses being accessed were 32-bit. To do this, but still remain compatible with their earlier processors, they intro...

Page 21 of 109