Posts

Showing posts from December 3, 2018

I can't really understand the meaning of word “leverage”

Image
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty{ margin-bottom:0; } up vote 0 down vote favorite It's used in so many cases! If you never studied a foreign language, you won't understand me correctly. I want to imagine the meaning as well as native speakers. meaning share | improve this question asked 4 hours ago Breath 1 1 New contributor Breath is a new contributor to this site. Take care in asking for clarification, commenting, and answering.

Js slower in Photoshop than in Chrome. Can I make two for loops faster?

Image
up vote 0 down vote favorite The following code generates random points(x,y) and then for each point it splits the canvas (one square) into four. With the next point in the iteration it searches for the square where the point is located and splits it into four smaller squares - up to a certain square size. The problem is it is very fast to run in Chrome and extremely slow in Ps (for 11k points it takes 2 seconds in Chrome and 30 minutes in Ps! For 1k points it takes around 10 secs in Ps. Is there any better rewriting to this? btw, Ps doesn't support ES5 var squares = ; var canvaswidth = app.activeDocument.width.as("px"); var canvasheight = app.activeDocument.height.as("px"); squares.push([{ x: 0, y: 0 }, { x: canvaswidth, y: 0 }, { x: canvaswidth, y: canvasheight }, {