Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
import os | |
import re | |
import argparse | |
# Thingdoms Eth Address | |
eth_address = "0x0aa7420c43b8c1a7b165d216948870c8ecfe1ee1" | |
# Command Line Arguments | |
ap = argparse.ArgumentParser() | |
ap.add_argument("-n", "--number", required=False, |
let [sql, params] = q.getQueryAndParameters(); | |
params.forEach((value, index) => { | |
if (typeof value === 'string') { | |
sql = sql.replace(`$${index + 1}`, `'${value}'`); | |
} | |
if (typeof value === 'object') { | |
if (Array.isArray(value)) { | |
sql = sql.replace( | |
`$${index + 1}`, |
def simple_function(): | |
print('Hello World') |
def simple_function(): | |
print('Hello World') |
var demoApp = createElement( | |
"div", | |
{ | |
children: [ | |
createElement("span", { children: "Hello" }, | |
renderHtmlComponent), | |
createElement("span", { children: "React" }, renderHtmlComponent), | |
], | |
}, | |
renderHtmlComponent |
function renderHtmlComponent({ children }) { | |
// Returns children as an array | |
return Array.isArray(children) ? children : [children] | |
} |
function createElement(elementType, props, render) { | |
// Initialise empty html string | |
let html = "" | |
// Add start of element | |
html += `<${elementType}>` | |
// Add children | |
html += render(props).join("") | |
// Add end of element | |
html += `</${elementType}>` | |
return html |
<head> | |
<title>GlassBox - React</title> | |
</head> | |
<body> | |
<div id="glass-box-root"></div> | |
<script type="text/javascript" src="./index.js"></script> | |
</body> |
function createElement(elementType, props, render) { | |
// Initialise empty html string | |
let html = "" | |
// Add start of element | |
html += `<${elementType}>` | |
// Add children | |
html += render(props).join("") | |
// Add end of element | |
html += `</${elementType}>` | |
return html |