- 1
Function.prototype.apply.call(window.alert, window, ['alert'])
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+158
Function.prototype.apply.call(window.alert, window, ['alert'])
А я чё? Я ничё...
+135
/*
* Lack of time prevents me from writing this segment properly.
* May Krishna have mercy on my soul.
*/
static const uint32_t pal = 720 * 576 * 2;
static const uint32_t ntsc_composite = 720 * 507 * 2;
static const uint32_t ntsc_sdi = 720 * 480 * 2;
uint16_t new_width = width, new_height = height;
if (height == 0) {
new_width = 1920;
new_height = 1080;
}
if (format == PAL) {
rv = pal;
memset(out_payload, 0x3F, rv);
}
else if (format == NTSC) {
if (source == SDI_VIDEO) {
rv = ntsc_sdi;
memset(out_payload, 0x3F, rv);
}
else {
rv = ntsc_composite;
memset(out_payload, 0x3F, rv);
}
}
else {
rv = new_width * new_height * 2;
memset(out_payload, 0x3F, rv);
}
Вот что переизбыток мочи делает.
+137
void main()
{
printf("HAPPY NEW YEAR!");
printf("Forever alone! Vodka!");
Sleep(INFINITE);
}
+154
<input type="submit" name="sub" value="регистрация" class="buttom2_activ" onmouseover="this.className='buttom2_activ'" onmouseout="this.className='buttom2'">
CSS :hover, лол
+97
using System;
using Microsoft.Win32;
namespace Reester
{
class Program
{
static void Main(string[] args)
{
RegCreatySubKey();
}
private static void RegCreatySubKey()
{
RegistryKey regKey = Registry.LocalMachine;
string[] shell = new[] { "SOFTWARE", "Microsoft", "Windows", "CurrentVersion", "Explorer", "CommandStore", "shell" };
string prog = "Programma";
1) using (regKey = Registry.LocalMachine.OpenSubKey(shell[0],true))// тут regKey равно{HKEY_LOCAL_MACHINE}
2) { //сдеть уже regKey равно {HKEY_LOCAL_MACHINE\SOFTWARE}
3) if (regKey != null)//и тут уже regkey равно Null.А дальше программа не идет.
{
using (regKey = Registry.LocalMachine.OpenSubKey(shell[1], true))
{
if (regKey != null)
{
using (regKey = Registry.LocalMachine.OpenSubKey(shell[2], true))
{
if (regKey != null)
{
using (regKey = Registry.LocalMachine.OpenSubKey(shell[3], true))
{
if (regKey != null)
{
using (regKey = Registry.LocalMachine.OpenSubKey(shell[4], true))
{
if (regKey != null)
{
using (regKey = Registry.LocalMachine.OpenSubKey(shell[5], true))
{
if (regKey != null)
{
using (regKey = Registry.LocalMachine.OpenSubKey(shell[6], true))
{
if (regKey != null)
{
regKey.CreateSubKey(prog);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
Работаем с реестром
+127
alias Foo(V : V[]) = V;
dlang, угадайте, что этот код делает.
+57
/* Fix NAN constant for VisualC++. */
#ifdef _MSC_VER
#ifndef NAN
static const unsigned long __nan[2] = {0xffffffff, 0x7fffffff};
#define NAN (*(const float *) __nan)
#endif
#endif
????
+162
if ($n > '25') {
$list = floor($n / 25) + 1;
$str .= '<div id="srt_page" align="center">';
for ($q = 1; (($q) <= $list); $q++) {
if ((((isset($_GET['page'])) && ($_GET['page'] == $q)) || ((!isset($_GET['page'])) && ($q == 1))))
$str .= ' <b>' . $q . '</b> ';
else {
if ((($q == ($pg - 1)) && (($pg - 1) != 1) && (($pg - 1) != $list)) || (($q == ($pg - 2)) && (($pg - 2) != 1) && (($pg - 2) != $list)) || (($q == ($pg - 3)) && (($pg - 3) != 1) && (($pg - 3) != $list)) || (($q == ($pg - 4)) && (($pg - 4) != 1) && (($pg - 4) != $list)) || (($q == ($pg + 1)) && (($pg + 1) != 1) && (($pg + 1) != $list)) || (($q == ($pg + 2)) && (($pg + 2) != 1) && (($pg + 2) != $list)) || (($q == ($pg + 3)) && (($pg + 3) != 1) && (($pg + 3) != $list)) || (($q == ($pg + 4)) && (($pg + 4) != 1) && (($pg + 4) != $list)) || ($q == $list) || ($q == 1)) {
if (($q == $list) && (($pg + 4) < ($list - 1)))
$str .= '...';
$str .= ' <a class="link_page" href="?page=' . $q . '"> ' . $q . ' </a> ' . "\n";
if (($q == 1) && (($pg - 4) > 2))
$str .= '...';
}
}
}
$str .= '</div>';
}
return $str;
Кто не понял, это такой pagination %))
+74
private void showProgress() {
if(mIndProgressVisible && mIndProgress != null && mIndProgress.isShowing()) return;
if(!mIndProgressVisible && (mIndProgress == null || !mIndProgress.isShowing())) return;
...
}
Не ходите, дети, в Африку гулять
+96
_catalogDb.Categories
.Where(w => w.Resources.Where(r => _catalogDb.Resources
.Where(a => _catalogDb.Persons.Where(b => b.EmployeeNumber == employeeNumber)
.Select(c => c.VIP).FirstOrDefault() || !a.VIP)
.Where(a => _catalogDb.Persons.Where(b => b.EmployeeNumber == employeeNumber)
.Select(c => c.InnerEmployee).FirstOrDefault() || !a.InnerEmployee)
.Where(a => !a.Paths.Any()
|| a.Paths.Where(wer => wer.Name == null).Any()
|| a.Paths.Where(pt => pt.Name != null && _catalogDb.Persons
.Where(b => b.EmployeeNumber == employeeNumber)
.Select(c => c.Path).FirstOrDefault().Contains(pt.Name)).Any())
.Where(a => !a.Filials.Any() || a.Filials.Where(wer => wer.Code == null).Any() || a.Filials
.Where(pt => pt.Code != null && pt.Code == _catalogDb.Persons
.Where(b => b.EmployeeNumber == employeeNumber)
.Select(c => c.Filial).FirstOrDefault()).Any())
.Select(a => a.UNID).Contains(r.UNID)).Any())
.Select(s => s.ID).Distinct().ToList();
Кто сказал что Entity framework облегчает жизнь...