Use the GitHub repository to get the entire code:
https://github.com/firebase/functions-samples/blob/master/quickstarts/email-users
Copy or clone the repository in your computer.
Now go to your Firebase Console
Create a Firebase Project using the Firebase Console.
Enable the Google Provid...
This macro gives the output of a given line as the last argument of the next line function call. For e.g.
(prn (str (+ 2 3)))
is same as
(->> 2
(+ 3)
(str)
(prn))
If you add this to your functions.php it removes the WordPress version number from the RSS feed and the header.
function remove_wordpress_ver() {
return '';
}
add_filter('the_generator', 'remove_wordpress_ver', 999);
This macro gives the output of a given line as the first argument of the next line function call. For e.g.
(rename-keys (assoc {:a 1} :b 1) {:b :new-b}))
Can't understand anything, right? Lets try again, with ->
(-> {:a 1}
(assoc :b 1) ;;(assoc map key val)
(rena...
Below code represents an example of Opt-Out approach using Serializable and NonSerialized attributes.
/// <summary>
/// Represents a student.
/// </summary>
[Serializable]
public class Student
{
/// <summary>
/// Gets or sets student number.
/// </summary>...
This will be our example data frame:
df = pd.DataFrame({"color": ['red', 'blue', 'red', 'blue']},
index=[True, False, True, False])
color
True red
False blue
True red
False blue
Accessing with .loc
df.loc[True]
color
True red
True red
...
This will be our example data frame:
color name size
0 red rose big
1 blue violet big
2 red tulip small
3 blue harebell small
Using the magic __getitem__ or [] accessor. Giving it a list of True and False of the same length as the dataframe will give you:
...
This will be our example data frame:
color name size
0 red rose big
1 blue violet small
2 red tulip small
3 blue harebell small
Accessing a single column from a data frame, we can use a simple comparison == to compare every element in the column to the given...
This will be our example data frame:
color size
name
rose red big
violet blue small
tulip red small
harebell blue small
We can create a mask based on the index values, just like on a column value.
rose_mask = df.index == 'rose'
df[rose_mask...
Let's consider this example, that outputs the squares of the numbers 3, 5, and 7:
let nums = [3, 5, 7]
let squares = nums.map(function (n) {
return n * n
})
console.log(squares)
Run in RunKit
The function passed to .map can also be written as arrow function by removing the function keywor...
/* @flow */
function product(a: number, b: number){
return a * b;
}
const b = 3;
let c = [1,2,3,,{}];
let d = 3;
import request from 'request';
request('http://dev.markitondemand.com/MODApis/Api/v2/Quote/json?symbol=AAPL', (err, res, payload)=>{
payload = JSON.parse(payload);...