This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import {View, Text, Dimensions} from 'react-native'; | |
import styles from './styles.js'; | |
import LinearGradient from 'react-native-linear-gradient'; | |
import utils from './utils.js'; | |
const d = Dimensions.get('window'), | |
width = d.width, | |
height = d.height; | |
export default class BrightnessSlider extends Component { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let isMainWindow = false; // keep track of main instance. | |
// Of course the main instance should be kept track of in a better way than this, perhaps find a way of uniquely identifying the tabs | |
// and storing the ID of the active tab in localStorage. | |
window.addEventListener('load', e => { | |
if (!window.localStorage.mainWindowVacant) window.localStorage.mainWindowVacant = "true"; // initialsise window.localStorage | |
if (!window.localStorage.openInstances) window.localStorage.mainWindowVacant = "true"; // initialsise window.localStorage | |
if (window.localStorage.mainWindowVacant !== "false") { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {Appbar, BottomNavigation, Provider as PaperProvider} from 'react-native-paper'; | |
import {Provider, connect} from 'react-redux'; | |
import {createStore} from 'redux'; | |
import Theme from './styles/theme'; | |
import Screens from './screens'; | |
/* | |
{ key: 'Settings', title: 'Settings', icon: 'settings', color: Theme.colors.primary }, //, color: '#00796b' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let weights = Array.from({ | |
length: 3 | |
}, () => Math.random() * 2 - 1) | |
// let weights = [-0.16595599, 0.44064899, -0.99977125] | |
let inputs = [ | |
[0, 1, 1], | |
[1, 1, 1], | |
[1, 0, 1], | |
[0, 1, 1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const that = this; // lol I know | |
const download = <DownloadComp onComplete={() => this.next()} | |
onStatusChange={async function (status) { | |
if (status !== 2 && status !== 3) { | |
console.log('unaffected'); | |
} else { | |
console.log(this); | |
that.setState(prev => ({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async beginDownload() { | |
if (this.state.downloadURL) { | |
const that = this; // lol I know | |
const onStatusChange = async function (status) { | |
if (status === 2 || status === 3) { | |
that.forceUpdate(); | |
// this.props.remove.bind(this)(); | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <store.h> | |
#include <iostream> | |
int main() { | |
cout << Store.name << endl; | |
Store.name = "Isaac"; | |
cout << Store.name << endl; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require('http'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const fileLocation = path.join(__dirname, 'video.mp4'); | |
fs.writeFileSync(fileLocation, ''); | |
const file = fs.createWriteStream(fileLocation); | |
function printSize(bytes) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {exec} = require('child_process'); | |
function spawn(...args) { | |
return new Promise(function (resolve, reject) { | |
const process = exec(`java -jar gp.jar --delete D27600008501 --key ${lockKey}`, function (err, stdout, stderr) { | |
if (err) | |
return reject(err); | |
}); | |
process.on('exit', code => resolve(code)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style> | |
:root { | |
--background: black; |
OlderNewer