Tutorial by Examples: cm

EXEC sp_configure 'xp_cmdshell', 1 GO RECONFIGURE
Haskell supports importing a subset of items from a module. import qualified Data.Stream (map) as D would only import map from Data.Stream, and calls to this function would require D.: D.map odd [1..] otherwise the compiler will try to use Prelude's map function.
Modules are defined in a file named module-info.java, named a module descriptor. It should be placed in the source-code root: |-- module-info.java |-- com |-- example |-- foo |-- Foo.java |-- bar |-- Bar.java Here is a simple module descri...
MailApp is the api from Google App Script that can be used to send mail function sendEmails() { var subject = "A subject for your new app!"; var message = "And this is the very first message" var recipientEmail = "[email protected]"; MailApp.sendEmail(rec...
echo off cls sqlcmd.exe -S "your server name" -U "sql user name" -P "sql password" -d "name of databse" -Q "here you may write your query/stored procedure" Batch files like these can be used to automate tasks, for example to make backups of ...
Python changed it's sorting methods to accept a key function. Those functions take a value and return a key which is used to sort the arrays. Old comparison functions used to take two values and return -1, 0 or +1 if the first argument is small, equal or greater than the second argument respectivel...
A class or struct can have member functions as well as member variables. These functions have syntax mostly similar to standalone functions, and can be defined either inside or outside the class definition; if defined outside the class definition, the function's name is prefixed with the class' nam...
Often one want to show the result of a command executed by root to other users. The tee command allows easily to write a file with user perms from a command running as root: su -c ifconfig | tee ~/results-of-ifconfig.txt Only ifconfig runs as root.
If you want to use "cmake" (see www.cmake.org), type cd [your libpng source directory] cmake . -DCMAKE_INSTALL_PREFIX=/path make make install where "/path" points to the installation directory where you want to put the libpng "lib", "include", and &quot...
class MyClass { static function my_init_method() { // do something here } } add_action( 'init', array( 'MyClass', 'my_init_method' ) ); Using a static method of a class to hook a set of instructions. With the init hook, the set of instructions will be executed right after w...
This example shows how to use the Firebase Cloud Messaging(FCM) platform. FCM is a successor of Google Cloud Messaging(GCM). It does not require C2D_MESSAGE permissions from the app users. Steps to integrate FCM are as follows. Create sample hello world project in Android Studio Your Android...
Such Example is knowing wide spreading among PWAs (Progressive Web Applications) and in this example we're going to send a simple Backend like notification using NodeJS and ES6 Install Node-GCM Module : npm install node-gcm Install Socket.io : npm install socket.io Create a GCM Enable...
mongodump --db mydb --gzip --out "mydb.dump.$(date +%F_%R)" This command will dump a bson gzipped archive of your local mongod 'mydb' database to the 'mydb.dump.{timestamp}' directory
mongorestore --db mydb mydb.dump.2016-08-27_12:44/mydb --drop --gzip This command will first drop your current 'mydb' database and then restore your gzipped bson dump from the 'mydb mydb.dump.2016-08-27_12:44/mydb' archive dump file.
The default way to find installed packages with CMake is the use the find_package function in conjunction with a Find<package>.cmake file. The purpose of the file is to define the search rules for the package and set different variables, such as <package>_FOUND, <package>_INCLUDE_D...
Abstract base classes (ABCs) enforce what derived classes implement particular methods from the base class. To understand how this works and why we should use it, let's take a look at an example that Van Rossum would enjoy. Let's say we have a Base class "MontyPython" with two methods (jo...
The iv is prefixed to the encrypted data aesCBC128Encrypt will create a random IV and prefixed to the encrypted code. aesCBC128Decrypt will use the prefixed IV during decryption. Inputs are the data and key are Data objects. If an encoded form such as Base64 if required convert to and/or from in ...
You should have a plain CMake project myproject, and we are going to make an Eclipse workspace outside of it: myproject/ .git/ CMakeLists.txt src/ main.cpp workspace/ myproject/ Release/ Debug/ Qt (optional) Get latest Eclipse ...
The iv is prefixed to the encrypted data aesCBC128Encrypt will create a random IV and prefixed to the encrypted code. aesCBC128Decrypt will use the prefixed IV during decryption. Inputs are the data and key are Data objects. If an encoded form such as Base64 if required convert to and/or from in ...
Command Structure is sqlcmd -S yourservername\instancename -d database_name -o outputfilename_withpath -Q "your select query" Switches are as follows -S for servername and instance name -d for source database -o for target outputfile (it will create output file) -Q fo...

Page 5 of 8