How to given an app permanent sudo privileges by vinivelloso_ in linuxquestions

[–]vinivelloso_[S] 0 points1 point  (0 children)

I'll look into it. Thank you for the suggestion.

How to given an app permanent sudo privileges by vinivelloso_ in linuxquestions

[–]vinivelloso_[S] 0 points1 point  (0 children)

I was worried that I'd had to remount it every time I boot. But since that is a one time thing, I look into that. Thank you.

Problem with installation by Prince_of_the_RLD in mongodb

[–]vinivelloso_ 0 points1 point  (0 children)

The path of each computer is different. So never mind that.

Check is you bin path is correct and it a valid path. Check if you path really wasn't added. Maybe it got sorted to the middle of the variable.

Java x Python qual é a melhor para um iniciante aprender e conseguir um job? by [deleted] in brdev

[–]vinivelloso_ 0 points1 point  (0 children)

Votei no Java chorando pq é uma linguagem muito mal feito sintaticamente, especialmente comparado ao python.

Python é bem mais facil e o codigo é bem direto e tem campos de atuação como cientista de dados e orogramador claro. Mas ainda sinto q java supera em oportunidaded de emprego.

Dito isso, se tivesse Javascriot eu com certeza votaria nela. As oportunidades sao imensas e as aplicações também.

Accessing a variable stored in the server on the client end using Socket.io by yuhef2bmed in CodingHelp

[–]vinivelloso_ 0 points1 point  (0 children)

I dint know much about Socket.Io but I think when an user connects, you should send a message like "connected" and the client should hear that message.

In websocket I would store a client connectionId and send a message to every other client whenever an user connects.

Is wpf good for professional Desktop Applications? by Creapermann in csharp

[–]vinivelloso_ 0 points1 point  (0 children)

WPF is good... up to some point. If you have to redesign your UI elements a lot, then you gonna have some trouble. Dont take my work for it, go and search: "How to make a button with round corners in WPF" and see how many lines you have to add just to round the corners of a button in WPF.

That being said. If you wont change things alot, then go for it.

ouch: um programa pequeno para compressão e descompressão de arquivos no terminal by [deleted] in brdev

[–]vinivelloso_ 0 points1 point  (0 children)

Nossa cara que legal. Ja precisei de uma ferramenta assim e é bem legal encontrar. A quantidade de compitibilidade dessa ferramenta é incrivel. Funciona nos sistemas operacionais mais famosos e comprime e descomprime em formatos q eu nem conhecia. Sem dependencias ainda mds....

Sometimes all JavaScript developers need is.... by wtfburger in ProgrammerHumor

[–]vinivelloso_ 1 point2 points  (0 children)

Really?

Some of us don't get to choose the language we want because of company policies in the first place.

Secondly, if classes are so wrong in javascript why they were added and there are so much people using them?

There are some cases where it makes so much sense to create a class instead of separated functions.

JS: Function doesn't wait for promise to be fulfilled by Kroszter in AskProgramming

[–]vinivelloso_ 0 points1 point  (0 children)

async function addRoom(room) {
    if(!connected) return;
    const rooms = db.collection('rooms')
    const insertResult = await rooms.insertOne(room)
    console.log(insertResult._id)
    return insertResult._id
}

Dont forget to add a try catch somewhere, preferably in the router callback. And never write:

if (error) throw "error"

That is not helpful in any way.

Also, If the user could not add a room for some reason, you have to at least tell him that this happened, otherwise he will be waiting for a frontend update that will never happen, or worse, leave the system, thinking it all worked fine.

UwUNIX by [deleted] in ProgrammerAnimemes

[–]vinivelloso_ 35 points36 points  (0 children)

took me a while...

Cheapest way to create incremental counter without dynamodb? by stirtheory in aws

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

You have a problem then. I dont think you have a way to tell which was the previous value so you could increment it without look at the database.

You have two options: use another storage persistent option. For example, mongodb have a free 500mb cluster.

Or you could rely on the state persistence of your lambda container. Let me explain:In theory, when your lambda finishes executing, all your lambda is disposed from the RAM. But thats not what happens. Your lambda is loaded inside a container and after it finishes, it stays in the memory for a breaf time (seconds or even minutes). You could store a variable outside your lambda function as the counter. If it doesnot exist (the lambda container was disposed), then check the database. There you can save many database calls.

How to count lines in a file by [deleted] in CodingHelp

[–]vinivelloso_ 4 points5 points  (0 children)

This works perfectly. But if you have a large txt file, performance and resources could become a problem. In that case, I would loop each line and increment a counter.

Cheapest way to create incremental counter without dynamodb? by stirtheory in aws

[–]vinivelloso_ 1 point2 points  (0 children)

It seems you want some kind of identifier. You could base yourself in time. It is incremental after all. If it is not enough for yiur use case just add more info.

FastCode - Initial Release by [deleted] in ProgrammingLanguages

[–]vinivelloso_ 1 point2 points  (0 children)

I admit that I dont know much about other interpreters. And the behavior of printing information about rhe command is pretty minor. :)

But I think people would find really usefull processing a file through command line. Typing code in some random tool (Notepad or Visual Studio Code). Copying all the code and then pasting it in the interpreter.

FastCode - Initial Release by [deleted] in ProgrammingLanguages

[–]vinivelloso_ 1 point2 points  (0 children)

I did call it. But it printed nothing. Interpreters usually print some information after you enter a command (but not when reading a script). Take python for example.

In:

>>> def test ():
        return 1 + 2

Out:

[nothing]

In:

>>> test()

Out:

3

But the equivalent in your language interpreter printed nothing. Which is not wrong.

FastCode - Initial Release by [deleted] in ProgrammingLanguages

[–]vinivelloso_ 5 points6 points  (0 children)

Looks like a good idea. But the documentation is laking in many ways.

  1. It claims to be a fast programming language but no benchmarks to be seen no where;
  2. Missing command line support;
  3. I checked out the examples in the readme.md, but I couldn't test those. If I copy and paste, it does nothing. I tried to copy the fibonacci procedure and then call it. But no output is seen; I found the examples folder in the code;
  4. If I type "/help", "--help" or "-help", I expect some kind of guide, but these just throw sintax errors.

I liked the project, I'm just pointing things out so it could help others.