File: 1721963318437.jpg (71.37 KB, 800x520, untitled.jpg)
No.627298
File: 1721976205515.jpg (509.07 KB, 1914x1080, 1721550241760251.jpg)
Maybe pre-school is important.
In my pre-school they taught us about the golden rule, treat others like you'd like to be treated.
Imagine if everyone went to pre-school and learned that
No.627324
File: 1722004373276.png (22.04 KB, 792x170, end.png)
Deep.
No.627422
File: 1722099892258.png (16.26 KB, 719x616, 2024-07-27-125947_719x616_….png)
Recently wrote this shell script to recursively convert all png files with no transparency to jpg
>>627419The "while read" loop at the bottom is basically a "for loop" in disguise here
Whatever you give it it loops through each line of, could be a text file, or in this case piping the output of the "find" command
No.627448
>>627419to iterate through every item in a list or other data structure and work with them while adding some kind of control variable on which item you're changing.
It's still really simple, it's just making it so the program stops when you hit the max list size or w/e and making sure it goes 1 item at a time.
Random example:
for(int j = i ; j < nums.length - 1; j++) {
if(nums[j] < nums[j + 1])
counter++;
else
break;
}