Mutators and Constructors?
Are getters and setters poor design? Contradictory advice seen
How to convert an MKV to AVI with minimal loss To convert an MKV to AVI, I do two things. The first thing I do is this:  ffmpeg -i filename.mkv -vcodec copy -acodec copy output.avi   or this:  ffmpeg -i filename.mkv -sameq -acodec copy output.avi   Either of these will convert the MKV to an AVI, but the problem is that the video does not play smoothly for some reason. That's fine though, because if I do one more thing it gets fixed:  ffmpeg -i output.avi -vcodec mpeg4 -b 4000k -acodec mp2 -ab 320k converted.avi   After I do this then the file plays without problem. I had success doing it this way for one file, but then I tried it on another file, and there is a slight, but noticeable loss in video quality. This is the output I get when doing the second step:  FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers   built on Dec 29 2010 18:02:10 with gcc 4.2.1 (Apple Inc. build 5664)   configuration:    libavutil     50.15. 1 / 50.15. 1   libavcodec    52.72. 2 / 52.72. 2   libavformat   52.64. 2 / 52.64. 2   libavdevice   52. 2. 0 / 52. 2. 0   libswscale     0.11. 0 /  0.11. 0  Seems stream 0 codec frame rate differs from container frame rate: 359.00 (359/1) -&gt; 29.92 (359/12) Input #0, avi, from 'output.avi':   Metadata:     ISFT            : Lavf52.64.2   Duration: 00:04:17.21, start: 0.000000, bitrate: 3074 kb/s     Stream #0.0: Video: mpeg4, yuv420p, 704x480 [PAR 229:189 DAR 5038:2835], 29.92 fps, 29.92 tbr, 29.92 tbn, 359 tbc     Stream #0.1: Audio: vorbis, 48000 Hz, stereo, s16 Output #0, avi, to 'converted.avi':   Metadata:     ISFT            : Lavf52.64.2     Stream #0.0: Video: mpeg4, yuv420p, 704x480 [PAR 229:189 DAR 5038:2835], q=2-31, 4000 kb/s, 29.92 tbn, 29.92 tbc     Stream #0.1: Audio: mp2, 48000 Hz, stereo, s16, 320 kb/s Stream mapping:   Stream #0.0 -&gt; #0.0   Stream #0.1 -&gt; #0.1   I just used arbitrarily large settings on the second step and it worked nicely before but not in this case. What settings should I use? Usage of :- (colon dash) in bash Installing Autodesk Maya on Ubuntu is possible, but can be a bit challenging.  Assuming that one already has the required specs and a solid graphics card driver installed, how can it be done? A Particular Two-Variable System in a Group Suppose $a$ and $b$ are elements of a group $G$. If $a^{-1}b^{2}a=b^{3}$ and $b^{-1}a^{2}b=a^{3}$, prove $a=e=b$.   I've been trying to prove but still inconclusive. Please prove to me.  Thanks very much for proof. After upgrading to 13.10, I am now getting a prompt for my gmail password every time I log in. There is no indication as to which service or application needs this information. If I enter the correct password I'm told it is incorrect. My gmail account does not use two factor authentication. The problem has only started after an upgrade from 13.04 to 13.10.  How can I prevent this prompt appearing, and/or what is doing the prompting? Simulation software to solve high school level mechanics problems I'm a physics teacher and I would like to find a simulation software that could be used to give exact numerical answers to high school level problems in Newtonian mechanics.  I want the students to first calcultate a numerical answer to a physics problem and then use the simulator to visualize the problem in order to understand it better and verify that the simlator gives the same answer that they got when doing the calculation themselves.  Here are some examples of what kind of problems I want the students to be able to solve with the simulator:   A slope with a specific angle of inclination and a ball starts rolling at a certain point. Determine the speed, angular momentum and total mechanical energy of the ball after a specific time t. A ladder of known mass and length is leaning against the wall at a specific angle. The contact between the ladder and the wall is frictionless. Calcultate the x and y components of the force between the floor and the ladder.   I would like the software to have the following features:  - Simulation in 2D. No 3D simulations are necessary and the software should at least have the option of doing simulations only in 2D.  - Position all objects exactly by writing numbers (just positioning the objects using the mouse is not precise enough).  - Show animations of the time evolution of the system.  - Show forces, velocities and accelerations as arrows.  - Give exact numerical results so that the students can use the software to verify their calculation.  Ideally the software would have a graphical user interface, but if no suitable software with graphical interface exixts, I could also consider a software with text-based inputs. I would consider both free and commercial software.  My question is: Is there any software that would meet these requirements and if there is, where could I get it? Texture packing algorithm What is a good texture packing algorithm?  Technically,  is , so a heuristic is what I'm really after. Delayed choice entanglement swapping: why are Alice & Bob's measurements useless without Victor's? Similar to  on the bugs in Minecraft, I would like a complete list of what error codes exist in Minecraft and how they occur, as well as how they can be resolved. I want to write a conditional expression such as the following.    What is the best way to express such conditional expressions in Latex? Uniform random variable as sum of two random variables Taken from :  Show that it cannot be the case that $U=X+Y$ where $U$ is uniformly distributed on [0,1] and $X$ and $Y$ are independent and identically distributed. You should not assume that X and Y are continuous variables.  A simple proof by contradiction suffices for the case where $X$, $Y$ are assumed discrete by arguing that it always possible to find a $u$ and $u'$ such that $P(U\leq u+u') \geq P(U\leq u)$ while $P(X+Y \leq u) = P(X+Y \leq u+u')$.  However this proof does not extend to $X,Y$ being absolutely continuous or singular continuous. Hints/Comments/Critique? Is this asbestos? (South korea) School in South Korea removed asbestos over the past few weeks. Now I am all paranoid.   Is this asbestos? Found these dime-sized chunks by my desk.          Higher resolution images are available here:    There should be 4 pics. If not clear enough let me know. Why do Windows 10 foreground apps mysteriously launch as background processes? Variable name as a string in Javascript A number of times I have asked a certain kind of ‘attractive nuisance’ question – that is, one in which I anticipate a certain kind of answer would be given that I already know I am going to find insufficient or entirely inadequate. Some examples:      A more abstract example would be asking ‘is it possible to do this 100% correctly’, where people itch to come up with hacks, workarounds and half-baked solutions of various degrees of robustness – while the point of the question is obtaining a fully correct and reliable solution.0 I try to be very explicit in the question body about what kinds of answers I am not interested in. And yet, every time I ask such a question, someone gives such an answer anyway, or an outright XY-type, i.e. frame-challenge answer – where in fact the framing of the question is exactly how I want it, and I don’t want it challenged. Since I have already said in the question body that such an answer would be inaqeduate, when I get one, I downvote it. I believe it’s only appropriate, but it tends not to be received very well – I get insulting comments and downvotes in retaliation. I realise that a proper answer would be much harder to come up with than an ‘obvious’ inadequate answer. I suspect that often a real answer should be negative: ‘there is no way to do that’ or ‘there is no way to answer that for sure’. Nevertheless, if that is the right answer, this is the one I want posted – I don’t want the Internet polluted with more tumbleweed of what is already well-known (and may even be subtly wrong), and I don’t want to give ‘A for effort’ upvotes. What is the most appropriate way to act in such a situation?  0 I am also reminded of when Gary Bernhardt  while trying to avoid reflexive ‘don’t use eval’ replies. Of course, expecting nuance from Twitter of all places is silly, but that’s beside the point. Prove the statement 'World is not flat' In my graph theory book exercise, I found a problem that:     Prove that the World is not flat using Mathematics     This picture is used in the exercise, but no idea of applying it.  I would have used the angles don't add to $180^\circ$, but the author is using a fourth city. How to find max of amount of opportunity related to account? I have a below requirement : I need to find maximum amount on related opportunities and to display on account. Ex: suppose I have account A1 and A1 have 5 opportunities with amount o1=>100 o2=>500 o3=>300 o4=>1000 o5=>50 on my account i should have max_opportunity_amount =1000.  I have written below trigger ,but  I am not sure what to do further  trigger maxOppAmountonAcc on Opportunity(after insert){      map&lt;id,Opportunity&gt; oppMap = new map&lt;id,Opportunity&gt; ();     set&lt;Id&gt; oppId = new set&lt;Id&gt;();     for(Opportunity o : Trigger.new)     {         oppMap.put(o.accountId,o);         oppId.add(o.id);     }       List&lt;Account&gt; accList = new List&lt;Account&gt;();      for(Account a : [Select id ,MaxOppAmount__c,(select id,max(amount)  from opportunities) from Account where id in : oppMap.keyset()])     {      }  } Express js - can't redirect Presheaf which is not a sheaf -- holomorphic functions which admit a holomorphic square root I'm thinking about a problem in Ravi Vakil's algebraic geometry notes  (Exercise 3.2B) and I'm having trouble with the second part of the exercise as my understanding of complex analysis is quite rudimentary.   If to every open set $U\subset \mathbb{C}$ we associate the ring of holomorphic functions which admit a holomorphic square root, this defines a presheaf on $\mathbb{C}$ (I can see this).   Apparently however this is not a sheaf -- supposedly it fails to satisfy the gluing property.   To prove this, we need to take an open cover $\{U_i\}$ of some open $U\subseteq \mathbb{C}$, a holomorphic function $f_i:U_i\to \mathbb{C}$ for each $i$ which has a holomorphic square root (i.e. there exists a holomorphic function $g_i$ for each $i$ such that $f_i(z)=g_i(z)^2$ for all $z\in U_i$), which all agree nicely on the intersections of the various open sets, but such that it is impossible to find a holomorphic function $f:U\to \mathbb{C}$ with a holomorphic function which restricts to $f_i$ on each $U_i$.   Any help would be great -- my problem is in showing that such a function cannot exist. JTable won't show column headers