- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
Subroutine HBomb(x,ia,ib)
Dimension x(*)
c Generate some exeption...
x(ia*ib)=1.0
x(ia*(-ib))=1.0
x(1)=7.0/(ia+ib)
Return
End
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+130
Subroutine HBomb(x,ia,ib)
Dimension x(*)
c Generate some exeption...
x(ia*ib)=1.0
x(ia*(-ib))=1.0
x(1)=7.0/(ia+ib)
Return
End
Серьёзный квантовохимический пакет, между прочим.
Выше по течению этот кусок кода вызывали через call hbomb(x, 1000, -1000)
+160
var hgh = $(document).height() - 320 - 180 - 440;
$(".message-form").height( hgh );
шта?
+157
<?if ($_SERVER['REQUEST_URI'] == "/zakazat-semena"):?>
<?
$cont = str_replace("asd", "asdqwe", $content);
echo $cont;
?>
<?elseif($_SERVER['REQUEST_URI'] == "/map"): ?>
<?
$cont = str_replace('qwe', 'qweiop', $content);
echo $cont;
?>
<?else:?>
{content}
<?endif;?>
+72
public class Командир {
private String имя;
private ПоходНаГерманию поход;
public Командир(String имя) {
this.имя = имя;
поход = new ПоходНаГерманию();
}
public Богатство пойтиВпоход()
throws НеПолучилосьException {
return поход.сходить();
}
}
больше русской жабы тут http://www.spring-source.ru/docs_simple.php?type=manual&theme=docs_s imple&docs_simple=chap01_p03
+51
class CHECKSTRUCTURE_API GroupOfDocs : public std::unordered_multimap<std::string, std::shared_ptr<Doc> > // структура, которую клиент заполняет и передает в качестве входных и выходных данных для process. Ключом является имя файла
{
public:
#ifdef _DEBUG
virtual ~GroupOfDocs() {};
#endif
+97
using System;
using Microsoft.Win32;
namespace Reester
{
class Program
{
static void Main(string[] args)
{
RegCreatySubKey();
}
private static void RegCreatySubKey()
{
RegistryKey regKey = Registry.LocalMachine;
string[] shell = new[] { "SOFTWARE", "Microsoft", "Windows", "CurrentVersion", "Explorer", "CommandStore", "shell" };
string prog = "Programma";
1) using (regKey = Registry.LocalMachine.OpenSubKey(shell[0],true))// тут regKey равно{HKEY_LOCAL_MACHINE}
2) { //сдеть уже regKey равно {HKEY_LOCAL_MACHINE\SOFTWARE}
3) if (regKey != null)//и тут уже regkey равно Null.А дальше программа не идет.
{
using (regKey = Registry.LocalMachine.OpenSubKey(shell[1], true))
{
if (regKey != null)
{
using (regKey = Registry.LocalMachine.OpenSubKey(shell[2], true))
{
if (regKey != null)
{
using (regKey = Registry.LocalMachine.OpenSubKey(shell[3], true))
{
if (regKey != null)
{
using (regKey = Registry.LocalMachine.OpenSubKey(shell[4], true))
{
if (regKey != null)
{
using (regKey = Registry.LocalMachine.OpenSubKey(shell[5], true))
{
if (regKey != null)
{
using (regKey = Registry.LocalMachine.OpenSubKey(shell[6], true))
{
if (regKey != null)
{
regKey.CreateSubKey(prog);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
Работаем с реестром
+156
router.get('/', function(req, res){
apis.getApis(function (data, error) {
res.render('./documentation/index',
{
error: error,
apis: data
});
});
}
);
Сказали напилить на ноде сайтик, который генерит документацию из ответа сервера с API. Сижу и бомблю с количества лишних действий в контроллере из-за обязательных ФУНКЦИЙ ОБРАТНОГО ВЫЗОВА.
+164
$id = int(int(int(int(int(int(int(int(int(int(int(int(int(int(int($_POST["id"])))))))))))))));
Зачем??
+53
//
// 'compare_keywords()' - Compare two keywords...
//
extern "C" {
int
compare_keywords(const void *a,
const void *b) {
return (strcmp(*((const char **)a), *((const char **)b)));
}
}
+134
string pars_param(string data)
{
HtmlAgilityPack.HtmlDocument html = new HtmlAgilityPack.HtmlDocument();
html.LoadHtml(data);
HtmlNodeCollection qw = html.DocumentNode.SelectNodes(@"//input[@name=""k""]");
if (qw != null)
{
foreach (HtmlNode n in qw)
{
if (n.Attributes["value"] != null)
{
return n.Attributes["value"].Value;
}
}
}
}
Error 1 'trcli.Form1.pars_param(string)': not all code paths return a value D:\zMyDoc\igl\Documents\Visual Studio 2013\Projects\trcli\trcli\Form1.cs 651 16 trcli
не магу разобраться в своем говнокоде, не хочет возвращать n.Attributes["value"].Value