Commit Graph

2279 Commits (52f0a1aec3cd4019900ab8d4df3cc828c9abe755)

Author SHA1 Message Date
Matt Miller 2c855b6dad Calculator: improve superscript handling.
This fixes the problem of the simple case, but handling, say, expressions
in parens would require a lot more thought (a lexer would help!) I'll
leave that problem for another day.

Fixes #483.
2014-06-10 08:34:11 +08:00
Matt Miller 5e6c1abb9a Calculator: improve triggers; add 'squared'
Some of the problems inherent in the old trigger regex made themselves
obvious once the 'squared' operation was added. This simplification
should make maintenance a smidge easier.

Resolves #482.
2014-06-10 08:10:03 +08:00
nishanths c339c214e4 add HTML Entity Code answer module and test file 2014-06-10 01:55:19 +05:30
Rob Emery 8e291ac0cd Merge pull request #479 from frozencemetery/dnspansion
`dns server` does not respond with a list of DNS servers
2014-06-09 21:04:28 +01:00
Zaahir Moolla 144de5dcd4 Update pull_request_template_goodie.md 2014-06-09 15:36:07 -04:00
Nathan Korth 97e0c06c77 height 36ex 2014-06-09 09:41:09 -04:00
David Wilkins ba75a487b0 Don't trigger when user is looking for general information 2014-06-08 17:25:59 +08:00
David Wilkins 11a80af77a Handle last/this/next year 2014-06-08 17:05:42 +08:00
David Wilkins 12e29b0f5d Restructure animal => English/Chinese 2014-06-08 15:18:52 +08:00
David Wilkins 6ee1b92dc1 Cache css, remove redundant trigger 2014-06-08 14:34:23 +08:00
David Wilkins 15d416052a Add Chinese Zodiac goodie 2014-06-08 14:11:33 +08:00
Robbie Harwood (frozencemetery) f422baffef Respond to `dns server` with a list of DNS servers. 2014-06-06 18:31:57 -04:00
Jag Talon 81d169bd70 Merge pull request #476 from b1ake/master
Character Counter (Chars.pm) - More triggers, quoted strings and better tests
2014-06-06 14:10:47 -04:00
b1ake 30bfef4509 More concise string trimming regex. 2014-06-06 17:56:33 +00:00
b1ake ce391313fe Added triggers and tests for 'number of chars' and 'number of characters' 2014-06-06 17:54:57 +00:00
b1ake 21188d1e64 Added negative tests for tricky queries that should not trigger the IA. 2014-06-05 23:14:28 +00:00
b1ake b99a03ded5 Fixed various edge cases and added tests for them. 2014-06-05 23:08:15 +00:00
b1ake 2c27fb260c Simplified triggers + improved handling of 'in' + limits on quotation marks. 2014-06-05 21:23:47 +00:00
Rob Emery 4ab33d2b3d Merge pull request #475 from duckduckgo/jag/convert-style
Conversions: Increase font-size to 1.5em
2014-06-05 21:46:21 +01:00
jagtalon 9313be2f77 Conversions: Numbers should have color of #393939. 2014-06-05 20:16:04 +00:00
Lars Jansøn Engvik d0cad55d67 Aligning content. 2014-06-05 19:15:43 +00:00
jagtalon 206977806d Conversions: Add some padding around the IA. 2014-06-05 13:21:36 +00:00
Lars Jansøn Engvik 55f7d18c74 Updating to match the new DDG design. 2014-06-05 09:34:43 +00:00
jagtalon d3c5a5bb4a Conversions: Encode HTML output. 2014-06-04 21:16:36 +00:00
jagtalon aabe2f2e0a Merge remote-tracking branch 'origin/master' into jag/convert-style
Conflicts:
	t/Conversions.t
