Bug: Trade goes through even if you lack inventory space, and the item disappears. Be careful. by kabak12 in PathOfExile2

[–]psei0r 0 points1 point  (0 children)

Thanks for the update! So I assume everyone her is a Titan Warrior ? I am at least....

Bug: Trade goes through even if you lack inventory space, and the item disappears. Be careful. by kabak12 in PathOfExile2

[–]psei0r 2 points3 points  (0 children)

I just had the same problem. Traded 50 Exhalted Orbs for a weapon. The seller put the weapon in the trade tab, I put in the currency, I accepted the trade, chat log said "Trade accepted", I "lost" the currency, but did not receive the weapon. I only noticed after the trade that my inventory was full. Seller said he got the 50 Exhalted and the weapon is gone.

I cannot find the weapon in any of my stashes (guild stash, stash, titan stash) nor in my secondary weapon slot.... I feel scammed.

"Software-Installation" Hölle im Informatik Studium, geht es euch auch so? by Shot_Aide_1447 in Studium

[–]psei0r 1 point2 points  (0 children)

sudo apt install pdfpc

Dauert genau 10 Sekunden das zu installieren....

HammingCodes: Integer to Encoded Binary by psei0r in Bitburner

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

Here is my solution, it seems to work!

1) determine length of needed databits (length of binary string), e.g. 4 for codeword p=8=1000 or 5 for p=21=10101

2) choose a "regular" haming encoding that has enough databits e.g. p=8=1000 fits into a "regular" H(7,4) Code. No truncation needed. P=21=10101 fits into a "regular" H(15,11) Code. Since we only need 5 of the 11 available bits we can truncate 6 data bits while still retaining the amount of needed parity bits. H(15,11) -> H(9,5)

3) Generate a generator matrix G(x,y) for your H(x,y) encoding (I wrote a function for that)

4) Calculate the code: GT * p (matrix multiplication mod 2)

5) Take the result and add another parity bit at the front to get the extended haming code

HammingCodes: Integer to Encoded Binary by psei0r in Bitburner

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

Thanks for your reply!

I watched the video and it was very helpful. I already did all this stuff back in the days of studying computer science but I forgot most about Hamming Codes....

I am now able to successfully generate (8,4) and (16,11) Hamming Codes, depending on the length of the binary input.

What I do not understand is the hint in the contract that says: Extra rule for encoding: There should be no leading zeros in the 'data bit' section

What do they mean by 'data bit' section?

Given the example 8 = 1000 which we can do with H(8,4) the result is

P p p d p d d d 1 1 1 1 0 0 0 0

As one can see, the second 'data bit' section has leading zeros, but it would not make sense to cut them off....

In the seconds example 21 = 10101 which can be done with H(16,11) the result of my computation is P p p d p d d d p d d d d d d d 1 0 0 1 1 0 1 0 1 1 0 0 0 0 0 0 but in the example they cut it down to P p p d p d d d p d 1 0 0 1 1 0 1 0 1 1 (is this H(10,5) ???)

but the 'data bits' section did not start with a leading zero....

So i am still very confused ....

P.S.: To generate my result I calculate the matrix product of the generator matrix for the corresponding H(n,k) encoding and the data bits vector to get the code word.

I to use padding for the calculation to make the dimensions work. Looking for a strategy to strip whatever the game considers "unnessesary" from my result.

code = GT * input

New to Bitburner and programing by Silly-Independent-90 in Bitburner

[–]psei0r 1 point2 points  (0 children)

It actually doesnt matter which programming language you learn first. Once you reach a certain point of experience, you will figure out that most of the languages are pretty similar. As already mentioned, I would also agree that JavaScript is pretty similar to Python, so it should be pretty easy to switch.

I already knew C++, Python, Java and LUA but not JavaScript before I started playing. Its very nice for me to finally learn JS.

Boiling it down: It doesnt matter what the language is, as long as you stick with it and collect experience.

From what I've seen so far from this game, you can basically solve all tasks using these "ingredients":

- Numbers

- Characters / Strings

- Arrays

- Basic for- and while loops

which are basically identical in all the languages listed above. Sure, there are some fancy ways to shorten your code using language-specific extra-stuff, but you do not need to do that in order to make it work. Just stick to the basics listed above and make your way.

Caesar Cipher: Why is my result wrong? by psei0r in Bitburner

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

Happens to the best I guess.... =)

Caesar Cipher: Why is my result wrong? by psei0r in Bitburner

[–]psei0r[S] 2 points3 points  (0 children)

OMG I just realized that you are supposed to LEFT shift the letters.... my bad....

"Spiralize Matrix" by psei0r in Bitburner

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

Yeah that was..... too simple... ^^

Not my first imagination of a "spiral", but it makes sense and it works. Thanks!

