text:
Final Fantasy XV UNCOVERED!
Since I am INSANELY hyped for the Final Fantasy XV Uncovered event, I want you to write me a program to tell me when it is!!!
The input
Your take input in the form of HH:MM XDT, where HH is a number in the range 1-12, MM is a number between 0-60, and XDT is a time zone, with X being one of E (eastern, UTC-4), C (central, UTC-5), P (pacific, UTC-7), or M (mountain, UTC-6). This is a time assumed to be PM. Valid inputs include:
1:00 EDT (1 PM Eastern Daylight Time)
4:05 MDT (4:05 PM Mountain Daylight Time)
12:23 PDT (12:23 PM Pacific Daylight Time)
1:10 CDT (1:10 PM Central Daylight Time)

The input may be assumed to be valid.
The output
Your program must do the following:

Convert the given time to PDT and output It is XX:XX PM PDT., where XX:XX is the converted time. Note that you do not need to handle any case where converting the time would cross the AM/PM boundary.
Print one of the following:

If the converted time is before 6:00 PM PDT, print X minutes until the pre-show!, replacing X with the number of minutes until 6:00 PM PDT.
If the converted time is after or equal to 6:00 PM PDT and before 7:00 PM PDT, print Pre-show started X minutes ago; UNCOVERED is starting in Y minutes!, where X is the number of minutes that have passed since 6:00 PM PDT, and Y is the number of minutes until 7:00 PM PDT.
If the converted time is after or equal to 7:00 PM PDT, print UNCOVERED started X minutes ago!, where X is the number of minutes that have passed since 7:00 PM PDT.

Each string printed must be followed by a newline.
Scoring
This is code golf, so the shortest program wins.

Are all inputs assumed to be valid?

Is HH:MM XDT a typo? It can be CST.

Would 2:45 EDT appear so we need to detect whether the converted time is PM or AM?

It would have been nice if you'd actually included the UTC offsets of the four time zones so I didn't have to look them up myself.

@KennyLau The CST was a typo, and no time would appear that could cross the AM/PM boundary. Edited the post.

@Neil I just added them.

JavaScript (ES6), 257 bytes
s=>(t=` minutes`,a=s.match(/(\d+):(\d+) (.)/),h=+a[1]+"PMCE".search(a[3]),m=420-h*60-a[2],`It is ${h}:${a[2]} PM PDT
${h<6?m-60+t+` until the pre-show`:h<7?`Pre-show started ${60-m+t} ago; UNCOVERED is starting in ${m+t}`:`UNCOVERED started ${-m+t} ago`}!`)

Don't know the savings but there are a few string there that are repeated you could golf more with. "re-show" and "UNCOVERED" for example.

@Matt For a string that is only repeated once the overhead is 13 bytes so it would need to be 14 bytes long to be worth it. "minutes" got a bonus for being next to the time and being needed four times.

Python (335 bytes)
t=raw_input().replace(*': ').split();x='PMCE'.index(t[2][0]);t[0]=int(t[0])+x;print '%s:%s PM PDT' % tuple(t[:1]);x=t[0]*60+int(t[1]);print ['%s minutes until the pre-show!'%(360-x),'Pre-show started %s minutes ago; UNCOVERED is starting in %s minutes!'%((x-360),(420-x)), 'UNCOVERED started %s minutes ago!'%(x-420)][(x>360)+(x>420)]

Output:
1:00 MDT
2:00 PM PDT
240 minutes until the pre-show!

6:00 CDT
8:00 PM PDT
UNCOVERED started 60 minutes ago!

6:50 PDT
6:50 PM PDT
Pre-show started 50 minutes ago; UNCOVERED is starting in 10 minutes!

Welcome to PPCG! Hope you'll have a great time here.

Here is an untested golfed version which is 340 bytes: t=raw_input().replace(' ',':').split(':');x='PMCE'.index(t[2][0]);t[0]=int(t[0])+x;t[2]='PDT';print'%s:%s PM %s'%tuple(t);x=t[0]*60+int(t[1]);print['%s minutes until the pre-show!'%(360-x),'Pre-show started %s minutes ago; UNCOVERED is starting in %s minutes!'%((x-360),(420-x)),'UNCOVERED started %s minutes ago!'%(x-420)][(x>360)+(x>420)]

Welcome to PPCG, we hope you'll find what you want here and will enjoy your time with us! If you have the time and will, don't forget to put an ungolfed version of your code (maybe with comments?), that will greatly help people understand your code, and help them provide you tips for golfing it even more ;).

You can replace .replace(' ', ':').split(':') with .replace(*': ').split(), saving 6 bytes

We're even!

Ummm... isnt 1:00pmMDT 12:00pmPDT? One hour earlier?

Also I think you are missing 1. of the output requirements

Lua, 357 335 332 bytes
Thanks to @Katenkyo for chopping off 22 bytes.
Golfed:
h,m,t=(...):match("(%d+):(%d+) (.)")f=tonumber h=(f(h)-("PMCE"):find(t))%12+1m=f(m)print("It is "..h..":"..m.." PM PDT.")a=" minutes"b="UNCOVERED"n=(6-h)*60-m r=h<6 and n..a.." until the pre-show!"or h<7 and"Pre-show started "..m..a.." ago; "..b.." is starting in "..(n+60)..a.."!"or b.." started "..(m+(h-7)*60)..a.." ago!"print(r)

(Try it online)
Ungolfed:
n = "7:10 CST"

h,m,t = n:match("(%d+):(%d+) (.)")
h = (tonumber(h) - ("PMCE"):find(t))%12 + 1
m = tonumber(m)
print("It is "..h..":"..m.." PM PDT.")

n = (6-h)*60-m

if h<6 then
  r=n.." minutes until the pre-show!"
elseif h<7 then
  r="Pre-show started "..m.." minutes ago; UNCOVERED is starting in "..(n+60).." minutes!"
else
  r="UNCOVERED started "..(m+(h-7)*60).." minutes ago!"
end

print(r)

You never have to use tonumber when your number isn't in an other base than 10, instead, you can write h=h+0, the addition of 0 will automatically convert the result to a number. Also, is n=(...) mandatory? wouldn't it better to inline the use of ... as following -> h,m,t=(...):match("(%d+):(%d+) (.)"), you won't reuse it anyway, as you then change the value of n using h and m :)

Also, you should be able to change you if/elseif/else for a single ternary statement of the form r=(h<6 and n.." minutes until the pre-show!" )or h<7 and "Pre-show started "..m.." minutes ago; UNCOVERED is starting in "..(n+60).." minutes!" or "UNCOVERED started "..(m+(h-7)*60).." minutes ago!". It might have to be reworked a little, but using this will save a lot of byte. For information, the structure of a ternary in lua is <condition> and <case true, have to be evaluated to true> or <case false, can be anything>

(still didn't have the space to finish what I wanted to say) Don't forget to check the tips for lua, they aren't exhaustive yet, but there's some little useful things :)

Here's a not-tested golfed solution if you want a base to include all that h,m,t=(...):match("(%d+):(%d+) (.)")h=(h-("PMCE"):find(t))%12+1m=m+0print("It is "..h..":"..m.." PM PDT.")a=" minutes"b="UNCOVERED"n=(6-h)*60-m r=(h<6 and n.." minutes until the pre-show!" )or h<7 and"Pre-show started "..m..a.." ago; "..b.." is starting in "..(n+60)..a.."!"or b.." started "..(m+(h-7)*60)..a.." ago!"end print(r) It's actually 329 bytes ;).

I've updated it. 0+m does not work here.

Oh, forgot it is now considered as a decimal number... If you can/want, you can use a 5.2 compiler, it should allow you to do it the right way. In 5.3, numbers are typed into integer and decimal even when there's no decimal part, using an older compiler should solve the problem and allow you to use h+0 and m+0 instead of tonumber(). It could even allow you to not use +0 as they will be translated to integers and will make the result of their operations an integer and not a decimal :)

@Katenkyo Just realized I could do f=tonumber to chop off 3 bytes.

C, 333 bytes
#define p printf
char s[9];main(t){gets(s);s[5]=0;s[1]-=2+s[6]%2-s[6]%3;s[1]<48&&(s[1]+=10,--*s);
t=*s*600+s[1]*60+s[3]*10+s[4]-32568;p("It is %s PM PDT.",s);
t<0?p("%d minutes until the pre-show!",-t):t<60?p(
"Pre-show started %d minutes ago; UNCOVERED is starting in %d minutes!",t,60-t):
p("UNCOVERED started %d minutes ago!",t-60);}

