-
+158
- 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
$(document).ready(function() {
$('.tab1').click(function () {
$('.tab-t1').show();
$('.tab-t2').hide();
$('.tab-t3').hide();
$('.tab1 i').addClass('active');
$('.tab2 i').removeClass('active');
$('.tab2 i').removeClass('active');
});
$('.tab2').click(function () {
$('.tab-t1').hide();
$('.tab-t2').show();
$('.tab-t3').hide();
$('.tab1 i').removeClass('active');
$('.tab2 i').addClass('active');
$('.tab3 i').removeClass('active');
});
$('.tab3').click(function () {
$('.tab-t1').hide();
$('.tab-t2').hide();
$('.tab-t3').show();
$('.tab1 i').removeClass('active');
$('.tab2 i').removeClass('active');
$('.tab3 i').addClass('active');
});
});
Из тестового задания
IRIDON,
02 Октября 2014
-
+155
- 1
- 2
- 3
- 4
$logics = $elementORM->getLogics();
if (count($logics > 0)) {
foreach($logics as $kLogic => $logic) { // logic
foreach($logic["conditions"] as $kCondition => $condition) { // condition
limitium,
02 Октября 2014
-
+161
- 1
- 2
- 3
- 4
try {
Transform_Excel::$zohoFilterEbanyKostyl2 = true;
$importService->import($id);
Helpers_Response::json([
limitium,
02 Октября 2014
-
−94
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
private function getYouTubeVideoIdFromURL (url:String):String {
if (URLUtil.isHttpsURL(url)||URLUtil.isHttpURL(url)) {
var startIndex:int = url.indexOf("v=")+2;
var endIndex:int = url.indexOf("&");
if (endIndex>startIndex) {
url = url.slice(startIndex, endIndex);
}
else {
url = url.slice(startIndex);
}
}
return url;
}
Целый отдел над этой функцией работал.
wvxvw,
01 Октября 2014
-
+160
- 1
- 2
- 3
- 4
- 5
- 6
static public function dateDb2Human($dbDate) {
$date = strptime(explode('.', $dbDate)[0], '%Y-%m-%d %H:%M:%S');
return $date['tm_mday'].'.'.$date['tm_mon'].'.'.(1900+$date['tm_year']).' ('.($date['tm_hour'] < 10 ? '0' : '').$date['tm_hour'].':'.($date['tm_min'] < 10 ? '0' : '').$date['tm_min'].')';
} //static public function dateDb2Human($dbDate)
Это функция для преобразования даты из формата ГГГГ-ММ-ДД ЧЧ:ММ:CC в ДД.ММ.ГГГГ (ЧЧ:ММ)
alxkolm,
01 Октября 2014
-
+152
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
function init() {
if (!document.body) return;
var body = document.body;
var html = document.documentElement;
// ...
}
// ...
https://gist.github.com/galambalazs/6477177/
Плавный скролл, я вот только не пойму, почему "if (!document.body) return;"?
Типа <body> тэга может не существовать?!
volter9,
01 Октября 2014
-
+78
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
protected String getFeedText() {
StringBuffer answer = new StringBuffer();
if (getFeedName() != null) {
answer.append("Feed Named: " + getFeedName() + " - ");
}
return answer.toString();
}
1. Похоже на праведное намерение использовать StringBuilder :)
2. Положение звезд и фаза луны помешали воспользоваться хотя бы StringBuffer, вычисление все равно сделано на простых String
tort,
01 Октября 2014
-
−107
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
...
%install
%{__rm} -rf %{buildroot}
mkdir -m 755 -p %{buildroot}%{_datadir}/common-lisp/source/%{name}
for s in $(find -regex '.+\.\(lisp\|asd\|org\)$'); do
install -D -m 644 $s %{buildroot}%{_datadir}/common-lisp/source/%{name}
done;
mkdir -m 755 -p %{buildroot}/etc/common-lisp/source-registry.conf.d
for las_conf in $(ls %{buildroot}/etc/common-lisp/source-registry.conf.d | tail -n 1); do
for last in $(echo "${last_conf}" | grep -oP '^[0-9]+'); do
for cl_prefix in $(echo "${last}+1" | bc); do
echo '(:include "/usr/share/common-lisp/source/%{name}/")' > \
"%{buildroot}/etc/common-lisp/source-registry.conf.d/${cl_prefix}-%{name}.conf"
install -m 644 ${cl_prefix}-%{name}.conf %{buildroot}/etc/common-lisp/source-registry.conf.d
done;
done;
done;
%files
%defattr(-,root,root,-)
%{_datadir}/common-lisp/source/%{name}/*
...
И ведь что показательно, работает!
Вот просто не предать словами, как я это ненавижу. Менеджер пакетов завдующий установкой ПО написан на Питоне, но нельзя просто так взять и на Питоне же написать установочный скрипт. Надо горбатится над каким-то недоязыком с феноменально шизофреничными макросами полным отсутствием каких-либо высокоуровневых инструментов, типа структур и интерфейсов...
wvxvw,
30 Сентября 2014
-
+162
- 1
$cityName_UTF8 = iconv ( 'UTF-8' , 'Windows-1251', $cityName_Win1251 );
ShopCMS
www,
30 Сентября 2014
-
+140
- 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
private void SetProgressIndicator(int step) {
switch (step) {
case 1:
liStepOne.Attributes["class"] = "current";
liStepTwo.Attributes["class"] = "";
liStepThree.Attributes["class"] = "";
liStepFour.Attributes["class"] = "";
liStepFive.Attributes["class"] = "";
break;
case 2:
liStepTwo.Attributes["class"] = "current";
liStepOne.Attributes["class"] = "complete";
liStepThree.Attributes["class"] = "";
liStepFour.Attributes["class"] = "";
liStepFive.Attributes["class"] = "";
break;
case 3:
liStepThree.Attributes["class"] = "current";
liStepOne.Attributes["class"] = "complete";
liStepTwo.Attributes["class"] = "complete";
liStepFour.Attributes["class"] = "";
liStepFive.Attributes["class"] = "";
break;
case 4:
liStepFour.Attributes["class"] = "current";
liStepOne.Attributes["class"] = "complete";
liStepTwo.Attributes["class"] = "complete";
liStepThree.Attributes["class"] = "complete";
liStepFive.Attributes["class"] = "";
break;
case 5:
liStepFive.Attributes["class"] = "current";
liStepOne.Attributes["class"] = "complete";
liStepTwo.Attributes["class"] = "complete";
liStepThree.Attributes["class"] = "complete";
liStepFour.Attributes["class"] = "complete";
break;
}
}
http://s.lurkmore.to/images/8/85/Indian.jpg
fafik91,
30 Сентября 2014