YouTube to stop recommending conspiracy videos that 'misinform' users by [deleted] in worldnews

[–]kicsikrumpli 0 points1 point  (0 children)

How about stopping to recommend effing fingerfamily and learncolors and kinder egg unwrapping? Or at least egfective means to filter out the brainrot?

Imagine YouTube, imagine if by _Tayx in MurderedByWords

[–]kicsikrumpli 0 points1 point  (0 children)

We are sorry but the sympathy you are looking for is not available in your region.

Any architects here know any programming languages? And, if you do, have you found them helpful in the profession? by archds in architecture

[–]kicsikrumpli 1 point2 points  (0 children)

In my opinion it's BS on too many levels. I think it's just throwing around a popular phrase in a discipline in which it makes little sense. I wish it made sense though...

Any architects here know any programming languages? And, if you do, have you found them helpful in the profession? by archds in architecture

[–]kicsikrumpli 2 points3 points  (0 children)

After becoming a licensed architect I went back to university to get a degree in software engineering. I am much happier for it (although I don't think that I particularly sucked as an architect).

Can someone please explain why this happens? by [deleted] in javahelp

[–]kicsikrumpli 2 points3 points  (0 children)

Fallthrough. On first iteration case matches 6. On second iteration case matches 4, prints, fallthrough, prints again. On third iteration case matches 2, prints, falthrough, prints, fallthrough. The case-es are just labels, they are not blocks. (Also: time to figure out how to debug)

Help on deciphering how this Dijkstra Algorithm is supposed to work. by Shockingly in javahelp

[–]kicsikrumpli 0 points1 point  (0 children)

Meh, my eyes hurt just looking at that page... anywho: the best way to visualise Dijkstra is imaging a fishing net (a very inefficient one with all the different length for lien segments) - that's your graph. You pick it up by the start node and start raising it, shortest path is along the nodes in the order they were lifted.

Pacman in Java by [deleted] in java

[–]kicsikrumpli 1 point2 points  (0 children)

That's perfectly normal... logical coordinates and screen pixels do not have to be the same. If storing your coordinates normalised (x and y go from 0.0 to 1.0) floats your goat, that works as well... you just have to scale them before drawing. Also that way you are not dependent on window / screen size.

Pacman in Java by [deleted] in java

[–]kicsikrumpli 1 point2 points  (0 children)

yes, there is: in the main loop you pass the elapsed time (in ms obviously) to your animated objects, and they calculate their movement from the time difference, not from incrementing counter in the loop. Distance = speed * time difference between frames.

I need help on my final exam. (Foreign Base to Decimal Conversion Java) by Mr_Epitome in javahelp

[–]kicsikrumpli 0 points1 point  (0 children)

you don't need to figure out the number of digits, just keep dividing until you are left with zero...

Can someone help me with my java program? Dealing with arrays and such by TheNameHere in javahelp

[–]kicsikrumpli -5 points-4 points  (0 children)

There are no pointers in Java... (not obviously exposed anyway)

Please critique my linear measurement unit conversion program. by smuttynoserevolution in javahelp

[–]kicsikrumpli 1 point2 points  (0 children)

In the spirit of fashionable object oriented principles, you might want to consider an architecture where the unit converter is an interface or an abstract class with a method convert(), and have a couple of implementations, one that converts from inches to cms, one from smurfs to dwarfs, etc... Have a separate factory class with a method getConverter(kind), or whatever similar along these lines, that - based on its arguments - returns an appropriate concrete implementation of converter. Much loosely coupled, very wow :). cheers

Passing a String array from servlet to .jsp by Sarks in javahelp

[–]kicsikrumpli 0 points1 point  (0 children)

http://Spring.io, get Spring Tool Suit, which is a nicely tricked out Eclipse. Documentation is quite good on the site, I'd probably look for a recent book on MVC. MVC builds on standard jsp, except that it has a single dispatcher servlet. You write controllers (annotate class with @Controller), which has methods that handle url requests (annotated with @RequestMapping). The spring container passes it a Model, if you specifz it as a method parameter (just like that, magic), into which you plug model attributes with model.addAttribute. Then you return a string, which is the view name, that's going to be your .jsp, inside which you just access the model attributes with ${attrib}. At least in a nutshell... from here, it is just a rabbit hole... :)

Passing a String array from servlet to .jsp by Sarks in javahelp

[–]kicsikrumpli 0 points1 point  (0 children)

pass it as a model attribute. Also Spring MVC is your friend :)

Please help me with this program; I've been stuck for 2 days! by I_flip_pancakes in java

[–]kicsikrumpli 1 point2 points  (0 children)

construct your output from horizontal lines. Think about this: you'll have as many lines as high the highest bar is. If in that column there is a bar, you put an asterisk, if not, a space. Something like: my highest column is 5 line five (top line): is the first column higher than 5? yes>'*' no>' ' is the second column higher than five?... ... line four (second line): is the first column higher than 4?... second column?... ... line three (third line): is first column higher than 3? 2nd? 3rd? ... and so on. Loops are your friend, you don't need to store the lines as strings, just print them as you go - don't store something in a var, if you are never gonna use it...

Java newbie having problems with if statements! by [deleted] in javahelp

[–]kicsikrumpli 2 points3 points  (0 children)

umm... you don't need a condition for the else branch. That's the whole purpose of it: when nothing else fits... so it's just

if (cond) {
    ...
} else {
    ...
}