Skip to content

Instantly share code, notes, and snippets.

@jsenin
jsenin / soap_envelope.py
Created May 18, 2017 11:40
soap xml with namespaces using lxml and python
from lxml import etree
from lxml.builder import ElementMaker
class NewRpcMessageEncoder(object):
def _envelope(self, request_id, hold_requests):
SOAP_ENV = "http://schemas.xmlsoap.org/soap/envelope/"
SOAP_ENC = "http://schemas.xmlsoap.org/soap/encoding/"
XSD = "http://www.w3.org/2001/XMLSchema"
XSI = "http://www.w3.org/2001/XMLSchema-instance"
@Mons1eurEnzo
Mons1eurEnzo / common.js
Last active June 5, 2021 20:06
Bitrix Panel fixed (Фиксим плавающую панель сайта и панель админки Битрикса)
BX.ready(function () {
var MyPanel = BX("navmenu"), // ID ShowPanel Bitrix
BxPanel = BX.admin.panel,
FxPanel = function () {
if (window.pageYOffset >= BxPanel.DIV.clientHeight && BxPanel.isFixed() === false) {
MyPanel.style.top = 0;
} else if (BxPanel.isFixed() === true) {
MyPanel.style.top = BxPanel.DIV.clientHeight + "px";
} else {
MyPanel.style.top = BxPanel.DIV.clientHeight - window.pageYOffset + "px";