$ sed -i '1s/^/\xef\xbb\xbf/' file-encoded-with-utf8.txtRef: http://www.skybert.net/bash/adding-utf-8-bom-from-the-command-line/
$ sed -i '1s/^/\xef\xbb\xbf/' file-encoded-with-utf8.txtRef: http://www.skybert.net/bash/adding-utf-8-bom-from-the-command-line/
| // ==UserScript== | |
| // @name PluginForShanbay_3k | |
| // @namespace http://stormluke.me/ | |
| // @version 0.2 | |
| // @description some enhancement on shanbay.com | |
| // @match https://www.shanbay.com/bdc/review/ | |
| // @require http://code.jquery.com/jquery-1.9.1.min.js | |
| // ==/UserScript== | |
| /* globals $:false GM_xmlhttpRequest:false */ |
| # Rime dictionary | |
| # encoding: utf-8 | |
| --- | |
| name: luna_pinyin.emoji | |
| version: "2016.09.07" | |
| sort: by_weight | |
| use_preset_vocabulary: true | |
| ... |
shell, enter.sudo su
cp /etc/chrome_dev.conf /usr/local
mount --bind /usr/local/chrome_dev.conf /etc/chrome_dev.conf
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I lead the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can'
When Java 9 is the default version getting resolved in the environment, pyspark will throw error below
and you will see name 'xx' is not defined error when trying to access sc, spark etc. from shell / Jupyter.
Python 3.6.3 (default, Oct 19 2017, 13:58:41)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
| /* | |
| * JavaScript Keyboard Map (Mac layout) | |
| * | |
| * | |
| * esc—— F1——— F2——— F3——— F4——— F5——— F6——— F7——— F8——— F9——— F10—— F11—— F12—— F13—————+ | |
| * | 27 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | ??? | | |
| * ` ——— 1———— 2———— 3———— 4———— 5———— 6———— 7———— 8———— 9———— 0———— - ——— = ——— delete——+ | |
| * | 192 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | | |
| * tab———— Q———— W———— E———— R———— T———— Y———— U———— I———— O———— P———— [ ——— ] ——— \ ————+ | |
| * | 9 | 81 | 87 | 69 | 82 | 84 | 89 | 85 | 73 | 79 | 80 | 219 | 221 | 220 | |
| class Demo extends React.Component { | |
| componentDidUpdate(prevProps, prevState) { | |
| for (const i in this.props) { | |
| if (this.props[i] !== prevProps[i]) { | |
| console.log(`prop ${i} changed from ${prevProps[i]} to ${this.props[i]}`); | |
| } | |
| } | |
| for (const i in this.state) { | |
| if (this.state[i] !== prevState[i]) { |