This post is about how to dynamically add a pic in a web page.
This blog is for keeping my study notes, sharing knowledge and showing the products of my study.. I welcome your feedback...
Showing posts with label Code. Show all posts
Showing posts with label Code. Show all posts
2016/12/17
2016/11/19
HTML & CSS Tips - How to vertically align text and image inside a paragraph
This post is about how to vertically align text and image inside a paragraph <p>.
2016/11/13
Notes for JavaScript Tutorial for Beginners - Traversing The DOM
2016/11/11
Notes for JavaScript Tutorial for Beginners - Create Attribute
The source of this post is from "JavaScript Tutorial for Beginners - 39 - Create attribute" located at
https://youtu.be/FbcB8CroByk?list=PLr6-GrHUlVf96NLj3PQq-tmEB6woZjwEl
https://youtu.be/FbcB8CroByk?list=PLr6-GrHUlVf96NLj3PQq-tmEB6woZjwEl
Notes for JavaScript Tutorial for Beginners - Adding / Removing Elements Programmatically
The note in this post cover section 36 to 38 of the JavaScript Tutorial for Beginners.
Adding Elements
The photo below shows how a web page is structured.
Adding Elements
The photo below shows how a web page is structured.
2016/11/10
Notes for JavaScript Tutorial for Beginners - Section 1 to 35
Here I put my notes for section 1 to 35 of the "JavaScript Tutorial for Beginners" on Youtube.
Typical HTML Template
Typical HTML Template
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <!DOCTYPE html> <html> <head> <script> </script> </head> <body> </body> </html> |
2016/10/31
Google Drive API - How to find file id by filename and download non Google Doc files to local storage using Python
This tutorial is based on Google Drive API v3 and Python 2.7.9.
The code below allows its user to specify the name of the file to be searched for on his/her own Google Drive. Once the file is found, the user will then be prompted on whether to download the file to the local storage or not. The download is limited to non Google Doc files. For Google Doc files, please refer to the sample code at http://wei48221.blogspot.tw/2016/10/google-drive-api-uploading-downloading.html.
The code below allows its user to specify the name of the file to be searched for on his/her own Google Drive. Once the file is found, the user will then be prompted on whether to download the file to the local storage or not. The download is limited to non Google Doc files. For Google Doc files, please refer to the sample code at http://wei48221.blogspot.tw/2016/10/google-drive-api-uploading-downloading.html.
2016/10/30
PyDrive Quick Overview - File Management
Here is the sample code for creating a file called "Hello.txt" on Google Drive and add "Hello World!!" as its content using PyDrive.
Create a new file on Google Drive and add its content
Create a new file on Google Drive and add its content
2016/10/26
PyDrive Quick Overview - Authentication and File Listing - PyDrive vs Drive API Python
I came across PyDrive (https://pythonhosted.org/PyDrive/index.html) while trying to learn how to use Python to access Google Drive via Google Drive API. For someone struggling to understand how to use the Google Drive API, I think it's a godsend to have PyDrive..
OAuth2 authentication
Using PyDrive
OAuth2 authentication
Using PyDrive
1 2 3 4 | from pydrive.auth import GoogleAuth gauth = GoogleAuth() gauth.LocalWebserverAuth() # Creates local webserver and auto handles authentication. |
2016/10/25
Google Drive API - Showing the id and mimeType of all the files and folders on Google Drive using Python
Here are the code for showing the id and mimeType of all the files and folders on Google Drive.
Python script using Drive API v2
Python script using Drive API v2
2016/10/24
Google Drive API: Uploading Files And Downloading (Exporting) Google Doc Files Using Python
This is a quick note about the Google Drive API: Uploading & Downloading Files sample at https://youtu.be/-7YH6rdR-tk.
The original Python script can be downloaded from http://wescpy.blogspot.tw/2015/12/google-drive-uploading-downloading.html.
When using the v2 version API, the 'hello.txt' can be uploaded and converted into Google Doc format and stored on my Google Drive. However, the conversion to PDF and download the file to my local disk part isn't working.
Python Script - v2 version API
The original Python script can be downloaded from http://wescpy.blogspot.tw/2015/12/google-drive-uploading-downloading.html.
When using the v2 version API, the 'hello.txt' can be uploaded and converted into Google Doc format and stored on my Google Drive. However, the conversion to PDF and download the file to my local disk part isn't working.
Python Script - v2 version API
Notes on the common code section for accessing Google APIs using Python
This post contains my notes after watching the 2 videos below.
Google Drive API: Uploading & Downloading Files
https://youtu.be/-7YH6rdR-tk
Accessing Google APIs: Common code walkthrough
https://youtu.be/h-gBeC9Y9cE?list=PLOU2XLYxmsILOIxBRPPhgYbuSslr50KVq
The Common Code Section
Below are the first 21 lines of code for uploading and downloading files using Google Drive API. They are the common code (with minor changes to the parameters in Line 14 - SCOPE and Line 21 - DRIVE) needed for accessing Google APIs.
Google Drive API: Uploading & Downloading Files
https://youtu.be/-7YH6rdR-tk
Accessing Google APIs: Common code walkthrough
https://youtu.be/h-gBeC9Y9cE?list=PLOU2XLYxmsILOIxBRPPhgYbuSslr50KVq
The Common Code Section
Below are the first 21 lines of code for uploading and downloading files using Google Drive API. They are the common code (with minor changes to the parameters in Line 14 - SCOPE and Line 21 - DRIVE) needed for accessing Google APIs.
Subscribe to:
Posts (Atom)