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
| Navigation.events().registerComponentDidAppearListener(async ({ componentName, componentType }) => { | |
| if (componentType === 'Component') { | |
| alert(`screen: ${componentName}`); | |
| } | |
| }); |
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
| Array.prototype.randomElement = function () { | |
| return this[Math.floor(Math.random() * this.length)]; | |
| } | |
| var consonant = [ | |
| "th", | |
| "th", | |
| "n", | |
| "mb", | |
| "r", |
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 auth0 from 'auth0-js'; | |
| import Auth0Cordova from '@auth0/cordova'; | |
| import React, { Component } from 'react'; | |
| import {Tabbar, Tab} from 'react-onsenui'; | |
| import DataEntryPage from './pages/DataEntryPage'; | |
| import HomePage from './pages/HomePage'; | |
| import PersonalPage from './pages/PersonalPage'; | |
| export default class App 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
| import pygame, sys | |
| from pygame.locals import * | |
| import pickle | |
| import select | |
| import socket | |
| WIDTH = 400 | |
| HEIGHT = 400 | |
| BUFFERSIZE = 2048 |
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
| @UIApplicationMain | |
| final class AppDelegate: UIResponder, UIApplicationDelegate { | |
| let healthKitManager = HealthKitManager() | |
| func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
| if onboardingComplete { | |
| healthKitManager.requestAccessWithCompletion() { success, error in | |
| if success { print("HealthKit access granted") } | |
| else { print("Error requesting access to HealthKit: \(error)") } | |
| } |
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
| // Exemplo de requisição GET | |
| var ajax = new XMLHttpRequest(); | |
| // Seta tipo de requisição e URL com os parâmetros | |
| ajax.open("GET", "minha-url-api.com/?name=Henry&lastname=Ford", true); | |
| // Envia a requisição | |
| ajax.send(); | |
| // Cria um evento para receber o retorno. |