zeroclickinfo-goodies
zeroclickinfo-goodies copied to clipboard
Base Conversion: Binary numbers (starting with 0) should not be converted to binary
When I type for example 1010010010 instead of giving a number in base 10, it returns the same number claiming that it converted from base 10 to base 10.
IA Page: http://duck.co/ia/view/base Maintainer: @moritz
@darijan2002 I can't reproduce this, can you attach a screenshot?
Nevermind, found a workaround by writing the binary number and then the word "binary". To recreate the bug, type a binary number and after that type "in binary"
На 26.11.2017 23:48, "Rob Emery" [email protected] напиша:
@darijan2002 https://github.com/darijan2002 I can't reproduce this, can you attach a screenshot?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/duckduckgo/zeroclickinfo-goodies/issues/4539#issuecomment-347045275, or mute the thread https://github.com/notifications/unsubscribe-auth/AMAMwT-M_S9J_lF4BTpB45cSvRRELE9Vks5s6erBgaJpZM4Qq1oO .
type a binary number and after that type "in binary"
@darijan2002 if the number doesn't start with a 0, I would expect that behaviour, because we're assuming you're providing a decimal number.
However even a query like '01110 in binary' still triggers which I feel is a bug.
@darijan2002 Hi, I'm new to open source. Can I work on this issue?
Doubts -
(1) I need to add a condition that checks if the entered number starts with a zero. If yes, no output must be shown.If no, proceed as usual. Am I correct?
(2) In which file do I need to make changes? zeroclickinfo-goodies/lib/DDG/Goodie/Base.pm ??
I would love to give this a try :)
Actually, I discovered this bug, but (1) If it starts with a 0, then it's a binary number and there should be an output in decimal and if it doesn't then it's ok (2) idk
On Mon, Dec 18, 2017 at 8:47 AM, Sibasish Ghosh [email protected] wrote:
@darijan2002 https://github.com/darijan2002 Hi, I'm new to open source. Can I work on this issue?
Doubts - (1) I need to add a condition that checks if the entered number starts with a zero. If yes, no output must be shown.If no, proceed as usual. Am I correct? (2) In which file do I need to make changes? zeroclickinfo-goodies/lib/DDG/Goodie/Base.pm ??
I would love to give this a try :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/duckduckgo/zeroclickinfo-goodies/issues/4539#issuecomment-352349363, or mute the thread https://github.com/notifications/unsubscribe-auth/AMAMwe8OUoc_kfkdyk906AY4NtvOM8f-ks5tBhiugaJpZM4Qq1oO .
there is no bug when you type "insert binary number here binary" but the bug occurs when you type "binary in decimal" or "binary to decimal"
@moollaza do I have to make changes in zeroclickinfo-goodies/lib/DDG/Goodie/Base.pm file (add a condition that checks for a leading zero) ?