this is sort of right-ish, maybe?
printf("value is %i\n",(x>y)?x:y);
is equivalent to
if(x>y)
printf("value is %i\n", x);
else
printf("value is %i\n", y);
or flipping it, qtest.c:
#include
int main()
{
int a = 3, b = 2;
printf("value is %i\n", (a < b)?a:b);
if( a < b)
printf("value is %i\n", a);
else
printf("value is %i\n", b);
return 0;
}
Linux find
Note: spaces are important.
find . -name Command.java -print -exec date -r {} \;
Problem: spaces & tabs when switching from code to makefile causes weird issues.
Need to switch from spaces to tabs then back when going from coding to editing makefile,then restore when going back to coding.
:set noet
to switch from spaces to tabs
:set et
to switch from tabs to spaces
Pasting
To get rid of those stupid indents when copy/pasting between terminals, use :set paste and :set nopaste