Tutorial by Examples: dp

roslaunch is an important tool that manages the start and stop of ROS nodes. It takes one or more "*.launch" files as arguments. For this example, I will refer to the following (as asked in this question), so how can we execute those commands consecutively & automatically : roscd ste...
It is important to read the error response that is returned by the Google Analytics API server. In a lot of cases they can tell you exactly what is wrong. 400 invalidParameter { "error": { "errors": [ { "domain": "global", "reason&...
To generate keys for SSH client: ssh-keygen [-t rsa | rsa1 | dsa ] [-C <comment>] [-b bits] For example: ssh-keygen -t rsa -b 4096 - C [email protected] Default location is ~/.ssh/id_rsa for private and ~/.ssh/id_rsa.pub for public key. For more info, please visit man.openbsd.org
A palindrome is a word that can be read both ways, like 'kayak'. This example will show how to find if a given word is a palindrome using Python3. First, we need to turn a string into a stack (we will use arrays as stacks). str = "string" stk = [c for c in str] #this makes an array: [&...
To check the list of loaded packages search() OR (.packages())
When you install WordPress to your server, the installation script will place a prefix in front of all the WordPress MySQL table names. This prefix is set to 'wp_' by default. The WordPress posts table will be called wp_posts for example. By changing the table prefix you can create some security by ...
I have tested the following steps on Amazon EC2 with Ubuntu 14.04 Here is a summary of command lines to install LAMP technology stack (before installing wordpress): 1: Install LAMP technology stack Update linux #> sudo apt-get update -> update package repositories information #> su...
Sometimes you have sensitive information in your VBA (e.g., passwords) that you don't want users to have access to. You can achieve basic security on this information by password-protecting your VBA project. Follow these steps: Open your Visual Basic Editor (Alt + F11) Navigate to Tools -> V...
public async Task SetProductInactiveAsync(int productId) { using (IDbConnection con = new SqlConnection("myConnectionString")) { await con.ExecuteAsync("SetProductInactive", new { id = productId }, commandType: CommandType.StoredProcedure); ...
const process = require('process'); const rl = require('readline').createInterface(process.stdin, process.stdout); rl.pause(); console.log('Something long is happening here...'); var cliConfig = { promptPrefix: ' > ' } /* Commands recognition BEGIN */ var commands = {...
There are important changes in how we use and declare default props and their types. React.createClass In this version, the propTypes property is an Object in which we can declare the type for each prop. The getDefaultProps property is a function that returns an Object to create the initial props....
Often we will want to build custom UI pages in NetSuite; enter the Suitelet. The Suitelet script is designed for building internal, custom UI pages. Pages can be free-form HTML, or they can utilize NetSuite's UI Builder APIs to construct forms that follow NetSuite's look and feel. When it is deploy...
Developers can use admin_bar_menu action to remove items from WordPress admin bar or toolbar. add_action('admin_bar_menu', 'remove_wp_logo_from_admin_bar', 999); function remove_wp_logo_from_admin_bar( $wp_admin_bar ) { $wp_admin_bar->remove_node('wp-logo'); } Above code removes WordPr...
No matter how many problems you solve using dynamic programming(DP), it can still surprise you. But as everything else in life, practice makes you better. Keeping these in mind, we'll look at the process of constructing a solution for DP problems. Other examples on this topic will help you understan...
For getting plural form of any English word the plural($string) function is handy. Like singular($string), the function plural($string) also return string result. echo plural("book"); //prints 'books'
File descriptors and FILE objects are per-process resources that cannot themselves be exchanged between processes via ordinary I/O. Therefore, in order for two distinct processes to communicate via an anonymous pipe, one or both participating processes must inherit an open pipe end from the process...
Connecting two child processes via a pipe is performed by connecting each of two children to the parent via different ends of the same pipe. Usually, the parent will not be party to the conversation between the children, so it closes its copies of both pipe ends. int demo() { int pipefds[2]; ...
The simplest react component without a state and no properties can be written as: import * as React from 'react'; const Greeter = () => <span>Hello, World!</span> That component, however, can't access this.props since typescript can't tell if it is a react component. To access ...
//create a new ExcelPackage using (ExcelPackage excelPackage = new ExcelPackage()) { //the query or stored procedure name for the database string sqlQuery = "SELECT * FROM myTable"; //create a datatable DataTable dataTable = loadExternalDataSet(sqlQuery); //c...

Page 16 of 21