- 1
Когда уже HACTEHbKA напишет программу, которая выводит "bormand one love", который можно скомпилировать компиляторами двух разных ЯП
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 70
−17
Когда уже HACTEHbKA напишет программу, которая выводит "bormand one love", который можно скомпилировать компиляторами двух разных ЯП
−16
char *cat2(char *str1, char *str2)
{
int len;
char *ret;
/* malloc new string */
len = strlen(str1) + strlen(str2) + 1;
ret = (char *) malloc(len*sizeof(char));
/* copy the strings */
strcpy(ret, str1);
strcat(ret, str2);
/* free old strings */
free(str1);
free(str2);
return ret;
}
char *cat3(char *str1, char *str2, char *str3)
{
return cat2(cat2(str1, str2), str3);
}
char *cat4(char *str1, char *str2, char *str3, char *str4)
{
return cat2(cat2(str1, str2), cat2(str3, str4));
}
char *cat5(char *str1, char *str2, char *str3, char *str4,
char *str5)
{
return cat3(cat2(str1, str2), cat2(str3, str4), str5);
}
char *cat6(char *str1, char *str2, char *str3, char *str4,
char *str5, char *str6)
{
return cat3(cat2(str1, str2), cat2(str3, str4), cat2(str5, str6));
}
char *cat7(char *str1, char *str2, char *str3, char *str4,
char *str5, char *str6, char *str7)
{
return cat4(cat2(str1, str2), cat2(str3, str4), cat2(str5, str6), str7);
}
char *cat8(char *str1, char *str2, char *str3, char *str4,
char *str5, char *str6, char *str7, char *str8)
{
return cat4(cat2(str1, str2), cat2(str3, str4),
cat2(str5, str6), cat2(str7, str8));
}
char *cat9(char *str1, char *str2, char *str3, char *str4,
char *str5, char *str6, char *str7, char *str8,
char *str9)
{
return cat5(cat2(str1, str2), cat2(str3, str4), cat2(str5, str6),
cat2(str7, str8), str9);
}
−15
github.com/mpak2/mpak.su/tree/master/include/mail
В mpak завезли composer.json
−19
ideone.com/4DdZvo
Спойлер: Оно компилится, но выводит компилятор какую то поебень
−31
188.226.130.77/ngk/api/comments
Блять, какой долбаёб вообще додумался хуячить ответ в жопасоне?
Он что, не слышал про XML? Я из своего няшного сишарпика без
Говнистой Newtoonsoft.Json распарсить не могу. Аффтар, Linq to Xml
Жажаждет крови!
−16
$go = htmlspecialchars(strip_tags(stripslashes(trim(urldecode(mysqli_escape_string($_GET['go']))))));
−33
public static String AddBounds( String middle, Char start,Char end ) {
if( start=='\0' && end=='\0' ) return middle;
if( start=='\0' ) return middle+end;
if( end=='\0' ) return start+middle;
return start+middle+end;
}
−9
public static unsafe void Random1()
{
int var = 0;
int* ptr = &var;
while (Console.ReadLine() != "Stop") Console.WriteLine(*ptr--);
}
public static unsafe void Random2()
{
int var = 0;
int* ptr = &var;
long x = 0;
while (Console.ReadLine() != "Stop")
{
for (int i = 0; i < 10; i++) x += *ptr++;
Console.WriteLine($"Random = {x} Random(0..1000) = {Math.Abs(x) % 5}");
}
}
−12
using System;
namespace Aquapear.StringTools
{
/// <summary> Объединяет строки, вставляя между ними разделитель, но в конце разделитель не ставится. </summary>
public static class StringsJoiner
{
public static String Join(String[] bits, String separator) {
/*if(separator.Length==0) {
int bitsLength = bits.Length;
StringBuilder builder = new StringBuilder(bits.Length);
for(int i = 0; i < bitsLength; i++) {
builder.AddLast( bits[i] );
}
return builder.Build();
}*/
return String.Join(separator, bits);
/*
int bitsLength = bits.Length;
if(bitsLength == 0) return "";
if(separator.Length==0) return CloseJoin(bits);
int allCharsLength = separator.Length*(bits.Length-1);
for(int i = 0; i < bitsLength; i++) {
allCharsLength += bits[i].Length;
}
char[] chrs = new char[allCharsLength];
int wordIndex = 0, wordProgress = 0;
bool separatorMode = false;
string word = bits[0];
int wordLength = word.Length;
for(int i = 0; i < allCharsLength; i++) {
if(separatorMode) {
chrs[i] = word[wordProgress];
wordProgress++;
if(wordProgress>=wordLength) {
separatorMode = false;
wordProgress = 0;
word = bits[wordIndex];
wordLength = word.Length;
}
} else {
chrs[i] = (wordLength >= 1) ? word[wordProgress] : '\0';
wordProgress++;
if(wordProgress >= wordLength) {
separatorMode = true;
wordProgress = 0;
wordIndex++;
if(word.Length == 0) i--;
word = separator;
wordLength = word.Length;
}
}
}
return new String(chrs); */
}
static String CloseJoin(String[] bits) {
return String.Join("", bits);
}
}
}
−234
Public Class Form1
Dim x01, x02, f01, f02, f01i, f02i, x11, x12, f12, f11, f11i, f12i, x21, x22, z1, z2, f21, f22, f21i, f22i, x31, x32 As Double
Dim f31, f32, f31i, f32i, x41, x42, f41, f42, f41i, f42i, x51, x52, f51, f52, f51i, f52i, x61, x62, f61, f62, f61i, f62i, x71, x72 As Double
Dim f71, f72, f71i, f72i, x81, x82, f81, f82, f81i, f82i, x91, x92, f91, f92, f91i, f92i, x101, x102, f101, f102, f101i, f102i, x111, x112, f111, f112, f111i, f112i, x121, x122 As Double
Dim f121, f122, f121i, f122i, x131, x132, f131, f132, f131i, f132i, x141, x142, f141, f142, f141i, f142i, x151, x152, f151, f152, f151i, f152i, x161, x162, f161, f162, f161i, f162i, x171, x172 As Double
Dim f171, f172, f171i, f172i, x181, x182, f181, f182, f181i, f182i, x191, x192, f191, f192, f191i, f192i, x201, x202, f201, f202, f201i, f202i, x211, x222, f211, f212, f211i, f212i, x221, x212, f221, f222, f221i, f222i, x231, x232 As Double
Dim f231, f232, f231i, f232i, x241, x242, f241, f242, f241i, f242i, x251, x252, f251, f252, f251i, f252i, x261, x262, f261, f262, f261i, f262i, x271, x272, f271, f272, f271i, f272i, x281, x282, f281, f282, f281i, f282i, x291, x292 As Double
Dim f291, f292, f291i, f292i, x301, x302, f301, f302, f301i, f302i, x311, x312, f311, f312, f311i, f312i, x321, x322 As Double
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
x01 = TextBox1.Text
x02 = TextBox2.Text
f01 = x01 - 0.5 * Math.Sin(0.3 * Math.Cos(x01) / 3) - 1
f02 = -x02 + 0.3 * Math.Cos((0.5 * Math.Sin(x02 / 3) + 1))
f01i = 1 + 0.5 * (Math.Cos(0.3 * Math.Cos(x01)) / 3) * Math.Sin(x01)
f02i = 1 + (0.3 * Math.Sin(0.5 * Math.Sin(x02)) / 3) * (Math.Cos(x02) / 3) * 0.5 / 3
x11 = x01 + f01 / f01i
x12 = x02 + f02 / f02i
Label7.Text = "x11= " & x11
Label8.Text = "x12= " & x12
f11 = x11 - 0.5 * Math.Sin(0.3 * Math.Cos(x11) / 3) - 1
f12 = -x12 + 0.3 * Math.Cos((0.5 * Math.Sin(x12 / 3) + 1))
f11i = 1 + 0.5 * (Math.Cos(0.3 * Math.Cos(x11)) / 3) * Math.Sin(x11)
f12i = 1 - (0.3 * Math.Sin(0.5 * Math.Sin(x12)) / 3) * (Math.Cos(x12) / 3) * 0.5 / 3
x21 = x11 + f11 / f11i
x22 = x12 + f12 / f12i
Label9.Text = "x21= " & x21
Label10.Text = "x22= " & x22
f21 = x21 - 0.5 * Math.Sin(0.3 * Math.Cos(x21) / 3) - 1
f22 = -x22 + 0.3 * Math.Cos((0.5 * Math.Sin(x22 / 3) + 1))
f21i = 1 + 0.5 * (Math.Cos(0.3 * Math.Cos(x21)) / 3) * Math.Sin(x21)
f22i = 1 - (0.3 * Math.Sin(0.5 * Math.Sin(x22)) / 3) * (Math.Cos(x22) / 3) * 0.5 / 3
x31 = x21 + f21 / f21i
x32 = x22 + f22 / f22i
Label15.Text = "x31= " & x31
Label16.Text = "x32= " & x32
f31 = x31 - 0.5 * Math.Sin(0.3 * Math.Cos(x31) / 3) - 1
f32 = -x32 + 0.3 * Math.Cos((0.5 * Math.Sin(x32 / 3) + 1))
f31i = 1 + 0.5 * (Math.Cos(0.3 * Math.Cos(x31)) / 3) * Math.Sin(x31)
f32i = 1 - (0.3 * Math.Sin(0.5 * Math.Sin(x32)) / 3) * (Math.Cos(x32) / 3) * 0.5 / 3
x41 = x31 + f31 / f31i
x42 = x32 + f32 / f32i
Label17.Text = "x41= " & x41
Label18.Text = "x42= " & x42
f41 = x41 - 0.5 * Math.Sin(0.3 * Math.Cos(x41) / 3) - 1
f42 = -x42 + 0.3 * Math.Cos((0.5 * Math.Sin(x42 / 3) + 1))
f41i = 1 + 0.5 * (Math.Cos(0.3 * Math.Cos(x41)) / 3) * Math.Sin(x41)
f42i = 1 - (0.3 * Math.Sin(0.5 * Math.Sin(x42)) / 3) * (Math.Cos(x42) / 3) * 0.5 / 3
x51 = x41 + f41 / f41i
x52 = x42 + f42 / f42i
Label19.Text = "x51= " & x51
Label20.Text = "x52= " & x52
f51 = x51 - 0.5 * Math.Sin(0.3 * Math.Cos(x51) / 3) - 1
f52 = -x52 + 0.3 * Math.Cos((0.5 * Math.Sin(x52 / 3) + 1))
f51i = 1 + 0.5 * (Math.Cos(0.3 * Math.Cos(x51)) / 3) * Math.Sin(x51)
f52i = 1 - (0.3 * Math.Sin(0.5 * Math.Sin(x52)) / 3) * (Math.Cos(x52) / 3) * 0.5 / 3
x61 = x51 + f51 / f51i
x62 = x52 + f52 / f52i
Label21.Text = "x61= " & x61
Label22.Text = "x62= " & x62
f61 = x61 - 0.5 * Math.Sin(0.3 * Math.Cos(x61) / 3) - 1
f62 = -x62 + 0.3 * Math.Cos((0.5 * Math.Sin(x62 / 3) + 1))
f61i = 1 + 0.5 * (Math.Cos(0.3 * Math.Cos(x61)) / 3) * Math.Sin(x61)
f62i = 1 - (0.3 * Math.Sin(0.5 * Math.Sin(x62)) / 3) * (Math.Cos(x62) / 3) * 0.5 / 3
x71 = x61 - f61 / f61i
x72 = x62 + f62 / f62i
Label23.Text = "x61= " & x71
Label24.Text = "x62= " & x72
f71 = x71 - 0.5 * Math.Sin(0.3 * Math.Cos(x71) / 3) - 1
f72 = -x62 + 0.3 * Math.Cos((0.5 * Math.Sin(x72 / 3) + 1))
f71i = 1 + 0.5 * (Math.Cos(0.3 * Math.Cos(x71)) / 3) * Math.Sin(x71)
f72i = 1 - (0.3 * Math.Sin(0.5 * Math.Sin(x72)) / 3) * (Math.Cos(x72) / 3) * 0.5 / 3
x81 = x71 + f71 / f71i
x82 = x72 - f72 / f72i
Label25.Text = "x81= " & x81
Label26.Text = "x82= " & x82
f81 = x81 - 0.5 * Math.Sin(0.3 * Math.Cos(x81) / 3) - 1
f82 = -x82 + 0.3 * Math.Cos((0.5 * Math.Sin(x82 / 3) + 1))
cyberforum.ru/pascalabc/thread844601.html