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 { useState, useEffect } from 'react'; | |
| import { Storage } from '@ionic/storage'; | |
| const storage = new Storage(); | |
| storage.create(); | |
| export const useIonicStorage = (key, defaultValue) => { | |
| const [value, setValue] = useState(defaultValue); | |
| useEffect(() => { |
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 psycopg2 | |
| try: | |
| connection = psycopg2.connect("postgres://postgres:@localhost:5432/postgres") | |
| cursor = connection.cursor() | |
| # create_table_query = '''CREATE TABLE mobile | |
| # (ID INT PRIMARY KEY NOT NULL, | |
| # MODEL TEXT NOT NULL, |
NewerOlder