- 1
throw new Exception("Унылое говно");
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+18
throw new Exception("Унылое говно");
планируются ли вообще меры по очистке ресурса от унылого говна, дабы поддерживать подборку качественного фекалия? типа, если в минусе более трёх дней, то delete[].
−71.9
// get today's date string as YYYY-MM-DD HH:MM:SS
function getDateTime(){
$datetime = getdate();
$mday = $datetime['mday'];
if ($mday<10){
$mday="0$mday";
}
$mon = $datetime['mon'];
if ($mon<10){
$mon="0$mon";
}
$year = $datetime['year'];
$mhour = $datetime['hours'];
if ($mhour<10){
$mhour="0$mhour";
}
$mmin = $datetime['minutes'];
if ($mmin<10){
$mmin="0$mmin";
}
$msec = $datetime['seconds'];
if ($msec<10){
$msec="0$msec";
}
$dateTime = "$year-$mon-$mday $mhour:$mmin:$msec";
return $dateTime;
}
Китайский код самый беспощадный...
+30
clsLine L = Lines[4][i];
int Ind = Lines[4].IndexOf(L);
−417.7
SELECT FROM Staff
CASE Sex
WHEN 'M' THEN 'МужЫк!'
WHEN 'F' THEN 'Баба'
ELSE 'ЫЫЫыы?'
препод сказал что елсе не будет выполняться изза ограничений целостности базы
+33.5
<script>
function changeLogo(imgLoc){
document.getElementById("module_logo").src = "./site/" + imgLoc + "_logo.jpg";
}
function returnLogo(imgLoc){
document.getElementById("module_logo").src = "./site/" + imgLoc + "_logo.jpg";
}
</script>
0
#!/bin/bash
db_set () {
echo "$1,$2" >> database
}
db_get () {
grep "^$1," database | sed -e "s/^$1,//" | tail -n 1
}
0
public function getResource(): ResourceInterface
{
$locale = $this->localeRepository->getByKey($this->getCurrentLocaleKey());
return new Resource($locale->getKey());
}
0
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['OS_ARCH'] == 'WINNT':
DIRS += ['win']
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
DIRS += ['mac']
elif CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
DIRS += ['unix']
else:
DIRS += ['emacs']
2 часа пытался понять, почему ctrl+a работает как в терминале...
Это мёртвый код или пасхалка?
0
SparseMatrix<double> mat(rows,cols);
for (int k=0; k<mat.outerSize(); ++k)
for (SparseMatrix<double>::InnerIterator it(mat,k); it; ++it)
{
it.value();
it.row(); // row index
it.col(); // col index (here it is equal to k)
it.index(); // inner index, here it is equal to it.row()
}
Random access to the elements of a sparse object can be done through the coeffRef(i,j) function. However, this function involves a quite expensive binary search. In most cases, one only wants to iterate over the non-zeros elements. This is achieved by a standard loop over the outer dimension, and then by iterating over the non-zeros of the current inner vector via an InnerIterator. Thus, the non-zero entries have to be visited in the same order than the storage order.
0
The stylesheet http://govnokod.ru/media/07be0bfd97ac9918b4a7bacde60881b6.css?files=jquery-ui.css,jip.css,jip/jipCore.css,icons.css,bullets.css,flags.css,langs/javascript.css,langs/python.css,langs/.css,langs/c.css was not loaded because its MIME type, “text/html”, is not “text/css”.
Кто-то обосрался