Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8181
import React, { useState, useContext } from 'react' | |
// 1. Define data that the context holds, plus a setter to update data | |
interface MyContextProps { | |
standalone: boolean | |
setMyContext: (value: Partial<Omit<MyContextProps, 'setMyContext'>>) => void | |
} | |
// 2. Create the actual context with some default data | |
const MyAppContext = React.createContext<MyContextProps>({ |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8181
:root { | |
--icon-pending: url('data:image/svg+xml;utf8,<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="SUCCESS_1_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve"><style type="text/css">.st0{fill-rule:evenodd;clip-rule:evenodd;fill:%23DBDCDD;} .st1{fill-rule:evenodd;clip-rule:evenodd;fill:%23FFFFFF;} </style> <g id="Ellipse_524"> <g> <circle class="st0" cx="8" cy="8" r="8"/> </g> </g> <g id="Ellipse_1551"> <g> <circle class="st1" cx="8" cy="8" r="6"/> </g> </g> </svg>'); | |
--icon-queued: url('data:image/svg+xml;utf8,<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="QUE_1_copy_1_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve"> <style type="text/css"> .st0{fill:#E1E4E5;} .st1{fill:#FFFFFF;} .st2{fill:#C3C8CA;} </style> <g id="Ellipse_ |
Find what: (^.*): (.*$) | |
Replace with: "$1": "$2", | |
-- | |
Before: | |
memberOf: CN=Realtime Systems,OU=DEPT,OU=Groups,DC=corp,DC=qc | |
department: Inventory & DMP | |
After: |
import org.apache.commons.lang3.exception.ExceptionUtils; | |
import play.Logger; | |
String stackTrace = ExceptionUtils.getStackTrace(new Exception())); | |
// Log warning with stack trace for a deprecated method | |
Logger.warn("Method is deprecated: " + stackTrace); |
/* | |
fetch() only rejects when network error occurs (offline), fetch2() rejects all non-200 statuses | |
*/ | |
const fetch2 = api => fetch(api).then(res => res.ok ? res : Promise.reject(res)); |
from openpyxl import load_workbook | |
wb = load_workbook('template.xlsx') | |
# grab the active worksheet | |
ws = wb.active | |
# Data can be assigned directly to cells | |
ws['A2'] = 'Tom' | |
ws['B2'] = 30 |
Only files under 25 MB can be previewed with the Google Drive viewer.
Google Drive viewer helps you preview over 16 different file types, listed below: