0
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
Всем привет, давно же я тут не был.
А давайте поговорим о Meltdown и Spectre?
https://meltdownattack.com/
https://ru.wikipedia.org/wiki/Meltdown_(%D1%83%D1%8F%D0%B7%D0%B2%D0%B8%D0%BC%D0%BE%D1%81%D1%82%D1%8C)
https://ru.wikipedia.org/wiki/Spectre_(%D1%83%D1%8F%D0%B7%D0%B2%D0%B8%D0%BC%D0%BE%D1%81%D1%82%D1%8C)
Объясните пожалуйста почему параноики на лоре паникуют и кричат что мол JS код атакующего на сайтах может вызвать одну из этих уязвимостей.
Ведь:
1. JS не имеет прямого доступа к памяти.
2. JS это интерпретируемый ЯП(вызывать мельдоний или спектру нужно на компилируемых ЯП с прямым доступом к памяти: асм/си)
Параноики с лора совсем *банулись или я чего не понимаю?
https://www.linux.org.ru/news/security/13934697#comments
И ещё, что из-за этих уязвимостей измениться у обычных домашних ПК юзверей отказавшихся от патчей за счёт производительности? (Как по мне так ничего)
Whiskas.
pl7ofit,
24 Января 2018
0
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
mixin template IConvertible(Args...)
{
interface IConvertible
{
mixin template IConvertiblePrivate(T)
{
T Convert();
}
mixin template IConvertiblePrivate(TFirst, Args...)
{
TFirst Convert();
mixin IConvertiblePrivate!(Args);
}
mixin IConvertiblePrivate!(Args);
};
}
void main()
{
mixin IConvertible!(int, float);
class Number : IConvertible
{
int Convert() { return 0; }
float Convert() { return 0.0; }
};
}
#dlang
В продолжение темы дженериков и шаблонов
P.S. Проверочный код: hate
Desktop,
06 Января 2018
−1
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
private void button1_Click(object sender, EventArgs e)
{
textBox3.Clear();
textBox4.Clear();
Stringstr = textBox2.Text;
String code = textBox1.Text;
int size = str.Length;
char[] s = newchar[size];
if (size == 0) { textBox4.Text = "Ошибка! Вы не ввели исходный текст для шифрования."; return; }
intsize C = code.Length;
char[] sC = new char[sizeC];
if (sizeC == 0) { textBox4.Text = "Ошибка! Вы не ввели ключевое слово."; return; }
int[] secret = new int[sizeC];
int[] string1 = new int[size];
for (inti = 0; i< size; i++)
s[i] = str[i];
for (inti = 0; i<sizeC; i++)
sC[i] = code[i];
int j = 0;
for (inti = 0; i<sizeC; i++)
{
j = 0;
while (j != kolAl)
{
if (sC[i] == Al[j]) { secret[i] = j + 1; break; }
j++;
}
}
for (inti = 0; i< size; i++)
{
j = 0;
while (j != kolAl)
{
if (s[i] == Al[j]) { string1[i] = j; break; }
j++;
}
}
char[] finish = newchar[size];
int x = 0;
for (inti = 0; i< size; i++)
{
if (Al.Length<= string1[i] + secret[x])
{
finish[i] = Al[string1[i] + secret[x] - Al.Length];
}
else { finish[i] = Al[string1[i] + secret[x]]; }
x++;
if (x == secret.Length) x = 0;
textBox3.Text += finish[i];
}
textBox4.Text = "Шифрованиезавершеноудачно!";
}
Одногрупница сделала Шифр Вижинера
https://ru.wikipedia.org/wiki/Шифр_Виженера
Беда в том, что код тоже представляет из себя шифр.
Сделал сам, получилось 4 строчки на зашифровку и 4 на расшифровку.
Я в шоке. Это отличница у нас (4 курс :) *:(*)
Ладно, это говнище еще можно понять и простить, только там расшифровка функция еще 200 строк, а так же шифровка и расшифровка файла, соответственно по 300 строк. Так и живем.
Я в академ отпуск.
GovnoIzJopy,
22 Декабря 2017
0
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
//функция возвращает название списка товара для аналитики
getItemListName: function(obj) {
obj = $(obj);
var list = 'other';
if (obj.parents('.AddedToCart__box--showcase').length > 0) {
list = 'paneAddToCart';
} else if (obj.parents('.slider').length > 0
&& obj.parents('.slider').find('.sliderHeader').html() == 'Лучшая цена') {
list = 'paneBestPrice';
} else if (obj.parents('.slider').length > 0
&& obj.parents('.slider').find('.sliderHeader').html() == 'Цена недели') {
list = 'paneWeekPrice';
} else if (obj.parents('.slider').length > 0
&& obj.parents('.slider').find('.sliderHeader').html() == 'Акционные товары') {
list = 'panePromo';
} else if (obj.parents('.slider').length > 0
&& obj.parents('.slider').find('.sliderHeader').html() == 'Популярные товары'
&& $('body').hasClass('Page--itemCard')) {
list = 'panePopDetail';
} else if (obj.parents('.slider').length > 0
&& obj.parents('.slider').find('.sliderHeader').html() == 'Популярные товары'
&& document.location.pathname.indexOf('/personal/cart/') >= 0) {
list = 'panePopCart';
} else if (obj.parents('.slider').length > 0
&& obj.parents('.slider').find('.sliderHeader').html() == 'Популярные товары'
&& $('.Rubric--category').length > 0) {
list = 'panePopRubrics';
} else if (obj.parents('.slider').length > 0
&& obj.parents('.slider').find('.sliderHeader').html() == 'Популярные товары') {
list = 'panePopCatalog';
} else if (obj.parents('.relatedItem').length > 0
&& obj.parents('.relatedItem').find('.relatedItemsHeader').html() == 'Сопутствующий товар') {
list = 'relatedCart';
} else if (obj.parents('.analogues').length > 0
&& document.location.search.indexOf('REMOVE_CODE') >= 0) {
list = 'replacements';
} else if (obj.parents('.analogues').length > 0) {
list = 'analog';
} else if (obj.parents('.consumables').length > 0) {
list = 'consumables';
} else if (document.location.pathname.indexOf('/search/') >= 0) {
list = 'search';
} else if (document.location.pathname.indexOf('/promo/actions/') >= 0) {
list = 'promo';
} else if (document.location.pathname.indexOf('/personal/favorite/') >= 0) {
list = 'favorite';
} else if (document.location.pathname.indexOf('/personal/remind/') >= 0) {
list = 'remind';
} else if (document.location.pathname.indexOf('/personal/order/') >= 0) {
if (document.location.href.indexOf('plist=Y') >= 0) {
list = 'allMyOrder';
} else {
list = 'myOrder';
}
} else if (document.location.pathname.indexOf('/services/code/') >= 0) {
list = 'orderByCode';
} else if (document.location.pathname.indexOf('/catalog/compare/') >= 0) {
list = 'compare';
} else if (document.location.pathname.indexOf('/services/cartridges/') >= 0) {
list = 'cartridge';
} else if (document.location.pathname.indexOf('/promo/best_price/') >= 0) {
list = 'bestPrice';
} else if (document.location.pathname.indexOf('/promo/sale/') >= 0) {
list = 'sale';
} else if (document.location.pathname.indexOf('/catalog/novelty/') >= 0) {
list = 'novelty';
} else if (document.location.pathname.indexOf('/services/sets/') >= 0) {
list = 'collections';
} else if (document.location.pathname.indexOf('/catalog/brands/') >= 0) {
list = 'brands';
} else if (obj.parents('.listItemsContainer').length > 0
&& document.location.search.indexOf('REMOVE_CODE') >= 0) {
list = 'replacements';
} else if (obj.parents('.listItemsContainer').length > 0) {
list = 'catalog';
} else if ($('body').hasClass('Page--itemCard')) {
list = 'detail';
}
return list;
},
Объект-обертка над Гугл аналитикой
Написано старшим программистом
_copy_of,
20 Ноября 2017
+4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
ВЫБРАТЬ
SEO.титл КАК Титл,
SEO.Описание КАК дескриптионс,
SEO.Кейворд КАК Кейворд,
SEO.Ссылка КАК сео
ИЗ
Справочник.SEO КАК SEO
импортозамещение...
OdinAsss,
14 Ноября 2017
−4
- 1
Итого байт: 205812872340
Результат прошлого кода! А давайте письками померяемся?
samopisiets,
09 Ноября 2017
−7
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
#include <stdio.h>
// Бесконечный дождик на экране! Ахуенчик ёпта
int main()
{
char c = '\\';
while(1)
{
for(int i=0; i<20; i++)
{
usleep(1000);
for(int sp=0;sp<i;sp++) printf(" "); //печатаем пробелы
printf("%c", c);
}
}
}
pawn-master,
04 Ноября 2017
−2
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
public static function GenerateMenu()
{
$item = [];
$section = self::find()->all();
$count_section = 0;
foreach ($section as $model_section) {
$item[] = ['label' => $model_section->name, 'url' => '#'];
$category = \common\models\Category::find()->where(['id_section' => $model_section->id])->all();
$count_category = 0;
foreach ($category as $model_category) {
$item[$count_section]['items'][$count_category] = ['label' => $model_category->name, 'url' => '#'];
$subcategory = \common\models\Subcategory::find()->where(['id_category' => $model_category->id])->all();
$count_subcategory = 0;
foreach ($subcategory as $model2) {
$item[$count_section]['items'][$count_category]['items'][$count_subcategory] = ['label' => $model2->name, 'url' => '#'];
$count_subcategory++;
}
$count_category++;
}
$count_section++;
}
return $item;
}
Феерическое решение для вывода tree из трех категорий.
qstd,
09 Сентября 2017
−19
- 1
- 2
- 3
- 4
- 5
- 6
let countries = ``
missingCountries.map((c, i) => {
countries += ` '${c.country}'`
if (i !== missingCountries.length - 1) countries += `,`
})
map? Ara.
sigod,
07 Сентября 2017