Approaches to data storages:
- Default : No Data Persistence
- Data Volumes : Container Persistence
- Explicit Shared Storage (Data Volumes) : Container Persistence
- Shared Multi-Host Storage : Host Persistence
import React from 'react'; | |
function onlyChild(children) { | |
return Array.isArray(children) ? children[0] : children; | |
} | |
export function combineContext(contexts) { | |
class Provider extends React.Component { | |
render() { | |
const init = this.props.children; |
Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).
The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int
/** | |
* ================== angular-ios9-uiwebview.patch.js v1.1.1 ================== | |
* | |
* This patch works around iOS9 UIWebView regression that causes infinite digest | |
* errors in Angular. | |
* | |
* The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular | |
* have the workaround baked in. | |
* | |
* To apply this patch load/bundle this file with your application and add a |
#Ionic Publish Android App
This is the process to publish an ionic android app.
Make sure you set/increment the version number in config.xml
ie 0.0.3
.
Make sure the android platform has been added
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
Converts an existing Cordova/Ionic project to a Crosswalk project. When the script is done running, you should have a fat 40MB APK file in platforms/android/ant-build
.
This assumes you have the following already installed: cordova
, ant
, android
, and that your ANDROID_HOME
is set to point to the Android SDK.
This will work on both x86 and ARM. If you want to build two separate APKs so that they're smaller, then modify the script; the script at least shows how it works.
Step 1: download the "Cordova Android" libraries from the Crosswalk downloads page. You don't need anything except for the "Cordova Android" ones.
// By Steve Hanov (2014) | |
// Released to public domain | |
// | |
// Minimum element is always on top. | |
// You can pass in an optional lessThan(a, b) function to the constructor. | |
// You may use .length to retrieve the length. Try not to set it though. | |
function Heap() | |
{ | |
if (arguments.length) { |