How do I smooth out pixelated lines?
How to render text pixel-perfectly with subpixel antialising with Illustrator?
Disable all software installation This code is part of a larger code that generates an Arithmetic Quiz, although the code I have show below just saves the score that the user got on the test and their name. When saving the code it checks if the user has taken the quiz before. If the user has taken the quiz before it saves it as 'Older Score' or 'Oldest Score', however if the user has not taken the quiz before it generates a new row for them. Additionally it works out the average score and highest score for all users it has the data for. For my task I'm supposed to make the code as short as possible.  name = ""+first_name+" "+last_name rows_data = [] class_file_names = ['Class 1.csv', 'Class 2.csv', 'Class 3.csv'] scan = open(class_file_names[int(math_class)-1], 'r+') rows = csv.reader(scan) for row in rows:     rows_data.append(row) scan.close() class_file_names=['Class 1.csv', 'Class 2.csv', 'Class 3.csv'] csvfile=open(class_file_names[int(math_class)-1], 'w', newline="") fieldnames = ['Student Name', 'Oldest Score', 'Older Score', 'Latest Score', 'Average', 'Highest'] writer = csv.DictWriter(csvfile, fieldnames=fieldnames) writer.writeheader() nameFound=False for x in rows_data[1:]:     if x[0] == name:         x[3]=x[2]         x[2]=x[1]         x[1]=str(score)         x[4]=(int(x[1])+int(x[2])+int(x[3]))/3         x[5]=max(x[1],x[2],x[3])         nameFound=True     writer.writerow({'Student Name': x[0], 'Oldest Score': x[3], 'Older Score': x[2], 'Latest Score': x[1], 'Average': x[4], 'Highest' : x[5]})  if nameFound==False:     writer.writerow({'Student Name': name, 'Latest Score': score, 'Older Score': '0', 'Oldest Score': '0', 'Average': score, 'Highest': score}) csvfile.close() input("Test complete! Press anything to close.") Is const_cast safe? I can't find much information on const_cast.  The only info I could find (on Stack Overflow) is:     The const_cast&lt;&gt;() is used to add/remove const(ness) (or volatile-ness) of a variable.   This makes me nervous.  Could using a const_cast cause unexpected behavior?  If so, what?  Alternatively, when is it okay to use const_cast? Can you take the same feat multiple times? Sturm-Liouville Questions In thinking about Sturm-Liouville theory a bit I see I have no actual idea what is going on.  The first issue I have is that my book began with the statement that given  $$L[y] = a(x)y'' + b(x)y' + c(x)y = f(x)$$  the problem $L[y] \ = \ f$ can be re-cast in the form $L[y] \ = \ \lambda y$.  Now it could be a typo on their part but I see no justification for the way you can just do that!  More importantly though is the motivation for Sturm-Liouville theory in the first place. The story as I know it is as follows:  Given a linear second order ode   $$F(x,y,y',y'') = L[y] = a(x)y'' + b(x)y' + c(x)y = f(x)$$  it is an exact equation if it is derivable from a differential equation of one order lower, i.e.  $$F(x,y,y',y'') = \frac{d}{dx}g(x,y,y').$$  The equation is exact iff  $$a''(x) - b'(x) + c(x) = 0. $$  If $F$ is not exact it can be made exact on multiplication by a suitable integrating factor $\alpha(x)$.  This equation is exact iff  $$(\alpha(x)a(x))'' - (\alpha(x)b(x))' + \alpha(x)c(x) = 0 $$  If you expand this out you get the Adjoint operator  $$L^*[\alpha(x)] \ = \ (\alpha(x)a(x))'' \ - \ (\alpha(x)b(x))' \ + \ \alpha(x)c(x) \ = 0 $$  If you expand $L^*$ you see that we can satisfy $L \ = \ L^*$ if $a'(x) \ = \ b(x)$ &amp; $a''(x) \ = \ b'(x)$ which then turns $L[y]$ into something of the form  $$L[y] \ = \ \frac{d}{dx}[a(x)y'] \ + \ c(x)y \ = \ f(x).$$  Thus we seek an integratiing factor $\alpha(x)$ so that we can satisfy this &amp; the condition this will hold is that $\alpha(x) \ = \ \frac{1}{a(x)}e^{\int\frac{b(x)}{a(x)}dx}$  Then we're dealing with:  $$\frac{d}{dx}[\alpha(x)a(x)y'] \ + \ \alpha(x)c(x)y \ = \ \alpha(x)f(x)$$  But again, by what my book said they magically re-cast this problem as  $$\frac{d}{dx}[\alpha(x)a(x)y'] \ + \ \alpha(x)c(x)y \ = \ \lambda \alpha(x) y(x)$$  Then calling  $$\frac{d}{dx}[\alpha(x)a(x)y'] \ + \ ( \alpha(x)c(x)y \ - \ \lambda \alpha(x) )y(x) \ = \ 0$$  a Sturm-Liouville problem.  My question is, how can I make sense of everything I wrote above? How can I clean it up &amp; interpret it, like at one stage I thought we were turning our 2nd order ode into something so that it reduces to the derivative of a first order ode so we can easily find first integrals then the next moment we're pulling out eigenvalues &amp; finding full solutions - what's going on? I want to be able to look at $a(x)y'' \ + \ b(x)y' \ + \ c(x)y \ = \ f(x)$ &amp; know how &amp; why we're turning this into a Sturm-Liouville problem in a way that makes sense of exactness &amp; integrating factors, thanks for reading! Calculate the product of distances for a line perpendicular to hyperbola Let us have a hyperbola $\frac{x^2}{a^2} - \frac{y^2}{b^2} = 1$ and assume the normal at P meets the transverse (horizontal) axis $AA'$ in $G$ and the conjugate (vertical) axis $BB'$ in $g$. Assume CF be perpendicular to the normal from the center.   Find $\frac{PF \cdot PG}{CB^2}$ Find $PF \cdot Pg$   How can I solve the question in least amount of steps?  My attempt:  I first formed the equation of the normal and then I found out the points where it cuts the conjugate and transverse axis. After finding these points I used distance formula to find the distance required and convert it in the form that the question asked. But its a long method and took lot of steps How to exclude a package from apt-get autoremove? I'm in a situation where the list of orphaned packages to be removed by apt-get autoremove includes a package that I want to keep. Apparently I have accidentally removed a package which was depending on it. How can I now mark the package as explicitly desired, so that apt-get autoremove will not remove it? Using image sequence of medical scans as volume data in cycles I know it's possible to do this in BI, but I need your help to do this in cycles. For now, I have a setup to use an image sequence as volume but it only shows 1 slice/frame. I'm using generated texture coordinates for easy mapping (0-1 on each axis). The images are mapped on XY and I would like to use normalized frame# as Z coordinate to map the sequence as a volume.       Images sequence can be found  (I'm using 16-bit TIF files of MRBrain in this exemple).    Any solution is welcome but try to keep it simple and user friendly :).  Final Edit: I had a hard time choosing between Lemon's and PGmath's answers. Lemon's is more user friendly and flexible, and uses the image sequence without any change inside blender. PGmath's uses a 3rd party converter to make the sequence 1 single image, but allows GPU rendering. Well, ImageMagick's command line is : "convert +append *.tif anim.tif" from the folder where the sequence is unzipped. Not so hard. That's why I accepted PGmath's answer.      Now, i played with it, and here's the result.  The "volume" object contains the volume shader (playing with the color ramp gives funny things) and the boolean modifiers (turn them off to see the complete volume, but reduce the final density multiplier for better view). The "Slice Control" arrow empty controls the slice position/rotation. The "Texture Mapping" object controls...the mapping, if it need some tunning (position, rotation, scale, and then tiling if necessary?). Nullable type issue with ?: Conditional Operator Could someone explain why this works in C#.NET 2.0:      Nullable&lt;DateTime&gt; foo;     if (true)         foo = null;     else         foo = new DateTime(0);   ...but this doesn't:      Nullable&lt;DateTime&gt; foo;     foo = true ? null : new DateTime(0);   The latter form gives me an compile error "Type of conditional expression cannot be determined because there is no implicit conversion between '&lt;null&gt;' and 'System.DateTime'."  Not that I can't use the former, but the second style is more consistent with the rest of my code. How do I programmatically log in a user with a POST request? Proof that two spaces that are homotopic have the same de Rham cohomology I know this is true, but how do I prove it? Specifically, I'm trying to calculate the de Rham cohomology of the 3-sphere by using the Mayer-Vietoris sequence and covering $S^3$ with two hemispherical sets $U, V$, such that $U$ intersects $V$ in a "2-band", an equatorial band homotopic to a 2-sphere. How do I study the "correlation" between a continuous variable and a categorical variable? A standard document (e.g. scrreprt) uses roman font family for text and Sansserif font family for titles etc. It is the other way round in beamer. How can I switch the two font families? Or why do beamer define the font families in this way?  For the background: I think this is my problem when using formulas, because they use the Sansserif font instead of the roman version. Formulas using the euler package look really poor.  P.S.: I compile with LuaLaTeX using TeXlive 2013. I have two laptops: Dell xps M1210 and Dell vostro 1400. On MS windows the output volume is so loud that I just need to set volume to around 20% to listen music and watch videos. I use Bose TriPort In-Ear Headphones most of the times. On ubuntu, even if I set 100% volume on the multimedia player, on the desktop volume manager as well, and also on the ncurses GUI of alsa mixer, I get very low volume output. Sometimes while playing some vidoes the volume is so low that I barely hear any words. I have struggled for two years since I started to use ubuntu to solve this mystery. The same sound card which gives excellent sound on MS windows fails miserably on GNU/Linux. Few weeks back I bought an Asus 100PX EEE PC. To my surprise even it also has the same issue. I have tried many versions of ubuntu and also I have done manual compiles of alsa modules without any success. I have asked and read about it in every possible forums and howto's. Nothing has helped me to address the issue. How many named characters died in Avengers: Infinity War? How many named characters have died       and/or disintegrated      by the end of Avengers: Infinity War. It is difficult to speculate who died on         Xandar and the Asgardian ship.       So restrict it to on-screen deaths only. How do I send a file as an email attachment using Linux command line? Please note: I posted this question about an hour ago on my account (I just made it as I am new to the site). I revisited my post and saw that I had not given definitions of what I was asking (I thought they were common notations) and it would not let me edit the post for some reason so I will ask here now and hopefully someone can delete the other thread.  How to prove for a finite group $G$ that $|\langle g \rangle|=o(g)$?  Here are the definitions:  Let $G$ be a finite group and $g \in G$  $o(g)$ is the smallest $m \in \Bbb{N}$ such that $g^m=e$ (the identity element of the group). (If such an $m$ exists)  $\langle g \rangle=\{g^m : m \in \mathbb{Z}\}$  I really don't know how to show that this is true I tried to say let $o(g)=m$ and then show that $|\langle g \rangle|$ has exactly $m$ elements but I wasn't even sure it did because it would contain the elements $g^0,...g^{m-1}$ so that would mean it's true but what about $g^{-1}$ and the other elements with negative coefficients so it seems like it would actually be bigger than $m$?  Thanks. Advantages of ROC curves What is the advantages of the ROC curves?  For example I am classifying some images which is a binary classification problem. I extracted about 500 features and applied a features selection algorithm to select a set of features then I applied SVM for classification. In this case how can I get a ROC curve? Should I change the threshold values of my feature selection algorithm and get sensitivty and specificity of the output to draw a ROC curve?  In my case what is the purpose of creating a ROC curve? Any way to do DISTINCT ON? I'm trying to create a query like this:  SELECT DISTINCT ON (field1, field2) field1, field2, field3 FROM table1   But can't figure out how to get DISTINCT ON narrowed down to a few fields in Drupal like that. Calling $query-&gt;distinct() just seems to structure the query like this:  SELECT DISTINCT field1, field2, field3 FROM table1   I did figure out a hacky way to add what I want by adding an expression before I add any fields like this:  $query-&gt;addExpression('DISTINCT ON (field1, field2) field1', 'field1');   Which creates:  SELECT DISTINCT ON (field1, field2) field1 as field1, field2, field3 FROM table1   I'm looking for a better way to this ? How do you link to applications in the Android market? When posting app links, I'm always using a link on Cyrket or AppBrain -- becuase I can't get a link to anything in the official Android Market.  But I have seen some links out there for use w/ Android itself ( ''market://'' protocol ):  market://details?id=de.schildbach.oeffi   (as seen @ )  Is it possible to web-link to apps in the Market so that a non-Android user can link to the appropriate Market page in a non-Android web browser?