- 1
https://www.marshut.net/knqkut/dijkstra-s-methodology-for-secure-systems-development.html
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+127
https://www.marshut.net/knqkut/dijkstra-s-methodology-for-secure-systems-development.html
Учитесь троллить! (Я подписался на рассылку запостить пару багов, а тут...)
+128
<a href="#" id="foo" onclick="this.nextSibling.style.display=''; return!1;">Click here for view</a><p style="display: none;">
<noscript>
</p>
<style type="text/css"> a#foo { display:none; } </style>
<p>
</noscript>
/*... some info ...*/
</p>
Баян, не? Вот. Наговнокодилось. captcha=5555
+125
(closer-mop:defclass virtual-metaclass (closer-mop:standard-class) ())
(closer-mop:defclass virtual-slot-definition
(closer-mop:standard-slot-definition)
((function :initarg :function
:accessor virtual-slot-definition-function)))
(defmethod slot-definition-allocation ((slotd virtual-slot-definition))
:virtual)
(defmethod (setf slot-definition-allocation)
(allocation (slotd virtual-slot-definition))
(unless (eq allocation :virtual)
(error "Cannot change the allocation of a ~S"
'virtual-direct-slot-definition)) allocation)
(closer-mop:defclass virtual-direct-slot-definition
(closer-mop:standard-direct-slot-definition
virtual-slot-definition) ())
(defmethod closer-mop:direct-slot-definition-class
((class virtual-metaclass) &rest initargs)
;; Use virtual-direct-slot-definition if appropriate.
(if (eq (getf initargs :allocation) :virtual)
(find-class 'virtual-direct-slot-definition)
(call-next-method)))
(closer-mop:defclass virtual-effective-slot-definition
(closer-mop:standard-effective-slot-definition
virtual-slot-definition) ())
(defmethod closer-mop:effective-slot-definition-class
((class virtual-metaclass) &rest initargs)
;; Use virtual-effective-slot-definition if appropriate.
(let ((slot-initargs (getf initargs :initargs)))
(if (member :virtual-slot slot-initargs)
(find-class 'virtual-effective-slot-definition)
(call-next-method))))
(defmethod closer-mop:compute-effective-slot-definition
((class virtual-metaclass) name direct-slot-definitions)
;; Copy the function into the effective slot definition
;; if appropriate.
(let ((effective-slotd (call-next-method)))
(dolist (slotd direct-slot-definitions)
(when (typep slotd 'virtual-slot-definition)
(setf (virtual-slot-definition-function effective-slotd)
(virtual-slot-definition-function slotd))
(return)))
effective-slotd))
(defmethod closer-mop:slot-value-using-class
((class virtual-metaclass) object slot-name)
(let ((slotd (find slot-name (closer-mop:class-slots class)
:key 'closer-mop:slot-definition-name)))
(if (typep slotd 'virtual-slot-definition)
(funcall (cadr (virtual-slot-definition-function slotd)) :get object)
(call-next-method))))
(defmethod (setf closer-mop:slot-value-using-class)
(value (class virtual-metaclass) object slotd)
(if (typep slotd 'virtual-slot-definition)
;; This is ugly and probably not portable, but what if?
(funcall (cadr (virtual-slot-definition-function slotd))
:set object value)
(call-next-method)))
(defmethod closer-mop:slot-boundp-using-class
((class virtual-metaclass) object slot-name)
(let ((slotd (find slot-name (closer-mop:class-slots class)
:key 'closer-mop:slot-definition-name)))
(if (typep slotd 'virtual-slot-definition)
(funcall (cadr (virtual-slot-definition-function slotd)) :is-set object)
(call-next-method))))
(defmethod closer-mop:slot-makunbound-using-class
((class virtual-metaclass) object slot-name)
(let ((slotd (find slot-name (closer-mop:class-slots class)
:key 'closer-mop:slot-definition-name)))
(if (typep slotd 'virtual-slot-definition)
(funcall (virtual-slot-definition-function slotd) :unset object)
(call-next-method))))
О простоте объектно-ориентированого программирования, или страшная правда, которую от вас так долго скрывали.
Написано по мотивам: http://www.lispworks.com/documentation/lw50/LWUG/html/lwuser-173.htm В попытке сделать это, по возможности, портабельным (на SBCL вроде даже завелось).
Я понимаю, что читать это никто не будет, поэтому, краткий пересказ событий:
Захотелось мне виртуальных свойств, ну тоесть так, чтобы при обращении к Сипипишной библиотеке, для которой я ваяю оберкту не было различий между обычными Лисповыми объектами и Сипипишными.
Простой вариант - скопировать значения, но перформанс же!
И вот родился этот вариант. (Использование не показано, т.как не влезло).
+124
ru.m.wikipedia.org/wiki/Мобильный_вирус
"Наиболее перспективной платформой для написания вирусов является Java 2ME , так как подавляющее большинство современных телефонов поддерживает данную платформу"
Не, ну это пиздец. Сегодня полдня доказывал чуваку что на его говнозвонилке вирусов быть не может технически. Потом посмотрел в вики и охуел - такое ощущение что статью писал кто то из лаборатории Касперского, с целью напугать хомячков и попиарить себя.
Соседняя статья:
"Некомпетентные пользователи ошибочно относят к компьютерным вирусам и другие виды вредоносных программ — программы-шпионы и прочее."
http://ru.wikipedia.org/wiki/Компьютерный_вирус
+126
@media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0) { ... }
При правке стилей купленной темы..
Ну ебта, что ви таки за 5 долларов то хотели
+131
module Main:
program factorial:
algorithm factorial:
description of the algorithm:
factorial of n is the algorithm that calculates the product of all the positive integers less than or equal to n.
end of description of the algorithm.
example of usage of the algorithm:
var1 is equal to call algorithm with parameter n which is equal to 5;
begin of a comment:
var1 is now1 120 = 5*4*3*2*1.
end of a comment.
end of example of usage of the algorithm.
description of author of the algorithm:
name: John.
surname: Smith.
date of writing of the algorithm: 2009.
end of description of author of the algorithm.
properties of the algorithm:
callable from other modules.
callable from this module.
can be used in expressions.
end of properties of the algorithm.
parameters of the algorithm:
data n: type is positive integer.
end of parameters of the algorithm.
variables of the algorithm:
data res: type is positive integer.
data now1: type is positive integer.
end of variables of the algorithm.
initialization of the variables of the algorithm:
res is equal to 1.
now1 is equal to n.
end of initialization of the variables of the algorithm.
begin of the algorithm:
cycle: while now1 is not 1, repeat:
res is equal to multiply res by now1.
now1 is equal to subtract 1 from now1.
end of cycle.
result of the algorithm is res
end of the algorithm.
algorithm main:
description of the algorithm:
main algorithm that shows the factorial of the inputted number.
end of description of the algorithm.
example of usage of the algorithm:
end of example of usage of the algorithm.
description of author of the algorithm:
name: John.
surname: Smith.
date of writing of the algorithm: 2009.
end of description of author of the algorithm.
properties of the algorithm:
callable from the system.
end of properties of the algorithm.
parameters of the algorithm:
data arguments: type is array of strings.
end of parameters of the algorithm.
variables of the algorithm:
end of variables of the algorithm.
initialization of the variables of the algorithm:
end of initialization of the variables of the algorithm.
begin of the algorithm:
call algorithm writeInteger with parameter str which is equal to
call algorithm factorial with parameter n which is equal to
call algorithm readInteger without parameters.
result of the algorithm is 0.
end of the algorithm.
Небольшой ответ набирающему популярность WCT. Новый язык программирования LOOOONG:
- Отступы обязательны.
- Все блоки в функциях ("алгоритмах") обязательны.
- блоки нужно записывать именно в таком порядке.
- Имена параметров необходимо помнить, когда вызываешь "алгоритм".
- Ключевых слов ОЧЕНЬ МНОГО.
+143
http://vk.com/proger_girl?z=photo-34196141_334770895%2Falbum-34196141_00%2Frev
http://vk.com/tproger?w=page-30666517_48155477
http://vk.com/search?c%5Bq%5D=wct&c%5Bsection%5D=auto&w=wall172535832_2076
WCT - оно везде!
+101
удалено
Кто делает выгрузка в таком формате???
xml? json? так лучше, епта
+143
Монады как коллбеки
На джаваскриптовой конференции, о которой я писал в прошлом посте, в процессе обсуждения
ФП неизбежно встала тема монад.
Мне было интересно, насколько легко можно объяснить монады «на пальцах». Возможно, не в
той степени, чтобы человек смог сразу с ними программировать, но в той степени, чтобы понимать,
что они делают и зачем нужны.
И у меня возникла идея объяснить монады без типов. Мне кажется, главную сложность при изучении
монад вызывают именно типы (а точнее, конструкторы типов и классы конструкторов типов), т.к. многие
приходят в Haskell из языков с менее выразительной системой типов.
В то же время, монады могут существовать и в динамических языках. А если из монад убрать типы,
то останется лишь то, как они работают во время исполнения — и там все довольно прозрачно.
Вычислительная сущность монад — это continuation passing style, или коллбеки. Любая программа
на node.js написана в этом стиле.
Левый аргумент >>= — вычисление, а правый — коллбек. Коллбек принимает результат вычисления
и совершает какие-то дальнейшие вычисления
Эта аналогия особенно точно выполняется для монад Identity, IO, Maybe/Either. Каждая отдельная
монада определяет, к чему конкретно будет применен коллбек.
Но посмотрим, например, на монаду [] (список). Если руководствоваться только лишь представлением
о монаде как о вызове коллбеков, то самый простой способ определить списочную монаду — это a >>= k = map k a (что неверно).
Аналогия с коллбеками слишком «императивна» и не улавливает тонкость — структуру самой монады.
Чтобы эту структуру наглядно показать, как раз и нужны типы.
+133
rem Check if Windows XP or Windows 7
rem XP: C:\Documents and Settings (or language specific folder)
rem 7: C:\Users
set oprsystem=%appdata:~3,5%
if %oprsystem%==Users (
set ops=win7
) else (
set ops=winxp
)
Batch
http://members.ferrara.linux.it/freddy77/encfs.html