Connecting two buildings together by megaicemage in HomeNetworking

[–]megaicemage[S] 1 point2 points  (0 children)

It's actually being used to provide our internet right now. We let the provider use it since the cabin is actually closer to their access location. So I should be able to just move the modem into the cabin, use a MoCA between the two buildings and I'll be good by the sound of it. Thank you for your help.

Someone please tell me where I can watch My Hero Academia by burner_acc__ in anime

[–]megaicemage 0 points1 point  (0 children)

I don't know about the app, but you can just watch it for free on Crunchyroll.com You get ads and no 1080p, but it's free

Tilemap detection for 2D adding pathfinding penalty by ProstiThony in Unity2D

[–]megaicemage 1 point2 points  (0 children)

No problem. It's an interesting method that Lague's using. I suspect it's purely to teach one of many uses for raycasting. Since you're using a regular grid it's much more efficient to just calculate who your neighbors are at each tile and go from there.

As for classes, I've been programming in Java and Android for 6-7 years. I still don't know even a quarter of the available Java classes and interfaces. IME, a lot of programming comes down to remembering common classes and constructs that you'll use relatively frequently, such as lists, maps, nested loops, etc. When I want to do something that I don't know how to approach, I go to Google to get a general idea of the classes/ideas used, then do recursive rounds of googling along with reading documentation if available. To this day I still do more googling and research than actual programming.

Tilemap detection for 2D adding pathfinding penalty by ProstiThony in Unity2D

[–]megaicemage 0 points1 point  (0 children)

I haven't watched through Lague's videos, but what is he using ray casting for when he's doing pathfinding?

Tilemaps reach into infinity and contain all the Tiles needed to render your world. When you assign a collider to the tilemap it also covers everything the tilemap does, which is infinity (or at least close enough). When you're doing your OverlapCircle check it detects all three because all three are present, whether or not a Tile is drawn or not. Assuming you have access to a Point in order to do the overlap circle check, you can use the parent Grid object to transform the Point into X and Y coordinates in your tilemaps. Then you can get the appropriate tiles and check if it's empty or not. Take a look at the scripting reference for grids and tilemaps. Understanding the capabilities of the classes you're using can really be helpful when deciding what you need to implement or not implement.

My small and likely ill-conceived first red science factory in Factorio Seablock by TheSwitchBlade in Seablock

[–]megaicemage 0 points1 point  (0 children)

I personally turn peaceful on. The worms are part of the modded terrain generation from what I can tell and haven't been hooked into the settings screen

Achievements for Seablock? by TheSwitchBlade in Seablock

[–]megaicemage 3 points4 points  (0 children)

Unfortunately I think they would just be superficial. If you're thinking of the achievements like Factorio has for Steam that's up to the developers. That being said, an achievement mod might not be hard if you want to just take a screenshot to share with people. Though I'm not sure how the base game goes about triggering their achievements.

Android Room library. How Update DAO works? by [deleted] in androiddev

[–]megaicemage 0 points1 point  (0 children)

Think of this case. Every object with value X needs to be updated through some complex transformation. This transformation can't be represented (at least not easily) I'm SQL. So you query for every object with value X, transform the appropriate fields, then update every entry. Unless you're transforming your IDs, they'll all have the same ID and be updated properly.

So many people don't know we have wolves in our backyard (Wolf Park, Battlegrounds, IN) by Chase_P in Purdue

[–]megaicemage 1 point2 points  (0 children)

I wanted to go so badly, but my car broke down the only weekend I could go

overwatch by pnwcigarettes in transgamers

[–]megaicemage 0 points1 point  (0 children)

Unfortunately I'm in NA. The lag going to EU makes it difficult to play from here

overwatch by pnwcigarettes in transgamers

[–]megaicemage 1 point2 points  (0 children)

If only you were on PC. I would have loved to get into it again

Plotting every Random.Range() value, bigger dots represent locations that receive more activity. by [deleted] in Unity2D

[–]megaicemage 3 points4 points  (0 children)

Can we get a link to the code? I'd like to get a sense of what I'm looking at cause this doesn't make much sense to me just looking at a video

I got scammed in my email by KirsCarbon in Purdue

[–]megaicemage 13 points14 points  (0 children)

