Tutorial by Examples: ad

If necessary, change to your project directory cd MyAwesomeProject 1- Add accounts packages: meteor add accounts-base accounts-password react-meteor-data 2- Add the routes to login and signup pages in imports/startup/Routes.jsx The render() method will be as follows: render() { return ( ...
1- Add roles package ( https://github.com/alanning/meteor-roles) meteor add alanning:roles 2- Create some roles constants. In file imports/api/accounts/roles.js const ROLES = { ROLE1: 'ROLE1', ROLE2: 'ROLE2', ADMIN: 'ADMIN' }; export default ROLES; 3- I'll not show how to add/upda...
Open Visual Studio Select File --> New --> Project menu or push Ctrl + Shift + N buttons Select Outlook VSTO Add-in template Add the following code to the project: private void ThisAddIn_Startup(object sender, System.EventArgs e) { MessageBox.Show("Hel...
import java.sql.*; class Rsmd { public static void main(String args[]) { try { Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con = DriverManager.getConnection( "jdbc:oracle:thin:@localhost:1521:xe", ...
I am assuming that you have aware about the some syntax of Kotlin and how to use, just add RecyclerView in activity_main.xml file and set with adapter class. class MainActivity : AppCompatActivity(){ lateinit var mRecyclerView : RecyclerView val mAdapter : RecyclerAdapter = ...
In your JS File add this option to your datatable: buttons: [ 'excel', 'pdf', 'copy' ] It will look like: $('#yourTableID').DataTable({ buttons: [ 'excel', 'pdf', 'copy' ] }); Add the necessary css files for the datatable with the buttons: <link rel="stylesheet" type=&quo...
Suppose that you need to define a dropdown menu for a particular Acumatica screen, such as the Reports menu on the following screenshot. This can be achieved in three different ways: By adding a toolbar with a menu item to the screen's ASPX By declaring a special "folder" action to ...
Deque deque = new LinkedList(); //Adding element at tail deque.add("Item1"); //Adding element at head deque.addFirst("Item2"); //Adding element at tail deque.addLast("Item3");
# not all of this is required, but just here for reference bl_info = { "name": "Hello World", # name of the add-on "author": "Blender developer", # name of the author "version": (1, 0), ...
When a Qt event loop is used to perform operations and a non-Qt-saavy user needs to interact with that event loop, writing the slot to handle regular invocations from another thread can simplify things for other users. main.cpp: #include "OperationExecutioner.h" #include <QCoreApplic...
type contextKey string const ( // JWTTokenContextKey holds the key used to store a JWT Token in the // context. JWTTokenContextKey contextKey = "JWTToken" // JWTClaimsContextKey holds the key used to store the JWT Claims in the // context. JWTClaimsContex...
1.vim ~/.bash_profile The file may not exist (if not, you can just create it). 2.type in this and save the file: export PATH=$PATH:YOUR_PATH_HERE
The key of parallelism is to use multiple threads to solve a problem (duh.) but there are some differences to classical multithreaded programming in how threads are organized. First lets talk about your typical GPU, for simplicities sake I'll focus on A GPU has many processing cores, which make it...
To read an array from the device back to the host, one calls clEnqueueReadBuffer($queue, $memobj, $blocking, $offset, $size, $target, 0, null, null); The $queue is the CommandQueue which was used to allocate the memory on the device. The $memobj contains the address to the device memory, $offset...
Reading an image is almost like reading an array. The only difference beeing that the size and offset need to be three-dimensional. clEnqueueReadImage($queue, $memobj, $blocking, $offset, $size, $stride, $slice_pitch, $target, 0, null, null); The $stride defines how many bytes a row has. Normall...
// ember-cli-build.js /* global require, module */ var EmberApp = require('ember-cli/lib/broccoli/ember-app'); module.exports = function(defaults) { var app = new EmberApp(defaults, { // Add options here 'ember-cli-foundation-6-sass': { 'foundationJs': [ ...
To add visual feedback to the cursor to show when the cursor is clicking or fusing, we can use the animation system. When the cursor intersects the entity, it will emit an event, and the animation system will pick up event with the begin attribute: <a-entity cursor="fuse: true; fuseTimeout:...
_id is a 12 bytes hexadecimal number which assures the uniqueness of every document. You can provide _id while inserting the document. If you didn't provide then MongoDB provide a unique id for every document. These 12 bytes first 4 bytes for the current timestamp, next 3 bytes for machine id, next ...
Install properties reader: npm install properties-reader --save Create a directory env to store your properties files: mkdir env Create environments.js: process.argv.forEach(function (val, index, array) { var arg = val.split("="); if (arg.length > 0) { ...
In this example, we take a sine curve plot and add more features to it; namely the title, axis labels, title, axis ticks, grid and legend. # Plotting tutorials in Python # Enhancing a plot import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2.0*np.pi, 101) y = np.sin(x) ...

Page 109 of 114