- 1
- 2
- 3
var _0xdb2a=["","\x6A\x6F\x69\x6E","\x72\x65\x76\x65\x72\x73\x65","\x73\x70\x6C\x69\x74"];
function getCoo2(_0x733fx2,_0x733fx3){
return _0x733fx2[_0xdb2a[3]](_0xdb2a[0])[_0xdb2a[2]]()[_0xdb2a[1]](_0xdb2a[0])+_0x733fx3}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+142
var _0xdb2a=["","\x6A\x6F\x69\x6E","\x72\x65\x76\x65\x72\x73\x65","\x73\x70\x6C\x69\x74"];
function getCoo2(_0x733fx2,_0x733fx3){
return _0x733fx2[_0xdb2a[3]](_0xdb2a[0])[_0xdb2a[2]]()[_0xdb2a[1]](_0xdb2a[0])+_0x733fx3}
Чтобы жизнь маслом ботоводам не казалась. Вот вам загадочка - что здесь происходит?
+144
var me = this;
if (me.profile.carveoutSettings) {
me.profile.carveoutSettings.truncationMethod = fields.truncationMethod;
me.profile.carveoutSettings.truncationMode = fields.truncationMode;
me.profile.carveoutSettings.applyTruncation = fields.applyTruncation;
me.profile.carveoutSettings.truncationValue = fields.truncationValue;
me.profile.carveoutSettings.applyExclusion = fields.applyExclusion;
me.profile.carveoutSettings.serviceTypes = me.getSelected(me.getServiceTypeSelector().getStore(), 'ServiceSubCategoryID');
me.profile.carveoutSettings.placeOfServices = me.getSelected(me.getPlaceOfServiceSelector().getStore(), 'code');
me.profile.carveoutSettings.chronicConditions = me.getSelected(me.getChronicConditionSelector().getStore(), 'column');
} else {
this.profile.carveoutSettings = {
truncationMethod: fields.truncationMethod,
truncationMode: fields.truncationMode,
applyTruncation: fields.applyTruncation,
truncationValue: fields.truncationValue,
applyExclusion: fields.applyExclusion,
serviceTypes: me.getSelected(me.getServiceTypeSelector().getStore(), 'ServiceSubCategoryID'),
placeOfServices: me.getSelected(me.getPlaceOfServiceSelector().getStore(), 'code'),
chronicConditions: me.getSelected(me.getChronicConditionSelector().getStore(), 'column')
}
}
Суслика видишь? а он есть ...
+144
var s = 0;
$('#slider .slider_item').each(function(){
s++;
});
if (s > 1) {
// ...
Пример с прода для определения числа элементов в карусели
+142
orders_list_app.constant('User', {
auth : ('False' == 'True') ? true : false,
contractor : ('' == 'True') ? true : false,
user_id : ('False' == 'True') ? None : false
});
// goes in another place
angular.forEach(rootCategory.categories, function(category_2){
angular.forEach(category_2.service_orders, function(service_2){
rootCategory.service_orders.push(service_2);
angular.forEach(category_2.categories, function(category_3){
angular.forEach(category_3.service_orders, function(service_3){
rootCategory.service_orders.push(service_3);
});
});
});
});
rootCategory.service_orders.push({name:"Другие услуги" ,text: "", title: "Другие услуги"});
});
На одном из отечественном сайте в продакшыне..
+141
Кто нибудь юзал для построения веб приложений wakanda ? Если да то как оно?
+143
"task_types": [
{
"id": 1,
"name": "Q_TASKS_CLASS_FOLLOW_UP",
"code": "FOLLOW_UP"
},
{
"id": 1,
"name": "Звонок",
"code": "CALL"
},
{
"id": 2,
"name": "Встреча",
"code": "MEETING"
},
{
"id": 3,
"name": "Письмо",
"code": "LETTER"
},
{
"id": "38234",
"name": "Звонок",
"code": ""
},
{
"id": "38246",
"name": "переписка",
"code": ""
},
{
"id": "53122",
"name": "test",
"code": ""
}
]
Кусок ответа от API Amocrm
+143
/**
* Generates a random number
*/
function doRand()
{
var num;
now=new Date();
num=(now.getSeconds());
num=num+1;
return num;
};
Пожалуй, лучшая функция генерации случайного числа
+141
<div style="display:none;">
<script type="text/javascript">
(function(w, c) {................................})(window, "yandex_metrika_callbacks");
</script>
</div>
А ты скрываешь свои скрипты?
+142
Код не мой, но очень неоптимизированный. И так ещё десяток таких блоков. С сайта: http://ninjahonor.com/.
$(document).ready(function(){
$(".coffin-box1 a.name1").click(function(){
$(".vid1").addClass('active')
$(".vid2 , .vid3 , .vid4 , .vid5 , .vid6 , .vid7 , .vid8 , .vid9 , .vid10 , .vid11 , .vid12 , .vid13 , .vid14 , .vid15 , .vid16 , .vid17 , .vid18 , .vid19 , .vid20 , .vid21 , .vid22 , .vid23 , .vid24 , .vid25 , .vid0 ").removeClass('active')
});
});
$(document).ready(function(){
$(".coffin-box1 a.name2").click(function(){
$(".vid2").addClass('active')
$(".vid1 , .vid3 , .vid4 , .vid5 , .vid6 , .vid7 , .vid8 , .vid9 , .vid10 , .vid11 , .vid12 , .vid13 , .vid14 , .vid15 , .vid16 , .vid17 , .vid18 , .vid19 , .vid20 , .vid21 , .vid22 , .vid23 , .vid24 , .vid25 , .vid0 ").removeClass('active')
});
});
$(document).ready(function(){
$(".coffin-box2 a.name1").click(function(){
$(".vid6").addClass('active')
$(".vid2 , .vid3 , .vid4 , .vid5 , .vid1 , .vid7 , .vid8 , .vid9 , .vid10 , .vid11 , .vid12 , .vid13 , .vid14 , .vid15 , .vid16 , .vid17 , .vid18 , .vid19 , .vid20 , .vid21 , .vid22 , .vid23 , .vid24 , .vid25 , .vid0 ").removeClass('active')
});
});
+141
api.outboxStatus = function(params){
angular.forEach($rootScope.outbox, function(outbox, i){
if( outbox._id == params.outbox._id )
$rootScope.$apply(function(){
$rootScope.outbox[i] = params.outbox;
});
});
}
// -----------
шаблон
<tr ng-repeat="item in fOutbox = (outbox | filter:filterOutbox())">