How to get the total duration of all video files in current folder and sub-directories I am trying to get the duration of a bunch of files in current directory and its sub-directories all ending in .mp4. I'm trying to use ffprobe. To make things simple, I am not using find, but ls. If it only lists durations in seconds, it will be fine, since summing them all up would probably be beyond me!   My current effort is like this:    ls -a * |grep .mp4$|xargs ffprobe   This shows      Argument 'SomeVideo.mp4' provided as input filename, but 'DifferentVideo.mp4' was already specified.   How can I make this work? Can ffprobe not just process one file at a time passed via pipe?
Get total duration of video files in a directory I have a list of .ts files:   out1.ts ... out749.ts   out8159.ts  out8818.ts   How can I get the total duration (running time) of all these files?
Please give me the proof for the following: Let $a_1,\,a_2,\,\dots\,a_n$ be $n$ positive real numbers whose product is equal to $1$. Prove that $$a_1+\cdots+a_n \geq n$$ and that the equality sign holds only if every $a_k$ is  equal to $1$. Is Kant's "noumenal self" argument on freedom flawed? Why is this power adapter transformerless? What's the "official" explanation for Harry's (and everyone else's) absence from muggle school? So a bunch of kids all of a sudden "go missing" from school.  Harry Potter having attended school for a couple of years before starting at Hogwarts, one semester just doesn't show up.  How is this solved? What do parents say when a school teacher calls and wonders where their pupil is?  I assume that Hogwarts isn't an officially recognized school (though perhaps it is?), and due to education being compulsory, someone would do the math and find that low-hundreds of kids go missing in the transition from primary to secondary school every year. Leave out a term when summing Ask question post button remains disabled I've noticed this twice in the last ~2 weeks or so. The &quot;post your question&quot; button can remain disabled for some reason even when your question is shown as &quot;ready to publish&quot;. I.e., you've gotten to the &quot;review&quot; page after the initial edit. If I remember correctly, one case was on Stack Overflow, and the other was on . I'm not sure what exact scenario leads up to this. I haven't paid attention to the button until the last step when I'm ready to click it. The workaround has been to reload the page. (I copied my content for safe-keeping first.) This works, and the button then shows up as active. Afterwards, however, on both occasions, it forced me through the &quot;are you a human&quot; verification.  Update - this question itself did not exhibit this, nor did it do the .  Update - I'm using Chrome on Windows and am not sure what version it was when this happened.  It has  installed, but there aren't any scripts for any Stack Exchange sites.  It has  installed.  The virus scanner on the PC I probably was using was Samsung netbook NP300E5A dimming on battery My Samsung netbook NP300E5A screen is continually dimming.  The screen is forty percent dim on battery, but if I plug in the charger, the screen will be normal. I have tried all I know and I could not fix it. What should I do? what am trying to explain  is that the system is dimming like flooricent light  the screen resolution systems are all ok. When I pluging my charge the dimming we stop but when is on battery it look like flashing someone  light when driving Find $\lim_{n\to\infty}2^n\underbrace{\sqrt{2-\sqrt{2+\sqrt{2+\dots+\sqrt2}}}}_{n \textrm{ square roots}}$. Find $\displaystyle \lim_{n\to\infty}2^n\underbrace{\sqrt{2-\sqrt{2+\sqrt{2+\dots+\sqrt2}}}}_{n \textrm{ square roots}}$.   By geometry method, I know that this is $\pi$. But is there algebraic method to find this ?   Thank you. Easy curves in TikZ I find myself needing to draw lots of elegantly curved paths in TikZ. Ideally, I'd just specify a series of points, and TikZ would calculate the extra data itself to draw a nice series of curves passing smoothly through these points, perhaps with an optional "looseness" parameter that I could specify. But the only way I can find to draw nice curves is by explicitly giving control points, or by manually specifying in and out angles.  I can think up a simple algorithm to do this, which would certainly be within TikZ's power to perform: just choose the in and out angles in a simple fashion based on the relative angles between each adjacent pair of line segments.  Is something like this already built-in? Or can someone cook something up that does the job?  Edit: Jake has provided an answer using the plot [smooth] functionality. This is almost perfect! But it can't do what I need, because it doesn't let me specify tangent angles manually where needed, which is especially important at the beginning and end of the curve. I would have thought this would be a natural and straightforward addition to the existing plot [smooth] algorithm: for every coordinate, an optional angle should be able to be specified as an argument, which if supplied is treated as the tangent angle for the curve at that point. And while we're at it, it wouldn't hurt to also allow the tension to be modified along the path.  A minimal extension to the algorithm would just accept two optional parameters, for the curve tangent at the beginning and end. Calculate $\tan9^{\circ}-\tan27^{\circ}-\tan63^{\circ}+\tan81^{\circ}$ Calculate $\tan9^{\circ}-\tan27^{\circ}-\tan63^{\circ}+\tan81^{\circ}$?  The correct answer should be 4. In QGIS, I want to make polygons from a set of intersecting lines. Looking at the screenshot here, I want chop the purple line (it's a closed line, not a polygon) where it crosses the green and blue lines. The result hopefully would be a polygon where I have hatched in red. I have quite a few to do.    I have tried the QGIS tool previously called Polygonizer (see ), but now called Polygonize. This is a tool that, given a layer containing a set of crossing lines arranged essentially like a # symbol, should create a polygon from the enclosed space in the middle.  (In QGIS 2.01, Polygonize is in the top menu bar: go to Processing -> Commander, then type "Polygonize" on the command line, select "Processing algorithm: Polygonize" from the list that appears, and press Enter.)   At the momemt Polygonize doesn't work properly. Is there another way to do what I want to do?   For example, wouldn't it be great if the QGIS 'Split Feature' command was able to work like MapInfo's 'Polyline Split', where you select the polygons to split, then select an already-drawn polyline to split by, and voila. But Split Feature seems not to work that way.    UPDATE: Detail of problems with running Polygonize.  I have 64-bit QGIS 2.01 installed to Windows 7 from the installer package, QGIS-OSGeo4W-2.0.1-3-Setup-x86_64.exe.  The routine processed an output from my shapefile, but did not create a polygon from the region enclosed by intersections between the blue, green and purple lines. (Note: in the actual input file, all these lines are on the same layer; the screenshot just colours them differently for illustrative purposes). What I got instead was a simple conversion of the purple outline to a polygon, as though the program completely ignored the blue and green lines.  When I node-edited the closed purple line, to open it so that I had a set of open crossing lines like in the # symbol, and then ran Polygonize again, nothing happened. No crash, but no visible polygon in the output file.    When I used Nick Hopton's own  data, I got a crash; see screenshot: I have a dataset in csv file format that I'm loading into pgfplotstable. I can't change the format of the original csv, and being financial data it has a column of item names and two or three explanatory data points at the top of the table. e.g.  \documentclass{article} \usepackage{array,datatool,pgfplotstable}   \begin{filecontents}{sample.csv}     item,2008,2009,2010,2011      ,Actual,Actual,Forecast,Forecast      ,GBP,GBP,GBP,GBP      ,('000),('000),('000),('000) rounded     Area 1 OP, 1000000,1500000,1750000,250000     Area 2 OP, 400000,500000, 450000,-50000     Area 51 OP, 300000,375000,390000,15000     No P, 1250000, 1000000, 950000, 50000     Residuals, 800000, 80000, 90000, 10000   \end{filecontents}  \pgfplotstableread[col sep=comma]{sample.csv}\mystuff   I'm stumped at the next stage which is to typeset \mystuff so I have comma separators and can add a row that sums the 'Area' columns. At the moment to display the table I have to do something like  \begin{document}  \pgfplotstableread[col sep=comma,header=false]{sample.csv}\mystuff  \pgfplotstabletypeset[   columns/0/.style={string type},   columns/1/.style={string type},   columns/2/.style={string type},   columns/3/.style={string type},   columns/4/.style={string type}]\mystuff  \end{document}   How do I tag the top three rows as string and the rest of the last four columns as integer type so I can format and transform them? How to make Arduino (Snap) access serial port /dev/ttyUSB0 (or /dev/ttyACM0)? I have Ubuntu 18.04 LTS installed.  I installed Arduino IDE v1.8.5 as a snap with  snap install arduino-mhall119   I have added my user to dial-out group and rebooted:  sudo usermod -a -G dialout $USER  $ groups  username adm dialout cdrom sudo dip plugdev lpadmin sambashare   I connected my Arduino Nano to the laptop, it is detected on port /dev/ttyUSB0 (ch341-uart).  $ ls /dev/ttyUSB0 -al crw-rw---- 1 root dialout 188, 0 авг 13 11:59 /dev/ttyUSB0   I tried to upload the simpliest Blink sketch and get the following errors in the terminal:  $ arduino-mhall119.arduino    avrdude: ser_open(): can't open device "/dev/ttyUSB0": Permission denied   Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.**   Also I have installed arduino 1.8.5 with umake - it can access serial port in usual way.  Note: we already have  here, but the solution was to use , not fix for the Snap.  So my question is: How to make Arduino (Snap) access serial port /dev/ttyUSB0 (or /dev/ttyACM0)?  Update: connecting serial-port to the snap fails with the following message  $ snap connect arduino-mhall119:serial-port  error: snap "core" has no "serial-port" interface slots   Current interfaces are:  $ snap interfaces | grep arduino :home                            arduino-mhall119,gedit,organize-my-files,vlc :network                         arduino-mhall119,gedit,organize-my-files,pulsemixer,vlc :unity7                          arduino-mhall119,gedit,organize-my-files,vlc :x11                             arduino-mhall119,organize-my-files,pulsemixer,vlc -                                arduino-mhall119:serial-port   Changing permissions of serial port to 777 with sudo chmod 777 /dev/ttyUSB0 does not help.  The following do not work too (because of syntax errors):  $ sudo snap connect arduino-mhall119:arduino error: snap "arduino-mhall119" has no plug named "arduino"  $ snap connect arduino-mhall119:/dev/ttyUSB0 error: snap "arduino-mhall119" has no plug named "/dev/ttyUSB0"  $ snap connect arduino-mhall119 error: cannot resolve connection, plug snap name is empty   Information about YAML-manifest:  $ ls -l /snap/arduino-mhall119/current/meta/snap.yaml -rw-r--r-- 1 root root 353 июл 28 00:20 /snap/arduino-mhall119/current/meta/snap.yaml  $ cat /snap/arduino-mhall119/current/meta/snap.yaml |grep -A 12 slots  $ cat /snap/arduino-mhall119/current/meta/snap.yaml |grep -A 5 plug     plugs:     - x11     - unity7     - home     - network     - serial-port Fourier series identity Why is RAM not put on the CPU chip? Modern CPUs are very fast compared to all things external, including memory (RAM).   It is understandable, since CPU clock frequency has reached a point where it takes several clock ticks for an electric signal simply to run from from the CPU through the bus to RAM chips and back.   It also complicates life on many levels: multi-level cache hierarchies are built to deliver data closer to the CPU, which in turn require complex synchronization logic in the chip. Programs must be written in a cache-friendly way to avoid wait cycles while data is fetched.   Many of these problems could be avoided if a significant amount of RAM was located directly on the CPU chip. It doesn't have to an exclusive arrangement: maybe put 1-4 GB on the chip, depending on its class and allow additional memory installed separately.   I'm sure there are good reasons Intel, AMD and the like are not doing this. What are these reasons? Is it that there's no room to spare on the chip? On really old Ubuntu 6.06 - How to upgrade I'm on an old Ubuntu version (Ubuntu 6.06.2 LTS Server) which isn't really supported any more. So the automatic updates don't work. I have ISPConfig installed to manage a few web sites.  What's the best course of action? I'd like to upgrade to something current, but I can't figure out how to go about doing this, given that the apt-get scripts don't really work any longer. Can I change my flight dates after I get my Schengen visa? I am an Indian student in the UK. If I already had a single entry Schengen visa and I apply again to the French embassy, will I be issued with multiple-entry?  If I get the visa, but due to a problem, I cannot travel on the intended dates(ones I mentioned on visa form) and decide to travel a month later, will it cause a problem when I travel next. And if I dont exactly follow the itenary that I submitted with my visa application?  As far as dates are concerned. I mean this: Suppose my visa is valid for May-August. When I applied for this visa, my itenary and hotel bookings were for June. But now I decide to travel instead in July. Will there be a problem if I did not take the journey for which I initially applied the visa and take a different journey later instead A very quick question:   Is it correct to say "In case I won't be able to watch that"?  If it's acceptable to say that, what type of sentence is it?  UPDATE:  As a clarification, I want to say "Can you give me that in case I won't be able to have it later". Probably, it's more a supposition than a conditional. I develop a windows application and am curious whether it works via Wine. The application runs fine with Wine but I get no sound. In fact, I'm not sure whether my ubuntu installation has MIDI capabilities. The sound output settings shows "LFE on Separate Mono Output" one with "no amplifier" and another with "amplifier". They both function. I am using Ubuntu 12.04 as a client on virtualbox that runs on windows 7.  Thanks for any suggestion!  EDIT: virtual box hosted by windows 7, ubuntu running as a client in virtualbox. How do I grant sudo privileges to an existing user? I want to grant a newly created user sudo privileges in Ubuntu.  I tried  sudo adduser hduser admin   but it says no admin group exists. How can I do it?