1. PHP / Говнокод #15696

    +31

    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
    if(!$_SESSION["subscribe_user"]){
    
    		   $arr_subscribes = unserialize('a:94:{i:212;s:3:"212";i:228;s:3:"228";i:302;s:3:"302";i:304;s:3:"304";i:322;s:3:"322";i:354;s:3:"354";i:366;s:3:"366";i:382;s:3:"382";i:402;s:3:"402";i:406;s:3:"406";i:458;s:3:"458";i:484;s:3:"484";i:492;s:3:"492";i:548;s:3:"548";i:564;s:3:"564";i:572;s:3:"572";i:622;s:3:"622";i:646;s:3:"646";i:700;s:3:"700";i:706;s:3:"706";i:714;s:3:"714";i:716;s:3:"716";i:718;s:3:"718";i:730;s:3:"730";i:740;s:3:"740";i:746;s:3:"746";i:766;s:3:"766";i:770;s:3:"770";i:816;s:3:"816";i:826;s:3:"826";i:832;s:3:"832";i:834;s:3:"834";i:852;s:3:"852";i:884;s:3:"884";i:894;s:3:"894";i:914;s:3:"914";i:920;s:3:"920";i:982;s:3:"982";i:988;s:3:"988";i:1010;s:4:"1010";i:1194;s:4:"1194";i:1456;s:4:"1456";i:1528;s:4:"1528";i:1598;s:4:"1598";i:1644;s:4:"1644";i:1828;s:4:"1828";i:1938;s:4:"1938";i:1942;s:4:"1942";i:1990;s:4:"1990";i:2130;s:4:"2130";i:2154;s:4:"2154";i:2250;s:4:"2250";i:2272;s:4:"2272";i:2338;s:4:"2338";i:2714;s:4:"2714";i:2798;s:4:"2798";i:2892;s:4:"2892";i:3018;s:4:"3018";i:3178;s:4:"3178";i:3181;s:4:"3181";i:3182;s:4:"3182";i:43;s:2:"43";i:23;s:2:"23";i:25;s:2:"25";i:26;s:2:"26";i:27;s:2:"27";i:28;s:2:"28";i:2;s:1:"2";i:67;s:2:"67";i:74;s:2:"74";i:70;s:2:"70";i:72;s:2:"72";i:13;s:2:"13";i:14;s:2:"14";i:15;s:2:"15";i:16;s:2:"16";i:17;s:2:"17";i:18;s:2:"18";i:19;s:2:"19";i:20;s:2:"20";i:21;s:2:"21";i:22;s:2:"22";i:52;s:2:"52";i:66;s:2:"66";i:68;s:2:"68";i:36;s:2:"36";i:37;s:2:"37";i:38;s:2:"38";i:39;s:2:"39";i:40;s:2:"40";i:41;s:2:"41";i:42;s:2:"42";i:76;s:2:"76";i:78;s:2:"78";}');
    
    			$subscr=new subscribe_new();
    			$subscr->GetUserSubscr();
    
    			if(!count($subscr->user_subscribes)){
    				$subscr->user2subscr_table = 'utos';
    				$sql="select subscribe.* from subscribe LEFT JOIN enterprises ON enterprises.id=subscribe.enterprise where subscribe.visible='Y' AND (subscribe.enterprise = 0 OR enterprises.visible = 'Y') order by priority desc, week_day,id";
    				$res=@mysql_db_query($DB,$sql);
    				$all_subscribe=array();
    				while ($row=@mysql_fetch_assoc($res)):
    					$subscr->all_subscribes[$row["id"]]=$row;
    
    				endwhile;
    				
    				$q = $subscr->UpdateSubscr($arr_subscribes);
    				#print_r($arr_subscribes);
    				
    				#exit;
    			}
    
    	   }

    ну хрясь чтоле

    brainstorm, 07 Апреля 2014

    Комментарии (2)
  2. ActionScript / Говнокод #15695

    −136

    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
    /**
     *  @private
     *  Calculates the height needed for heightInLines lines using the default
     *  font.
     */
    private function calculateHeightInLines():Number
    {
        var height:Number = getStyle("paddingTop") + getStyle("paddingBottom");
        
        if (_heightInLines == 0)
            return height;
        
        var effectiveHeightInLines:int;
        
        // If both height and width are NaN use 10 lines.  Otherwise if 
        // only height is NaN, use 1.
        if (isNaN(_heightInLines))
            effectiveHeightInLines = isNaN(_widthInChars) ? 10 : 1;   
        else
            effectiveHeightInLines = _heightInLines;
        
        // Position of the baseline of first line in the container.
        value = getStyle("firstBaselineOffset");
        if (value == lineHeight)
            height += lineHeight;
        else if (value is Number)
            height += Number(value);
        else
            height += ascent;
        
        // Distance from baseline to baseline.  Can be +/- number or 
        // or +/- percent (in form "120%") or "undefined".  
        if (effectiveHeightInLines > 1)
        {
            var value:Object = getStyle("lineHeight");     
            var lineHeight:Number =
                RichEditableText.getNumberOrPercentOf(value, getStyle("fontSize"));
            
            // Default is 120%
            if (isNaN(lineHeight))
                lineHeight = getStyle("fontSize") * 1.2;
            
            height += (effectiveHeightInLines - 1) * lineHeight;
        }            
        
        // Add in descent of last line.
        height += descent;              
        
        return height;
    }

    Внимательно следим за жизненным циклом переменной lineHeight.

    wvxvw, 07 Апреля 2014

    Комментарии (17)
  3. PHP / Говнокод #15690

    +155

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    $title = str_replace("1", "", $title);
    	$title = str_replace("2", "", $title);
    	$title = str_replace("3", "", $title);
    	$title = str_replace("4", "", $title);
    	$title = str_replace("5", "", $title);
    	$title = str_replace("6", "", $title);
    	$title = str_replace("7", "", $title);
    	$title = str_replace("8", "", $title);
    	$title = str_replace("9", "", $title);
    	$title = str_replace("0", "", $title);
    	echo $title;

    Убираем цифры из строки!

    mrmany, 06 Апреля 2014

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

    +143

    1. 1
    2. 2
    3. 3
    О... О... О, нет... О... Я чувствую, как "blandermein" жарко облизывает мои потные яйца своим шаловливым язычком... О, да...
    О... А потом он захватывает своим жадно зовущим ротиком мой раскалённый пенис, и начинает телебонить его головку,
    забирая по самые гланды... О... Да, давай ещё... О... Ах...

    Konardillo, 06 Апреля 2014

    Комментарии (0)
  5. PHP / Говнокод #15684

    +142

    1. 1
    ХУЙ!

    Konardillo, 06 Апреля 2014

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

    +57

    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
    #include <string>
    
    std::string SearchPushString(char StartVkPage[])
    {
    	char push[] = {'p','o', 's', 't'};
    	char http[] = {'h','t', 't', 'p'};
    	unsigned int* ipush = (unsigned int*)push;
    	unsigned long j = 0;
    	do
    	{
    		char* p = &StartVkPage[j];
    		unsigned int* nextFourSymbol = (unsigned int*)p;
    		if(nextFourSymbol[0]==ipush[0])
    		{
    			if(*p=='p')
    				ipush = (unsigned int*)http;
    			else
    			{
    				char* postString = new char[650];
    				memset(postString,0,650);
    				short int u = 0;
    				do
    				{
    					postString[u] = p[u];
    				}
    				while(p[++u]!='"'&&u!=650);
    				std::string url(postString);
    				delete [] postString;
    				return url;
    			}
    		}		
    	}
    	while(StartVkPage[j++]);
    	return std::string("error");
    }

    Я все никак не выучу регулярных выражений, ИЧСХ - обхожусь.

    Psionic, 06 Апреля 2014

    Комментарии (43)
  7. PHP / Говнокод #15680

    +140

    1. 1
    Лошади снова здесь.

    Konardillo, 06 Апреля 2014

    Комментарии (3)
  8. PHP / Говнокод #15678

    +141

    1. 1
    "xavij", на хуй несёшься, голубизна.

    Konardillo, 06 Апреля 2014

    Комментарии (0)
  9. PHP / Говнокод #15677

    +142

    1. 1
    2. 2
    Когда быдло осознает, что язык "C" и все его порождения ("C++", "C#" и смежные) - полное говно?
    Я как-то больше на стороне "PHP"; а вот C-подобные языки предназначены для аутичных ублюдков.

    Konardillo, 06 Апреля 2014

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

    +142

    1. 1
    Лошади уже здесь.

    Konardillo, 06 Апреля 2014

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