#274 PHP +56
foreach ($k as $kk) {
    foreach ($kk as $kkk) {
    }
}
By Anonymous, 2018-04-05 14:50:22
<Window WindowStyle="None" MouseLeftButtonDown="WindowMouseLeftButtonDown"/>
    <x:Code>
        <![CDATA[            
            private void WindowMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
            {
                DragMove();
            }
        ]]>
    </x:Code>
</Window>

http://stackoverflow.com/a/19136910 The code highlighter should be for XAML/XML, but there's no such highlighting option, so I used HTML.

By OverCR, 2015-08-22 16:55:07
try {
	$order->addItem($item);
} catch (Exception $ex) {
	throw $ex;
}
By baueri, 2019-04-10 16:49:46
    if (SelectionAndTimeData[1] < 2000 or \
        SelectionAndTimeData[2] < 1 or SelectionAndTimeData[2] > 12 or \
        SelectionAndTimeData[3] < 1 or SelectionAndTimeData[3] > 31 or \
        SelectionAndTimeData[4] < 0 or SelectionAndTimeData[4] > 24 or \
        SelectionAndTimeData[5] < 0 or SelectionAndTimeData[5] > 60 or \
        SelectionAndTimeData[2] < 0 or SelectionAndTimeData[2] >60):   
        
        print('***************************************************************************')
        print(' Entered date is not valid')
        print('****************************************************************************')
By loopyroberts, 2017-12-12 22:55:56
@Override
public void afterTextChanged(Editable s) {
    switch (paymentType) {
        case 0:
            if (s.length() == 9) etPaymentAmount.requestFocus();
            break;
        case 1:
            if (s.length() == 9) etPaymentAmount.requestFocus();
            break;
    }
}
By Anonymous, 2017-12-22 12:41:02
public void Method1(Enum foo)
{
    if (GetCondition1(foo))
    {
        doSomething();
    }
}

private bool GetCondition1(Enum foo)
{
    if (foo == Enum.Value1)
        return true;

    return false;
}
By Anonymous, 2018-02-23 17:34:55
protected void EnableEditButtons(bool Value)
{
    if (Value == false)
    {
        buttonAdd.Disabled = true;
        buttonDelete.Disabled = true;
    }
    else
    {
        buttonAdd.Disabled = false;
        buttonDelete.Disabled = false;
    }
}

// ...

if (IsEditable(ID))
    EnableEditButtons(true);
else
    EnableEditButtons(false);

I found this old code in an app I was updating for a client a number of years back. It was so good I documented it on my own blog.

By Jon Hartmann, 2017-12-12 17:09:54
for(var j=0;j<10;j++){
    cell=document.createElement('td');
    switch(j)
    {
        case 0: 
            var date1 = events[i]['start'];
            var date2 = events[i]['end'];
            cell.appendChild(document.createTextNode(date1.getFullYear()+'/'+date1.getMonth()+'/'+date1.getDate()+' '+date1.getHours()+':'+date1.getMinutes()+' To '+date2.getFullYear()+'/'+date2.getMonth()+'/'+date2.getDate()+' '+date2.getHours()+':'+date2.getMinutes())); 
            break;
        case 1: cell.appendChild(document.createTextNode(events[i]['title'])); break;
        case 2: cell.appendChild(document.createTextNode(events[i]['description'])); break;
    }
    row.appendChild(cell);
}

The for loop that counts to 10, but the last seven elements are completely useless.

By Anonymous, 2017-12-13 07:16:36
<?
function null($null) {
    return null;   
}
By SH2, 2018-02-20 11:31:33
public enum YesNoEnum
{
	Yes = 0,
	No = 1
}

I also like how they defined the enum values.

By Anonymous, 2018-05-19 19:33:44
<input type="button" value="Go and fill  later" onclick="javascript:window.location='<?php echo $url; ?>info.php'" />

Well, a is obsolete, let's do links as buttons!

By Anonymous, 2017-02-14 20:36:30

if let _ = detailInformation {
     loadDetailInformation()
}

when optionals are killing yourself

By gc, 2017-12-13 00:19:02
if( %rightBtnCmd $= "noButtons" )
{
    //do nothing, as there are no buttons   
}

proprietary script language.

By Anonymous, 2017-12-14 19:52:22
public boolean logout(String token)
{
    LogedUser user = logedUsers.remove(token);
    return (user != null) ? true : false;
}
By Slacki, 2015-11-17 17:58:53
        var validAccountData = account.email != nil
        validAccountData = account.firstName != nil
        validAccountData = account.lastName != nil
        
        if validAccountData {
            return account
        }
        
        return nil

Proper validation

By Anonymous, 2017-12-12 15:17:35