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

 

Install a new Cakephp3 Project with composer

  1. You need the php tool composer which you can get from composer.org
  2. Simply run the following command in the windows command prompt  while in your “c:\xampp\htdocs\” folder;

    3.In your htdocs folder you should see a new folder called “my_app_name”

    Example:
    If you wanted to create an application called  “mywebapp” simply enter;

AMD Driver Issues – Update 24th feb

Update 24th feb:
Teh latest AMD drivers cause problems with Overwatch, they seem to cause FPS spikes and basically ruin the game so once again ive rolled back them, drivers to right where i was 16.11.5

I seen a post on the Blizzard forums which acknowledged the issue;

Micro freezes after the new AMD driver update?
https://us.battle.net/forums/en/overwatch/topic/20753198965


So i seemed to have solved the problems with the AMD drivers, i installed the Windows 10 Anniversary Update and not only does windows feel faster the drivers that had problems before now work.’

However im using 17.1.1 at the moment and have not retried the drivers below that were crashing.

Also when you upgrade your drivers you should always reset your in game video settings usally a “restore to default” option exists.  This seems to have sorted all the problems i was having.

AMD have released new drivers 17.1.2

Ive had 4 crashes to desktop since i installed the newest AMD 16.12.2 with Battlefield 1 so ive rolled back to 16.11.5.  The problems and crashes also happen with other games.  Im running Windows 10 64 bit with an AMD R9 380 4 GB.

The errors i got in Battlefield 1 happened 4 times and i wasn’t using DirectX 12 mode either and it never occurred before with previous drivers.


 

 

 

 

And since rolling back the drivers I’ve had no problems, guess the lads at AMD need to sort out the driver.

After a quick Google it seems im not the only person with this problem.

https://community.amd.com/thread/208966

https://www.google.ie/search?q=amd+16.12.1+problems&oq=amd+16.12.1

Edit:
AMD have released new drivers 16.12.2 and i still have issues with them so back to the old drivers.  A clean install of windows 10 didn’t fix the issue either.

16.12.2 – New Error -wtf

Even the update a few days ago still hasn’t sorted the problems.

 

 

CakePHP3 Cache Example – Using Curl to get a Web page contents


Heres a simple example of using the cache feature of cakephp. We want to grab a webpage contents from the web but we only want to do this once otherwise its going to be slow and waste resources.

The basic idea is that we check if the url is saved in cache, if it is then we read it in otherwise we must use curl to grab it.

CakePHP3’s Cache settings are in the config/app.php file;

 

 

CakePHP 3 Cache:
https://book.cakephp.org/3.0/en/core-libraries/caching.html

Call of Duty – Modern Warfare Remastered – Supply Drop Guy

Firstly Activison adding supply drops to Modern Warfare Re masted is shitty, scummy and typical.

 

 

Anyway when i seen that supply drops had been added to the game i seen the guy they added who gives them out is none other than irish actor and ex-glenroe man Timothy V. Murphy.

Hes been in a tonne of programs since Glenroe of course.

Rainbow Six Seige Connection Problems Error 8-0x00000052

If your getting this error and you cant connect to the Rainbow Six Seige Servers its most likely a NAT issues.   If you check the options menu when the game starts up it probably will say “NAT type Strict”.

You will need to port forward to fix this issues;

https://support.ubi.com/en-gb/Faqs/000023138/Connectivity-issues-in-Rainbow-6-Siege

2. Ports
If following the steps above to update and configure your firewall does not resolve the issue, it will be necessary to forward ports. You will need to forward these ports to your computer’s IP address for the best possible connection:

Uplay PC:
TCP: 80, 443, 14000, 14008.

Game Ports:
UDP: 6015

You will need to forward the port 6015

Steam forum;
https://steamcommunity.com/app/359550/discussions/0/458604254457758832/

Black-Its a wonderful life

Black/Colin Vearncombe wrote this great song that ive never forgotten since i first heard it on the radio.  I thought this was an 90’s song but it came out in 1987, im sure i heard on the radio in the early 90’s.

In a year of so many celebrity deaths, he died in early 2016, 10th january, RIP.

http://www.irishexaminer.com/breakingnews/ireland/singer-black-died-from-head-injuries-after-crash-on-icy-road-inquest-hears-760253.html

Battlefield 4 & Battlefield 1 Bluetooth Headsets gives no sound


There’s a problem with Battlefield 4 and Battlefield 1 where you get no sound if your playing with a bluetooth headset.  After a bit of googling and research i found the solution;

1. Goto; control panel->Hardware and Sound->Devices and Printers

2016-09-18-9

 

 

 

 

 

2. Select Properties on your Bluetooth headset and go to the services section.

3. Uncheck “Handsfree Telephony”.

2016-09-18-8

 

 

 

 

 

 

 

Note this works on Windows 10 cant say if it work on Windows 7 or 8.

Cakephp 3 Plugin – Changelogs

Ive finally gotten around to releasing this little app i was working on for Cakephp3.  I decided a while ago to abandon Cakephp 2 and go with the new version 3.

Its been a steep learning curve so i wanted to learn as much as i could.  So thats where this app/plugin came in.

The Aim:
The goal of the plugin was to allow a way to simply log tasks, changes or articles about the cakephp project your working on.

If your working on a website/project on your own you need a way to record your changes and tasks so i thought this would be an ideal way to learn and release something. Sure you could do the same with Github and better but i think its better to have something like this integrated into your application.

Screenshot: Version 1
2016-05-25

 

 

 

 

 

Version 2 Screenshot:
changelogseditv2

 

 

 

 


Github & Source:

https://github.com/gerrymcdonnell/cakephp-changelog