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 'package:afoa/constant/constant.dart'; | |
import 'package:afoa/widget/widget.dart'; | |
import 'package:flutter/material.dart'; | |
class InputFieldWidget extends StatelessWidget { | |
final String hintText; | |
final IconData icon; | |
final ValueChanged<String> onChanged; | |
const InputFieldWidget({ | |
Key? key, |
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 'package:afoa/constant/constant.dart'; | |
import 'package:flutter/material.dart'; | |
class TextFieldWidget extends StatelessWidget { | |
final Widget child; | |
TextFieldWidget({required this.child}) ; | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, minimal-ui"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css "> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.css "> | |
<script src="//code.jquery.com/jquery-3.1.0.slim.min.js"></script> | |
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.bundle.min.js "></script> |
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
body { | |
background-color: #8f4df8 | |
} | |
.main-todo-input { | |
background: #fff; | |
padding: 0 120px 0 0; | |
border-radius: 1px; | |
margin-top: 100px; | |
box-shadow: 0px 0px 0px 6px rgba(255, 255, 255, 0.3) |
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 express = require("express"); | |
const app = express(); | |
const port = 3000; | |
const mysql = require("mysql"); | |
const db = mysql.createConnection({ | |
host: "localhost", | |
user: "me", | |
password: "secret", | |
database: "movies" |
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
CREATE TABLE `Kingdom` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`name` varchar(90) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; | |
INSERT INTO `Kingdom` VALUES (1,'Logre'),(2,'Caledonie'),(3,'Carmelide'),(4,'Vannes'),(5,'Galles'),(6,'Aquitaine'); | |
CREATE TABLE `Role` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, |
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 express = require("express"); | |
const app = express(); | |
const port = process.env.PORT || 3000; | |
const connection = require("./config.js"); | |
app.get("/api/movies/", (req, res) => { | |
connection.query("SELECT * FROM movie ", err => { | |
if (err) { | |
res.status(500).send("Error selecting movie "); | |
} else { |
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 express = require("express"); | |
const app = express(); | |
const port = process.env.PORT || 3000; | |
const connection = require("./config.js"); | |
app.use(express.json()); | |
app.use(express.urlencoded()); | |
app.post('/api/movies', (req, res) => { |
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 express = require("express"); | |
const app = express(); | |
const port = process.env.PORT || 3000; | |
const connection = require("./config.js"); | |
app.delete("/api/movies/:id", (req, res) => { | |
const movieId = req.params.id; | |
connection.query("DELETE FROM movie WHERE id = ?", [movieId], err => { | |
if (err) { | |
res.status(500).send("Error deleting movie " + movieId); |
NewerOlder