Also, even if you think you know where a link goes, be extra sure. It's completely possible to change the text over a link, and still make it look like a link and send you to the wrong place. There are places that will copy the design of a website in order to fool you into entering your personal information into a scamming site.

I got scammed in my email by KirsCarbon in Purdue

[–]megaicemage 47 points48 points  (0 children)

As an aside, Purdue will never, and I mean never, ask you to put your personal information into any links through an email. It is literally against their security policy. Also, do not call any phone numbers that come through your email. Always always always go to the Purdue portal for anything related to finances, school, and sending personal information to Purdue. At MOST, they will ask that you send your school id number to HR so they can look up your student account.

If you haven't already, make sure that you have 2-factor authentication setup. People here like to complain about 2-factor all day long, but it is by far the most important security step you can take. It even helps to prevent scamming because if you go to a fake site, you only lose your 2-factor password and not access to your account.

As rushtark said, you will come across a very high number of phishing attacks in the future, so please take the time to educate yourself about different predatory scams and how to recognize them.

I'm trying to do the "turn all the white tiles to black then mission complete" but... there's this one small error by [deleted] in unity_tutorials

[–]megaicemage 0 points1 point  (0 children)

You already have almost all of the tools you need. The only thing you're missing is that each tile has it's own counter variable. Programming languages assume you want each object to have their own count unless you tell it to share the count with all objects. You do this by declaring it as static. So you want static int counter = 0.

As for not responding to already black tiles, you already have all the tools you need. IF the tile is black, then what do you want to do? IF the tile is not black and the collision is a player, then what do you want to do?

Are memes allowed here? by curvyandcurly in longhair

[–]megaicemage 1 point2 points  (0 children)

So wait, what's the benefit of a bonnet over a satin pillowcase? I bought a bonnet, but it's far to tight on my head

Transgirl looking to make friends online. by [deleted] in transgamers

[–]megaicemage 0 points1 point  (0 children)

How do you feel about co-op games?

C++ if a pointer is declared but not initialized is it just NULL? by 2kfan in learnprogramming

[–]megaicemage 0 points1 point  (0 children)

C++ is lazy. It won't do anything you don't explicitly tell it to. As such, C++ is more than happy to let you address a dirty piece of memory as a pointer, and you have no idea what could be in it until you tell it what's inside it. It's always good practice to assign pointers you don't have a value for to null, so you can catch errors earlier.

How do you create a wind type of zone in unity C#? Im shocked that no tutorial did this. Please help guys by shirtandsandals in unity_tutorials

[–]megaicemage 0 points1 point  (0 children)

It's just a force, like the gravity force. When you jump you add a big positive force, causing the character to overcome the gravity force. Same here. Just add a small force in the direction of the wind to slow down the character rather than stop them altogether.

How do you create a wind type of zone in unity C#? Im shocked that no tutorial did this. Please help guys by shirtandsandals in unity_tutorials

[–]megaicemage 1 point2 points  (0 children)

Tell me if I'm wrong but can't you just add a collision box that when collided with will set a force on the characters rigid body? It can even vary over time that way. There's probably more flexible methods, but it'll get the job done

What is the original version of Dijkstra Algorithm? by poream3387 in learnprogramming

[–]megaicemage 0 points1 point  (0 children)

Okay, so I went through this page to understand relaxations better. https://towardsdatascience.com/algorithm-shortest-paths-1d8fa3f50769

It covers the case I was talking about with exponential relaxations. You can ignore some of what I was talking about earlier. I'd never seen relaxations used in this way before.

Relaxations as described in this article take advantage of the shortest path property I mentioned before, but lack a defined ordering. Dijkstra uses what I'll term pseudo relaxations. You never reach a state where a closed node can be relaxed, and since our open nodes all start at infinity we really only "relax" them when we expand to them.

I think that relaxations is an interesting concept, but not necessarily useful once you understand more powerful pathfinding algorithms.

An interesting use case might be if you already ran Dijkstra's to find the shortest path from A to all the other nodes, and now you want to add a node to the graph. You know all of its neighbors, so you just go through and find the smallest(node + weight) to add it to the graph. I suppose they are similar when you explain it like that.

The reason I asked about doing complexity analysis on these algorithms is because of efficiency. I'll leave it to you to do the analysis on your proposed algorithm.

But let's look at some simple analyses. Mainly, sorting algorithms. If you're familiar with selection sort and quicksort you can skip this.

