Posts

Fixed: windows 10 no sound without headphones

Please go to control panel -> hardware and sound -> sound

In the playback tab ,  Please enable and set your laptop speakers as the default device

If you cannot set  speakers as the default device, do the following:
go to start search and type cmd search will return cmd.exe right click on this and select 'run as administrator' at the prompt type:-



net localgroup Administrators /add networkservice, press enter then type:net localgroup Administrators /add localservice, press enter then type:exit, press enter  restart your computer

What does 'grep -v' do

-v means "invert the match" in grep, in other words, return all non matching lines.

xargs and kill example

sudo ps -ef | grep java | grep email | awk '{print $2}' | xargs sudo kill -9

How to find Linkedin company page id

From the company page, check Notifications tab, the link of Notifications contains company page id in the URL.

If you cannot find Notifications tab, then you can view page source, and search for "companyid".

How to change Google cloud SQL timezone

Change MySQL Flag default_time_zone to the value you want. For example, to change to Eastern Standard time:

change default_time_zone to -05:00

How to change Google cloud SQL timezone

Change MySQL Flag default_time_zone to the value you want. For example, to change to Eastern Standard time:

change default_time_zone to -05:00

Watch out for LEFT JOIN with additional conditions in SQL

SELECT  *
FROM    a
LEFT JOIN
b
ON      b.a_id = a.id
WHERE   b.column = 'sth'
Return the same result as (but less efficient)

SELECT  *
FROM    a
INNER JOIN
b
ON      b.a_id = a.id
WHERE   b.column = 'sth'
Put additional conditions on left table on left join will actually filter out those rows where b.column is null. Because  NULL in SQL doesn't equal to anything. So the only exception to put extra condition on left table of left join is to check b.column is null or not.

If you actually want to return those  b.column = 'sth' and at the same time with all records of table a, then the condition should be moved into ON clause:

SELECT  *
FROM    a
LEFT JOIN
        b
ON      b.a_id = a.id
AND b.column = 'sth'