x-tag

Base62x算法改进并增加Base62x in Python

Deadly 提交于 2020-01-07 08:50:19
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 距离上次 “-Base62x 新增 -Perl 版本技术实现 Base62x.pm ( -R/J2SL )”, Base62x 在时隔 6 个月后又进行了一些更新,记录一下,也再次印证,最好的版本永远是下一个版本。这次的更新包括:1)对解码算法的优化改进;2)增加Python版本的Base62x的工程实现。 1. 增加 Base62x in Python 春节一过即开工,因着技术项目需求,最近加紧编程开发了 Base62x in Python 的版本(Base62x.py)。 Python.py 版本的 Base62x 调用方法大致如下: # import Base62x.py from Base62x import Base62x # initialize base62x = Base62x(); rawstr = “abcd1234x’efg89;01”; encstr = base62x.encode(rawstr); decstr = base62x.decode(encstr); Python 对面向对象的支持较好,所以直接以 OOP 方式编制了 Base62x.py , 并没有像 Base62x in Perl版本那样提供了 OOP 和 functional 两种方式。 截至目前Base62x

Select tags that starts with “x-” in jQuery

徘徊边缘 提交于 2019-12-30 08:12:42
问题 How can I select nodes that begin with a "x-" tag name, here is an hierarchy DOM tree example: <div> <x-tab> <div></div> <div> <x-map></x-map> </div> </x-tab> </div> <x-footer></x-footer> jQuery does not allow me to query $('x-*') , is there any way that I could achieve this? 回答1: There is no native way to do this, it has worst performance, so, just do it yourself. Example: var results = $("div").find("*").filter(function(){ return /^x\-/i.test(this.nodeName); }); Full example: http:/

If HTML Imports are dead/deprecated what's the best way to import your web component (X-Tag) template?

Deadly 提交于 2019-12-21 03:41:11
问题 I'm working on my first X-Tag application and on it's page it says it's meant to work with Web Component API's such as 'Custom Elements, Shadow DOM, Templates, and HTML Imports'. I've started working on my templates, but what's the best option to import them, now that HTML Imports have been deprecated? 回答1: AFAIK, HTML Imports have not been deprecated (or is it new?). It's only Mozilla who said it won't implement it for Firefox. But the polyfill is still available, and supported. Since ES6

Stop x-tags from capturing focus/blur events

烈酒焚心 提交于 2019-12-14 03:19:11
问题 I am trying to create a custom element which wraps tinyMCE functionality. I have the following:- (function(xtag) { xtag.register('x-tinymce', { lifecycle:{ created: tinymceCreate, removed: tinymceDestroy }, accessors: { disabled: { attribute: { boolean: true }, get: getDisabledAttribute, set: setDisabledAttribute } } }); function tinymceCreate(){ var textarea = document.createElement('textarea'); var currentElement = this; currentElement.textAreaId = xtag.uid(); textarea.id = currentElement

Select tags that starts with “x-” in jQuery

耗尽温柔 提交于 2019-12-01 03:24:59
How can I select nodes that begin with a "x-" tag name, here is an hierarchy DOM tree example: <div> <x-tab> <div></div> <div> <x-map></x-map> </div> </x-tab> </div> <x-footer></x-footer> jQuery does not allow me to query $('x-*') , is there any way that I could achieve this? Meligy There is no native way to do this, it has worst performance, so, just do it yourself. Example: var results = $("div").find("*").filter(function(){ return /^x\-/i.test(this.nodeName); }); Full example: http://jsfiddle.net/6b8YY/3/ Notes: (Updated, see comments) If you are wondering why I use this way for checking

Do Custom Elements require a dash in their name?

杀马特。学长 韩版系。学妹 提交于 2019-11-27 06:58:04
Is it possible to name your own custom elements <date> , <person> , <city> or others without the use of a dash? Can use define elements without them? All browsers support a finite list of HTML elements which are considered as "known". Elements which are unknown (e.g <city> , <person> ) do not generally throw errors with the HTML parser in modern browsers and instead inherit from HTMLUnknownElement . In older versions of IE however, such elements would be inserted into the DOM as an empty node without any children (1). The Custom Elements specification requires that all custom elements contain

Do Custom Elements require a dash in their name?

夙愿已清 提交于 2019-11-26 10:31:12
问题 Is it possible to name your own custom elements <date> , <person> , <city> or others without the use of a dash? Can use define elements without them? 回答1: All browsers support a finite list of HTML elements which are considered as "known". Elements which are unknown (e.g <city> , <person> ) do not generally throw errors with the HTML parser in modern browsers and instead inherit from HTMLUnknownElement . In older versions of IE however, such elements would be inserted into the DOM as an empty