Author Archives: kostia_lev
Regular expression to replace links with the text they contain
Today I needed to replace links on my product import .csv file with links of their contents as I don’t want links to other sites on my web shop. So I used Sublime Text for Mac to do it. You just go to Sublime Text menu -> Find -> Replace and put such regexp there: […]
MySQL: NULL value comparison issue
As a PHP developer I was surprised when query like this: SELECT IF(‘Bonus’ <> NULL, 1, 0) returned 0 Any arithmetic comparison with NULL does not return true or false, but returns NULL instead As an alternative guys propose <=> operator called NULL – safe equal to operator. So my query will look like this: SELECT IF(!(‘Bonus’ <=> […]
background-attachment CSS property
Recently I came into and issue. I checked background size on Chrome devtools and it looked okay: But then when I looked on the iPhone gadget: background looked horribly, it was zoomed: After a small search I found explanation (http://caniuse.com/ – feat=background-attachment) . By the fact that mobile browser does not support background-attachment: fixed property. So Chrome devtools(51.0.2704.106 […]
Hello to first visitors of my blog!
I am going to write interesting and useful posts only here. Hopefully I will cope with this!