На DUMP 2015 был очень доступный для понимания доклад «Свежие новости из мира слабо полностью антисимметричных квазигрупп десятого порядка». Там Алексей Кирпичников достаточно последовательно приходит к методу Дамма, по ходу рассказа объясняя и о том, что значит «квазигруппы» и «антисимметричность». Но как была получена «магическая» табличка он не объясняет. www.youtube.com/watch?v=cwKnHHRutUs
Там используется система голосований за снипеты. Не сайт или разработчики сайта навязывают вам какие-то снипеты, а сами пользователи делятся своими решениями. И сами же пользователи решают полезно/интересно это или нет. К тому же, там также есть возможность предложить свою ревизию на решение или описать в комментариях, почему вам это решение кажется плохим. Так что вы слишком категоричны.
The meter element represents a scalar measurement within a known range, or a fractional value; for example disk usage, the relevance of a query result, or the fraction of a voting population to have selected a particular candidate.
The meter element should not be used to indicate progress (as in a progress bar). For that role, HTML provides a separate progress element
Пробелы на табуляцию — Edit/Convert Indent/To tabs
По поводу лишних пробелов, не очень понятно, что вы имеете ввиду. PhpStorm поддерживает автоформатирование Code/Reformate Code, он в том числе приводит в порядок пробелы
Чтобы настроить все это на сохранение, можно в Settings/Keymaps для Save All назначить комбинацию Ctrl+Alt+S, записать макрос Edit/Macros: Ctrl+A, Code/Reformate Code, Edit/Convert Indent/To tabs, Arrow Up, Arrow Down, Ctrl+Alt+S
и назначить этот макрос в Settings/Keymaps на комбинацию Ctrl+S
Settings/Smart Keys/Surround selection on typing quote or brace — для выделения кавычками (при нажатии на кавычку выделенный текст будет в них обернут)
По реактивному программированию неплохой доклад был на msdevcon 2015.
«Реактивное программирование на C# в робототехнике и при создании Kinect-приложений» от Александра Кирсанова.
Рекомендую посмотреть.
Вот если там есть блоки кода, выглядящие как 1 в 1 спортированные с РНР на JS — тогда ага, ой.:-)
Я Вам больше скажу, там даже комментарии 1 в 1. Вот пример:
Jii.js
/**
* Translates a path alias into an actual path.
*
* The translation is done according to the following procedure:
*
* 1. If the given alias does not start with '@', it is returned back without change;
* 2. Otherwise, look for the longest registered alias that matches the beginning part
* of the given alias. If it exists, replace the matching part of the given alias with
* the corresponding registered path.
* 3. Throw an exception or return false, depending on the `$throwException` parameter.
*
* For example, by default '@jii' is registered as the alias to the Jii framework directory,
* say '/path/to/jii'. The alias '@jii/web' would then be translated into '/path/to/jii/web'.
*
* If you have registered two aliases '@foo' and '@foo/bar'. Then translating '@foo/bar/config'
* would replace the part '@foo/bar' (instead of '@foo') with the corresponding registered path.
* This is because the longest alias takes precedence.
*
* However, if the alias to be translated is '@foo/barbar/config', then '@foo' will be replaced
* instead of '@foo/bar', because '/' serves as the boundary character.
*
* Note, this method does not check if the returned path exists or not.
*
* @param {string} alias the alias to be translated.
* @param {boolean} [throwException] whether to throw an exception if the given alias is invalid.
* If this is false and an invalid alias is given, false will be returned by this method.
* @return {string|boolean} the path corresponding to the alias, false if the root alias is not previously registered.
* @throws {Jii.exceptions.InvalidParamException} if the alias is invalid while throwException is true.
* @see setAlias()
*/
getAlias: function (alias, throwException) {
if (Jii._.isUndefined(throwException)) {
throwException = true;
}
if (alias.indexOf('@') !== 0) {
return alias;
}
var index = alias.indexOf('/');
var root = index === -1 ? alias : alias.substr(0, index);
if (Jii._.has(this.aliases, root)) {
if (Jii._.isString(this.aliases[root])) {
return this.aliases[root] + (index !== -1 ? alias.substr(index) : '');
}
var finedPath = null;
Jii._.each(this.aliases[root], function (path, name) {
var testAlias = alias + '/';
if (testAlias.indexOf(name + '/') === 0) {
finedPath = path + alias.substr(name.length);
return false;
}
});
if (finedPath !== null) {
return finedPath;
}
}
if (throwException) {
throw new Jii.exceptions.InvalidParamException('Invalid path alias: ' + alias);
}
return false;
}
BaseYii.php
/**
* Translates a path alias into an actual path.
*
* The translation is done according to the following procedure:
*
* 1. If the given alias does not start with '@', it is returned back without change;
* 2. Otherwise, look for the longest registered alias that matches the beginning part
* of the given alias. If it exists, replace the matching part of the given alias with
* the corresponding registered path.
* 3. Throw an exception or return false, depending on the `$throwException` parameter.
*
* For example, by default '@yii' is registered as the alias to the Yii framework directory,
* say '/path/to/yii'. The alias '@yii/web' would then be translated into '/path/to/yii/web'.
*
* If you have registered two aliases '@foo' and '@foo/bar'. Then translating '@foo/bar/config'
* would replace the part '@foo/bar' (instead of '@foo') with the corresponding registered path.
* This is because the longest alias takes precedence.
*
* However, if the alias to be translated is '@foo/barbar/config', then '@foo' will be replaced
* instead of '@foo/bar', because '/' serves as the boundary character.
*
* Note, this method does not check if the returned path exists or not.
*
* @param string $alias the alias to be translated.
* @param boolean $throwException whether to throw an exception if the given alias is invalid.
* If this is false and an invalid alias is given, false will be returned by this method.
* @return string|boolean the path corresponding to the alias, false if the root alias is not previously registered.
* @throws InvalidParamException if the alias is invalid while $throwException is true.
* @see setAlias()
*/
public static function getAlias($alias, $throwException = true)
{
if (strncmp($alias, '@', 1)) {
// not an alias
return $alias;
}
$pos = strpos($alias, '/');
$root = $pos === false ? $alias : substr($alias, 0, $pos);
if (isset(static::$aliases[$root])) {
if (is_string(static::$aliases[$root])) {
return $pos === false ? static::$aliases[$root] : static::$aliases[$root] . substr($alias, $pos);
} else {
foreach (static::$aliases[$root] as $name => $path) {
if (strpos($alias . '/', $name . '/') === 0) {
return $path . substr($alias, strlen($name));
}
}
}
}
if ($throwException) {
throw new InvalidParamException("Invalid path alias: $alias");
} else {
return false;
}
}
Neither the name of Yii Software LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
Запрещено использовать имя Yii для продвижения своего проекта без письменного разрешения
В принципе, цитата и не утверждает, что Gen 2 ограничен размером ~10MB. Это очевидно. Гораздо более интересно, что означает ~10MB при неограниченном размере Gen 2. В книге подробной информации по этому поводу нет.
Я предполагаю, что это не первый порог, а итеративное значение суммы масс всех объектов, перешедших с Gen 1 в Gen 2 с момента последнего запуска Full GC collects (Gen 2, 1 and 0). Если эта сумма равна или больше ~10MB, то запускается полная сборка мусора, а значение суммы масс обнуляется. И так далее. Но это лишь мои догадки.
Размер поколения «2» не ограничивается искусственно, используется вся доступная память (которой Windows может поделиться с CLR), но GC не ждет ее полного заполнения а использует пороговые значения (какие не знаю).
Цитата из «Under the Hood of .NET Management» от Red-Gate:
The GC runs automatically on a separate thread under one of the conditions below.
• When the size of objects in any generation reaches a generation-specific threshold. To
be precise, when:
• Gen 0 hits ~256 K
• Gen 1 hits ~ 2 MB (at which point the GC collects Gen 1 and 0)
• Gen 2 hits ~10 MB (at which point the GC collects Gen 2, 1 and 0)
• GC.Collect() is called in code
• the OS sends a low memory notification.
В целом перевод «CLR via C#. Программирование на платформе Microsoft .NET Framework 4.5 на языке C#. 4-е изд» хороший. Единственное, что меня смутило, так это перевод слова Reflection на русский язык как «Отражения». Привык к переводу «Рефлексия», ну или на крайний случай вообще оставлять без перевода.
Для Chrome есть расширение NoCoffee, позволяющее проверять дизайн на всевозможные дефекты зрения, включая различные формы цветовой слепоты
chrome.google.com/webstore/detail/nocoffee/jjeeggmbnhckmgdhmgdckeigabjfbddl?hl=en-US
www.youtube.com/watch?v=cwKnHHRutUs
Добавили technet.microsoft.com/en-us/library/gg699618(v=sql.110).aspx
По поводу лишних пробелов, не очень понятно, что вы имеете ввиду. PhpStorm поддерживает автоформатирование Code/Reformate Code, он в том числе приводит в порядок пробелы
Чтобы настроить все это на сохранение, можно в Settings/Keymaps для Save All назначить комбинацию Ctrl+Alt+S, записать макрос Edit/Macros: Ctrl+A, Code/Reformate Code, Edit/Convert Indent/To tabs, Arrow Up, Arrow Down, Ctrl+Alt+S
и назначить этот макрос в Settings/Keymaps на комбинацию Ctrl+S
Settings/Smart Keys/Surround selection on typing quote or brace — для выделения кавычками (при нажатии на кавычку выделенный текст будет в них обернут)
Если это так, то стоило бы указать ссылку на оригинал.
«Реактивное программирование на C# в робототехнике и при создании Kinect-приложений» от Александра Кирсанова.
Рекомендую посмотреть.
www.youtube.com/watch?v=agnUwf8UyRA
Особенно мне понравился из доклада дом в городе Таллин, у которого 24 адреса.
Я Вам больше скажу, там даже комментарии 1 в 1. Вот пример:
Но тем не менее идея автора мне нравится.
Запрещено использовать имя Yii для продвижения своего проекта без письменного разрешения
Если быть более точным, то >= 1000
Я предполагаю, что это не первый порог, а итеративное значение суммы масс всех объектов, перешедших с Gen 1 в Gen 2 с момента последнего запуска Full GC collects (Gen 2, 1 and 0). Если эта сумма равна или больше ~10MB, то запускается полная сборка мусора, а значение суммы масс обнуляется. И так далее. Но это лишь мои догадки.
Цитата из «Under the Hood of .NET Management» от Red-Gate: