An example that shows the difference between creating a JavaScript class and subclass in ES5 and ES6.
| import React, { Component } from 'react'; | |
| import TextField from 'components/base/TextField'; | |
| const WAIT_INTERVAL = 1000; | |
| const ENTER_KEY = 13; | |
| export default class TextSearch extends Component { | |
| constructor(props) { | |
| super(); |
- adomokos/light-service
- Series of Actions with an emphasis on simplicity.
- collectiveidea/interactor
- Interactor provides a common interface for performing complex interactions in a single request. (Alert: this project seems to be inactive).
- cypriss/mutations
- Compose your business logic into commands that sanitize and validate input.
- orgsync/active_interaction
- Manage application specific business logic.
| <template lang='pug'> | |
| div.drop-zone(:class='{dragging: isDragging }' | |
| @dragover.prevent='dragover' | |
| @dragenter.prevent='dragover' | |
| @drop.prevent.stop='onDrop' | |
| @dragleave.prevent='dragleave') | |
| div(:class='{ hidden: uploadInProgress }' @click='openFileBrowser') | |
| slot | |
| i {{label}} | |
| input(type='file' :multiple='multiple' ref='input' style='display: none') |
-
When writing a string of multiple utility classes, always do so in an order with meaning. The "Concentric CSS" approach works well with utility classes (i.e,. 1. positioning/visibility 2. box model 3. borders 4. backgrounds 5. typography 6. other visual adjustments). Once you establish a familiar pattern of ordering, parsing through long strings of utility classes will become much, much faster so a little more effort up front goes a long way!
-
Always use fewer utility classes when possible. For example, use
mx-2instead ofml-2 mr-2and don't be afraid to use the simplerp-4 lg:pt-8instead of the longer, more complicatedpt-4 lg:pt-8 pr-4 pb-4 pl-4. -
Prefix all utility classes that will only apply at a certain breakpoint with that breakpoint's prefix. For example, use
block lg:flex lg:flex-col lg:justify-centerinstead ofblock lg:flex flex-col justify-centerto make it very clear that the flexbox utilities are only applicable at the
First your OpenCV should be compiled with CUDA (and OpenGL) support to test all this features. Detect your CUDA hardware with OpenCV CUDA by:
#include <iostream>
using namespace std;
#include <opencv2/core.hpp>
using namespace cv;
#include <opencv2/cudaarithm.hpp>
using namespace cv::cuda;