- 1
Console.WriteLine("Ставь лайк если любиш сваю маму");
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+134
Console.WriteLine("Ставь лайк если любиш сваю маму");
Вот ето я хитро зделал никто ни паставит дизлайк азаззахзщшщхзашщвщаа)))0)0
+134
using System;
using System.Security.Cryptography;
namespace sha1_calc
{
class Program
{
static void Main(string[] args)
{
SHA1 sha = new SHA1CryptoServiceProvider();
foreach (var fname in args)
{
Console.WriteLine("file: " + fname);
try
{
System.IO.FileStream fs = System.IO.File.Create(fname);
byte [] res = sha.ComputeHash(fs);
fs.Close();
Console.Write("0x");
foreach (var i in res)
{
Console.Write(i.ToString("X"));
}
Console.WriteLine();
Console.WriteLine("---------------------------------");
}
catch(Exception e)
{
Console.WriteLine("error: " + e);
}
}
Console.ReadKey();
}
}
}
Скачал парочку образов и решил проверить их чексуммы. Протестировал программу на скачанных файлах. Удивился, почему же у них хеши одинаковые?
+134
while (true)
{
try
{
MapControlStatic.Remove(MapControlStatic.First(o => o.Value.thisControl == c).Key);
}
catch
{
break;
}
}
while (true)
{
try
{
MapControlStatic.Remove(MapControlStatic.First(o => o.Value.Childs.Contains(c)).Key);
}
catch
{
break;
}
}
+134
class Slovo
{
public string Word;
public int Count;
public Slovo(string slovo, int kolichestvo)
{
Word = slovo;
Count = kolichestvo;
}
}
class Program
{
static void Main(string[] args)
{
string s = "Один два четыре восемь число один и два дают вместе восемь а один умножить на один будет один";
List<string> word = new List<string>();
List<int> count = new List<int>();
string[] word_collection = s.ToLower().Split(' ');
foreach (string str in word_collection) if (!word.Contains(str))
{
word.Add(str);
count.Add(1);
}
else count[word.IndexOf(str)]++;
List<Slovo> spisok = new List<Slovo>();
for (int i = 0; i < word.Count; i++) spisok.Add(new Slovo(word[i], count[i]));
spisok.Sort((a, b) => b.Count - a.Count);
foreach (Slovo slovo in spisok) Console.WriteLine(slovo.Word.PadRight(12) + slovo.Count.ToString());
Console.ReadKey();
}
}
Найти в строке самые частоповторяющиеся слова
+134
bool generateEfDbEachRun = false;
bool.TryParse(config.Get("GenerateEFDBEachRun"), out generateEfDbEachRun);
if (generateEfDbEachRun && bool.Parse(config.Get("GenerateEFDBEachRun")))
{
Database.SetInitializer(new SADatabaseInitializer());
}
+134
public void Children_OnAdd(object sender, EventArgs e)
{
((MyEventArgs<Document>)e).D.Parent = this;
}
+134
int y = (int)Math.Floor((decimal)(block_number / w));
все переменные - int
+134
private static readonly SortedDictionary<Type, ModelConvertor> ModelTypes = new SortedDictionary<Type, ModelConvertor>
{
{ typeof(ObjectType), в => Convert((ObjectType)в) },
{ typeof(ObjectBodyFormat), пятницу => Convert((ObjectBodyFormat)пятницу) },
{ typeof(PropertyId), набухаюсь => Convert((PropertyId)набухаюсь) },
{ typeof(PropertyCategory), нафиг => Convert((PropertyCategory)нафиг) }
};
Сегодня случайно заметил этот крик души в мониторе одного коллеги. Всё-таки, в юникодных идентификаторах есть свой неуловимый шарм...
+134
for (int i = X; i <= (X + 1); i++)
{
for (int j = Y; j <= (Y + 1); j++)
{
+134
stroka="Hello world!";
SubStringStartWith(Char, String)
{
return strchr(String, Char);
}
#define cl 'w'
main()
{
printf("In character literal \'%c\' %d bytes \n", cl, sizeof(cl));
printf("In string \"%s\" substring, that start with \'%c\' char is \'%s\'", stroka, cl, SubStringStartWith(cl, stroka));
return 0;
}
Оттуда же. Вот уж воистину говнокода-генераторы.
http://ideone.com/ICydFM