public static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> String get(A h, B u, C e, F l, G o, D v, E p, H a, I b, L c, K d, N f, J g, P i, M j, N m) {
        StringBuilder yes = new StringBuilder();
        yes.append((String) String.valueOf(h.toString()));
        yes.append((String) String.valueOf(u.toString()));
        yes.append((String) String.valueOf(e.toString()));
        yes.append((String) String.valueOf(l.toString()));
        yes.append((String) String.valueOf(o.toString()));
        yes.append((String) String.valueOf(v.toString()));
        yes.append((String) String.valueOf(p.toString()));
        yes.append((String) String.valueOf(a.toString()));
        yes.append((String) String.valueOf(b.toString()));
        yes.append((String) String.valueOf(c.toString()));
        yes.append((String) String.valueOf(d.toString()));
        yes.append((String) String.valueOf(f.toString()));
        yes.append((String) String.valueOf(h.toString()));
        yes.append((String) String.valueOf(g.toString()));
        yes.append((String) String.valueOf(i.toString()));
        yes.append((String) String.valueOf(j.toString()));
        return (String) String.valueOf(yes.toString());
	}

why

By fxcil, 2022-03-24 21:53:11
    function changePassword() {
        if (isInputEmpty()) {
            $.ajax({
                type: 'POST',
                data: '...'
                url: '...',
                success: function (result) {
                    if (result.substring(0, 3) != "!!!") {
                        //success
                    } else {
                        //faliure
                    }
                },
                error: function () {
                    }
            });
        }
    }

And of course,in production, it always reported success and never changed the password, because of equally bad server code.

By You will be proud of our code!, 2017-12-15 11:30:02
private static function derivePrice(...)
  {
	$price = self::derivePriceUnchecked($vars);
    
    if (isset($price)) {
		// CODE HERE
    } 

    if (isset($price)) {
		// CODE HERE
    } 
    
    if (isset($price)) {
		// CODE HERE
    }

    if (isset($price)) {
		// CODE HERE
    }

    if (isset($price)) {
		// CODE HERE
    }

    if (isset($price)) {
		// CODE HERE
    }

    if (isset($price)) {
		// CODE HERE
    }

    if (isset($price)) {
		// CODE HERE
    }

    return $price;
  }
By Anonymous, 2018-02-06 11:38:18
   // Test read access of memory
   try
   {
      c = ( (char*) pvMemory )[0];
      c = ( (char*) pvMemory )[iNLen - 1];
   }

   catch( ... ) {
      return -1;
   }
