Tutorial by Examples: console

Download the Datastax PHP driver for Apache Cassandra from the Git project site, and follow the installation instructions. We will be using the "users" table from the KillrVideo app and the Datastax PHP driver. Once you have Cassandra up and running, create the following keyspace and tabl...
Writes an error message to the console if the assertion is false. Otherwise, if the assertion is true, this does nothing. console.assert('one' === 1); Multiple arguments can be provided after the assertion–these can be strings or other objects–that will only be printed if the assertion is fals...
In many environments, you have access to a global console object that contains some basic methods for communicating with standard output devices. Most commonly, this will be the browser's JavaScript console (see Chrome, Firefox, Safari, and Edge for more information). // At its simplest, you can 'l...
NativeScript’s global console variable lets you print values to your terminal for debugging. The simplest usage is passing a value to the console.log() function: console.log("hello world"); The console object has several other methods, including dump(), trace(), assert() and more. // ...
Instrument your code with console.trace() calls that print current JavaScript call stacks:
Place assertions in your JavaScript code by calling console.assert() with the error condition as the first parameter. When this expression evaluates to false, you will see a corresponding console record:
The method PrintWriter.format (called through System.out.format) can be used to print aligned strings in console. The method receives a String with the format information and a series of objects to format: String rowsStrings[] = new String[] {"1", &q...
Sometimes you might accidentally run something in the shell that ends up waiting forever, and thus blocking the shell: iex(2)> receive do _ -> :stuck end In that case, press Ctrl-g. You'll see: User switch command Enter these commands in order: k (to kill the shell process) s (to st...
Sometimes one has to work with pages that are not using jQuery while most developers are used to have jQuery handy. In such situations one can use Chrome Developer Tools console (F12) to manually add jQuery on a loaded page by running following: var j = document.createElement('script'); j.onload ...
Many of the console's print methods can also handle C-like string formatting, using % tokens: console.log('%s has %d points', 'Sam', 100); Displays Sam has 100 points. The full list of format specifiers in Javascript is: SpecifierOutput%sFormats the value as a string%i or %dFormats the value a...
You can clear the console window using the console.clear() method. This removes all previously printed messages in the console and may print a message like "Console was cleared" in some environments.
console.dir(object) displays an interactive list of the properties of the specified JavaScript object. The output is presented as a hierarchical listing with disclosure triangles that let you see the contents of child objects. var myObject = { "foo":{ "bar":"d...
Create a new project.json and example Program.cs: dotnet new Restore needed packages: dotnet restore Compile and run the example: dotnet run
Printing webview console messages to logcat To handle console messages from web page you can override onConsoleMessage in WebChromeClient: final class ChromeClient extends WebChromeClient { @Override public boolean onConsoleMessage(ConsoleMessage msg) { Log.d( &quot...
In order to use a plain-text editor to create a Console application that is written in C#, you'll need the C# Compiler. The C# Compiler (csc.exe), can be found at the following location: %WINDIR%\Microsoft.NET\Framework64\v4.0.30319\csc.exe N.B. Depending upon which version of the .NET Framework t...
Given you've already installed composer up and running and it's accessible globally, you can simply create new Symfony projects as stated in the official documentation. Now you can create a new Symfony project with composer: composer create-project symfony/framework-standard-edition my_project_nam...
View tables ActiveRecord::Base.connection.tables Delete any table. ActiveRecord::Base.connection.drop_table("users") ------------OR---------------------- ActiveRecord::Migration.drop_table(:users) ------------OR--------------------- ActiveRecord::Base.connect...
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 = {...
PS> console_app.exe PS> & console_app.exe PS> Start-Process console_app.exe
PS> $ErrorActionPreference = "Continue" (1) PS> & console_app.exe *>&1 | % { $_ } (2) PS> & console_app.exe *>&1 | ? { $_ -is [System.Management.Automation.ErrorRecord] } (3) PS> & console_app.exe *>&1 | ? { $_ -is [System.Management.Automati...

Page 2 of 3