333 bytes after removing the unnecessary newlines (all but the one after the #define).

Not sure of the savings but you have some string literals you might be able to add like "minutes" and "UNCOVERED"

PHP, 347 328 327 322 bytes
<?=$u="UNCOVERED";$m=" minutes";$s=" started ";$p="re-show";$z=['P'=>0,'M'=>1,'C'=>2,'E'=>3];$i=explode(":",$argv[1]);$h=$i[0]%12-$z[$argv[2][0]];$o=$i[1];$t=60-$o;$a="$s$o$m ago";echo"It is ".(($h+11)%12+1).":$o".($h<0?" A":" P")."M PDT.\n".($h<6?$t."$m until the p$p!":($h<7?"P$p$a; $u is starting in $t$m!":"$u$a!"));?>

exploded view
<?=
  $u = "UNCOVERED";
  $m = " minutes";
  $s = " started ";
  $p = "re-show";
  $z = [ 'P' => 0,
         'M' => 1,
         'C' => 2,
         'E' => 3 ];

  $i = explode(":", $argv[1]);
  $h = $i[0]%12 - $z[$argv[2][0]];
  $o = $i[1];
  $t = 60 - $o;
  $a = "$s$o$m ago";

  echo "It is " . (($h+11)%12+1) . ":$o" . ($h < 0 ? " A" : " P") . "M PDT.\n" .
       ($h < 6 ? $t . "$m until the p$p!"
               : ($h < 7 ? "P$p$a; $u is starting in $t$m!"
                         : "$u$a!"));
?>

Runs as php script.php HH:MM XDT.  Takes in the time and time zone as $argv entries, regexes $argv[1] out into $i = [HH, MM], determines the time zone from the first character in $argv[2], maths out how many minutes past 6PM PDT that is, then ternaries the echo.
Could drop 2 bytes by using $u=UNCOVERED, but it'd be the only error here and I like that this works cleanly.

PowerShell 292 Bytes
$r,$i,$s,$u="re-show"," minutes"," start","UNCOVERED";$h,$m,$z=$args[0]-split":| ";$h=+$h-"PMCE".IndexOf($z[0]);"It is $h`:$m PM PDT.";if(($t=$h*60+$m-360)-lt0){"$($t*-1)$i until the p$r!"}else{if($t-gt59){"$u$s`ed $($t-60)$i ago!"}else{"P$r$s`ed $t$i ago; $u is$s`ing in $(($t-60)*-1)$i!"}}

Less Golfed Explanation
# Some string literals.
$r,$i,$s,$u,$g="re-show"," minutes"," start","UNCOVERED"," ago"
# Get the hours, minutes and zone into variables.
$h,$m,$z=$args[0]-split":| "
# Offset the time based on the passed timezone.
$h=+$h - "PMCE".IndexOf($z[0])
# Display current PDT time.
"It is $h`:$m PM PDT."

# Based on adjusted time value for PDT determine what string to show.
# Several string literals were used to save space.
if(($t=$h*60+$m-360)-lt0){
    # Show has not started yet
    "$($t*-1)$i until the p$r!"
}else{
    if($t-gt59){
        # Between 6 and 7
        "$u$s`ed $($t-60)$i$g!"
    }else{
        # It's after 7. Should have check more often.
        "P$r$s`ed $t$i$g; $u is$s`ing in $(($t-60)*-1)$i!"
    }
}

The literal for " ago" was removed in code but for now left in explanation in case of other changes.

I think I went overboard on some literals and it made it longer....


text:
Identify arborally satisfied point sets
An arborally satisfied point set is a 2D set of points such that, for any axis-aligned rectangle that can be formed using two points in the set as opposite corners, that rectangle contains or touches at least one other point.  Here is an equivalent definition from Wikipedia:

A point set is said to be arborally satisfied if the following property holds: for any pair of points that do not both lie on the same horizontal or vertical line, there exists a third point which lies in the rectangle spanned by the first two points (either inside or on the boundary).

The following image illustrates how the rectangles are formed.  This point set is NOT arborally satisfied because this rectangle needs to contain at least one more point.

In ASCII art, this point set can be represented as:
......
....O.
......
.O....
......

A slight modification can make this arborally satisfied:
......
....O.
......
.O..O.
......

Above, you can see that all rectangles (of which there is only one) contain at least three points.
Here is another example of a more complex point set that is arborally satisfied:

For any rectangle that can be drawn spanning two points, that rectangle contains at least one other point.
The Challenge
Given a rectangular grid of points (which I represent with O) and empty space (which I represent with .), output a truthy value if it is arborally satisfied, or a falsey value if it is not.  This is code-golf.
Additional rules:

You can choose to have the characters O and . swapped out with any other pair of printable ASCII characters.  Simply specify which character mapping your program uses.
The grid will always be rectangular.  A trailing newline is allowable.

More Examples
Arborally satisfied:
.OOO.
OO...
.O.OO
.O..O
....O

..O..
OOOO.
...O.
.O.O.
...OO

O.O.
..O.
OOOO
.O.O
OO..

...
...
...

...
..O
...

O.....
O.O..O
.....O

OOO.OO

Not Arborally Satisfied:
..O..
O....
...O.
.O...
....O

..O..
O.OO.
...O.
.O.O.
...OO

O.....
..O...
.....O

So we are not allowed to take the input as a list of coordinates instead of ASCII? If not may I take the input as a 2D list of Integers (0 and 1) to represent the points?

Can the grid have 0 area?

Snails, 29 30 39 bytes
!{t\Oo\.+c\.,\O!{t\O{w!(.,~}2

It works by tracing out 2 sides of the rectangle, and then checking whether there is some square containing an O such that traveling in a straight line from the square in 2 of the cardinal directions would result in hitting a side of the rectangle.
Prints the maximum of 1 and the grid's area if the input is "arborally satisfied"; otherwise 0.

Oracle SQL 11.2, 364 344 bytes
WITH v AS(SELECT MOD(LEVEL-1,:w)x,FLOOR((LEVEL-1)/:w)y FROM DUAL WHERE'O'=SUBSTR(:g,LEVEL,1)CONNECT BY LEVEL<=LENGTH(:g))SELECT a.*,b.*FROM v a,v b WHERE b.x>a.x AND b.y>a.y MINUS SELECT a.*,b.*FROM v a,v b,v c WHERE((c.x IN(a.x,b.x)AND c.y>=a.y AND c.y<=b.y)OR(c.y IN(a.y,b.y)AND c.x>=a.x AND c.x<=b.x))AND(c.x,c.y)NOT IN((a.x,a.y),(b.x,b.y));

:g is the grid as a string
:w is the width of the grid
Returns no line as truthy, return the rectangles that do not match the criteria as falsy
Un-golfed
WITH v AS
(
  SELECT MOD(LEVEL-1,:w)x,FLOOR((LEVEL-1)/:w)y,SUBSTR(:g,LEVEL,1)p
  FROM   DUAL
  WHERE  'O'=SUBSTR(:g,LEVEL,1)
  CONNECT BY LEVEL<=LENGTH(:g)
)
SELECT a.*,b.*FROM v a,v b
WHERE b.x>a.x AND b.y>a.y
MINUS
SELECT a.*,b.*FROM v a,v b,v c
WHERE((c.x IN(a.x,b.x) AND c.y>=a.y AND c.y<=b.y) OR (c.y IN(a.y,b.y) AND c.x>=a.x AND c.x<=b.x))
  AND(c.x,c.y)NOT IN((a.x,a.y),(b.x,b.y));

The view v compute the coordinates of each O point.
The first part of the minus return all rectangles, the where clause insures that a point can not be paired with itself.
The second part search for a third point in each rectangle. That point needs to have one coordinate,x or y, equals to that coordinate for one of the two points defining the rectangle. The other coordinate of that third point needs to be in the range bounded by that coordinate for each of the points defining the rectangle.
The last part of the where clause insures that the third point is not one of the two points defining the rectangle.
If all the rectangles have at least a third point then the first part of the minus is equal to the second part and the query returns nothing.

PHP, 1123 bytes, 851 bytes, 657 bytes
(newbie php)
<?php
$B=array_map("str_split",array_map("trim",file('F')));$a=[];$b=-1;foreach($B as $c=>$C){foreach($C as $d=>$Z){if($Z=='O'){$a[++$b][]=$c;$a[$b][]=$d;}}}$e=array();foreach($a as $f=>$l){foreach($a as $g=>$m){$h=$l[0];$i=$l[1];$j=$m[0];$k=$m[1];if($h!=$j&&$i!=$k&&!(in_array([$g,$f],$e,1)))$e[]=[$f,$g];}}$A=array();foreach($e as $E){$n=$E[0];$o=$E[1];$q=$a[$n][0];$s=$a[$n][1];$r=$a[$o][0];$t=$a[$o][1];$u=($q<$r)?$q:$r;$v=($s<$t)?$s:$t;$w=($q>$r)?$q:$r;$X=($s>$t)?$s:$t;$Y=0;foreach($a as $p){$x=$p[0];$y=$p[1];if($x>=$u&&$x<=$w&&$y>=$v&&$y<=$X){$Y=($x==$q&&$y==$s)||($x==$r&&$y==$t)?0:1;}if($Y==1)break;}if($Y==1)$A[]=1;}echo count($A)==count($e)?1:0;

explaination (commented code) :
<?php
//read the file
$lines=array_map("str_split",array_map("trim",file('F'))); // grid in file 'F'

//saving coords
$coords=[]; // new array
$iCoord=-1;
foreach($lines as $rowIndex=>$line) {
    foreach($line as $colIndex=>$value) {
        if ($value=='O'){
            $coords[++$iCoord][]=$rowIndex;//0 is x
            $coords[$iCoord][]=$colIndex;  //1 is y
        }
    }
}

/* for each point, draw as many rectangles as other points
 * without creating 'mirror' rectangles
 */
$rectangles=array();

foreach ($coords as $point1Index=>$point1) {
     //draw
     foreach ($coords as $point2Index=>$point2) {
            $point1X=$point1[0];
            $point1Y=$point1[1];
            $point2X=$point2[0];
            $point2Y=$point2[1];
            //if not on the same line or on the same column, ...
            if ($point1X!=$point2X &&   // same line
                $point1Y!=$point2Y &&   // same column
                !(in_array([$point2Index,$point1Index],$rectangles,true)) //... and if no 'mirror one' already
             ) $rectangles[]=[$point1Index,$point2Index]; //create a new rectangle
     }
 }

//now that we have rectangles and coords
//try and put a third point into each
$tests=array();
foreach ($rectangles as $rectangle) {
    $pointA=$rectangle[0];    // points of the rectangle
    $pointB=$rectangle[1];    // __________"____________
    $xA=$coords[$pointA][0];
    $yA=$coords[$pointA][1];
    $xB=$coords[$pointB][0];
    $yB=$coords[$pointB][1];
    $minX=($xA<$xB)?$xA:$xB;
    $minY=($yA<$yB)?$yA:$yB;
    $maxX=($xA>$xB)?$xA:$xB;
    $maxY=($yA>$yB)?$yA:$yB;

    $arborally=false;
    foreach ($coords as $point) {
        $x=$point[0];
        $y=$point[1];
        if ($x>=$minX &&
            $x<=$maxX &&
            $y>=$minY &&
            $y<=$maxY) {
                $arborally=($x==$xA&&$y==$yA) || ($x==$xB&&$y==$yB)?0:1; //same point (pointA or pointB)
        }
        if ($arborally==true) break;//1 found, check next rectangle
    }
    if ($arborally==true) $tests[]=1;//array of successes

}

echo count($tests)==count($rectangles)?1:0; //if as many successes than rectangles...

?>

MATL, 38 bytes
Ti2\2#fh!XJ"J@-XKtAZ)"@K-@/Eq|1>~As2>*

This uses a 2D char array as input, with rows separated by ;. So the first example is
['......';'....O.';'......';'.O..O.';'......']

The rest of the test cases in this format are as follows.

Arborally satisfied:
['.OOO.';'OO...';'.O.OO';'.O..O';'....O']
['..O..';'OOOO.';'...O.';'.O.O.';'...OO']
['O.O.';'..O.';'OOOO';'.O.O';'OO..']
['...';'...';'...']
['...';'..O';'...']
['O.....';'O.O..O';'.....O']
['OOO.OO']

Not arborally satisfied:
['..O..';'O....','...O.';'.O...';'....O']
['..O..';'O.OO.';'...O.';'.O.O.';'...OO']
['O.....';'..O...';'.....O']

Try it online! You can also verify all test cases at once.
Explanation
The code first gets the coordinates of characters O in the input. It then uses two nested loops. The outer loop picks each point P (2-tuple of its coordinates), compares with all points, and keeps points that differ from P in the two coordinates. Those are the points than can form a rectangle with P. Call them set R.
The inner loop picks each point T from R, and checks if the rectangle defined by P and T includes at least 3 points. To do that, it subtracts P from all points; that is, moves the origin of coordinates to P. A point is in the rectangle if each of its coordinates divided by the corresponding coordinate of T is in the closed interval [0, 1].
T          % push "true"
i          % take input 2D array
2\         % modulo 2: gives 1 for 'O', 0 for '.'
2#f        % row and column coordinates of ones. Gives two column arrays
h!         % concatenate horizontally. Transpose. Each point is a column
XJ         % copy to clipboard J
"          % for each column
  J        %   push all points
  @-       %   subtract current point (move to origin)
  XK       %   copy to clipboard K
  tA       %   logical index of points whose two coordinates are non-zero
  Z)       %   keep only those points. Each is a column
  "        %   for each column (point)
    @K-    %     push that point. Subtract all others
    @/     %     divide by current point
    Eq|1>~ %     true if in the interval [0,1]
    A      %     true if that happens for the two coordinates
    s      %     sum: find out how many points fulfill that
    2>     %     true if that number is at least 3
    *      %     multiply (logical and). (There's an initial true value at the bottom)
           %   end
           % end
           % implicit display

I liked Don Muesli more, why did you change it back? :(

@DenkerAffe :-) Well, I got back to my real name. The other was fun, but it was intended as temporary

This isn't real life man, we need some more fun here! :)

@DenkerAffe I may go back to that name, or to some other, in the future. How about Denim Soul? :-D

Sounds good, go with it! Now!

@DenkerAffe Nah, I'll wait for a while :-) Besides, people complain that it's hard to know who is who with so many changes...

... and you have to wait 30 days too (I think)

C, 289 bytes
a[99][99],x,X,y,Y,z,Z,i,c;main(k){for(;x=getchar(),x+1;x-10||(y=0,i++))a[y++][i]=x;for(;X<i;X++)for(x=0;a[x][X]-10;x++)for(Y=X+1;Y<i;Y++)for(y=0;a[y][Y]-10;y++)if(x-y&&!(a[x][X]-79||a[y][Y]-79)){c=0;for(Z=X;Z<=Y;Z++)for(z=x<y?x:y;z<=(x>y?x:y);)a[z++][Z]-79||c++;c-2||(k=0);}putchar(k+48);}

Requires trailing newline, which is permitted (without the newline, the code would be two bytes larger). Outputs 0 (not arborally satisfied) or 1 (arborally satisfied).

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Write a palindrome that prints "Hello, World!" without using comments
Your Task: Print "Hello, World!" using a palindrome.
Simple, right?
Nope.
You have one restriction: you may not use comments.
"Comments" include

Normal // or # comments
Adding extraneous characters to a string literal
Triple-quoted string comments
Creating a string literal to hide characters

You may not use a pre-defined procedure to print "Hello, World!". (like HQ9+'s H command)
This is code-golf, so the shortest answer in bytes wins.

Almost duplicate. I'll leave it up to the community to decide whether the comment restriction makes a sufficient difference or not. (Although I personally don't think comment restrictions work... once you get to 2D languages, you can easily include all sorts of code that isn't a no-op, but never happens to be executed.)

This challenge has been done so much, it's been solved as 1 or even 0 byte answers in multiple languages

I'm voting to close as a duplicate, since there are many answers from the other challenge that can be used without modification here.

Maybe you can make it harder by requiring all the code affecting the output. Otherwise you get answers containing like-comments and one doesn't feel worth to write a more sophisticated one.

@CrazyPython Updating rules after an answer has been posted is highly frowned upon, on top of this already being a duplicate. For future challenges, I highly recommend using The Sandbox so you can get meaningful feedback on challenges before they're posted.

@TimmyD In this case it is necessary to close loopholes. It also only invalidates joke answers.

The center of the challenge is no comments. That makes it 300% harder. It's [tag:restricted-source].

@CrazyPython The fact that "joke" answers were allowed under the rules-as-originally-written highlights the fact that this challenge wasn't ready for posting to main. The fact that you're adding "no comments" to the restrictions doesn't change the fact that many answers from the linked challenge can be posted here without modification, making this one a duplicate.

@TimmyD The original question the no comment restriction, I simply made it in a larger font.

@CrazyPython No, sorry for being unclear. I meant that adding "no comments" as a restriction to "palindrome Hello World" doesn't make it a sufficiently different enough challenge to not be a duplicate. If you want to discuss this further, let's take it to chat.

Stuck, 0 bytes
I think this wins? An empty program in stuck prints Hello, World!
Shamelessly stolen from this answer

And we have a winner.. +1

I just posted this to show how bad/repeated this challenge was, I don't expect anything from it

Standard loophole guidelines?

Look at the new rules.

Bash, 47 bytes
echo Hello, World!
exit
tixe
!dlroW, olleH ohce

Gogh, 31 bytes
"Hello, World!"Ƥ"!dlroW ,olleH"

Explanation
"Hello, World!"    “ Push the string literal ”
¡                  “ Output the TOS          ”
"!dlroW ,olleH"    “ Push the string literal ”
                   “ Non-implicit output     ”

Help, WarDoq!, 1 byte
H

Print Hello, World!.

And now with 2 bytes?

Unfortunately I can't find a 2 byte palindrome for hello world :(

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Determine the type of an input
The challenge is simple: Determine the type of an input, and output an identifier telling what type it is.

"UI", Unsigned integer: 0, 1,34, 111111111111111111111111111111111111111111
"SI", Signed integer: +0, +1, +42, -1, -3, -111111111111111111111111111111111111111111
"UD", Unsigned decimal: 0.0, 1.23, 1234.1234
"SD", Signed decimal: -0.0, +0.0, -1.235
"LE", Letter: a-z and A-Z
"SY", Symbol: ASCII code points: [32-47, 58-64, 91-96, 123-126] (i.e. all characters except numbers and letters)
"ST", String: Two or more character that can't be parsed as any of the above number formats

Rules:

The input will be 1-99 characters long
The input will only contain printable ASCII characters, code points: 32-126.
The output should be the two identifier letters as defined above (UI, SI ...)
Standard I/O rules apply

Examples:
UI:
0
01
34
12938219383278319086135768712319838871631827319218923

SI:
-0
+01
+1
-123
+123

UD:
0.0
3.1415
2.718281828459045235360287471352662497757

SD:
+0.0
-3.1415
+2.718281828459045235360287471352662497757

LE:
a
k
L
Z

SY:
@
"
+
-

ST:
Hello, World!
f2!"
+23df
1234A
'"!
.012
1.
UI
+-1
5+3

Can SY be more than one character?

I would not consider 111111111111111111111111111111111111111111 to be of integer type.

@FryAmTheEggman sy is only one character.

So we take the input as a string?

@Matt, It might not be a uint8 or int64, but it's definitely an integer.

Here +45 is not signed it is PI positive integer (as 45) ... Your classification can not be so easy to write in Axiom. "signed integer" here and in C language too are called "int" or "INT"

@RosLuP it's not meant to be the type your language interprets it as. You should simply output two characters based on the input string/number.

+38 is not signed it is unsigned.

@RosLuP I'm not sure you get the point of this challenge. It doesn't matter how it's interpreted in some language, or what the normal naming convention for numbers is. In this challenge "signed" is defined as: "There's a plus or minus sign followed by a number". You may disregard the words signed and unsigned doesn't actually affect the challenge, you should output a two character string based on some input.

Pyth - 47 bytes
Can prolly golf a few bytes off with some slicing tricks.
.x-+?@z"+-"\S\U?@z\.\D\Isz?!tz?}rzZG"LE""SY""ST

Test Suite.

JavaScript (ES6), 99
x=>(z=x.match(/^([+-])?\d+(\.\d+)?$/))?'SU'[+!z[1]]+'DI'[+!z[2]]:x[1]?'ST':parseInt(x,36)?'LE':'SY'

Test

f=x=>(z=x.match(/^([+-])?\d+(\.\d+)?$/))?'SU'[+!z[1]]+'DI'[+!z[2]]:x[1]?'ST':parseInt(x,36)?'LE':'SY'

console.log=x=>O.textContent+=x+'\n'

;console.log(['0','01','34','12938219383278319086135768712319838871631827319218923'].map(x=>f(x)+' '+x).join`\n`)
;console.log(['-0','+01','+1','-123','+123'].map(x=>f(x)+' '+x).join`\n`)
;console.log(['0.0','3.1415','2.718281828459045235360287471352662497757'].map(x=>f(x)+' '+x).join`\n`)
;console.log(['+0.0','-3.1415','+2.718281828459045235360287471352662497757'].map(x=>f(x)+' '+x).join`\n`)
;console.log([...'akLZ'].map(x=>f(x)+' '+x).join`\n`)
;console.log([...'@"+-'].map(x=>f(x)+' '+x).join`\n`)
;console.log(['Hello, World!','f2!"','+23df','1234A',`'"!`,'.012','1.','UI','+-1','5+3'].map(x=>f(x)+' '+x).join`\n`)

I was pretty sure that someone would be able to optimise for shared cases but I like your use of parseInt to detect letters.

The first ( ) in your regex is not necessary

@Awashi it is necessary as I need a capture group for the sign to differentiate S or U.

@WashingtonGuedes no, it could be (\+|-) but no bytes saved

Turing Machine Code, 1544 bytes
Try it online!
0 + _ r s
0 - _ r s
0 0 _ r u
0 1 _ r u
0 2 _ r u
0 3 _ r u
0 4 _ r u
0 5 _ r u
0 6 _ r u
0 7 _ r u
0 8 _ r u
0 9 _ r u
0 a _ r l
0 b _ r l
0 c _ r l
0 d _ r l
0 e _ r l
0 f _ r l
0 g _ r l
0 h _ r l
0 i _ r l
0 j _ r l
0 k _ r l
0 l _ r l
0 m _ r l
0 n _ r l
0 o _ r l
0 p _ r l
0 q _ r l
0 r _ r l
0 s _ r l
0 t _ r l
0 u _ r l
0 v _ r l
0 w _ r l
0 x _ r l
0 y _ r l
0 z _ r l
0 A _ r l
0 B _ r l
0 C _ r l
0 D _ r l
0 E _ r l
0 F _ r l
0 G _ r l
0 H _ r l
0 I _ r l
0 J _ r l
0 K _ r l
0 L _ r l
0 M _ r l
0 N _ r l
0 O _ r l
0 P _ r l
0 Q _ r l
0 R _ r l
0 S _ r l
0 T _ r l
0 U _ r l
0 V _ r l
0 W _ r l
0 X _ r l
0 Y _ r l
0 Z _ r l
0 * _ r y
s 0 _ r s
s 1 _ r s
s 2 _ r s
s 3 _ r s
s 4 _ r s
s 5 _ r s
s 6 _ r s
s 7 _ r s
s 8 _ r s
s 9 _ r s
s . _ r d
s _ _ r i
s * _ r T
u 0 _ r u
u 1 _ r u
u 2 _ r u
u 3 _ r u
u 4 _ r u
u 5 _ r u
u 6 _ r u
u 7 _ r u
u 8 _ r u
u 9 _ r u
u . _ r D
u _ _ r I
u * _ r T
l _ _ r L
l * _ r T
y _ _ r S
y * _ r T
d 0 _ r d
d 1 _ r d
d 2 _ r d
d 3 _ r d
d 4 _ r d
d 5 _ r d
d 6 _ r d
d 7 _ r d
d 8 _ r d
d 9 _ r d
d _ _ r e
d * _ r T
i 0 _ r i
i 1 _ r i
i 2 _ r i
i 3 _ r i
i 4 _ r i
i 5 _ r i
i 6 _ r i
i 7 _ r i
i 8 _ r i
i 9 _ r i
i _ _ r j
i * _ r T
D 0 _ r D
D 1 _ r D
D 2 _ r D
D 3 _ r D
D 4 _ r D
D 5 _ r D
D 6 _ r D
D 7 _ r D
D 8 _ r D
D 9 _ r D
D _ _ r E
D * _ r T
I 0 _ r I
I 1 _ r I
I 2 _ r I
I 3 _ r I
I 4 _ r I
I 5 _ r I
I 6 _ r I
I 7 _ r I
I 8 _ r I
I 9 _ r I
I _ _ r J
I * _ r T
L * L r M
M * E r halt
S * S r Y
Y * Y r halt
e * S r f
f * D r halt
j * S r k
k * I r halt
E * U r f
J * U r k
T _ S r U
T * _ r T
U * T r halt

Please include a fully-golfed version of the code. If the whitespace cannot be removed, it must be counted in the byte count.

Looks like it can not be removed, the program does not work properly without spaces between the symbols.

It doesn't seem to classify "+-1" (from the examples) as a ST.

Retina, 98 97 bytes
A nice way to practise my regex skills indeed.
Try it online!
^(?![+-]?\d+(\.\d+)?$)..+
ST
^([+-]?)\d+$
$1UI
^([+-]?)\d+\.\d+$
$1UD
i`^[a-z]$
LE
^.$
SY
[+-]U
S

You can change ^[a-zA-Z]$ to i\^[a-z]$` to save one byte

Lua, 157 bytes
Try it online!
Golfed:
n=(...)m=string.match s=m(n,"^[+-]")and"S"or"U"print(m(n,"^[+-]?%d+%.%d+$")and s.."D"or m(n,"^[+-]?%d+")and s.."I"or m(n,"^%w$")and"LE"or#n==1 and"SY"or"ST")

Ungolfed:
n = "2.718281828459045"

s = n:sub(1,1):match("[+-]") and "S" or "U"

if n:match("^[+-]?%d+%.%d+$") then
    print(s.."D")
elseif n:match("^[+-]?%d+") then
    print(s.."I")
elseif n:match("^%w$") then
    print("LE")
elseif #n==1 then
    print("SY")
else
    print("ST")
end

JavaScript (ES6), 125 120 bytes
s=>"UISIUDSDLESYST".substr(s.match(/^((\d+)|([+-]\d+)|(\d+\.\d+)|([+-]\d+\.\d+)|([A-Z])|(.)|(.*))$/i).indexOf(s,2)*2-4,2)

Alternative version, also 120 bytes:
s=>"STUISIUDSDLESY".substr(s.match(/^(?:(\d+)|([+-]\d+)|(\d+\.\d+)|([+-]\d+\.\d+)|([A-Z])|(.)|.*)$/i).lastIndexOf(s)*2,2)

Surely the regex can be golfed with a regex eval(\/regex/`)` constructor + template strings

Java, 192 bytes
String t(String v){for(String[]x:new String[][]{{"\\d+","UI"},{"[-+]\\d+","SI"},{"\\d+\\.\\d+","UD"},{"[-+]\\d+\\.\\d+","SD"}})if(v.matches(x[0]))return x[1];return (v.length()==1?"SY":"ST");}

return (v.length()==1?"SY":"ST"); can be return v.length()<2?"SY":"ST"; (-3 bytes) Or it can be this: String t(String v){for(String x:"UI\\d+;SI[-+]\\d+;UD\\d+\\.\\d+;SD[-+]\\d+\\.\\d+".split(";"))if(v.matches(x.substring(2)))return x.substring(0,2);return v.length()<2?"SY":"ST";} (179 bytes) And in addition you could change String t(String v) to v-> when you use a Java 8 lambda.

Javascript (ES6), 138 bytes
I tried to use a replace to be more "fancy".
This creates an anonymous function that returns the string of the type.
s=>s.replace(/^((([+-])?(\d+)(\.\d+)?)|([a-z])|([ -~])|([^\0]*))$/i,(_,a,b,c,d,e,f,g)=>b?(c?'S':'U')+(e?'D':'I'):(f?'LE':'S'+(g?'Y':'T')))

Any tips to improving this will be entirely welcome.

1. should be ST, not UD. Change your \d* to \d+

@edc65 How? That's a decimal. That is the same as 1.0.

It could be valid or not (I don't write 1. instead of 1) BUT It's not your choice or mine: there are the test cases

@edc65 You're right. I skipped the VERY huge list. I've fixed it. Thanks!

Python 3.5 - 241 240 bytes:
(Saved 1 byte thanks to @CatsAreFluffy)
import re
def r(g):
 y={'^\d+$':'UI','^[+-]\d+$':'SI','^[0-9]\d*(\.\d+)?$':'UD','[+-](?=[0-9]\d*(\.\d+))':'SD','[a-zA-Z]+':'LE','^[^A-Za-z0-9]+$':'SY'};d=[y[i]for i in list(y.keys())if re.match(i,g)]
 if len(d)>0:return d[0]
 else:return'ST'

It may be a bit long, but does the job pretty much perfectly. This was a really good way to improve my regular expression skills. Thanks for the challenge. :) I will try and shorten it more if I can.

You can move import re to outside the function to save a space. (Stupid iPad keyboard with no backticks)

@CatsAreFluffy Yeah, I did not think of that. Thank you! :)

@CatsAreFluffy: Actually, the iOS keyboard does allow backticks! I found this out the other day when needing to write markdown using my iPhone :) http://meta.stackexchange.com/questions/133673/is-there-a-way-to-enter-back-tick-backtick-on-so-when-using-ipad-or-iphone

@CatsAreFluffy Nice! That's good to know.

Also len(d)>0==d>[]

Tcl 414 Bytes
ungolfed implementation, readable:
proc a b {
  if {[string index $b 0] eq "+" || [string index $b 0] eq "-"} {
    set c S
  } elseif {[string match {[A-Za-z]} $b]} {
    return LE
  } elseif {[regexp {^(?![+-]?\d+(\.\d+)?$)..+} $b]} {
    return ST
  } elseif {[regexp {[^a-zA-Z0-9.]} $b]} {
    return SY
  } else {
    set c U
  }
  if {[string match *.* $b]} {
    return $c\U
  } else {
    return $c\I
  }
}
puts [a $argv]


text:
Friday the 13th
This post would make more sense if it were Friday the 13th today... But oh well.
Write a full program that, given any year as the input from at least -10,000 to 10,000, prints all dates of that year that are Friday and also on the 13th of the month.
Output can be expressed as MM/dd, dd/MM, dd.MM, or any other readable format which clearly indicates the month and day.
Keep leap years in mind! Every four years an extra day is added to February unless it is the turn of the century and the year is NOT divisible by 400 evenly (the year 2000 has a leap year, 1900 or 2100 do not (since they aren't divisible by 400)).
Also even though the Gregorian calendar as we know it didn't exist before 1582, any year before that should still reveal the dates as if it did exist.
Shortest code in bytes wins.

Relevant OEIS sequence.

Isn't requesting output to be "MM/dd" or the like redundant, since every dd is going to be 13?

Related: http://codegolf.stackexchange.com/questions/69510/superstitious-programming Also, are date-builtins allowed?


text:
Parse a Quaternion
If you don't know already, a quaternion is basically a 4-part number. For the purposes of this challenge, it has a real component and three imaginary components. The imaginary components are represented by the suffix i, j, k. For example, 1-2i+3j-4k is a quaternion with 1 being the real component and -2, 3, and -4 being the imaginary components.
In this challenge you have to parse the string form of a quaternion (ex. "1+2i-3j-4k") into a list/array of coefficients (ex. [1 2 -3 -4]). However, the quaternion string can be formatted in many different ways...

It may be normal: 1+2i-3j-4k
It may have missing terms: 1-3k, 2i-4k (If you have missing terms, output 0 for those terms)
It may have missing coefficients: i+j-k (In this case, this is equivalent to 1i+1j-1k. In other words, a i, j, or k without a number in front is assumed to have a 1 in front by default)
It may not be in the right order: 2i-1+3k-4j
The coefficients may be simply integers or decimals: 7-2.4i+3.75j-4.0k

There are some things to note while parsing:

There will always be a + or - between terms
You will always be passed valid input with at least 1 term, and without repeated letters (no j-js)
All numbers can be assumed to be valid
You can change numbers into another form after parsing if you want (ex. 3.0 => 3, 0.4 => .4, 7 => 7.0)

Parsing/quaternion builtins and standard loopholes are disallowed. This includes eval keywords and functions. Input will be a single string and output will be a list, an array, values separated by whitespace, etc.
As this is code-golf, shortest code in bytes wins.
Tons o' test cases
1+2i+3j+4k             => [1 2 3 4]
-1+3i-3j+7k            => [-1 3 -3 7]
-1-4i-9j-2k            => [-1 -4 -9 -2]
17-16i-15j-14k         => [17 -16 -15 -14]

7+2i                   => [7 2 0 0]
2i-6k                  => [0 2 0 -6]
1-5j+2k                => [1 0 -5 2]
3+4i-9k                => [3 4 0 -9]

42i+j-k                => [0 42 1 -1]
6-2i+j-3k              => [6 -2 1 -3]
1+i+j+k                => [1 1 1 1]
-1-i-j-k               => [-1 -1 -1 -1]

16k-20j+2i-7           => [-7 2 -20 16]
i+4k-3j+2              => [2 1 -3 4]
5k-2i+9+3j             => [9 -2 3 5]
5k-2j+3                => [3 0 -2 5]

1.75-1.75i-1.75j-1.75k => [1.75 -1.75 -1.75 -1.75]
2.0j-3k+0.47i-13       => [-13 0.47 2.0 -3] or [-13 .47 2 -3]
5.6-3i                 => [5.6 -3 0 0]
k-7.6i                 => [0 -7.6 0 1]

0                      => [0 0 0 0]
0j+0k                  => [0 0 0 0]
-0j                    => [0 0 0 0] or [0 0 -0 0]
1-0k                   => [1 0 0 0] or [1 0 0 -0]

Will there ever be unnecessary + signs in the input? Like: +1k?

@FryAmTheEggman No. inputs will never start with a +.

Is -0 a part of the legal output for the last two examples?

What exactly constitutes a "parsing built-in"?

@isaacg yes that is fine

@LLlAMnYP anything that trivializes this challenge, ie that can parse this quaternion and return the array of coefficients

@GamrCorps that doesn't make things clearer for me. Sure ToQuaternion is obviously off limits (quaternion built-in), but what of my use of ToExpression? It interprets the string as actual input to the interpreter ("1+i-2j+k" -> 1 + i - 2 j + k). Does mathematica's capability of working with actual mathematical expressions trivialize the challenge?

@LLlAMnYP in that case, I would take that command to be a form of eval which is prohibited. Sorry about the confusions

@GamrCorps Interesting. That would imply, that the input should be dealt with only with string-manipulating functions, regex and the like. I'm then curious, the output array has to be a list of explicit numbers? Because any kind of conversion like "2.5" -> 2.5 is a (possibly restricted) form of eval.

@LLlAMnYP You bring up a good point. Lets define the eval restriction to be takes in a string, interprets as code and/or input. Any conversions do not count under this because you cant pass, for example, the string "test" to an integer conversion function to receive an integer, but test would be interpreted as code in a normal eval function. TLDR: eval: no, type conversions: yes.

@GamrCorps I see. That makes Mathematica a bad choice for this then, because it isn't really a typeified language and most type conversions are done by the rather blanketing ToExpression. There is of course the (undocumented) Internal`StringToDouble, but that's hardly a good fit for golf :-)

FromDigits Golookitup

@CatsAreFluffy that's only for integers. But I fully agree, there's plenty of ways to do it, e.g. ImportString too. In this case it just feels like reinventing the wheel, instead of taking advantage of the strengths of the language. But who knows, maybe there's still a beautiful MMA solution out there.

Pyth, 48 bytes
jm+Wg\-K--e|d0G\+K1+]-I#GJczfT.e*k<b\.zm/#dJ"ijk

Demonstration Test suite
The output format is newline separated. The test suite code uses space separation, for ease of reading, but is otherwise the same.
Outputs a -0 in the last 2 cases, which I hope is OK.
Explanation to follow.

Retina, 115
\b[ijk]
1$&
^(?!.*\d([+-]|$))
0+
^(?!.*i)
+0i+
^(?!.*j)
0j+
^(?!.*k)
0k+
O$`[+-]*[\d.]*(\w?)
$1
-
+-
^\+

S`[ijk+]+

Try it online!
1 byte saved thanks to @Chris Jester-Young.
A bug fixed and 6 bytes saved thanks to @Martin Büttner
Found a couple bugs involving some edge cases, bumped up byte count quite a bit.
Returns the numbers newline separated. Anyway, this has a mostly elegant solution that sort of gets ruined by edge cases but hey I got to use sort mode, that means I used the right tool for the job, right?
Explanation:
Stage by stage, as usual.
\b[ijk]
1$&

The only characters in the input that can create word boundaries are -+.. This means that if we find a boundary followed by a letter, we have an implicit 1 which we add in with the replacement. $& is a synonym for $0.
^(?!.*\d([+-]|$))
0+

Big thanks to Martin for this one, this one adds in the implicit 0 for the real part if it was missing in the input. We make sure that we can't find a number that is followed by a plus or minus sign, or the end of the string. All the complex numbers will have a letter after them.
^(?!.*i)
+0i+

The next 3 stages are all pretty much the same, barring which letter they impact. All of them look to see if we can't match the letter, and if we can't we add a 0 term for it. The only reason i has an extra + before it is to prevent the real value from being unreadable with the is coefficient, the other numbers are all separated by their complex variable.
O$`[+-]*[\d.]*(\w?)
$1

Ah, the fun part. This uses the newish sort stage, denoted by the O before the option separator backtick. The trick here is to grab the whole number followed optionally by a word character, which in this case will only ever match one of ijk. The other option used is $ which causes the value used to sort these matches to be the replacement. Here we just use the optional letter left over as our sort value. Since Retina sorts lexicographically by default, the values are sorted like they would be in a dictionary, meaning we get the matches in "", "i", "j", "k" order.
-
+-

This stage puts a + sign in front of all the minus signs, this is needed if we have a negative value for i in the split stage, later.
^\+

We remove the leading + to make sure we have no extra leading newline.
S`[ijk+]+

Split the remaining lines on runs of the complex variables or the plus sign. This nicely gives us one value per line.

Lua, 185 187 195 183 166 bytes (try it online) [used regex]
Thanks to @Chris Jester-Young for the improved regex.
Thanks to @Katenkyo for bringing it down to 166 bytes.
Golfed:
r={0,0,0,0}for u in(...):gsub("([+-])(%a)","%11%2"):gmatch("-?[%d.]+%a?")do n,i=u:match("(.+)(%a)")r[i and(" ijk"):find(i)or 1]=(n or u)end print(table.concat(r," "))

Ungolfed:
n = "42i+j-k+0.7"

result = {0,0,0,0}

for unit in n:gsub("([+-])(%a)","%11%2"):gmatch("-?[%d.]+%a?") do
  num, index = unit:match("(.+)(%a)")
  if index == "i" then
    result[2] = num
  elseif index == "j" then
    result[3] = num
  elseif index == "k" then
    result[4] = num
  else
    result[1] = unit
  end
end

print(table.concat(result," "))

Hi Kenny, thanks for the solution. Usually we don't allow the input starting in a variable (like n in this case), so you should add the code to read the input.

You should be able to save some byte by changing your input from STDIN to argument, instead of io.read(), use (...). It will point to the first command-line argument and will allow you to save 4 more bytes :)

Also, the asked output can be anything, as long as it can be interepreted by humans as a list, so you can remove the extra formatting. Including some more whitespaces you can shave off, your code can go down to 166 bytes -> r={0,0,0,0}for u in(...):gsub("([+-])(%a)","%11%2"):gmatch("-?[%d.]+%a?")do n,i=u:match("(.+)(%a)")r[i and(" ijk"):find(i)or 1]=(n or u)end print(table.concat(r," "))

Perl 5, 125 bytes
#!perl -p
%n=(h,0,i,0,j,0,k,0);$n{$4//h}=0+"$1@{[$3//$5//1]}"while/([+-]?)(([\d.]+)?([ijk])|([\d.]+))/g;s/.*/@n{qw(h i j k)}/

@KennyLau Sadly, your proposed change does not do what you expect. I have tried that before I posted my answer. ;-)

@KennyLau Regarding this proposed change, Perl's \a matches on "alarm", not alphabetic. There's \w for word-character (alphanumeric and underscore), but that won't work here; we need it not to match on a number.

@KennyLau BTW, you have enough rep to talk in chat. Feel free to discuss ideas there, rather than continually getting your edit suggestions rejected. ;-)

I also have enough rep to comment now. Does Perl not have a pattern for [a-z]?

You can count this as 116 (as per http://meta.codegolf.stackexchange.com/a/274/3808).

Golfing your solution a bit more gives 75 strokes: perl -lpe 's%([+-]|)([\d.]+)?(\pL|$)?%${$3//h}=$1.($2//1)%eg;$_="@{[map$$_+0,h..k]}"

@KennyLau Not to my knowledge.

@TonHospel That doesn't reset %$'s state between lines, which means some of the results are wrong. But I'll use some of your strategies!

The challenge only asks for parsing 1 quaternion, so leaving the state disturbed is fine. Input will be a single string ...

C, 236 bytes
char j,n[9][9],s[9],y[9],i=8,k,*p=n[8];main(c){for(**n=48;c=getchar(),c+1;)c-32&&(c<46&&(k&&(y[1]=i),k=0,s[--i]=c-43,p=n[i])||c>57&&(k||(*p=49),k=0,y[c-103]=i)||(*p++=c,k=1));for(k&&(y[1]=i);++j<5;)printf("%c%s ",s[y[j]]?45:0,n[y[j]]);}

(For values like -0 or -0.0, the minus sign is also printed in the output, but since the challenge states that "you can change numbers into another form after parsing if you want", and if -0 appears in the input, it follows that it's also acceptable in the output. @GamrCorps has now clarified that this is ok.)

JavaScript (ES6), 103 100 bytes
f=s=>s.replace(/(?=.)(\+|-|)([\d.]*)(\w?)/g,(_,s,x,c)=>a[c.charCodeAt()&3]=+(s+(x||1)),a=[0,0,0,0])&&a

Edit: Saved 3 bytes by switching from parseInt to charCodeAt, which conveniently just needs &3 to get me the correct array index.

Nice idea parseInt + mod. Thinking about base and prefix

JavaScript (ES6) 106
s=>(s.replace(/([+-]?)([\d.]*)(\w?)/g,(a,b,c,d)=>a&&(s[d||9]=b+(c||1)),s={}),[...'9ijk'].map(i=>+s[i]||0))

Test

f=s=>(s.replace(/([+-]?)([\d.]*)(\w?)/g,(a,b,c,d)=>a&&(s[d||9]=b+(c||1)),s={}),[...'9ijk'].map(i=>+s[i]||0))

function Test()
{
  var t,k,r,ts=TS.value.split('\n')

  O.textContent=ts.map(x=>x.trim()&&(
    [t,k]=x.split('=>').map(x=>x.trim()),
    console.log(t,'*',k),
    k=k.match(/[\d+-.]+/g).map(x=>+x),
    r=f(t),
    t+' => '+r+(r+''==k+''?' OK':' KO (check: '+k+')')
  )).join('\n')
}

Test()
#TS { width:90%; height:10em}

Test data (modify if you like)<button onclick='Test()'>repeat test</button>
<textarea id=TS>
1+2i+3j+4k             => [1 2 3 4]
-1+3i-3j+7k            => [-1 3 -3 7]
-1-4i-9j-2k            => [-1 -4 -9 -2]
17-16i-15j-14k         => [17 -16 -15 -14]

7+2i                   => [7 2 0 0]
2i-6k                  => [0 2 0 -6]
1-5j+2k                => [1 0 -5 2]
3+4i-9k                => [3 4 0 -9]

42i+j-k                => [0 42 1 -1]
6-2i+j-3k              => [6 -2 1 -3]
1+i+j+k                => [1 1 1 1]
-1-i-j-k               => [-1 -1 -1 -1]

16k-20j+2i-7           => [-7 2 -20 16]
i+4k-3j+2              => [2 1 -3 4]
5k-2i+9+3j             => [9 -2 3 5]
5k-2j+3                => [3 0 -2 5]

1.75-1.75i-1.75j-1.75k => [1.75 -1.75 -1.75 -1.75]
2.0j-3k+0.47i-13       => [-13 0.47 2.0 -3]
5.6-3i                 => [5.6 -3 0 0]
k-7.6i                 => [0 -7.6 0 1]

0                      => [0 0 0 0]
0j+0k                  => [0 0 0 0]
-0j                    => [0 0 0 0]
1-0k                   => [1 0 0 0]
</textarea>

PowerShell, 178 bytes
param($a);$p="(-?)([\d.]+)?";$g={param($s)if($a-match"$p$s"){if(($r=$matches)[2]){$r[1]+$r[2]}else{$r[1]+1}}else{0}};$a-match"$p(\+|-|$)">$null;+$matches[2];"i","j","k"|%{&$g $_}

Ungolfed with Explanation
# Get the whole string into a variable
param($a)
# Pattern shared getting both imaginary and real numbers.
$p="(-?)([\d.]+)?"
# Anonymous function that will locate a imaginary number using a letter sent as a parameter.
# If no value is assigned a signed 1 is returned. If no value is matched 0 is returned
$g={param($s)if($a-match"$p$s"){if(($r=$matches)[2]){$r[1]+$r[2]}else{$r[1]+1}}else{0}}
# Locate the real component if any. Null is converted to 0
$a-match"$p(\+|-|$)">$null;+$matches[2]
# Call the anonymous function using each of the imaginary suffixes.
"i","j","k"|%{&$g $_}

Not super impressed but it is a result nonetheless.

PHP, 179 bytes
$a=[''=>0,'i'=> 0,'j'=>0,'k'=>0];preg_match_all("/([-+]?)(\d*(\.\d+)?)([ijk]?)/",$argv[1],$m,2);foreach($m as$n)if($n[0])$a[$n[4]]=$n[1].($n[2]===''?1:$n[2]);echo implode(',',$a);

Try the test suite.

Python 3.5 - 496 bytes [using Regular Expressions]:
from re import*
def wq(r):
 a=sub('[+](?![0-9])','+1',sub('[-](?![0-9])','-1',r));q=lambda x:(not x.isdigit(),''.join(filter(str.isalpha,x)))
 for z in findall('(?<![0-9])[a-z]',a):a=a.replace(z,('+1{}'.format(z)))
 if not str(sorted(((sub('[.]','',sub('[+-]',' ',a))).split(' ')),key=q)[0]).isdigit():a+='+0, '
 for i in list(set(findall('[a-z]',a))^{'i','j','k'}):a+='+0{}, '.format(i)
 print(findall('[-]?\d+(?:\.\d+)?',''.join(sorted(sub('(?<=[A-Za-z0-9])(?=[+-])',', ',a).split(' '),key=q))))

It may be long, but in my defense, it works perfectly in doing what the OP wants, since all the test cases given were successful using my code.
Ungolfed version with explanation included:
from re import*
def w(r):
    # Substitute all minus (-) and plus (+) signs NOT followed by a number  (if there are any) with a "-1"/"+1", respectively.
    a=sub('[+](?![0-9])','+1',sub('[-](?![0-9])','-1',r))
    # Lambda function created for later use to sort the Quaternion. This function, when given as a key to the "sorted" function, arranges the input Quaternion in the order where the whole number comes first, and then the rest are placed in order of increasing letter value (i,j,k in this case)
    q=lambda x:(not x.isdigit(),''.join(filter(str.isalpha,x)))
    # The following "for" loop replaces the letters NOT preceded by a number with a one followed by that letter
    for z in findall('(?<![0-9])[a-z]',a):
        a=a.replace(z,('+1{}'.format(z)))
    # The following first substitutes all pluses and minuses (+ and -) with a space, and then that new string is split at those spaces, and returned as a list. After that, the list is sorted according the the "lambda" function shown above. Then, the first item in that list, which is supposed to be a lone number, is checked to make sure that it indeed is a lone number. If it isn't, then "+0, " is appended to the Quaternion.
    if not str(sorted(((sub('[.]','',sub('[+-]',' ',a))).split(' ')),key=q)[0]).isdigit():
        a+='+0, '
    # The following "for" loop finds ALL the letters NOT in the list, by finding the symmetric difference between a set of all the letters found, and a set containing all the letters needed. For the letters not in the list, a '+0' is added the quaternion, followed by that letter, and then a comma and a space.
    for i in list(set(findall('[a-z]',a))^{'i','j','k'}):
        a+='+0{}, '.format(i)
    # Finally, in this last step, a ", " is added IN BETWEEN unicode characters and pluses/minuses (+/-). Then, it splits at those spaces, and the commas separate different parts of the Quaternion from each other (otherwise, you would get something like `12i+3j+4k` from `2i+3j+4k+1`) in a returned list. Then, that list is sorted according to the lambda expression "q" (above), and then, finally, the NUMBERS (of any type, courtesy to Regex) are extracted from that joined list, and printed out in the correct order.
    print(findall('[-]?\d+(?:\.\d+)?',''.join(sorted(sub('(?<=[A-Za-z0-9])(?=[+-])',', ',a).split(' '),key=q))))

If the above is a little too hard to read, basically what is happening is that:

If there are any, all + or - signs NOT followed by a number are replaced with a "+1"/"-1", respectively.

A lambda function is defined, which, when used in a sorted function as a key, sorts the list according to putting the whole number first, and then ordering the rest in increasing letter value ("i",then "j", then "k" in this instance).

The Quaternion, now having all +/- signs replaced with a 1 if needed, is searched, using Regular Expressions, for ALL letters NOT preceded by at least one number, and those letters that match are replaced with a "+1" followed by that letter.

The "if" statement then replaces ALL +/- signs with a space, and then the modified Quaternion is now "split" at those spaces, and returned in a list. Then, the list is sorted according to the lambda function explained earlier. Finally, the first item in that list is checked to make sure it's a number, since it's supposed to be, and if it's not, then a "+0, " is added to the Quaternion.

The second "for" loop finds ALL the letters NOT in the Quaternion by finding a symmetric difference between a set of those letters found in the expression, and then a set including all letters required. If any are found, then a "+0" followed by the missing letter and a space is added to the Quaternion.

Finally, in this last step, a ", " is added in between each character followed by a +/- symbol, and then the Quaternion is split at those spaces, then the list returned is sorted, for the last time, according to the lambda function defined as "q" earlier on. The commas in the expression separate each part of the quaternion (otherwise, you would be getting something like 14i+5j+6k from 4i+5j+6k+1). Lastly, that now sorted list is joined together into a string, and only the numbers of any type (courtesy of Regular Expressions) are extracted, and finally returned in a list, in the correct order, every single time.


text:
Express a number with only 0-9 and the four operations
Explanation
Befunge is a two-dimensional program that uses stacks.
That means, to do 5 + 6, you write 56+, meaning:
56+
5    push 5 into stack
 6   push 6 into stack
  +  pop the first two items in the stack and add them up, and push the result into stack

(to those of you who do not know stacks, "push" just means add and "pop" just means take off)

However, as the intelligent of you have observed, we cannot push the number 56 directly into the stack.
To do so, we must write 78* instead, which multiplies 7 and 8 and pushes the product into the stack.
Details
Input can be taken in any format, meaning it can be STDIN or not, at the programmer's discretion.
The input will be a positive integer (no bonus for including 0 or negative integers).
The output will be a string consisting of only these characters: 0123456789+-*/ (I would not use % modulo.)
The goal is to find the shortest string that can represent the input, using the format described above.
For example, if the input is 123, then the output would be 67*99*+. The output should be evaluated from left to right.
If there are more than one acceptable outputs (e.g. 99*67*+ is also acceptable), any one can be printed (no bonus for printing all of them).
Further Explanation
If you still do not understand how 67*99*+ evaluates to 123, here is a detailed explanation.
stack    |operation|explanation
          67*99*+
[6]       6         push 6 to stack
[6,7]      7        push 7 to stack
[42]        *       pop two from stack and multiply, then put result to stack
[42,9]       9      push 9 to stack
[42,9,9]      9     push 9 to stack
[42,81]        *    pop two from stack and multiply, then put result to stack
[123]           +   pop two from stack and add, then put result to stack

TL;DR
The program needs to find the shortest string that can represent the input (number), using the format specified above.
Notes
This is a code-golf challenge, so the shortest code in bytes wins.
Disambiguation
The - can either be x-y or y-x, at the programmer's discretion. However, the choice must be consistent within the solution. Likewise for the /.
Sample program
Lua, 1862 bytes (try it online)
Since I am the author, I will not golf it at all.
Explanation:
This uses the depth-first search method.

More about depth-first search: here.
The program:
local input = (...) or 81

local function div(a,b)
    if b == 0 then
        return "error"
    end
    local result = a/b
    if result > 0 then
        return math.floor(result)
    else
        return math.ceil(result)
    end
end

local function eval(expr)
    local stack = {}
    for i=1,#expr do
        local c = expr:sub(i,i)
        if c:match('[0-9]') then
            table.insert(stack, tonumber(c))
        else
            local a = table.remove(stack)
            local b = table.remove(stack)
            if a and b then
                if c == '+' then
                    table.insert(stack, a+b)
                elseif c == '-' then
                    table.insert(stack, b-a)
                elseif c == '*' then
                    table.insert(stack, a*b)
                elseif c == '/' then
                    local test = div(b,a)
                    if test == "error" then
                        return -1
                    else
                        table.insert(stack, a+b)
                    end
                end
            else
                return -1
            end
        end
    end
    return table.remove(stack) or -1
end

local samples, temp = {""}, {}

while true do
    temp = {}
    for i=1,#samples do
        local s = samples[i]
        table.insert(temp, s..'0')
        table.insert(temp, s..'1')
        table.insert(temp, s..'2')
        table.insert(temp, s..'3')
        table.insert(temp, s..'4')
        table.insert(temp, s..'5')
        table.insert(temp, s..'6')
        table.insert(temp, s..'7')
        table.insert(temp, s..'8')
        table.insert(temp, s..'9')
        table.insert(temp, s..'+')
        table.insert(temp, s..'-')
        table.insert(temp, s..'*')
        table.insert(temp, s..'/')
    end
    for i=1,#temp do
        if input == eval(temp[i]) then
            print(temp[i])
            return
        end
    end
    samples = temp
end

Bonus
A cake for you if you use Befunge (or any variant of it) to write the code.

It may be hard to decide, given an answer, if it always produces the sortest string. One idea would be to generate a large set of say 30--50 numbers and score by the sum of all output string length. However, I'm not sure how to combine that score with code length

@DonMuesli See my sample solution.

What's the maximum possible input?

@mbomb007 As large as is possible (just set a reasonable boundary).

@Mego Modified.

Subset of this.

@CoolestVeto Well this gets more answer than that (but flag if you want).

@KennyLau Yeah, no, duplicates should never be around.

Copying over my thoughts from chat: "I thought about it but I'd argue that the subset makes things a lot simpler because 1) no hex, 2) no floats, 3) no duplication and 4) positive only"

@CoolestVeto this one is different enough to invalidate the old answers.

@EasterlyIrk Both of those answers were invalidated by the old question's rule changes, the question, as it stands, is a subset of the current rules for that question. I think Sp3000's argument is good enough, though.

@CoolestVeto I think the other challenge should be closed as a duplicate of this one.

In my opinion, the two challenges are different enough, and eventually the other should be closed. That's why I voted to reopen

As an extra argument that this is not a duplicate: My perl solution is based on the fact that all operators are binary. It wouldn't work if one of the allowed operators is to duplicate the top of the stack

All numbers below 2^32 can be generated with a string of at most 29 characters (15 values and 14 operators) while forcing no overflow in the intermediate values. The lowest number needing the full 29 characters is 676156706.

Perl, 134 133 132 128 bytes
Includes +5 for -Xlp (2 extra because the code contains ')
Run with the target number on STDIN:
perl -Xlp befour.pl <<< 123

befour.pl:
@1{1..9}=1..9;$.+=2,map{for$a(%1){"+-*/"=~s%.%"\$1{\$-=$a$&$_/'$1{$a}$1{$_}$&'=~/^.{$.}\$/}||=\$&"%eegr}}%1until$\=$1{$_}}{

It has no artificial limits and is conceptually somewhat efficient but has terrible run times nevertheless even though I sacrificed a few bytes to speed it up. Generating a length 11 solution (e.g. target number 6551) takes about 5 hours on my system.
Sacrificing 7 more bytes makes the speed somewhat more bearable.
@1{1..9}=1..9;$.+=2,map{for$a(@a){"+-*/"=~s%.%"\$1{\$-=$a$&$_/'$1{$a}$1{$_}$&'=~/^.{$.}\$/}||=\$&"%eegr}}@a=keys%1until$\=$1{$_}}{

17 minutes for a length 11 solution, about 5 hours for a length 13 solution. The first number that needs length 15 is 16622 which takes about 2 days. The first number that needs length 17 is 73319.
Notice that it assumes that division returns an integer by truncating towards 0 (per the befunge 93 specification)

What do the dollar-signs do? (I don't speak Perl at all)

@KennyLau $ accesses the scalar value. Where in most languages you would write a=4, perl will use $a=4. But is also used for a scalar access of more complex variables. E.g. $a{$b} fetches from hash (map, dictionary)%a the scalar value keyed on $b

Python 2, 278 bytes
My best solution, which everytime gives shortest answer. (but very slow)
def e(c):
 s=[];x,y=s.append,s.pop
 while c:
  d,c=c[0],c[1:]
  if"/"<d<":":x(d)
  else:a,b=y(),y();x(str(eval(b+d+a)))
 return int(y())
def g(v):
 s="0123456789+-*";t=list(s)
 while 1:
  for x in t:
   try:
    if e(x)==v:return x
   except:0
  t=[x+y for x in t for y in s]

Python 2, 437 bytes
This solution is longer, but very fast (not brute force). And I'm quite sure, that it always return shortest possible result.
r=range;l=len;a=input()
def f(n):
 if n<=9:return str(n)
 for d in r(9,1,-1):
  if n%d==0:return f(n/d)+"%d*"%d
 h=sum(map(int,list(str(n))))%9
 return f(n-h)+"%d+"%h
m={x:f(x) for x in r(a*9)}
for b in m:
 if a-b in m and l(m[b])+l(m[a-b])+1<l(m[a]):m[a]=m[a-b]+m[b]+"+"
 if a+b in m and l(m[b])+l(m[a+b])+1<l(m[a]):m[a]=m[a+b]+m[b]+"-"
 if b!=0 and a%b==0 and a/b in m and l(m[b])+l(m[a/b])+1<l(m[a]):m[a]=m[a/b]+m[b]+"*"
print m[a]

Welcome to PPCG! Hope you'll have a great time here.

@pbochinak I think I might have found a valid one. f(6551) returns 25*8*9*7+9*8+ (13 characters), while 9999***52*- (11 characters) is a better one. Verified with my own eval function above (in the question).

@pbochniak As the comment before mine points out, this answer is invalid in its current state. It is recommended to temporarily delete it while you're working on a fix (if nothing else, to prevent it from attracting downvotes).

your while can just be while c:

You can use ; to separate assignments to variables (which saves bytes in indented blocks), ven's tip, get rid of whitespace between a symbol and anything else, and t can go.

Python 2, 284 bytes
Disclaimer:  Takes freaking forever for some values ... but should be guaranteed to always return the shortest string, and has no artificially imposed range limit ... even works on negative values. :)
def f(v):
 i,z=0,'+-*/'
 while 1:
  s=('%x'%i).translate(__import__('string').maketrans('abcd',z),'ef');t=s;q=[];a,p=q.append,q.pop;i+=1
  try:
   while t:
    o,t=t[0],t[1:]
    if o in z:n,m=p(),p();a(eval(`m`+o+`n`))
    else:a(int(o))
   if p()==v and not q:return s
  except:pass

Algorithm:

Start with i = 0
Take the string representing the hex value of i, and replace abcd with +-*/ respectively, and remove any ef
Attempt to process string as postfix notation (RPN)
If successful, and result matches input value, return the string used.
Otherwise, increment i and try again.

"[t]akes [...] forever for some values" Have you tested it? What values?

@KennyLau I just wrote a test that's calculating f(i) from 0 <= i <= 6551 (to capture the 6551 value you used to invalidate @pbochniak 's original submission).
Right now, it's been running for only a few minutes, and here's the last output from the test:
91 : 49+7*  3.020 s (total 108.174 s, worst 89: 5.827 s)  Update - it just finished with value 92:  92 : 149+7*+  258.761 s (total 366.935 s, worst 92: 258.761 s)

@KennyLau :  Test has been running over an hour, and only up to value 113 ... see full test output here (pastebin) if you're interested ...

Python 2, 182 bytes
n=input()
L=[[[],""]]
while 1:
 s,c=L.pop(0);L+=[[s+[i],c+`i`]for i in range(10)]+(s[1:]and[[s[:-2]+[eval(`s[-2]`+o+`s[-1]`)],c+o]for o in"/+-*"[s[-1]==0:]])
 if[n]==s[-1:]:print c;E

So obscenely slow, I've left it running for an hour on input 221 and it still hasn't terminated. A great deal of the slowness is because I'm using a list as a queue for a breadth-first search, and .pop(0) is O(n) for lists.
L is just a queue containing (stack, code to reach stack) pairs. At each step, digits are always added, and operators are performed if the stack has at least two elements. Division is only performed if the last element is not 0, although I have a strong suspicion that division is never necessary (although I have no way of proving it, but I have checked this is the case up to 500).
The program terminates via a NameError after printing the result (eventually).

What is the ;E at the end doing?

@KennyLau That's the NameError for termination, since E is not defined anywhere else

Wow, such cleverness.

C, 550 545 bytes
#define L strlen
#define y strcpy
#define t strcat
char c[9999][99];i=1,k=3;main(j){for(;i<10;i++)*c[i]=i+'0';for(;k--;){
for(i=1;i<9999;i++)for(j=1;j<=i;j++)*c[i]&&*c[j]&&(i+j>9998||*c[i+j]&&
L(c[i+j])<L(c[i])+L(c[j])+2||t(t(y(c[i+j],c[i]),c[j]),"+"),
i*j>9998||*c[i*j]&&L(c[i*j])<L(c[i])+L(c[j])+2||t(t(y(c[i*j],c[i]),c[j]),"*"));
for(i=9999;--i;)for(j=i;--j;)*c[i]&&*c[j]&&(*c[i/j]&&
L(c[i/j])<L(c[i])+L(c[j])+2||t(t(y(c[i/j],c[i]),c[j]),"/"),
*c[i-j]&&L(c[i-j])<L(c[i])+L(c[j])+2||t(t(y(c[i-j],c[i]),c[j]),"-"));}
scanf("%d",&i);printf("%s",c[i]);}

550 545 bytes after deleting the unnecessary newlines (all but the three newlines after the preprocessing directives).
@Kenny Lau - It can receive as input an integer between 1 and 9998, but I think that the range of input for which an optimal solution is computed is smaller than 9998. On the other hand, both ranges can be extended, if the memory allows it.
The program cannot push onto the stack any number higher than 9998. (9998 can be modified.) I ran the program in a different version, iterating over the outer loop (the one with k) for as long as there is improvement for any number between 1 and 9998 (as in Dijkstra's algorithm). After three iterations there is no improvement. So to save bytes, I hardcoded k=3.
To extend the range, two things are necessary - modifying the constants 9999 and 9998, running it with a variable number of iterations over the outter loop for as long as there is improvement, to see how long it takes until no improvement takes place, then modify the constant k=3 to that value.

Welcome to PPCG! Hope you'll have a great time here.

This passes my 6551 test perfectly. What is the effective range of this program?

I believe it is 9999. Can you please add this information to your solution?

It should be 9998. Also, you can eat some bytes by initializing i, j, and k before main().

You can still eat some bytes by using i instead of n.

@Kenny Lau - Thank you for the edit. About extending the range, I noticed that it actually takes a little more to extend the range. I included that information in the answer.

CJam, 79
ri:M;A,:s:L;{L2m*{s,Y=},{~:A+AS*~!"/+-*">\f{\+}~}%Y2+:Y;_L@+:L;{S*~M=},:R!}gR0=

Try it online
This is horribly inefficient, but given enough memory and time, it eventually works. 123 runs out of memory with 16GB, but 120 and 125 are ok.

Pyth - 35 bytes
Brute force. A weird thing is that the new implicit input actually hurts my score because it seems to be working for .v pyth_eval also.
.V1IKfqQ.x.v+jd_T\;N^s+"+-*/"UTbhKB

Try it online here.

Python 3, 183 bytes
e,n=enumerate,input()
v=list('0123456789')+[' '*n]*n*2
for i,s in e(v):
 for j,t in e(v):
  for o,k in zip('+*-',(i+j,i*j,i-j)):
   if 9<k<2*n:v[k]=min(v[k],s+t+o,key=len)
print(v[n])

Speed isn't totally unreasonable (123, 221, 1237, 6551 finish on the order of seconds or minutes). Changing the if statement to if j<=i and <k<2*n speeds it up more, at the cost of 9 more bytes. I left out division (/), because I can't see how it would be needed.

Hint: division is needed.


text:
Find the treasure in a 2D dungeon
You are in a one-floor dungeon. There is a treasure which is protected by locked doors. Doors can be opened by finding the corresponding keys. Your goal is to find the shortest path to the treasure.
Input
Input will be a two-dimensional grid representing the initial layout of the dungeon.
###########
#$   #   g#
#    # ####
###G##    #
#    ####C#
#c  @     #
###########

This is you: @
These are walls: #
This is the treasure: $
Locked doors are capital letters: A...Z
Each door has a corresponding lower-case key: a...z

There will always be one @ and one $.
The dungeon will always be rectangular.
It is not guaranteed that the outside edge of the dungeon is a wall. This is a valid dungeon:
  $
A##
@ a

It is not guaranteed that the treasure is reachable. Some dungeons may not be solvable.
There may be doors without a key, and there may be keys that do not open any doors.
There will never be duplicate doors or keys.

Output
Your program should print a sequence of R, L, U, D (or 4 other distinct symbols) to represent the shortest possible path to the treasure. Here, RLUD stands for right, left, up, and down, respectively. If there are multiple shortest paths, your program only needs to print one of them.

You cannot move onto a wall.
You cannot move outside of the dungeon boundaries.
You cannot move onto a door without picking up it's key.
Move onto a key to pick it up.
It is not necessary to open every single door.

If it is not possible to reach the treasure through a valid sequence of moves, then your program must terminate without printing anything. (A trailing newline is allowed.)
Scoring
This is code-golf so the answer with the lowest byte count wins.
Test Cases
Each test case will have the height and width of the dungeon on the first line, and one possible path, with the optimal number of moves, on the last line.
1 2
@$
R (1)

3 3
  $
#Z#
@ z
RRLUUR (6)

3 5
c#d#$
 #C#D
@
UUDDRRUUDDRRUU (14)

7 16
c   # b #  ###@
###     #
  A #####  ####
d #           e
  B    ## #####
###    C   ##
       # a DE $
RDDDDDDL (8)

16 37
#####################################
#    #ijk #a M   ##m##   #    #  R  #
#    #    #  #           #       ####
###J#### ############# ###    #  P b#
#e                       N  h #  ####
##########  ###########  ######     #
#        #  #    $    #  #    #  ####
#  D     H  #         #  #       Q f#
# EcF    #  #####A#####  ######  ####
#  G     #  #####B#####  #          #
#        K  #####C#####  ############
#        #                          #
########### #         #### ##### ####
#     # p   #         # n    #      #
# d         #    @    #     o#   r  #
#################Z###################
UUULLLLLLDDLLLDLLLLLLRRRRRRRRRUUURRRRRRRRRRRRRRRDDLLRRUULLUUUUUUURRRRRUURRRDRRRLLLLULLLLLDDLLLLUULLLUDLLLLLULLLRRRRRDRRRRRRDDLLLLLLLLLLLLDDDLLLLLLLDURRRRRRRRDDDDRRRRRRUUUUU (172)

It is not possible to reach the treasure in the following dungeons. For these test cases, there should be no output.
1 3
@#$

7 11
#a#j#$#i#f#
# #E#F#c#H#
# #K#D#A#G#
#         #
#C#J# #I#B#
#h#d# #L#g#
#l#e#@#b#k#

10 25
#########################
   # fgh  #  # c B b #  #
 $ #      #  #   #   #  #
   ###### #  ##H###E##  #
   #                    #
   #     #########  ##e##
   Z @   D     y #  #   #
   #     #########  F  C#
   #     G          # Ad#
#########################

The following snippet can be used to validate answers.

function run() {var dungeonText = document.getElementById("dungeon").value;var dungeonLines = dungeonText.split("\n");var height = dungeonLines.length;var width = dungeonLines[0].length;var dungeon = new Array(height);for (i = 0; i < dungeon.length; i++) {var dungeonLine = dungeonLines[i];if (dungeonLine.length != width) {return error("The dungeon is not rectangular");} dungeon[i] = dungeonLines[i].split("");} var movesText = document.getElementById("moves").value;var moves = movesText.trim().split("");var moveCount = moves.length;var rowAt, colAt;for (r = 0; r < dungeon.length; r++) {for (c = 0; c < dungeon[r].length; c++) {if (dungeon[r][c] == '@') {rowAt = r;colAt = c;}}} var treasure = false;while (moves.length > 0) {var move = moves[0];var row = rowAt,col = colAt;switch (move) {case 'R':col++;break;case 'L':col--;break;case 'U':row--;break;case 'D':row++;break;default:return print(dungeon, moves, "Invalid move");} if (row < 0 || col < 0 || row >= height || col >= width) {return print(dungeon, moves, "Out of bounds");} var target = dungeon[row][col];if (target.match(/[A-Z#]/)) {return print(dungeon, moves, "Path blocked");} if (target.match(/[a-z]/)) {var door = target.toUpperCase();for (r = 0; r < dungeon.length; r++) {for (c = 0; c < dungeon[r].length; c++) {if (dungeon[r][c] == door) {dungeon[r][c] = ' ';}}}} if (target == '$') {treasure = true;} dungeon[row][col] = '@';dungeon[rowAt][colAt] = '.';rowAt = row;colAt = col;moves.shift();} if (treasure) {print(dungeon, moves, "Got the treasure in " + moveCount + " moves!");} else {print(dungeon, moves, "Failed to reach treasure");}} function error(message) {var result = document.getElementById("result");result.innerHTML = message;} function print(dungeon, moves, message) {var output = message + "\n";for (r = 0; r < dungeon.length; r++) {for (c = 0; c < dungeon[r].length; c++) {output += dungeon[r][c];} output += "\n";} for (i = 0; i < moves.length; i++) {output += moves[i];} var result = document.getElementById("result");result.innerHTML = output;}
Dungeon:
<textarea id="dungeon" name="dungeon" rows="20" cols="40"></textarea>
Moves:
<textarea id="moves" name="moves" cols="40"></textarea>
<button id="run" name="run" onclick="run();">Start</button>

Result:
<textarea id="result" name="result" rows="20" cols="40" disabled></textarea>

Forgot to say this earlier: welcome to PPCG! This is an exceptionally well-written (and interesting) first challenge. Nice job. :)

Wow nicem would like to see and answer for this one

Perl, 157 152 151 bytes
Includes +4 for -p0 (cannot be counted as just an extension of -e because it uses ' in several places)
Run with the maze on STDIN:
./keymaze.pl < maze.txt

keymaze.pl:
#!/usr/bin/perl -p0
1until$n{map/\n/&&"L1R-1U@+D-@+"=~s%\pL%$t=$1{$_}.$&;pos=$^H=-$'+s'@' '*"@-",s/\G[a-z\$ ]/\@/+s/$&/ /i?/\$/?$1{$_}:$\||=$t:0for"$_"%reg,$_,%1}++.$\}{

Replace \n and ^H by their literal versions for the claimed score. Needs about 1 hour and a bit less than 2 Gigabytes on my machine to solve the big maze.

Java 8 - 1282 1277 1268 1259 1257 bytes
This passes all the tests. However, for some of them it gives some slightly different results (when there is more than one optimal way, which isn't a problem).
For the 4th test, it gives this:
RDDDDDLD

Instead of this:
RDDDDDDL

For the 5th test, it gives this:
LLLLUUULLDDLLLLDLLLLLRRRRRRURRRUURRRRRRRRRRRRRRRDDLLRRUULLUUUUUUURRRRRUURRRDRRRLLLLULLLDDLLLLLLUULLLUDLLLLLULLLRRRRRDRRRRRRDDLLLLLLLLLLLLDDDLLLLLLLDURRRRRRRRDDDDRRRRRRUUUUU

Instead of this:
UUULLLLLLDDLLLDLLLLLLRRRRRRRRRUUURRRRRRRRRRRRRRRDDLLRRUULLUUUUUUURRRRRUURRRDRRRLLLLULLLLLDDLLLLUULLLUDLLLLLULLLRRRRRDRRRRRRDDLLLLLLLLLLLLDDDLLLLLLLDURRRRRRRRDDDDRRRRRRUUUUU

Golfed version:
import java.util.*;class G{int y,w,h,p;String C="",S,o,v;Map m=new HashMap();String q(int a){return a<1?"":"#"+q(a-1);}public static void main(String[]a)throws Exception{new G(new String(java.nio.file.Files.readAllBytes(new java.io.File(a[0]).toPath())));}G(String a){w=(a+"\n").indexOf(10)+3;String t=q(w)+a.replace("\n","##")+q(w);for(char j=65,k=97;j<91;j++,k++){if(t.indexOf(j)*t.indexOf(k)<0)t=t.replace(j,'#').replace(k,' ');}h=t.length()/--w;S=v=q(w*h);t=g(t);if(t!=v)System.out.print(t);}String g(String t){o=(String)m.get(t);if(o!=null)return o;if(t.indexOf(36)<0){if(S.length()>C.length())S=C;return"";}String d="";int f=t.indexOf(64),M[]=new int[w*h],N[]=new int[w*h];Queue<Integer>s=new ArrayDeque();s.add(f);while(!s.isEmpty()){y=s.poll();int[]P={y+1,y-1,y+w,y-w};for(int v:P){char j=t.replaceAll("[A-Z]","#").charAt(v);if(v!=f&j!=35&(N[v]<1|M[y]+1<M[v])){M[v]=M[y]+1;N[v]=y;s.add(v);if(j>32)d+=j;}}}o=d.chars().distinct().mapToObj(e->{String z="",c=C;for(y=t.indexOf(e);y!=f;y=N[y]){p=y-N[y];z=(p==w?"D":p==-w?"U":p==1?"R":"L")+z;}if(S.length()<=(C+z).length())return v;C+=z;String u=g(t.replace('@',' ').replace((char)e,'@').replace((char)(e-32),' '));C=c;return u==v?v:z+u;}).reduce(v,(a,b)->a.length()<b.length()?a:b);m.put(t,o);return o;}}

Ungolfed version
Features:

Informative variable names;
Explicative and detailed comments;
Proper identation.

import java.util.*;

/**
 * @author Victor Stafusa
 */
class TreasureHunt {

    // Note: on normal (non-golfing programming) those variables should have been scoped properly.
    // They are instance variables just for golfing purposes.
    // On the golfed version, nextCellIndex and waypointCellIndex are the same variable. The same also happens to cachedValue and result. This happens is for golfing purposes.

    int nextCellIndex,
            width,
            height,
            waypointCellIndex,
            cellIndexDifference;

    String previousPath = "",
            bestSolutionSoFar,
            cachedValue,
            result,
            failureFlag;

    // This should be Map<String, String>, but the generics were omitted for golfing.
    // It is needed to avoid recomputing long partial dungeons (i.e. dynamic programming).
    Map cachedResults = new HashMap();

    // Returns a lot of hashes. Like aLotOfHashes(7) will return "#######".
    String aLotOfHashes(int howMany) {
        return howMany < 1 ? "" : "#" + aLotOfHashes(howMany - 1);
    }

    // Here is where our program starts.
    public static void main(String[] args) throws Exception {
        // Read all the content of the file from args[0] and put it into a string.
        // Pass that string as a parameter to the constructor.
        // The instance itself is useless - it is just a golfing trick.
        new TreasureHunt(new String(java.nio.file.Files.readAllBytes(new java.io.File(args[0]).toPath())));
    }

    // Pre-processs the source in order to format it in the way that we want:
    // * No separators between rows. It uses the (row * width + column) formula, so no separators are needed.
    // * An extra layer of wall is added in all sides. This naturally fix up problems about walking out of the edges of the board, wrapping-around or acessing invalid array indexes.
    // This is a constructor just for golfing purposes. Its instances are worthless.
    TreasureHunt(String originalSource) {

        // Finds the width by searching the first line-feed.
        // If there is just one line and no line-feed, the [+ "\n"] will ensure that it will not break.
        // The [+ 3] is because we will add a layer of walls around, so it will be widen by one cell in the left and one in the right (which is +2).
        // We still get one more in the width that will be decremented later to use that in the aLotOfHashes method below.
        // 10 == '\n'.
        width = (originalSource + "\n").indexOf(10) + 3;

        // Add a layer of walls in the top and in the bottom (using a lot of hashes for that).
        // Replaces the line-feed by a pair of walls, representing the rightmost wall of a row and the leftmost row of the following row.
        // Since there is no line-feed before the first line nor after the last line, we add more two walls to fill those.
        String newSource = aLotOfHashes(width) + originalSource.replace("\n", "##") + aLotOfHashes(width);

        // Remove the keys without door (replaces them as blank spaces) and the doors without keys (replaces them with walls.
        // This way, the resulting dungeon will always have matching keys and doors.
        // 65 == 'A', 97 == 'a', 91 == 'z'+1
        for (char door = 65, key = 97; door < 91; door++, key++) {

            // Now a little math trick. For each key or door, we find an index. If the key or door exist, it will be a positive number. Otherwise it will be negative.
            // The result will never be zero, because the zeroey position is filled with part of the layer of wall that we added.
            // If only one of the key and the door exist, the multiplication will be the product of two numbers with opposite signals, i.e. a negative number.
            // Otherwise (both exists or both don't), then the product will be positive.
            // So, if the product is negative, we just remove the key and the door (only one of them will be removed of course, but we don't need to care about which one).
            if (newSource.indexOf(door) * newSource.indexOf(key) < 0) {
                newSource = newSource.replace(door, '#').replace(key, ' ');
            }
        }

        // Knowing the source length and the width (which we fix now), we can easily find out the height.
        height = newSource.length() / --width;

        // Creates a special value for signaling a non-existence of a path. Since they are sorted by length, this must be a sufficiently large string to always be unfavoured.
        bestSolutionSoFar = failureFlag = aLotOfHashes(width * height);

        // Now, do the hard work to solve the dungeon...
        // Note: On the golfed version, newSource and solution are the same variable.
        String solution = solvingRound(newSource);

        // If a solution is found, then show it. Otherwise, we just finish without printing anything.
        // Note: It is unsafe and a bad practice to compare strings in java using == or != instead of the equals method. However, this code manages the trickery.
        if (solution != failureFlag) System.out.print(solution);
    }

    // This does the hard work, finding a solution for a specific dungeon. This is recursive, so the solution of a dungeon involves the partial solution of the dungeon partially solved.
    String solvingRound(String dungeon) {
        // To avoid many redundant computations, check if this particular dungeon was already solved before. If it was, return its cached solution.
        cachedValue = (String) cachedResults.get(dungeon);
        if (cachedValue != null) return cachedValue;

        // If there is no treasure in the dungeon (36 == '$'), this should be because the adventurer reached it, so there is no further moves.
        if (dungeon.indexOf(36) < 0) {
            if (bestSolutionSoFar.length() > previousPath.length()) bestSolutionSoFar = previousPath;
            return "";
        }

        String keysOrTreasureFound = ""; // Initially, we didn't found anything useful.
        int adventurerSpot = dungeon.indexOf(64), // 64 == '@', find the cell index of the adventurer.
                cellDistance[] = new int[width * height],
                previousWaypoint[] = new int[width * height];

        // Use a queue to enqueue cell indexes in order to floodfill all the reachable area starting from the adventurer. Again, screw up the proper user of generics.
        Queue<Integer> floodFillQueue = new ArrayDeque();
        floodFillQueue.add(adventurerSpot); // Seed the queue with the adventurer himself.

        // Each cell thies to populate its neighbours to the queue. However no cell will enter the queue more than once if it is not featuring a better path than before.
        // This way, all the reachable cells will be reached eventually.
        while (!floodFillQueue.isEmpty()) {
            nextCellIndex = floodFillQueue.poll();

            // Locate the four neighbours of this cell.
            // We don't need to bother of checking for wrapping-around or walking into an invalid cell indexes because we added a layer of walls in the beggining,
            // and this layer of wall will ensure that there is always something in each direction from any reachable cell.
            int[] neighbourCells = {nextCellIndex + 1, nextCellIndex - 1, nextCellIndex + width, nextCellIndex - width};

            // For each neighbouring cell...
            for (int neighbourCellIndex : neighbourCells) {
                // Find the cell content. Considers doors as walls.
                char neighbourCellContent = dungeon.replaceAll("[A-Z]", "#").charAt(neighbourCellIndex);

                if (neighbourCellIndex != adventurerSpot // If we are not going back to the start ...
                        & neighbourCellContent != 35 // ... nor walking into a wall or a door that can't be opened (35 == '#') ...
                        & (previousWaypoint[neighbourCellIndex] < 1 // ... and the neighbour cell is either unvisited ...
                            | cellDistance[nextCellIndex] + 1 < cellDistance[neighbourCellIndex])) //  ... or it was visited before but now we found a better path ...
                { // ... then:
                    cellDistance[neighbourCellIndex] = cellDistance[nextCellIndex] + 1; // Update the cell distance.
                    previousWaypoint[neighbourCellIndex] = nextCellIndex; // Update the waypoint so we can track the way from this cell back to the adventurer.
                    floodFillQueue.add(neighbourCellIndex); // Enqueue the cell once again.
                    if (neighbourCellContent > 32) keysOrTreasureFound += neighbourCellContent; // If we found something in this cell (32 == space), take a note about that.
                }
            }
        }

        // Brute force solutions chosing each one of the interesting things that we found and recursively solving the problem as going to that interesting thing.
        // Warning: This has an exponential complexity. Also, if we found something interesting by more than one path, it will compute that redundantly.
        result = keysOrTreasureFound.chars().distinct().mapToObj(keyOrTreasure -> {
            String tracingWay = "", savedPreviousPath = previousPath;

            // From our keyOrTreasure, trace back the path until the adventurer is reached, adding (in reverse order) the steps needed to reach it.
            for (waypointCellIndex = dungeon.indexOf(keyOrTreasure); waypointCellIndex != adventurerSpot; waypointCellIndex = previousWaypoint[waypointCellIndex]) {

                // Use the difference in cell indexes to see if it is going up, down, right or left.
                cellIndexDifference = waypointCellIndex - previousWaypoint[waypointCellIndex];
                tracingWay = (cellIndexDifference == width ? "D" : cellIndexDifference == -width ? "U" : cellIndexDifference == 1 ? "R" : "L") + tracingWay;
            }

            // If this path is going to surely be longer than some other path already found before, prune the search and fail this path.
            if (bestSolutionSoFar.length() <= (previousPath + tracingWay).length()) return failureFlag;

            // Prepare for recursion, recording the current path as part of the next level recursion's previous path.
            previousPath += tracingWay;

            // Now that we traced our way from the adventurer to something interesting, we need to continue our jorney through the remaining items.
            // For that, create a copy of the dungeon, delete the door of the key that we found (if it was a key),
            // move the adventurer to the thing that we just found and recursively solve the resulting simpler problem.
            String nextRoundPartialSolution = solvingRound(dungeon
                        .replace('@', ' ') // Remove the adventurer from where he was...
                        .replace((char) keyOrTreasure, '@') // ... and put him in the spot of the key or treasure.
                        .replace((char) (keyOrTreasure - 32), ' ')); // ... and if it was a key, delete the corresponding door ([- 32] converts lowercase to uppercase, won't do anything in the case of the treasure).

            // Recursion finished. Now, get back the previous path of the previous recursion level.
            previousPath = savedPreviousPath;

            // If the subproblem resulted in a failure, then it is unsolvable. Otherwise, concatenates the subproblem solution to the steps that we took.
            return nextRoundPartialSolution == failureFlag ? failureFlag : tracingWay + nextRoundPartialSolution;

        // From all the paths we took, choose the shorter one.
        }).reduce(failureFlag, (a, b) -> a.length() < b.length() ? a : b);

        // Now that we have the result of this recursion level and solved this particular dungeon instance,
        // cache it to avoid recomputing it all again if the same instance of the dungeon is produced again.
        cachedResults.put(dungeon, result);
        return result;
    }
}

Taking input
To run it, try this:
javac G.java
java G ./path/to/file/with/dungeon.txt

Or if you are running the ungolfed version, replace the G's with TreasureHunt.
The file should contain the dungeon. The input should not end with a line-feed. Further, it only accepts line-ends in the \n format. It won't work with \r\n or with \r.
Also, it does not validates or sanitizes the input. If the input is malformed, then the behaviour is undefined (likely to throw an exception). If the file can't be found, then an exception will be thrown.
Remarks
My first implementation somewhere near 1100 bytes could not solve the 5th test case in reasonable time. The reason for that is because my implementation it brute-forces all the possible permutations of collectible items (i.e. the keys and the treasure) that are acessible (i.e. not locked in an inacessible room).
In the worst case, with all the 26 keys and the treasure, this would be 27! = 10,888,869,450,418,352,160,768,000,000 different permutations.
The OP did not specified that the answer should be something that runned in reasonable time. However, I consider that this is a loophole that I would not like to exploit. So, I decided to make it run in acceptable time for all the test cases. In order to achieve that, my revised program features pruning in search paths that are proved to be worse than some already know solution. Further, it also caches subsolutions (i.e. dynamic programming) to avoid recomputing many identical dungeons that might arise. With that, it is able to solve the 5th test case in just over one minute in my computer.
The solution is recursive. The idea is first to get the adventurer to some item (a key or the treasure). In case of a key, after the adventurer reaches it, a new similar dungeon is generated with both the key and the door deleted and the adventurer moved to where the key was. With that, the generated simpler dungeon is solved recursively until the point when the treasure is reached or the algorithm concludes that there isn't any reachable item. The order of the items to be visited is brute-forced with pruning and caching as explained above.
The path-finding between the adventurer and the items is made with an algorithm that resembles both floodfill and Dijkstra.
Finally, I suspect that this problem is NP-complete (well, the generalized version of it without a limitation on the number of doors/keys). If this is true, don't expect solutions that optimally solve very large dungeons with miryads of doors and keys in reasonable time. If sub-optimal paths were allowed, then it would be easily tractable with some heuristics (just go to the treasure if possible, otherwise go to the nearest key).