GithubHelp home page GithubHelp logo

raj457036 / simple-tools Goto Github PK

View Code? Open in Web Editor NEW
33.0 3.0 10.0 99 KB

This repo contains simple tools like clock, Calculator, etc.

Home Page: https://raj457036.github.io/Simple-Tools/

HTML 88.81% JavaScript 11.19%
html-css html5-canvas javascript jquery bootstrap

simple-tools's Introduction

simple-tools's People

Contributors

raj457036 avatar shamnad-sherief avatar

Stargazers

 avatar Maddox Schmidlkofer avatar  avatar Kyle Dickey avatar Ronak Pandey avatar Klaus Ferreira avatar Shuja ur Rahman avatar Hitarth avatar quydang avatar Balaram Neupane avatar  avatar Shahed avatar ZEHAD avatar Maulin avatar Bhargav Sai avatar Omar Faruk Khan avatar  avatar Tanya Shekhawat avatar Samuel Alva Segundo avatar mr.sahu avatar AjayMahiwal avatar Bhavya Khurana avatar  avatar  avatar  avatar Praveen Kumar avatar Allen Wu avatar Abhi Dadhaniya avatar İlker YILMAZ avatar Abbas Elmas avatar ICHx avatar ㅤㅤ avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

simple-tools's Issues

Validation issue in Infix to Prefix/ Postfix

If we give any input that has mismatched parenthesis the page hangs and the code is stuck in an infinite loop, so I suggest to do some validation so that the page doesn't hang.

Infix to Postfix convertor gives wrong output

The algorithm used for the same is wrong. Try converting [a-b-c-d] and then try converting the output back to infix notation. It is easy to see that the potfix notation in the first place was wrong

Add spaces to prefix and postfix outputs.

When outputting a postfix and prefix expression, add spaces between numbers and operators.

Ex:
4 + 2 (infix)

4 2 + (postfix)
+ 4 2 (prefix)

Instead of

42+ (postfix)
+42 (prefix)

The reason:

For larger numbers, for example for the infix expression 342 + 723, the postfix and prefix are 342723+ and +342723, respectively. This makes it impossible to know which two numbers are being summed.

On another note, thank you for this tool! Helps me when studying!

major flow in infix to prefix convertor

bro you have a major flow in your infix to prefix convertor

suppose the infix notation is : (A-Z*(B+C)/D*E)+F
the expected prefix result should be : + - A * / * Z + B C D E F

but through your algorithm it is giving the result : +-AZ/+BCDEF

it is because when you traverse your code again you can see in prefix the same priority operator can be pushed without poping the existing operator so you need to fix this thing.

Wrong output with Infix->Postfix evaluation

The output for converting from infix to postfix expression for some cases is producing a wrong output. Like in this case
image
But the expected output for this is supposed to be

image

The flaw in your algorithm is that
image

Over here in your code, we can see that it is pushing the + operator into the stack eventhough there is a (-) operator in there, it is supposed to pop out the( - )operator first and then push in the + operator into the stack.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.