Куча говна / Говнокод #16292 Ссылка на оригинал

0

  1. 1
http://rus-linux.net/MyLDP/BOOKS/drivers/linux-device-drivers-16.html

Не говнокод, но улыбнуло от методов преподавания красноглазикам.
"И Пагс быстро написал следующий файл proc_window.c ". БЫСТРО драйвер устройства почти в 100 строк накатал.
Бедная Светка, ну и на задрота попала:(

Pythoner Pythoner, (Updated )

Комментарии (43, +43)

Куча говна / Говнокод #16286 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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 (SceneTextureIndex == 0)    return float4(CalcSceneColor(UV), 0);
    else if (SceneTextureIndex == 1)    return ScreenSpaceData.GBuffer.Depth;
    else if (SceneTextureIndex == 2)    return float4(ScreenSpaceData.GBuffer.DiffuseColor, 0);
    else if (SceneTextureIndex == 3)    return float4(ScreenSpaceData.GBuffer.SpecularColor, 0);
    else if (SceneTextureIndex == 4)    return float4(ScreenSpaceData.GBuffer.SubsurfaceColor, 0);
    else if (SceneTextureIndex == 5)    return float4(ScreenSpaceData.GBuffer.BaseColor, 0);
    else if (SceneTextureIndex == 6)    return ScreenSpaceData.GBuffer.Specular;
    else if (SceneTextureIndex == 7)    return ScreenSpaceData.GBuffer.Metallic;
    else if (SceneTextureIndex == 8)    return float4(ScreenSpaceData.GBuffer.WorldNormal, 0);
    else if (SceneTextureIndex == 9)    return 1; // todo
    else if (SceneTextureIndex == 10)    return ScreenSpaceData.GBuffer.Opacity;
    else if (SceneTextureIndex == 11)    return ScreenSpaceData.GBuffer.Roughness;
    else if (SceneTextureIndex == 12)    return ScreenSpaceData.GBuffer.GBufferAO;
    else if (SceneTextureIndex == 13)    return ScreenSpaceData.GBuffer.CustomDepth;
    else if (SceneTextureIndex == 14)    return Texture2DSample(PostprocessInput0, PostprocessInput0Sampler, UV);
    else if (SceneTextureIndex == 15)    return Texture2DSample(PostprocessInput1, PostprocessInput1Sampler, UV);
    else if (SceneTextureIndex == 16)    return Texture2DSample(PostprocessInput2, PostprocessInput2Sampler, UV);
    else if (SceneTextureIndex == 17)    return Texture2DSample(PostprocessInput3, PostprocessInput3Sampler, UV);
    else if (SceneTextureIndex == 18)    return Texture2DSample(PostprocessInput4, PostprocessInput4Sampler, UV);
    else if (SceneTextureIndex == 19)    return Texture2DSample(PostprocessInput5, PostprocessInput5Sampler, UV);
    else if (SceneTextureIndex == 20)    return Texture2DSample(PostprocessInput6, PostprocessInput6Sampler, UV);
    else if (SceneTextureIndex == 21)    return ScreenSpaceData.GBuffer.DecalMask;
    else if (SceneTextureIndex == 22)    return float4(GetLightingModelColor(ScreenSpaceData.GBuffer), 1);
    else if (SceneTextureIndex == 23)    return ScreenSpaceData.AmbientOcclusion;

LispGovno LispGovno, (Updated )

Комментарии (11, +11)

Куча говна / Говнокод #16285 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
if chkyandex.Checked then
	
    reg.Expression:='([a-zA-Z0-9]+[\.]{0,}[\_]{0,}[-]{0,})+@([ya]{2}[ndex]{0,4}|[xaker]{5})\.[a-zA-Z]{2,3}\s{0,4}[:;]\s{0,4}[a-zA-Z0-9\.\_]+'; 
    else
    reg.Expression:='([a-zA-Z0-9]+[\.]{0,}[\_]{0,}[-]{0,})+@([mail]{4}|[inbox]{5}|bk{2}|list{4})\.([a-zA-Z]{2,3}\s{0,4}[:;]\s{0,4}[_\-a-zA-Z\d\.\_]+)';

RegEXP головного мозга.
Работает.

brutushafens brutushafens, (Updated )

Комментарии (23, +23)

Куча говна / Говнокод #16280 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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
boolean loadPPOGroupCompleted(string customerRef, string competence, string marketArea) {
    int i = 0;
    table sceData = getPPOPODGroupSCEs(customerRef, competence, marketArea);
    table dceData = getPPOPODGroupDCEs(customerRef, competence, marketArea);
    table sbilData = getPPOPODGroupSbil(customerRef, competence, marketArea);
    while (i < tableRowCount(sceData)) {
        EventRec sce = convertStoredSCRtoEventRec(false, sceData, i, "", competence);
        if ((string)tableGet(sceData, i, "ACTION_TYPE") == ACTION_REP) {
            udrRoute(sce, "toSE_Agg_rer");
            isReplaceAction = true;
        } else {
            udrRoute(sce, "toSE_Agg_evt");
        }
        i = i+ 1;
    }
    i = 0;
    while (i < tableRowCount(dceData)) {
        EventRec dce = convertStoredDCRtoEventRec(false, dceData, i, "", competence);
        if ((string)tableGet(dceData, i, "ACTION_TYPE") == ACTION_REP) {
            udrRoute(dce, "toSE_Agg_rer");
            isReplaceAction = true;
        } else {
            udrRoute(dce, "toSE_Agg_evt");
        }
        i = i+ 1;
    }
    i = 0;
    while (i < tableRowCount(sbilData)) {
        EventRec sbilEvent = convertStoredSbiltoEventRec(sbilData, i, PPO_ZONALE, competence);
        if ((string)tableGet(sbilData, i, "ACTION_TYPE") == ACTION_REP) {
            udrRoute(sbilEvent, "toSE_Agg_rer");
            isReplaceAction = true;
        } else {
            udrRoute(sbilEvent, "toSE_Agg_evt");
        }
        i = i + 1;
    }
    return true;
}

boolean loadGroupCompleted(string customerRef, string competence, date minStartDate) {
    table sceData = getGroupSCEs(customerRef, competence);
    table dceData = getGroupDCEs(customerRef, competence);
    int i = 0;
    string extPODCode, hour_date, hour_value, eventDTM, hourlyConsumption, totalF0GroupConsumption, treatmentType, consumptionType, actionType, edmID;       
    while (i < tableRowCount(sceData)) {
        EventRec sce = convertStoredSCRtoEventRec(true, sceData, i, "", competence);
        if ((string)tableGet(sceData, i, "ACTION_TYPE") == ACTION_REP) {
            udrRoute(sce, "toSE_Agg_rer");
            isReplaceAction = true;
        } else {
            udrRoute(sce, "toSE_Agg_evt");
        }
        i = i + 1;
    }
    i = 0;
    while (i < tableRowCount(dceData)) {
        EventRec dce = convertStoredDCRtoEventRec(true, dceData, i, "", competence);
        if ((string)tableGet(dceData, i, "ACTION_TYPE") == ACTION_REP) {
            udrRoute(dce, "toSE_Agg_rer");
            isReplaceAction = true;
        } else {
            udrRoute(dce, "toSE_Agg_evt");
        }
        i = i + 1;
    }
    if (isGroupHasPPO(customerRef, minStartDate)) {
        table sbilData = getPPOGroupSbil(customerRef, competence);   
        i = 0;
        while (i < tableRowCount(sbilData)) {
            EventRec sbilEvent = convertStoredSbiltoEventRec(sbilData, i, PPO_ZONALE, competence);
            if ((string)tableGet(sbilData, i, "ACTION_TYPE") == ACTION_REP) {
                udrRoute(sbilEvent, "toSE_Agg_rer");
                isReplaceAction = true;
            } else {
                udrRoute(sbilEvent, "toSE_Agg_evt");
            }
            i = i + 1;
        }   
    }
    return true;
}

ctrl+c, ctrl+v

n924 n924, (Updated )

Комментарии (17, +17)

Куча говна / Говнокод #16243 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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
  99. 99
  100. 100
<div class="video row">

<div class="col-md-4"></div>
<div class="col-md-8" class="gray-bg"></div>
<div class="container an">
<div class="row">
<div class="col-md-4" style="background-color:white"></div>
<div class="col-md-8 gray-bg"></div>
</div>
</div>
</div>
<div class="conn">
<div class="container">
<div class="row video-item">
<div class="col-md-4"></div>
<div class="col-md-8">
	<div class="col-md-4"><img src="img/video.jpg"></div>
	<div class="col-md-8"></div>
</div>
</div>
<div class="row video-item">
<div class="col-md-4"></div>
<div class="col-md-8">
<div class="col-md-4"><img src="img/video.jpg"></div>
	<div class="col-md-8"></div>
</div>
</div>
<div class="row video-item">
<div class="col-md-4"></div>
<div class="col-md-8">
<div class="col-md-4"><img src="img/video.jpg"></div>
	<div class="col-md-8"></div>
</div>
</div>	
</div>	
</div>	
И стили:

.video div.col-md-4{
	left:0;
}
.video div.col-md-8{
	right:0;
	background-color:#f2f2f3;
}
.conn {
top:65px;
z-index:1;
width:100%;
position:absolute;
}
.menu {
position:absolute;
	z-index:1;
}
.an {
position:static !important; 
height:100000px !important; 
overflow:hidden !important;
}
.an  div {

	height:100%;
	
}
.video>div{

position:fixed;
height:100%;
min-height:100%;
max-height:100%;
}
.video {
position: fixed;
min-height: 100%;
height: auto;
width: 100%;
top: 0;
}
.video-item >div.col-md-8 > div.col-md-8 {
	border:1px solid #e0dfdd;
	border-right:0;
}
.video-item >div.col-md-8 > div.col-md-4 {
	height:150px;
	width:150px;
	padding:0;
	border:1px solid #e0dfdd;
}
.video-item >div.col-md-8 {
	padding:0;
	
}
.video-item div,
.video-item {
height:150px;
}
.video .row .col-md-8 {
	background-color:#F2F2F3;
}

Это пздц. дизайнер, из-за него пришлость так говнокодить, ебанная ширина на 100000....

WeGo WeGo, (Updated )

Комментарии (14, +14)

Куча говна / Говнокод #16211 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
// Step 2
 	inline CreateCharacterDialogStep2(playerid, dialogid, response, listitem, string:inputtext[]) {
 		#pragma unused dialogid, listitem, inputtext
 		if(!response) return CreateCharacter(playerid);
 		if(strlen(inputtext) < MIN_PLAYER_CHARACTER_NAME || strlen(inputtext) > MAX_PLAYER_NAME) return CreateCharacter(playerid);

-		if(!IsRolePlayNickname(inputtext)) return CreateCharacter(playerid);
-		SetPVarString(playerid, "name", inputtext);
+		if(!IsRolePlayNickname(str_replace(" ", "_", inputtext))) return CreateCharacter(playerid);
+		SetPVarString(playerid, "name", str_replace(" ", "_", inputtext));
 
 		format(title, sizeof(title), "Character creating - Step 3: Sex");
 		format(content, sizeof(content), "\
 			Skip\r\n\%s\r\n\%s\
 		", Group_GetName(gMale), Group_GetName(gFemale));
 		Dialog_ShowCallback(playerid, using inline CreateCharacterDialogStep3, DIALOG_STYLE_LIST, title, content, "Next", "Back");
 		return false;
 	}

Отличное изменение.

Jonathan_Rosewood Jonathan_Rosewood, (Updated )

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

Куча говна / Говнокод #16178 Ссылка на оригинал

0

  1. 1
http://www.linkedin.com/reg/webmail-invite-v2?goback=%2Enpv_107866884_*1_*1_name_3B*5x_*1_*1_*1_193888328*4I417532095*4190_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_eml*5comm*4invm*5b*5profile*5newinvite_*1%2Efiie_*1_gmail_*1_*1_*1_*1_*1_*1&origin=gmail&flow=1qbwqgl-u8y0iy

красивый урл от linkedin

orion orion, (Updated )

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

Куча говна / Говнокод #16158 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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
// ------------------------------
// config on all machines
akka {
  actor {
   provider = akka.remote.RemoteActorRefProvider
   deployment {
     /greeter {
       remote = akka.tcp://MySystem@machine1:2552
     }
   }
 }
}
 
// ------------------------------
// define the greeting actor and the greeting message
case class Greeting(who: String) extends Serializable
 
class GreetingActor extends Actor with ActorLogging {
  def receive = {
    case Greeting(who) ⇒ log.info("Hello " + who)
 }
}
 
// ------------------------------
// on machine 1: empty system, target for deployment from machine 2
val system = ActorSystem("MySystem")
 
// ------------------------------
// on machine 2: Remote Deployment - deploying on machine1
val system = ActorSystem("MySystem")
val greeter = system.actorOf(Props[GreetingActor], name = "greeter")
 
// ------------------------------
// on machine 3: Remote Lookup (logical home of “greeter” is machine2, remote deployment is transparent)
val system = ActorSystem("MySystem")
val greeter = system.actorSelection("akka.tcp://MySystem@machine2:2552/user/greeter")
greeter ! Greeting("Sonny Rollins")

Где найти такую же няшку под кресты?

laMer007 laMer007, (Updated )

Комментарии (11, +11)