Wikipedia:Reference desk/Archives/Computing/2013 September 5

= September 5 =

How to make this?
I want to make this: http://btewiki.org/index.php?title=File:BTE_Power_diagram_260_MW.jpg but I have no idea what program that can make that 202.137.25.53 (talk) 04:34, 5 September 2013 (UTC)


 * It's just a simple 2D image? You could use Paint, or Inkscape, or Powerpoint, or innumerable other free or paid graphics design programs. DrewHeath (talk) 05:43, 5 September 2013 (UTC)


 * Well, it's easiest to use specialized diagramming software for things like that, but there are lots of such programs. Our article on diagramming software lists some of them.  Microsoft Visio is probably the most widely used, since it comes with Office -- but that diagram doesn't quite have a "Visio" feel to me. Looie496 (talk) 06:08, 5 September 2013  (UTC)


 * However, the learning curve with such a program might make it quicker to do a one-off diagram using Paint or some other more manual software which you already know. StuRat (talk) 06:27, 5 September 2013 (UTC)
 * Depressingly, I draw roughly similar diagrams in PowerPoint (for commercial projects) and in Keynote (for scientific presentations and teaching). If the diagram is large, the design simple, and there is a somewhat structured textual description, I might use Graphviz, especially for repetitive tasks. --Stephan Schulz (talk) 12:42, 5 September 2013 (UTC)
 * You could even use lines and text boxes in Microsoft Word to create the diagram as a page, then save the image. I'm not recommending Word, because it's not designed for graphics, but it can be done.    D b f i r s   14:07, 5 September 2013 (UTC)


 * My personal favourite is Paint.NET. -- .Yellow1996. (ЬMИED¡) 02:10, 6 September 2013 (UTC)


 * Paint (XP edition) is the One True paint program! PaintXP FTW! The newer Paint looks to me like some kind of Paint For Slow Kids, so mostly a GUI issue.
 * It's not difficult to draw these things. Start with the "text in a box" tool, then draw the actual boxes, and finally connect them using either the "thick line" tool or the rectangle tool depending on the quality of your mouse and your skill. It is a bit of work but not really difficult. - ¡Ouch! (hurt me / more pain) 06:41, 6 September 2013 (UTC)
 * I agree, Windows XP paint is quite good. I hesitated to make the switch (er... well I was on Vista but the paint isn't much different on here fom XP) but what made me do it in the end was transparent backgrounds and layers. -- .Yellow1996. (ЬMИED¡) 03:05, 7 September 2013 (UTC)
 * OTOH, Paint.net looks much richer than plain Paint, and they ironed a lot of the bugs out. - ¡Ouch! (hurt me / more pain) 09:05, 6 September 2013 (UTC)


 * So now the bugs are flat and devoid of wrinkles ? StuRat (talk) 10:57, 6 September 2013 (UTC)


 * Exactly. They take up more space now but at least they look a little more presentable. ;) -- .Yellow1996. (ЬMИED¡) 03:05, 7 September 2013 (UTC)

Run linux command in series of directories, save output in table
If I have such a command like: find. *.pdf | wc and I want to run it to count how many pdfs I have in each directory and output the result in a table like dir1: 4 pdfs dir2: 3 pdfs.

How can I do it? OsmanRF34 (talk) 18:28, 5 September 2013 (UTC)


 * Here's a not very clever way of doing it and it probably won't work if there are spaces anywhere in the path

find. -name "*.pdf" -exec dirname '{}' \; > /tmp/junk for f in `sort -u /tmp/junk` ; do echo -en "$f \t"; grep -c $f /tmp/junk; done --TrogWoolley (talk) 19:03, 5 September 2013 (UTC)


 * Here's an alternative method that avoids a temp file:

find. -name "*.pdf" | perl -MFile::Basename -lane'$j{dirname($_)}++;END{print "$_: $j{$_}" foreach sort keys %j;}'
 * --Mark viking (talk) 22:55, 5 September 2013 (UTC)


 * Any of these should work:


 * These of course fail for files with newlines; one might be able to fix the middle one by using uniq -z, but I'm not sure. --Tardis (talk) 05:25, 9 September 2013 (UTC)