VERY long renders. 3 mins a frame?
Why are my render times 30+ minutes, but other people's are ~3 minutes?
I've recently searched how I could get the application's directory in Java. I've finally found the answer but I've needed surprisingly long because searching for such a generic term isn't easy. I think it would be a good idea to compile a list of how to achieve this in multiple languages.  Feel free to up/downvote if you (don't) like the idea and please contribute if you like it.  Clarification:  There's a fine distinction between the directory that contains the executable file and the current working directory (given by pwd under Unix). I was originally interested in the former but feel free to post methods for determining the latter as well (clarifying which one you mean). Do we need a global test before post hoc tests? I often hear that post hoc tests after an ANOVA can only be used if the ANOVA itself was significant.    However, post hoc tests adjust $p$-values to keep the global type I error rate at 5%, don't they?  So why do we need the global test first?  If we don't need a global test is the terminology "post hoc" correct? Or are there multiple kinds of post hoc tests, some assuming a significant global test result and others without that assumption? Is reusing old code for a new assignment considered self plagiarism? How to protect yourself if you consider it to be, and a group partner does not? I am taking a graduate machine learning course and am working with another student in the class on a final project. In his undergraduate studies, the other student wrote code that accomplished a similar task, and mentioned in our previous meeting that we would be able to leverage much of this code for our current project if we wanted to. I responded that I believe it would constitute textbook cheating and self-plagiarism, but the other student disagrees and believes that re-using the code would not constitute self-plagiarism because he himself wrote it, and it would be redundant to re-write what he had already done.  Now, the course instructors have made it clear that we are not allowed to use any external libraries to perform certain classes of algorithms for this project. This students' prior code would fall under this category of prohibited tools, but he claims that it doesn't qualify because he wrote the code himself (so it is not an "external library"). I believe this is hyperbole, but he disagrees. It is also worth mentioning that this code is licensed under an , though it is not widely used at all.  It has gotten to the point where I am uncomfortable going forward with the project by re-using his old code, and he does not want to do work on the project that he considers to be redundant. My worry is that if it turns out we're not allowed to reuse the code, then using it could cause us to fail the course and severely negatively affect our reputations. Even if we don't get caught, I personally feel that it would be unethical to copy-paste old code and present it as though it's fresh code for this current project.  I am unsure of how to proceed. I have tried reaching out to the professor of the course some time ago (she has been traveling for some conferences recently and will be for a while) but I have not heard back from her. Additionally, the course TAs have been unwilling to weigh-in on the situation.  I have the following questions:   Is the above situation usually considered to be self plagiarism? Why or why not? Is the above act typically allowed in an academic setting? Assuming you are in my position, and consider re-using the code to be cheating and/or unethical, what is the best way to proceed; both in terms of how to make progress on the project, how to compromise with my group mate, and how to protect myself if my group mate refuses to budge. Names of some months don't make sense I'm not a native English speaker but I'm always trying to do my best. Unfortunately I have a real problem with dates for some odd reason, I couldn't learn when was my birthday until I was 12 years old.  Anyway, as I was learning names of the months on English, and since I know some Latin from high school I noticed that English months don't match up with their Latin numeral counterparts. For example:  September - 9. month October - 10. month November - 11. month December - 12. month  While on latin septem, octo, novem and decem are words for 7, 8, 9 and 10.  So, does anyone know why is that. At first I thought it had something to do with switch from Julian to Gregorian calendar but I figured it's too small of a difference.  Anyone? :) Does a creature with Lifelink provide lifegain equal to its power, or the defender's toughness? I have recently began playing a deck that has a number of creatures with lifelink in it.  I want to be certain I understand the mechanic and the following question occurred to me.  Which damage total do you use to determine the life gain from lifelink?  I had assumed that if  a 3/3 creature with lifelink was blocked by a 2/2 creature that the life gain total would be 2, the maximum that the blocker can absorb before dying.  This seems to be incorrect, as when I read the example attached to CR 119.4c      [...] attacks with a 3/3 creature with wither and lifelink. It’s blocked by a 2/2 creature, [...]. The damage event starts out as [3 damage is dealt to the 2/2 creature, 2 damage is dealt to the 3/3 creature]   Have I been short changing myself? There are two Java Web Start tags:  : x 239 : x 320   Both tags refer to the same technology  refers to  both wiki point to  all questions tagged with  clearly relate to Java Web Start   I suggest they be merged into  (which appears in the auto-complete list if one types "webstart" in the Tags box when asking a new question). Is there a clever solution to Arnold's "merchant problem"? There is a problem that appears in . The problem is also quoted .  You take a spoon of wine from a barrel of wine, and you put it into your cup of tea. Then you return a spoon of the (nonuniform!) mixture of tea from your cup to the barrel. Now you have some foreign substance (wine) in the cup and some foreign substance (tea) in the barrel. Which is larger: the quantity of wine in the cup or the quantity of tea in the barrel at the end of your manipulations?  Here's my solution: The key is to consider the proportions of wine and tea in the second spoonful (that is, the spoonful of the nonuniform mixture that is transported from the cup to the barrel). Let $s$ be the volume of a spoonful and $c$ be the volume of a cup. The quantity of wine in this second spoonful is $\frac{s}{s+c}\cdot s$ and the quantity of tea in this spoonful is $\frac{c}{s+c}\cdot s$. Then the quantity of wine left in the cup is $$s-\frac{s^2}{s+c}=\frac{sc}{s+c}$$ and the quantity of tea in the barrel now is also $\frac{cs}{s+c}.$ So the quantities that we are asked to compare are the same. However, Arnol'd also says  Children five to six years old like them very much and are able to solve them, but they may be too difficult for university graduates, who are spoiled by formal mathematical training.  Given the simple nature of the solution, I'm going to guess that there is a trick to it. How would a six year old solve this problem? My university education is interfering with my thinking. Im creating a community user from an Apex code. When our internal users (non-admins) run the code they are getting following error. (This was working fine when we test the feature in sandbox)     SObjectException: Field is not writeable: User.ProfileId   The code is       //Grab Community User Profile     Profile p = [Select Id, Name from Profile where Name = :COMMUNITY_PROFILE LIMIT 1];       User PortalUser = new User();          PortalUser.UserName = Con.Email+'-POC';         PortalUser.ContactId = Con.Id;         PortalUser.ProfileId = p.id;         PortalUser.Email = Con.Email;         PortalUser.EmailEncodingKey = 'UTF-8';         PortalUser.FirstName = Con.FirstName;         PortalUser.LastName = Con.LastName;         PortalUser.TimeZoneSidKey = 'America/Los_Angeles';         PortalUser.LocaleSidKey = 'en_US';         PortalUser.LanguageLocaleKey = 'en_US';          if (Con.LastName.length() &gt;= 8){             PortalUser.Alias = Con.LastName.substring(0, 7);             }else{             PortalUser.Alias = Con.LastName;         }             SObjToInsert.add(PortalUser); Do ground seeds contain oil? Count down in timeout is cut off The time out countdown which is flying in is missing half of the number.  Note the 33 here:        Can this be fixed please? Lagrange Multipler KKT condition I am looking at SVM, and reviewing Lagrange multiplier. Let's say with the constraint function $$g(x,y) = x^2 + y^2 -1 &gt; 0, $$ I am maximizing $$f(x,y) = x + y -1 .$$ Intuitively, since the constraint function does not provide a finite constrained region, there is no solution, and $f(x,y)$ can infinitely increase.  However, if I just plainly proceed with Lagrange multiplier calculation,  $$L(x,\lambda) = (x + y -1) +\lambda(x^2 + y^2 -1)$$ I get the solution: $$y,x = -\sqrt{2}/2, \lambda = 1/\sqrt{2}$$ And this still satisfies KKT conditions although the solution is wrong.  $$g(x) =&gt; 0 , \lambda =&gt;      0, \lambda g(x) = 0.$$  I expected that I would have some result that conflicted KKT conditions, but nothing was violated.   Does this mean that Lagrange multiplier under KKT conditions can produce a solution that cannot be solved, without giving any indication of intractability?  If functions are complicated, what's the systematic way to confirm that the optimization with inequality constraint functions is solvable using Lagrange multiplier? SF TV show about a war between humans and aliens? JQuery to load Javascript file dynamically How does the Comma Operator work How does the comma operator work in C++?  For instance, if I do:  a = b, c;     Does a end up equaling b or c?   (Yes, I know this is easy to test - just documenting on here for someone to find the answer quickly.)  Update:  This question has exposed a nuance when using the comma operator.  Just to document this:  a = b, c;    // a is set to the value of b!  a = (b, c);  // a is set to the value of c!   This question was actually inspired by a typo in code.  What was intended to be  a = b; c = d;   Turned into  a = b,    //  &lt;-  Note comma typo! c = d; Using singular "they" for an animal As I know,  (not only &quot;it&quot;). Also, if a person's gender is unknown, . Is it possible to use &quot;they&quot; when we talk about a specific animal and in what context? What is integration by parts, really? Integration by parts comes up a lot - for instance, it appears in the definition of a weak derivative / distributional derivative, or as a tool that one can use to turn information about higher derivatives of a function into information about an integral of that function. Concrete examples of this latter category include: proving that $f \in C^2(S^1)$ implies that the Fourier series of $f$ converges absolutely and uniformly, and the Taylor series expansion with the integral formula for remainder.  However, I don't feel like I really understand what integration by parts is really doing. To me, it is just an algebraic trick that follows from the fundamental theorem of calculus and the product rule. Is there some more conceptual way to think about it?  How do you think about this useful idea? probability of $k$ boxes contain exactly $1$ ball Tikzpicture-figure: Order plot data (asc/desc)? I am using a tikzpicture for plotting. the values I want to plot are typical (X,Y) pairs. The x-value is an uninteresting id-value. I want to order the bins ascending/descending according to the y-value, but how do I do that? The figure seems to automatically take the x-values for ordering, how can I override that? (I am not particularly fixed to tikzpicture - its just the first thing that actually worked and displayed the plot....) Following minimal-working example, how could I achieve a reordering according to the y-value?  \documentclass{article} \usepackage[english]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{relsize} \usepackage{times} \usepackage{url} \usepackage{latexsym} \usepackage{graphicx} \usepackage{colortbl} \usepackage{color} \usepackage{caption} \usepackage{pgfplots, pgfplotstable} \usetikzlibrary{arrows} \usepackage{amsmath} \usepackage{multirow} \usepackage{booktabs}  \usepackage{filecontents} \definecolor{OgAns}{rgb}{0, 0.8, 0.4}  \begin{filecontents}{testdata.dat} 1   30 2   44 4   26 3   39 \end{filecontents}  \begin{document} \begin{figure} \begin{tikzpicture}         \begin{axis}[                ybar stacked,             ymin=0,             ymax=100,             bar width=5pt,             legend style={at={(0.35, -0.4)},anchor=south west},             legend columns=-1                       ]           \addplot[ybar,fill=OgAns]  file {testdata.dat};          \end{axis}     \end{tikzpicture} \end{figure}   \end{document} How to use dependency injection for Plugins/Blocks [\Drupal::formbuilder() and \Drupal::config()]? C Scanf suddenly stopped reading in values