nevermind, didn't read far enough in the doc
You don't need the CONTENT-MD5 or CONTENT-TYPE in the signature? http://s3.amazonaws.com/doc/s3-developer-guide/RESTAuthentication.html
@zhimingwang i'm guessing it's detecting that it's the wrong format (file says .md
, lexer doesn't agree)
@steve-jansen Interesting. Does this work when calling another file, or 'subroutine'? i can't get CALL <somefile> %errorhandler%
to behave.
And if you still want to 'rethrow' the error, the following seems to work:
SET errorhandler=^|^| ^(PAUSE ^&^& EXIT /B %errorlevel%^)
@verymickey yup, unfortunately
Great discussion. As long as you've made it this far in the comments, I thought I'd mention another framework comparing itself to Bootstrap's semantic deficiencies -- http://semantic-ui.com/. I haven't used it beyond a brief review, but it looks pretty good on the surface. One really neat feature is the javascript console debugging/tracking which details the performance of animations via console.table
.
You may as well just declare a global object rather than a generic cache -- you should get the benefit of Intellisense from many IDE's, which you won't from magic strings.
Also, $ME = { h1: $('h1'), somethingelse: $('whatever') }
and $ME.yetanother = $('etc')
is much less complicated.
@jlukic are all those crazy console.XYZ
methods chrome-specific? I've never encountered console.table
, although I think I've seen .groupCollapsed
before.
and not to be off-topic but semantic-ui looks awesome. i really like the idea.
@philfreo -- mostly because i like rewriting stuff; there wasn't anything wrong with your post. i did:
- wrap it in a closure because everybody loves closures
- allow you to call the plugin on multiple elements (i.e.
$('p').getTextSize()
would work "correctly" on multiple paragraphs, as they could differ) - get width or height (rather than just width)
- or get any font property rather than just 'width' and 'height'
you can kinda see a comparison in the fiddle.
I'm going to agree with both @jjperezaguinaga and @creationix -- while new Array(n)
is most of the time unnecessary, it is faster than just attaching items to non-existant indexes, and certainly faster than pushing.
Also, I "fixed" and extended @jjperezaguinaga perf tests to demonstrate this more clearly, as well as nearly doubling the performance of the original tailmap (why arguments.callee
rather than just tail_map
recursion?).
that's what i thought i was pointing to -- your ref is newer than latest, so it's a little different. i was only mentioning it as a comparison between your tip and how jQuery does it.
doesn't base64 also result in ~20% larger content? json_*code ftw, since you can use it directly in the frontend.
@xeoncross I randomly came across your framework, used it, and thought it was awesome. In fact, I borrowed a bunch of it to try to make WP development easier.
looks similar to jQuery('something').empty()
.
search for empty: function
in the source to see how they do it
every time i see underscore.js used somewhere, it just gets more awesome.
I've found that Visual Studio 2012 (with the Web Essentials extension and/or Mindscape Web Workbench for preprocessors) is surprisingly a really great front-end IDE -- and don't let the MS scare you :)
It's got most of the stuff you mention, and the Express edition is free. Scott Hanselman has some great blog posts about the new features.
Thoughts? http://codepen.io/zaus/pen/nfEKg
Let me know if I'm citing you enough :)
Some updates, made as plugin on GitHub -- see post https://coderwall.com/p/ziynxq
Yeah I was thinking about that with the .clone
+adjacent idea, now need to do it manually. Good call.
Update font
seems to include line-height
at least. I've added an option to extend the font
value passed to include other properties
Just wrote what I think is a more comprehensive test scenario:
- flat DOM, many elements: http://jsperf.com/jquery-context-or-no-context/4
- flat DOM, few(er) elements: http://jsperf.com/jquery-context-or-no-context/6
- nested DOM: http://jsperf.com/jquery-context-or-no-context/7
Note that the performance varies between the nested and flat DOMs.
@philfreo Good call on nth-child
; also goes for appending it to parent rather than bottom of page.
But I can see how getting the font each time would be beneficial, as it's guaranteed to adjust to external effects. Some playing around: http://jsfiddle.net/drzaus/J2PhC/11/
It could probably be more accurate if you cloned the current element and appended it right next to it, hidden, so that it gets targeted by the exact same CSS rules as the target element. Then you wouldn't need to manually copy the css.
Good idea, but doesn't work for larger elements, or as @sembrestels said for longer lists: http://jsfiddle.net/S8NBy/7/
You can also do something similar with multidimensional lists -- http://stackoverflow.com/questions/6572588/sass-each-with-multiple-variables
wth coderwall -- roman numerals? nested numbering?
weird!
@paulnormannz whoa, font styles! ctrl+s doesn't actually save the content for me, just the blank datauri page.
Hm...seems Chrome throws security errors when trying to access localStorage from data-uri. Otherwise you'd just tack on:
<script>(function(b,l,k){b.innerHTML=l.getItem(k);b.addEventListener("keypress",function(e){l.setItem(k,b.innerHTML)},false)})(document.body,localStorage,"bkmlt.ntpd")</script>
There's also Inflector from UI-Utils: http://angular-ui.github.io/ui-utils/#/inflector
specifically: https://github.com/angular-ui/ui-utils/blob/master/modules/inflector/inflector.js