I want to save the data which is display on the command prompt while compiling a process
How can I capture text from a specific terminal and redirect it to a log file while simultaneously working?
What would be the material or shaders node set up for a smooth gem in blender cycles engine?  I want a result similar to this image: i want to add watermark on some videos but problem is because image in some videos its too small and in some videos its too big, (i think it depends on input link resulution)   so all my videos have output '640:360' so how can i make watermark image to be same in all videos not on some videos smaller in some bigger   ffmpeg -i "link" -i "/var/www/logo/logo1.png" -filter_complex 'overlay=10:10' -vcodec h264 -crf 25 -preset superfast -maxrate 600k -bufsize 600k -aspect '640:360' -s '640:360' .... Error: invalid environment block. Press any key to continue...   The error message appears immediately after the boot screen on purple background. Ubuntu 12.04.1 LTS. I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant. Could anyone tell me what is up with so many archives, and how are they differ?  There's at least five that I can think of, .tar.tz, .tar.gz, .tar.bz2, .tar.lz, .tar.z  Which is best for what applications? It just seems silly to make so many variations of the same file but I'm sure there's a reason. Why is the Yang–Mills existence and mass gap problem so fundamental? Ref:   Can anyone please explain why the Yang–Mills Existence and Mass Gap problem is so important / fundamental to contemporary mathematics (and, presumably, theoretical / mathematical physics)?  If possible, please include the following in your answer / response:  (1) Why the problem is so fundamental / important - for both mathematics and theoretical / mathematical physics; (2) How the solution to the problem would impact research in the above two fields; (3) (If applicable) What progress has been made so far in resolving it; (references to papers, books, other resources would be helpful).  I'm an upper-level undergraduate in theoretical physics, and so am seeking an answer / response at such level. A non-blocking read on a subprocess.PIPE in Python I'm using the  to start a subprocess and connect to its output stream (standard output). I want to be able to execute non-blocking reads on its standard output. Is there a way to make .readline non-blocking or to check if there is data on the stream before I invoke .readline? I'd like this to be portable or at least work under Windows and Linux. Here is how I do it for now (it's blocking on the .readline if no data is available): p = subprocess.Popen('myprogram.exe', stdout = subprocess.PIPE) output_str = p.stdout.readline() When should I begin publishing? How to compare (probability) predictive ability of models developed from logistic regression? I know some well-known measures are $c$ statistic, Kolmogorov-Smirnov $D$ statistic. However, as far as I know, those statistics take into account only of the rank order of the observations, and is invariant under changing the intercept of the logistic regression model (e.g. in oversampling-correction exercise).  In my current application, I need to depend on the accuracy of the logistic regression to predict probability of event. I know only of qualitative way of assessing models for probability prediction ability, namely by plotting "QQ-plot" of the actual vs predicted probability of event:   Score the validation dataset using the developed model. Rank the observations according to the predicted probability and group into $n$ buckets according to their rank of predicted probability. (First 1/n would go to the first bucket, next 1/n would go to the next ...) Calculate the average predicted and actual probability of Event for each bucket. Create a scatter plot of Predicted vs Actual - one point for each bucket.   I am wondering:   Is the "Q-Q plot" I mentioned above a legitimate way to assess predictive performance of models developed from logistic regression? If so, where may I find more reference for that? Is there any known quantitative way to assess the probability prediction ability of this kind of model? How do I get my C# program to sleep for 50 msec? How do I get my C# program to sleep for 50 milliseconds?  This might seem an easy question, but I'm having a temporary brain failure moment! I have a question about XTP_CHECKPOINT.  I'm using SQL Server 2014. I have a database that is in SIMPLE recovery model mode. It is also being replicated.  There are no open transactions. I've run DBCC OPENTRAN and it returns:     "No active open transactions."   But I keep getting this message whenever I try to create or drop a table or delete data: (I've replaced my actual database name with the word database_name)     "The transaction log for database 'database_name' is full due to 'XTP_CHECKPOINT'"     Does anyone know why this might be happening, and, more importantly, how can I make it stop?  And yes, the database really is in SIMPLE recovery model mode. i.e. The transaction log should truncate automatically.  Incidentally, another database that I have in full recovery mode did the same thing, started returning the same error:     The transaction log for database 'database_name' is full due to 'XTP_CHECKPOINT'   I tried to change the log growth settings to unlimited growth, but it wouldn't let me, returning the same error.  I can reproduce the problem without any XTP stuff at all, except for just the filegroup. Here's how: Migrated questions don't have a user action label in the question list Expected prediction error - derivation Why is volatile needed in C? Why is volatile needed in C? What is it used for? What will it do? How can I easily switch audio output in Ubuntu 17.10 and later with GNOME? I have asked this question on SO but perhaps that was the wrong location. Apologies for double posting but the question may have a better audience here.  The original question is:   And the text is below. Thanks.    When running the postgresql [9.3] "COPY TO" functionality, the postgres user creates a file. I have told it to put the file in the tmp directory (although this can be changed if needed).  This is run as part of a cron job, the user is an "export" user set up especially for this task. The end goal is for the exported file to end up in /home/export/created_file.csv.  1) postgres can't stash the exported file straight into the home directory of another user without setting up the folder to be overly permissive.  2) the export user can copy the file from /tmp to it's home directory, but then can not clean up (delete) the postgres owned file in /tmp.  This is a daily process and so old files will need to be deleted in some way. I can add a cron job to clean up the files afterwards but I was hoping for a cleaner solution - either a way to change the permissions on the file that postgres creates, or some way to give the export user the additional permission of being able to delete that file in advance of it's creation.  Giving the export user the same permissions as postgres in general however isn't an option, as it would then have free reign over the database.  Any advice, be it unix based or postgres based would be very welcome, thanks. Why does Super User site appear twice in vote-to-close dialog? Super User appears in both the main Off-Topic list and the Migration list of the close dialog. Is this a bug or intentional?  I also don't really understand why Server Fault appears in the main Off-Topic list and not the Migration list, apart from it being new.  Here:    and: Where does the word "torsion" in algebra come from? How to get things off your head in Minecraft Mo' Creatures mod I installed the Mo'Creatures mod into Minecraft, then made a fish bowl. After catching a fish I went to put it on top of a bookshelf in my room, but instead of placing it, the bowl just dropped at my feet. When I tried to pick it up my character put it on his head. Now I'm stuck with a fish bowl on my head and I can't find any mention anywhere of how to get it off. There are a number of other animals from the mod that you can put on your head for some effect, but no mention of how to remove them pretty much anywhere. Function on $[a,b]$ that satisfies a Hölder condition of order $\alpha > 1 $ is constant I want to show that if a function $f:[a,b]\rightarrow \mathbb R$ satisfies a Hölder condition of order $\alpha &gt; 1 $ then it is constant.  The way I think of it is as follows:  $$|f(x) - f(y)| &lt; K|x-y|^\alpha$$  $$\frac{|f(x) - f(y)|} {|x-y]}  &lt; K|x-y|^{\alpha -1}$$  $$\lim_{y\rightarrow x} \frac{|f(x) - f(y)|} {|x-y]} \le \lim_{y\rightarrow x}  K|x-y|^{\alpha -1} =0 $$ As the limit is $0$, we can remove the modulus, so we get:  $$\lim_{y\rightarrow x} \frac{f(x) - f(y)} {x-y} = 0$$ So $f$ is derivable and $f'(x) = 0$ for all $x$ in $[a,b]$. Note that the reason we can add the limit $y\rightarrow x$ is because $[a,b]$ is closed in $\mathbb R$.  However, the question gives as a hint using the mean value theorem. I am not sure why one should do that. You would first have to prove that $f$ is derivable in a similar manner to what I did, and then prove that $f$ is constant. Or is there a simpler way to do it and I am missing it?  Also please inform me of any mistakes I did in the proof (if any)/ Thank you!