Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "2d array"
Buy some fucking lights and put them on the house before 10th of December.
1. Buys 100RGB leds.
2. Solders them together to make a 8x8 matrix.
3. Spends entire fucking night coding that shit to display any letter or number and actually displays any sentence you give it.
4. Adds moving letter effect to it.
5. Adds not moving effect to it because previous step broke it.
6. Thinks about releasing it to public.
7. Looks at the terrible code written by half sleeping Haxk20 running purely on coffein.
8. Gives up on releasing it and rewritting this shit is not a way.
9. Looks at the matrix and is happy that at least it works.
Yes i will most likely release the code but be warned the code is really terrible and lot of shit is hardcoded into it because i was half sleeping. Letters are done using 2D array and only characters defined in the code can be displayed.
Will add photo to the comments in few minutes.19
I finally ended my first side project ever. I challenged myself to write a Tetris game in vanilla JS (with the less possible lines of code), some algorithm was tougher than I expected (2d array hell) but I made it ! 500 lines of JS code, I feel I could refactor some stuffs now...4
Real life job interview…
Manager: what about this problem? Could you solve it? (Showing me a problem about scanning a 2d array to find a value written on a piece of paper)
Me: sure! Just give me a piece of paper and I will write a solution.
Manager: no need for that. I don’t have the knowledge to check that anyway… if I wanted you to solve it I would have called one of my programmers.
Manager: do you have any question about the company?
Me: What do you exactly do in the company? I wonder what is the purpose of a person that makes questions about things he doesn’t know.5
My first project was made with scratch (Java based drag-drop language for kids to learn) when I was like 10
I wanted to make something like mine craft but in 2D.
Its a huge plane of stone and you have to break some of them to find diamonds.
I didn't know lists or array exist. I made one variable for every freakin' stone and it took me a solid day back then.
Also if you break a stone, the background changes and it might happen that a diamond appears at a while you made 10 weeks earlier.
https://scratch.mit.edu/projects/... (it's German, don't be scared)6
I can’t say it’s the most painful but it’s one of my recent painful lessons.
So I’m learning C and in my project I was trying to make a copy of a 2D array and I kept getting seg faults up the ass every time I tried to allocate one of the inner arrays and after a long day of debugging I realized that I was trying to allocate memory within an array that doesn’t exist so I had to create the first array then allocate memory for each inner array after.4
Failed another programming intervie. Didn't expect the 2D array question. Feel so bad. Just wanna cry and give up. I need to get better..fast.5
Took some frustration but I managed to get a drawable OpenGL context with SDL on Cygwin without having to juggle compilers.
What's the trick? Link against glew, but don't actually include the headers. Use glad instead. Done, now you don't need to have a separate installation of mingw-flavored gcc or screw with X just to get a fucking window.
But wait, there's more. I loaded a bitmap as a 2d array of uint pairs straight into the shader and used a custom fetch to emulate texture sampling. Aye, I'm sampling a texture from a fucking array of uints. Now I can have raster fonts, like a fucking boss. TTF I'm done with you and now I'm all about the pixel life, so eat my mother fucking dick and balls.
Here's to all the bitches who look down on me for being slow and uneducated, while you were turbo masturbating to hentai I effectively made my own fucking terminal with stick and stones.
And now the real journey begins.3
Fuck this algorithms course. How the fuck do you expect me to populate a 2d array of N^2 elements with data in linear time if you won't fucking let me write to more than one element at a time???
Dear CS department,
Make sure your homework makes fucking sense before shipping it off to students.
A pissed off student
And before anyone comes at me with this "But you can technically do that if there's k*N elements and it would still be linear time" shit, fuck off; there's a worst case of needing to write to half the elements in the 2d array so it's still N^2 no matter how you try to "but technically" your way though it.3
Made a simulation/game in java using swing that runs on this algorithm:
-2D array was made (kinda like a chessboard).
-Random living cell was placed on the board.
-If a cell has X or less cells around it (living) it duplicates.
-If a cell has Y or more cells around it, it dies.
I was amazed at the types of shapes this created. There were so many variables I could play with, and probably spent hours just experiementing. I was really satisfied in the end. 😄4
So i'm working on this course assignment program and i'm trying to remove object from a 2d array and I couldn't figure it out how to do it without messing the array indexes. Wen I was using aarrayList I could just do arrayName.remove(number), but not with the regular array. Than I had an enlightment moment.
Why not just move the object off the screen?1
I am trying to learn creating games for android (+- 0 android expirience).
I figured I could use GoDot for it's awesome pricing (free, no strings attached).
I've done few minor things, but, to be perfectly honest, I'm fed up of GDscript. I just internally hate it more every single time I touch it, so recently I stopped attempts to learn doing games for droid/iOS.
I'm looking for free alternative to godot, preferably no strings attached, but wahtever... Here is what I need:
- I prefer code, but doing stuff in GUI is fine, but stuff like making level etc, preferably in UI
- C++ derrived syntax (ex. c# etc. c++ is fine too), no BS like some wacky workaround to do basic shit like 2d array....
- easy android/iOS export (like in godot, one day I was attempting to hello world in android and compiling for first time... was quite an advanture)
- some easy way for restfull apis
Good to have:
- ability to test project without android VM
- observer pattern (signals/slots)
I don't care what structure it's made, for me milion of scenes on one screen was extremly coutner-intuitive but meh, whatever. As long as it's possible to learn, it is fine.
Can devranters help, please?
Guys, is any one worked with d3.js ?
I need a graph and my data source is a 2d array, A Boolean array I mean.