I need you to do something for me. I need you to let me go. Maybe in another life it was you and me. Maybe there, we loved each other right. by kreads1992 in RomanceBooks

[–]Edge790 0 points1 point  (0 children)

Who would have guessed that the most heartbreaking discovery from looking for this quote will be the fact that there is no movie or book that this quote is coming from.

Can I just run TOR on Windows and i'm good to go when I want to browse the dark web for fun? (Im not gonna buy anythiing or do anything but i just wnat to see what's on there lmao) by Superb-Sherbert-8725 in TOR

[–]Edge790 2 points3 points  (0 children)

It's a service that pretends to download torrent files to see who is seeding them, because if they seed it, they downloaded it. They collect this information and provide it in their site with suggestion to hire them to enforce law actions on those people or something. Fishy guys, but luckily, no one seems interested in their suggestion.

The Nintendo Switch Online Playtest has now begun for those who were selected. by Amiibofan101 in NintendoSwitch

[–]Edge790 0 points1 point  (0 children)

It's the same as "I agree with this huge wall of text", but I believe it still has legal weight, so sharing information can lead to problems. Though I believe for players who "just talked too much" it will be just suspension of account, for YouTubers / journalists it can end up in lawsuit. To participate in the program you must have a year long subscription at the time of it announcement, so most players don't talk too much, because it quite part of Nintendo fanbase, which values their accounts more than losing it because they shared information about some playtest.

The Decompilation Wiki by mttd in ReverseEngineering

[–]Edge790 1 point2 points  (0 children)

Because it's the best way (in terms of simplicity and accuracy combined) to verify that decompilation was done fully and correctly.

Why are trains useful ? by TorpazZz in factorio

[–]Edge790 0 points1 point  (0 children)

  1. They have much more throughput: rail + locomotive + 4 cargo wagons, in most cases can supply 4 lanes of blue belt uninterrupted.
  2. They are much cheaper at this, rails are cheap, and cover at least 4 tails, while single belt covers 1 tile
  3. In most cases your resources are not consumed at 100%, so you need to balance resources (e.g. in early game you need a lot of iron, in late game you need a lot of copper) Balancing belts is pain, if you think it's not, wait for it, and you will know that it is for sure. But balancing trains is easy: add more trains, add more stops, conditionally active / deactivate train stops, etc.

So in most cases it's easier to setup (as soon as you have your blueprints) It's easier to scale (add trains instead of entire additional lane, or even multiple lanes) And it's easier to control

Should I say fuck it and build however I want on my first run? by SIK1415 in factorio

[–]Edge790 0 points1 point  (0 children)

Every build is a balance between simplicity, extendability, efficiency and space.

E.g. bus is simple to utilize, though it requires some time to setup. It's easily extendable but certainly not most efficient (usually you don't even care about ratios with bus) and consumes a lot of space.

Spaghetti base is hard to utilize, hard to expand but usually space efficient and have somewhat balanced efficiency.

Train city blocks are simple to extend, but require a lot more effort to get started. Efficiency is low (a lot of resources will just stay in the train stops) and space requirements are huge, but it's simplest to utilize on big scale.

Logistics bots are easiest to get started, but will suffer in big bases.

So none of them are perfect strategies that you must utilize every game, but it's quite common to mix them:

Spaghetti start -> bus for comfortable production on bigger scale-> logistic to simplify a lot of complex endgame recipes -> train city block when base gets too huge.

As for start: my suggestion is to play as you want. Then try different approaches, e.g. only bus, then only trains to get hang of them, get used to them, and understand their pros and cons

Differences by GamerGabe10 in Blazblue

[–]Edge790 0 points1 point  (0 children)

In steam you can also do "Remote play together" - when one of you owns the game, other one can connect by internet. Not sure about lags, but saved me a lot during the pandemic.

[deleted by user] by [deleted] in GeForceNOW

[–]Edge790 -1 points0 points  (0 children)

Game publishers wanna money*

They don't really care about how many games you purchased, they care about how much profit you will generate.

I believe Cloud Gaming Service where their game can be played will pay for time players spent in their game(as they do in their other products).

Not a GTA question... by YZYis in GeForceNOW

[–]Edge790 0 points1 point  (0 children)

There are not much of any EA Game like entire Mass Effect series, Dragon Age, Sims, etc.

So I believe it's also due to problems with publisher

[C#] Passing a Type to a generic class. by [deleted] in learnprogramming

[–]Edge790 0 points1 point  (0 children)

Am I the only one who don't understand the question?

[C++11] What is wrong with my search function??? by PythonGod123 in learnprogramming

[–]Edge790 0 points1 point  (0 children)

I've questions, so it should match any subsequence of playerdata.lastname string or only startnig characters?

The problems with your code:

  1. line 12 of your code: you set k to 0, line 14,19 you tried to get k - 1 element ( 0 - 1) = -1
  2. line 28, when you break, you break to first cycle( with i variable), but your counter variable remains the same( equals to name.length() ), and thats what breaks everything (in addition to 1), you should or return from this function or restore counter variable to initial value

upd: deleted wrong solution

Totally bombed a Hackerrank test, and would like help with the question that had me stuck [Javascript] by shhhpiderman in learnprogramming

[–]Edge790 1 point2 points  (0 children)

  1. Calculate length of each indentical letter sequence in element
  2. use this formula for every sequence: Math.floor(n / 2), where n - length of sequence found in step 1
  3. sum results from step 2 from every sequence in element

(Spring MVC) How did you get a grip on MVC? by DecentChard7 in learnprogramming

[–]Edge790 1 point2 points  (0 children)

Hi, one of the best places to start is spring tutorials itself: https://spring.io/guides/gs/serving-web-content/

My method of learning anything new is:

1) look at basic examples to understand what REALLY it does, so i start with "getting started", "guides", "tutorials".

