This file contains 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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* | |
* @format | |
* @flow | |
*/ | |
import React from 'react'; | |
import { createStackNavigator } from 'react-navigation'; | |
import HomeScreen from './src/HomeScreen'; |
This file contains 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
var express = require('express'); | |
var router = express.Router(); | |
var request = require('request'); | |
router.get('/', function (req, res) { | |
res.json({error:'error'}) | |
}); | |
router.post('/', function (req, res) { |
This file contains 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 { Text, WebView, ToastAndroid, Alert } from 'react-native'; | |
import axios from 'axios'; | |
export default class Webview extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = { url: null } | |
} | |
componentDidMount() { | |
const { state } = this.props.navigation; |
This file contains 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 { View, Text, TextInput, TouchableOpacity, Alert, ToastAndroid } from 'react-native'; | |
import axios from 'axios'; | |
import {IP} from '../constants' | |
export default class HomeScreen extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = { |
This file contains 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"> | |
<title>WebSpeech API</title> | |
<!--Import Google Icon Font--> | |
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |
<!--Import materialize.css--> | |
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" media="screen,projection"/> |
This file contains 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
$(function() { | |
// on click of button we read the text from input field | |
$(document).on("click", "#tts_button", function() { | |
let text = $("#tts_input") | |
.val() | |
.trim(); | |
// just in the below 2 lines of code magic happens | |
const speak = new SpeechSynthesisUtterance(text); | |
speechSynthesis.speak(speak); | |
$("#tts_input").val(""); |
This file contains 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"> | |
<title>WebSpeech API</title> | |
<!--Import Google Icon Font--> | |
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |
<!--Import materialize.css--> | |
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" media="screen,projection"/> |
This file contains 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
$(function() { | |
// initialize select for materialize | |
$("select").formSelect(); | |
function populateVoiceList() { | |
let voices = window.speechSynthesis.getVoices(); | |
var voiceList = ""; | |
for (i = 0; i < voices.length; i++) { | |
console.log(voices[i].name); | |
voiceList += `<option value="${i}">${voices[i].name} (${voices[i].lang})</option>`; |
This file contains 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 'package:flutter/material.dart'; | |
import 'package:google_fonts/google_fonts.dart'; | |
import 'package:ui_learn/models/instructor.dart'; | |
class ListPage extends StatefulWidget { | |
@override | |
_ListPageState createState() => _ListPageState(); | |
} | |
class _ListPageState extends State<ListPage> { |