- 1
- 2
- 3
https://tass.ru/nacionalnye-proekty/6391295
Томские ученые разработали первое в России программное обеспечение, независимое от Windows
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+1
https://tass.ru/nacionalnye-proekty/6391295
Томские ученые разработали первое в России программное обеспечение, независимое от Windows
ШОК! Томские ученые открыли способ создавать программное обеспечение, независимое от Windows. Нужно всего лишь…
0
.def temp = r16
.def rr1 = r17
.org 0
Ldi r16, low(RAMEND)
out SPL, temp
Ldi r16 high(RANEND)
out SPH, temp
rjmp start
start:
ldi temp,255
out DDRB, temp
out PORTB,temp
rcall delay
Ldi temp,0x00
out PORTB,temp
Rcall delay
rjmp start
delay:
ldi rr1, 0xFF
Pdelay:
Dec rr1
brne Pdrlay
ret
Почему микроконтроллер не мигает лампочка?
Но студия не ругается
(Ассемблер АVR)
+2
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
Вот блин, почти в любом проекте в начале каждого файла такая вот куча . Я блядь открываю файл, чтобы посмотреть, что это, хотя бы одну строчку написали: этот класс занимается тем-то и тем-то, так нет, а вот всю эту бурду "ASS PISS" LSD LICENCE - пожалуйста.
−1
Здравствуйте.
Многие из вас знают пользователя TarasB, который обитал на этом сайте.
Кто знает какие-либо рабочие контакты, чтобы можно было с ним связаться?
А то на мыло не отвечает. Может на каких-то ещё форумах он доступен?
0
LRESULT WINAPI DefWindowProc(
_In_ HWND hWnd,
_In_ UINT Msg,
_In_ WPARAM wParam,
_In_ LPARAM lParam
);
+1
bool almostIncreasingSequence(std::vector<int> sq) {
bool b2 = true;
int s = sq.size();
if (s > 2) { // Последовательность меньше трех чисел дает истину.
int i = 1; // Проверка начинается со второго элемента.
int x = -1; // Для записи индекса элемента <= предыдущего, а еще "флаг".
while ((b2) && (i < s)) { // При нахождении 2-го лишнего происходит выход из цикла.
if (x != -1) { // Проверка "флага".
if (sq[i] <= sq[i - 1]){ // Сравнение с предыдущим элементом.
b2 = false; // Если условие истинно, то это уже второй элемент,
} // "конфликтующий" с предыдущим, следовательно, выход и "ложь".
if ((sq[i] <= sq[x - 1]) && (x != 1) && (sq[i - 1] <= sq[x - 2])) { // над этим условием я думал слишком долго
b2 = false; // Если элемент был "убран", индекс конфликтного
} // элемента записан в "x".
}
else { // Если условие ложно, то записываем индекс элемента, который
if (sq[i] <= sq[i - 1]) { // "конфликтует" с предыдущим.
x = i; // Нам не известно лишний он или нет.
}
}
i++;
}
}
return b2;
}
проверяет, можно ли убрать только один элемент из последовательности, чтобы она стала постоянно возрастающей.
+3
#define __DEBUG
#ifdef __DEBUG
#define print_pair(p) do{std::cout << "(" << ((p).first + 1) << ", "\
<< ((p).second + 1) << ")" << std::endl;}while(0);
#endif
Graph::result
Graph::dijkstra (int start)
{
#ifdef __DEBUG
std::cout << "Dijkstra algorithm tracing:" << std::endl;
#endif
distances[start] = 0;
std::set<std::pair<int, int>> q;
q.insert (std::make_pair(distances[start], start));
while (!q.empty())
{
#ifdef __DEBUG
std::cout << "top element of a set: ";
print_pair(*q.begin());
#endif
int current = q.begin()->second;
q.erase(q.begin());
for (int i = 0; i < adj[current].size(); ++i)
{
#ifdef __DEBUG
std::cout << "current vertex: " << (current + 1);
std::cout << " ad current state of distances array is: " << std::endl;
for (auto i: distances)
std::cout << i << " ";
std::cout << std::endl;
#endif
int to = adj[current][i].second;
int length = adj[current][i].first;
// Relaxations
if (distances[to] > distances[current] + length)
{
#ifdef __DEBUG
std::cout << "relaxation for edge (" << current << ", " << to << ") ";
std::cout << "with weight " << length << std::endl;
#endif
q.erase(std::make_pair(distances[to], to));
distances[to] = distances[current] + length;
path[to] = current;
q.insert(std::make_pair(distances[to], to));
}
}
}
// Replace INF by -1
std::replace (distances.begin(), distances.end(), INF, -1);
return distances;
}
Я у мамы решил подебажить как мыщъх дебажил при помощи отладочной печати. Вот что получилось.
+3
std::string sql = "INSERT INTO digest_test_record (set_id, ref_digest, cand_digest, vdt_cfg_warn, digest_cfg_warn, "
"ref_duration, ref_cardinality, ref_dispersion, "
"cand_duration, cand_cardinality, cand_dispersion, "
"cardinality, difference, red_difference, ext_difference, "
"inv_cardinality, inv_difference, inv_red_difference, inv_ext_difference,
"timing, lib_version) SELECT 0, "
"ROW($1, $2, $3, $4, $5, $6, $7, $8)::digest_info, "
"ROW($9, $10, $11, $12, $13, $14, $15, $16)::digest_info,"
"$17, $18, ",
"$19, $20, $21, "
"$22, $23, $24, "
"$25, $26, $27, $28, "
"$29, $30, $31, $32, "
"$33, ROW($34, $35, $36, make_date($37, $38, $39), $40)::lib_version_info";
cn.prepare("insert", sql);
xact.prepared("insert")
(ref_digest_info.src_width)(ref_digest_info.src_height)(ref_digest_info.src_fps)(ref_digest_info.src_duration)
(ref_digest_info.vdt_duration)(ref_digest_info.cardinality)(ref_digest_info.has_flags)(ref_digest_info.src_filename)
(cand_digest_info.src_width)(cand_digest_info.src_height)(cand_digest_info.src_fps)(cand_digest_info.src_duration)
(cand_digest_info.vdt_duration)(cand_digest_info.cardinality)(cand_digest_info.has_flags)(cand_digest_info.src_filename)
(results.vdt_cfg_warn)(results.digest_cfg_warn)
(results.ref_duration)(results.ref_cardinality)(results.ref_dispersion)
(results.cand_duration)(results.cand_cardinality)(results.cand_dispersion)
(results.cardinality)(results.difference)(results.red_difference)(results.ext_difference)
(results.inv_cardinality)(results.inv_difference)(results.inv_red_difference)(results.inv_ext_difference)
((double)timing / CLOCKS_PER_SEC)(li.main_ver)(li.sub_ver)(li.revision)(li.year)(li.month)(li.day)(li.platform).exec();
Мои глаза.... Яркий пример использования нативного pqxx
+3
const int size = 100000;
const int maxVal = 1e9;
for(int i = 0; i < n; i++)
values[i] = rand() % (maxVal + 1);
Код работает на вин32
+1
<?php $this->widget('bootstrap.widgets.TbButton', array(
'label' => 'Экспорт в Excel',
'type' => 'primary',
'url' => $this->createUrl('export'),
'htmlOptions' => array(
'target' => '_blank',
'onclick' => 'jQuery(this).attr(\'href\', jQuery(this).attr(\'href\').replace(/(\?.*)?$/, \'?\' + jQuery(this).closest(\'form\').serialize()))',
//'style' => 'float:right;',
),
)); ?>
Часто пытаюсь убедить людей, что Yii говно, но мои аргументы вечно парируют.
Как может здоровому человеку прийти в голову идея изобрести столь долбоёбский инструмент?
И ведь весь сраный Yii пропитан подобными высерами.