- 1
throw new runtime_error
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−2
throw new runtime_error
https://github.com/search?l=C%2B%2B&q=%22throw+new+runtime_ error%22&type=Code&utf8=%E2%9C%93
0
primary_list = tuple([line.strip() for line in open('file1.txt', 'r')])
secondary_list = tuple([line.strip() for line in open('file2.txt', 'r')])
f = open('test.txt', 'w')
users_unique = []
def isUnique(value):
if value not in users_unique:
users_unique.append(value)
return True
else:
return False
def common():
for item in primary_list:
if item is None:
continue
elif item in secondary_list and isUnique(item):
f.write(str(item)+'\r\n')
print 'Complete'
0
public class Main
{
public static void main(String[] args)
{
Integer a = 5;
int b = 2;
for(;b<20 && a<20;b++,a++)
{
if (a.compareTo(b) == 0)
{
System.out.println(a + " равно " + b);
}
else if(a.compareTo(b) == -1)
System.out.println(a + " меньше " +b);
else if(a.compareTo(b) == 1)
System.out.println(a + " больше " + b);
}
}
}
Хакерско-нубокодинг
0
import java.util.*;
import java.net.*;
import java.io.*;
public class Main
{
public static void main(String[] args) throws MalformedURLException, IOException
{
URL url = new URL("http://pro-java.ru");
URLConnection connect = url.openConnection();
long d = connect.getLastModified();
if(d == 0)
System.out.println("Сведения о дате последней модификации отсутствуют.");
else
System.out.println("Дата последней модификации: " + new Date(d));
System.out.println("=== Содержимое ===");
InputStream input = connect.getInputStream();
int c, i=0;
char[] arr = new char[70000];
while(((c = input.read()) != -1)) {
//System.out.print((char) c);
i++;
arr[i] = (char)c;
}
System.out.println(i);
String text = "";
String s = "";
for(int b=0;b<i;b++)
{
s = String.valueOf(arr[b]);
text = text+s;
}
System.out.println(text.length);
}
}
Этот код так и не смог показать мне свой результат
−1
($prepayment ? 'Предо' : 'О') . 'плата счета №'
Когда DRY возведен в абсолют
+1
var x = '$$>1 ? eval(x.replace(/\\$\\$/g, $$-1)) + eval(x.replace(/\\$\\$/g, $$-2)) : 1';
eval(x.replace(/\$\$/g, 5))
Yo dawg, I heard you like evaluation. So I put evaluation in your evaluation so you could evaluate while you evaluate
Фибоначчи, по мотивам http://govnokod.ru/20105#comment330201 хуйни
−1
protected void ASPxUploadControl1_FilesUploadComplete(object sender, DevExpress.Web.ASPxUploadControl.FilesUploadCompleteEventArgs e)
{
if (Request.Cookies["LID"] != null)
{
int ListId = Convert.ToInt32(Request.Cookies["LID"].Value);
Response.Cookies["LID"].Expires = DateTime.Now.AddDays(-1);
foreach (DevExpress.Web.ASPxUploadControl.UploadedFile uf in ASPxUploadControl1.UploadedFiles)
{
uf.SaveAs(@"C:\TEMP\ListUploads\" + uf.FileName, true);
ListInfo.ImportList(Convert.ToInt16(ListId), @"C:\TEMP\ListUploads\" + uf.FileName);
}
}
}
блять, это же каким инвалидом надо быть, чтобы так сделать загрузку файла в базу?
−1
#include <stdio.h>
int main(int argc, char *argv[])
{
int num=0;
for(;num<99999999;++num)
{
if(num<10)
fprintf(stdout, "0000000%d\n", num);
else if(num<100)
fprintf(stdout,"000000%d\n", num);
else if(num<1000)
fprintf(stdout, "00000%d\n", num);
else if(num<10000)
fprintf(stdout, "0000%d\n", num);
else if(num<100000)
fprintf(stdout, "000%d\n", num);
else if(num<1000000)
fprintf(stdout, "00%d\n", num);
else if(num<10000000)
fprintf(stdout, "0%d\n", num);
}
}
Генератор всех возможных пинов wps:D
−1
import java.util.*;
public class Main
{
public static void main(String[] args)
{
for (int c=0;c<15;++c)
{
System.out.println(rnd(Math.random()));
}
}
static long rnd(double num)
{
String S="";
double b=num;
S=S+b;
StringBuffer s = new StringBuffer(S);
s.delete(0,2);
S="";
S=S+s;
long i;
i = Long.parseLong(S);
return i;
}
}
Рандомная генерация больших чисел
−1
(багрепорт)
http://www.alphaskins.com/forum/index.php?app=core&module=attach§ion=attach&attach_rel_module=post&attach_id=8330Сергох Гончаров с AlphaSkins.com шалит )
Сергох Гончаров с AlphaSkins.com шалит )