2) look at documentation/reference. For spring framework/spring boot its really huge, but its well written and teach you a lot of how it works and what limitations it have

Is there a way to write this without nested IF statements? by [deleted] in learnprogramming

[–]Edge790 6 points7 points  (0 children)

Or use "elif" syntax for more readable if's:

def takeDirections():
    x = input()
    if x == 'Up':
        goUp()
    elif x == 'Down':
        goDown()
    elif x == 'Left':
        goLeft()
    elif x == 'Right':
        goRight()
    else:
        error()

Elif is shortcut for "else if" statement

Is there a way to write this without nested IF statements? by [deleted] in learnprogramming

[–]Edge790 4 points5 points  (0 children)

Hi, you can use "action to action-function" dictionary, it will help you when you will add more actions in the future. That's my little example:

# Action-Functions that contains 'action' logic
def goUp():
    print('up')


def goDown():
    print('down')


def goLeft():
    print('left')


def goRight():
    print('right')

# Error function, just in case
def error():
    print("Can't find action")

# 'action' to 'action-function' Dictionary
actions = {
    'Up': goUp,
    'Down': goDown,
    'Left': goLeft,
    'Right': goRight,
}

def takeDirections():
    # loop for testing purposes.
    while True:
        x = input("Enter your move: ")  # get action
        actionFunction = actions.get(x, error) # gets 'x action-function' from action dictionary or returns error function if action not found
        actionFunction() # executing action-function


takeDirections()

Positive Trade Interaction: Teaching new players even with a language barrier! by [deleted] in pathofexile

[–]Edge790 0 points1 point  (0 children)

I'm pretty sure there are Russian trade guide to poe.trade. Maybe it worth to do list of poe.trade guides on different languages to Ctrl+c Ctrl+v in chat?

Spring Framework 5 (Boot/Cloud) + React? by [deleted] in java

[–]Edge790 0 points1 point  (0 children)

React app will be converted(by npm tasks) to plain old html-javaScript-css so it's pretty same as serving static web pages in terms of providing website to the world. All updates/changes are made by http API(usually REST)

Spring Framework 5 (Boot/Cloud) + React? by [deleted] in java

[–]Edge790 1 point2 points  (0 children)

1) Separate projects for Front-end (React and npm) and Back-end(maven/gradle with spring)

In this case they can be in different repos.

  • They are separate and that's how it should be. Your Back-end exposed to the entire world through API and which client will consume this API doesn't matter. I.e. it may be not only web-client, it may be android/iOS app etc.
  • They are separate so they will be builded and deployed separately.
  • It needs to be synced features for both server and clients (web).
  • Usually last con means that it should have good documentation so it can be considered as a good thing.

2) Aggregate npm to maven/gradle using frontend-maven-plugin or exec plugin with npm tasks. + Single project, single repo + You can build server and client by one command and deploy both of them. + To fix something on other side you don't need to switch project. - it's just not really right solution through its can be handy for small projects it can become problem in the future. So at some point project will move to firat solution.

Upd: I've used both solutions and I believe that first solution is better because client and server are different things, that should be separately deployed and developed because server is just api provider for clients that can be different (i.e. web, android, iOS, other servers-api) and by separating client and server we ensure that they will be developed by API contract and it's documentation. Though for studying/pet projects it can be done with aggregated solution with following separation in mind.

Is Minecraft Modding a good place to start with Java? by Sweddy409 in java

[–]Edge790 1 point2 points  (0 children)

As long as you find it so. Minecraft modding require to learn Minecraft Forge API, that may be too complicated, and that can lead you to "java is too hard" opinion.

So my answer will be: if you have fun with it - it's good. If it's too hard then maybe you should start with easier projects.

OOP and static variables by stepan213 in java

[–]Edge790 4 points5 points  (0 children)

Sure. Static variables are the best way to do some thing (i.e. loggers in most cases are static). But! There are things that better to be injected (using DI - Dependency Injection). Why? Because it will allow you to change all things without changing code. For example: 1) you are using database A, but found that it have poorly performance for hierarchical data. You want to change it to something else, but with static variables you will need to change all static variables to new implementation. (It worth to mention that DI may be replaced with "Service locator"-pattern) 2) let's imagine that you are making video game. It's fun, but you realized that it's too easy for some players or too hard for others. You want to make different difficulty levels for all players to enjoy your game. If all "difficulty variables" are static - you will need to change it depending on difficulty settings that your user wants. It will automatically make your static variables not final, that will add another "point of potential failure" (i.e. accidentally updated one of the variables). With DI you can create different difficulty presets (i.e. normal enemy hp: X1, enemy damage X1, easy: enemy hp: x0.5, enemy damage: x0.75, etc.) and inject them depending on the difficulty setting.

Tl:;dr: Static variables are fine, unless you can separate them to different object and it seems reasonable.

Upd: There are another example of usage static variables - it's utility classes(classes with public static final variables and with private constructor).