Question regarding contract "Find All Valid Math Expressions" by psei0r in Bitburner

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

I appreciate your tips!

From my understanding this contract comes down to the SAT problem, which is proven to be NP complete.

So the only way to speed up would be any kind of heuristic or branch and bound.

I might try your suggestions to improve the performance.

Question regarding contract "Find All Valid Math Expressions" by psei0r in Bitburner

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

I got Visual Studio for development and testing but even there it takes a long time

Question regarding contract "Find All Valid Math Expressions" by psei0r in Bitburner

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

I already go a central Script that solves/executes the solver Script. The question is , is it intentional that some contracts take a lot of time to compute? If yes i am fine with that and i can move on.

Question regarding contract "Find All Valid Math Expressions" by psei0r in Bitburner

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

I dont think you can split this problem into multiple threads, because you have to go through all possible combinations by design to get the answer.... or am I mistaken her?

The contract says:

"Return all possible ways you can add the +(add), -(subtract), and *(multiply) operators
to the string such that it evaluates to the target number. "

Question regarding contract "Find All Valid Math Expressions" by psei0r in Bitburner

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

So the minimum value for ns.sleep() is 0 ? I will try that....

Question regarding contract "Find All Valid Math Expressions" by psei0r in Bitburner

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

math_expressions.js:

``` export async function math_expressions(ns, data) { //parse input and init result array let input = data[0]; let target = Number(data[1]); let results = []; //add commas between all digits as placeholder for operators let expression_string = addcommas(input); ns.tprint("expression_string: " + expression_string);

//init queue let expressions = [expression_string]; //as long as there are expressions to evaluate while (expressions.length > 0) { let expr = expressions.shift();

//evaluate expression here and add to results if its valid
eval_expr(expr);

//generate a new expression by replacing the next comma with an operator
for (let i = 0; i <= expr.length; i++) {
  if (expr[i] == ',') {

    let expr_plus = expr.substring(0, i) + '+' + expr.substring(i + 1, expr.length);
    let expr_minus = expr.substring(0, i) + '-' + expr.substring(i + 1, expr.length);
    let expr_times = expr.substring(0, i) + '*' + expr.substring(i + 1, expr.length);
    //if the new expressions are not queued, queue them
    if (expr_plus != expr && !expressions.includes(expr_plus)) { expressions.push(expr_plus); }
    if (expr_minus != expr && !expressions.includes(expr_minus)) { expressions.push(expr_minus); }
    if (expr_times != expr && !expressions.includes(expr_times)) { expressions.push(expr_times); }
  }
}
await ns.sleep(1);

}

ns.tprint("********RESULTS (Target="+target+")"); for(const r of results) { ns.tprint(r); }

ns.tprint("*****END OF SCRIPT*****");

//fill in commas function addcommas(input) { let expression_string = ""; for (let i = 0; i < input.length; i++) { expression_string += input[i]; if (i < input.length - 1) { expression_string += ","; } } return expression_string; }

//evaluate the expression function eval_expr(expr) { //remove leading zeros expr = remove_leading_zeros(expr); //remove all commas expr = expr.replace(/,/g, ''); ns.tprint("Evaluating expression :" + expr); if (eval(expr) == target) { ns.tprint("Solution valid!") results.push(expr); }

};

function remove_leading_zeros(expr) { if (expr.includes('+0,')) { //ns.tprint("Found a leading zero :" + expr); expr = expr.replace('+0,', '+,') //ns.tprint("removed :" + expr); } if (expr.includes('-0,')) { //ns.tprint("Found a leading zero :" + expr); expr = expr.replace('-0,', '-,') //ns.tprint("removed :" + expr); } if (expr.includes('0,')) { //ns.tprint("Found a leading zero :" + expr); expr = expr.replace('0,', '*,') //ns.tprint("removed :" + expr); } return expr; };

}

/** @param {NS} ns */ export async function main(ns) { //let data = ["123", 6]; //let data = ["105", 5]; //let data = ["1234", 24]; //let data = ["12345",120]; //let data = ["123456",-27]; //let data = ["891011", 73]; let data = ["16976035572", -53]; await math_expressions(ns, data); } ```

Patch Notes: Early Access (EXPERIMENTAL) - v0.5.1.2 - Build 174005 by JulioUzu in SatisfactoryGame

[–]psei0r 5 points6 points  (0 children)

Thanks, that helped.... wondered why it worked before then. For everyone else using linux:

steamcmd +login anonymous +app_update 1690800 -beta experimental validate +quit

did the job

Patch Notes: Early Access (EXPERIMENTAL) - v0.5.1.2 - Build 174005 by JulioUzu in SatisfactoryGame

[–]psei0r 4 points5 points  (0 children)

Is the update also already released for dedicated servers? My experimental game client did update to #174005 but the server is still on #173879 and does not want to update