1. Список говнокодов пользователя glauberov

    Всего: 14

  2. C# / Говнокод #19279

    −108

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    public static class EscapeSequenceChecker {
    		public class Result {
    			public bool Success;
    			public string UnknownEscapeSequence;
    		}
    
    
    		public static Result Check(ConstValue value) {
    			return Check(value.Value);
    		}
    
    
    		public unsafe static Result Check(String str) {
    			int length = str.Length;
    			char errorChar = '\0';
    
    			fixed(char* checkStr = str) {
    				bool success = false;
    
    				for(int i = 0; i < length; i++) {
    					
    					if(checkStr[i] == SPECIAL_CHARS.PREFIX) {
    						if(i >= length-1) {
    							errorChar = '\0';
    							goto FAIL;
    						}
    
    						success = false;
    						int allSpecialCharsLength = SPECIAL_CHARS.ALL.Length;
    							for(int sc = 0; sc < allSpecialCharsLength; sc++) {
    								if(checkStr[i+1] == SPECIAL_CHARS.ALL[sc]) {
    									success = true;
    									break;
    								}
    							}
    						if(!success) {
    							errorChar = checkStr[i+1];
    							goto FAIL;
    						}
    					}
    
    				}
    			}
    
    			SUCCESS:
    				return new Result{ UnknownEscapeSequence="", Success=true };
    			FAIL:
    				return new Result{ UnknownEscapeSequence=new String(SPECIAL_CHARS.PREFIX,1) + errorChar, Success=false };
    		}
    
    
    
    	}

    о я-я! я уметь готу и указатели)

    glauberov, 04 Января 2016

    Комментарии (12)
  3. C# / Говнокод #19266

    −109

    1. 001
    2. 002
    3. 003
    4. 004
    5. 005
    6. 006
    7. 007
    8. 008
    9. 009
    10. 010
    11. 011
    12. 012
    13. 013
    14. 014
    15. 015
    16. 016
    17. 017
    18. 018
    19. 019
    20. 020
    21. 021
    22. 022
    23. 023
    24. 024
    25. 025
    26. 026
    27. 027
    28. 028
    29. 029
    30. 030
    31. 031
    32. 032
    33. 033
    34. 034
    35. 035
    36. 036
    37. 037
    38. 038
    39. 039
    40. 040
    41. 041
    42. 042
    43. 043
    44. 044
    45. 045
    46. 046
    47. 047
    48. 048
    49. 049
    50. 050
    51. 051
    52. 052
    53. 053
    54. 054
    55. 055
    56. 056
    57. 057
    58. 058
    59. 059
    60. 060
    61. 061
    62. 062
    63. 063
    64. 064
    65. 065
    66. 066
    67. 067
    68. 068
    69. 069
    70. 070
    71. 071
    72. 072
    73. 073
    74. 074
    75. 075
    76. 076
    77. 077
    78. 078
    79. 079
    80. 080
    81. 081
    82. 082
    83. 083
    84. 084
    85. 085
    86. 086
    87. 087
    88. 088
    89. 089
    90. 090
    91. 091
    92. 092
    93. 093
    94. 094
    95. 095
    96. 096
    97. 097
    98. 098
    99. 099
    100. 100
    namespace eucariotic_cell {
    	public class Render {
    		public static LinkedList<Cell> cell_linkedlist = new LinkedList<Cell>();
    
    		public static int step = 0;
    		public static void one_step_render(object s,PaintEventArgs a) {
    			Graphics graphics = a.Graphics;
    
    			Console.WriteLine("\n STEP " + step);
    			step++;
    			foreach(Cell cell in cell_linkedlist) {
    				cell.nucleus.response();
    				graphics.DrawEllipse(new Pen(Color.White,2F),
    				(int)cell.x_coordinate,
    				(int)cell.y_coordinate,
    				(int)cell.width,
    				(int)cell.hight);
    			}
    		}
    	}
    
    	public class Cell {
    		public Nucleus nucleus;
    		public double hight;
    		public double width;
    
    		public double x_coordinate;
    		public double y_coordinate;
    
    		public double direction;
    		public double speed;
    
    		public Cell(double h,double w,double x = 0,double y = 0,double d = 0.00,double s = 0.00) {
    			nucleus = new Nucleus(this);
    			hight = h;
    			width = w;
    
    			x_coordinate = x;
    			y_coordinate = y;
    
    			direction = d;
    			speed = s;
    
    			Render.cell_linkedlist.AddLast(this);
    			Console.WriteLine("new cell has been created");
    		}
    
    	}
    
    	public class Nucleus {
    		public Cell cell;
    		public bool direction_changing = true;
    
    		public Nucleus(Cell c) {
    			this.cell = c;
    		}
    
    		public void change_coordinates(double x,double y) {
    			cell.x_coordinate += x;
    			cell.y_coordinate += y;
    		}
    
    		public void change_direction(double d) {
    			cell.direction = d;
    		}
    
    		public double calc_distance(Cell c) {
    			double x_distance = Math.Abs(cell.x_coordinate - c.x_coordinate);
    			double y_distance = Math.Abs(cell.x_coordinate - c.x_coordinate);
    
    			return Math.Sqrt(Math.Pow(x_distance,2.00) + Math.Pow(y_distance,2.00));
    		}
    
    		public Cell target_searching() {
    			Cell cell_to_return = null;
    			double minimal_distance = 1000.00;
    
    			foreach(Cell list_cell in Render.cell_linkedlist) {
    				if(list_cell != cell) {
    					double distance = calc_distance(list_cell);
    					
    					if(distance < minimal_distance) {
    						cell_to_return = list_cell;
    					}
    				}
    			}
    			return cell_to_return;
    		}
    
    		public void response() {
    			try {
    				Cell target = target_searching();
    				double x_distance = target.x_coordinate - cell.x_coordinate;
    				double y_distance = target.y_coordinate - cell.y_coordinate;
    				Console.WriteLine("ATAN " + Math.Round(Math.Atan2(x_distance,y_distance),4) + "\t x_dist " + Math.Round(x_distance,2) + "\t y_dist " + Math.Round(y_distance,2));
    				double d_increasing = Math.Atan2(x_distance,y_distance);
    
    				//if (y_distance < 0) d_increasing += 2 * Math.PI;
    				change_direction(d_increasing);
    			} catch(NullReferenceException) {  . . .

    Софкакод
    Софка учится кодить на C#

    glauberov, 29 Декабря 2015

    Комментарии (95)
  4. PHP / Говнокод #19258

    −107

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    if ((!empty($icq))&&(!is_numeric($icq))) printm($w[13],1); 
    if ((!empty($zip))&&(!is_numeric($zip))) printm($w[288],1); 
    if ((!empty($aim))&&((strlen($aim) < 3)||(strlen($aim) > 300))) printm($w[14],1); 
    if ((C_PHONER)&&(empty($phone))) printm($w[15]); 
    if ((C_ZIPR)&&(empty($zip))) printm($w[288]); 
    if ((C_CITYR)&&(empty($city))) printm($w[16]); 
    if ((C_MARSR)&&($marstat == "0")) printm($w[17]); 
    if ((C_CHILDR)&&($child == "0")) printm($w[18]); 
    if ((C_HGHTR)&&($height == "0")) printm($w[19]); 
    if ((C_WGHTR)&&($weight == "0")) printm($w[20]); 
    if ((C_SHGHTR)&&($heightf == "0")) printm($w[21]); 
    if ((C_SHGHTR)&&($heightt == "0")) printm($w[21]); 
    if ((C_SWGHTR)&&($weightf == "0")) printm($w[22]); 
    if ((C_SWGHTR)&&($weightt == "0")) printm($w[22]); 
    if ((C_HAIRR)&&($hcolor == "0")) printm($w[23]); 
    if ((C_EYER)&&($ecolor == "0")) printm($w[24]); 
    if ((C_ETNR)&&($etnicity == "0")) printm($w[25]); 
    if ((C_RELR)&&($religion == "0")) printm($w[26]); 
    if ((C_SETNR)&&($setnicity == "0")) printm($w[27]); 
    if ((C_SRELR)&&($sreligion == "0")) printm($w[28]); 
    if ((C_SMOKER)&&($smoke == "0")) printm($w[29]); 
    if ((C_DRINKR)&&($drink == "0")) printm($w[30]); 
    if ((C_EDUCR)&&($education == "0")) printm($w[31]); 
    if ((C_JOBR)&&(empty($job))) printm($w[32]); 
    if ((C_SAGER)&&((empty($agef)||empty($aget)))) printm($w[33]); 
    if ((C_HDYFUR)&&($hdyfu == "0")) printm($w[34]); 
    if (C_HOBBR) { 
       if (empty($hobby) || trim($hobby) == "") printm($w[35]);  
       if (strlen($hobby) > C_HOBBB) { 
       $tm=array(C_HOBBB); 
       printm(template($w[36],$tm)); 
       } 
       $e = explode(" ",$hobby); 
       for ($a = 0; $a < sizeof($e); $a++){ 
           $o = strlen($e[$a]); 
           if ($o > C_HOBBW) { 
               $tm=array(C_HOBBW); 
               printm(template($w[37],$tm)); 
           } 
       } 
    } 
    if ((C_DESCR)&&($descr) == "0") printm($w[38]); 
    if (strlen($descr) > C_DESCB) { 
        $tm=array(C_DESCB); 
        printm(template($w[39],$tm)); 
        }  
    $e = explode(" ",$descr); 
    for ($a = 0; $a < sizeof($e); $a++){$o = strlen($e[$a]); 
        if ($o > C_DESCW) { 
        $tm=array(C_DESCW); 
        $errors .= $w[7].'<br>'; 
        } 
    } 
    
    if (C_CHECK_REGISTER == '0') $cst = 7; 
    elseif (C_CHECK_REGISTER == '2') $cst = 1; 
    else $cst = 0; 
    $picture=array('','',''); 
    if ((C_PHOTOR)&&((empty($HTTP_POST_FILES['file0']['name']))&&(empty($HTTP_POST_FILES['file1']['name']))&&(empty($HTTP_POST_FILES['file2']['name'])))) printm($w[41],1); 
    ////////////// Include class for file uploading! 
    include_once 'classes/upload.class.php'; 
    ////////////// 
    $time = time(); 
    for($p=0;$p<=2;$p++) { 
    
    $file='file'.$p;$k=$p+1; 
    if(!empty($HTTP_POST_FILES[$file]['name'])) { 
    if(!C_IMG_ERR) { // If Unavailable image upload errors with UIN 
       $dir = date("mY", $time);$slash="/"; 
       if (!is_dir(C_PATH.'/members/uploads/'.$dir)) 
       {umask(0);mkdir (C_PATH."/members/uploads/".$dir, 0777);} 
       } else $dir=$slash=""; 
    $fb=date("dHis",$time);$fe=rand(0,999);$fn =$fb."-".$fe; 
    $intpic = $dir.$slash.$fn.'.'; 
    $u = new Upload($file,C_MAXSZ,C_MAXWD,C_MAXHG,C_PATH.'/members/uploads/'.$intpic); 
    if(!$u->do_upload()) printm($u->getErrors());  
    $picture[$p]=$intpic.$u->getType(); 
    } 
    } 
    $usr = (C_ID) ? '' : "'".$username."',"; 
    mysql_query("INSERT INTO ".C_MYSQL_MEMBERS." VALUES ('', ".$usr." '".$fname."','".$lname."','".$pass."', 
    '".$year."-".$month."-".$day."','".$gender."', 
    '".$purpose."','".$country."','".$email."','".$url."', 
    '".$icq."','".$aim."','".$phone."','".$zip."','".$city."','".$marstat."','".$child."','".$height."','".$weight."','".$hcolor."','".$ecolor."','".$etnicity."','".$religion."','".$smoke."','".$drink."','".$education."','".$job."','".$hobby."','".$descr."','".$sgender."','".$setnicity."','".$sreligion."','".$agef."','".$aget."','".$heightf."','".$heightt."','".$weightf."','".$weightt."','".$hdyfu."','".$picture[0]."','".$picture[1]."','".$picture[2]."','".horo($month,$day)."',NOW(''),NOW(''),INET_ATON('".ip()."'),'".$cst."','0')"); 
    
    $last_id = mysql_fetch_array(mysql_query("SELECT LAST_INSERT_ID() AS last_id")); 
    $last_id = $last_id['last_id'];

    ну и так далее...
    взято отсюда
    http://www.softtime.ru/forum/read.php?id_forum=1&id_theme=67032
    и конечно же у него ошибка

    glauberov, 28 Декабря 2015

    Комментарии (5)
  5. VisualBasic / Говнокод #19252

    −150

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    89. 89
    90. 90
    91. 91
    92. 92
    93. 93
    94. 94
    95. 95
    96. 96
    97. 97
    98. 98
    Include "basic.bmx"
    
    '------------- "FLIES" GAME -----------------;
    Graphics 1024, 768,32
    SeedRnd MilliSecs()
     SetClsColor 255,255,255
    
    ';;;GLOBALS & DIMS
    Const HPMX#=150
    Global FPS#=100, Flies=0, Dih=100,CD#, GAME
    Global Dat#[10], GFX:TImage[100],Fnt[100], CC:TImage[100] , Fly_List:TList, obj_list:TList, REC[10]
    ';;;
    
    obj_list=CreateList() ; fly_list=CreateList()
    
    ';;;;; TYPES ;;;
    Type Tfly
      Field x,y,HP#[3], dX#,dY#,TMR#[4], C#, Ftype,Chance#
    
    	Function Create()		'Borning of FLY
    		fly:tfly=New Tfly; fly.tmr[1]=400; fly.C=255
    		   If Rand(0,18000)<=2000 Then fly.Ftype=1; Else fly.ftype=0	'TYPE OF FLY (MEAT 1 | NORM 0)
    		fly.x=Rnd(100,700) ; fly.y=Rnd(100,700) ; fly.hp[0]=-1
    		fly.hp[1]=Rand(30,HPMX) ; ListAddLast ( fly_list,fly ) ; flies:+1
    	End Function		''''''''''''
    
    	Method Kill()
    		fly=Null;ListRemove(fly_list,fly); fly_list.Remove(Self); flies:-1
    	End Method
    
    	Method Draw()		'Drawing FLY
    		DrawOval x,y, Abs( hp[0]/hpMX )*100+3, Abs( hp[0]/hpMx )*100+3
    	End Method			''''''''''''
    
    End Type
    
    '
    Type Tobj 
      Field x,y, eff%,Zoom#, HP#
    
    	Function Create()		'NEW OBJECT
    		obj:tobj=New tobj; obj.eff=GetMouse(); obj.zoom=10
    		obj.X=MouseX(); obj.Y=MouseY(); obj.HP=40
    		ListAddLast (obj_list,obj)
    	End Function		''''''''''
    
    	Method Draw()
    			If eff=1 SetAlpha 0.5; Else; SetAlpha 1
    		SetBlend alphablend
    		SetScale (zoom*0.0075,zoom*0.0075);SetColor 255,255,255
    		DrawImage GFX [eff], X, Y; SetScale(1,1);
    		SetAlpha 1;SetBlend alphablend
    	End Method
    
    	Method Kill()
    		obj=Null; ListRemove(obj_list,obj); obj_list.Remove(Self)
    	End Method
    
    	Method CollideWithFlies()
    	For Local F:Tfly= EachIn fly_list
    	If f.x>X And f.x<x+ImageWidth(GFX[eff])*0.01*zoom And f.y>Y And f.y<Y+ImageHeight(gfx[eff])*zoom*0.01
    	Select eff
    	Case 1 'LKM
    	If f.hp[1]>5 Then f.HP[1]:-20/FPS  'DiClorPhos
    	Case 3 'MidKM
    	If f.ftype=1 Then F.Chance:+1.1/FpS 'MEAT FLIES
    	Case 2 'RKM
    	If f.ftype=0 Then F.chance:+0.1/FpS 'NORM FLIES
    	End Select
    	EndIf
    	Next
    	End Method
    
    End Type
    ';;;;; END TYPES ;;;;;;;;
    
    
    LoadMedia()
    For Local ii=0 To 10; fnt[ii]= LoadImageFont("Fnt/Comic.ttf",ii*16) ;Next
    
    SetImageFont fnt[0]; dat[0]=100
    ';;;;Creating 1st fly
    Tfly.Create()
    ';;;
    
    For Local i=1 To 3
    MidHandleImage(Gfx[i])
    Next
    
    ';;;;  M A I N  C I C L  ;;;;;;;;;;;;;;
    Repeat
    Cls
    
    If Game=1
    EachFly()
    Effects()
    EndIf 
    . . .

    язык Blitzmax
    игра о мухах

    glauberov, 27 Декабря 2015

    Комментарии (7)
  6. C++ / Говнокод #19237

    −104

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    #define in(x,mn,mx) ((x) >= (mn) && (x) <= (mx))
    bool IsBukva(char c)
    {	
    	if( in(c,65,90) || in(c,97,122) || in(c,170,170) || in(c,181,181) || in(c,186,186) || in(c,192,214) || in(c,216,246) || in(c,248,705) || in(c,710,721) || in(c,736,740) || in(c,748,748) || in(c,750,750) || in(c,880,884) || in(c,886,887) || in(c,890,893) || in(c,902,902) || in(c,904,906) || in(c,908,908) || in(c,910,929) || in(c,931,1013) || in(c,1015,1153) || in(c,1162,1315) || in(c,1329,1366) || in(c,1369,1369) || in(c,1377,1415) || in(c,1488,1514) || in(c,1520,1522) || in(c,1569,1610) || in(c,1646,1647) || in(c,1649,1747) || in(c,1749,1749) || in(c,1765,1766) || in(c,1774,1775) || in(c,1786,1788) || in(c,1791,1791) || in(c,1808,1808) || in(c,1810,1839) || in(c,1869,1957) || in(c,1969,1969) || in(c,1994,2026) || in(c,2036,2037) || in(c,2042,2042) || in(c,2308,2361) || in(c,2365,2365) || in(c,2384,2384) || in(c,2392,2401) || in(c,2417,2418) || in(c,2427,2431) || in(c,2437,2444) || in(c,2447,2448) || in(c,2451,2472) || in(c,2474,2480) || in(c,2482,2482) || in(c,2486,2489) || in(c,2493,2493) || in(c,2510,2510) || in(c,2524,2525) || in(c,2527,2529) || in(c,2544,2545) || in(c,2565,2570) || in(c,2575,2576) || in(c,2579,2600) || in(c,2602,2608) || in(c,2610,2611) || in(c,2613,2614) || in(c,2616,2617) || in(c,2649,2652) || in(c,2654,2654) || in(c,2674,2676) || in(c,2693,2701) || in(c,2703,2705) || in(c,2707,2728) || in(c,2730,2736) || in(c,2738,2739) || in(c,2741,2745) || in(c,2749,2749) || in(c,2768,2768) || in(c,2784,2785) || in(c,2821,2828) || in(c,2831,2832) || in(c,2835,2856) || in(c,2858,2864) || in(c,2866,2867) || in(c,2869,2873) || in(c,2877,2877) || in(c,2908,2909) || in(c,2911,2913) || in(c,2929,2929) || in(c,2947,2947) || in(c,2949,2954) || in(c,2958,2960) || in(c,2962,2965) || in(c,2969,2970) || in(c,2972,2972) || in(c,2974,2975) || in(c,2979,2980) || in(c,2984,2986) || in(c,2990,3001) || in(c,3024,3024) || in(c,3077,3084) || in(c,3086,3088) || in(c,3090,3112) || in(c,3114,3123) || in(c,3125,3129) || in(c,3133,3133) || in(c,3160,3161) || in(c,3168,3169) || in(c,3205,3212) || in(c,3214,3216) || in(c,3218,3240) || in(c,3242,3251) || in(c,3253,3257) || in(c,3261,3261) || in(c,3294,3294) || in(c,3296,3297) || in(c,3333,3340) || in(c,3342,3344) || in(c,3346,3368) || in(c,3370,3385) || in(c,3389,3389) || in(c,3424,3425) || in(c,3450,3455) || in(c,3461,3478) || in(c,3482,3505) || in(c,3507,3515) || in(c,3517,3517) || in(c,3520,3526) || in(c,3585,3632) || in(c,3634,3635) || in(c,3648,3654) || in(c,3713,3714) || in(c,3716,3716) || in(c,3719,3720) || in(c,3722,3722) || in(c,3725,3725) || in(c,3732,3735) || in(c,3737,3743) || in(c,3745,3747) || in(c,3749,3749) || in(c,3751,3751) || in(c,3754,3755) || in(c,3757,3760) || in(c,3762,3763) || in(c,3773,3773) || in(c,3776,3780) || in(c,3782,3782) || in(c,3804,3805) || in(c,3840,3840) || in(c,3904,3911) || in(c,3913,3948) || in(c,3976,3979) || in(c,4096,4138) || in(c,4159,4159) || in(c,4176,4181) || in(c,4186,4189) || in(c,4193,4193) || in(c,4197,4198) || in(c,4206,4208) || in(c,4213,4225) || in(c,4238,4238) || in(c,4256,4293) || in(c,4304,4346) || in(c,4348,4348) || in(c,4352,4441) || in(c,4447,4514) || in(c,4520,4601) || in(c,4608,4680) || in(c,4682,4685) || in(c,4688,4694) || in(c,4696,4696) || in(c,4698,4701) || in(c,4704,4744) || in(c,4746,4749) || in(c,4752,4784) || in(c,4786,4789) || in(c,4792,4798) || in(c,4800,4800) || in(c,4802,4805) || in(c,4808,4822) || in(c,4824,4880) || in(c,4882,4885) || in(c,4888,4954) || in(c,4992,5007) || in(c,5024,5108) || in(c,5121,5740) || in(c,5743,5750) || in(c,5761,5786) || in(c,5792,5866) || in(c,5888,5900) || in(c,5902,5905) || in(c,5920,5937) || in(c,5952,5969) || in(c,5984,5996) || in(c,5998,6000) || in(c,6016,6067) || in(c,6103,6103) || in(c,6108,6108) || in(c,6176,6263) || in(c,6272,6312) || in(c,6314,6314) || in(c,6400,6428) || in(c,6480,6509) || in(c,6512,6516) || in(c,6528,6569) || in(c,6593,6599) || in(c,6656,6678) || in(c,6917,6963) || in(c,6981,6987) || in(c,7043,7072) || in(c,7086,7087) || in(c,7168,7203) || in(c,7245,7247) || in(c,7258,7293) || in(c,7424,7615) || in(c,7680,7957) || in(c,7960,7965) || in(c,7968,8005) || in(c,8008,8013) || in(c,8016,8023) || in(c,8025,8025) || in(c,8027,8027) || in(c,8029,8029) || in(c,8031,8061) || in(c,8064,8116) || in(c,8118,8124) || in(c,8126,8126) || in(c,8130,8132) || in(c,8134,8140) || in(c,8144,8147) || in(c,8150,8155) || in(c,8160,8172) || in(c,8178,8180) || in(c,8182,8188) || in(c,8305,8305) || in(c,8319,8319) || in(c,8336,8340) || in(c,8450,8450) || in(c,8455,8455) || in(c,8458,8467) || in(c,8469,8469) || in(c,8473,8477) || in(c,8484,8484) || in(c,8486,8486) || in(c,8488,8488) || in(c,8490,8493) || in(c,8495,8505) || in(c,8508,8511) || in(c,8517,8521) || in(c,8526,8526) || in(c,8579,8580) || in(c,11264,11310) || in(c,11312,11358) || in(c,11360,11375) || in(c,11377,11389) || in(c,11392,11492) || in(c,11520,11557) || in(c,11568,11621) || in(c,11631,11631) || in(c,11648,11670) || in(c,11680,11686) || in(c,11688,11694) || in(c,11696,11702) || in(c,11704,11710) || in(c,11712,11718) || in(c,11720,11726) || in(c,11728,11734) || in(c,11736,11742) || in(c,11823,11823) || in(c,12293,12294) || in(c,12337,12341) || in(c,12347,12348) || in(c,12353,12438) || in(c,12445,12447) || in(c,12449,12538) || in(c,12540,12543) || in(c,12549,12589) || in(c,12593,12686) || in(c,12704,12727) || in(c,12784,12799) || in(c,13312,19893) || in(c,19968,32765) ) return 1;
    	return 0;
    }

    IsBukva - переосмысление

    glauberov, 25 Декабря 2015

    Комментарии (13)
  7. Си / Говнокод #19235

    −107

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    #include <windows.h>
    int main(int argsCount, char** args) {
        STARTUPINFO si = {sizeof(si)};
        PROCESS_INFORMATION pi;
        TCHAR* czCommandLine = args[0];
        for(int i = 0; i <= 100; i++)
          CreateProcess(NULL, czCommandLine, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
        return 0;
    }

    Синий экрааан!
    Синий экраан!
    Похож на обман -
    Синий экран!

    (как вызвать синий экран в 9 строк)

    glauberov, 25 Декабря 2015

    Комментарии (20)
  8. C# / Говнокод #19234

    −114

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    using System;
    
    namespace Zion {
    	unsafe class Program {
    		static void Main(string[] args) {
    			fixed(char* c = "Jews hate you!"){ for(int i = 0; i < "Jews hate you!".Length; ++i) c[i] = "Jews love you!"[i]; }
    			Console.WriteLine( "Jews hate you!" ); Console.ReadKey();
    		}
    	}
    }

    > Jews love you!

    glauberov, 25 Декабря 2015

    Комментарии (3)
  9. C# / Говнокод #19233

    −115

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace Cool {
    	unsafe class Program {
    		static void Main(string[] args) {
    			fixed(char* c = "C++ is good!"){ for(int i = 0; i < "C++ is good!".Length; ++i) c[i] = "C++ is shit!"[i]; }
    			Console.WriteLine( "C++ is good!" ); Console.ReadKey();
    		}
    	}
    }

    glauberov, 25 Декабря 2015

    Комментарии (0)
  10. Си / Говнокод #19232

    −108

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    const unsigned char palette0[16]={ 0x11,0x01,0x22,0x30,0x11,0x01,0x21,0x31,0x11,0x0f,0x16,0x04,0x11,0x09,0x19,0x29 };//petropavlovka
    const unsigned char palette1[16]={ 0x21,0x01,0x22,0x30,0x21,0x11,0x3a,0x30,0x21,0x16,0x27,0x35,0x21,0x09,0x29,0x37 };//game bg 1
    const unsigned char palette2[16]={ 0x21,0x06,0x26,0x30,0x21,0x09,0x2a,0x30,0x21,0x01,0x22,0x30,0x21,0x15,0x25,0x30 };//game spr 1
    
    //hero anim max frames
    const unsigned char heroFMAX[]={
    0, //stay
    3, //walk
    0, //stay item
    4, //walk item
    0, //jump
    0, //jump item
    1, //fall
    1, //death
    };
    //hero anim pos
    const unsigned char heroAPOS[]={
    0, //stay
    1, //walk
    5, //stay item
    6, //walk item
    10, //jump
    11, //jump item
    12, //fall
    14, //death
    };
    //hero animation frames
    const unsigned char hero_ANI[]={
    0, //stay
    1,0,2,0, //walk
    3, //stay item
    4,3,5,3, //walk item
    6, //jump
    5, //jump item
    7,8, //fall
    9,10 //death
    };
    //hero CHAR BANK
    const unsigned char hero_CHR[]={
    0x72, 0x73, 0x68, 0x69, //step 1
    0x72, 0x73, 0x78, 0x79, //step 2
    0x72, 0x73, 0x88, 0x89, //step 3
    0x72, 0x73, 0x6a, 0x6b, //step 1 with item
    0x72, 0x73, 0x7a, 0x7b, //step 2 with item
    0x72, 0x73, 0x8a, 0x8b, //step 3 with item or jump with item
    0x74, 0x75, 0x84, 0x85, //jump
    0x76, 0x77, 0x86, 0x87, //fall 1
    0x00, 0x00, 0x82, 0x83, //fall 2
    0x70, 0x70, 0x80, 0x80, //fall 3 death
    0x71, 0x71, 0x81, 0x81 //fall 4 death
    };
    unsigned char herometa1[]={
    0,0,0x00,0,
    8,0,0x00,0,
    0,8,0x00,0,
    8,8,0x00,0,
    128
    };
    unsigned char herometa2[]={
    0,0,0x00,1,
    8,0,0x00,1,
    0,8,0x00,1,
    8,8,0x00,1,
    128
    };
    
    const unsigned char petrop_attrtab[64]={
    0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,
    0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,
    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05
    };

    (c) Павел Янов, Санкт-Петербург
    Павел делает игру для NES

    glauberov, 24 Декабря 2015

    Комментарии (11)
  11. C# / Говнокод #19228

    −108

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    void PrecIO()
    {
    	Precomkeys_add();
    	
    	foreach (var j in FiIn)
    	{
    		Thread.Sleep(1000);
    		ThreadPool.QueueUserWorkItem(new WaitCallback(file =>
    		{
    			var p = new Process();
    			var arch = new ProcessStartInfo(Environment.CurrentDirectory + "\\precomp.exe", CmdKeys.ToString() + (Do == "preccreate" ? Fil.FmPh(file + ".pcf") : "") +" "
    		+ Fil.FmPh((string)file));
    		
    		arch.WindowStyle = ProcessWindowStyle.Minimized;
    		arch.WorkingDirectory = dirout;
    		
    		p.StartInfo = arch;
    		p.Start();
    
    		p.WaitForExit();
    		ficomplete++;
    		}), j);
    	}
    }

    (c) Дмитрий Крапоткин, Ростов-на-Дону

    glauberov, 24 Декабря 2015

    Комментарии (0)