Tutorial by Examples: cs

Processing tabular data with awk is very easy, provided that the input is correctly formatted. Most software producing tabular data use specific features of this family of formats, and awk programs processing tabular data are often specific to a data produced by a specific software. If a more gener...
The first step to logging is simply to run Meteor from the shell, and you'll get the server logs in the command console. meteor The next step is to pipe the contents of std_out and std_err to a logfile, like so: meteor > my_app_log.log 2> my_app_err.log
BroadcastReceivers are used to receive broadcast Intents that are sent by the Android OS, other apps, or within the same app. Each Intent is created with an Intent Filter, which requires a String action. Additional information can be configured in the Intent. Likewise, BroadcastReceivers register ...
CSS and JS files should be reside under 'static' directory in the root directory of module (the rest of subdirectory tree under 'static' is an optional convention): static/src/css/your_file.css static/src/js/your_file.js Then add links to these files unsing one of the 3 ways listed in the fol...
Odoo v8.0 way is to add corresponding record in the XML file: ​Add XML file to the manifest (i.e. __openerp__.py file.): ... 'data' : [ 'your_file.xml' ], ​... Then add following record in 'your_file.xml': <openerp> <data> <template id="...
Note: you should use this way if you've installed a "website" module and you have a public website available. Add following record in 'your_file.xml': <openerp> <data> <template id="assets_frontend" name="your_module_name assets" inherit...
Add following record in 'your_file.xml': <openerp> <data> <template id="assets_common" name="your_module_name assets" inherit_id="web.assets_common"> <xpath expr="." position="inside"> <link rel...
Elasticsearch uses a YAML (Yet Another Markup Language) configuration file that can be found inside the default Elasticsearch directory (RPM and DEB installs change this location amongst other things). You can set basic settings in config/elasticsearch.yml: # Change the cluster name. All nodes in ...
CSS Getter The .css() getter function can be applied to every DOM element on the page like the following: // Rendered width in px as a string. ex: `150px` // Notice the `as a string` designation - if you require a true integer, // refer to `$.width()` method $("body").css("width...
You can quit Emacs with the following keybinding: C-x C-c Where C is the control key. Suspend Emacs You can suspend Emacs using the following keybinding : C-z It gets you back to your shell. If you want to resume your emacs session, enter fg in your terminal.
This is an example of using Android Support Library V7 RecyclerView. Support libraries are generally recommended because they provide backward-compatible versions of new features, provide useful UI elements that are not included in the framework, and provide a range of utilities that apps can draw o...
The sum of the geometric series r0 + r1 + r2 + ... + rn-1 In the case where r ≠ 1, simplifies to (rn - 1) / (r - 1). If r < 1, this sum is bounded from above by 1 / (1 - r). If r = 1, this sum is rn.
A texture is a form of data storage that allows convenient access not just to particular data entries, but also to sample points mixing (interpolating) multiple entries together. In OpenGL textures can be used for many things, but most commonly it's mapping an image to a polygon (for example a tria...
Const zipCode As Long = 10012 Dim zipCodeText As String 'Convert the zipCode number to a string of digit characters zipCodeText = CStr(zipCode) 'zipCodeText = "10012"
CSRF is an attack which forces end user to execute unwanted actions on a web application in which he/she is currently authenticated. It can happen because cookies are sent with every request to a website - even when those requests come from a different site. We can use csurf module for creating cs...
While redux itself is entirely synchronous, you can use a middleware such as redux-thunk to handle asynchronous actions. A "thunk" is another name for a callback. It is a function that is usually passed as an argument to be called at a later time. To use, apply the middleware to you...
An Interface's function known as a "contract" of functionality. It means that it declares properties and methods but it doesn't implement them. So unlike classes Interfaces: Can't be instantiated Can't have any functionality Can only contain methods * (Properties and Events are metho...
If your application is going to run on different devices, it's going to need to render to different ViewPorts, based on the device size. You can deal with this in two ways: with javascript rules, or CSS media styles. If you've been using a MVC or MVVM library, such as Angular or Ember (or Blaze, for...
With the power of regex comes great responsibility.... db.posts.find({'text': /.*foo.*|.*bar.*/i})
Here is a basic setting of the Header to change to a new page when a button is clicked. if(isset($_REQUEST['action'])) { switch($_REQUEST['action']) { //Setting the Header based on which button is clicked case 'getState': header("Location: http://NewPageForSta...

Page 9 of 24