i think i’m understanding for loops ... it is a miracle

seen from Malaysia

seen from Japan

seen from United States

seen from Brazil
seen from China
seen from United States
seen from Australia
seen from United States

seen from China

seen from China
seen from South Africa
seen from Hungary

seen from France
seen from Philippines
seen from China
seen from Sweden
seen from Philippines
seen from China
seen from Türkiye

seen from Canada
i think i’m understanding for loops ... it is a miracle

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
we’re learning for loops now.... thanks, i hate it
Loops play a very important part in our Lives. Whenever we need to play over large sets of Data, we usually use For Loops. But have you ever made a thought how the way you write your For Loop affects your CPU Time? Nope!!!! Okay Let me give you an overview on that.
#freecodecamp “Iterate with #JavaScript For Loops
forloops replied to your post:I’m at the airport, and there’s a guy here waiting...
If Logan doesn’t have a puppy with him when he comes to pick me up on Saturday, we’re done.
Not just a regular puppy, though. One that stand up and smiles creepily, preferably with a huge head.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Three Tips to Help Optimize Your Code.
This may not boost your program's speed tenfold (in fact, some compilers out there already take care of a lot of optimization behind the scenes), but I'm a firm believer in the idea that every bit counts and that knowledge is power. So, without further ado, here are a few tips that may be more or less relevant to my fellow novice programmers: Code Motion ("Precomputation") This is a fairly simple thing to catch. For a simple example, let's say you have a for-loop that reads: for (int i = 0; i < someString.length(); i++) Every time your program runs that loop, it will call someString.length(). The easy solution to this is to define the length just before the loop and store it in a variable: int len = someString.length(); for (int i = 0; i < len; i++) And just like that, you only call someString.length() once! On modern day hardware, this doesn't always make a huge difference (unless you have a humongous string), but for more intensive algorithms - or if the loop happens to be called a lot - there will be a noticeable difference in your program's speed. Share Common Subexpressions Let's say you have a few variables being computed: int i = (q * p) + 1; int j = (q * p) + 2; int k = (q * p) + 3; // etc... Now, it may seem messy to want to add another variable on that list, but it improves program performance if you assign (q * p) to a variable beforehand, so your code reads more like this: int qp = (q * p); int i = qp + 1; int j = qp + 2; int k = qp + 3; // etc... And just like that, you've improved your program's performance. Know Your Language - Row Major or Column Major? This tends to make a big difference if you're working with nested loops and a data structure such as a 2D array. If I said to imagine drawing out a picture of a 2D array, you would imagine it would have n columns and m rows, right? But on computers, a 2D array isn't stored as a rectangle in memory - it's stored as a continuous row of data. Depending on your language, it may store this data with the rows as one giant row (row-major - languages such as C++ and Java), or the columns as one giant row (column-major - languages such as FORTRAN and MATLAB). To illustrate, if we have a 2x2 2D array: a b c d This would then be stored as: Row major: a b c d Column major: a c b d Let's say we're working in C (because we're masochists and like low-level languages), which is row-major. If we have a loop such as: // Psuedo-code given a 2D array, arr from i = 0 to 2048 from j = 0 to 2048 arr[i][j] = (i + 1) * (j + 2) This will run noticeably faster than: // j-loop first, then i-loop from j = 0 to 2048 from i = 0 to 2048 arr[i][j] = (i + 1) * (j + 2) And vice-versa for column-major languages. I know this was a long point to illustrate, and it may seem a little jumbled, but it's not too bad - I promise (you may have even worked with nested loops this way prior discovering this). So, with that, hopefully this will help some of you guys looking to fine-tune your code. There are many more ways to optimize your program than this, but I hope the points I discussed are something you can remember and, with any luck, turn into a habit. Happy coding!
Small Optimization Tweak When Writing JavaScript for Loops
So today I was tooling around with this dynamic object generator that writes object blocks to an HTML5 canvas and even checks for object collision so that things are evenly spaced. Well, while doing this, and with hours and hours of Googling, I was able to find a much more sufficient way to write for loops. Its the small things in life that keep the world turning... as someone may say...
Here is what I am talking about:
Normal For Loop
var arr = []; arr[0] = 1; arr[1] = 2; arr[2] = 3; for(i = 0; i < arr.length; i++) { console.log(arr[i]) }
The piece that is not optimal is when you write
i < arr.length
... essentially you are having to check for the array length EVERY time you iterate over the items in the array.
To avoid this, simply store your array length in a variable...
var arr = []; arr[0] = 1; arr[1] = 2; arr[2] = 3; var len = arr.length; for(i = 0; i < len; i++) { console.log(arr[i]) }
And small items like that will help you write faster JS that the browser won't have trouble interpreting.
Happy JavaScripting!