By Anonymous, 2022-10-19 16:28:05
 void SummonCrowd()
        {
            if(!bSummoned1)
            {
                if (Creature* Witness1 = me->SummonCreature(NPC_LISTENER,-11009.036f, 1490.47f, 43.58f, 4.16f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                    if (Creature* Witness2 = me->SummonCreature(NPC_LISTENER,-11010.76f, 1488.21f, 43.57f, 4.33f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                        if (Creature* Witness3 = me->SummonCreature(NPC_LISTENER,-11017.39f, 1491.76f, 43.19f, 4.78f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                            if (Creature* Witness4 = me->SummonCreature(NPC_LISTENER,-11021.73f, 1493.054f, 43.184f, 5.09f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                if (Creature* Witness5 = me->SummonCreature(NPC_LISTENER,-11025.74f, 1487.70f, 43.17f, 5.45f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                    if (Creature* Witness6 = me->SummonCreature(NPC_LISTENER,-11025.25f, 1482.23f, 43.03f, 6.04f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                        if (Creature* Witness7 = me->SummonCreature(NPC_LISTENER,-11029.68f, 1481.255f, 43.185f, 6.20f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                            if (Creature* Witness8 = me->SummonCreature(NPC_LISTENER,-11024.46f, 1473.88f, 43.02f, 0.43f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                if (Creature* Witness9 = me->SummonCreature(NPC_LISTENER,-11019.49f, 1471.70f, 43.21f, 1.09f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                    if (Creature* Witness10 = me->SummonCreature(NPC_LISTENER,-11021.56f, 1497.053f, 43.20f, 5.00f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                        if (Creature* Witness11 = me->SummonCreature(NPC_LISTENER,-11012.29f, 1488.14f, 43.77f, 4.16f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                            if (Creature* Witness12 = me->SummonCreature(NPC_LISTENER,-11014.67f, 1493.14f, 43.23f, 4.60f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                if (Creature* Witness13 = me->SummonCreature(NPC_LISTENER,-11019.8f, 1494.25f, 43.2f, 4.77f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                    if (Creature* Witness14 = me->SummonCreature(NPC_LISTENER,-11023.6f, 1489.35f, 43.17f, 4.77f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                        if (Creature* Witness15 = me->SummonCreature(NPC_LISTENER,-11023.1f, 1482.51f, 43.07f, 6.25f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                            if (Creature* Witness16 = me->SummonCreature(NPC_LISTENER,-11027.2f, 1494.37f, 43.17f, 5.15f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                                if (Creature* Witness17 = me->SummonCreature(NPC_LISTENER,-11029.6f, 1488.29f, 43.19f, 5.64f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                                    if (Creature* Witness18 = me->SummonCreature(NPC_LISTENER,-11030.8f, 1485.13f, 43.31f, 5.94f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                                        if (Creature* Witness19 = me->SummonCreature(NPC_LISTENER,-11026.2f, 1478.62f, 42.94f, 6.17f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                                            if (Creature* Witness20 = me->SummonCreature(NPC_LISTENER,-11013.2f, 1497.81f, 43.31f, 4.44f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                                                if (Creature* Witness21 = me->SummonCreature(NPC_LISTENER,-11011.6f, 1492.61f, 43.39f, 4.44f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                                                    if (Creature* Witness22 = me->SummonCreature(NPC_LISTENER,-11015.4f, 1489.06f, 43.28f, 4.73f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                                                        if (Creature* Witness23 = me->SummonCreature(NPC_LISTENER,-11020.2f, 1490.15f, 43.19f, 5.07f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                                                            if (Creature* Witness24 = me->SummonCreature(NPC_LISTENER,-11009.9f, 1483.52f, 44.06f, 3.88f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                                                                if (Creature* Witness25 = me->SummonCreature(NPC_LISTENER,-11020.1f, 1484.87f, 43.18f, 5.33f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                                                                    if (Creature* Witness26 = me->SummonCreature(NPC_LISTENER,-11017.7f, 1487.42f, 43.24f, 4.89f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                                                                        if (Creature* Witness27 = me->SummonCreature(NPC_LISTENER,-11017.9f, 1498.24f, 43.20f, 5.04f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000))
                                                                                                                        {
                                                                                                                            Witness1GUID = Witness1->GetGUID();
                                                                                                                            Witness2GUID = Witness2->GetGUID();
                                                                                                                            Witness3GUID = Witness3->GetGUID();
                                                                                                                            Witness4GUID = Witness4->GetGUID();
                                                                                                                            Witness5GUID = Witness5->GetGUID();
                                                                                                                            Witness6GUID = Witness6->GetGUID();
                                                                                                                            Witness7GUID = Witness7->GetGUID();
                                                                                                                            Witness8GUID = Witness8->GetGUID();
                                                                                                                            Witness9GUID = Witness9->GetGUID();
                                                                                                                            Witness10GUID = Witness10->GetGUID();
                                                                                                                            Witness11GUID = Witness11->GetGUID();
                                                                                                                            Witness12GUID = Witness12->GetGUID();
                                                                                                                            Witness13GUID = Witness13->GetGUID();
                                                                                                                            Witness14GUID = Witness14->GetGUID();
                                                                                                                            Witness15GUID = Witness15->GetGUID();
                                                                                                                            Witness16GUID = Witness16->GetGUID();
                                                                                                                            Witness17GUID = Witness17->GetGUID();
                                                                                                                            Witness18GUID = Witness18->GetGUID();
                                                                                                                            Witness19GUID = Witness19->GetGUID();
                                                                                                                            Witness20GUID = Witness20->GetGUID();
                                                                                                                            Witness21GUID = Witness21->GetGUID();
                                                                                                                            Witness22GUID = Witness22->GetGUID();
                                                                                                                            Witness23GUID = Witness23->GetGUID();
                                                                                                                            Witness24GUID = Witness24->GetGUID();
                                                                                                                            Witness25GUID = Witness25->GetGUID();
                                                                                                                            Witness26GUID = Witness26->GetGUID();
                                                                                                                            Witness27GUID = Witness27->GetGUID();

                                                                                                                            bSummoned1 = true;
                                                                                                                        }
            }
        }
By Anonymous, 2020-09-16 17:09:35
if ( variable )
{
    
}
else
{
    Console.WriteLine("Wrong")
}

He doesn't know what "Not" is it :|

By Manoochehr Mojgani, 2017-12-13 17:05:36
A,B=map(str,input().split())        # let's begin by casting strings to strings!

while(int(A)!=0 and int(B)!=0):

    tamanhoa=0
    tamanhob=0

    for i in range(len(A)):
        tamanhoa+=1                 # wonderful way to determine the length of
                                    # a string!
    for i in range(len(B)):
        tamanhob+=1

    vA = [0]*tamanhoa
    vB = [0]*tamanhob

    if tamanhoa>tamanhob:
        vA = [0]*tamanhoa           # Just to make sure it really gets set!!!
        vB = [0]*tamanhoa

        for i in range(tamanhoa-1,-1,-1):
            vA[i]=int(A[i])         # he even saved an operation by casting
                                    # the char to int at the same time!
        for i in range(tamanhob):
            vB[i+1]=int(B[i])
    elif tamanhoa<tamanhob:
        vA = [0]*tamanhob           # Just to make sure it really gets set!!!
        vB = [0]*tamanhob

        for i in range(tamanhoa):
            vA[i+1]=int(A[i])

        for i in range(tamanhob-1,-1,-1):
            vB[i]=int(B[i])

        tamanhoa=tamanhob

    else:
        for i in range(tamanhoa):
            vA[i]=int(A[i])

        for i in range(tamanhob):
            vB[i]=int(B[i])

    print(vA)
    print(vB)
    
    carry = 0

    for i in range(tamanhoa-1,-1,-1):
        soma = vA[i] + vB[i]
        if soma > 9:
            carry += 1
            if vA[i-1]!= 9:
                vA[i-1] += 1
            else:
                vB[i-1] +=1


    if carry == 0:
        print('No carry operation.')
    elif carry == 1:
        print(carry, 'carry operation.')
    else:
        print(carry, 'carry operations.')

    A,B=map(str,input().split())    # why bother casting strings to int? yay

    if int(A)==0 and int(B)==0:
        break

This wonder was found within answers to a university programming test. Code as-is, comments added by me.

By Anonymous, 2017-12-14 00:09:27
// comment out the following two lines when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');

Never, ever define developer environment and debug as default thing! #pdk

By kadet, 2021-03-08 23:28:18
class PythonClass {
    protected boolean True = true;
    protected boolean False = false;
    protected Object None = null;
}

class MyClass extends PythonClass {
    String do_something(Object foo) {
        if (foo == False)
            return ""                                  ;
        
        
        else if (foo == None)
            return "!"                                 ;
            
        else if (foo == True)
            return "Yay!"                              ;
    }
}

Yikes

By imaginedev, 2021-04-03 02:44:52
Update.update_all_updated(updates) # Update updated updates
By anon, 2018-05-25 16:45:41
<?php
$arr = [
    ["price" => 1],
    ["price" => 2]
];

$update = $arr;
$update[0]["price"] = 4;

$arr = $update;
By mamadSiah, 2021-05-11 11:06:19
product = None
for key in dictionary.keys():
	if product is None:
		product = dictionary[key]
	else:
		product = itertools.product(product, dictionary[key])

product = "{0}".format(list(product))
product = re.sub(r"\), \(+", "], [", product)
product = re.sub(r"\(+", "[", product)
product = product.replace(")]", "]]").replace(")", "")
product = ast.literal_eval(product)

Ok, I have a weird array of objects as output of itertools and I need an array of strings... 1 - Convert the array to string 2 - Clean it up with regex and replace 3 - Convert the string to array 4 - Problem solved

By AnonimaPitoni, 2018-09-06 00:27:34
public List<Location> searchLocations(final String phrase) {
        final String like = phrase.replaceAll("(\\s)", "%$1") + "%";
        final List<Location> result = getLocations(
                "replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(\n" +
                        "replace(lower(name),'.',' '),\n" +
                        "'á','a'),\n" +
                        "'é','e'),\n" +
                        "'í','i'),\n" +
                        "'ĺ','l'),\n" +
                        "'ó','o'),\n" +
                        "'ŕ','r'),\n" +
                        "'ú','u'),\n" +
                        "'ý','y'),\n" +
                        "'č','c'),\n" +
                        "'ď','s'),\n" +
                        "'ľ','l'),\n" +
                        "'ň','n'),\n" +
                        "'š','s'),\n" +
                        "'ť','t'),\n" +
                        "'ž','z'),\n" +
                        "'ä','a'),\n" +
                        "'ô','o') LIKE lower(?)\n" +
                        "ORDER BY CASE country_code WHEN 'SK' THEN 0 ELSE 1 END, length(name), name", like);
        return result;
    }

Author: I am satisfied with the project and I don't think I have anything to be ashamed of

By Anonymous, 2020-07-16 10:49:27
try:
    raise
except RuntimeError:
    raise

try this in python3

By FranchuFranchu, 2019-03-14 23:10:03
		if (wiringPiMode == WPI_MODE_PINS)
			pin = pinToGpio[pin];
		else if (wiringPiMode == WPI_MODE_PHYS)
			pin = physToGpio[pin];
		else if (wiringPiMode != WPI_MODE_GPIO)
			return;

the 3rd condition check throws you right off the train of logic.

By Gordon Henderson, 2019-07-23 06:05:05