Integer[][] documents = { {1, 4, 3, 2, 3, 1, 4, 3, 2, 3, 1, 4, 3, 2, 3, 6},         {2, 2, 4, 2, 4, 2, 2, 2, 2, 4, 2, 2},         {1, 6, 5, 6, 0, 1, 6, 5, 6, 0, 1, 6, 5, 6, 0, 0},         {5, 6, 6, 2, 3, 3, 6, 5, 6, 2, 2, 6, 5, 6, 6, 6, 0},         {2, 2, 4, 4, 4, 4, 1, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 0},         {5, 4, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2}}; int[][] convertDocument = documents;   the compiler says incompatible types: Integer[][] cannot be converted to int[][]... how to solve this?
If you have an array of Java objects which have a primitive type (for example Byte, Integer, Char, etc).  Is there a neat way I can convert it into an array of the primitive type?  In particular can this be done without having to create a new array and loop through the contents.  So for example, given  Integer[] array   what is the neatest way to convert this into  int[] intArray   Unfortunately, this is something we have to do quite frequently when interfacing between Hibernate and some third party libraries over which we have no control.  It seems this would be a quite common operation so I would be surprised if there's no shortcut.  Thanks for your help!
$$\sum_{n = 1}^\infty \frac{(-1)^n}{p_n}$$ where $p_n$ is the $n$th prime.  I have computed this to 10000 rather than infinity. My results suggest that convergence does happen but it's very slow. But I can't even be sure about the first few digits: $-0.26959$?  I have looked at the "questions that may already have your answer" and some of the "similar questions," but they involve somewhat different formulas. Can I create a Controller that simply returns an image asset?  I would like to route this logic through a controller, whenever a URL such as the following is requested:  www.mywebsite.com/resource/image/topbanner   The controller will look up topbanner.png and send that image directly back to the client.  I've seen examples of this where you have to create a View - I don't want to use a View. I want to do it all with just the Controller.  Is this possible? Installing a 16-bit Windows 95 game on 64-bit Windows 7 Home Premium I was setting up up android-studio referring to . While installing oracle-java7-installer, this error is displayed:  sudo apt-get install oracle-java7-installer [sudo] password for cyan:  Reading package lists... Done Building dependency tree        Reading state information... Done oracle-java7-installer is already the newest version (7u80+7u60arm-0~webupd8~1). The following package was automatically installed and is no longer required:   snap-confine Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ... Downloading Oracle Java 7... --2017-11-27 08:40:47--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz Resolving download.oracle.com (download.oracle.com)... 223.223.158.138, 223.223.158.136 Connecting to download.oracle.com (download.oracle.com)|223.223.158.138|:80... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following] --2017-11-27 08:40:47--  https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.58.58.93, 2600:140f:7:18e::2d3e, 2600:140f:7:18d::2d3e Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.58.58.93|:443... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1511752368_824528560c20825821ecbcac8f4e9be9 [following] --2017-11-27 08:40:48--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1511752368_824528560c20825821ecbcac8f4e9be9 Connecting to download.oracle.com (download.oracle.com)|223.223.158.138|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2017-11-27 08:40:50 ERROR 404: Not Found.  download failed Oracle JDK 7 is NOT installed. dpkg: error processing package oracle-java7-installer (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  oracle-java7-installer E: Sub-process /usr/bin/dpkg returned an error code (1)   How do I fix this error? I did a fresh installation of Ubuntu 16.04. So that I could resize the window to a certain size from within Terminal. I use dwm as a window manager on Ubuntu, I like tiled windows and I like them as few as possible. I sometimes need to run an application (let's say it's the pdf viewer mupdf in x11) from the terminal, the application will be launched in a new window but the terminal from which I launched becomes this prompt-less console for that application to log whatever.  I use dmenu to launch applications, but sometimes an application needs arguments (file names) to start. I use uxrvt within x11 managed by dwm. Add self-answer delay for all users TL;DR:  I believe there are still some issues with self-answers, particularly near-immediate self-answers, which are not addressed by the current system.  This could be remedied by imposing an automated restriction on how soon self-answers will be displayed in the thread.  Allow users to submit self-answers at any time, but do not display them until certain reasonable conditions (a relatively short timeout, or the posting of a competing answer) are met.    History  This thread covers a good deal of the concerns surrounding self-answers, and some mechanisms in place to prevent "bad" self-answers from new users and other abuse of the self-answer system.    As I understand it, the following restrictions apply:   Users with &lt;100 rep cannot self-answer within 8 hours of posting a question. Self-answers cannot be accepted within 48 hours of posting. Self-answers do not provide rep from being accepted. Accepted self-answers are not pinned to the top of the thread.   Problem  This does a good job of preventing users from posting answers which should probably be comments (or not posted at all), allows superior answers to rise above accepted self-answers, and prevents some other abuses of the system.  However, there is a less tangible element of self-answers which this does not address:    Self answers are a disincentive to other users who may otherwise be willing to post more accurate, detailed material stemming from broader or deeper knowledge and/or experience than the asker has.  When someone posts an answer to their own question, it presumably means that the problem which spawned the question is solved to their satisfaction.  This is fine for the purposes of sharing information with the community, but it deters others from providing solutions to the question which may be more complete or accurate since there is not so much likelihood that the self-answerer will accept a competing answer.  Worse, in the case of near-immediate self-answers, this can remove the incentive for other users to gain reputation via up-votes because the asker has an unfair head-start.  Unless everyone is required to view new answers to questions where they have already voted on an answer, most people probably vote on a good answer and never look at the question again.  This can put (potentially) better answers at a disadvantage even when the head-start is within an hour.  Suggested Solution  Add a delay to the posting of self-answers.  The delay should be the least of these:   Until a competing answer has been posted. A reasonable amount of time to allow competing answerers a chance to post, without preventing self-answers outright.  (Suggestion: 2 hours)   To better facilitate this, and avoid completely turning people off from appropriate self-answering, I suggest the delay be handled through automation more than user limitation.  That is, the user should be allowed to submit the self-answer at any time.  But the answer will not actually be displayed to other users until one of the above conditions have been met.  This could also be applied to the existing 8-hour delay for low-rep users.  Example:  T:0 - A user finishes resolving a tough problem, just before he would have gone to SE for assistance, and decides to share his new-found knowledge with the community.  He posts a question describing his problem.  T:5 minutes - The user then posts a self-answer.  There has not yet been another answer posted to the thread.  The user is given a notice describing the restrictions in place regarding self-answers, and the answer is submitted into the database but not displayed to other users.  (Similar to how suggested edits are only displayed to the user suggesting them, until they are approved.)  T:1 hour, 15 minutes - Another user sees the unanswered question, and posts their answer.  Their answer is displayed immediately, and the self-answer is now also displayed.  T:2 hours - Had the second answer not been posted, the self-answer would automatically be displayed after this point. Animations about a young man pulled into a fantasy setting with dragons? I'm looking for an animation (more likely a film not a series) that I watched as a kid, watched early 90's I'm sure it contained a book loving male main character (wears glasses might have even had an amulet) who gets pulled into a fantasy via a magic book  Setting with dragons and an evil wizard, I remember it being on TV as I never had it on VHS.  Same sort of animation technique as visionaries or thundercats.  Thanks. Windows 8 OEM Reinstalling I know this question is a repetition but I didn't find any solution of my problem from any of the previous questions. Recently I formatted my Laptop HDD and now I want to re install windows 8 I've a Windows 8 OEM license but the problem is I don't have a disc , I downloaded en_windows_8_x64_dvd_915440 from msdn , but when I boot the windows it shows the error that the current version is not suitable with my serial key, so where I can find an OEM Windows 8 and also I've a retail windows 8 disc so if I install that windows 8 in my pc and is there any way to activate it using my OEM key Why Multiplication of zero by any number is zero? If I multiply $a$ by $0$, it means $a$ is added $0$ times, but I am not able to visualize $0$ times! I am trying to prove the following statement.     If a field $K$ is not algebraically closed, then any $K$-variety $V\subset\mathbb{A}^n$ can be written as the zero set of a single polynomial in $K[X_1,X_2,...,X_n].$     Suppose $V=V(f_1,f_2,...,f_n)$, and I would want to find a polynomial $g\in K[X_1,X_2,...,X_n]$ such that $V=V(g)$.  I know that if I can find a polynomial $\phi\in K[X_1,X_2,...,X_n]$ whose only zero is $(0,0,...,0)$, then it is done, since we could take $g=\phi(f_1,f_2,...,f_n)$.  For $n=1$, then I would just choose $\phi=X$, but I do not even know how to proceed to the case $n=2$. Maybe we could choose an irreducible polynomial of degree $&gt;1$.  Any help will be appreciated. What characters do I need to escape when using sed in a sh script? Take the following script:  #!/bin/sh sed 's/(127\.0\.1\.1)\s/\1/' [some file]   If I try to run this in sh (dash here), it'll fail because of the parentheses, which need to be escaped. But I don't need to escape the backslashes themselves (between the octets, or in the \s or \1). What's the rule here? What about when I need to use {...} or [...]? Is there a list of what I do and don't need to escape? How can I prevent Overflow for the Gamma function? I have a Dirichlet distribution from which I'm maximizing $\alpha$ by calculating the log likelihood with the following equation  $p\left(s|\alpha\right) = \sum\limits_{i=1}^O\log\left(\frac{n_i!}{\prod\limits_{j=1}^kn_{ij}!}\frac{\Gamma\left(\alpha_0\right)}{\Gamma\left(\sum\limits_{j=1}^k\left(n_{ij}+a_j\right)\right)} \prod\limits_{j=1}^k \frac{\Gamma\left(n_{ij}+\alpha_j\right)}{\Gamma\left(\alpha_j\right)}\right)$  I have a python script to calculate the log likelihood. It works for small values, but when $n_{ij}$ gets high $\Gamma\left(\sum\limits_{j=1}^k\left(n_{ij}+a_j\right)\right)$ and $\Gamma\left(n_{ij}+\alpha_j\right)$ python runs into overflow error (the max for math.gamma is between 171 and 172).   Is there a way to change the likelihood function so that $\Gamma\left(\sum\limits_{j=1}^k\left(n_{ij}+a_j\right)\right)$ and $\Gamma\left(n_{ij}+\alpha_j\right)$ don't run into overflow errors. Can I just divide the values in $\Gamma$ by for example 100, if I then compare the likelihood between $p(s|\alpha)$ with different $\alpha$ values do the best $\alpha$ values still have the highest likelihood? I need to display attachments on a visual force page for the Case object.  This is the code I am using. I had it working for awhile, but it somehow broke down. It gets all the attachments, but it will not show the images.   &lt;apex:repeat value="{!Case.attachments}" var="att"&gt;             &lt;apex:panelgrid columns="1"&gt;                 &lt;h1&gt;Image/h1&gt;                 &lt;apex:image url="/servlet/servlet.FileDownload?file={!att.Id}"/&gt;             &lt;/apex:panelgrid&gt; &lt;/apex:repeat&gt; I did an upgrade today to the latest version of ubuntu. Everything looked good and fine only for me to discover that I cannot find my applications after clicking the 'Show Applications' icon. The same applies when I search for an application in the search bar, I do not see it. It shows me an endless search.  These are the screenshot images of the problem:      In the meantime, I access my applications from the menu at the top bar and also use the terminal to run applications with CLI. Background Video is shown in Rendered mode but not when szene is rendered i have a 3D Object and want to add a background image( if possible even a movie) to this 3D Object. I use Cycles to render and tried a plane with the  image as texture. When i go into render mode, it looks like this(picture with background) and when rendered, it has no background. The key also looks into  a different direction.  Should i even use Cycles for this or use motion tracking? i tried to use that but had several problems.     Rendered mode   When scene is rendered Obtaining zero-length string from strtok() Solving $\sqrt{x+5} = x - 1$ A basic grammar rule is to use an instead of a before a vowel sound. Given that historic is not pronounced with a silent h, I use “a historic”. Is this correct? What about heroic? Should be “It was a heroic act” or “It was an heroic act”?  I remember reading somewhere that the h is sometimes silent, in which case it’s an, and when the h is pronounced, it’s a. But then I also remember reading that it depends on which syllable is stressed. And I also think I read somewhere that it might differ between British and American English.  Personally, I pronounce the h, and believe that a is correct. I find that it sounds incorrect to use an and pronounce heroic without the h.  So how do I know when to use a and when to use an with a word beginning with the letter h? Are both acceptable or is there one that is correct? Currently, if you access a deleted question you will get a short message informing you that the question has been deleted. However, if you click on a direct link to a deleted answer or comment (which you can get via notifications), nothing is displayed.  This is naturally quite confusing as you will get the message about a new answer or comment via notifications, click on the link and simply see nothing.  Therefore, I propose to display some sort of message to the user, informing her/him that the answer or question has been deleted. Note that this is different from always showing a deleted answer/comment, as I specifically request it in case you access the specific URL.  One example for a comment would be:   One example for a deleted answer is:   This question is related to ,  but requests a feature to circumvent the problem altogether.