Closures
This was fun! CodeSchool did a great job in Javascript Road Trip Part 3, but it just didn’t click for my son right away. Closures still trip me up to this day.
My first explanation attempt:
“A closure is like a dinosaur fossil — a snapshot from a moment in time preserved for millions of years. You can get still get information about the dinosaur from the fossil, even though the dinosaur itself has been gone for millions of years.”
Closures were starting to make sense, so I tried using cookies again . . .
“Let’s say I go to the same bakery every day and ask the baker for a cookie. The first thing he/she asks is, ‘What kind of cookie do you want?’ After a few days, the baker might already know what cookie I like and simply ask, ‘The usual?’. By saving my cookie choice in memory, he/she is able to reuse the same function from the previous day to get me the proper cookie without having to ask again.”
Eh… It was still a bit fuzzy, until my son asked me…
“So, it’s like when we go to the barber and he just cuts our hair without asking what we want? He always asks new customers how they want him to cut, but never asks us anymore.”
Ding, ding, ding! He got it!!!
Конечно, можно парсить через прокси, но это платное удовольствие
и в целом не решает проблемы.
Пока понял что ИП или ООО регистрировать в любом случае нужно.Да, поскольку прибыль регулярная, без этого не обойтись.
Открывать ли расчетный счет?Если ИП теоретически можно и не открывать. Хотя на практике - трудно представить ситуацию когда без него можно однозначно обойтись. В случае ООО - без вариантов открывать.
Нужно ли получать какую-либо лицензию?Если вы ведете какаю-то деятельность которая подлежит однозначному лицензированию - например торгуете оружием, однозначно нужно получать, если нет, то не нужно.
Нужно ли уведомлять какую-нибудь гос.структуру о том, что я храню персональные данные?Статья 22 пункт 1 федерального закона N 152-ФЗ
А о том, то на моем сайте можно провести какую-либо денежную операцию?Тут все просто - на вашем сайте однозначно нельзя провести какую-то денежную операцию! Это просто физически невозможно.
И раз уж на то пошло, сколько можно этим заниматься нелегально, при каких объемах и что за это грозит?www.consultant.ru
Как работать с юриками если ты веб-сервис? Типовой договор с каждым? Выставлять счета по почте + ЭЦП?Неправильный вопрос. Веб сервис не может работать ни с юриками ни с физиками. Он работает с компьютерами.
mysql> explain select test6.i from test6, test9 where test6.i=test9.i;
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------------------------------------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------------------------------------------+
| 1 | SIMPLE | test6 | NULL | ALL | NULL | NULL | NULL | NULL | 2 | 100.00 | NULL |
| 1 | SIMPLE | test9 | NULL | ALL | NULL | NULL | NULL | NULL | 4 | 25.00 | Using where; Using join buffer (Block Nested Loop) |
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------------------------------------------+
2 rows in set, 1 warning (0,00 sec)
mysql> show warnings;
+-------+------+-----------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+-------+------+-----------------------------------------------------------------------------------------------------------------------------------------+
| Note | 1003 | /* select#1 */ select `test`.`test6`.`i` AS `i` from `test`.`test6` join `test`.`test9` where (`test`.`test9`.`i` = `test`.`test6`.`i`) |
+-------+------+-----------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0,00 sec)
mysql> explain select test6.i from test6 join test9 on test6.i=test9.i;
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------------------------------------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------------------------------------------+
| 1 | SIMPLE | test6 | NULL | ALL | NULL | NULL | NULL | NULL | 2 | 100.00 | NULL |
| 1 | SIMPLE | test9 | NULL | ALL | NULL | NULL | NULL | NULL | 4 | 25.00 | Using where; Using join buffer (Block Nested Loop) |
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------------------------------------------+
2 rows in set, 1 warning (0,00 sec)
mysql> show warnings;
+-------+------+-----------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+-------+------+-----------------------------------------------------------------------------------------------------------------------------------------+
| Note | 1003 | /* select#1 */ select `test`.`test6`.`i` AS `i` from `test`.`test6` join `test`.`test9` where (`test`.`test9`.`i` = `test`.`test6`.`i`) |
+-------+------+-----------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0,00 sec)
SELECT maker, price FROM Product JOIN PC USING(model)