What is wrong with my generic array,
How to create a generic array in Java?
Otherwise, is there any alternative command line utility that can achieve this? For primes $p≡3\pmod 4$, prove that $[(p−1)/2]!≡±1\pmod p$. I know to use Wilson's Theorem and that each element in the second half is congruent to the negative of the first half, but I'm not sure how to construct a proof for it. There is iron in our blood, which is magnetic. Roughly how strong would a magnet have to be to induce a noticeable attraction? It would be nice to know this for several distances. Also, do electromagnets that strong exist? Tristate Checkboxes in Java How do I prevent yum from updating a particular RPM? For certain reasons I have to keep a slightly older version of a particular RPM installed on my box (Fedora 11). The problem is that every time I do a package update yum (or one of its GUI equivalents) wants to update this RPM to the latest version, which is annoying - especially when I update it by mistake.  Is there a way to 'pin' this version so that yum knows to never try and update it? Is it possible to scale up an image to increase the the pixel density? How can std::make_heap be implemented while making at most 3N comparisons? I am new to pythontex. I could run simple python code. However, I get error with slightly complex things.  The error I get is following:  This is PythonTeX 0.16  ----  Messages for py:default:default  ---- * PythonTeX stderr - error on line 211:     File "&lt;outputdir&gt;\py_default_default.py", line 62       MW= 18e-3 u.kilogram/ u.mole                 ^   SyntaxError: invalid syntax  -------------------------------------------------- PythonTeX:  notes - 1 error(s), 0 warning(s)  C:\texlive\2018\bin\win32\runscript.tlu:803: command failed with exit code 1: python.exe c:\texlive\2018\texmf-dist\scripts\pythontex\pythontex.py notes.tex   Part of the code that has error is :  \begin{pycode} import math from pint import UnitRegistry u = UnitRegistry() alpha = 0.04 sigmaW = 72.86e-3 * u.newton / u.meter mu    = 8.9e-4 * u.pascal * u.second densityW = 1000 * u.kilogram / (u.meter ** 3) densityIPA = 1000 * u.kilogram / (u.meter ** 3) densityEtoh = 1000 * u.kilogram / (u.meter ** 3) H = 1e-6 * u.meter W = 28e-6 * u.meter L= 32e-6 * u.meter MW= 18e-3 u.kilogram/ u.mole MIPA= 60.1e-3 u.kilogram/ u.mole MEtoh= 46.07e-3 u.kilogram/ u.mole R0=8.31446 u.joule / (u.mole * u.kelvin) T0= 298 u.kelvin N= 10 D0=2.4e-5 (u.meter ** 2)/(u.second) C0=17.08e-3 u.kilogram/(u.meter ** 3) tauevW=(densityW * N * R0 * T0 * (W **3))/(6* math.pi * D0 * C0 * sigmaW * MW) \end{pycode}   Does anyone know how to solve this issue? Is it possible to have test error lower than training error?  I have a classification problem with 2000 samples, 500 of which are positives, 1500 are negatives. I split my data into 70% training data, 30% test data.  Run random forest with 200 estimators and cv=10. I did this several times and compared the recall and precision score and notice the scores for my test set is significantly better. Is this possible? How to set a font for math mode? I would like to have something like Segoe UI of something similar. Thank you  \documentclass{article} \usepackage{fontspec} \usepackage{firamath-otf} \begin{document} \begin{equation} x+y=45 \end{equation}  \end{document}   Error: Evaluating $\lim\limits_{n\to\infty}(a_1^n+\dots+a_k^n)^{1\over n}$ where $a_1 \ge \cdots\ge a_k \ge 0$ Need to find $\lim\limits_{n\to\infty}(a_1^n+\dots+a_k^n)^{1\over n}$ Where $a_1\ge\dots\ge a_k\ge 0$  I thought about Cauchy Theorem on limit $\lim\limits_{n\to\infty}\dfrac{a_1+\dots+a_n}{n}=\lim a_n$ and something like what happen if all $a_i=0$ or $a_1=\dots=a_k$, but may be something I am thinking wrong?  Maybe it is too simple but I am not getting it; please help. Computing irreducible components of algebraic set Calculate the display width of a string in C#? A Java version of this question was just answered, and, well, I don't know how to do this in .net.   So how do you calculate the display width of a string in C# / .net? This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, navigate to the  tag. This question and answer is owned by the community! If you can improve it and make it more useful, you're welcome to edit it. I have a collection of records, like a List&lt;sObject&gt; or the Trigger.new context variable. I need to query other records that are related to these records either directly or indirectly, and I want to use the related data to make further updates. When I write a query in a loop, like for (Account a : Trigger.new) {     Account parent = [SELECT Name FROM Account WHERE Id = :a.ParentId];     // ... }  I keep hitting Salesforce query limits, and I know this is not best practice. What can I do to avoid this problem and bulkify my code? Can I configure bash to execute "clear" before every command typed in the console? I would like to configure bash to execute clear command every time I type some command in the terminal (before executing my command). How can I do that?  I'm using Debian Linux. Is the sub-field of algebraic elements of a field extension of $K$ containing roots of polynomials over $K$ algebraically closed? I am having trouble with the following problem.      Let $R$ be an integral domain, and let $a \in R$ be a non-zero element. Let $D = \{1, a, a^2, ...\}$. I need to show that $R_D \cong R[x]/(ax-1)$.    I just want a hint.  Basically, I've been looking for a surjective homomorphism from $R[x]$ to $R_D$, but everything I've tried has failed. I think the fact that $f(a)$ is a unit, where $f$ is our mapping, is relevant, but I'm not sure. Thanks I've always wondered this - why can't you declare variables after a case label in a switch statement?  In C++ you can declare variables pretty much anywhere (and declaring them close to first use is obviously a good thing) but the following still won't work:  switch (val)   {   case VAL:     // This won't work   int newVal = 42;     break; case ANOTHER_VAL:     ...   break; }     The above gives me the following error (MSC):     initialization of 'newVal' is skipped by 'case' label   This seems to be a limitation in other languages too.  Why is this such a problem? Buffering GeoJSON file using Python? Proof: $\cos^p (\theta) \le \cos(p\theta)$ I came across this problem when I was at a book store inside of a book made to prepare Berkeley graduates to pass a mandatory exam. I wanted to buy the book, but, alas, I didn't have the money (forty bucks is a lot of money when you don't have a job). So I took my phone out and started taking as many pictures as I could. Unfortunately, I didn't take any pictures of the solutions!  Enough backstory. Time for math. The problem is as follows:  Prove that $\cos^p( \theta) \le \cos(p \theta)$ if $0\le\theta\le\frac\pi2$ and $0\le p\le 1$.  I tried using the series expansion for cosine, but that seemed to be a dead end. Then I tried using Euler's theorem, but I got stuck. Then I got distracted and started to think about other cosine identities. For example, $$\cos\left(\frac\theta2\right)=\pm\sqrt{\frac{1+\cos(\theta)}{2}}.$$ Then what is $\cos(\frac\theta3)$ equal to? I tried to figure it out then I realized that I needed to find the root of a cubic polynomial. Then I realized that I'm better at staying focused than finding the roots of cubic polynomials.  Anyways, a proof would be nice here. I really appreciate any hints or answers. I apologize for my digressions!