This will add a simple widget which displays just a small message.
add_action('wp_dashboard_setup', 'register_my_dashboard_widgets');
function register_my_dashboard_widgets() {
wp_add_dashboard_widget('myInfo_widget', 'Important Information', 'display_infoWidget');
}
...
In the following we will install Plesk Onyx on Windows Server (2016) using the Plesk Installer GUI.
Preparations
For installing Plesk we need a running Windows Server (2012/2016) installation. The Hardware recommendation is a minimum of 2GB RAM and 30GB free disk space. Have a look at the official...
The sample command can be used to simulate classic probability problems like drawing from an urn with and without replacement, or creating random permutations.
Note that throughout this example, set.seed is used to ensure that the example code is reproducible. However, sample will work without expl...
The set.seed function is used to set the random seed for all randomization functions. If you are using R to create a randomization that you want to be able to reproduce, you should use set.seed first.
set.seed(1643)
samp1 <- sample(x = 1:5,size = 200,replace = TRUE)
set.seed(1643)
samp2 <...
Create a new folder called MyClasses and create and add the following class
public class GmailEmailService:SmtpClient
{
// Gmail user-name
public string UserName { get; set; }
public GmailEmailService() :
base(ConfigurationManager.AppSettings["GmailHost"], Int32.Parse...
Set-Content -Path myfile.txt -Value 'PowerShell Rocks'
Write-S3Object -BucketName powershell -File myfile.txt
Uploading files from your local filesystem into AWS S3 is easy, using the Write-S3Object command. In its most basic form, you only need to specify the -BucketName parameter, to indicate ...
Get-S3Object -BucketName powershell | Remove-S3Object -Force
Remove-S3Bucket -BucketName powershell -Force
In order to remove a S3 bucket, you must first remove all of the S3 objects that are stored inside of the bucket, provided you have permission to do so. In the above example, we are retriev...
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...
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...