Code Contribution - Spacebook
Image to Base64 Code
- Specify the base URL path so that all endpoints are relative to /image
- GET request mapping fetches all records from our database
- The POST request saves the uploaded file and fileName
- Uploaded image is then encoded to Base64 string, so that it can be stored as text in our database
- A new file is then made with the fileName and the encoded string
- Images can be accessed via the endpoint “/image/{fileName}”
- If the image is present, then the Base64 string is retrieved and decoded back into binary format
- Check format of file and adjust media type accordingly
Frontend integration
Image Viewer
- Fetches the image from the backend based off value of fileName input by the user
- URL is created for the blob (binary large object) to use it as an image source on the page
Upload Image
GitHub Analytics
-
Notable Frontend Commit - Adding Spacebook + View Image
-
Notable Backend Commit - Setting up mapping + Image to Base64
CollegeBoard Quiz
Question 19
Topic 3.6 - Equivalent Boolean Expressions
- I read this problem wrong, the opposite of greater than is less than or equal. Thus, the opposite of (b > 7) is (b <= 7).
Question 37
Topic 4.1 - While Loops
- Choice I works. Choice III works also, as it will cause the while loop to iterate while x is less than 7. The variable x is assigned 1 to start and then incremented by 2. It will be assigned the values 1, 3, 5 and then 7. When x has the value 7, the loop will terminate. The output will be 1, 3, 5.
AP Study Plans
- To prepare for the AP Exam, I will follow a similar process to what I did last year in CSP
- I will be sure to continue working on the Practice MCQs on CollegeBoard and doing test corrections with the included topics of the questions I am missing. This will allow me to view what concepts I am having trouble with so that I can watch the CollegeBoard videos on them and review.
Extra Credit Reviews
Reflection
- This trimester has helped me hone my skills of integrating both frontend and backend and utilizing CRUD methods
- Java Spring was something introduced to me this year, working with it has helped me get more comfortable utilizing it
- Learned how to store images in the backend through work with Spacebook