These specify what I can do with an object. They are specified on object level but can be used on variable level to constrain objects passed to stuff.
I own the thing. It is my thing. I am free
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>Setting properties - Object.assign vs assignment</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
| <script src="./suite.js"></script> | |
| </head> | |
| <body> | |
| <h1>Open the console to view the results</h1> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>Delete vs undefined</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
| <script src="./suite.js"></script> | |
| </head> | |
| <body> | |
| <h1>Open the console to view the results</h1> |
| #!/usr/local/bin/fish | |
| # should be 0 at the end of the file | |
| set num_errors 0 | |
| # is the file a JS test? | |
| function is_test -a file | |
| echo $file | egrep '(src\/test\/js|\.spec\.js$)' > /dev/null | |
| return $status | |
| end |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>Iteration stuff</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
| <script src="./suite.js"></script> | |
| </head> | |
| <body> | |
| <h1>Open the console to view the results</h1> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>Object.values is slow</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
| <script src="./suite.js"></script> | |
| </head> | |
| <body> | |
| <h1>Open the console to view the results</h1> |
| "scripts": { | |
| "serve-dev-secure": "cross-env NODE_ENV=development webpack-dev-server --inline --hot --progress --https --cert certs/cert.pem --key certs/key.pem", | |
| "make-certs": "mkdir -p certs && openssl req -x509 -newkey rsa:4096 -keyout certs/key.pem -out certs/cert.pem -days 365 -nodes -subj '/CN=localhost'" | |
| } |
| <?php | |
| /** | |
| * Hacks around the fact that there isn't a good shell-style argument lexer | |
| * for PHP by using the Python one. | |
| * One argument: the line to parse as a shell line. | |
| * Returns: An array such that: | |
| * 'foo --bar baz\ foo "/bar/foo man/quux"' → ['foo', '--bar', 'baz foo', '/bar/foo man/quux'] | |
| * Caveat: no error handling. Depends on /usr/bin/python3 being python. It's horrible. | |
| */ | |
| function hack_shlex($str) { |
| import static java.lang.annotation.ElementType.FIELD; | |
| import static java.lang.annotation.RetentionPolicy.RUNTIME; | |
| import java.lang.annotation.Retention; | |
| import java.lang.annotation.Target; | |
| @Retention(RUNTIME) | |
| @Target(FIELD) | |
| public @interface Column { | |
| String name(); |
| import java.util.ArrayList; | |
| import java.util.Collection; | |
| import java.util.HashSet; | |
| import java.util.Scanner; | |
| public class SetOfLists { | |
| private static | |
| <COLL_INNER extends Collection<Integer>, COLL_OUTER extends Collection<COLL_INNER>> | |
| COLL_OUTER collectionOfCollections(Scanner in, Class<COLL_OUTER> OuterCollection, Class<COLL_INNER> InnerCollection) | |
| throws InstantiationException, IllegalAccessException { |