Is it possible to replace / overwrite an existing Modernizr test? - modernizr

I'm having an issue with a Modernizr test that returns a false positive in one particular browser / OS combination. I've found a replacement test that avoids this issue but which hasn't yet been merged into Modernizr.
I'm thinking the solution would be for me to manually add this replacement test to Modernizr in my site's Javascript until Modernizr gets updated and that false positive is fixed. I'd ideally like it to have the same name as the existing Modernizr test so I don't have to change anything in future when Modernizr gets updated (I'll just remove my custom version of it).
What I'm wondering (but can't find documented) is: is it possible to overwrite an existing Modernizr test, and if so, what's the best way? (As far as I can tell, Modernizr.addTest('preserve3d' ... ) doesn't overwrite the existing preserve3d test - is there a way of doing this?)

Related

Should I be appending asp-append-version="true" to all my images in asp.net MVC6?

The question is in the title. It seems logical to use this tag helper for every image but if I am indeed supposed to why wasn't this the default?
Is there any performance hit with this? Are there cases when I shouldn't be decorating an image with this tag helper?
The main use of asp-append-version=true is to bypass the browser cache if the content item has changed. It is very useful for javascript that is likely to change.
Images don't get updated very often unless you have an unusual use case. If you have a use case where images do get updated and they keep the same file name then it would make sense to use it there but otherwise it would not.
I can't say how much performance hit would be involved, but it does create a hash of the file content to use for the version string that is appended. There is some impact for any extra code that is executed when it is not needed. It does not make sense for it to be a default behavior, it should be used by opting in to it if you really need it.

Less beautifier - format code

Is there is code beautifier for less such as http://www.lonniebest.com/formatcss/ for css? I need sort properties in less code by alphabet.
I use CSSComb http://csscomb.com/. This one is a npm module but there are plugins for it. Especially I use it with Sublime Text.
It works with less too although there might me some edge case not (yet) properly handled. But it's good for me.
You can order rules however you want. Just read the docs ;)
You can also use cssbrush. It is based and uses the csscomb under the hood, but include a fix for this bug and also has the ability to remember the files that were previously beautified, so it will only beautify changed files on each run.
Full disclosure, I wrote it.

Poedit: Avoid Reordering of translations in .po file

I use Poedit in a project for localization. Whenever I change an entry with poedit, it reorders all elements. I think it reorders the elements according to their line number and file but since I´m working with many coders on this project, poedit must not reorder all elements to avoid unneccessary line changes in the repository. Does anyone know how to achieve that?
Poedit never, under any circumstances, reorders content of the file when you “change an entry”. Files are always saved in the order they had when loaded, and it’s been like this since the very first version.
I have two explanations:
Either you’re confusing content of the file with the view presented in Poedit (where you can select your preferred display order in the View menu), in which case just change the display to whatever you like. But this seems unlikely.
Or you’re talking about not “changing an entry” in the file, but updating the PO file from source code. If that’s the case, it’s possible that you or some of your coworkers are using some very old version of Poedit. The fix would be to update to the current version, because the scan order was fixed to be stable across platforms in v1.6.5 1.3 years ago.
If it’s neither, you need to describe the issue reproducibly.

Orbeon, overriding model.xml and form.xhtml

Is there posibility to override files form.xhtml and model.xml (and template.xml) without compiling Orbeon sources ? I want to add field to form metedata, and I don't know, is it sufficient to add properly files to resource/orbeon/builder/form in my exploded .war file.
regards
Yes.
(That must have been the shortest answer I got a chance to post here!)
To expand on this a little bit, if you want to override Form Builder's form.xhtml, you can place your version in WEB-INF/resources/forms/orbeon/builder/form/form.xhtml. And of course, if there is any way to avoid this, you might want to consider it, as custom changes make it harder to upgrade, and can become quite a nuisance.

XCode - Editing xcodeproj bundle (specifically project.pbxproj)

I'm working in XCode and I've also written an external editor tool that generates resources for use in the project. In the best case scenario, the tool would edit the project.pbxproj file so that it includes the generated resources in the project. I've read through the file in an attempt to understand it, and it's mostly discernible but there is still one major question I have.
If I wanted to generate a new Group from outside XCode (or a new anything, for that matter), how do I know what ID code to use? For example: 19C28FACFE9D520D11CA2CBB is one of them from my project. How am I supposed to know what to use if I make my own? Do they just need to be unique? Would it be legal to just make one up: 000000000000000000000001 and 000000000000000000000002 and 000000000000000000000003 etc. ?
Any help on this would be wonderful. Thanks.
Yes, you can make your own. The best way would be to use a hash function such as MD5 or SHA1 to generate it then you can truncate it at the desired length. I would hash the name of the file/group along with a time stamp appended this way you get a more unique result.

Resources