- 1
- 2
- 3
- 4
- 5
GNET::ChatBroadCast::~ChatBroadCast(&cbc);
}
else if ( v9 > 9 && v9 == 14 )
{
v4 = this->roleid;
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+140
GNET::ChatBroadCast::~ChatBroadCast(&cbc);
}
else if ( v9 > 9 && v9 == 14 )
{
v4 = this->roleid;
Декомпилил тут игруху, а там такое в псевдокоде.
+131
using UnityEngine;
using System.Collections;
public class move : MonoBehaviour {
public GameObject walk;
public GameObject Stay;
public Transform wgon;
// Use this for initialization
void Awake ()
{
walk.SetActive(false);
Stay.SetActive(false);
}
// Update is called once per frame
void Update ()
{
if(Input.GetKey(KeyCode.W))
{
walk.SetActive(true);
Stay.SetActive(false);
wgon.transform.Translate(0.0f, 0.0f, 0.3f);
}
if(Input.GetKeyUp(KeyCode.W))
{
walk.SetActive(false);
Stay.SetActive(true);
}
if(Input.GetKey(KeyCode.D))
{
wgon.transform.Rotate(0.0f, 0.5f, 0.0f);
}
if(Input.GetKey(KeyCode.A))
{
wgon.transform.Rotate(0.0f, -0.5f, 0.0f);
}
}
}
−503
if (( $(true; echo $?) != 0 )); then
echo >&2 "Oops, we're running on a non-existing platform."
exit 1 # Хм, а вдруг здесь 1 == EXIT_SUCCESS?...
fi
(c) anonymous
https://www.linux.org.ru/forum/development/11317153?cid=11318931
+125
Console.WriteLine("Say my name");
Console.ReadLine();
Console.WriteLine("Yes, damn right!");
+143
char value[60] = {0};
int data;
snprintf(value, sizeof(value-1), "|%7u\n", data);
coverity полагал что заменить sprintf на snprintf было бы безопаснее
+145
char bStr[1000];
strncpy(bStr, " [\0", strlen(" [\0"));
Потому что в man:
Warning: If there is no null byte among the first n bytes of src, the string placed in dest will not be null terminated.
+159
define([ "t5/core/dom" ], function(dom) {
return function() {
dom.scanner("select,input[type=text]", function(el) {
el.on("focus", function(e) {
var focusholder = this.findParent("form").find("input.focusholder");
if (focusholder.length)
focusholder[0].element.value = el.element.id;
el.element.select();
});
});
dom.scanner("select,input[type=text]", function(el) {
el.on("change", function(e) {
var form = this.findParent("form");
var submit = form.find("input[type=submit]");
if (submit.length)
submit[0].element.disabled = "disabled";
setTimeout(function() {form.trigger("submit");}, 1);
});
});
dom.scanner("input[type=checkbox],input[type=radio]", function(el) {
el.on("click", function(e) {
return this.findParent("form").trigger("submit");
});
});
dom.scanner("form", function(el) {
el.on("submit", function(e) {
var form=this;
setTimeout(function() {
var children = form.find("select,input[type=text],input[type=checkbox],input[type=radio]");
if (children.length)
for(var i=0;i<children.length;i++)
children[i].element.readOnly = "readOnly";
var submit = form.find("input[type=submit]");
if (submit.length)
submit[0].element.disabled = "disabled";
}, 1);
});
});
return dom;
};
});
код превращается, код превращается... в говно!
+142
#define PHYSICAL unsigned long
#define VIRTUAL unsigned long
прикольное legacy
+103
if (openFileDialog1.ShowDialog().ToString() == "OK")
не хватает еще
if(1.ToString() == "1")
+159
null != localStorage.getItem("lock") && "2" == localStorage.getItem("lock") &&
($(".up_link").css("bottom", 0), $(".popular").removeClass("open")),
e.find(".door").on("click", function() {
return "2" == localStorage.getItem("lock") ?
($(".up_link").css("bottom", 80), e.addClass("open"),
localStorage.setItem("lock", "1")) :
($(".up_link").css("bottom", 0), e.removeClass("open"),
localStorage.setItem("lock", "2")), !1
});
Пример кода с echo.msk.ru