Mia's Blog
It can be quite confusing when you have 2 methods in an API with same names. Hopefully, this post will clear up your doubts.

.each()

Consider the following markup:
<div id="dv">
    <input type="text" value="text box" />
    <p>paragraph element</p>
    <span>span element</span>
</div>
Suppose we want to find out the tag name of each element present inside this div. In this case we will use .each iterator
$('#dv').children().each(function(index, element) {
    console.log('element at index ' + index + 'is ' + (this.tagName).toLowerCase();
});
Output:
element at index 0 is input
element at index 1 is p
element at index 2 is span
each() function takes 2 parameters, index of current element and the DOM element itself. Therefore, this will refer to the DOM element inside each(). We can get the tag name using tagName property of DOM element.(This post explains it in detail). To use the corresponding jQuery object, use $(this)

$.each()

$.each takes 2 parameters. First is the object over which the iteration is to be done and second is the callback function that will execute on each iteration. The callback function provides 2 parameter, first is index of current element(or you can say key in case of objects) in object and second the value at that index.

First, let us iterate over a js array.

var myArray = [10,20,30,40,50];
$.each(myArray, function(index, value) {
    console.log('element at index ' + index + ' is ' + value);
});
Output:
element at index 0 is 10
element at index 1 is 20
element at index 2 is 30
element at index 3 is 40
element at index 4 is 50
Another example using an object:
var myObj = {
"Google" : "http://google.com",
"Reddit" : "http://reddit.com",
"Mashable" : "http://mashable.com"
};
$.each(myObj, function(key, value) {
    console.log('value for key ' + key + ' is ' + value);
});
Output:
value for key Google is http://google.com
value for key Reddit is http://reddit.com
value for key Mashable is http://mashable.com
That’s it. If you still have doubts, let me know in comments.
Source: http://www.vijayjoshi.org/2010/11/24/jquery-difference-between-each-and-jquery-each/
Do you like platitudes? You know, hearing people say things to sound smart when they really don’t know what they’re talking about?
  • “We have late game.”
  • “Just play passive.”
  • “WTF are you building?”
  • “Play efficiently.”
  • “It depends.”
  • “They know how to trade.”
I’ve learned to like them. Because, they never stop...it’s Christmas every day!
It’s the mark of a wise man to admit when one doesn’t know something. Unfortunately, most League of Legends players aren’t wise. Oh well. Fortunately though, we can actually learn about these things, if we put our minds to it. And here, we’re going to address that last one.
I am going to teach you how to trade.
Note: We’re going to define a “trade” as “any attempt to hurt the other champion, without the intent to kill them”. If you try to kill them, you’re all-in. If you have no expectation of a kill, it’s a trade.

2 + 2 = 4. REALLY.

There are four, and only four, parts to a successful trade:
  1. Get from a point of safety to a point where you can attack.
  2. Do your damage.
  3. Somehow avoid their damage.
  4. Get out to safety.
That’s it. It isn’t any more complicated than that. There’s no magic formula, there’s no “god mechanics”, just this. Get in, hit ‘em, don’t get hit, get out.
Next time you watch your favorite stream of a laner, watch with those four steps in mind. If he executes a successful trade, did he do all four steps? (PROTIP: He did.). If he lost, which of the four steps did he fail at? Where’d he break down?
Well, that’s it. You’re free to go if you like. Then again...you know me. I don’t do short guides. Let’s see what else we can learn about this.

POSITIONING KILLS CHAMPIONS

The first thing, bar none, is range. Accomplishing steps 1 and 4 are all about where to stand and where the other guy stands.
At the start of the game, you’re way too far from your opponent, and you’ll have to get closer to do anything to him, or to get the gold from minions that you want anyway. So, we’re going to divide “range” into four categories:
  • Short: This is in range for a melee auto attack, and closer.
  • Medium: This is the range for a ranged auto attack, and closer until you get to Short.
  • Long: This is the range for a far skillshot, and closer until you get to Medium.
  • Safe: This is out of range of every ability, except extremely long range abilities like Xerath, Lux, and Caitlyn’s ult.
Not every champion has the same AA range, and we’ll get to that later. This will do for now.
From here, we can then solve the puzzle at each range increment. Let’s take Renekton, for example. You’ll notice that he’s quite prepared for this:
Short:
  1. Hey, I’m already here!
  2. Auto, W with rage, Q, maybe one more auto.
  3. He’s stunned, W is OP!
  4. E dash out.
Medium:
  1. E Dash in
  2. Auto, W with rage, Q, maybe one more auto
  3. He’s stunned, W is OP!
  4. E Dash out
Long:
  1. I can E dash twice, but that leaves me without step 4, so screw it, I’ll walk up.
  2. If I can get to Medium, I can dash in and do my thing.
  3. I <3 Stuns.
  4. I can just run. I can use the E I saved to dodge a skillshot or get to a bush.
Safe:
  1. Not happening.
  2. Still don’t care.
  3. I can dash whatever he throws at me.
  4. Still don’t care.
Quite frankly, Renekton has the tools in his kit to accomplish all four tasks easily. This, by itself, is why he’s considered a “lane bully”; his abilities literally do his work for him.
Now, then again, he’s not invincible either. If Garen gets the silence off before Renekton stuns, his trade is destroyed. He can’t accomplish step 3, and Garen will punish him. Say Wukong clone blocks Renekton’s W….now the gator didn’t succeed at step 2 or step 3, and Wukong can plaster him while the cooldowns are down.
That’s for someone who’s a good trader. How about a bad one? Take Karthus:
Safe:
  1. I love farm lanes! Why get closer?
  2. Farmville is fun…
  3. Do I want to ult? Nah.
  4. I wonder if Zynga’s gonna give me a discount?
Long:
  1. I hope he doesn’t get any closer, I can hit him from here.
  2. TASTE THE RAINBOW! Q Q Q Q Q.
  3. Please don’t hit me with skillshots.
  4. I still hope he doesn’t get close to me.
Medium:
  1. I could hit him at long! Why is he so close?
  2. DAMMIT! My Qs stop me to cast them! And E costs too much mana!
  3. OH SHIT HE DASHED THROUGH MY WALL!
  4. FLASH! FLASH! FLASH!
Short:
  1. SOMEONE MAKE THE BAD MAN STOP!
  2. THIS IS NO FAIR MY Q TAKES TOO LONG TO FIRE HE JUST DODGES
  3. OH SHIT I BURNED FLASH ALREADY
  4. Fucking jungler, doesn’t gank. Reported.
Obviously, Karthus loves long range, and is very uncomfortable with an opponent closing in. He’s got to keep his opponent at bay with Qs and discourage him from walking forward, or Karthus will spend his entire laning time, fleeing, towerhugging, and of the enemy is good, dying. HIs kit isn’t well suited to accomplishing the four tasks at all.
The long and the short of it is to decide what range you want to be at, relative to your opponent. If you don’t want to be close, you’ve got to keep him at bay, if you don’t want to be long, you have to walk forward.

HEARTHSTONE’S FOR NOOBS. 

WWE WITH AUTHORITY’S WHERE IT’S AT!

Here’s where we apply champion knowledge to our situation. With the champ you play, how can you accomplish those four tasks? How can you opponent stop you? Conversely, how can your opponent succeed, and how can you stop them?
Interestingly, this part of the game is similar to a collectible card game. Even easier, as you’ve got precisely eight cards in your entire deck: QWER, your auto, your passive, and your two summoners. So does the other guy.
From here, you can work out how to accomplish the four tasks while preventing the other guy from accomplishing them yourself. Specifically, work out which of your abilities will accomplish those tasks, and which you won’t have. For example, let’s say I’m Nami and want to trade with a Caitlyn:
  1. I can E myself to proc my passive, and get the run speed to cross from her auto attack range into mine.
  2. I can auto and W, as long as she autos me before I W.
  3. The W heal will cover one auto. It will cover nothing if I use it early. I’ll have to dodge her E+Q manually though.
  4. She should still be slowed from the E, and my W proccing my passive should give me the speed to get out.
1-2-3-4. Got it.

BESIDES, IT JUST COMES DOWN TO WHO DRAWS RAGNAROS FIRST ANYWAY

Interestingly enough, the CCG analogy holds up pretty well. Say there’s a card in their deck that can stop you. You’ve got to respect that. But...what if it’s not in their hand? Then, you don’t have to respect anything.
Ability cooldowns are the simplest. If you see them use it, you’ve got some time to put 1-2-3-4 together while it’s down. But, what if you don’t know the cooldown?
Why the hell not?
The google search bar’s over there. Stop taking a bathroom break in the loading screen, and alt-tab to lol wiki and get this information, and read it before the game. You need it.
Furthermore, what abilities do they take at which level? Riven’s got her Q spam at level 1...but no dash and no stun. You clicked Thresh and see that he has his flay buff at level 1...great, your first level will be hook free!
Lastly, there’s a few other concerns. Do you need to avoid a skillshot? Use a dash or gapcloser. (BTW, Ekko’s E is amazing. He’s gonna go far.) How about the enemy’s abilities being stopped by minions (hooks, Ezreal Qs, Mundo cleavers). Well, hide behind minions and make them impossible to hit you.
To paraphrase Sun Tzu, if you know your deck and know your opponents, you need not fear the results of a hundred RNG screwjobs.


YOU WANT LOGISTICS? JOIN THE ARMY. MARINES MAKE DO.

Every few days around here we have one of those “what’s the difference” threads...bronzies and silvers, silvers and golds, golds and plats...etc. Personally I’m not interested in in anyone other than the nine on the field with me (or ten if i’m coaching). But, I’ll give you a free piece here:
Good players can find a way to accomplish these steps. Bad players just give them away.
Caitlyns and Jinxes who can’t take free autos. Melee champs that keep getting tagged as they obviously are going for a minion. Firing panicked, hoping skillshots instead of measured, well-timed shots that are likely to hit.
All in all, you’re going to need to be able to get the four tasks done when you don’t have an ability to save you. Well, how do we do that?
First, realize that if you’re in a bad matchup, you do need your opponent’s help. Nasus will not win against a Gnar when:
  1. He walks into Gnar’s space himself to take a CS.
  2. He doesn’t get close enough to actually attack Gnar.
  3. Gnar hits everything, including his slow
  4. He can’t get away, slowed, as Gnar attack kites forward, and is nowhere near a bush or tower.
Four tasks...four failures. This Nasus deserves to get his face smashed in. Against a Gnar who lets him go...Nasus has a chance. He won’t notice his blundering against an opponent who never capitalizes on it.
Yeah, that’s the bad news. If you’re in a bad matchup and the other guy plays perfectly, you’ll lose. Sorry.
The good news? Almost no one plays perfectly.
Is the other guy willing to let you get into your preferred range easily? If not, how can you get in? If you’re already at it, how can you keep him out? Is your opponent wasteful with abilities, giving you cooldown to exploit? Or is he the opposite, not waveclearing enough, giving you a minion advantage? Is he jumpy...do you think you can get a cooldown advantage by making him fire and miss? Is he too deliberate with CS, meaning he’s willing to let you blast him as he gets his gold? Is he playing too far back, giving you too much respect? Well, you’ll know when the jungler’s near...he’ll walk forward.
On the field, you are going to need to see what the opponent does, take what’s given, and come up with a way to win. I can give you the framework for that (4 steps), but it’s up to you to put it together. Get in, hit ‘em, don’t get hit, get out. And, prevent him from doing the same. Can you do that?
If so...you will win every trade. Ever. Literally.
Hopefully you’re not too preoccupied with getting 35 CS by 5 mins than 30...
Well, that’s it...except it isn’t. Since I’m all about being thorough, here’s a few smattered tips that fit in with the theme, just not in the main narrative.


SUMMONER’S RIFT, THE HOCKEY RINK

If you want to practice getting kills in lane, you should play Cho’Gath or Darius. They both have unmissable ults that do true damage. Mouse over to see how much it is, look at the vertical lines on their health bar...easy peasy. You’ll know exactly where their health needs to be to score a kill.
Okay, but why stop there? On any champion, if you flash and hit everything, what’s the damage you do? What is your max burst? Do you know?
Why the hell not?
I can forgive you if you’re messing around in a normal on a champion you don’t know. On your main in ranked; I won’t. The fine line between 300g (and your opponent’s teammates hating him) and nothing is right there, and you need to know that information. This is your champion’s “Red Line”, the maximum amount of damage you can deliver immediately without any counterplay.
Go to LoL wiki, count your base damages, your likely extras from runes, masteries and items, compensate for armor or MR, and come up with a number. Now you’ll know exactly where you need to trade your way towards.
On the other hand, what about mana? How much does it cost to cast every spell once? This is the “Blue Line”, the amount of mana you need to cast everything.
You mana bar is public information, and your opponent will know if you don’t have the mana to continue to play. If you’re approaching the blue line, you need to consider backing, or otherwise find a way to get some mana back without leaving. You’ll be fine if you stay above it, but once you cross the blue line, you enter a downward spiral: minions to clear, no abilities to clear them with,w exposure to damage while you auto, stuck clearing while the opponent roams, all sorts of bad things. Avoid this before it happens. Know your blue line, and be aware when you’re about to cross it.


HOW TO BEAT MICHAEL JORDAN, STEP ONE: DON”T PLAY HIM IN BASKETBALL

Have you noticed that way always max one skill first, before the others? Maybe it’s Q, W, or E, but one of them always gets the skill points before the others.
So what? Well, the one they’re maxing is their most important skill. So, if you can make them miss (or even if they hit you), you can probably win the trade from there.
For example, Ahri players typically max Q, her yo-yo. If she throws it at the wave, you can then go in if you can beat the charm. She’ll hit her fox fire, but it’s going to be level 1. Even the charm won’t hurt too much; it’ll just end your trade early. Either way, you should still be able to play after losing this exchange. After all, the only things she hit you with were the skills she’s not levelling.
https://www.reddit.com/r/summonerschool/comments/36qh0c/how_to_win_every_trade_ever_literally/
Have you ever gone to the supermarket, buy groceries for your dinner, potatoes, beef, vegetable and fruit,... and then you realized that it end up with a mess, a very long receipt and the total price wasn't as you expected. The problem is, almost items come with
Never make the mistake of assuming you’ve seen it all. There’s someone out there doing something ridiculous to make money. Or worse: providing a rationale for the ridiculousness.
Pop-ups, by definition, ruin the user experience. That’s it. If a pop-up gets opt-ins for an inconsequential newsletter that Gmail filters out anyway, fine. But don’t claim pop-ups are good UX. Let’s examine the arguments I’ve run into for pop-ups-as-good UX.

1. “If you design it well, users won’t mind.”

Umm… yes they will. But there’s a bigger problem: you’re now confusing UX design – a narrower topic – with user experience. From a strict UX design perspective, I’ll grant that you could design an aesthetically acceptable pop-up. On usertesting.com, the example of a pop-up on booking.com is used. I think it looks crummy, you can judge for yourself, but from a broader user experience standpoint, we’re at an impasse. “A good example from Booking.com of how to retain abandoning visitors with a popup without being too intrusive or distracting your visitors too much.”

“Too much” is a subjective judgement call you’re making on behalf of your users because you want the conversions. That’s not acceptable UX – unless your users have specifically told you during UX user research they enjoy pop-ups. Good luck with that.

This is the booking.com example of what the author calls a “tastefully designed” pop-up:


2. “As long as you don’t show them a pop-up upon entry, it’s ok.”

If I’m walking in a park, I’d rather step on dog poop at the end of my walk than the beginning. But all things being equal, I’d rather not step in poop at all.

3. “If the pop-up shows relevant content, it’s not annoying.”

All pop-ups are, by their definition, annoying. If your content is so amazing, so deeply relevant, I will eventually find it and I will probably do business with you. Maybe not today, but tomorrow or the next. If you have something truly great or indispensable on your site, all my colleagues will be sharing it, and I’ll be back.
Here’s the “relevant content” rationale: “If the content helps the visitor solve their problem, find the right solution, or get answers to their questions, the popup won’t be perceived as annoying.”
Perhaps. But I’ve never had a pop-up answer a specific question I had, so I can’t say. I’ve had plenty of web sites answer my questions, and if they do it exceptionally or consistently, I subscribe to them. What about this is broken that requires a pop-up guessing at my intent?
“Instead, it will be seen as helpful, or at least as intending to help, not disturb.” Not sure what UX planet you are living on, but helpful is not about being interrupted. It’s about being there when I need you. It’s about letting me easily escalate the relationship. Pop-ups are like copping a feel. They are completely out of context of the content date we are having. It will be seen for what it is: an aggressive attempt to secure my opt-in. If it works, then it works. I’ve bought products from aggressive salespeople before. But leave “good UX” out of it.

4. Personalize your pop-ups by visitor groups.

Two problems: personalized pop-ups are still pop-ups. I don’t care if you left the poop on my sidewalk specifically for me to step in. It’s still poop. Second: classifying visitors into interest groups is a difficult task until itself. My interests tend to be individual, so if you send me a group message, I know you’re guessing. Lumping me into an “interest group” isn’t so personal.
This supposedly good example ad of “personalized pop-up” also includes an insult:

If you’re going to insult me when I opt-out, at least give me a “Yo mama!”. That would at least crack a smile.

5. Users don’t care because they don’t complain.

Consider this a formal complaint. Your pop-ups suck.
More rationalizations: “Visitors don’t seem to really care about it at all. “We had absolutely zero user complaints” said the guys from WPBeginner.”
Well, first off, it takes some effort to complain properly in this world. An annoying pop-up is pretty far down on the complaints list, below an Internet outage, a cancelled plane flight, or a blue screen of death. Doesn’t mean it’s not irritating. Also, I have no business relationship with you. If you had a box on your site saying “do you hate our pop-ups,” I would have clicked “yes.”

6. We only show the same reader a pop-up once a month, so that makes it good UX.

I don’t want to see the pop-up once a year. And: you’re assuming I’m using the same browser with the same cookies on the same device. Nah, I’m gonna see that pop-up more than once a month.

7. Bounce rate didn’t go up, so we’re all set.

A bounce rate is a small piece of the puzzle. It doesn’t account for brand perception. I can tell you this: I am less likely to socially share and refer pages and web sites that have pop-ups. Where’s the data on that behavior?
More justification for user interruption: “Plus if I’m really smart I can actually use popups to enhance UX like Vero does. When you stay for longer than 30 seconds on their landing page and don’t take action a popup in the right corner of your browser window will appear asking “What is the main thing preventing you from signing up to Vero at this point?””
Thanks for letting me know, I’ll avoid Vero like the plague. That may be a useful data gathering and conversion tool. But that’s not a better user experience.
There is ONE thing I can think of that might improve my UX via pop-up. If the founder of your site – not a low-level service rep 5,000 miles away, but your founder – sent me a pop-up instant message asking me, “What do you think of our site? Did you find what you were looking for?” And then interacted with me thoughtfully. That might work. But that’s about one-to-one relationships – and the great user experience that stems from making such a connection.

The wrap – pop-ups may convert, but they don’t UX

Pop-ups may be effective from a very narrow view. If they weren’t, we wouldn’t see so many of them. But let’s view them for what they are. Dressing them up as “good UX” is a futile endeavor that obscures an honest assessment.
Source: http://diginomica.com/
Embossing is simply raising the surface of your design so that it has some depth. It’s the real world equivalent to bevel effects and likely derives from relief sculptures—resembling most closely the bas-relief where the depth is perceived as a lot more than is actually there. The word itself is old French, coming from em (into) and boce (protuberance).

As for how it relates to graphic design—embossing has been used as a finish for high end printed products for hundreds of years. It’s a great way to give your design another dimension that print simply cannot do. Emboss can be used by itself or together with foil, coatings or printing.

How it’s Done

Embossing is done by pressing a sheet of paper (or other substrate) into a female die, that has a design engraved or etched into it. This is usually done with a male counterpart underneath the paper, so that the paper is sandwiched between the two and the design is transferred to the paper.

Although embossing seems to be quite deep visually, it is commonly no more than 15 microns and at most, 25 microns. That’s 25 thousands of an inch. Your average emboss is about 1/64th of an inch. You can see in this photo how the depth of an emboss die affects the appearance of the final piece. Note that as the depth of the die increases, there’s a higher chance of the paper tearing (as can be seen in the “D” of “guide”).

While embossing technically refers to a raised surface, embossing can also be done to create a depressed design in a surface. In the graphic design and printing industry, this is usually referred to as “deboss.” For a deboss, the male and female dies are switched so that the topside (front) of the sheet is pressed with the male die and the female die sits underneath it. When a deboss is registered to printing, one can create the appearance of engraving.

For the most part, presses that do embossing are interchangeable with presses that do foiling. Both processes require a lot of pressure and, for certain effects, a heated plate. Moreover, foiling and embossing are most often done together and so it makes sense to have a machine that can handle both.
Source: http://www.zevendesign.com/
Color harmony is the theory of combining colors in a fashion that is harmonious to the eye. In other words, what colors work well together. It is the reason the Hulk wears purple pants. It is the reason the original X-Men had yellow and blue uniforms. It is the reason behind almost all color design decisions.

Color Wheel

Color harmony is based on the concept of a color wheel. You can study up on the history of it here. Essentially, it is a wheel with all the colors formed in a circle. Primary colors are on three equally distanced points of the wheel. Typically these are Red, Blue and Yellow. In the field of painting, where the color wheel originated, these three primary colors were used to mix almost all other colors. In modern printing these are replaced with Magenta, Cyan and Yellow. Black is thrown in to create darker colors, thus C, M, Y, K.

Between the three primary colors on the wheel are their mixed colors—purple between red and blue, orange between red and yellow, green between yellow and blue. Theoretically, all colors feels somewhere on the wheel.

The wheel represents color in a circle. Closer to the middle of the circle, colors are less pure. At the outer edge of the circle, they are more pure and more saturated. In 3D representations of the color wheel, one might add darkness and lightness separate from saturation. The thing that is important to know in color harmony is that how dark or light or how saturated colors are does not affect their position on the wheel. Orange can range from a dark brown, to a bright orange to a pale skin tone. All of these are ORANGE when it comes to the color wheel.

(As a side note, this is a great color wheel for designers to have.)

Key Color

After the color wheel itself, the next important thing to understand is the key color. The key color is the most important color of your design. It is the color you can’t change or the color of the element you want to draw attention to. If you are doing a painting of the Hulk, your key color is green as it is the color you can’t change. If you are doing a photograph of a person, then their skin tone is your key color. If you are doing product photography, then the color of your product is the key color.

When determining your color harmony, you need to first determine your key color. From there, you can look at the various types of harmony and see which one you like best or which best suits your design.

Direct Harmony

This is the most basic harmony. It is a point opposite to the key color on the wheel. This “opposite” color is referred to as the complementary color and thus the direct harmony can also be called the complementary harmony. Virtually all color harmonies (except Analogous) are a variation of the direct harmony. It is the reason the wheel exists as opposed to a different kind of chart.

The high contrast of complementary colors creates a vibrant look especially when used at full saturation but can be jarring if not managed properly. This is the most common color scheme and is easy to find in all sorts of designs. Hulk’s green color has purple as its complementary color—which is the reason he wears purple shorts. Red and green are the Christmas colors and also happen to be complementary colors to each other. In photography, blue is considered the best color to put behind a person as it is the complementary color to skin tone.

Complementary color schemes are tricky to use in large doses, but work well when you want something to stand out. Complementary colors are really bad for text as both colors have a similar “strength” and will fight for attention.

More examples

Source: http://www.zevendesign.com/