#array list
Explore tagged Tumblr posts
Text
Theres a long journey ahead of you.
#rain world#the hunter#rain world hunter#Will I get stoned if I tell yall I havent played their campaign.....#I RLLY LIKE THEIR CHARACTER THO#i want to play it ok. its on my to-do list#Im too much of a frolicker to finish any campaign#live laugh love rain world#artwork#art#rain world fanart#slugcat#reindeer#farm arrays
148 notes
·
View notes
Text
Since the 2023 Book List was helpful for working through some books this year, I think I'd like to give it a shot again next year. I've got about a dozen books on the list so far, mostly rereads and some Reader's Choice options to clear out things from my shelves and I'd like to have fifteen total again. Would anyone like to throw out some book suggestions for consideration, please? Thank you! :)
#Once again this is a chance to corner me into actually trying to read some books!#Indie books depend on convincing a certain organisation to purchase them but I can give it a shot#Or wait! ILL is an option; as is begging; borrowing; or stealing or *gasp* even buying if it looks REALLY good#Okay indie books might be more available than anticipated#And I've got access to a fairly wide array of books otherwise#And I've rediscovered access to a number of Wodehouse...#This is also me trying to beat the reading slump I'm in by committing to some rereads that I can hopefully plow through in January :">#2024 Book List
19 notes
·
View notes
Text
How to convert List to Array?
Let us see how to convert List to Array:
#java#programming#javaprogramming#code#coding#engineering#computer#computerscience#computertechnology#software#softwaredevelopment#education#technology#list#array#online
4 notes
·
View notes
Text
I should spend a week or so farming plat so I can buy the final few weapons I'm missing....
but also I like wasting resources and time making silly builds instead~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fuck
Anyways, after my grinds tonight I am now down to 18 mastery items (non intrinsic) left.
3 are syndicate weapons I just need to trade for.
2 are the ESO vandal weapons because RNG is evil and ESO is boring.
1 is Hema which I plan on sitting down and grinding out the rest of the samples to get it "legit". We are reasonably invested, so a little while of deimos farming with multiple boosters should do it.
Then the remaining 12 are prime weapons that I'm missing like a single part for each, so not too expensive on that front but a bit tedious to map out.
Every day my various collections get a little closer to being finished ^^
#warframe#RetPlays#Alongside weapon mastery I also am remaking all the weapons I've sold to have at max rank in my armory- I also need 2 railjack intrinsics#and a small array of mods though most of those are timegated thanks to nightwave :/#But! The list dwindles! Then I'll inevitably be like 'I gotta collect the PVP mods' or 'I gotta max every arcane' who knows.
7 notes
·
View notes
Text
listened to Dream Sweet in Sea Major by Miracle Musical with Good Omens in mind right after binging the second season and actually /srs started tearing up
Edit: I made more!
Part 1 / Part 2 / ?
#good omens#good omens season 2#good omens season 2 spoilers#good omens spoilers#anthony j crowley#dream sweet in sea major#honestly dream sweet just kinda. fits every tragic heartbreaking/heartbroken romance#crowley and aziraphale. ed and stede. jon and martin.#the list would go on but i dont watch a lot of shows or listen to a lot of podcasts so uh. feel free to continue the list yourself#also im. channelling the artistic depictions of angels where their wings aren’t fully white and are more of a gold-ish color#because i really like it and think crowley at the very least deserves a wide array of colors
17 notes
·
View notes
Text
JavaCollections: Your Data, Your Way
Master the art of data structures:
List: ArrayList, LinkedList
Set: HashSet, TreeSet
Queue: PriorityQueue, Deque
Map: HashMap, TreeMap
Pro tips:
Use generics for type safety
Choose the right collection for your needs
Leverage stream API for elegant data processing
Collections: Because arrays are so last century.
#JavaCollections: Your Data#Your Way#Master the art of data structures:#- List: ArrayList#LinkedList#- Set: HashSet#TreeSet#- Queue: PriorityQueue#Deque#- Map: HashMap#TreeMap#Pro tips:#- Use generics for type safety#- Choose the right collection for your needs#- Leverage stream API for elegant data processing#Collections: Because arrays are so last century.#JavaProgramming#DataStructures#CodingEfficiency
2 notes
·
View notes
Text
this project is easy as fuck actually (a finger on the monkeys paw curls)
#.txt#im aware that there’s one part of this that’s going to make my life hell. because that’s the hard part. but the easy stuff is like. EASY#i figure i can get the linked list implementation of this basically done like. tonight.#and then i’ve got the rest of the week to bash my skull against the array implementation until it works#and write my performance analysis i guess but those aren’t too hard#it does help that i didn’t have to do any corrections on my original linked list code so i can just barrel forward w that
4 notes
·
View notes
Text
Help my stupid code wont work
#supposed to make an array#private ArrayList<String> nameList = new ArrayList<String>();#but nameList.add(‘’ word ‘’);#wont work#+ i can’t get the awt list to display anything before pressing any buttons#i can’t just .setText(‘’’’) it because idk#<33#ranting bc i have been on and off crying trying to figure this out#tutorials arent making sense to me#and the folder we’re supposed to use as a guide doesn’t work
3 notes
·
View notes
Text
just finished never let me go - kazuo ishiguro im so normal about this. watching the movie tonight 4 sure
#as you know kazuo is one of my favorite authors and wrote my (most recent- it changes) favorite book klara and the sun#so ive been reading a lot of his work and other japanese (fiction) authors#i could write a rec list but idk how many ppl care lol. i like a broad array of fiction from sci-fi to drama to thriller to fantasy -#so it would be a very random looking list tbh
3 notes
·
View notes
Text
remember when wordle came out and every programmer and their mother was making algorithms to automate guessing it. those were good times
#ok only i remember because in 2022 i basically lived in the computer lab.#it's actually kind of an interesting algorithm#mmn#i think its a process of elimination thing#ok structures - list of all possible 5-letter words - so list of string.. very possibly represented as list of 5-idx char arrays#n pre-order the list based on best guesses. idk how to do this some informaiton theory thing *waves hands*#i just dont want to go thru the hassle of trying to find the statistical best guess every round too. i'm 100% sure it's possible#-for someone smarter than me#we'll make it start with the statistically best word. uhh what was it.#'CRANE' < i know 3b1b put out another video correcting but im too lazy to look it up#oh ok i'll use penis. 'PENIS'#then.. for each guess.. get info on what possible letters r there n in what positions.. n thenbased on that iterate thru the original list#-and create a copy of it BUT JUST THE WORDS THAT STILL WORK - throw out the bad ones#uhh yeah go thru that list n pick the first valid word from that list#repeat until the game spits out 5 green boxes#yah#yap#ok i go back to drawing
3 notes
·
View notes
Text
hm. never too early to make up my own kinktober prompts.
#having an array of thoughts#i say kinktober prompts but it's just gonna be a list of things i either wanna try or i just wish there was more of lol#ramble tag
1 note
·
View note
Text
i feel like the clock is ticking too fuckin fast nd every single day i spend not grinding leetcode is going to kill my career like no. no is dsa even imp in the holy year of 2023 or not that missed Microsoft internship is fucking Killin me.
#my friend gave the interview nd failed#it fucking kills me bc i would have passed#they fucking just asked how to sum two arrays nd detect a loop in linked list like oh my god 😭😭😭😭😭😭#life update
3 notes
·
View notes
Text
I was going to reblog this but i thought, "hey i should do the tier list first. I could share my results and everyone would have a great time."
There were so many effing dragons OP. There were sooooooo many dragons. It's not possible to give an accurate rating when i was just desperately trying to get the dragons to go somewhere, anywhere.
Anyways... love your art. If anyone else wants to do the tier list make sure you have plenty of time. 10 minutes? More than that. 20 minutes? More than that. If you go into it attempting to give honest ratings, schedule for half an hour minimum.
based on a real conversation I had with my brother just now. which means you can do the dragon tier list
#dungeon meshi#laios touden#falin touden#art by op#not even going to include my results because it is a huge image.#Need to login to the site to save it#I'm not making another account for another freaking website#I will say that the tier list provided dragons from a wide array of media#I never expected to see the dragon from Jane and the Dragon#sabertoothwalrus really loves dragons#in a bit of a bad mood right now sorry if this is too rude
4K notes
·
View notes
Text
When to Use an Array and When to Use a Linked List in JavaScript
Introduction As a JavaScript developer, you are likely familiar with arrays and linked lists. Both of these data structures have their own advantages and use cases. In this article, we will discuss when to use an array and when to use a linked list in JavaScript, along with example code to demonstrate their usage. When to Use an Array Arrays are one of the most commonly used data structures in…
0 notes
Text
C# Programming Challenge: Student Registration System
Welcome to this programming challenge designed for beginners in C#. In this exercise, you’ll create a simple student registration system. This challenge will help you practice fundamental programming concepts such as handling user input, working with lists, and using basic control structures. Challenge Description You are tasked with developing a basic console application for a school that…
0 notes
Text
All About JavaScript Loops
New Post has been published on https://thedigitalinsider.com/all-about-javascript-loops/
All About JavaScript Loops
Every programming language has loops. Loops perform an operation (i.e., a chunk of work) a number of times, usually once for every item in an array or list, or to simply repeat an operation until a certain condition is met.
JavaScript in particular has quite a few different types of loops. I haven’t even used all of them, so for my own curiosity, I thought I’d do a high-level overview of them. And as it turns out, there are pretty good reasons I haven’t used at least a couple of the different types.
So, for now let’s spend a while exploring the different types of loops, what we can do with each of one, and why you might use one over another. (You’ll think that little play on words is absolutely hilarious by the end.)
The while and do...while loops
First up is the while loop. It’s the most basic type of loop and has the potential to be the easiest to read and the fastest in many cases. It’s usually used for doing something until a certain condition is met. It’s also the easiest way to make an infinite loop or a loop that never stops. There is also the do...while statement. Really, the only difference is that the condition is checked at the end versus the beginning of each iteration.
// remove the first item from an array and log it until the array is empty let queue1 = ["a", "b", "c"]; while (queue1.length) let item = queue1.shift(); console.log(item); // same as above but also log when the array is empty let queue2 = []; do let item = queue2.shift() ?? "empty"; console.log(item); while (queue2.length);
The for loop
Next is the for loop. It should be the go to way to do something a certain number of times. If you need to repeat an operation, say, 10 times, then use a for loop instead. This particular loop may be intimidating to those new to programming, but rewriting the same loop in the while-style loop can help illustrate the syntax make it easier to stick in your mind.
// log the numbers 1 to 5 for (let i = 1; i <= 5; i++) console.log(i); // same thing but as a while loop let i = 1; // the first part of a for loop // the second while (i <= 5) console.log(i); i++; // the third ("end");
The for...of and for await...of loops
A for...of loop is the easiest way to loop through an array.
let myList = ["a", "b", "c"]; for (let item of myList) console.log(item);
They aren’t limited to arrays though. Technically they can iterate through anything that implements what is called an iterable protocol. There are a few built-in types that implement the protocol: arrays, maps, set, and string, to mention the most common ones, but you can implement the protocol in your own code. What you’d do is add a [Symbol.iterator] method to any object and that method should return an iterator. It’s a bit confusing, but the gist is that iterables are things with a special method that returns iterators; a factory method for iterators if you will. A special type of function called a generator is a function that returns both a iterable and iterator.
let myList = *[Symbol.iterator]() yield "a"; yield "b"; yield "c"; , ; for (let item of myList) console.log(item);
There is the async version of all the things I just mentioned: async iterables, async iterators, and async generators. You’d use an async iterable with for await...of.
async function delay(ms) return new Promise((resolve) => setTimeout(resolve, ms); ); // this time we're not making an iterable, but a generator async function* aNumberAMinute() let i = 0; while (true) // an infinite loop yield i++; // pause a minute await delay(60_000); // it's a generator, so we need to call it ourselves for await (let i of aNumberAMinute()) console.log(i); // stop after one hour if (i >= 59) break;
One unobvious thing about for await...of statement is that you can use it with non-async iterables and it will work just fine. The reverse, however, is not true; you can’t use async iterables with the for...of statement.
The forEach and map loops
While these are not technically loops per se, you can use them to iterate over a list.
Here is the thing about the forEach method. Historically it was much slower than using a for loop. I think in some cases that may not be true anymore, but if performance is a concern, then I would avoid using it. And now that we have for...of I’m not sure there is much reason to use it. I guess the only reason that it still may come up is if you have a function ready to use as the callback, but you could easily just call that same function from inside the body of for...of.
forEach also receives the index for each item though, so that may be a thing you need too. Ultimately, the decision to use it will probably come down to whether any other code you’re working with uses it, but I personally would avoid using it if I’m writing something new.
let myList = ["a", "b", "c"]; for (let item of myList) console.log(item); // but maybe if I need the index use forEach ["a", "b", "c"].forEach((item, index) => console.log(`$index: $item`); );
Meanwhile, map essentially converts one array into another. It still has the same performance impact that forEach has, but it is a bit nicer to read than the alternative. It’s certainly subjective though, and just like with forEach you’ll want to do what the rest of your other code is doing. You see it a ton in React and React-inspired libraries as the primary way to loop through an array and output a list of items within JSX.
function MyList(items) return ( <ul> items.map((item) => return <li>item</li>; ) </ul> );
The for...in loop
This list of loops in JavaScript wouldn’t be complete without mentioning the for...in statement because it can loop through the fields of an object. It visits fields that are inherited through the object’s prototype chain too, though, and I’ve honestly always avoided it for that reason.
That said, if you have an object literal, then for...in might be a viable way to iterate through the keys of that object. Also it’s worth noting that if you’ve been programming JavaScript for a long time, you may remember that the order of keys use to be inconsistent between browsers, but now the order is consistent. Any key that could be an array index (i.e., positive integers) will be first in ascending order, and then everything else in the order as authored.
let myObject = a: 1, b: 2, c: 3, ; for (let k in myObject) console.log(myObject[k]);
Wrapping up
Loops are something that many programmers use every day, though we may take them for granted and not think about them too much.
But when you step back and look at all of the ways we have to loop through things in JavaScript, it turns out there are several ways to do it. Not only that, but there are significant — if not nuanced — differences between them that can and will influence your approach to scripts.
#ADD#approach#Arrays#Articles#code#curiosity#Delay#generator#generators#impact#it#JavaScript#language#Libraries#list#loop#loops#map#Method#mind#One#Other#performance#Play#programming#Programming Language#prototype#react#Read#REST
0 notes