- 1
alias Foo(V : V[]) = V;
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+127
alias Foo(V : V[]) = V;
dlang, угадайте, что этот код делает.
+127
# Path for asterisk
# Default Value: /usr/sbin/asterisk
WHICH_asterisk=/usr/sbin/asterisk
# Path for rm
# Default Value: /bin/rm
WHICH_rm=/bin/rm
# Path for tail
# Default Value: /usr/bin/tail
WHICH_tail=/usr/bin/tail
Конфигурационный файл amportal.conf в freepbx :)
+127
<div>
<label for="background-color">Choose a calor for background : </label>
<input id="background-color" type="color" value="#ff0000" onchange="javascript:document.getElementById('chosen-color').value = document.getElementById('background-color').value;"/>
</div>
<div>
<label for="chosen-color">You have chosen : </label>
<input id="chosen-color" type="text" readonly value="#ff0000"/>
</div>
Кроме того что тут inline JS event, да к автор еще умудряется использовать document.getElementById('choosen-value').value вместо this.value .
+127
['10','10','10','10'].map(parseInt)
Результат:
[10, NaN, 2, 3]
+127
https://www.marshut.net/knqkut/dijkstra-s-methodology-for-secure-systems-development.html
Учитесь троллить! (Я подписался на рассылку запостить пару багов, а тут...)
+127
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
+127
<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....
+127
// 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;
}
Отличное изменение.
+127
<a href="#" onclick="window.open('/img/size/size_charts.jpg', '', config='height=457,width=924')"
<a href="/img/size/size_charts.jpg" title = 'Размерная таблица женской одежды (в новом окне)' >женская одежда</a>
И ведь работает...
+127
<local name="jhgjkgdfghd" />
<loadfile property="jhgjkgdfgh" srcfile="@{filepath}" failonerror="false">
...
</loadfile>
Я очень долго втыкал, почему один из овер 9000 Ant-скриптов валится....