Tutorial by Examples: c

To add for instance a directory scripts to the distribution package: Add to the project a folder scripts On top of the build.sbt, add: import NativePackagerHelper._ In build.sbt, add a mapping to the new directory: mappings in Universal ++= directory("scripts") B...
Server side Meteor.methods({ getData() { return 'Hello, world!'; } }); Client side <template name="someData"> {{#if someData}} <p>{{someData}}</p> {{else}} <p>Loading...</p> {{/if}} </template> Template.someData.on...
LaraDock is a Laravel Homestead like development environment but for Docker instead of Vagrant. https://github.com/LaraDock/laradock Installation *Requires Git and Docker Clone the LaraDock repository: A. If you already have a Laravel project, clone this repository on your Laravel root director...
Use Ember CLI to generate a new helper in your app: ember generate helper format-currency Then edit helpers/format-currency.js to contain the following: import Ember from 'ember'; export function formatCurrency([value, ...rest]) { const dollars = Math.floor(value / 100); const cents = va...
- Initially check your E-Mail Settings In Odoo go to Settings --> Email . Enter the field values in "Incoming Mail Servers" & "Outgoing Mail Servers" Options.
Retrieves the information pertaining to the currently logged in user, and places it in the global variable $current_user This function does not accept any parameters. Usage: <?php wp_get_current_user(); ?> Example: <?php $current_user = wp_get_current_user(); echo 'Usernam...
It's quite common to want to check the status of the various partitions/drives on your server/computer to see how full they are. The following command is the one you'll want to run: df -h This will produce output similar to the following: [root@mail ~]# df -h Filesystem Size Used A...
Defining an element with no content. <dom-module id="empty-element"> <template> <style> </style> </template> <script> Polymer({ is: 'empty-element', }); </script> </dom-module> And then you can ...
// GET: Student/Edit/5 // It is receives a get http request for the controller Student and Action Edit with the id of 5 public ActionResult Edit(int? id) { // it good practice to consider that things could go wrong so,it is wise to have a validation in the controller ...
A frequent reason why your read operation may not work is because your security rules reject the operation, for example because you're not authenticated (by default a database can only be accessed by an authenticated user). You can see these security rule violations in the logcat output. But it's e...
(ns so-doc.events (:require [goog.dom :as dom] [goog.events :as events])) (defn handle-click [event] ;an event object is passed to all events (js/alert "button pressed")) (events/listen (dom/getElement "button"); This is the dom element the event comes fro...
(ns so-doc.events) (enable-console-print!) (defn click-event [] (println "Button clicked")) (defn load-event [] (println "Page loaded!") (.addEventListener (.getElementById js/document "btn") "click" click-event false)) (.addEventListener ...
$collection = Mage::getModel('catalog/product') ->getCollection() ->setPageSize(20) ->setCurPage(1);
Large scale applications often need different properties when running on different environments. we can achieve this by passing arguments to NodeJs application and using same argument in node process to load specific environment property file. Suppose we have two property files for different enviro...
Provide an interface for creating families of related or dependent objects without specifying their concrete classes. In this example demonstrates the creation of different animal worlds for a computer game using different factories. Although the animals created by the Continent factories are diffe...
function positive() { return 0 } function negative() { return 1 }
if true; then echo Always executed fi if false; then echo Never executed fi
Search role in Ansible Galaxy ansible-galaxy search role_name Install role from Ansible Galaxy ansible-galaxy install role_name More help ansible-galaxy --help
Show how to use cv::VideoCapture with e.g. a webcam. Capturing frames from webcam and display it. Here is the example code: #include <iostream> #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/core/core.hpp" ...
using System; using Xamarin.Forms; namespace contact_picker { public class App : Application { public App () { // The root page of your application MainPage = new MyPage(); } protected override void OnStart () ...

Page 563 of 826