2014-06-04 21:01:22 +00:00
b1ake b29fbcefdf Whoops, fixed the 1 char test. 2014-06-04 20:40:57 +00:00
b1ake 7c7cd601d7 Chars instant answer - More triggers, support for quoted strings and better tests. 2014-06-04 20:33:16 +00:00
Rob Emery 980c03f570 Merge pull request #471 from duckduckgo/jag/precision
Conversions: Only switch to exponent format after 1000000
2014-06-04 21:26:50 +01:00
jagtalon 73981cbff8 Conversions: Add design suggestions
From https://github.com/duckduckgo/zeroclickinfo-goodies/issues/460#issuecomment-45122090
2014-06-04 20:05:38 +00:00
jagtalon fbd578ecac Conversions: Increase font-size to 1.5em
I added style.css in the share directory of the conversions so that I can make the output prettier.
2014-06-04 16:57:36 +00:00
Jag Talon 1a28228f0c Merge pull request #473 from mwmiller/more_calc_issues
Calculator: give result for sin(pi)
2014-06-04 12:07:10 -04:00
Matt Miller 4d1443ae44 Calculator: give result for sin(pi)
Because of floating-point issues, sin(pi) does not come out to exactly
0. It looks like something we try to guard against a couple lines down.

So, if we don't have a defined precision (such that we can let sprintf
worry about the correct answer), we will set these very small values to
0.

This worked fine with things like '1 + sin(pi)' which made the whole thing
more confusing at the start. Thus, this commit also includes a passel of
new tests for things I considered as possible faults, plus one other thing
I wanted to demonstrate working [cos(2pi)].
2014-06-04 22:52:36 +08:00
Jag Talon aedf8b08d8 Conversions: Added comments 2014-06-03 18:06:41 -04:00
jagtalon 82fe084083 Conversions: Only switch to exponent format after 1000000 2014-06-03 20:06:50 +00:00
Caine Tighe ca39e03b53 Merge pull request #470 from duckduckgo/jag/flip
FlipText: Add "text" to the trigger word.
2014-06-03 14:59:44 -04:00
jagtalon 19b7425488 FlipText: Add "text" to the trigger word.
"flip", "mirror", "spin", and "rotate" are all very common words, and this instant answer comes up often for queries such as "flip flops". While we don't have a way of setting individual goodies with low priority (all goodies have high priority at the moment), it's important that we control the query space of each one. So in this case, adding a "text" as a requirement will prevent it from triggering on "flip flop", "back flip", etc.
2014-06-03 18:38:32 +00:00
Jason Dorweiler a6c6a1730d dice: fix failing tests 2014-06-02 21:10:50 -04:00
Nathan Korth 9a0cba4fbd More padding between blocks in crontab cheatsheet 2014-06-02 16:27:43 -04:00
Nathan Korth 303628eee0 Merge remote-tracking branch 'upstream/master' 2014-06-02 16:16:12 -04:00
Jason Dorweiler b5268014d0 dice: larger font size 2014-06-02 15:35:59 -04:00
Rob Emery 30be0ca3e8 Blood: Ensuring output is consistently upper case 2014-06-02 20:34:52 +01:00
Jag Talon 999b6aec5c Merge pull request #327 from mwmiller/calc_issues
Calculator:  resolve outstanding issues.
2014-06-02 11:16:19 -04:00
jagtalon 062450cbfe Vim Cheat Sheet: Change from `id` to `class` 2014-06-02 13:55:01 +00:00
jagtalon c68b3e18a4 Revert "VimCheatSheet: Fixes #444"
This reverts commit cd4d95b2e4.
2014-06-02 13:44:14 +00:00
Nathan Korth d1923980a1 Merge remote-tracking branch 'upstream/master' 2014-05-31 17:07:20 -04:00
Nathan Korth da3f78fd40 Created HTML output for CrontabCheatSheet 2014-05-31 16:51:04 -04:00
Rob Emery f6605bf5bc Merge branch 'master' into mintsoft/blood 2014-05-31 17:26:55 +01:00
Rob Emery 024d2cb07f Merge branch 'master' into mintsoft/blood 2014-05-31 15:56:54 +01:00
Rob Emery 2a62ca9df2 BloodDonor: Adding trigger "blood donor for" 2014-05-31 15:44:29 +01:00
Matt Miller 1aaf123351 Calculator: minor cleanups.
- Make ln alias more like others.
- Put named constants in a hash and generate the substitution list
  therefrom.
- Update test and comment text slightly for accuracy.

I had fixed a number of different problems iteratively and didn't
recognize that these changes were viable until now.
2014-05-31 18:29:11 +08:00