In your command-line run the following commands:
brew doctorbrew update
| from selenium import webdriver | |
| from selenium.webdriver.common.keys import Keys | |
| import time | |
| import random | |
| import sys | |
| def print_same_line(text): | |
| sys.stdout.write('\r') | |
| sys.stdout.flush() |
In your command-line run the following commands:
brew doctorbrew updateprettier-eslint |
eslint-plugin-prettier |
eslint-config-prettier |
|
|---|---|---|---|
| What it is | A JavaScript module exporting a single function. | An ESLint plugin. | An ESLint configuration. |
| What it does | Runs the code (string) through prettier then eslint --fix. The output is also a string. |
Plugins usually contain implementations for additional rules that ESLint will check for. This plugin uses Prettier under the hood and will raise ESLint errors when your code differs from Prettier's expected output. | This config turns off formatting-related rules that might conflict with Prettier, allowing you to use Prettier with other ESLint configs like eslint-config-airbnb. |
| How to use it | Either calling the function in your code or via [prettier-eslint-cli](https://github.co |
I was trying to solve an issue with starting the ExpressJS server before each single test and closing it after each test completes, just to make sure each test is running under the same conditions.
Here is the error I ran into while trying to run the tests
$ ./node_modules/jasmine/bin/jasmine.js
Started
started
Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.
All files were downloaded from https://cdnjs.com and named accordingly.
Output from ls command is stripped out (irrelevant stuff)
$ ls -lhS
566K Jan 4 22:03 angular2.min.js
| class myDirective { | |
| constructor(userService) { | |
| this.template = `<div>{{fullName}}</div>`; | |
| this.restrict = 'E'; | |
| this.scope = { | |
| user: '=' | |
| }; | |
| this.link = function(scope, element) { | |
| scope.fullName = userService.getFullName(scope.user); | |
| }; |
| from json import dumps | |
| from flask import Flask, request, redirect, session, url_for | |
| from flask.json import jsonify | |
| from requests_oauthlib import OAuth2Session | |
| app = Flask(__name__) | |
| # Ignore this, only used as basic doc string template creator. | |
| def docstring_templator(f): |
| /* Polyfill indexOf. */ | |
| var indexOf; | |
| if (typeof Array.prototype.indexOf === 'function') { | |
| indexOf = function (haystack, needle) { | |
| return haystack.indexOf(needle); | |
| }; | |
| } else { | |
| indexOf = function (haystack, needle) { | |
| var i = 0, length = haystack.length, idx = -1, found = false; |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |