Mistři v programování na #hovnokod

Bezpecnosti neni nikdy dost

if (isset($this->input['variant']) && $this->input['variant'] == "1") {
    if (!in_array($this->input['variant'], [0, 1])) {
        throw new SecurityBrokenException;
    }
}

Anonymous,

Open source vývoj jedné nejmenované hry. Soubor lib_machines.dm už sice není mezi námi, ale tento krásný komentář zůstal zachován v nové, zrefactorované verzi.

/*
In reply to this set of comments on lib_machines.dm:
// TODO: Make this an actual /obj/machinery/computer that can be crafted from circuit boards and such
// It is August 22nd, 2012... This TODO has already been here for months.. I wonder how long it'll last before someone does something about it.
The answer was five and a half years -ZeroBits
*/

Anonymous,

Úlohou študenta bolo načítať 3 veľkosti strán trojuholníka, overiť či sa z takýchto strán dá zostrojiť trojuholník a ak áno, vypočítať jeho obvod.

#include <stdio.h>
#include <stdlib.h>

int main()
{   int a,b,c,d;
    printf("zadaj cislo a:\n");
    scanf ("%d",&a);
    printf("zadaj cislo b:\n");
    scanf ("%d",&b);
    printf("zadaj cislo c:\n");
    scanf ("%d",&c);

      if (c=a+b)
    {
           d=a+b+c;
           printf("obvod trojholnika je:%d.",d);
    }
      else
           printf("z tyhto cisel nemoze byt trojuholnik\n");
    return 0;
}

Anonymous,

Nazvoslovie: favs ~ favorites, songJson ~ songId, replace ~ removeIfExists, isAvailable ~ wasRemoved

private boolean addFavs(String songJson, boolean replace) {
Set<String> favs = getFavs();
boolean isAvailable = false;
if(!favs.contains(songJson)) {
    favs.add(songJson);
} else {
    if(replace) {
         favs.remove(songJson);
         isAvailable = true;
    }
}
// ...
}

Anonymous,


Anonymous,