I have written three python programs in increasing order of complexity.
First one is:
I have written three python programs in increasing order of complexity.
First one is:
DJango Web Framework:
It is a free and open source framework for making web applications using python. It is claimed to be a
batteries included framework.
It includes the Admin Site, An Object Relational Mapper(ORM), Authentication, Caching etc.
A Web Application works by having a Front end(Browser/Client) and a Backend(Server).
Recently the trend has been to have the server expose a set of server api endpoints and supply only the data. This data can be either in XML or JSON format.
Front end could be a React/Vue/Angular project.
We cannot compare DJango with React or Vue as they both work at the front end and DJango
is a server technology. A better comparison would be between django and ASP.net core or Express.
We could however use DJango to build the server APIs.
Here is a list of Questions you can pose to the students(VTU):
Laboratory Component:
1. Installation of Python, Django and Visual Studio code editors can be demonstrated.
2. Creation of virtual environment, Django project and App should be demonstrated
3. Develop a Django app that displays current date and time in server
4. Develop a Django app that displays date and time four hours ahead and four hours before as an offset of current date and time in server.
5. Develop a simple Django app that displays an unordered list of fruits and ordered list of selected students for an event
6. Develop a layout.html with a suitable header (containing navigation menu) and footer with copyright and developer information. Inherit this layout.html and create 3 additional pages: contact us, About Us and Home page of any website.
7. Develop a Django app that performs student registration to a course. It should also display list of students registered for any selected course. Create students and course as models with enrolment as ManyToMany field.
8. For student and course models created in Lab experiment for Module2, register admin interfaces, perform migrations and illustrate data entry through admin forms.
9. Develop a Model form for student that contains his topic chosen for project, languages used and duration with a model called project.
10. For students enrolment developed in Module 2, create a generic class view which displays list of students and detailview that displays student details for any selected student in the list.
11. Develop example Django app that performs CSV and PDF generation for any models created in previous laboratory component.
12. Develop a registration page for student enrolment as done in Module 2 but without page refresh using AJAX.
13. Develop a search application in Django using AJAX that displays courses enrolled by a student being searched.
You can download the Lab Manual (PDF) from Here: https://drive.google.com/file/d/1MtkObE3iD7kD05cTQcnAwDT298rhXTRf/view?usp=sharing
This project is a modification of an existing app I created earlier.
~TLDR: clone the repo https://github.com/bmkamath2000/mukBoApps and open in android studio to run.
Upon creating an android project in android studio there was a MainActivity.java automatically created in the src folder.
I instinctively guessed that I needed to declare a MyGLSurfaceView which extends a GLSurfaceView.
My guess turned true as I got a surface in the app when I created a run configuration and
launched the app using it.
I had some experience with rudimentary android app development over several years in the past.
As you can see onCreate of the MainActivity the view is set as content view.
In MyGLSurfaceView
I created a MyGLRenderer instance which is derived from GLSurfaceView.Renderer.
The MyGLRenderer declares a Triangle and draws it onDrawFrame.
I have Created the Triangle class which is based on the android official site:
https://developer.android.com/develop/ui/views/graphics/opengl/draw
The triangle is subdivided and on single or delayed click the number of triangles
triples or divides by a factor of 3.
Here is how it looks:
Thanks
Head over to the site https://protobuf.dev
In that site you will find things to compile a C++ and many other language projects with address book. Now just take a deep breath and dive in.
Warning: This is easy in Linux and verry verry difficult in Windows
If you find the going tough in that site, come here for I will get you some personal touch.
write_to_file.cpp
read_from_file.cpp
You can learn a lot by doing.
Ditto with CMake project building and running in Ubuntu.
An example cpp-protobuf-example in the github site https://github.com/afiskon/cpp-protobuf-example
comes up often in the google search and I tried compiling it in windows and it gave error.
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR)
Its difficult to install protobuf in windows but I did it in Ubuntu(which is just an app in windows now with technology of windows subsystem for linux-WSL).
First I did a git clone with this cmd:
git clone https://github.com/afiskon/cpp-protobuf-example.git
then I changed directory to
cd cpp-protobuf-example/
After that I created a build directory by
mkdir build
followed by
cd build
followed by
cmake ..
which gave the same error as in windows. In ubuntu its much easier to install required libraries.
sudo apt-get install protobuf-compiler libprotobuf-dev
this command installed everything for me and I was good to go build the app.
cmake ..
worked like charm with following output:
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so (found version "3.12.4")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kamathbol/GitHub/cpp-protobuf-example/build
then the command
cmake --build .
[ 20%] Running cpp protocol buffer compiler on src/proto/Game.proto
[ 40%] Building CXX object CMakeFiles/proto.dir/Game.pb.cc.o
[ 60%] Linking CXX static library libproto.a
[ 60%] Built target proto
[ 80%] Building CXX object CMakeFiles/main.dir/src/Main.cpp.o
[100%] Linking CXX executable main
[100%] Built target main
then upon running the main
./main
Saving heroes...
Loading heroes...
Name: eax
HP: 50
XP: 256
Class: warrior
Weapon: sword
Arrows: 15
Name: afiskon
HP: 25
XP: 1024
Class: mage
Spellbook: fireball, thunderbolt,
Mana: 100
BTW here is the Main.cpp source that gets you this Output: