I realized my .git folder was taking up 1.3GB today and looked through the contents to see what the problem was. I found a .pack file taking up almost all of the space and searched around online, eventually running  git gc --aggressive.  This fixed the .pack files, which are now much smaller in the byte or kb range. However, I now have an object file that's 1.3GB.   I can cat the contents of the object and I know what's in it but I can't find that file in my repo history. I don't actually remember committing it but I think php storm may have added it to the repo when I put it in my project directory.  How can I remove this large object file without damaging the repo?  Edit: I checked out the duplicate answer and ran both shell and perl scripts in this link:  to try to find the commit but both returned nothing and no errors either.  Does this mean this object really references no commits?


The Situation  I am Co-GM'ing in a group of 7 players - 6 male, 1 female. One of the male players is constantly making sexist remarks, such as "I'm gonna f_ck some b_tches when we get back to town" or "Shut up or I'll rape you", which makes most if not all of the others feel pretty uncomfortable.  Further, he shows little general respect for other players and their characters. He refuses to give them potions when they need some, he refuses to let others use their skills (e.g. he bashes a door in instead of letting someone else pick the lock), etc.  What we tried so far  We tried talking to him in-character, but he cared very little about the opinions of the other characters, both PC's and NPC's.  We tried talking to him out-of-character and explained that what he is saying is rude and makes the whole group feel uncomfortable, especially our only female player. He reasoned that this is the way he concepted the whole character, as being intentionaly "rude" and "barbarian".  Since none of these things helped in any way, we are currently seeing only two options:   Kill off his character Remove him from the group altogether   We hope that killing his character (possibly assassinate him by the group members), would be a clear signal that such language and behaviour is not accepted by the group. If all else fails, we also consider removing him from the group, but it would really be the last straw.  Do you have any recommendations for how to deal with such a player?  Result  During the session today he made multiple bad impressions yet again, so we decided to make it final and remove him from the group. He threw a tantrum, called us various things and stated we didn't know how to roleplay anyways, then ran off. All in all, the group seems to be much happier now, so I am glad things worked out the way it did. Many thanks to everyone involved in this discussion.


What do you consider "best practice" when it comes to error handling errors in a consistent way in a C library.  There are two ways I've been thinking of:  Always return error code. A typical function would look like this:  MYAPI_ERROR getObjectSize(MYAPIHandle h, int* returnedSize);   The always provide an error pointer approach:  int getObjectSize(MYAPIHandle h, MYAPI_ERROR* returnedError);   When using the first approach it's possible to write code like this where the error handling check is directly placed on the function call:  int size; if(getObjectSize(h, &size) != MYAPI_SUCCESS) {   // Error handling }   Which looks better than the error handling code here.   MYAPIError error; int size; size = getObjectSize(h, &error); if(error != MYAPI_SUCCESS) {     // Error handling }   However, I think using the return value for returning data makes the code more readable, It's obvious that something was written to the size variable in the second example.  Do you have any ideas on why I should prefer any of those approaches or perhaps mix them or use something else? I'm not a fan of global error states since it tends to make multi threaded use of the library way more painful.  EDIT: C++ specific ideas on this would also be interesting to hear about as long as they are not involving exceptions since it's not an option for me at the moment...


Is that true that the big bang caused the quantum entanglement of all the particles of the universe so every particle is entangled to each other particle of the universe?


My machine has a SSD (fairly small) and a Hard disk (large). I want to have windows and a couple of programs on the SSD but I want to have the documents folders (such as my documents and my downloads) on the HD. I also want the default install directory pointing at the larger HD. Can anyone advise or point me to a relevent guide? Thanks.


Deep learning model (LSTM) with temporal and non temporal attributes

I'm working on a project to predict the usage of all the files(rough frequency of usage) in a filesystem (a company server on which 100s of company employees are active) in near future (say the next 1 or 1.5 months) based on the metadata of the file system for past 6 months. I've got the following attributes about the files with me :   The temporal sequence of file usage for last 6 months(whenever the file was read/written/modified and by whom). All the users who are on the server and can access the files. Last modified/written/read epoch time and by whom. File creation epoch time and by whom. Any compliance regulations on the file(whether the file contains any confidential data). Size, name, extension, version, type of the file. The number of users who can access the file. File path. The total number of times accessed. Permitted users.   Now, I plan to use LSTM but for standard LSTMs, the input is temporal sequence only. However, all the attributes that I have seem significant in predicting the future usage of the file.   How should I also make use of the attributes of the file that I have? Should I train a Feedforward Neural Network, disregarding the fact that it usually fails on temporal sequences? How should I proceed? Does a variant of LSTM exist that can take into account the attributes of the file as well and predict the usage of the file in near future? Do I need to use MLP and LSTM together like a hybrid?


If $X$ and $Y$ are independent Normal variables each with mean zero, then $\frac{XY}{\sqrt{X^2+Y^2}}$ is also a Normal variable

I am trying to prove the statement:  If $X\sim\mathcal{N}(0,\sigma_1^2)$ and $Y\sim\mathcal{N}(0,\sigma_2^2)$ are independent random variables, then $\frac{XY}{\sqrt{X^2+Y^2}}$ is also a Normal random variable.  For the special case $\sigma_1=\sigma_2=\sigma$ (say), we have the well-known result that $\frac{XY}{\sqrt{X^2+Y^2}}\sim\mathcal{N}\left(0,\frac{\sigma^2}{4}\right)$ whenever $X$ and $Y$ are independent $\mathcal{N}(0,\sigma^2)$ variables. In fact, it is more generally known that $\frac{XY}{\sqrt{X^2+Y^2}},\frac{X^2-Y^2}{2\sqrt{X^2+Y^2}}$ are independent $\mathcal{N}\left(0,\frac{\sigma^2}{4}\right)$ variables. A proof of the last result follows by using the transformation $(X,Y)\to(R,\Theta)\to(U,V)$ where $x=r\cos\theta,y=r\sin\theta$ and $u=\frac{r}{2}\sin(2\theta),v=\frac{r}{2}\cos(2\theta)$. Indeed, here $U=\frac{XY}{\sqrt{X^2+Y^2}}$ and $V=\frac{X^2-Y^2}{2\sqrt{X^2+Y^2}}$. I tried to imitate this proof for the problem at hand but it appears to get messy. If I haven't made any error, then for $(u,v)\in\mathbb{R}^2$ I end up with the joint density of $(U,V)$ as $$f_{U,V}(u,v)=\frac{2}{\sigma_1\sigma_2\pi}\exp\left[-\sqrt{u^2+v^2}\left(\frac{\sqrt{u^2+v^2}+v}{\sigma_1^2}+\frac{\sqrt{u^2+v^2}-v}{\sigma_2^2}\right)\right]$$ I have the multiplier $2$ above as the transformation is not one-to-one. So density of $U$ would be given by $\displaystyle \int_{\mathbb{R}}f_{U,V}(u,v)\,\mathrm{d}v$, which isn't readily evaluated. Now I am interested to know if there is a proof where I can only work with $U$ and don't have to consider some $V$ to show that $U$ is Normal. Finding the CDF of $U$ doesn't look so promising to me at the moment. I would also like to do the same for the case $\sigma_1=\sigma_2=\sigma$. That is, if $X$ and $Y$ are independent $\mathcal{N}(0,\sigma^2)$ variables then I wish to show that $Z=\frac{2XY}{\sqrt{X^2+Y^2}}\sim\mathcal{N}(0,\sigma^2)$ without using a change of variables. If somehow I can argue that $Z\stackrel{d}{=}X$, then I'm done. So two questions here, the general case and then the particular case. Related posts on Math.S.E: . . Edit. This problem is in fact due to L. Shepp as I found out in the exercises of An Introduction to Probability Theory and Its Applications (Vol. II) by Feller, alongwith a possible hint:  Surely, $U=\frac{XY}{\sqrt{X^2+Y^2}}=\frac{1}{\sqrt{\frac{1}{X^2}+\frac{1}{Y^2}}}$ and I have the density of $\frac{1}{X^2}$ at hand. Let's see what I could do now. Apart from this, a little help with the integral above is also welcome.


How to effectively diagnose ISP throttling (or other ISP related issues) and what to do about it?

My question is a bit general but I assume there has to be a good, specific answer to my problem.  I, like many, am beginning to wonder if my ISP is throttling my home internet connection.  I'm not so quick to judge because throttling accusations are often unwarranted or unsupported and often seem a bit conspiratorial in nature.  I'm not yet ready to make that conclusion.  In my case, my wife and I get our internet through our cable provider, and we have the top-tier, home-based offering for our area. We have found that very consistently, our ability to surf the web between 12:30PM and 2:00PM completely disappears.  I understand that this is typically lunch time but, from what I can gather, this isn't considered peak time.  Furthermore, we often stream Netflix in the afternoon during what is certainly peak-usage times (8:00PM-10:00PM) and we never have any trouble.    If this is an issue with network load, we should have trouble in the evening, not in the early afternoon.  What could be causing this mid-day bottlenecking?  This happens every single day, and it happens on every device (we have over 7 phones, tablets, PCs, etc. and they all have the same problem.)  Could this realistically be an issue with ISP throttling?  Could it be something else and are there steps that I can take to personally troubleshoot or diagnose the problem?    Regardless, this is extremely annoying and I'd like to do a bit of personal troubleshooting before I call up the ISP and ask them for a bit of customer service.  Our ISP's customer service is horrible and they've never been of much help.  If I am going to try and confront them on this issue, I would like to know as much as I possibly can about the nature of the problem.    Any tips, strategies or pointers from those who are well informed would be much appreciated.


Why is $\zeta(s)=\lim_{x\to\infty}\left(\sum_{n\leqslant x} \frac{1}{n^s}-\frac{x^{1-s}}{1-s}\right)$ for $0<s<1$?

I am currently reading the book Introduction to Algebraic Number Theory by Apostol. To introduce some important asymptotic formulas, Apostol gives a rough definition of the Riemann zeta function (for $s\in\mathbb{R}^+$),     $$\begin{equation}\zeta(s)=\begin{cases} \sum_{n}n^{-s}, &s>1\\ \lim_{x\to\infty}\left(\sum_{n\leqslant x} \frac{1}{n^s}-\frac{x^{1-s}}{1-s}\right), &0<s<1 \end{cases}\end{equation}$$   The second part really confused me. How could we approach this limit? If we see $\zeta$ as an analytic continuation of $\sum_{n}\frac{1}{n^s}$, it should be written as  $$\zeta(s)=\frac{1}{\Gamma(s)}\int_0^\infty \frac{x^{s-1}}{e^x-1} dx$$ This formula can be easily derived from $\Gamma(s)=\int_0^\infty x^{s-1}e^{-x}dx$ by substituting $x=nu$ (which was exactly what Riemann did in his paper). However, I don't see the connection between this formula and the limit form for $0<s<1$. I am really new to this function so maybe this is a dumb question. But please point it out why we can write $\zeta(s)$ in the limit form for real $0<s<1$.    Also, historically, is the limit form derived from the formal or the converse?    Thanks in advance, any help will be appreciated.


How can I merge a guest post with a new account?

I asked a question over at AskUbuntu(as a guest), and I'd like to be able to edit and comment on this new account. Is this possible?


Is an FAQ (i.e. a collection of questions) considered on topic on Stack Overflow?

I'm referring specifically to this post:   It's essentially a collection of questions and then each answer is an answer to one of those questions. To me that clearly doesn't seem an appropriate format for a Stack Overflow question.  If the questions really are FAQs then assumedly they already exist somewhere on Stack Overflow with answers that have been accepted by the community. A collection of links to those questions in the PDO tag wiki would seem to me a more sensible way to compile an FAQ.  But this question has now been closed and reopened twice already, so I'm hesitant to vote to close it again if it's just going to be reopened. So what is the appropriate way to deal with this? Or should it just be left as it is?


Why does a custom prompt on Linux (debian server) not work as expected

I am setting up a server (Debian) in Virtualbox, I am customizing the prompt, but I have a problem. When I write in the prompt customization, it is malformed.    This happens when I write in the prompt, this overwrites the prompt or when I do enter or the key (arrow up/arrow down). Why?  My configuration is the follow:  PS1='\033[1;37m\H($(hostname -I | grep -E -o "192.168.[0-9]{1,3}\.[0-9]{1,3}")) [\033[1;31m\u\033[1;37m] <\@> \033[1;34m\w\033[1;37m >> '       Why does it happen? How to can I can solve it?


I want to check if an element is visible and if yes, I want to scroll down to it. I am trying to achieve that with the following jquery:  var j = jQuery.noConflict();    jQuery(document).ready(function($) {     if(j('#element').css('display') == 'block'){         j('body').scrollTo('#target');       }; });   but it does not work.


I am reading a proof of the Cayley-Hamilton theorem which uses the fact that $adj(A)A=det(A)I$, where I is the $n\times n$ identity matrix and $A\in M_n(\mathbb{F})$ for a field $\mathbb{F}$.  Could you indicate me a quick way of proving this or to a reference proving it ?  And is is true for a matrix with coefficients over any commutative ring ? I would guess so because C-H is true for any commutative ring. In this case, is the proof the same ?  Thanks


I was working through Harvard data science course: I came across this question:  Assume you have $M$ polls with sample sizes $n_1,\ldots,n_M$. If the polls are independent, what is the average of the variances of each poll if the true proportion is $p$?    I know the general definition of variance, deviation from the mean square. But in this case how are they defining variance of a single poll as $p(1-p)\over{n}$?


There are many posts about lays/lies on the internet, but half of them contradict the others. It's an important letter - which is the proper form?


Does a hard disk still work (with reduced capacity) when one platter is removed?

When there is a hard disk with one damaged platter or head, can one platter be removed and the disk made workable again with reduced capacity?  The firmware might autodetect the number of available platters during power up. Maybe the same firmware is used across a HDD range and so supports drives with different numbers of platters.  Note: I am not asking about interchanging platters, but about reducing the number of platters.  Assume that the damaged platter or head can be removed in clean room conditions.


Is there a term for referring to an organization by its city rather than by its name?

This happens specifically often in the technology press:        There's no point trying to ascribe motives to what Redmond [instead of "Microsoft"] does.   We'll see shortly if Cupertino [instead of "Apple"] thinks likewise ...      I'm certain its use is much wider though I can't think of many examples right now. Using "Detroit" as another name for the US auto industry is slightly wider:        Who says that Detroit does not sell cars Americans want to drive?      Anyway, I have a suspicion there is a name for this so what is it?


From the bivariate poisson to the Skellam (or Poisson Difference) distribution

I am looking at how to calculate the Skellam distribution () from the bivariate poisson distribution.  I understand that the Skellam comes from looking at BivPoisson(X - Y = z) but I dont see how this can be seen starting from the bivariate poisson PMF.


Let $G$ be an abelian group, $g_1,g_2\in G$ of finite order ($o(g_1)=m,o(g_2)=n)$ with $(o(g_1),o(g_2))=1$ (relatively prime). Show that $o(g_1\cdot g_2)=o(g_1)\cdot o(g_2)$.   I have tried the following:  $o(g_1)\cdot o(g_2)=m\cdot n$. Then, if $(g_1\cdot g_2)^{m\cdot n}=e\Rightarrow o(g_1\cdot g_2)=o(g_1)\cdot o(g_2)$.  $(g_1\cdot g_2)^{m\cdot n}=(g_1)^{m\cdot n}\cdot (g_2)^{m\cdot n}$ because $G$ is abelian. So, $(g_1)^{m\cdot n}\cdot (g_2)^{m\cdot n}=(g_{1}^{m})^n\cdot (g_{2}^{n})^m=e^n\cdot e^m=e\cdot e=e$  But I have not used the hypothesis that they are relatively prime.


Cannot connect wifi on Ubuntu 18.04 (Broadcom BCM4312 802.11b/g LP-PHY (rev 01))

I've recently installed Ubuntu 18.04 on my HP DV6 Laptop. I got      No Wifi Adapter Found   I tried some instructions but they were unsuccessful.  .  How can I fix it?  Thank you very much.


Can I connect copper wire to aluminum wire?

I'm installing additional light bulbs in my basement. I have an older house with aluminum wiring.  Can I do this:  [new light bulbs]<--copper-->[old light bulb junction box]<--aluminum-->[main circuit]  Is it safe / does it comply to code ?


Helping users figure out where to post their question

I'm an avid forum user. For years, I have successfully both retrieved and shared information on various forums. However, I am disappointed to find that the same is difficult to achieve here on Stack Exchange.  Lately, I've been told several times that my question is on the wrong forum, rather than getting a useful answer. It's a constant frustration that I know other users have had as well. Given how successful and popular Stack Exchange's forums are, it's time for a change. Users should easily be able to figure out which forum they should post to to get the answers they need, rather than grope about in the dark realm of fogginess that currently prevails.  I suggest a second tag system, called forum tagging. This would be a separate set of tags that a user can use to describe what kind of post they are making. For example, if a user wants to post a question regarding whether to use an int or an Int32, they might use the forum tags programming and theoretical. I am not extremely familiar with all of Stack Exchange's forums, but other forum tags could include literature, math, or language. After the user has chosen their forum tags and written their question, the system should display a prioritized list of forums that would be best for the user to post on.  I imagine that creating this forum tag system would require effort, but it would definitely be a worthwhile investment. Asking on the wrong forum and getting comments that say, "This question is off-topic," rather than getting a helpful answer deviates from Stack Exchange's goals as a forum service, and is a very real issue. Furthermore, users may currently abandon Stack Exchange because of how difficult it is to chose the "right" forum and how problematic it is to not get any answers. The forum tag system would prevent this from happening or mitigate the chances, providing users with greater satisfaction and ease of use rather than empty vexation for both askers and moderators (whom I assume would not want to deal with another heap of off-topic questions that could be on-topic elsewhere).  I don't know what kind of answers I will get to this request--I imagine I'll get at least one comment saying this is off-topic, ironically enough--but I hope that this idea will be considered for clarity's sake.


How to find program commands & Hardsubs on "Hand Brake"

Today with the installation of handbrake I found out this method is not very reliable (command line was "ghb" noway I could have guessed that) is there a way for me to find out program launcher command lines the easy way without first doing a google search or guessing.  Second question: Is there any way for me to hardsub/"burned in" subs from. mkv files in handbrake ( .srt )  to .mp4 (suitable for youtube ) or a simmmilar application that would do ( tried MKVGUI/Extractor )


Problem in solving functional equation $f(x^2 + yf(x)) = xf(x+y)$

To find all functions $f$ which is a real function from $\Bbb R \to \Bbb R$ satisfying the relation  $$f(x^2 + yf(x)) = xf(x+y)$$  It can be easily seen that the identity function $i.e.$ $f(x)=x$ and $f(x)=0$ (verified just now) satisfies the above relation!! And putting $y=0$ I have got $f(x^2)=xf(x)$.  Help needed to find other functions satisfying the relation.


I am trying to define a note environment, currently it is just a wrapper of \marginpar function like this:   \newenvironment{note}{\marginpar}{}   but   \begin{note} Important Notes \end{note}   will only put I in the margin and the rest (mportant Notes) as normal paragraph.   I also tried   \newenvironment{note}{\marginpar\\{}{\\}}   which doesn't work.  What is the right way to do this?


How to correctly setup Ubuntu 18.04 LTS installed from mini.iso to use NetworkManager?

I have just installed Ubuntu 18.04 LTS from  using Ethernet/cable. Then I have installed MATE desktop to it by sudo apt-get install ubuntu-mate-desktop^. But the NetworkManager tray icon/nm-applet says that Ehernet Network — device not managed: What is the simplest method to setup the system to use NetworkManager back?  Note: please do not close this as duplicate - I need complete reproducible solution in one place.


Is transit visa needed for travel from India to Toronto via London and Dublin?

I am Indian passport holder and travelling from India to Toronto via London and Dublin. I have 2 stop flight from India with 2hours layover in London and then flight to Dublin with 3 hours layover and then to Toronto. Is any transit visa needed? I check at  and it says UK visa is not needed. But not sure in the case from london to dublin.  Any suggestions would be helpful. Thanks


I need to make a bevel plate (of 10 degrees) to support wooden I-joists on a single slope (shed) roof assembly. I'm working with 2x6s, and I'd really like to cut the ten degree bevel across the 5.5'' dimension of the board, but I am really struggling to figure out how to do it. Just to be clear, I need to rip these 2x6 long ways, with a 10 degree bevel going the width of the board to support a wooden I-joist at 10 degree angle. I thought I could cut the boards on both sides with a circular saw, but unless I have a monster (8'' + inches) circular saw they blade is too short for the cut to meet in the middle. Any ideas? Update: Just to follow up for those who want the "problem", I have a single slope roof and I am using wooden I-joists for rafters. I am going to use a birdsmouth cut for the lower bearing wall. For the higher bearing wall, the  for those I-joists (and all other I-joist documentation I have seen) says I need a "bevel plate" (see 10a in the attached). I think I will end up just putting a 10 degree cut bevel in a 2x4 and putting that on two top plates as suggested , but open to hearing more ideas and thank you for taking the time.


I have a small (32x32) grey rectangle that I converted into bitmap:     I want to convert the black areas into vector polygons.  Is this possible somehow?


I want to transfer money to an American bank account, but I am in Canada.  What is the cheapest way to do so?   has:    - $700 limit, $4 charge Vanilla wire transfer (My bank requires it be done in person and charges $30 per transaction, limit $3000) Cheque: ($40 fee?)   Any gotcha's (i.e. HIDDEN FEES) and / recommended methods?


What are valid reasons for flagging comments?

Because comment flags were historically some of the worst / least appropriately used flag types, we made comment flags require a reason:    Requiring a reason definitely helped improve existing comment flags that we now see.  The current default comment flagging reasons are   rude or offensive not constructive / off-topic obsolete too chatty other (requires text)   Do these default reasons capture -- without getting into obsessive detail -- the most common, valid reasons to flag a comment?


Is there an alternative to args.EQUAL()?

I'm current learning Java and working through a text book.   I have this piece of code given by the book which works bit like a calculator:   int num1= Integer.parseInt(args[0]); int num2= Integer.parseInt(args[2]); String msg = args[0] + args[1] + args[2] + "=";  if (args[1].equals("+")) msg += (num1 + num2)); else if (args[1].equals("-")) msg += (num1 + num2));   and so on.   In console you would do something like: java Args 10 + 2  What I want to know is if something like this can work (I haven't managed to make it work yet)  if(args[1] == "-") msg += (num1-num2));


This strange spiral creature grew up in my cup of water after night

This grew up in my water cup over night!   Length ~ 12mm Form - spiral made of dark dots It does not move Growing slowly   Can some one help identify it?


Why is there a double inverting buffer instead of a single non-inverting buffer in this "equivalent logic" diagram?

In the datasheet for the DAC8812, there is this diagram in Figure 33:    What is the point of drawing cascading inverting buffers when, logically, it's the same as a single non-inverting buffer? This isn't the only place I've seen it.  edit: This is different than the question  (Why two inverters cascaded in multiplexer control signal terminals?) because I'm asking about an equivalent logic diagram, not physical logical circuitry. And in the diagram in question, there is no pick-off between the buffers.


Scale figure to remaining page height in ConTeXt

I have a page with some content on it and some remaining space at the bottom of this page.  |=========| | header  | |---------| |         | |  page   | | content | |         | |---------| |remaining| |  space  | |---------| | footer  | |=========|   I want to place figure which fit exactly in this remaining page space. Picture must be placed at the end of page without page breaking. \externalfigure[fig][factor=fit] does not work when height of picture is too high to fit in remaining space, and picture placed on next page.


Why cannot we add gravity in quantum mechanics without additional dimensions as done in bosonic or superstring theory?

Is it because Einstein described gravity not as a force but as a curvature of spacetime? Physicists usually say that it is hard to combine quantum mechanics with gravity. But I had doubt, is it because of Heisenberg’s uncertainty principle that quantum particles can be at multiple places at once and therefore the gravity associated with the electron (quantum particles) can be at multiple places? Or as Hawking suggested in his book “A Brief History of Time” that when we work to do the math we end up coming up with numerous infinities which does not gets cancelled, but the more successful theory of quantum mechanics also has infinities under singularities but still we call it a successful one, so can’t those infinities get ignored (And what those infinities even mean as no one clearly tends out to show us the math behind it). I strongly suspect that there is an incomplete understanding of quantum mechanics in me as for sure the great physicists cannot be wrong if the is, then can you please explain. Thank you. We all have heard about the genius of Einstein about description of gravity not as a force but as a curvature of spacetime. We have encountered numerous situations in which Einstein’s general and special theory of relativity have provided us with results with extreme precision then why are we searching for a particle associated with gravity when we know that gravity cannot be expressed as a particle as it is the mere bending of spacetime? Your views ..


Three dice are thrown. What is the probability the same number appears on exactly two of the three dice?

This is my solution, not sure if this is correct.  Let D1, D2, D3 be the outcome of the three dice.  Since "exactly 2 of the 3 dice" is mentioned, I have the following sets:  (D1 = D2)AND(D1 =/= D3)   Hence the probability of such an occurance is:  P((D1 = D2)AND(D1 =/= D3)) = P(D1=D2)*P(D1=/=D3)   This is because D1=/=D3 is independent of whether D1=D2. Hence the probability is:  P((D1 = D2)AND(D1 =/= D3)) = (1/6)*(5/6) = (5/36)   I don't know if what I'm doing is right or wrong, I just started with probability and my brain literally have no neural network for probabilities.


What are the differences between double-dot ".." and triple-dot "..." in Git commit ranges?

Some Git commands take commit ranges and one valid syntax is to separate two commit names with two dots .., and another syntax uses three dots ....  What are the differences between the two?


Unix systems without /dev/stdin, /dev/stdout, and /dev/stderr?

, and the comments to it, had me read the  to figure out whether /dev/stdin, /dev/stdout and /dev/stderr were actually needed for conformance to the POSIX standard.  It turns out they are not:     The system may provide non-standard extensions. These are features not required by POSIX.1-2008 and may include, but are not limited to: [...] Additional character special files with special properties (for example, /dev/stdin, /dev/stdout, and /dev/stderr)   As far as I can find, this is the only mentioning of these files in the standard.  I have access to only one "system" (environment, really) which does not implement them, and that's MinGW on Windows (no /dev at all as far as I can see).  As far as I know, all the free Unices have them, and so does Cygwin, Windows' new Linux environment and Darwin/macOS.  I'm not well versed with the commercial Unices though.  Is there a POSIX system, Unix, or a Unix-like environment of some description, alive today, that does not implement /dev/stdin, /dev/stdout, and /dev/stderr as files in the filesystem?


Which one is correct: "Do you wake at seven?" or "Do you wake up at seven?"

Someone said to me that the first one is the correct answer, because you use "wake up" to ask someone to stop sleeping. But I think the first one does not sound natural.


How do I retrieve the public key from a SSH private key?

A SSH private key as generated by ssh-keygen contains a public key part. How do I retrieve this public key from the private key? I've lost my public key and need to put the contents of this public key in the servers authorized_keys file and do not want to create a new key pair.  Alternatively phrased: how do I create the id_rsa.pub file from a id_rsa file?


I recently read this article about a day trader that lost $100,000:     Please explain this, because I can not understand how this "trader" lost so much money.  He says he sold 8400 shares at 2 dollars... that's $16,800 USD; how could he be in debt to E-Trade for $100,000 USD?  Did he buy this 8400 shares with just his money, or in margin account (50%/50%) from the Etrade money?


Is there a way to group favorited questions or search among them per topic?

On Stack Overflow, after you star (or favorite) many questions, it becomes difficult to search among them to find an old question you starred.  Is there a way to search among them per topic? Would not it be useful to being able to group or search among them for example by the topic?


What are the rules/recommendations around changing someone’s spell casting stat?

Each magic class seems to have a stat associated with it (Int, Wis, or Cha), used to determine stats such as spell save difficulty class, or the power of certain abilities that the class has.  I think sorcerers and warlocks use Charisma. I understand how Charisma might translate to power for most warlocks (as they would be able to strike a pact with their patron and convince it that they are on track with their task more easily), but what if they made a pact with someone who doesn’t care about how their servants present themselves, but has faith in those with a high intelligence (or wisdom).  If you wanted to create a sorcerer or warlock who’s character traits make them bad at social situations, but great at their craft (or the other way around), then I’d expect this would be done by requesting to use your preferred stat instead of Charisma for your spell casting modifier, spell save difficulty class, and any other Charisma calculation that’s directly part of your class abilities (or possibly JUST your spell casting modifier and spell save DC if you wanted to make a more mixed character). How would various dungeon masters respond to this sort of request, and how would you recommend someone respond to that sort of request if they were a dungeon master?  Basically:   Are there any rules that allow players to change the stat that represents someone’s spell casting ability? (They don’t necessarily have to be official) Does the ability to do so unbalance the game in any way? (This is about changing the magic stat for a (few) specific character(s), not everyone of a class)   (...also, why would charisma be important to a sorcerer?)


Why was the Android Stack Exchange created?

I don't understand why Stack Exchange has created a separate network for Android when they already have  tags in all of their programming networks? Is this a beginning of language specific network? Can we expect more specific networks in future like:   php.stackexchange.com java.stackexchange.com csharp.stackexchange.com etc.


After deleting question, how many days are required to ask a question in Stack Overflow?

I am new to this site, and I have asked some questions. Some questions I got a reply to and some of them no replies at all. For one question I was down-voted to -2.  After that I was getting message like:     Sorry, we are no longer accepting questions from this account. See the Help Center to learn more.   After that I had deleted some unanswered question from my account. After deleting a question how many days arerequired to ask a question?  Still I am getting the same error. What should I do?  How do to up-vote my question and release lock?


How to optimize dedicated server's bandwidth output

My server is serving files to client and requires high speed in sending output. Currently my dedicated server located in france promises 1Gbps port with SLA of 100Mbps which means that my server maximum output would be 12MB/s  However using Capsa and bandwidth freemeter I detected that my server only output at 3MB/s for sum of all client, which is 24 Mbps which is not even reaching half of what I was promised.  I am thinking thinking could it be because of my source code written in ASP.NET MVC? The code is using 3MB buffer size and allow partial download which when I use download manager and uses 3 section, it would still only gave around 80KB/s  How do I optimize windows 2008 server to maximize network power and send large output? My server is Intel Xeon and that couldn't be less processing power, and the RAM is 8GB.


How do I make a 7 with a horizontal line through the middle?

I've been trying to create the 7 I'm used to writing by hand in LaTeX with a horizontal line through the middle. This seems like it should be a simple thing to do, but I don't see any native support for this. This is the look I am trying to get:


I weight 400 lbs and wondering if it is necessary to buy a second seat

I weigh 400 pounds and wonder if it is necessary to buy a second seat on Air Canada.  The seats are about 17.83 inches.


I'm trying to get my head around zero-knowledge proofs and my definition of a zero-knowledge proof is as follows.     A zero-knowledge proof is a method by which one party can prove to   another party that they know a secret value, without sharing any   data about this secret value.   To implement a zero-knowledge proof some data will need to be exchanged.  With that in mind, is the following assertion correct?    To implement a zero-knowledge proof, data can be exchanged but this data should not contain any information about the secret value?   If the above holds true, could a digital signature be classified as a zero-knowledge proof?


In python, execute multiple terminal commands on a same file and save all the changes once

I want to write a python script to format files using Seds.  sub = subprocess.call(['sed', 's/=/ = /g', infilename], stdout = outfile) sub = subprocess.call(['sed', 's/=  = /==/g', infilename], stdout = outfile)   But this would write the entire changed infile twice to outfile (outfile contains two infiles in which each has one sed change). Is there a way to execute the two (and more) sed commands on the infile and write only once to the outfile which contains all the sed changes.


Passport and Canadian visitor visa expiring inDecember 2019

Hi Team my Indian passport and Canadian Visa are expiring in December 2019 Could I visit Canada in August 2019 and come back in October 2019?


The context: I have 2 databases. The source database where I retrieve data and the target database where I insert data.   What is the collective name I can use for source and target in this context? Target can also be called destination.


Proof of the limit using only elementary techniques

Today I saw this limit and I was baffled by  it.  $$e=\lim_{ n\to \infty} \sqrt[n]{\operatorname{lcm}(1,2,3,4,\ldots,n)}$$  Is there an elementary proof of the result?


Why does c++ forbid implicit conversion of void*?

In C, we can convert void* to any other pointers.  But C++ forbids it.   int *a = malloc(4);   leads to this error:   invalid conversion from ‘void*’ to ‘int*’ [-fpermissive]   Are there any latent dangers here in c++?  Are there any examples of c++?


How can I redownload previously purchased Linux Format magazine on Ubuntu Software Center?

I bought some issues of the Linux Format magazine on the Ubuntu Software Center. I now reinstalled Ubuntu and would like to redownload the magazines. In the list, they correctly appear as "Previously Purchased", but if I try to install them, I see:     There isn't a software package called lxf171 in your current software sources.   Also, the magazines do not appear when I click on reinstall previous purchases in the menu.  If I try to buy a new issue, everything works perfectly.  Does anyone know how can I download the magazines that I already paid and donwloaded in the past?


Elastic potential energy and equilibrium position when mass changes in vertical mass-spring system

I'm a bit stuck with this situation: Suppose that an object $A$ with mass M=8 kg at 10 mt above the floor falls from rest tied to an 2 mt elastic rope, which does not exert any force since $A$ falls 2 (and I will model it as a spring with elastic constant $k$). I know it will bounce at a minimum height - doesn't matter where it is, but let it be $y_1$-, and at that moment the object decrease its mass in 3 kg, so that new mass is m=5 kg. I want to know the maximum height it will reach after bouncing, so I set up conservation of energy (assuming there is no friction due to the air). Now, which is the elongation of the spring? I mean, we measure it respect to the equilibrium position. Initially, but it changes when mass changes (it is a a higher position when $A$ weighs less). Although, if elongation is higher after losing mass, I think it implies system has more potential than before but no force has done work to change it. It seems like system has gained energy, which looks absurd.  So, what elongation should I use when I set up the eq: $$Mgy_1 + \frac{1}{2}k(y_\rm{eq}-y_1)^2 = mgy_2 + \frac{1}{2}k(\hat{y_\rm{eq}}-y_2) ^2  $$  Here some images to illustrate this situation.      Where $y_2$ will be the maximum height after bouncing. Remember $y_\rm{eq}$ is the equilibrium position when $A$ has mass M, and $\hat{y_\rm{eq}}$ is the same when $A$ has mass m.  I hope you could help me to see it more clear. Please, correct me if I'm wrong.


Is there any way to get a specific angle using the knife tool?

Instead of the constrained 45 degrees that happens when you press C, is there a specific angle I can get for example 35 degrees instead?   It's currently cut at 45 degrees in the attached image and I need it to be 35.


Getting error "List has more than 1 row for assignment to SObject" when sending data from controller to view

