Covers creating a controller for a Rest API for GET and PUT requests, plus handling exceptions.GSON: LocalDate AdapterBrian Fraser2023-01-27 | Reading/writing objects with LocalDate data using GSON.
My Videos on GSON - GSON: Deserializing JSON under explicit control of Named fields: youtu.be/HSuVtkdej8Q - GSON: Use IntelliJ: youtu.be/Qc9EfiepfWs - GSON: Array or List as root of JSON: youtu.be/trCGXXNVVYE - GSON: LocalDate Adapter: youtu.be/j2vWhohxBVAGSON: Array or List as root of JSONBrian Fraser2023-01-27 | Reading/writing an array or list as the root of a JSON file using GSON.
My Videos on GSON - GSON: Deserializing JSON under explicit control of Named fields: youtu.be/HSuVtkdej8Q - GSON: Use IntelliJ: youtu.be/Qc9EfiepfWs - GSON: Array or List as root of JSON: youtu.be/trCGXXNVVYE - GSON: LocalDate Adapter: youtu.be/j2vWhohxBVADiscord: Getting starting!Brian Fraser2023-01-03 | Video covers: - Joining a server - Using text channels - Having a text conversation - Using voice calls - Joining a voice channelEditText and TextView: Android ProgrammingBrian Fraser2022-09-21 | How to create a simple project with using EditText and TextView elements. Shows how to extract user input and validate the input. Works with text and numbers.Creating a Button: Android ProgrammingBrian Fraser2022-09-21 | Demo of using Android Studio (2021.3) to create a simple application with a button which generates a log message and a toast.
1. Launch Android Studio; create simple hello-world app. 2. See XML and .java code for activities 3. Add a button, change name, see XML 4. Java code to access button: View.OnClickListener 5. Generate a log message when button is clicked. 6. Generate a toast when button is clicked.VS Code Debugging a Simple C++ ProgramBrian Fraser2022-09-18 | Shows debugging a simple C++ program (just main() ) using VS Code in Windows Subsystem for Linux (WSL).Installing Debian 11 (Bullseye) into a VMWare Player VMBrian Fraser2022-09-16 | ...Connecting a Photoresistor (Photo cell) to a BeagleBone GreenBrian Fraser2022-02-03 | Show how to wire a photoresistor circuit and safely connect it to a BeagleBone Green (BBG) using a breadboard, 10k ohm resistor, and 3 jumper wires. Shows Linux commands to access the A2D and read the value.VS Code WSL (C++) - Create Project, Compile, RunBrian Fraser2022-01-17 | Using VS Code under WSL (Windows Subsystem for Linux): - Download VS Code: code.visualstudio.com/download - Install WSL: docs.microsoft.com/en-us/windows/wsl/install - MS GUide to Using C++ and WSL in VS Code: code.visualstudio.com/docs/cpp/config-wslRecord Response Video with ZoomBrian Fraser2021-10-13 | Using Zoom to record a video of you talking over another video. Useful for providing feedback or responses to another video.VS Code - Using Live ShareBrian Fraser2020-10-06 | Shows how to use VS Code's Live Share to connect to a session, view/edit code, use a terminal, and use debugger.
3. Show the menu via onCreateOptionsMenu() 4. Handle the menu clicks via onOptionsItemSelected() 5. Enable the left-arrow/back button (called 'up') - in onCreate(): getSupportActionBar.setDisplayHomeAsUpEnabled(true); - control its target via the manifest's android:parentActivityName property or - control its action manually via android.R.id.home in onOptionsItemSelected()Install and Run C++ in Visual Studio Code (Windows) v2Brian Fraser2020-09-17 | Updated video which covers how to do the following under Windows: - Install MinGW (G++ and GDB), configure paths - Install VS Code - Open a workspace for multiple activities (labs / assignments)
- Compile and run from within VS Code using the terminal
NOTE: Does not use F5 to run because under Windows it does not work well with cin!Plain Java & JUnit 5 in Android StudioBrian Fraser2020-09-14 | Write a plain-old-Java program in Android Studio 4.0 and test with JUnit 5.Install and Run C++ in Visual Studio Code (Linux)Brian Fraser2020-09-11 | Covers how to do the following under Linux (Ubuntu): - Install G++ and GDB - Install VS Code - Open a workspace for multiple activities (labs / assignments) - Compile and run from within VS CodeInstructor: BB CollabUltra for Exam HelpBrian Fraser2020-08-13 | Use BB Collaborate Ultra for having multiple people answer student questions one at a time using breakout rooms. One person maintains the queue of students while other TAs and the instructor answer questions.Student: BB CollabUltra for Exam HelpBrian Fraser2020-08-13 | How to use BB Collaborate Ultra for getting help during the exam (when used with multiple TAs and breakout rooms).Discord for Office HoursBrian Fraser2020-06-29 | How I use Discord for Office Hours - A guide to my TAs and other usersJUnit 5 testing in Android Studio: Android ProgrammingBrian Fraser2020-05-25 | Testing a plain-old Java class inside Android Studio with JUnit 5Plain Old Java in Android Studio: Android ProgrammingBrian Fraser2020-05-17 | Write and run plain old Java code (console output via main(), not for Android) in Android Studio.
[SOLUTION] Getting java.util.NoSuchElementException from a Scanner on System.in? 1. Expand the "Gradle Scripts" in your project view 2. Edit settings.gradle 3. Comment out (two //) the include ':app' line Click Sync Now to resync your Gradle files (This will change your project view; that's expected) 4. Re-run your program.
Note: If you use System.out.print() to print to the screen (note no linefeed) then it won't show up until after any pending System.in.nextXYZ() is finished.OptiTune: Remote Desktop SupportBrian Fraser2020-04-02 | Adding a new computer to OptiTune and then using OptiTune's remote support ability transfer a file, then install and run a program with administrative privileges. Free Trial: bravurasoftware.com/optitune/free.aspx
Disclosure of interest: The lead developer on OptiTune is a friend. I was not paid or in any way compensated for making this video.Postman Variables in QueriesBrian Fraser2020-03-25 | Replace magic numbers inside your Postman queries with a Postman variable.PostmanBrian Fraser2020-03-17 | How to use Postman to interact with a REST API.Introduction to JUnit 5Brian Fraser2020-01-21 | Testing a simple Java class using JUnit 5. For creating JUnit 5 IntelliJ project, see youtu.be/o5pE7L2tVV8
Covers: * basic asserts ( assertEquals(), assertTrue(), assertNotNull() ), * @Test, @Disable, * exceptions ( assertThrows() ), assertAll() * timing ( assertTimeoutPreemptively() )JUnit 5 in IntelliJ Java Project: Java ProgrammingBrian Fraser2020-01-21 | How to make a Java project in IntelliJ which tests a simple (Plain Old Java) class with JUnit 5.Constraint Layout: Android ProgrammingBrian Fraser2020-01-20 | Use a constraint layout to generate a reasonably complicated UI. Shows setting and clearing constraints, automatically resizing components with 'match constraints', and using a Guideline to lineup elements without a table.Floating Action Button, Vector Asset: Android ProgrammingBrian Fraser2020-01-20 | Easily import assets form Material Design library as a Vector Asset, and then configure Floating Action Button (FAB) to launch a new activity. Encapsulates creating the launch intent into the second activity and uses lambda functions.Deserializing JSON: GSON and JavaBrian Fraser2020-01-15 | Use GSON library in IntelliJ with Java to deserialize a JSON file. Explicitly extracting values from the JSON file, which makes sense when the JSON format does not map well onto your object structure.Model / View Separation: Java for ProgrammersBrian Fraser2020-01-06 | Split an application into the model (data) and view (UI). Uses packages and dependency injection for referencing the model from the UI. Creates an object manager class (DoorManager) to store data objects.ArrayList: Java for ProgrammersBrian Fraser2020-01-06 | Quick demo showing how to use an ArrayList to store references to objects. Plus uses for-each loop (enhanced for loop).Data Class: Java for ProgrammersBrian Fraser2020-01-06 | Quick demo showing how to create a class to store simple data in Java. Uses fields, constructor, accessors, toString() and a public method.main(), functions, if, loop: Java for ProgrammersBrian Fraser2020-01-06 | Quick demo using IntelliJ to create a project and write class to print to the screen, call functions, use an if statement and a for loop.Connect/Remove Beaglebone CapeBrian Fraser2019-07-03 | Connecting and removing a cape (the Zen Cape) from a Beagle Bone (BBG in this case).
Disconnecting the cape is tricky, do it carefully!Creating a Repository: Git & EclipseBrian Fraser2018-12-03 | How to share a project from Eclipse into a new repository on GitHub using the EGit Eclipse plugin. Support videos via Patreon: patreon.com/DrBFraser
This 2018 video is a remake of an older video which featured an earlier version of Eclipse. It is part of a series of practical tutorials for using the EGit Eclipse plugin for working with a project using the Git revision control system. Demos use GitHub, but any remote repository would work.
1:15 Create local repo 2:30 Show Git toolbar / menu 4:30 Commit to local repo 7:35 Create GitHub repo and push 9:25 Configure Remotes (push references) 11:55 Force push to work round non-fast-forward: DANGEROUS! 13:00 Commit and push a change 14:30 Configure remote refecences and pull remote change 15:45 Navigator view to see all filesGoogle Maps API: Android ProgrammingBrian Fraser2018-06-27 | Walk-through guide on getting a Google Maps API key and building an Android application to show a map. Covers troubleshooting.Graphical Cross Debugging in Eclipse: Embedded LinuxBrian Fraser2018-06-08 | Demonstrates how to use Eclipse as a graphical cross debugger for an embedded Linux target which is running gdbserver.
Covers what tools are needed (IntelliJ, Gradle), and how to create the project and test with curl.Singleton Model: Android ProgrammingBrian Fraser2018-01-30 | Make multiple Android activities access the same object. Use the Singleton design pattern to have model class return reference to a common object.Run Java from Jar: IntelliJ TerminalBrian Fraser2018-01-18 | How to run a Java program from IntelliJ's built-in command line by using a Jar. Demos importing GSON library as an external Maven dependency to show power of a Jar file.
1. New project "MyProjectName" Create package Create MyMain class with main()
2. Setup GSON object File --- Project Structure Libraries (on left) Click the green + Select "From Maven" Enter: com/google/code/gson:gson:2.8.2
3. Basic main() public static void main(String[] args) { // Use GSON: Gson gson = new Gson();
for (String s : args) { System.out.println("Args: " + s); } }
RUN via IntelliJ:
3. Setup JAR file --- project structure artifacts (on left) green + for new artifact jar --- from modules with dependencies pick the module to use [default likely OK] choose the main class
4. Command line java -jar out/artifacts/MyProjectName_jar/MyProjectName.jar Hello world!Merge Requests & Merge Conflicts: GitLab and Android StudioBrian Fraser2017-03-03 | GitLab workflow with feature branches and merging conflicting changes into feature branch before a merge request.
Related Videos: - GitLab feature branch and merge request without conflicts: youtu.be/heEtlAYONoo - Advanced features and handling some special cases: (coming soon).
2. Android Studio: Commit - commit - push - show log - switch to "master -) origin/master" - show log
3. Merge Master to Feature Merge master to feature when: a) ready to merge Feature branch to master or b) new code on master you want on feature branch.
4. Create Merge Request on GitLab - view log: Repository -- Network : Show ME and THEM branch - Merge Request -- 'new merge request' - View merge request's changes (If conflicts: re-do merge master to feature.) - Accept merge request - view log: Repository -- Network : Show merged to master
5. Android Studio: Update - show log - highlight branch was: 42-my-change -- remote/42-my-change - pull - show log - remove local branch: 42-my-change [note no remote/42-my-change] - show logGitLab Workflow: Merge Request with Android Studio / IntelliJBrian Fraser2017-03-01 | Using the GitLab workflow to do some changes to a project with Android Studio (same as IntelliJ).
Overview: - Create a GitLab issue - Assign issue to self and create branch - Checkout branch in Android Studio / IntelliJ - Do coding, commit and push. - In GitLab, create Merge Request, and delete branch - In Android Studio switch to master, pull.
1.Setup Create new Android Studio project Create GitLab project; Commit/push empty project.
2. Create GitLab issues: “Add random number generation” Assign issue to self Create local branch via GitLab
3. In Android Studio, switch to branch: Update project from Repo Click the “Git: master” button on status bar bottom right: Under remote, select the new branch you created Then select “Checkout as new local branch”
4. Work: Write code; Commit/push (x2)
5. Create Merge Request: On GitLab’s Merge Request page, select “Create Merge Request” for your recent push. Select “Remove source branch when merge request is accepted.”
6. Accept Merge Request: On GitLab’s Merge Request page May be done by someone else if a code review is required. View in Gitlab: Repository: Network
7. Set Android Studio Ready for Work: Switch to master branch (bottom right, select Local Branch “origin/master”) Pull or Update Project Version Control: View logCreating a Pie Graph: Android ProgrammingBrian Fraser2017-02-27 | Generate a Pie Graph using the MPAndroidChart library and setting its colours under Android Studio.
Steps: 1. Have data in a spread sheet. Clean out ','s from the data, then save as CSV file.
2. In Android project, create new resource directory - type raw: gives name "raw" - copy in file w/ copy/paste
3. Write code to read it. - access the file via getResources().openRawResource(R.raw.vehicles_simple); - use a BufferedReader to read one line at a time. - call String.split() on the full line to create string tokens. - parse the strings as needed and store in custom data objects. - handle incorrectly formatted or missing data.AlertDialog via Fragment: Android ProgrammingBrian Fraser2017-02-17 | Create an AlertDialog using AppCompatDialogFragment. Interact with the parent activity by setting text in a TextView, and by closing it with .finish().
Steps: - Setup MainActivity with a TextView to edit, and a button to trigger the dialog box. - Create a layout XML file for the dialog's appearance - Create a Java class inheriting from AppCompatDialogFragment to build the AlertDialog - Show the AlertDialog from main using a fragment manager. - Add a cancel button - Call .finish() on the parent activity to close it.Git Merge Conflicts: Android ProgrammingBrian Fraser2017-02-16 | Demo how to merge conflicting changes with Git in Android Studio / IntelliJ. Covers doing the merge with commit/pull/merge/push, and with "update project"/commit/push.
Steps for pull/merge: - Commit changes to local repo. - Pull remote changes, triggers a merge conflict. - Merge changes - Commit changes to local repo. - Push changes to remote repo.