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
public cameraAvatar: string; //base64 image data get from camera | |
public profileForm: FormGroup; // reactive form data | |
saveProfile() { | |
if (this.profileForm.valid) { | |
let loader = this.loadingCtrl.create(); | |
loader.present(); | |
let toast = this.toastCtrl.create({ | |
message: 'Data saved successfully', |
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
upload(path: string, file: File) | |
const storageRef = this._storage.ref(path); | |
const task = this._storage.upload(path, file); | |
return from(task).pipe( | |
switchMap((task: UploadTaskSnapshot) => storageRef.getDownloadURL()) | |
); | |
} |
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
CREATE OR REPLACE FUNCTION validaie(pp_estado VARCHAR2, | |
pp_nr_inscricao_estadual VARCHAR2) | |
RETURN VARCHAR2 IS | |
v_verificador VARCHAR2(50); | |
v_calculo NUMBER; | |
v_digito NUMBER; | |
FUNCTION soma_algebrica(p_valor NUMBER) RETURN NUMBER IS |
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
/* | |
Prompt: | |
We have defined a basic dropdown via the Dropdown and DropdownItem components below, with example usage | |
in the ExampleNav component. The Dropdown and DropdownItem components have some problems, and also | |
have room for improvements (doesn't everything?) A couple items TODO here (make sure to explain with comments!) | |
0. How are you today? 😊 | |
R: I'm great. :) | |
1. Please fix any obvious issues you see with the dropdown and then save your gist. |
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 sys | |
from typing import Tuple | |
from time import sleep | |
from datetime import time, datetime, timezone, timedelta | |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
from joblib import Parallel, delayed | |
# params |
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
Show hidden characters
{ | |
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and | |
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope | |
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is | |
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. | |
// Placeholders with the same ids are connected. | |
"React functional component": { | |
"scope": "typescript,typescriptreact", |
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
// Extends the return of the HTTPError class | |
class HTTPError extends Error { | |
readonly response: any; | |
readonly status: number; | |
readonly statusText: string; | |
constructor(status: number, statusText: string, response: any) { | |
super(statusText); | |
this.status = status; | |
this.statusText = statusText; |