Tutorial by Examples: l

Here's an example of a React component with a "managed" input field. Whenever the value of the input field changes, an event handler is called which updates the state of the component with the new value of the input field. The call to setState in the event handler will trigger a call to ...
ActionScript 2.0: _root.createTextField("message", 0, 5, 5, 300, 50); var tf:TextFormat = new TextFormat(); tf.color = 0xFF0000; tf.size = 32; tf.bold = true; message.setTextFormat(tf); message.text = "Hello World!"; First function creates a TextField named "mess...
We can use the get_bloginfo function to retrieve the email address of the site administrator. <?php echo get_bloginfo('admin_email'); ?>
To create a Hello World plug-in for Eclipse, click: File ➜ New ➜ Other... Select Plug-in Project and click Next > The New Plug-in Project wizard will guide you through the options for creating a new plug-in. Enter a project name (like HelloWorld), and click Next > On the Content pag...
For a non-main packages as well as main, instead of adding flags inside the code, write benchmarks in the test package , for example: func BenchmarkHello(b *testing.B) { for i := 0; i < b.N; i++ { fmt.Sprintf("hello") } } Then run the test with the profile flag ...
once a prof file has been generated, one can access the prof file using go tools: go tool pprof cpu.prof This will enter into a command line interface for exploring the profile Common commands include: (pprof) top lists top processes in memory (pprof) peek Lists all processes, use reg...
ember generate route foo --pod installing create app/pods/foo/route.js create app/pods/foo/template.hbs installing create tests/unit/pods/foo/route-test.js
var gulp = require('gulp'); // include plug-ins var uglify = require('gulp-uglify'), concat = require('gulp-concat'); // Minified file gulp.task('packjsMin', function() { return gulp.src('node_modules/angular/*.js') .pipe(concat('script.js')) .pipe(uglify()) .p...
Printing "hello world" on several languages on Maya on the console (Script Editor). MEL On a MEL tab on the Script Editor, or the command line bar, selecting MEL: print ("hello world"); And hit play on the script editor or enter key on the command line. PYTHON On a Python...
There are a few ways to setup a local copy of your Shopify theme: Node.js ( gulp/grunt ) Ruby Theme App ( Mac only ) There might be a few other ways, but I found the ruby way the most easy to work with. In order to work locally on the Shopify theme files you will need a few things: Ruby ...
You can use docker, without using docker daemon (engine), by using cloud providers. In this example, you should have a gcloud (Google Cloud util), that connected to your account docker-machine create --driver google --google-project `your-project-name` google-machine-type f1-large fm02 This exa...
grant all privileges on schema_name.* to 'new_user_name'@'%' identified by 'newpassword'; Attention: This can be used to create new root user
DROP TABLE Database.table_name
Given an m times n matrix A with n larger than m. The singular value decomposition [U,S,V] = svd(A); computes the matrices U,S,V. The matrix U consists of the left singular eigenvectors which are the eigenvectors of A*A.' while V consists of the right singular eigenvalues which are the eigenvec...
Template Generic Syntax template<typename T> void f(ParamType param); f(expr); Case 1: ParamType is a Reference or Pointer, but not a Universal or Forward Reference. In this case type deduction works this way. The compiler ignores the reference part if it exists in expr. The compiler t...
Server Application Session
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...
You can also use Laravel Artisan commands from your routes or controllers. To run a command using PHP code: Artisan::call('command-name'); For example, Artisan::call('db:seed');
Labels are used to provide additional information about something: Use the .label class, followed by one of the six contextual classes .label-default, .label-primary, .label-success, .label-info, .label-warning or .label-danger, within a <span> element to create a label: <h1>Example &...
There are two kinds of persistent storage modes in Redis: AOF and RDB. To temporarily disable RDB execute the following commands on the Redis command line: config set save "" to temporarily disable AOF execute the following from the Redis command line: config set appendonly no The...

Page 652 of 861