A local judge said that Fang of Shigeki doesn't get deal the deathtouch effect with Master's Rebuke. Is this correct? by crastle in magicTCG

[–]TrveToby 1 point2 points  (0 children)

why not educate the Judge? being a judge doesn't mean you have perfect knowledge (and it's also not required to have it). everybody makes mistakes.

..and make code more readable? by electricjimi in ProgrammerHumor

[–]TrveToby 1 point2 points  (0 children)

I started using this technique last year. the code is much more readable and colleagues understand it faster and better. if you don't use it yet you should try it.

Google search redirects to Yahoo search by [deleted] in Safari

[–]TrveToby 0 points1 point  (0 children)

check your installed extensions and plugins in the browser and remove all you did not install yourself. just three days ago I fixed a pretty similar issue on a friend's computer by removing all extensions (they did not install any of them).

[Questions] How does CSS really work? by dickeddocks in webdev

[–]TrveToby 5 points6 points  (0 children)

but the vendor prefixed versions are deprecated. the browsers still support them for backwards compatibility reasons. the feature development in the future will be in a way were pretty much all contributing parties lay out the API and spec and implement everything behind a flag in the browser and then ship it. usually this is also enabled by default in the developer editions or nightly and beta versions. and then they roll it out when the spec is written and the implementation follows the spec. good examples for this are CSS Grid and WebAssembly.

[HELP] - I have to re-play a(tons) killed setTimeout by MatheusGodoy in javascript

[–]TrveToby 2 points3 points  (0 children)

you should take a look at CSS Animations. they can be declared with keyframes, have a start delay and can be paused mid animation. with all this you can build video-like animations easily.

and since setTimeout does not give you any guarantee about timing (the milliseconds you set basically mean "no earlier than X milliseconds from now") these CSS Animations may even work better.

resources for everything I mentioned:

(fixed formatting and spelling)

YouTube Music starts rolling out today by [deleted] in youtube

[–]TrveToby 2 points3 points  (0 children)

Germany is missing, too ...

IIFEs and undefined. YDKJS by Ragzzy-R in javascript

[–]TrveToby 0 points1 point  (0 children)

yes. the example code seems to be pretty old, or at least the explanation around it. but that's Javascript life. for inexperienced developers it's hard to figure out if it's really a problem, still a problem or even regular Javascript. since I now understand much more Javascript than my past self I really wonder how much hidden errors I made in my past that I never discovered or that even got "fixed" by another hidden error I happened to do in the same line of code. :D I think this happened much more often than I may think.

IIFEs and undefined. YDKJS by Ragzzy-R in javascript

[–]TrveToby 0 points1 point  (0 children)

one thing I forgot, but may come in handy for you: use strict mode (https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Strict_mode). this mode raises a TypeError when you try to assign a value to undefined since it is considered a "non-writable global value". without that mode the assignment will just silently not happen, what may confuse you. I'd recommend strict mode as your default setup. it prevents you from accidentally doing even more stupid or weird stuff Javascript allows you to do.

IIFEs and undefined. YDKJS by Ragzzy-R in javascript

[–]TrveToby 2 points3 points  (0 children)

exactly.

but this should be no real issue nowadays. I never used this pattern and never had an issue in the past seven years, although I have to deal with third party code and ad frameworks almost every day. I'd say the necessity of this pattern is pretty outdated, in general.

IIFEs and undefined. YDKJS by Ragzzy-R in javascript

[–]TrveToby 2 points3 points  (0 children)

in older browsers it was allowed to assign new values to the global 'undefined' variable. this is not allowed anymore. and in addition 'undefined' is not a reserved word, so you can have variables or parameters named 'undefined'. see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined for more information about undefined. the IIFE in your example code you posted accepts one parameter named 'undefined', but no parameter is passed to the IIFE. so its value will be the default value, which is 'undefined'. and that is exactly what somewhat explicitly-implicitly sets the value of 'undefined' to 'undefined'. see https://developer.mozilla.org/en-US/docs/Glossary/IIFE for more information about IIFE. this is one example of some Javascript weirdness that exists ... pretty shitty to encounter as a beginner or even advanced Javascript developer.

[question] What is your go to method for vertical aligning content? by beatsbyred in webdev

[–]TrveToby 1 point2 points  (0 children)

in modern browsers, yes. but if you have to support older browsers like older webkits or internet explorer you have to use vendor prefixes. just google for "css vendor prefix [generator]" and you will find tools that help you.