I am trying to send a record from my apex controller to my component but am receiving:     List has more than 1 row for assignment to SObject   Apex Code:          @auraenabled public static Event_Registration__c isRegistered(Id recordId){   Id userId = UserInfo.getUserId();     Id contactId = [SELECT ID FROM Contact WHERE OwnerId = :userId].Id;     List<Event_Registration__c> registrationList = [SELECT ID FROM Event_Registration__c WHERE Event__c = :recordId AND Contact__c = :contactId];     Event_Registration__c er = (registrationList.size() > 0 ) ? registrationList[0] : null;     return er; }   JS Controller:      isRegistered : function(component, event) {      var action = component.get("c.isRegistered");     action.setParams({ recordId : component.get("v.recordId") });     console.log('params set');     action.setCallback(this, function(response) {         var state = response.getState();         if (state === "SUCCESS") {             console.log(response.getReturnValue());             var eventReg = response.getReturnValue();              if(eventReg != null){                 component.set("v.registered", true);             }             else{                 component.set("v.registered", false);             }         }         else if (state === "INCOMPLETE") {             // do something         }             else if (state === "ERROR") {                 var errors = response.getError();                 if (errors) {                     if (errors[0] && errors[0].message) {                         console.log("Error message: " +                                      errors[0].message);                     }                 } else {                     console.log("Unknown error");                 }             }     });     $A.enqueueAction(action);         },


How do I import self-created modlues in Python | I keep getting a module not found error

Keep getting a module error here, though I created the module


Is there a way to make bevel size larger in Photoshop CS6?

I am trying to make beveled badges like such:   Notice how deep the bevel sizes are.   I tried making my own rendition but, the bevels come out looking really small.    My bevel 'size' settings is maxed out on Photoshop.   So I was wondering if there is a setting or trick that I am missing to make the bevel size larger to give it a deeper look.  Thank you very much.


My Terabyte hard drive only has 931mb free?

I just used boot and nuke to wipe my hard drive and reinstall my OS systems. When selecting the hard drive I noticed that there were only 931gb free in my hard drive.  Is this normal? It sees like a strange number as I though terabyte drives held 1024gb.  Is some of the hard drive hidden? Are there any programs that can check?  Thanks in advanced for any help with this!  df -h returns the following:  Filesystem           Size  Used Avail Use% Mounted on udev                 3.9G     0  3.9G   0% /dev tmpfs                786M   18M  768M   3% /run /dev/sda5            437G  5.7G  409G   2% / tmpfs                3.9G   31M  3.9G   1% /dev/shm tmpfs                5.0M  4.0K  5.0M   1% /run/lock tmpfs                3.9G     0  3.9G   0% /sys/fs/cgroup tmpfs                786M   20K  786M   1% /run/user/124 /home/*/.Private     437G  5.7G  409G   2% /home/* tmpfs                786M  2.0M  784M   1% /run/user/1000   lsblk returns the following:  NAME           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT sda              8:0    0 931.5G  0 disk   ├─sda1           8:1    0   500M  0 part   ├─sda2           8:2    0 478.8G  0 part   ├─sda3           8:3    0   496M  0 part   ├─sda4           8:4    0     1K  0 part   ├─sda5           8:5    0 443.9G  0 part  / └─sda6           8:6    0   7.9G  0 part   └─cryptswap1   253:0    0   7.9G  0 crypt [SWAP] sr0             11:0    1  1024M  0 rom      EDIT: I am literally installing the dual boot system as we speak. Windows first, here is a breakdown of what Windows 10 sees:   So total size is 931.51GB. That is a very strange number.


Most efficient way to remove object from inside of an iterating ArrayList

I'm trying to remove an object from an iterating ArrayList but cannot do so from inside of the loop, here is what I have at the moment          for(Pearl pearl : this.pearls){             pearl.onDraw(canvas);              if(fish.isCollide(pearl)){                 this.pearls.remove(pearl);             }         }   The above code does not work if the ArrayList is larger than 1.   I was thinking of changing the code to something such as the following but would prefer to know if there is a simpler way.         List<Pearl> pearls_delete = new ArrayList<Pearl>();          for(Pearl pearl : this.pearls){             pearl.onDraw(canvas);              if(fish.isCollide(pearl)){                 pearls_delete.add(pearl);             }         }          this.pearls.removeAll(pearls_delete);


What's the right way to enter DKIM string into BIND zone file?

I use Ubuntu 16.04 LTS. I'm been having this annoying issue again with entering DKIM string (that long code) into my BIND's zone file. In the past (for a different domain) I used to bypass that issue by first copying the string from OpenDKIM's mail.txt file into NotepadQQ (it's a Linux version of Notepad++). In Notepad the string didn't break itself into pieces and I just pasted it into zone file and DKIM worked (and still works!) just fine. But recently I've got a new domain and I'm trying to setup e-mail for it. So here we go again. Same story, but my workaround doesn't work this time. I did notice though that in this string that now I'm trying to enter (UNLIKE in my previous one) there are a few slashes too... Don't know if that makes any difference... I've seen online a few solutions (like to break the string with quotation marks), but frankly I don't understand how exactly to implement it in a real life... Here's the new string (that didn't work). This is the one that started to work after splitting. I also included the selector and all the rest to make the picture complete: mail._domainkey    IN  TXT "v=DKIM1; k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3611SadfrxRDAgOQXaNLnde9/vsuSdeL4a5uy+JcxkCsgfjRiVlD9uwZBD+KgG2SkDdZ6+OVndZk3YuOpzmSmzwQz5VXLH5Nh/o2Z3oZnn/zqWtp+eyMaKR1jnznxPNT6/DPvOEWxbNybbNtYlWdHl5qHrzF7BUQdTVV8jGFxrwIDAQAB"  And here's the complete working example from my old domain (the string that was't split): mail._domainkey IN  TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfc9WdF2XaWAFSmhJkjPMcvHT54NiK7puywuaDMQ1jsNTp6wP2tujO1Fp2jzT5aMJOK4CWrOmu4dAg2jZ82CUzghMcIy0p1uN9ZpHfsaDbYMUekN6CkuwIWvcCxrRPJQoyAMnw7IU1QFpRIwzpGLomzNY9KeDZCBGkxH1lYXcacQIDAQAB"


Consecutive spaces in inline code get collapsed

I’ve found a markdown bug:  To match three or more spaces in regex, use `/   +/`.   ☞     To match three or more spaces in regex, use /   +/.   Boom.


In Lord of the Rings: The Return of the King on the way to returning to the Shire Gandalf tells the hobbits that:     But if you would know, I am turning aside soon. I am going to have a long talk with Bombadil: such a talk as I have not in all my time. He is a moss gatherer, and I have been a stone doomed to rolling. But my rolling days are ending, and now we shall have much to say to one another.   So does this mean Bombadil is also a maiar like Gandalf? Has his reason been fulfilled and so he is now in rest?


present continuous, be going to, or both?

In Grammar and Vocabulary for First Certificate (Prodromou, 2005), Chapter 2 covers "the future", "be going to", "present continuous", and "present simple". I put three of the End-Of-Chapter questions below with the corresponding back-of-the-book answers.  My concern is with Question #1 only. (I wrote #2 and #3 for context.)  Put the verb in brackets into the most suitable form of the future.*   "What ________ you __________ this evening?" (do) 'Nothing.' [Answer: are ... doing] "Well, _______ we ___________ to that new pizzeria?" (go) [Answer: shall ... go] In 2004 the Olympic Games _________ in Athens. (take place) [Answer: will take place]   For Question #1, the only answer in the back-of-the-book answer is the present continuous: "What are you doing this evening?"  This has effectively ruled-out the possibility of using 'be going to' to complete the sentence. In other words, I think what he is saying is that "What are you going to do this evening?" is incorrect.  Do you think he is right?


Shortest distance between a point and a parabola.

Find the shortest distance from the point $(1, 0)$ to the parabola $y^2 = 4x$.   As-  Let $D^2=(x-1)^2 + y^2$. Now reduce this to one variable by putting $y^2 = 4x$ to get  $D^2 = (x-1)^2+ 4x$. We are working with $D^2$ to  make the  calculations easier. Clearly $$\frac{d}{dx}D^2 = 2(x-1)+4 = 0 \implies x = -1$$ At $x = -1$, we have $\frac{d^2}{dx^2}D^2 = 2 < 0$ which shows that $D^2$ is minimum. At this $x = -1$.  But this is not a point on parabola. Am i doing some mistake or we have to follow some other method to get the minima?


The perimeter of a rectangle inscribed in semicircle

Text of the problem: A rectangle is inscribed in a semicircle and the radius is 1. The bas of the rectangle is x. Write an expression for the rectangle perimeter and determine the value of x that gives the highest possible perimeter. Also,, what is the highest perimeter?  Trigonometry is not to be used.  My Attempt:


I am trying to install cheese  ubuntu@ubuntu:/usr/src/linux-headers-3.5.0-23-generic$ sudo apt-get install cheese [sudo] password for ubuntu:   E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   how to solve this issue please help.


I wanted to try out more of Weis and Hickman's works(I liked the Deathgate Cycle very much), and I decided to do it with Dragonlance. Since there are a lot of books in the series, can somebody clarify whether I should be reading in the chronological order or not?


The /boot partition is on 100% use and there is 0 available for it.  Does anyone know what I should do to free up some space?


What is the best way to isolate a value in a dictionary

I got the following dictionary:      freelancers = {'name': 'freelancing Shop', 'brian': 70, 'black knight': 20,                     'biccus diccus': 100, 'grim reaper': 500, 'minstrel': -15}   I want my for statement to loop trough all the dictionary..and if a value that contains the word 'shop' is found. Printing it. Is there any way to do it??.   this is clearly not working, values could be string, int, etc.  for key, value in freelancers.items():     if 'Shop' in value:         print(f"Welcome to {value}")


TV series with pull out phone screens and pink/purple space ships

I’m looking for a TV show where an alien race comes to Earth and sets up big purple/pink cylindrical or cone shaped spaceships in various cities around the world. The Aliens are not hostile but actually created peace and eliminated hunger on Earth.    I believe the aliens had some human features and were wise and calm the main actor had a phone with a pull out screen I believe the main actor worked for or with the aliens I believe that in the last episode some humans and aliens go into some kind of pods and perhaps leave Earth? one of the space ships was located in a major US city. Maybe Washington DC or another East Coast city   Could someone please tell me what TV series this is? I have been searching everywhere and cannot find it. Thanks!


Does Voice of Authority work with harmful spell?

Voice of Authority from Order Domain cleric states that  If you cast a spell with a spell slot of 1st level or higher and target an ally with the spell, that ally can use their reaction immediately after the spell to make one weapon attack against a creature of your choice that you can see.  Since being in a range of fireball makes you a target, can you activate Voice of Authority by casting fireball on your ally? Note: I use fireball just as an example and comedic effect. I'm pretty sure it's not the intended use of Voice of Authority, but I'm curious of the RAW reading of using harmful spell to activate the feature.


Im asked to prove that R =Z[x]/(x^3) Is integral extension of Z One way to do so would be to prove that Z[x]/(x^3) is a finitely generated Z module . But i cannot find a base to do the job Also since R includes all polynomails   of Z[x] just without the x^3 terms , if R is finitely generated then Z[x] would also be ?


Follow-up question to     In "Beyond the Wall" (Game of Thrones, S07E06), the Night King       kills the dragon Viserion with a spear.   Why is he moving so slowly when he could have easily eliminated all targets? Also, in previous episodes, we saw him strolling around, e.g. when attacking Bran's hideout. Is there any in-universe explanation why he is moving slowly, or is he just ... too cool to hurry?  Scope: I'm not asking about this specific episode but in general. We have seen him act slowly in previous episodes.


What would be the disadvantages of using a 4 stranded ethernet cable?

I got this cable with a homeplug AV 200 device - its labelled cat 5e    But looking at the plug end has me rather dubious about it.   (There's only 4 strands there, not the standard 8 - and missing pins, so I suspect these cables are designed to do so. The wire jacket is also surprisingly loose).  Another angle. This isn't a standard connector, no, someone has went and made a non standard connector specifically for this    I figured the cable was crap so I cut into it - some of you were wondering if they had merely left out the additional pairs - and the answer is no - its basically half a cat 5 cable.    I'm currently using it for some legacy equipment that runs on fast ethernet and the plug it came with and it seems to work. However, I'm curious - what're the downsides of such a cable? What do I need to look out for? In what situations would this cat-5 cable be unsuitable for use in anything other than a ethernet cat o'nine tails?


What is the point of a shield proficiency?

PHB describes the downsides of wearing an armor you are not proficient with:     Armor Proficiency.   Your class gives you proficiency with certain types of armor. If you wear armor that you lack proficiency with, you have disadvantage on any ability check, saving throw, or attack roll that involves Strength or Dexterity, and you can’t cast spells.   However, .   The Spellcasting chapter says about armor explicitly, and not shields:     Casting in Armor   Because of the mental focus and precise gestures required   for spellcasting, you must be proficient with the armor you   are wearing to cast a spell. You are otherwise too distracted   and physically hampered by your armor for spellcasting.   It seems . What exactly are the downsides of not being proficient with shields?


How could I modify this Building Placement Code for an RTS (BGE)

This code currently allows for buildings to be placed on flat surfaces (using an object as the Collision Detector).  It works fine for that, but how could I make it so that it can only be placed on one object like the plane (the ground of the map).  The reason for this is that right now you can place buildings on top of other buildings.  My map is flat so does not have any bumps or hills so I don't really need it nor want it to be placed on any flat surface.  Thanks!  from bge import logic  def main(): scene = logic.getCurrentScene() cont = logic.getCurrentController()  mouse_over = cont.sensors["MouseOver"]  if mouse_over.positive and scene.objects["Arrow"]['ActiveYesNo?'] : tracker = scene.objects["Arrow"] tracker.worldPosition = mouse_over.hitPosition tracker.worldPosition.z += 1


Express $\int \tan^n(x)dx$ in terms of $\int \tan^{n-2}(x)dx$.

Calculate $\int \tan(x)dx$, $\int \tan^2(x)dx$. Give a formula to $\int \tan^n(x)dx$ in terms of $\int \tan^{n-2}(x)dx$. Use this to calculate $\int \tan^4(x)dx$, $\int \tan^5(x)dx$  I have calculated the first two integrals:  $$\int \tan(x)dx = \log(|\cos(x)|) + C$$ $$\int \tan^2(x)dx = \tan(x) -x + C$$ where $C\in \Bbb R$. But I can't see the relationship between them to obtain the formula. Could you give any hint?  Thanks in advance.


Cross-platform, cross-browser way to play sound from Javascript?

I am writing a dhtml application that creates an interactive simulation of a system.  The data for the simulation is generated from another tool, and there is already a very large amount of legacy data.  Some steps in the simulation require that we play "voice-over" clips of audio. I've been unable to find an easy way to accomplish this across multiple browsers.    comes pretty close to what I need, but it will only play mp3 files, and the legacy data may contain some .wav files as well.    Does anyone have any other libraries that might help?


"What he is looking for are books" or "...is books"?

Which of the following is correct?  What he is looking for are books written by Jane Austin. What he is looking for is books written by Jane Austin.  Is it are to agree with the object books or is to agree with the subject he?


I would like to send an email to a group from my Contacts by just typing the group name (as you can do in Gmail).    Is this possible in Inbox by Google?


"There is an apple, an orange" vs. "There are an apple, an orange"

Consider these     There is an apple, an orange and a banana on the table.      There are an apple, an orange and a banana on the table.   which one should I use?


My son has a PC with no monitor, and an OLD laptop (circa 2002). They both support VGA. Is there an easy way to connect the PC to the laptop such that the PC displays on the laptop's screen? So basically the laptop's internals are not being used, we just want to use its display for a connected PC. The laptop does work, it's just too slow to be useful. But its built-in monitor still works fine.  Is there any way?


Counting overlapping polygons in GeoJSON to result in new set of polygons?

I have 100 polygons in a GeoJSON file that partially overlap each other. I would like to produce 100 new polygons as follows:   The area covered by any of the original 100. This is their union. The area covered by at least two of the original 100. ... The area covered by all but one of the original 100. The area covered by all of the original 100. This is their intersection.   (I'm actually going to only keep 5-10 of these 100 results, but I expect the process for generating all 100 of them is the same as generating a subset of them)  What software / functions can I use to do this?    One approach I've already encountered in another similar project involves rasterizing all of the original polygons, then counting the overlapping pixels and producing new polygons from that data. This approach loses precision earlier than I would like to (I want to maintain near perfect precision up until the end of the process, THEN simplify things for display).    I could do this semi-manually with hundreds of union and intersection operations. This approach is not ideal because I want to re-run this process at intervals in the future as the dataset grows.


Why would someone use a Bayesian approach with a 'noninformative' improper prior instead of the classical approach?

If the interest is merely estimating the parameters of a model (pointwise and/or interval estimation) and the prior information is not reliable, weak, (I know this is a bit vague but I am trying to establish an scenario where the choice of a prior is difficult) ... Why would someone choose to use the Bayesian approach with 'noninformative' improper priors instead of the classical approach?


How to sort a hashmap by the Integer Value

HashMap<String,Integer> map = new HashMap<String,Integer>(); map.put("a", 4); map.put("c", 6); map.put("b", 2);   Desired output(HashMap):       c : 6 a : 4 b : 2   I haven't been able to find anything about Descending the order by value. How can this be achieved? (Extra class not preferred)


Sum and difference of tangents in degrees

$$\tan81^\circ-\tan63^\circ-\tan27^\circ+\tan9^\circ$$ At first, I tried to break the tangent into multiple angles… $$\text{FAILED}$$ Then I proceeded by converting it into other trigonometric ratios… $$\text{FAILED}$$ Please suggest me an approach to such questions. A solution is most welcomed.


I have an image that I have applied a skew to.    The effect that I want is that the horizontal top and bottom of the image have a curve to them.  I imagine I have to use the pen tool somehow to achieve the curve but I can't figure it out.  To re-iterate, I want to transform a rectangle image so the right side is smaller and top and bottom has an inward curve.  I need to apply this to existing image, not draw an image of that shape.  I hope I explained that correctly.  Thanks for your help.


How to receive correct file and directory paths from user?

I want to receive import and export path from user. From  I've known I can give the string property a sub-type which turns it to a file or directory selector, the problem is that they give a wrong path, some parts are replaced by ".." and some parts are not typed at all. I want to receive those paths from user to use them later when the user executes an operator (by clicking a button when everything is ready).  this is my code: class myPaths(bpy.types.PropertyGroup):     @classmethod     def register(cls):         bpy.types.Scene.myPaths = bpy.props.PointerProperty(type=myPaths)      @classmethod     def unregister(cls):         del bpy.types.Scene.myPaths      fileExportPath: StringProperty(         name="export path",         subtype="DIR_PATH",         description="some description"     )     jsonImportPath: StringProperty(         name="import path",         subtype="FILE_PATH",         description="path of .json file to import."     )     fileName:StringProperty(         name="output file name",         description="Write file name without any file extension."     )  How can I receive correct file and directory paths form user?


Average of number of dice rolls untill getting specific number

If we roll a dice till getting the number 5 (or any other number) - how can I calculate the average number of dice rolls? Thanks


Is it ever correct to have a space before a question or exclamation mark?

In written English (mainly online) I often come across sentences ending with a question or an exclamation mark with a space before it. Is it always just an error or a typo? Or there are cases when it is a correct English, for example after closing parentheses or some other punctuation marks?


How does Grub Stage1, exactly, access/load stage 2?

This is my first ever question, I have put this question in front of Red Hat Instructors but didn't find any satisfying answers.  I'm using RHEL/CENTOS6, GRUB Legacy 0.97, and have consulted heaps of documentation explaining linux boot process.  Almost all of the blogs, documentation etc. successfully explain the steps involved and the whole process but fail unanimously at as what actually takes place when loading grub stage2.  Here is my understanding of the process and have done a bit of testing as well;   BIOS(not using EFI) reads MBR, finds partition table, and loads GRUB stage1 (first 446 bytes) into memory I have /boot partition under 1024 cylinders, and the idea I have extracted from a bunch of documentation is that GRUB stage1 can directly load stage2 if it is located at some place under 1024 cylinders. Some documentation I have consulted mentions that stage1.5 is located right after MBR before sector 63, while others suggest that it can be anywhere in first 1MB of disk and yet another group claimed that stage1.5 is just a GRUB v2 thing and does not apply on GRUB legacy. GRUB stage2 has all the necessary drivers/modules to read file systems and thus loads kernel and ramdisk and handover control to kernel. Kernel kicks off init on RHEL/CENTOS 6 and systemd on RHEL/CENTOS 7.   I have dumped all the data from the 1st MB of the disk and can confirm that there is nothing except MBR. I get confused as to how 446 byte GRUB stage1 can load stage2 from a file system? According to some images on wikipedia and a few documents, when GRUB is installed, stage1 contains a LBA48 pointed to stage2.  Playing on the fact, I tried to test if systems boots when stage2 in removed or renamed from /boot/grub/ directory. The systems was still bootable even when there was no stage2 in the filesystem.  Will really appreciate if anyone can explain it.


Does a natural 20 on an attack cause a critical hit (even if the attack would have missed)?

I was going over the degrees of success rules in relation to the above question and it's answers and came across a bit of rules that seem contradictory.  (Core Rulebook, General Rules, Checks p445)  You critically succeed at a check when a check’s result meets or exceeds the DC by 10 or more. If the check is an attack roll, this is sometimes called a critical hit. You can also critically fail a check. The rules for critical failure—sometimes called a fumble—are the same as those for a critical success, but in the other direction: if you fail a check by 10 or more, that’s a critical failure. If you rolled a 20 on the die (a “natural 20”), your result is one degree of success better than it would be by numbers alone.  We are, in general, pretty familiar of this concept introduced in the playtest era. However, there are more rules that seem like they may be more specific.  (Core Rulebook, Equipment, Weapons, Attack Rolls p278)  When you make an attack and roll a natural 20 (the number on the die is 20), or if the result of your attack exceeds the target’s AC by 10, you achieve a critical success (also known as a critical hit). If you critically succeed at a Strike, your attack deals double damage (page 451). Other attacks, such as spell attack rolls and some uses of the Athletics skill, describe the specific effects that occur when their outcomes are critical successes.  This second section makes no accounting for "would have been a success/hit", and says that "When you make an attack and roll a natural 20 [...] you achieve a critical success." Does this make attack an exception to the rules that natural 20's only take you one degree higher on success?


Lid popping when I checked for seal the next day

I made peach chutney yesterday, hot ingredients into hot sterilized jars.  Wiped the rims. After submerged in boiling water 20 minutes, and sitting placidly on counter all the jars popped but one.  Today when checking the seals, depressing the center of lid, the one that had not popped on its own, popped.  Now I am not sure if the seal of that jar is good. Is it OK to store it, or should it be used and refrigerated immediately?


What story has a robot that gains psychic power after direct exposure to hyperspace?

I'm looking for a story I read about twenty-five or thirty years ago, in a book I got in a second-hand store. I don't remember the title of the book, which had a number of short stories in it, but in the specific story, there is a  law that a robot's memory must be wiped every hundred years. This robot doesn't want to lose its memories, so it stows away on the outside of a spaceship. The spaceship's entry to hyperspace has some effect on the robot's mind. The spaceship lands on a planet with a corrosive atmosphere, and as the robot moves about the world, it starts getting flashes of schematics every time it closes its eyes. Eventually it realizes that these schematics are actually the schematics of whatever it's looking at, and that by imagining a change to the schematics that it sees, the thing itself is changed. It uses this ability to temporarily disable another robot of the same model as itself (and steal that robot's scheduled body replacement), and it stows away on another spaceship, which it also repairs, and it also actually heals an injured/ill human who is on that spaceship.


ES6 method declaration in constructor vs body?

In ES6 (ECMAScript 2015) you can define a class method either in the constructor or the body, what's the difference?  class Person {  constructor(name) {    this.name = name;     this.sayName = () => {      console.log('hello i am', this.name);    }  } }  class Person2 {  constructor(name) {    this.name = name;  }   sayName() {    console.log('hello i am', this.name);  } }   My guess is, in Person, the method sayName is being recreated each time we instantiate a Person object, and in Person2, we are applying the method to the prototype? (just a guess)


In the alternate timeline in season 9 of Smallville, which we saw via Lois' memories, how did Zod and his followers have powers under a red sun?  Does blue kryptonite cause one to have abilities under a red sun, as Zod and his men were laced with blue kryptonite?  Keep in mind that in this alternate timeline Zod did not receive a transfusion from Kal -El.  So how did Zod and his army have powers under the red sun?


Compute the limit of the sequence ${\textstyle\sum_{k=1}^n}\frac1{\sqrt{n^2+k}}$

I have to compute the limit of this sequence ${\textstyle\sum_{k=1}^n}\frac1{\sqrt{n^2+k}}$ as $n\rightarrow\infty$. First I was thinking about some Riemann sum and and forced the $n^{2}$ outside the square root but the function was not so pleasant.


Running update-manager -d prompts to install 'Focal Fossa' development release. How can I force upgrade to the official non-development release

I'm currently running 18.04 LTS.  I'd like to upgrade my existing machine to 20.04 LTS.  If I enter sudo update-manager -d in the terminal, it finds an updated release (20.04).  When I proceed with the installation the release notes that appear on screen indicate this is still a development release.  Is there a way I can run update-manager -d so it updates and points to the non-development branch release of 20.04?  Or do I simply have to wait?  Thanks


Can I disprove a claim using the contrapositive?

If $x^{ 1/3 } \in\mathbb{R}$ is an irrational number, then $x$ is also irrational.   I want to use the contrapositive to disprove this. The contrapositive would be:  If $x$ is rational, then $x^{ 1/3 }$ is rational.   I am thinking that if I use $10$ as a counter example, then it will disprove the claim. I am not sure that this is the right approach. I am also unsure of whether or not I'll have to prove that the cubed root of $10$ is irrational to make the proof complete.


How do I open a pdf file in a virtual console?

I want to open pdf files from within the virtual console and view them in the console itself. Are there any applications that allow that ?


Java - passing user input data to if / else statement

I am asking the user to input whether they are a teacher or student and use the response to run a menu specific to their answer.   This is what I have so far but even though the input reads out correctly the result is not working in my if/else statement to call the menus.   I am new to java so unsure what is wrong.   public void welcomeUser(){     //dummy read of String to clear the buffer - bug in Scanner class.     input.nextLine();      String userResponse = "";     do {         System.out.print("Welcome! Are you a teacher or student? (please type => teacher or student): ");         userResponse = input.nextLine();         System.out.print(userResponse);      }     while(!userResponse.equals("teacher") && !userResponse.equals("student"));       if(userResponse.equals("teacher")){         runTeacherMenu();     }      else if(userResponse.equals("student")){         runStudentMenu();     }  }


Usage of commas around book and poem titles

My English textbook, Understanding Literature, is boring. My English textbook Understanding Literature is boring.  Robert Frost's poem, Mending Wall, is hard to understand. Robert Frost's poem Mending Wall is hard to understand.


Find the value of : $\lim_{n\rightarrow \infty}\sqrt{2+\sqrt{2+\sqrt{...+\sqrt{2}}}}$

This is a nice limit $$\lim_{n\rightarrow \infty}\underbrace{\sqrt{2+\sqrt{2+\sqrt{...+\sqrt{2}}}}}_{n\text{ times}}$$ and it is solved with well-known trigonometry formulas. The result is 2. The question is: can be, this limit, solved in other ways?  Thanks.


ConcurrentHashMap and Hash table difference

I am new to Java and stackoverflow and am seeking answer from experienced folks, who have worked on Collections Framework.   I read that hashTable is thread safe and so is concurrentHashMap, but a concurrentHashMap is faster than a hashTable, since it gives lock on segments of the map to the accessing threads.   How does this work internally? How is the size of segment decided? Example: if there are 40 entries in concurrentHashMap, and 3 threads trying to retrieve/modify data, how will the segments be decided?   Any images/explanations/code on this would be really awesome. Thanks in advance.


Story involving teenager being recruited to travel to different worlds

I read this story about five years ago (so make it about 2009) and the book (from the library) was reasonably tattered, but I'd say only 5 to 10 years old (this is just a rough guess). This was a novel, I think about 300 pages, but again I don't recall it very well so that could also be completely wrong.  I do remember it wasn't a huge tome though.  Most importantly: the narrative.  This story involved a teenage boy who was recruited by a man on a motorbike to help in some expedition; I think they were part of a group involved in some sort of missions against an evil group (again I can't recall exactly what).  This man (who I think was his Uncle 'Bob' or something like that) took him to a subway station and they only just made it to a portal to another world.  I think I'm missing a huge portion of the story, but at the end I recall they ended up in another world (through a portal of some description).  It was an ice world with a pre-Industrial civilization.  The key part of this novel that was members of this group trying to thwart the antagonists could only use a dog whistle; nothing else from a different world/time period could be used in that place.  This was emphasized regularly and when the main character went to the ice world, he got into considerable grief with his mentor (the Uncle Bob character) for using a torch from his original time period.  I think it was set about the early 2000s.  One last piece of information I recall was that this guy was regularly going on about three girls who were perfect at everything they touched.  He had a crush on one called Courtney.  Sorry for the vague details at the beginning, but hopefully the narrative description could prove useful.  Thanks ;)


I have a null app which is quite annoying, I’ve searched up how to delete it but they all say go to storage and delete it from their but the app isn’t in storage and I haven’t found a way to delete it  iPhone SE iOS 12.0.1


re-enable my com.google.android.documentsui for all users? adb shell command needed!

how do i re-enable a uninstalled system file on my Moto G Stylus XT2043-4? it only shows up on alternate user accounts. and not my main. i knew this was a bad idea. it basically destroyed my allowing external media to be granted editing capability. OTG too ofc. but i found CX File Explorer that forces a choice now in every single "open as" dialog, cause Files.apk was PAINFULLY SLOW, you see? i hated it! my coldboot times are also PAINFUL. i will do a factory reset if i can backup to my 128gb. i know! i know! i can simply just save everything via USB! but my transfer rates are slow as HECK! my Crucial 8gb. 500gb Crucial SSD. Thinkpad W500 is still a potato. i used: pm uninstall -k --user 0 but i put it back with adb shell pm install i believe i used -d and -r or was it -t whoever helps me out, can you tell me what these do? i used chocolatey in it's C:\ProgramData\chocolatey\bin via hold down shift, then right click! Anyway... whatever i did, powershell gives an error of: Unable to open Files.apk Consider using a file under /data/local/temp where is this location? and will it help? whenever i try to reinstall Files.apk? it's not in root directory of C drive or ProgramData. i know i can simply do a factory reset but... i rather wait.


I would like to type something like this: \begin{equation}    \begin{split}      \left( ba ba ba \\      ba ba ba \right)    \end{split}  \end{equation}  But it contains error; I think it's because \left( and \right) should be in the same line. How can I type something like this, but in different lines? I think one of the solution is replaced \left( and \right) by \Big( and \Big). But I am not satisfied with it since \Big( is not "big" enough compared to \left(.


How to save scrollback history in byobu?

I've had an interesting terminal session in , and I'd like to save the terminal output (commands and all) to a file - how can I do that?  According to the :     Ctrl-a ~ - Save the current window's scrollback buffer   This may indeed be doing something, but I've found no indication of where and under what name it might be saved.


Rewiring outlet from half-hot to full-hot

I have multiple outlets in my room where the top plug on the outlet is controlled by a light switch. My objective is simply to make it so that these top plugs are always hot, regardless of the position of the light switch. After turning off the breaker, testing the outlet, and opening the outlet, the job appeared pretty simple: I have the expected ground wire near the bottom and two white wires connected to the left side of the outlet under screws (and connected together by an unbroken brass/copper tab), and on the right side there was a red wire connected to the top screw and a black wire connected to the bottom screw (but the brass/copper tab on this side has been intentionally broken, presumably to allow them to operate independently of each other). Since the top plug is connected to the red wire, and the top plug is the one that's controlled by the light switch, my instinct was that the red wire was my culprit. Therefore, my goal was to remove the red wire and have only black wires going to the right side:  To confirm this hypothesis, I opened up an adjacent full-hot outlet. As I suspected, no red wires were attached, only two white, two black, and the ground (green).  The electrician seemed to make things easy for me. There were two caps, one red and one black. The red had three wires terminating in the cap, one of which was very short (it was this short wire that was connected to the outlet). I just removed this short wire, and left the other two wound together and in the cap.  Similarly, there were three black wires terminating in the cap, one of which was very short (again, the short wire was the one connected to the outlet). I removed the short wire and the cap completely, and just took both of the other two wires and attached them to both of the (newly available) screws.  After completing the wiring, I turned the breaker back on. Nothing alarming occurred (and the breaker didn't trip or anything), but now all of the half-hot outlets in my room are completely non-functional. In fact, the light/fan that were also controlled by other switches in the room is also not working. The other outlets and lights in the room are working normally. My only guess is that I need to get an unbroken brass/copper tab to replace the broken one on the outlet. This is my guess because the adjacent full-hot outlet had an unbroken one, which I saw when I opened it up as a reference. I was very careful to make sure that screws were fully screwed in to prevent a wire from popping out and was careful that uninsulated ground wasn't touching any uninsulated hot (which I imagine would have caused an immediate short/breaker flip if it had).


PYTHON - How to extract sentences containing citation mark from text file

For example, I have 3 sentences like at below where 1 sentence in the middle contains citation mark (Warren and Pereira, 1982). The citation is always in bracket with this format: (~string~comma(,)~space~number~)     He lives in Nidarvoll and tonight i must reach a train to Oslo at 6 oclock. The system, called BusTUC is built upon the classical system CHAT-80 (Warren and Pereira, 1982). CHAT-80 was a state of the art natural language system that was    impressive on its own merits.   I'm using Regex to extract only the middle sentence but it keeps print all the 3 sentences. The result should be like this:     The system, called BusTUC is built upon the classical system CHAT-80 (Warren and Pereira, 1982).


Is there a simple way to flatten a list of iterables with a list comprehension, or failing that, what would you all consider to be the best way to flatten a shallow list like this, balancing performance and readability?  I tried to flatten such a list with a nested list comprehension, like this:  [image for image in menuitem for menuitem in list_of_menuitems]   But I get in trouble of the NameError variety there, because the name 'menuitem' is not defined.  After googling and looking around on Stack Overflow, I got the desired results with a reduce statement:  reduce(list.__add__, map(lambda x: list(x), list_of_menuitems))   But this method is fairly unreadable because I need that list(x) call there because x is a Django QuerySet object.  Conclusion:   Thanks to everyone who contributed to this question.  Here is a summary of what I learned.  I'm also making this a community wiki in case others want to add to or correct these observations.  My original reduce statement is redundant and is better written this way:  >>> reduce(list.__add__, (list(mi) for mi in list_of_menuitems))   This is the correct syntax for a nested list comprehension (Brilliant summary !):  >>> [image for mi in list_of_menuitems for image in mi]   But neither of these methods are as efficient as using itertools.chain:  >>> from itertools import chain >>> list(chain(*list_of_menuitems))   And as @cdleary notes, it's probably better style to avoid * operator magic by using chain.from_iterable like so:  >>> chain = itertools.chain.from_iterable([[1,2],[3],[5,89],[],[6]]) >>> print(list(chain)) >>> [1, 2, 3, 5, 89, 6]


Soql query on parents other child object

I want to write a soql query , My scenario is as follows. I have three objects objectA,objectB,objectC. objectA is the parent object for both objectB,objectC.   objectA - objectB  (Master-detail relationship) objectA - objectC  (Master-detail relationship)`   ObjectB has two fields:   Start_date__c End_date__c   ObjectC has a field:    Date__c   Now i want to retrieve records with date__c in objectC those were in between start_date__c and end_date__c of objectB. how can i achieve such functionality .


Prove that if $I$ is a right ideal of $R$ and $I$ is a direct summand of $R$ then $I=eR$ for some idempotent $e \in R$ Also, $R$ is a unital ring.  So $I$ is a direct summand, this means there is another ideal $J$ of $R$ such that $R = I \oplus J$ and $J+I = R$ and $J \cap I = \emptyset$... I'm a little bit lost here, would appreciate some help!


No Unity desktop after last kernel update

I was using Ubuntu 12.04 perfectly on my desktop until last kernel update (3.2.0-51). After the update process and reboot of the system, the Unity interface didn't start. The only way to login in the system is by tty.  I have tried the last kernel versions available in the computer, but I can't use the graphical interface.  Until the text terminals is impossible to access the unity interface.  If I don't find a solution I will re-install the whole system.


Permission errors with updates on new install

To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details.  andy@andy-Aspire-5750:~$ apt-get update Reading package lists... Done W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted) E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied) W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied) andy@andy-Aspire-5750:~$    Can you please help to decipher this?


need help with /execute to test for a team at a specific y level

Im trying to make a minigame on a server, and im having trouble detecting if a player is at a specific y level, here is what i have. /execute if entity @a[team=Bluesumo] positioned ~ 4 ~  Bluesumo is the team name that you automatically join when you choose that team. Im trying to get a comparator output from the command block and have been receiving nothing. Yes, i am in the bluesumo team. I am in 1.16.4


I have 2 1tb hard drives on my computer with Windows 8 on the first hard drive and nothing on the other.  I want to install Ubuntu 14 on the second hard drive. I've looked up some guides and they all say to install Ubuntu on the sdb partition when booting off a usb stick. I have also seen some say to unplug the Windows HDD and then install Ubuntu onto the second HDD, and Ubuntu will automatically detect Windows and ask what you want to boot into upon boot.   I am really concerned about this - Will it ask me to choose what OS I want to boot into? Is there something like rEFInd(Mac) for Windows? Can anyone please give me a guide on how to do it without ruining my computer?  Thanks


Dataloader Upserting: the Child overwrites the parent

I'm using Dataloader to Upsert a Child Account to Parent Account using an external ID.  When the Upsert is complete, the Child overwrites the parent, it's not not connecting the Child Account to the Parent Account.  ((See Answer Below))


How to let background image cover entire Beamer slide?

I successfully use the usebackgroundtemplate command to set a background image for a specific slide in Beamer as follows    \documentclass{beamer} \mode<presentation> { \usetheme{CambridgeUS} }  \begin{document}  \usebackgroundtemplate{%   \includegraphics[width=\paperwidth,height=\paperheight]{example-image-a}}   \begin{frame}[t] \frametitle{hello} blahblah \end{frame}  \end{document}    However, the image seems to have just covered the main body area, the background of the \frametitle is still white as before. How could I set this image as background for the entire slide? Or at least for the \frametitle as well (just for the slides I want, not for the entire presentation)? Or any better solutions?


Can I add a Decimate modifier on all of the objects at once?

My project has over 7 million vertices, 6 million faces and 12 million tris's.   I'm also new to rendering but it's slowing down my project A LOT.   My scene has a lot of leaves and grass and I bet they are the ones that have a lot of the polygons and are the ones who causes the slowness.   My animation is 800 frames long, and each frame takes ~2-3 minutes to render...   I looked for solutions in the internet, there were some options like: Decimate Geometry; select all vertices and give them a Limited Dissolve option; and for triangle reduction I should do Ctrl+T.   Problem is, there are way too many objects to click and apply these settings manually, is there any way around this? Or maybe there is an add-on that does it all even better?


Book Recommendation For Complex Analysis

I am looking for suggestions in regard to a good first book on Complex analysis, preferably the book will be more so introductory if possible as It will be my first time studying the subject. I am familiarity with calculus and some analysis and algebra.  Even any PDF notes or things of that nature could help, thanks a lot!


Equation of a circle passing through three points $(1,3),(-1,2),(2,1)$

I cant get the final answer of this equation..i tried lot of things but i didnt get the right answer...how to solve this using the equation of a circle passing through three points?


how String.split() method stores the splits?

public class MyClass {  public static void main(String args[])  { String s="this is java"; String name[]=s.split(" "); boolean k; System.out.println(name[1]); k=(name[1]=="is"); System.out.println(k);  }}   in this code i am getting output: is false  why k is returning false ?


Consider a ordered set consisting of $N$ integers. It is called beautiful if for every integer $x$ in the set, either $x-1$ or $x+1$ is present in the set.   How many beautiful sets can be created using the numbers $1$ to $M$ of size $K$ for some arbitrary  $M$ and $K$?  The number of sets created using the numbers from $1$ to $6$ of size $4$ is 6. Ex: (1, 2, 3, 4), (2,3,4,5),(3,4,5,6),(1,2,4,5),(1,2,5,6) ,(2,3,5,6).


Calculate the average value of an array from sharepoint listitem

So I'm getting my listItems with a Camlquery, but i want to calculate the avg of the "price" rows  This is the code I've used so far:  function VisaLista() {     namn = document.getElementById("txtNamn");     var camlQuery = new SP.CamlQuery();     camlQuery.set_viewXml(     "<Where>" +     "<And>" +     "<Eq><FieldRef Name='Title'/><Value Type='Text'>" + namn + "</Value></Eq>" +     "<Or>" +     "<Eq><FieldRef Name='Prioritet'/><Value Type='Text'>Hög</Value></Eq>" +     "<Eq><FieldRef Name='Status'/><Value Type='Text'>Startad</Value></Eq>" +     "</Or>" +     "</And>" +     "</Where>");     listItems1 = list.getItems(camlQuery);     clientContext.load(listItems1);     clientContext.executeQueryAsync(OnSuccessVisa, OnFail); } function OnSuccessVisa() {     var listEnumerator = listItems1.getEnumerator();     var elmt = 0;     while (listEnumerator.moveNext()) {         var currentItem = listEnumerator.get_current();         elmt = (currentItem.get_item('_x0072_zb6'));          var sum = 0;         for (var i = 0; i < elmt.length; i++) {             sum += parseInt(elmt[i], 10);         }          var avg = sum / elmt.length;          document.write("The sum of all the elements is: " + sum + " The average is: " + avg);     }     $("#Kategori1").text = "Medelvärdet för dessa ordrar: " + avg }   I am getting following error     "Cannot get the value length of null - at elmt, line 43


Doubles getting assigned to a List of Integer in java

In the following code snippet:          List<Integer> ints = new ArrayList<Integer>();         ints.add(1);         ints.add(2);         List<? extends Number> nums1 = ints;         ints.add(3);         ints.add(4);         System.out.println("nums1 : " + nums1);         List<? super Number> nums2 = (List<? super Number>) nums1;         nums2.add(5.381);         nums2.add(6);         //ints.add(7.61762); // compilation error         System.out.println("nums2 : " + nums2);         System.out.println("ints : " + ints);   The List of Integer (ints here) is printed as : ints : [1, 2, 3, 4, 5.381, 6] So it seems that something is wrong here ?  Actual O/P :  nums1 : [1, 2, 3, 4]  nums2 : [1, 2, 3, 4, 5.381, 6]  ints : [1, 2, 3, 4, 5.381, 6]   <-- Why 5.381 is fine in List


Binomial confidence interval estimation - why is it not symmetric?

I have used the following r code to estimate the confidence intervals of a binomial proportion because I understand that that substitutes for a "power calculation" when designing receiver operating characteristic curve designs looking at detection of diseases in a population.  n is 150, and the disease, we believe, is 25% prevalent in the population. I have calculated the values for 75% sensitivity and 90% specificity (because that's what people seem to do).      binom.test(c(29,9), p=0.75, alternative=c("t"), conf.level=0.95)      binom.test(c(100, 12), p=0.90, alternative=c("t"), conf.level=0.95)   I have also visited this site:    Which is a java page which calculates binomial confidence intervals, and it gives the same answer.  Anyway, after that lengthy set-up, I want to ask why the confidence intervals are not symmetric, e.g. sensitivity is      95 percent confidence interval:    0.5975876 0.8855583      sample estimate probability: 0.7631579    Sorry if this is a basic question, but everywhere I look seems to suggest that they will be symmetric, and a colleague of mine seems to think they will be too.


Acceptable to do significant work on PhD before officially starting?

This question concerns PhD programs that, unlike most U.S. programs, don't start with a 2 year coursework program. That is, programs where you're expected to do a 2 year master before the PhD and then finish your PhD in about 3 years consisting solely of research. Let's say this concerns a PhD program at Oxford or Cambridge, UK.  I came to this question after reflecting on the fact that some PhD students finish their PhD in significantly shorter amount of time than average. I thought: What if we carry this to the extreme:  Consider the following scenario: Let's say that after obtaining a master's degree, a student spends 3 years working independently on their own research, and produces papers that in amount and quality would be sufficient for obtaining a PhD. Would it be acceptable for this student to simply register for a PhD program, and immediately hand in this work?   In this way, the student is registered for the PhD program for only a very short time (the time required to hand in the work, and do the thesis defence). Therefore presumably the student has to pay tuition only for this short period rather than for 3 years.   This question is not about whether trying this is advisable, but solely about whether universities will accept this.


I write financial applications where I constantly battle the decision to use a double vs using a decimal.  All of my math works on numbers with no more than 5 decimal places and are not larger than ~100,000. I have a feeling that all of these can be represented as doubles anyways without rounding error, but have never been sure.  I would go ahead and make the switch from decimals to doubles for the obvious speed advantage, except that at the end of the day, I still use the ToString method to transmit prices to exchanges, and need to make sure it always outputs the number I expect. (89.99 instead of 89.99000000001)  Questions:   Is the speed advantage really as large as naive tests suggest? (~100 times) Is there a way to guarantee the output from ToString to be what I want? Is this assured by the fact that my number is always representable?   UPDATE: I have to process ~ 10 billion price updates before my app can run, and I have implemented with decimal right now for the obvious protective reasons, but it takes ~3 hours just to turn on, doubles would dramatically reduce my turn on time. Is there a safe way to do it with doubles?


How to convert Australian grade to US GPA?

I am wondering how to convert Australian grade(HD, D, C, ...) to US GPA (A+, A, B, C ...) I tried few websites but those showed me which I think of as "too good to be true" results.  For example, according to the website I used, a grade of C in Australian grading system is equivalent to B grade in US.  Is that realistic? and is there a formula to convert ?


PHP I create a double variable then test it for equality and it does not match?

I can't figure out why this simple math does not work. Maybe something about PHP and numbers I am not getting?  $step=1.0;  $step+=0.1;  $substep=$step-(int)$step;  echo gettype($substep);  echo $substep;  if ($substep==0.1) {       echo "should be here";  } else {      echo "but I end up here";  }      OUTPUT: double0.1but I end up here


GroupBy on comma separated String read from a file

I am reading a CSV file and want to group records using 17 th column. I want all the rows corresponding to a key as a list/Array but i am getting somthing Else. Please help void   read_CSV_file(String path )     {         Stream<String > file_data_by_lines = null;          try {             file_data_by_lines = Files.lines(Paths.get(path)) ;         }         catch (IOException e) {             e.printStackTrace();         }          Map temp =file_data_by_lines.map(x-> (x.split(",")))                                             .collect( Collectors.groupingBy(x-> x[17], Collectors.toSet()));            temp.values().stream().forEach(System.out::println);       }  i am geting output as below :  [[Ljava.lang.String;@7a46a697, [Ljava.lang.String;@6d86b085, [Ljava.lang.String;@68f7aae2, [Ljava.lang.String;@4141d797, [Ljava.lang.String;@5f205aa, [Ljava.lang.String;@7530d0a, [Ljava.lang.String;@2a3046da, [Ljava.lang.String;@75828a0f, [Ljava.lang.String;@2f410acf] [[Ljava.lang.String;@2401f4c3, [Ljava.lang.String;@3b6eb2ec, [Ljava.lang.String;@2d363fb3, [Ljava.lang.String;@21bcffb5, [Ljava.lang.String;@566776ad, [Ljava.lang.String;@34c45dca,  [[Ljava.lang.String;@1d251891, [Ljava.lang.String;@1edf1c96] [[Ljava.lang.String;@28f67ac7, [Ljava.lang.String;@129a8472]  Problem Solved by using following code , temp.values().stream().forEach(x-> System.out.println(Arrays.deepToString(x.toArray())));


Holomorphic function satisfying $f^{-1}(\Bbb R)=\Bbb R$ is of the form $f(z)=az+b$

Let $f$ be a holomorphic function defined on $\Bbb C$ such that $f^{-1}(\Bbb R)=\Bbb R$. Prove that there exists $a,b \in \Bbb R, \; a \neq 0 \;$ such that $f(z)=az+b \;$ for every $z \in \Bbb C$.  I was given a hint: define the function $g(z)=\frac{f(z)-f(0)}{z}$. such $g$ is also holomorphic in $\Bbb C$ since the only singularity is in $0$, and it is a removable singularity since we can define $g(0)=f'(0)$. Next I thought about proving $g$ is bounded, and thus constant (using Liouville's theorem), but pretty much out of ideas. How can I finish the proof/solve in another way?


date() function is not returning proper time

I am using date() function in the format date('Y-m-d H:i:s'). It shows 2013-11-22 06:26:25 when the actual time is 2013-11-22 11:56:25. My code,  echo    $today = date('Y-m-d H:i:s');


I am trying to create a script that checks for two parameters. So far this is the code I have:  #!/bin/bash   portFile=$1 file=$2  if [ -z “$portFile” ] || [ -z “$file” ] then echo “Não tem parâmetros suficientes” else   The user input should be something like this:  portscanner.sh -n 80 -h hostfile.txt portscanner.sh -f portfile.txt -h hostfile.txt   My questions is how can I make sure that the first parameter is either -f or -n and make sure that the second one is -h with the file? thank you.