Note: In this article, it’s expected for you to have a decent understanding of basic web development (HTML, CSS, JS) and of course Vue.js to get the most out of it.
We’re going to be using the vue-cli to scaffold a Vue.js project. And create our Vue app:
npm install -g vue-cli
vue create Vue_rock_paper_scissors
In this tutorial, we will create a BlackJack game with Pygame. It will be a hands-on project. The concept of the game is easy, but many variables attributes need to be defined to make it work as needed.I have learned a lot about Pygame and game creation and as well about OOP concepts.Lest start it off!
The project had a __init__ file, img folder for all the card images and three other script files
To start it off OOP Object-Oriented Programming why use it you ask?
Because it makes code more reusable and makes it easier to work with larger programs. OOP programs prevent you from repeating code because a class can be defined once and reused many times.
A class is like a blueprint for creating an object concept most known when talking about OOP.
An object is simply a collection of data (variables) and methods (functions) that act on those data.
As mentioned we will use OOP to help define a real-world concept in a way that the computer will acknowledge. Thats…
As we won’t use any framework, the project will just contain index.html, styles.css (won’t be covered here but can be found in the GitHub repo at the end of the blog), and script.js.
Following the standard approach, we will start off with setting up the index.html skeleton.
To start it off this is Part 2 and first Part you can find bellow:
We will continue on where we started and here we actually get in the database relationship part and how CRUD operations will be operated.
Ones you have logged in then you will be able to create a new post, Edit and as well Delete your post here is how the functionality is structured.
The member() route is created and it will cover creating new posts and as well listing your existing posts.
page = request.args.get(‘page’, 1, type=int)
The “page” is for the pagination and…
One to many relationship is something that you will have to grasp(same about many to many).I will use my own project as an example Blog app and a relational database PostgreSQL and for common real time implication Flask web framework(optimally you have knowledge of HTML/CSS some Flask experience) where a logged in user can make own post and do
We will start off with importing the corresponding packages, connecting to our Flask instance, connecting to our PosgreSQL database and creating Models that will connect to particular __tablename__ and creating specific variables.
The obvious starting faze we connect to our…
If you started on learning Vue.js and SPA sooner or later you will cross path with vue-router to deal with navigation that is unavoidable for a fully functional app.
In a few words: “Creating a SPA with Vue and Vue-Router is as simple as it can be.”
If you don’t have Vue installed on your computer, install Vue via terminal:
npm install -g @vue/cli
Then create your app:
vue create name-of-your-app
You will be prompted to pick a preset in this short project I choose Vue2 and vue-router dependencies as others are not relevant. For more info check here.
This article presents how to first and foremost setup your Google Drive API and then create a python script to download the file.
There are different kind of API Libraries provided in Google Cloud Platform.
But the one we are interested is Google Drive API.
To start it off you should start with creating a project in Google Developers Console.
Then as follows:
Click on Enable APIS and Services
Python has many modules in its standard library.To look at directory files the most popular modules are os, and global, pathlib and maybe few others I am not aware about.
Fore and foremost everyone who programs on python will come across these modules.
The os module provides easy functions that allow us to interact and get Operating System information. Sys module provides access to some variables used or maintained by the interpreter and to functions.
Note: the choose_option() function is based on other project that I published and is linked to this one.So …