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
| void checkAllSmells() | |
| { | |
| // Fetches all smell sources in the scene. | |
| SmellSource[] all_smells = FindObjectsOfType<SmellSource>(); | |
| // We can multiple smell sources in our game | |
| foreach (SmellSource smell in all_smells) | |
| { | |
| // We calculate the intensity of the smell here | |
| float intensity = smell.getSmellIntensityAt(transform.position); |
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
| using UnityEngine; | |
| public class SmellSource : MonoBehaviour | |
| { | |
| // Here you can add your smell types | |
| public enum SmellType { Treasure } | |
| // Set a default type | |
| public SmellType smellType = SmellType.Treasure; | |
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 event = new Event(auth); | |
| event.addEvent('Summary','Description','2020-03-16T11:00:00','2020-03-18T11:00:00'); |
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, { createRef } from "react"; | |
| import { StyleSheet, Text, View, Button } from 'react-native'; | |
| import ActionSheet from "react-native-actions-sheet"; | |
| const actionSheetRef = createRef(); | |
| // This Menu component is fully customizable. Add whatever you want!! | |
| const Menu = () => ( | |
| <View style={styles.drawerContent} > | |
| <Text>Hello There</Text> |
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, { useState, useEffect } from 'react'; | |
| import { View, Text, Button, StatusBar } from 'react-native'; | |
| import auth from '@react-native-firebase/auth'; | |
| import { GoogleSignin } from '@react-native-community/google-signin'; | |
| GoogleSignin.configure({ | |
| webClientId: '', | |
| }); |
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 {google} = require('googleapis'); | |
| var base64 = require('js-base64').Base64; | |
| const parse = require('node-html-parser').parse; | |
| const cheerio = require('cheerio'); | |
| var open = require('open'); | |
| var Mailparser = require('mailparser').MailParser; | |
| class Check{ | |
| constructor(auth){ |
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 {google} = require('googleapis'); | |
| class Event { | |
| //This auth object should be passed whenever a new instance of class is created in order to authenticate the requests. | |
| constructor(auth){ | |
| this.auth = auth; | |
| this.calendar = google.calendar({version: 'v3', auth}); | |
| } |
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 fs = require('fs'); | |
| const readline = require('readline'); | |
| const {google} = require('googleapis'); | |
| // If modifying these scopes, delete token.json. | |
| const SCOPES = ['https://www.googleapis.com/auth/gmail.readonly','https://www.googleapis.com/auth/gmail.modify', | |
| 'https://www.googleapis.com/auth/gmail.compose','https://www.googleapis.com/auth/gmail.send']; | |
| // The file token.json stores the user's access and refresh tokens, and is | |
| // created automatically when the authorization flow completes for the first | |
| // time. |
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 sys | |
| import json | |
| x = { | |
| "sum": int(sys.argv[1]) + int(sys.argv[2]) | |
| } | |
| print(json.dumps(x)) |
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
| //We will have to create a childprocess in order tocall python script. | |
| var spawn = require("child_process").spawn; | |
| //This process is called here. | |
| var process = spawn('python',["./add.py",7,3] ); | |
| //We listen for 'data' event. | |
| process.stdout.on('data', function (data) { | |
| console.log("Sum " + JSON.parse(data.toString()).sum); | |
| }); |
NewerOlder