Angular 4/5 quick tips

 

 

 

 

 

 

how to add bootstrap:

add the scripts and styles to your “.angular-cli.json”

add the following the styles and scripts section;

create new project:

start server:

create new component:

create new service:

Getting started with Python and the Django Framework part 1

So over the christmas holidays ive been keeping myself busy by learning more about the Python language.

Having learnt a few basics i started to try the Django framework which ive seen mentioned quite a lot.  Im reffering to windows mainly in this case see below for more detailed instructions;
https://docs.djangoproject.com/en/2.0/howto/windows/

Step 1:
Install python from the site below and install the necessary version for your Operating system.
https://www.python.org/downloads/release/python-364/

Step 2:
Once you get that installed, verify that python is installed by typing “python” from the windows command prompt;

 

 

 

 

 

 

Step 3:
Install Django framework via command prompt;

pip install django

Step 4:
Create your first project its best to refer to the offical document and tutorials at;
https://docs.djangoproject.com/en/2.0/intro/tutorial01/

From the offical site;

Creating a project

If this is your first time using Django, you’ll have to take care of some initial setup. Namely, you’ll need to auto-generate some code that establishes a Django project – a collection of settings for an instance of Django, including database configuration, Django-specific options and application-specific settings.

From the command line, cd into a directory where you’d like to store your code, then run the following command:

This will create a mysite directory in your current directory. If it didn’t work, see Problems running django-admin.

Retro gaming: Amiga Memories-[draft1]

My first Computer was an Amiga 600 and it was one hell of a machine for its time.  This was around the time of consoles like the SNES and SEGA megadrive which my friends had.

The specs: 7Mhz!
The Amiga 600, also known as the A600, is a home computer that was introduced at the CeBIT show in March 1992. The A600 is Commodore International’s final model based on the Motorola 68000 CPU and the ECS chipset. Wikipedia

Release date: March 1992; 25 years ago
Memory: 1 MB (80 ns access time); (6 MB Maximum, more with unofficial expansions)
Date introduced: March 1992
Manufacturer: Commodore International
Successor: Amiga 1200
CPU: Motorola 68000 @ 7.16 MHz 7.09 MHz (PAL)
Predecessors: Amiga 500, Amiga 500 Plus

 

Emulators:
An emulator is the software you need to run to create a virtual Amiga on your PC/MAC/Linux etc.  You need this software, its free and the most popular two ive found are below;
Games! Shows me the games!
Ive found a few sites where downloading Amiga Games or “Roms” below;

Youtube Movie Channels, you should be watching

I love movies,  so i started to wonder is there anyone on youtube who reviews the good the bad and the ugly movies!

So these are the movie discussion/review channels ive found that are well worth your time.  Got a favorite i didnt mention leave it in the comments!

  1. ralphthemoviemaker
    https://www.youtube.com/channel/UCZ04pLI44c0PWRzubEV6ogA
  2. I hate Everything
    https://www.youtube.com/user/IHEOfficial
  3. Oliver Harper:
    https://www.youtube.com/channel/UC4zKSynEH_sLA1TC8_kU0gQ

Battlefield 1 – Epic Music – Zajdi Zadj- Dawn of A New Time

Battlefield 1 came out last November and its a great game, i havnt had time to play it till this weekend.

I was playing the “War Stories” and there was a piece of music that really stuck in my head, its an incredible piece of music.  The hairs on my neck were standing and this tune is incredible.

I need to do more research to see if DICE or its a folk song, either way its amazing.

This song deserves a really great video tbh.

Cakephp 3 – using uuid as primary key

In addition to use an auto-increment key as the primary key, you may also use UUID columns. CakePHP will create a unique 36 character UUID (Cake\Utility\Text::uuid()) whenever you save a new record using the Table::save() method.

From the book;
https://book.cakephp.org/3.0/en/intro/conventions.html#model-and-database-conventions

So if you create your primary key field as char(36) , cakePHP3 will generate unique uuids rather than the stand auto-incremented 1,2,3 4 keys

Credit to stackoverflow again;
http://stackoverflow.com/questions/34519770/cakephp-3-save-function-not-generating-primary-key-for-database