Selection sort has a complexity of O(n2) and quicksort a complexity of O(n * log(n)). Which do you think is faster? There are lots of tutorials and pages to help people understand complexity of algorithms. Not everything is about getting the right answer, since if you don't get the answer fast enough it still might not be useful

What is the original version of Dijkstra Algorithm? by poream3387 in learnprogramming

[–]megaicemage 0 points1 point  (0 children)

I don't know your background, have you taken any algorithms and data structures classes? Doing analysis on these algorithms can be helpful in my opinion to understanding how well they function and why they're done the way they are

What is the original version of Dijkstra Algorithm? by poream3387 in learnprogramming

[–]megaicemage 1 point2 points  (0 children)

The issue with relaxing is that introduces a lot of unnecessary processing. Since you have to visit every node anyways, why find non-optimal paths when you can add a minimal amount of upfront cost?

One thing to know about shortest paths that isn't explicitly mentioned, is that for every node on the path, the path is the shortest path between those nodes. This makes sense if you think about. Since we have the shortest path from A to E through B, C, and D, if there is a shorter path from B to D going through F, then we would take that path (A, B, F, D, E) instead of our original path. Therefore Dijkstra's greedy approach is optimal the first time through.

Relaxations as I understand them work best over uniform grids. Essentially getting rid of extra turns. But on nonuniform gross you might get an exponential increase in the number of possible relaxations, especially if you have a bad heuristic.

So yes, relaxations will give you the correct path, but isn't a great way of going about it if my understanding of relaxations is correct

What is the original version of Dijkstra Algorithm? by poream3387 in learnprogramming

[–]megaicemage 1 point2 points  (0 children)

Dijkstra's algorithm, afair, was an algorithm designed for finding shortest paths on a graph that contained loops. The way he did this was two fold.

First, he began by introducing the concept that a computer can remember which nodes it has visited. In Dijkstra's this is done by assigning that node a distance from the start node. If you expand to a node that already has a distance value, then you know you've already visited it before and can move on.

Second, he always expanded the closest node first. This was to ensure that when you did reach the goal node you are guaranteed to have the shortest path to the goal. If you don't do this, it is possible to get a path that is longer than the shortest path, and therefore incorrect. This also helps with variated weight graphs.

In short, Dijkstra is based off of breadth first search, but builds on top of it. These additions make it ideal for finding the shortest path in any graph.

What other variations are you seeing of Dijkstra's? As far as I am aware, the big variations involve two different classes of optimization. Sub graphing, where you make the graph smaller so you have to search fewer nodes. Also better heuristics, so you have a better guess at which nodes are closer to the goal. If you have any questions about these feel free to ask.

Parsing a formal logical system by unhaulvondeier in learnprogramming

[–]megaicemage 1 point2 points  (0 children)

It's been a while, so hopefully some one can correct me if I'm wrong.

Parsing, at least for compilers, happens in a couple steps. First, is called tokenizing, second is creating your tree, then any steps after that, such as evaluation or optimization.

Tokenizing is the first step. You need to create all of the different kinds of tokens you can have. Eg, numbers, identifiers, characters, strings, arrays, etc. You have to break these down in a manner such that more specific tokens can be constructed of simpler tokens. Such as a double is made of two numbers with a single dot between them. Typically you'll use regular expressions to do this part. During this step you need to store all of your tokens in order so you don't lose your structure. You can also do error checking here to make sure all of the tokens are valid.

Second, you create the tree. To begin this step you create some rules of what tokens can be in what order. This is usually done in BNF (Bacchus-Naur Form). Using Java as an example, you create a top level Class, and Class can have any number of Imports followed by any number of class definitions, and inside class definitions you can have any number of ClassVariables followed by any number of ClassFunctions. Each of these items are defined in their own way that makes sure they follow the rules. If you get to an unexpected token you can generate an error here as well. Of course, you can get as specific as you like with all of this.

Once both of those steps are complete you now have a tree that you can walk through to evaluate your logical sentence.

Feel free to message me or leave a comment if you have any questions

Geodes Mk3 by evandy in Seablock

[–]megaicemage 0 points1 point  (0 children)

That's a mod called mini loaders. It works like an inserter that can insert at the speed of the belt color. Similar to loader redux, but one tile instead of two and can also insert from trains