Черезжопное исправление черезжопных проблем в OpenCart. Убирает обязательность выбора модели и невозможность удаления производителя после того, как его уже внесли.
Для работы требуется установленный и исправный VQMOD. Не будет работать в 99 случаев из ста, как и 2048 таких же модулей, которые я перепробовал и в итоге сел писать свой самостоятельно. В любом случае после установки нужно будет открывать и исправлять что-нибудь ручками, какое-нибудь несоответствие того что ищется и чем заменяется.
model_manufacturer_fix
2014-09-01, Хрень
2014-08-31, Хрень
Гуглобляди, похоронившие плоды трудов разработчиков Firefox и Opera под своим сраным WebKit'ом, выдранным из пидрофона, не смогли во вложенные формы и теперь любые попытки вставить <form> внутрь <form> просто, блядь, не рендерятся. Горите в аду, ёбаные рукожопые мудилы из Google.
2014-08-29, Хрень
------------------------------------------------------------------------
-- Lua developers forgot to add math.round function
------------------------------------------------------------------------
function minetest_hardcorebrix.math_round(val, decimal)
local exp = decimal and 10^decimal or 1
return math.ceil(val * exp - 0.5) / exp
end
2014-08-29, Хрень
------------------------------------------------------------------------
-- Lua developers forgot to add table.search function
------------------------------------------------------------------------
function minetest_hardcorebrix.table_search(table, element)
for key,value in pairs(table) do
if value == element then
return key
end
end
return false
end
2014-08-28, Хрень
2014-08-25, Хрень
javascript push into array while continue to loop it
var a = [1,2,3]
for(var i = 0; i < a.length; i++)
{
if(a[i] == 2)
{
a.push(4)
}
console.log(a[i])
}
console.log(a)
Output:
1
2
3
4
[ 1, 2, 3, 4 ]
2014-08-19, Хрень
for i in {1..10}; do dig +trace site.ru -tANY; done
Генератор для перебора бесконечных ветвящихся неповторяющихся последовательностей (неслучайных чисел с шагом 1).
module.exports = (function(){
var self = {}
self.constructor = function()
{
if(!(this instanceof self.constructor))
{
return new (Function.prototype.bind.apply(self.constructor, [null].concat(Array.prototype.slice.call(arguments))))
}
this.pointer = -1
this.sequence = []
this.exhausted = false
this.roundcount = 0
}
self.debug = function()
{
console.log(JSON.stringify([this.exhausted,this.sequence,this.pointer,this.roundcount]))
}
self.currentRound = function()
{
return this.roundcount
}
self.currentValue = function()
{
return this.sequence[this.pointer]
}
self.nextValue = function(min,max)
{
this.pointer++
if(this.sequence[this.pointer] == null)
{
this.sequence[this.pointer] = { max : max, min : min, val : min }
}
return this.sequence[this.pointer].val
}
self.nextRound = function()
{
if(this.sequence[this.pointer] != null
&& ++this.sequence[this.pointer].val > this.sequence[this.pointer].max)
{
this.sequence.splice(this.pointer,1)
this.pointer--
if(this.pointer == -1)
{
this.exhausted = true
}
else
{
this.nextRound()
}
}
this.pointer = -1
this.roundcount++
return
}
self.constructor.prototype = self
return self.constructor
})()
NotRand = require('./NotRand.js')
var i = 0;
var a = NotRand()
while(!a.exhausted)
{
var b = []
b.push(a.nextValue(1,1))
b.push(a.nextValue(1,4))
if(b[1] == 3)
{
b.push(a.nextValue(1,3))
b.push(a.nextValue(1,3))
}
else
{
b.push(a.nextValue(1,2))
}
a.nextRound()
console.log(b)
}
console.log(a.currentRound())
$ node pereborjs.js [ 1, 1, 1 ] [ 1, 1, 2 ] [ 1, 2, 1 ] [ 1, 2, 2 ] [ 1, 3, 1, 1 ] [ 1, 3, 1, 2 ] [ 1, 3, 1, 3 ] [ 1, 3, 2, 1 ] [ 1, 3, 2, 2 ] [ 1, 3, 2, 3 ] [ 1, 3, 3, 1 ] [ 1, 3, 3, 2 ] [ 1, 3, 3, 3 ] [ 1, 4, 1 ] [ 1, 4, 2 ] 23
2014-08-17, Хрень
module.exports = (function(){
var prototype = {}
var instances_counter = 0
prototype.constructor = function()
{
if(!(this instanceof prototype.constructor))
{
return new (Function.prototype.bind.apply(prototype.constructor, [null].concat(Array.prototype.slice.call(arguments))))
}
this.id = ++instances_counter
}
prototype.render = function()
{
console.log(this.id)
}
prototype.constructor.prototype = prototype
return prototype.constructor
})()
http://stackoverflow.com/questions/2856059/passing-an-array-as-a-function-parameter-in-javascript
http://stackoverflow.com/questions/3914557/passing-arguments-forward-to-another-javascript-function
2014-08-16, Хрень
username
password
credentials
description