-
+111
- 1
- 2
- 3
- 4
- 5
- 6
- 7
private IEnumerable<Tuple<IList<string>, IList<string>>> GetFieldInfo(IField Field)
{
foreach (var val in Field.Fields["info"].Values)
{
yield return new Tuple<IList<string>, IList<string>>(val["Id"].Values, val["ip"].Values);
}
}
beardeddev,
18 Апреля 2012
-
+155
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
var d = new Date();
dom = d.getDate();
month = d.getMonth();
year = d.getYear();
if (year < 2000) year = year - 100;
else year = year - 2000;
if (year == 12 && month == 3)
days = 26 - dom;
else
days = 0;
if (days < 0) days = 0;
if (days < 10) days = '0' + days.toString();
var base = 'http://ubuntu.ru/media/countdown/1204_1/';
document.write('<a href="http://ubuntu.ru/"><img id="countdownimage" src="'+base+days+'.png" width="180" height="150" border="0" alt="Ubuntu 12.04 LTS" title="Ubuntu 12.04 LTS - Уже скоро!"></a>');
//document.write('<a href="http://ubuntu.ru/get"><img id="countdownimage" src="'+base+'here.png" width="180" height="150" border="0" alt="Ubuntu 12.04 LTS" title="Ubuntu 12.04 LTS - Уже здесь!"></a>');
http://ubuntu.ru/media/countdown/display.js
хуита,
18 Апреля 2012
-
+110
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
public Operation.OperationStatus OperState
{
get { return fOperState; }
set
{
fOperState = value;
// Надписи кнопок смены статуса
TOperation.TOperationState
OperationState = TOperation.OperationState(value);
btnOldState.Text = OperationState.OldName;
btnNewState.Text = OperationState.NewName;
// Видимость кнопок смены статуса
switch (value)
{
case Operation.OperationStatus.New :
btnOldState.Visible = OperationState.OldName.Length > 0 && !ReadOnlyMode;
btnNewState.Visible = OperationState.NewName.Length > 0 && OwnerOper.AccessInput && !ReadOnlyMode;
break;
case Operation.OperationStatus.DataInput :
btnOldState.Visible = OperationState.OldName.Length > 0 && OwnerOper.AccessInput && !ReadOnlyMode;
btnNewState.Visible = OperationState.NewName.Length > 0 && OwnerOper.AccessCheck && !ReadOnlyMode;
break;
case Operation.OperationStatus.DataCheck :
btnOldState.Visible = OperationState.OldName.Length > 0 && OwnerOper.AccessCheck && !ReadOnlyMode;
btnNewState.Visible = OperationState.NewName.Length > 0 && OwnerOper.AccessConfirm && !ReadOnlyMode;
break;
case Operation.OperationStatus.Closed :
btnOldState.Visible = OperationState.OldName.Length > 0 && OwnerOper.AccessConfirm && !ReadOnlyMode;
btnNewState.Visible = OperationState.NewName.Length > 0 && !ReadOnlyMode;
break;
}
}
}
public static TOperationState OperationState(Operation.OperationStatus pState)
{
TOperationState Result = new TOperationState();
switch (pState)
{
case Operation.OperationStatus.New :
Result.OldName = "";
Result.NewName = "Данные введены";
break;
case Operation.OperationStatus.DataInput :
Result.OldName = "Отменить \"Данные введены\"";
Result.NewName = "Данные проверены";
break;
case Operation.OperationStatus.DataCheck :
Result.OldName = "Отменить \"Данные проверены\"";
Result.NewName = "Завершена";
break;
case Operation.OperationStatus.Closed :
Result.OldName = "Отменить \"Завершена\"";
Result.NewName = "";
break;
}
return Result;
}
Не прям штобы очень, но шоколад есть...
gcoder,
18 Апреля 2012
-
+113
- 1
- 2
- 3
- 4
- 5
StringBuilder script = new StringBuilder();
script.Append("<script type=text/javascript>alert('Данные не сохранены');</");
script.Append("script>");
Page.ClientScript.RegisterStartupScript(this.GetType(), "catchScript", script.ToString());
Поддерживаю проект от других разработчиков.
Если честно казалось бы придраться не к чему, все будет работать - но почему нужно было делать такой разрыв строки и посреди тега? Это меня в ступор вгоняет. Совпадений по проекту 83 таких.
sergey_sh,
18 Апреля 2012
-
+158
- 1
if($_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest") die("Вот тебе и лол...");
неибическая защита от обычных запросов через урл в адресной строке)
nur,
17 Апреля 2012
-
+146
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
<div class="whitestar<?=preg_replace ("/^[^0-9\s]*$/","",$array[0]->OriginalStarName);?>" style="z-index:4;position:absolute;top:187px;left:196px;"></div>
<!--<div style="z-index:4;font-family:'Arial';font-weight:normal;font-size:9px;color:#000000;position:absolute;top:185px;left:250px;width:150px;"><input type=checkbox value='Сравнить' chechked><a href="#" style="color:#000000;border:0px;font-size:10px;text-decoration:underline;">Сравнить</a></div>-->
</div>
<div class="pr_cover">
<div style="z-index:26;font-family:'Arial';font-weight:bold;text-decoration:none;text-transform:uppercase;font-size:12px;color:#FFFFFF;position:absolute;top:18px;left:24px;width:100px;"><?=$array[0]->OriginalMealName;?></div>
<div style="z-index:26;font-family:'Arial';font-weight:normal;text-decoration:none;text-transform:none;font-size:12px;color:#FFFFFF;position:absolute;top:39px;left:24px;width:95px;">Цена указана за одного человека в номере <?=$array[0]->RoomName;?><br/> за <?=$array[0]->Nights;?> ночей<br/><a href=# style="font-family:'Arial';font-weight:normal;text-decoration:underline;text-transform:none;font-size:12px;color:#FFFFFF;border: 0px none;">На карте</a><div class="whitearrow" style="z-index:26;position:relative;top:-11px;left:55px;"></div></div>
<?//get hotel url for colorbox popup
//var_dump($array[0]);die();
$urlParams = "?HotelId={$array[0]->HotelId}"."&HotelName=".urlencode($array[0]->HotelName)."&CityFromName=".urlencode($array[0]->CityFromName)."&CountryName=".urlencode($array[0]->CountryName)."&ResortName=".urlencode($array[0]->ResortName)."&CheckInDate=".urlencode($array[0]->CheckInDate)."&Nights=".urlencode($array[0]->Nights)."&MealName=".urlencode($array[0]->MealName)."&Price=".urlencode($array[0]->Price)."&StarId=".urlencode($array[0]->StarId).'&RoomName=' . urlencode($array[0]->RoomName) . '&HotelDescriptionUrl=' . urlencode($array[0]->HotelDescriptionUrl);
$open_hotel_url = "http://_удалено_/stranica_informacii_ob_otele/" . $urlParams;
$open_contact_url = "http://_удалено_/oformlenie_zakaza_iframe/" . $urlParams;
$open_hotel_title=strtoupper($array[0]->CountryName).', '.$array[0]->ResortName;?>
<div style="z-index:26;position:absolute;top:182px;left:24px;width:100px;"><a href='<?=$open_hotel_url;?>' title='<?=$open_hotel_title?>' class='vitrina_open_hotel_popup' style="font-family:'Arial';font-weight:normal;text-decoration:underline;text-transform:none;font-size:12px;color:#FFFFFF;border: 0px none;">Подробнее</a></div>
<div class="whitearrow" style="z-index:26;position:absolute;top:185px;left:96px;"></div>
<div style="z-index:26;font-family:'Arial';font-weight:bold;text-decoration:none;text-transform:none;font-size:10px;color:#FFFFFF;position:absolute;top:18px;left:150px;width:160px;"><b style="text-transform:uppercase;">Стоимость включает:</b>
Это кусочек кода из проекта, в который меня пригласили "кое-что дописать".
chlap,
17 Апреля 2012
-
+171
- 1
- 2
- 3
- 4
<?php
class Modules_Admin_Parser_Driver_SiteCom implements Modules_Admin_Parser_Interface {
}
?>
Старый добрый неймспейс
Zho,
17 Апреля 2012
-
+139
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
#include <iostream>
#include <conio.h>
#define true false // Wish you happy debug!
int main(int argc, char* argv[])
{
std::cout << (((1+1)==2) ? true : false);
getch();
return 0;
}
Wish you happy debug!
ipchelnikov,
17 Апреля 2012
-
+72
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
String displayName = report.getDisplayName();
displayName.replace(
this.periodStartDateParamName,
this.getPeriodStartDateStr() );
displayName.replace(
this.getPeriodEndDateParamName(),
this.getPeriodEndDateStr() );
report.setDisplayName( displayName );
Имитация бурной деятельности по замене подстрок.
victor-homyakov,
17 Апреля 2012
-
+113
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
for (int i = 0; i < retries; i++)
{
if ((GetProductVersioningProvider() as IQueueProductVersion).IsVersionCommitted(version))
{
return true;
}
else
{
Thread.Sleep(checkDelay);
}
}
Классика жанра же.
abatishchev,
17 Апреля 2012