This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const flatten = list => list.reduce( | |
| (a, b) => a.concat(Array.isArray(b) ? flatten(b) : b), [] | |
| ) | |
| const array = [[1,2,[3]],4] | |
| flatten(array) // [ 1, 2, 3, 4 ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # in real life you probably won't store the file on disk, you'll just let users upload it in phoenix | |
| # and have it's value available as a variable | |
| alias NimbleCSV.RFC4180, as: CSV | |
| # if you're reading from disk | |
| "path/to/csv/file" | |
| |> File.stream!(read_ahead: 100_000) | |
| |> CSV.parse_stream | |
| |> Stream.map(fn [name, age] -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export M2_HOME=/usr/local/apache-maven/apache-maven-3.2.5 | |
| export M2=$M2_HOME/bin | |
| export MAVEN_OPTS="-Xms256m -Xmx512m" | |
| export PATH=$M2:$PATH | |
| JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <h1>${message}</h1> | |
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Zens-MacBook-Air z/webpack_integration ‹master*› » mix phoenix.server 1 ↵ | |
| [info] [Porcelain]: goon executable not found | |
| [info] [Porcelain]: falling back to the basic driver. | |
| [info] [Porcelain]: (set `config :porcelain, driver: Porcelain.Driver.Basic` or `config :porcelain, goon_warn_if_missing: false` to disable this warning) | |
| [info] Running WebpackIntegration.Endpoint with Cowboy using http on port 4000 | |
| /usr/local/lib/node_modules/react-stdio/server.js:41 | |
| let render | |
| ^^^ | |
| SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rotocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:523) [hornetq-core-client-2.3.20.Final-redhat-1.jar:2.3.20.Final-redhat-1] | |
| at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:564) [hornetq-server-2.3.20.Final-redhat-1.jar:2.3.20.Final-redhat-1] | |
| at org.hornetq.core.remoting.impl.invm.InVMConnection$1.run(InVMConnection.java:159) [hornetq-server-2.3.20.Final-redhat-1.jar:2.3.20.Final-redhat-1] | |
| at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:105) [hornetq-core-client-2.3.20.Final-redhat-1.jar:2.3.20.Final-redhat-1] | |
| at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55] | |
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55] | |
| at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55] | |
| 03:54:55,882 ERROR [org.hornetq.core.server] (Thread-2231 (HornetQ-remoting-threads |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function say(word) { | |
| console.log(word); | |
| } | |
| function execute(someFunction, value) { | |
| someFunction(value); | |
| } | |
| execute(say, "Hello"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function say(word) { | |
| console.log(word); | |
| } | |
| function execute(someFunction, value) { | |
| someFunction(value); | |
| } | |
| execute(say, "Hello"); |