I am completely stuck

Hi @sanji94m

Those guys on stackoverflow are such assholes sometime …
As someone told you in your stackoverflow post, transaction are not returning values.

You need to declare an event and to call it in your function

  event MyNumber(uint256 nbr);

  function randomnumber() returns (bool) {
    // ...
    MyNumber(nbr);
    return true;
  }

Can you link your solidity code here ?
Use the balise Preformatted text to display your code correctly :wink:

To catch it i usually use once, you can look at this simple example from the doc.
https://web3js.readthedocs.io/en/v1.2.0/callbacks-promises-events.html#callbacks-promises-events

In which course are you stuck ? Because i didn’t see any of your answers from the course in the forum, have you done the eth 101 and 201 courses ?

Catching events is being used mainly during the project 1 or 2 of the eth 201 course.
Maybe do the course one by one before trying more advanced stuff :slight_smile:

2 Likes

Hi, what chapter in what course is this assignment from?
Ivo

Hey ivga80,
I am on chapter 4 of eloquent JS.
-ML

Thanks a lot my brother ! I will use events for that !

Hey, dear friends, i’m stuck all day on installing hdwallet-provider.
Some issues about can’t install it? I really try to do all i can !
@filip @gaba

npm install @truffle/hdwallet-provider

Hi @sanji94m

You will have to install git, you can look at the truffle/testing topics

I am completely stuck
My Variable project is not issuing. It tells me that I cannot start a project.

Secondly my hello world worked and when I try to do changes it is not running and reading my test changes. And instead I try to change the Hello world project change it into a variable project and it is not working .


I am very new into this. I am not sure what to do or how to fix it, It took me couple hours now.
Help me

Hello sir, could you try to save the file in another folder like “documents” or maybe in your “desktop”?.

Are you the administrator user from you windows? probably the issue is the folder that you are using to save it.

Please let me know if there is another issue!

Carlos Z.

Oh, I have figure it out last night. And it worked haha
Thanks brother

1 Like

Hey guys newby here fiddeling around with html and I am stuck!

I cant seem to get this link to work properly… It keeps on referencing a local file instead of going to the actual website… Am I missing something?

Dj Fernchild

DJ FERNCHILD

Minnesota's BEST DJ

  <p> click on this <a href="https//:www.instagram.com/djfernchild">link</a> to follow him on instagram.</p>
https//:www.instagram.com/djfernchild

you misspell the lin sir, this is the correct one.

https://www.instagram.com/djfernchild

you only miss on the “:” it should go after http.

Hope this work for you! Keep learning sir! :slight_smile:

Carlos Z.

Hi guys I have tried using google and each time I get redirected to Github which doesn’t solve my problem. I am stuck!

In my new workstation in atom inside the < script> tag I don’t get my code (var) highlighted anymore and this in turn do not allow my code to be executed.

Kindly be of assistance. Thank you

1 Like

Hi @ACE1

Can you share your html code here ?

1 Like

Hi Gabba, I figured it out much later. Thank you for your help :blush:

1 Like

Ok so I am completely lost on the % modulo operator

From what I understand the result of the modulo is the remainder of dividing to numbers… so 10%3 would result it 3 because 10/3 is 3.33 right?

So how do we get 2 out of this equation?? ( 10+22)%3. Im completely stumped) maybe Im misinterpreting how to used the % operator…

thanks!

Hello sir, here is a quick definition for the modulus (divison reminder) operator:

Modulus (Division Remainder)
This operator returns the remainder left over when one operand is divided by a second operand. When the first operand is a negative value, the return value will always be negative, and vice versa for positive values.

Some quick links to give you even more understanding on the subject:

Hope this gives you a clear view of the subject, keep learning! :slight_smile:

If you have any doubt, please let us know so we can help you!

Carlos Z.

Yeah thanks for the links but I’ve already read this definition and I still don’t under stand how they arrived at the value of 2

10%3 is actually 1.

Why is it so? As you said, modulo will give you the remainder after dividing the full integers. It’s almost like pretending decimals don’t exist. So how would we divide 10 with 3 if decimals don’t exist. Well, one way of thinking about it is how many times does 3 fit into 10.

3 times, right? 3 times 3 is 9. After that, we can’t fit another 3. Then we stop and say: ok, what is the remainder? It’s 1, right?

Does that make sense?

2 Likes

Ive bee racking my brain over this function in the Eloquent Javascript book and I have several questions that arent really made clear in the book or maybe they are and I just dont understand them.

let theNumber = Number(prompt(“Pick a number”));
if (!Number.isNaN(theNumber)) {
console.log("Your number is the square root of " +
theNumber * theNumber);
}

This apparently translates too Unless the number is not a number do this

I have 2 questions:
1.What is the “!” doing before The Number.isNaN function? I know it means Not but what is it doing in this case
2. given the Number.isNaN only returns true if the arguement is not a number… Why would a true value allow the following statement to be executed. Shouldnt it be
if (Number.isNan(theNumber)) = true , or something of that nature??

thanks for the help!

Modulo.

I had to think of it as valence electrons on a super weird atom in order to get it at first.