Skip to content

Instantly share code, notes, and snippets.

View bswen's full-sized avatar

bswen bswen

View GitHub Profile
<html>
<head>
<title>Vue.js Pet Store</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.12/vue.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
crossorigin="anonymous">
</head>
<body>
<div id="app" class="container-fluid">
<div class="row-fluid">
@bswen
bswen / upload_file_demo.py
Last active March 17, 2021 06:37
demo how to upload file with flask_restful api, and demo how to read both the uploaded file and the http fields with flask. The blog url: https://bswen.com/2021/03/others-how-to-upload-file-using-flask-restful-api.html
from flask import Flask
from flask_restful import reqparse, Api, Resource
import werkzeug
import os
app = Flask(__name__)
api = Api(app)
UPLOAD_DIR="/Users/bswen/work/python/myutils/learn_flask/uploaded_files"
@bswen
bswen / .go
Created March 9, 2021 08:12
https://bswen.com/2021/03/others-golang-error1.html how to modify an element in slice when developing golang programs
package main
import (
"errors"
"fmt"
)
type Book struct {
ID uint
Title string