andrewagain / calculator Goto Github PK
View Code? Open in Web Editor NEWSimple calculator built with React
Home Page: https://ahfarmer.github.io/calculator/
License: MIT License
Simple calculator built with React
Home Page: https://ahfarmer.github.io/calculator/
License: MIT License
Enter number and double click on divide operation getting error
it would be great if this calculator support keypresses because it will reduce unnecessary mouse moves and clicks
Should the classes be binded in a some React-native way instead of inside the render method trough join?
Paste below code into calculate.js file
`
if(buttonName === '%') {
if (obj.next && obj.operation) {
return {
total: operate(obj.total, obj.next, '%'),
next: null,
operation: null,
};
} else {
// '=' with no operation, nothing to do
return {};
}
}
`
Issue will be solved and show percentage result
Thanks
The % operator is always doing operation with 100 only .It should be do operation like other (+,-,/) operators are doing .
Thank you
I tried out the calculator and I figured out when you do (3+3*3), your calculator adds the 3+3 as soon as you click multiply (this should only happen when + or - is clicked for the second time, not * or /). This results in the answer being equal to 18 instead of the correct answer, 12.
After entering a number, if you enter multiply button twice display will become zero. So I would like to work on this issue.
When start clicking number buttons everything is ok, but if I start number with 0 this zero remains, while it should be overriten by the next non-zero number :)
Hi,
I am not sure how to solve this problem.
Thanks for your help first.
1 / 9 * 9 == 0.9999999
It should actually be this
1 / 9 * 9 == 1
Hi, if my input number is greater than one digit zero comes before the number on display .Can I fixed this issue?
The regex written is /[0-9]+/
It would return true even if there are any other characters in the string.
If the regex is /^[0-9]+$/, it specifies there should not be any characters other than numbers.
Please look into this.
Hi, @ahfarmer I am a graphic designer, I want to help others in graphic design.
After I reviewed your project, you have no logo on this project. Therefore I want to contribute to this project by creating a new logo / icon. what do you think?
when you place a tier 5 inferium seed from mystical agriculture into a advanced greenhouse it will duplicate the inferium seed
forge =V 14.23.1.2562
calculator =V 1.12.2-5.0.1
mystical agriculture = V 1.12-1.6.6
ahfarmer.github.io/calculator is not up to date. The site shows a calculation error. This is what i found.
When i click the multiply button twice after entering the value, the output shows as 0
Above error doesn't show when the project is run locally.
Hello,
When you divise by 0 you have :
Error: [big.js] Division by zero
Can be fixed in operate.js Line 16 like that :
if (two === "0") { => if (two == "0") {
Have a good day
When i add (subtract, multiply or divide) two numbers & try to get the percentage of it, the calculator does not display the percentage value. For an example these are the steps i followed
This shows the output as 7
I'd would like to help out with this issue
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.