- Python 3
- Pip 3
$ brew install python3| // http://stackoverflow.com/questions/23945494/use-html5-to-resize-an-image-before-upload | |
| var IMGRZ_MAX_WIDTH = 500; | |
| /* Utility function to convert a canvas to a BLOB */ | |
| var dataURLToBlob = function(dataURL) { | |
| var BASE64_MARKER = ';base64,'; | |
| if (dataURL.indexOf(BASE64_MARKER) == -1) { | |
| var parts = dataURL.split(','); | |
| var contentType = parts[0].split(':')[1]; |
| [Groups] | |
| NumberOfGroups = 8 | |
| [1] | |
| TriggerTop = [Monitor1Top] | |
| TriggerRight = [Monitor1Left] + [Monitor1Width] /2 | |
| TriggerBottom = [Monitor1Top] + [Monitor1Height] /2 | |
| TriggerLeft = [Monitor1Left] |
| { | |
| "window.zoomLevel": 0, | |
| "vim.disableAnnoyingNeovimMessage": true, | |
| "window.menuBarVisibility": "toggle", | |
| "editor.fontFamily": "Droid Sans Mono", | |
| "editor.fontSize": 15, | |
| "workbench.colorTheme": "Sublime Material Theme - Dark", | |
| "workbench.colorCustomizations": { | |
| "editor.background": "#000" | |
| } |
| // utility | |
| function stamp_time(text){ | |
| console.log(new Date().toLocaleTimeString(), text); | |
| } | |
| // mock process | |
| function make_double(v){ | |
| return new Promise(function(res, rej){ | |
| setTimeout(x => { | |
| res(v*2); // double value |
| // https://alvinalexander.com/android/how-to-create-android-notifications-notificationmanager-examples | |
| public void showNotification(String s){ | |
| PendingIntent pi = PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), 0); | |
| Notification notification = new NotificationCompat.Builder(this) | |
| .setTicker("Demo") | |
| .setSmallIcon(android.R.drawable.ic_menu_help) | |
| .setContentTitle("Demo Notification") | |
| .setContentText(s) | |
| .setContentIntent(pi) | |
| .setAutoCancel(true) |
| <h1>Handle paste clipboard from excel by JS</h1> | |
| <div id='out'></div> | |
| <script> | |
| // https://stackoverflow.com/a/38326762/466693 | |
| document.addEventListener('paste', function (event) { | |
| window.clipText = event.clipboardData.getData('Text'); | |
| render_table(clipText); | |
| }); |
| 'hello my name is diewland'.replace(/(diewland|name)/g, "<span class='hl'>$&</span>") | |
| // "hello my <span class='hl'>name</span> is <span class='hl'>diewland</span>" |
| A warning occurred (42 apples) | |
| An error occurred |