This function resolves the problem with different values in a function or class.
Example: We have a function with different parameters and descriptions like:
interface MyExample1 {
count: number;
cost: number;
}| /** | |
| * using this function to check if the text is overflowed and the ellipsis is active | |
| * | |
| * Example: (showing toltipe only if the title has a long text | |
| * const elmRef = useRef(null); | |
| * | |
| * conat onHover = useCallback(() => { | |
| * const isShowToltipe = isEllipsisActive(elmRef.current); | |
| * setShowToltipe(isShowToltipe) | |
| * }, []); |
This function resolves the problem with different values in a function or class.
Example: We have a function with different parameters and descriptions like:
interface MyExample1 {
count: number;
cost: number;
}| { | |
| devServer: { | |
| port: 9000, | |
| publicPath: '/', | |
| proxy: { | |
| '/oauth2': { | |
| target: { | |
| host: 'securehost.com', | |
| protocol: 'https:', | |
| port: 443, |
| /** | |
| function decorator | |
| **/ | |
| function runGenerator(g) { | |
| const it = g(); | |
| let ret; | |
| // asynchronously iterate over generator | |
| (function iterate(val) { | |
| ret = it.next(val); |
| 1. INSTALL as service *mvp-admin*: Run command `systemctl enable /srv/mvp-admin/server/systemd/<application>.service` | |
| 2. Enable control service from user: | |
| - Create file in `/etc/sudoers.d` with name user. Command: `touch /etc/sudoers.d/<user>` | |
| - Add to file some command: | |
| - %<user> ALL= NOPASSWD: /bin/systemctl stop <application> | |
| - %<user> ALL= NOPASSWD: /bin/systemctl start <application> | |
| - %<user> ALL= NOPASSWD: /bin/systemctl restart <application> | |
| 3. After any change in files <application>.service need restart systemd next command `systemctl daemon-reload` | |
| Now you can constrol service from user: |
| string.toLowerCase().replace(/[-_]+(.)?/g, (match, group) => group ? group.toUpperCase() : '') | |
| /* | |
| Incoming string like Data_Example-string out string dataExampleString | |
| */ |
| <!doctype html> | |
| <html lang="en" ng-app="plannerApp"> | |
| <head> | |
| <title>IT talk - DataArt - Voronezh - Trip Planner</title> | |
| <link rel="stylesheet" | |
| href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
| <link rel="stylesheet" | |
| href="https://rawgit.com/kuhnza/angular-google-places-autocomplete/master/dist/autocomplete.min.css"> |
| { | |
| "presets": ["es2015", "stage-0", "react"], | |
| "env": { | |
| "development": { | |
| "plugins": [ | |
| ["react-transform", { | |
| "transforms": [{ | |
| "transform": "react-transform-hmr", | |
| "imports": ["react"], | |
| "locals": ["module"] |