Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
| import { useCallback, useEffect, useState } from "react"; | |
| // Define custom types for SpeechRecognition and SpeechRecognitionEvent | |
| interface ISpeechRecognitionEvent extends Event { | |
| results: SpeechRecognitionResultList; | |
| resultIndex: number; | |
| } | |
| interface ISpeechRecognition extends EventTarget { | |
| lang: string; |
| <?php | |
| namespace App\Libraries\Queue; | |
| use Illuminate\Events\Dispatcher; | |
| use Illuminate\Queue\DatabaseQueue; | |
| use Illuminate\Support\Str; | |
| use Laravel\Horizon\Events\JobDeleted; | |
| use Laravel\Horizon\Events\JobPushed; | |
| use Laravel\Horizon\Events\JobReleased; |
| package main | |
| import ( | |
| "log" | |
| "net/smtp" | |
| ) | |
| func main() { | |
| send("hello there") | |
| } |
| FROM node:15.3.0-alpine3.10 as deps | |
| WORKDIR /app | |
| COPY package.json yarn.lock ./ | |
| RUN yarn --production --silent | |
| RUN cp -R node_modules prod_node_modules | |
| RUN yarn --frozen-lockfile --silent | |
| FROM deps as builder | |
| WORKDIR /app | |
| COPY . . |
| function useSelectors(reducer, mapStateToSelectors) { | |
| const [state] = reducer; | |
| const selectors = useMemo(() => mapStateToSelectors(state), [state]); | |
| return selectors; | |
| } | |
| function useActions(reducer, mapDispatchToActions) { | |
| const [, dispatch] = reducer; | |
| const actions = useMemo(() => mapDispatchToActions(dispatch), [dispatch]); | |
| return actions; |
Run each of the following lines, replacing yourdomain.com and codehere with your details:
now dns add yourdomain.com @ TXT google-site-verification=codehere
now dns add yourdomain.com @ MX ASPMX.L.GOOGLE.COM 1
now dns add yourdomain.com @ MX ALT1.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT2.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT3.ASPMX.L.GOOGLE.COM 10
now dns add yourdomain.com @ MX ALT4.ASPMX.L.GOOGLE.COM 10
| function add_custom_headers() { | |
| add_filter( 'rest_pre_serve_request', function( $value ) { | |
| header( 'Access-Control-Allow-Headers: Authorization, X-WP-Nonce,Content-Type, X-Requested-With'); | |
| header( 'Access-Control-Allow-Origin: *' ); | |
| header( 'Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE' ); | |
| header( 'Access-Control-Allow-Credentials: true' ); | |
| return $value; | |
| } ); |
It took me quite some time to figure out how to print properly from a web application. I will explain here how I did it, so you don't have to spend the same time.
Google Cloud Print API uses OAuth 2.0 for authorization.
As explained [here][1] on the Google Developer page, the best way to use OAuth with the Google API is with a Google service account. Create a service account as explained on the Google Developer page.
To use OAuth a library is required. Google has published the [Google API PHP client library][2]. If you want to use the examples from the Developer pages, you need to use version 1 of the library. In this article I use version 2 of the library.