Tag Archives: controller

Windows 10 wont enter sleep mode – solved

Ever since i upgraded my PC last year, my Windows 10 pc will not go to sleep and neither will the monitor and that’s with a fresh Windows 10 installation. The first thing i did was to press the “Restore default settings for this plan”..didnt work.

I’m really finding it hard to figure out how this is a problem when with my old hardware it was never a problem. The only thing i cant think off is that its the motherboard and some setting in BIOS thats not quite right.

This problem has been happening since i installed the new hardware and for some reason i thought it was normal..but remembered how my old PC would behave it would just go to sleep when the windows 10 power settings told it too.

Hardware Specs:
MSI B 450-A PRO (latest BIOS)
AMD Ryzen 2600
Win 10 64 210h (latest)
32GB DDR 4 3000

Possible fixes:

  • Steam running
  • Nvidia Overlay
  • GeForce Experience
  • USB Controller/Joystick being plugged in.

Solution:
After reading about the same problem being caused by a controller being plugged in, I disconnected the Joystick from my PC and within one min the screen had gone off.

Logitech Extreme 3D pro is causing the the issue:

Logitech Extreme 3D pro
https://www.tenforums.com/performance-maintenance/27004-windows-10-will-not-auto-sleep.html

Sources:

Solution Found Here
https://www.techpowerup.com/forums/threads/monitors-wont-go-to-sleep-why.244167/page-3

Cakephp3-Creating custom queries

23666In your object table;

public function findArtistBy(Query $query, array $options)
{
$artist = $options['search'];

return $query->where(['artist LIKE ' => $artist])
->orwhere(['title LIKE ' => $artist])
->contain(['Mp3files'])
->order(['title' => 'DESC']);
}

In your controller method;

$options['search']=$search;
$query=$this->Mp3filesTags->find('ArtistBy',$options);

$this->Flash->success(__('Search complete'));

$this->set('results', $query);
$this->set('count',$count);

So what does it do?
It will return the results where the artist field is like eg.”U2″ and where the title is like “U2”.
It also has an order clause in there and will contain the related records set “mp3files”.

Reference:
http://book.cakephp.org/3.0/en/orm/query-builder.html