вторник, 29 января 2013 г.

Занимательная математика

Це відповідь на математичну задачу про хлопчика, який 1/3 свого часу витрачав на сон, 1/4 на школу, 1/5 на гру в футбол, 1/6 на телевізор, 1/7 на вирішення задач з математики. Власне питання було, чи можна так жити?

Відповідь -- ні. Пояснення на фото.


2754/2520 —> 459/420

Если бы использовался ряд
1/2; 1/4; 1/8 ... , то его сумма была уже равна 1.




Правильный ответ: 20 психов



Решение:

7x = 100 + 2x
5x = 100
x = 20

понедельник, 28 января 2013 г.

The 1st line of the Perl script

Upon startup, Perl looks for your script in one of the following places:

  1. Specified line by line via -e switches on the command line.
  2. Contained in the file specified by the first filename on the command line. (Note that systems supporting the #! notation invoke interpreters this way.)
  3. Passed in implicitly via standard input. This works only if there are no filename arguments--to pass arguments to a STDIN script you must explicitly specify a ``-'' for the script name.
With methods 2 and 3, Perl starts parsing the input file from the beginning, unless you've specified a -x switch, in which case it scans for the first line starting with #! and containing the word ``perl'', and starts there instead. This is useful for running a script embedded in a larger message. (In this case you would indicate the end of the script using the __END__ token.) The #! line is always examined for switches as the line is being parsed. Thus, if you're on a machine that allows only one argument with the #! line, or worse, doesn't even recognize the #! line, you still can get consistent switch behavior regardless of how Perl was invoked, even if -x was used to find the beginning of the script.
Because many operating systems silently chop off kernel interpretation of the #! line after 32 characters, some switches may be passed in on the command line, and some may not; you could even get a ``-'' without its letter, if you're not careful. You probably want to make sure that all your switches fall either before or after that 32 character boundary. Most switches don't actually care if they're processed redundantly, but getting a - instead of a complete switch could cause Perl to try to execute standard input instead of your script. And a partial -I switch could also cause odd results.
Parsing of the #! switches starts wherever ``perl'' is mentioned in the line. The sequences ``-*'' and ``- '' are specifically ignored so that you could, if you were so inclined, say

    #!/bin/sh -- # -*- perl -*- -p
    eval 'exec /usr/bin/perl $0 -S ${1+"$@"}'
        if $running_under_some_shell;
to let Perl see the -p switch.
If the #! line does not contain the word ``perl'', the program named after the #! is executed instead of the Perl interpreter. This is slightly bizarre, but it helps people on machines that don't do #!, because they can tell a program that their SHELL is /usr/bin/perl, and Perl will then dispatch the program to the correct interpreter for them.
After locating your script, Perl compiles the entire script to an internal form. If there are any compilation errors, execution of the script is not attempted. (This is unlike the typical shell script, which might run partway through before finding a syntax error.)
If the script is syntactically correct, it is executed. If the script runs off the end without hitting an exit or die operator, an implicit exit is provided to indicate successful completion.

среда, 23 января 2013 г.

Несколько фактов о Николае II

Просто так, для тех, кто его до сих пор считает "кровавым":
1. За время его царствования (20 лет) население России выросло на 50 миллионов человек !!!
2. Урожай зерновых вырос в 2 раза
3. Не было отклонено НИ ОДНО из ходатайств о помиловании, дошедших до Царя.
4. Средства из Лондонского банка, примерно 4 миллиона рублей (прикиньте нынешний эквивалент!), оставшиеся там Николаю Александровичу от отца, без остатка были потрачены на благотворительность.
5. Вещи и обувь в царской семье переходили от старших детей к младшим. Сам Государь был настолько скромен в личной жизни, что до последних дней носил свои "жениховские" костюмы.
7. В Тобольске, в заключении Семья ни на день не оставалось праздной, Государь колол дрова, чистил снег, ухаживал за садом. Солдат, из крестьян, увидев всё это, сказал: "Да если бы дать ему кусок земли, он бы себе Россию своими руками обратно заработал!".
8. Когда временщики готовили обвинение Царю в "измене", кто-то предолжил опубликовать личную переписку Николая Александровича и Государыни. На что получил ответ: "Нельзя, тогда народ признает их святыми!".
9. Государыня и царевны ассистировали в госпиталях на операциях, принимая от хирургов ампутированные руки и ноги, омывая гнойные раны, ухаживая за ранеными.
10. Однажды кто-то заметил, как Александра Фёдоровна на молебне по поводу отправки очередного эшелона на фронт рыдает, будто провожает родных детей...

p.s: список может дополнить еще не один десяток подобных фактов.




PPS: Источник --  группа "Православие и спорт" ресурса ВКонтакте

суббота, 12 января 2013 г.

Уроки по ЦСЯ



Кси, Пси.
ук и ижица.
Земля, Зело, Ферт, Фита.
Ю, Я (я, юс малый и юс большой), Он, Омега, От.
Есть, Ять, И (и десятеричное), Иже (и восьмеричное).
Аз, Ер, Еры, Ерь.


Лекции: 30 22 2 28 1 23 31 9 10 25 17 11 (4) 12 29 7