i want to calculate the p-value of a statistics test using R. I'm aware of the existing function t.test(x) but what i want to do is to determine the p value through monte carlo simulations. Therefore i defined this code:  mean.test <- function(x, y, B=10000, alternative=c("two.sided","less","greater")) {  p.value <- 0 alternative <- match.arg(alternative)  s<-replicate(B, (mean(sample(c(x,y), B, replace=TRUE))-mean(sample(c(x,y),  B, replace=TRUE)))) # random samples of test statistics t <- mean(x) - mean(y) #teststatistics t     p.value <- 2 * (1- pnorm(mean(s)))   #try to calculate p value   data.name <- deparse(substitute(c(x,y))) names(t) <- "difference in means" zero <- 0 names(zero) <- "difference in means" return(structure(list(statistic = t, p.value = p.value, method = "mean test", data.name = data.name, observed = c(x,y), alternative = alternative, null.value = zero), class = "htest")) }   When running   > set.seed(0) > mean.test(rnorm(1000,3,2),rnorm(2000,4,3))   this is supposed to return       mean test data: c(rnorm(1000, 3, 2), rnorm(2000, 4, 3)) difference in means = -1.0967, p-value < 2.2e-16 alternative hypothesis: true difference in means is not equal to 0   this return this though:          mean test  data:  c(rnorm(1000, 3, 2), rnorm(2000, 4, 3))  difference in means = -1.0967, p-value = 0.9999  alternative hypothesis: true difference in means is not equal to 0   What's the error ?


I hold both US and UK passports but will reside in the UK for the duration.  I just wanted to know if it is OK to enter the US on my US passport but leave only showing my UK passport when i return to the UK?  i.e. only show my US passport at Heathrow and only show my UK passport at JFK.  Thank you.


Earliest use of "book," the slang verb meaning "to leave quickly"

"Book," the slang verb meaning to leave quickly--has anyone found it used prior to the 1840s?  I found it used in chapter 143 of Varney the Vampire: "[I]f the old watchman comes round, we may have to book it . . . "   Also, does anyone know if book is a regional expression?  I first heard it in the mid-1970s in rural central Alabama along among the students when I was in sixth grade.


I was working on some code made by someone else and came across in if statement that looks like this      IF($res === true){     do_something();}  This code is called many times and seems to be working.  What is it doing?  I know one equals is assignment and two is comparison.  What does the three equals sign operator do?


In SQL, how can you "group by" in ranges?

Suppose I have a table with a numeric column (lets call it "score").  I'd like to generate a table of counts, that shows how many times scores appeared in each range.  For example:   score range  | number of occurrences -------------------------------------    0-9       |        11   10-19      |        14   20-29      |         3    ...       |       ...   In this example there were 11 rows with scores in the range of 0 to 9, 14 rows with scores in the range of 10 to 19, and 3 rows with scores in the range 20-29.  Is there an easy way to set this up?  What do you recommend?


Why does JavaScript's map and parseInt function return NaN every other call?

When running  ["6", "1", "0", "3", "3"].map(parseInt)   in the JavaScript console in my browser, I get the output  [6, NaN, 0, NaN, 3]   !  But I was expecting  [6, 1, 0, 3, 3]   .  It seems that this might have to do with the fact that parseInt can accept two arguments instead of one.  I was under the impression that map merely called the given function on each element of the array separately.  Can somebody clarify how map works and why it leads to this odd behavior?


Some time ago, I noticed some of my programs stopped working because of error 0xc000007b. After researching a bit, I traced the source of the problem to two files: msvcr100.dll and msvcp100.dll . The 32bit versions of these files got switched (somehow) by their 64bit versions in the System32 folder, causing many programs to crash instantly. Is there a way to download or obtain the 32bit versions of these files so I can change them?  PS: I already tried reinstalling Visual C++ 2010 Redistributable (x86 and x64), and it did not work.  PPS: I found out about the two file by using depends.exe on a program which was not working. It should that the program used many x86 libraries, but the two files above were x64 and inside system32.


How do i make 2 inputs case insensitive in c++?

cout << "Please enter colors for the two cuboids: " ; cin >> color1 >> color2;   if ( color1 == color2)     cout << "Color names cannot be the same, good bye..." << endl;  Like here I need to check if color 1 is equal to color2 for example rEd and RED should be considered the same but I should not use for loops to solve this is there any other way?


Are there any disadvantages to funding a HSA with post-tax dollars (taxable account) as opposed to pre-tax dollars (i.e. payroll deduction)?  My understanding is that you can still use Form 8889 to deduct the amount of your post-tax contribution (up to the total HSA contribution limit for the year) from your income.  How about FICA (OASDI and Medicare) taxes?


Textbooks on linear regression with least squares

I watched several videos on linear regression, mainly from . As I have no background in statistics, I thought this was a good way to get an idea of the topic. However I'm currently writing a bachelor thesis on Structural Equation Modeling and I want to get a deeper understanding of Regression Analysis.  The Book should roughly include these topics:   linear least squares regression variance, covariance regression coefficient coefficient of determination residual analysis (esp. leverage effect) multiple regression   I especially enjoyed the videos on khan academy, of the proof of minimizing the squared error to the regression line or illustrations like this one from Wikipedia:    I don't like it when books only present a formula and some common rules etc. without any further explanation of these.  F.e. Residuals should be normally distributed.  However I'm also not comfortable with strictly mathematical books, so I'm searching for something in between. A plus would be example code in R, but definitely not a must have.


Changing a variable created outside a function within a function using Python

I am trying to change the value of player_score, cpu_score, and ties which were created outside the function determineWinner but I get an error such as this: UnboundLocalError: local variable 'cpu_score' referenced before assignment.  I have deleted the other assignments (player_score=player_score+1 and ties=ties+1) and added the print ("Player Score",player_score) to test the program.  I don't understand is why  print ("Player Score",player_score) outputs the value assigned outside of the function but cpu_score=cpu_score+1 yields the "referenced before assignment" error.  Also showRolls does what it is supposed to.  It seems that the functions can read the values of the variables assigned outside of the functions but can not change the values.  Why is that?  import random  def showRolls():     print("Player 1 roll:",player_roll)     print("CPU roll:",cpu_roll)  def determineWinner():     if player_roll > cpu_roll:         print("Player wins!")         print ("Player Score",player_score)     elif cpu_roll > player_roll:         print("CPU wins!")         cpu_score=cpu_score+1     else:         print("It's a tie.")  #-----------------------MAIN PROGRAM------------------------------------ player_score=0 cpu_score=0 ties=0 player_roll = random.randint(1,6) cpu_roll = random.randint(1,6) showRolls() determineWinner()


What does it mean to sample a data point from or according to a distribution?

I know this is an extremely basic question, but I have never had a course on statistics or applied probability. The only probability I had was in a measure theory course. Now I am doing machine learning and I am seeing the phrase "sample data from distribution" everywhere, and I have only a very vague idea as to what it means.   Part of the problem is that sampling sorts of defies everyday intuition. Suppose we want to "sample from a uniform distribution" which means to me "choose things at random". Can this really be done?  Suppose you place several balls in a line and tell a person to pick one "at random", I think intuitively, most people will either pick the first, or the last one or in the middle but not somewhere in between. In other words, our idea of random as experienced in everyday life is not "mathematically random", because there are behavioral patterns we can observe. This is also why if you tell conduct experiment telling a group of people to pick a number between 1 to 10, the most common answer is not 3, or 8, but something like 5.  So I don't understand sampling because it is not my everyday experience. I have never truly seen someone sample anything with a uniform distribution, let alone a Gumbel, Gaussian or Geometric or some other distribution. Reality aside, how would this be done numerically. Suppose I present you the statement:  "We sample data $x$ from a Gaussian distribution"  What does this mean exactly?  A distribution is the probability density of a random variable, a mathematical function it tells me the probability of finding a data point $x$ over an area. All it provides me is a very vague idea as to how the data may look like, i.e., where I am most likely to find a data point. A probability density function doesn't tell me at all how many data points are there, where they are placed exactly, etc.  Now what does it mean to sample a data, mathematically speaking? What is actually done when "picking a data point from or according to a distribution"?  Finally, data points generated from experiments are always finite, and always discrete. There is probably nothing in nature that is continuous or with uncountable cardinality. Sure, we can model the distribution of these data points via a continuous probability density function. But isn't the the probability of finding any point is zero according to a Gaussian i.e., $\Pr[X = x] = 0, X \sim \mathcal{N}(\mu,\sigma^2)$?. So wouldn't it be impossible to "get" any point according to a probability distribution, since you never know exactly where they are?   Can someone show me how you would actually "sample from a distribution"?   As a hypothetical scenario, I have $20$ data points, $x_i \in \mathbb{R}^2$, I put them somewhere on the Euclidean plane. Suppose you have no idea about their location, all you know is a probability density model of these data points generated from some algorithm. Actually, let's make it harder: you also have no idea about the dimensionality or the number of data points. Now I say, sample a data point $x_i$ from these $N$ number of data points via the "insert name here" distribution and return that point $x_i$ to me, and prove it to me that you have sampled this data point from the distribution you claim it was sampled from. How would you actually do it?


The observable universe is approximately 13.7 billion years old. But yet it is 80 billion light years across. Isn't this a contradiction?


What is the name of this plant which is located in Hyderabad city of Telangana State,India?

I found this plant in Hyderabad city of Telangana State,India.Many people of Hyderabad city have planted this flowering plant.I don't know the name of this plant.If it's flower treated as a circle,the flower has diameter of nearly 6cm length.Can any one tell me what is the name of this plant?


Identify a TV show that involved dimensional travel?

I'm looking for the title of a show I saw when I was a child. I'm not sure what year it was made, but it could have been anything before 2000, really. I remember some overall plot features and details about a few episodes.  Overall Plot: The main character was a white male, probably in his early 20s. There was also an old man, a woman who was also probably early 20s, and some sort of small alien creature that I don't believe spoke english. Together these people travelled to different dimensions/through space (I think) on a ship.  They were being persued by a black male, probably about 30-40s who wore some kind of red armoured suit. Initially you believe him to be the bad guy, but I think there was a reveal where it turned out he was the good guy and the old man was the bad guy.  The following are some episodes, or parts of episodes, that I vaguely remember:  1) An episode that featured a character that was a human sized rag doll, possibly raggedy anne? I believe there were multiple 'toy' people.  2) An episode where the woman ate a piece of mushroom she found, which then turned out to be part of a 'mushroom person' and she fell ill  3) At some point the guy in a red armoured suit got trapped on a desert planet and couldn't get up. He tricked some wild old woman into helping him up and then he escaped?    NOTE: I am a big scifi fan. I have seen all of the big tv shows like Dr Who, Sliders, Star Trek, Red Dwarf, etc. It is not one of them. It is not going to be a big show, I wouldn't be surprised if it's one of those shows that had like 10 episodes and then got cancelled. I saw this in England in the early 2000s, probably on the SciFi channel, but I have a feeling it was either American or Canadian made.  I read a lot of science fiction as well, so I'm pretty sure it's not some sort of adaption of a popular scifi novel, so it's probably either an original piece or adapted from a relativley obscure source.


How does the logarithm returns the number of digits of a number?

A number written in base b is a polynomial $\sum {(a_i*b^i)}=a_n...a_3a_2a_1a_0$  The logarithm in base b of the number gives the number of digits (up to with a constant=1 difference), and I want to understand how it does that. Note that as the base gets smaller, the result gets more precise.  I want to understand how the logarithm processes each element of the polynomial to get the result.. The entire process, and not a rough approximation.  I made a program that composes the text of a Taylor series for log(1+x) with a polynomial with 10 terms, but the result is a text file with hundreds of Mb, so it is unreadable.  I understand that the largest term is approximately $n+log_b(a_n)$, but I want a more precise understanding. A rough explanation based on bounds is what I already know. I have no interest on that, unless it is part of the entire explanation.


She was holding a green beans bag and accidentally dropped it.  The beans were all over the floor.  My son saw it and told me,     "She spilled the green beans."   I always saw this word use for water, milk and soup.  Could it be use for green bean?


Is there a way to determine if photo was taken at sunrise or sunset?

When I look at photos of sunrise respectively sunset and do not know the cardinal direction I'm not able to identify if this photo was taken on sunrise or sunset. So I ask myself the question is there a way to determine? Maybe color temperature of sky, color of the sun or something like this (consider photo no color shifts by post processing).


So I have to proof that for an element $A$ of $M_{m\times n}(K)$ r an  element of $N$, $rk(A)\leq r$ if there are two matrices $B$ element of  $M_{m\times r}(K)$ and $C$ element of  $M_{r\times n}(K)$ with $A=BC.$  I would be very happy if someone could help me.


When is `_` dropped out of the environment?

$ bash --norc $ export | grep '_=' declare -x _="/bin/bash" $ export | grep '_=' $    What happens to _? Is it dropped out of the environment immediately when?   This is related to my other question, "".


How to fix black screen after Intel Graphics Installer on 14.10?

I upgraded 14.04 to 14.10 without issues. Then I installed fresh video drivers with Intel Graphics Installer without any errors. But after reboot I have black screen with blinking cursor.  After that, I tried to:  sudo apt-get remove --purge intel-linux-graphics-installer   but it didn't help. What should I do to revert the driver installation or somehow fix the driver?  Update: I also made everything like said in  and everything has done well, but blank screen still there.


Can you add optional desktop notifications for new inbox items?

I'm getting real tired of noticing new answers or comments to my questions hours after they were posted because I minimize StackOverflow and resumed working. According to 's answers you're never going to implement instant email notifications, so could you at least give me a sound notification or desktop notification when new inbox items appear? You can even make it optional! Everybody wins.  This would literally just take a few minutes of coding to implement. You already have the events in place, and you've already set up desktop notifications for chat. Come to think of it, I could probably write a Tampermonkey script for this.  My point still stands though. Please consider this.


I upgraded my ubuntu from 11.04 to 11.10 via mounting the latest alternate CD image released on Oct. 13 as the final standard version and running the cdromupgrade prompt successfully, with full latest upgrades installed before ending the distribution upgrading process and rebooting. After reboot, the new lightdm showed up as expected, and I could choose the login shell from a menu containing "ubuntu", "ubuntu 2D", "recovery console", "kde workspace", "cairo-dock with effects", "cairo-dock without effects", etc. next to my name which corresponds to my username.  HOWEVER, for example, I chose "ubuntu" (as the default selection) and input the correct (if not correct, the lightdm would ask you to input again, but it did not do so, I have tried) password and entered. The screen splashed to the black screen of the background text interface of gdm for a very short interval and then returned back to the interface of lightdm without my user account logged in and appeared as if I have not done anything on the laptop. Neither could I log in as a guest user as the same black screen splashed and lightdm reappeared.  Before the upgrade, I could run gnome 2, kde, unity all quite well on the laptop, but the status quo is that no one from the menu prompt beside my name can log in to my account, including the "recovery console".  Actually I can switch to the ttys and log in my account with my username and passcode normally, as can run all commands in the tty (I am currently doing this). I can also act like a superuser via the "sudo" command and get a # prompt via the "sudo -i" command, with the correct password, no problem.  In the root prompt, I can run "service lightdm stop" and "startx" to a root unity UI successfully (that is the way how this passage comes out), but in the $ prompt, after running "service lightdm stop" and "startx", it simply appears "No protocol specified" endlessly and no GUI appears.  I found the package "gnome-shell" not fully installed and fixed it, but it did not help, simply resulting in a selection in the menu which cannot access my account as its companions.  I have made all the packages in my laptop up-to-date and no updates should be installed.  My device is ThinkPad X61, with all its functions running well on all previous ubuntu distributions since 10.04 LTS. I had upgraded my os from 10.04 LTS to 10.10 in the way I performed today without any unexpected results one year ago.  I suspect it is the newly integrated lightdm that set these obstacles, and I want to get this bug fixed, please help!


Can I unsubscribe from a question's notifications?

I answered a question on Stack Overflow and the user keeps asking for more and more help. Can I opt-out from notifications of that particular question?


Suppose we draw cards out of a deck without replacement. How many cards do we expect to draw out before we get an ace?


Command under /snap/bin cannot be found in terminal, despite it being in the PATH

I'm trying to execute the lxd command from the /snap/bin directory. I have added it to the user .bashrc, .zshrc, and /etc/environment. When I echo $PATH I get the following output: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/snap/bin:/home/duke/.local/bin:/home/duke/snap/bin  I can execute the command with my user permissions, however it just tells me I need to run the command in root. So if I try with sudo I get the following result: sudo: lxd: command not found                                          Which prompted me to add the /snap/bin directory to the root path, .bashrc, and .zshrc. After doing so I can access the command via the root account but my intention was to use my own account rather than the root account to execute the lxd command. I rather hoped that adding the snap/bin directory to the root path would solve my problem, but it doesn't. In fact the only way I can use those commands with the sudo prepending said command it by directly addressing the command, i.e: sudo /snap/bin/lxd  Which isn't satisfactory. How do I get the commands located in the bin directory under the snap directory to work as any other command under '~/.local/bin' or '/usr/bin' would? Thanks in advance.


20 hour layover at London Heathrow. Do I need a transit visa to go to a hotel outside airport ?

I am an Indian national(Indian passport) traveling from Bangalore to US with a student F-1 visa. I have a 20 hour layover at London Heathrow. I will arrive at 1pm in LHR and leave for US the next day at 9:30am and I plan to stay at a hotel outside the airport during this time to get some sleep. So will I get the transit without visa(TWOV) for my case ? Also, will I be able to do some sighseeing while going to the hotel ?  In any case, will I be denied to get out of the airport and stay at a hotel ?


A question on p-groups, and order of its commutator subgroup

$\textbf{QUESTION-}$ Let $P$ be a p-group with $|P:Z(P)|\leq p^n$. Show that $|P'| \leq p^{n(n-1)/2}$.  $\textbf{TRY- }$  If $P=Z(P)$ it is true. Now let $n > 1$, then  If I see $P$ as a nilpotent group and construct its upper central series, it will end , so let it be,  $e=Z_0<Z_1<Z_2<......<Z_r=P$   Now as $Z_{i+1}/Z_i=Z(P/Z_i)$, so if if I take some $x\in Z_2$\ $Z_1$ then $N$={$[x,y]|y\in P$} $\leq Z_1(P)$ and $N \triangleleft P $, so $P/N$ is a group with order $\leq p^{n-1}$.  Now if I let $H=P/N$ then obviously |$H/Z(H)$|$\leq p^{n-1}$.  Now $H'\cong P'N/N \cong P'/(P' \cap N)$ so from here I could finally bring $P'$ atleast into the picture, now |$P'$|=$|H'|.|P'\cap N|$ so $|P'|\leq |H'||N|$.   This is where I am $\textbf{STUCK}$  Now , from here how can I calculate or find some power $p$ bounds on $|H'|$ and $|N|$ so i could get my result.


Where does the term "cold calling" originate from?

Did it exist before The Telephone - has it always been associated with 'sales'?  Here is .


Is there an easy way to iterate over an NSArray backwards?

I've got an NSArray and have to iterate over it in a special case backwards, so that I first look at the last element. It's for performance reasons: If the last one just makes no sense, all previous ones can be ignored. So I'd like to break the loop. But that won't work if I iterate forward from 0 to n. I need to go from n to 0. Maybe there is a method or function I don't know about, so I wouldn't have to re-invent the wheel here.


What is the difference between diffraction and interference of light?

I know these two phenomena but I want to know a little deep explanation. What type of fringes are obtained in these phenomena?


What happens to the energy when two waves completely interfere destructively?

this question has been asked many times and none seem to completely answer or i am unable to understand the answers  So let us consider two mechanical transverse waves traveling in opposite directions on a string let us further consider the moment where they interfere destructively  at the moment when they interfere we see the string as if nothing happened then what happened to energy ? where does it "hide"?


I am revising calculus from previous years and I have one problem I had problem with. Here it is: Using the limit comparison test check convergence of $$\sum_{n=1}^{\infty}\Big(1-n\sin\Big(\frac{1}{n}\Big)\Big)$$ I tried using trigonometric identities but with no satisfactory results.


I am working with a small company that purchases the XP downgrade when they order there computers from dell. They then apply an image to the systems, and need a CD key when it is finished. Unfortunately because it is a downgrade they only have the Vista Business sticker. I have asked Dell for the key but this is generally a 4 to 5 hour process of talking to them until they agree to supply the key to me. Is there an easier way? (that is legal)


i tried making a program that executes X minutes after the user gets to that point in the code. i thought of making a variable for the minutes and making another variable wich is that +X. and than a while loop. but if you have 10 minutes for example and the current time is 12:53 that is not going to work as well.


$a = '35'; $b = '-34.99'; echo ($a + $b);   Results in 0.009999999999998  What is up with that? I wondered why my program kept reporting odd results.  Why doesn't PHP return the expected 0.01?


Can I check-in a 203 cm suitcase on a flight that starts with Japan Airlines and ends with Air France?

I bought flight tickets from Air France to travel from Israel to Japan and back. On the flight back, the first leg (Tokyo Narita >> Paris CDG) is operated by Japan Airlines, then the second leg (Paris CDG >> Israel BG) is operated by Air France.  Both companies have different baggage rules. JAL allows 2 checked baggages per person, with a total linear dimension of 203 cm, while AF allows 1 checked baggage per person, with a total linear dimension of 158.  When I check my reservation details on the AF site, it simply says that I'm allowed 2 checked baggage items on the flight back, so I don't suppose the number of suitcases will be a problem. But I am worried about the dimensions - 203 cm is quite a bit larger than 158 cm. If I check in a 203 cm suitcase in Tokyo, will it cause problems when they transfer it to the AF plane?


Link between wave functions $\psi$ and state vectors $|\psi \rangle$ in quantum mechanics?

I'm currently following a course in quantum mechanics that uses Griffith's textbook.  Griffiths shows that wave functions are members of a Hilbert space. Since this is an abstract vector space, we can assign a state vector $|{\psi}>$ to each wave function $\psi(x)$. Since our course on linear algebra runs pretty deep, this I understand.  Griffiths subsequently defines the inner product between two state vectors $<\phi|\psi> = \int\phi^*(x)\psi(x)dx$, and he derives all sorts of fun things from this inner product; that the function $\psi(x)$ corresponding to $|\psi>$ is the wave function as seen previously in wave mechanics, and that its Fourier transform determines the probability density of momentum.  At this point, something happens in both Griffiths and my course that I don't quite comprehend. Both my instructor and the book mention that at this point, the vectors will take precedence above the functions; all quantum mechanical information is from now on fully and completely recorded into the vector. The functions are simply a representation of this vector; one of the many possible representations. Am I correct in saying this?  But Griffith's proof that the coefficients in the position basis of $|\psi>$ form the values of the function $\psi(x)$ is completely based on the definition $<\phi|\psi> = \int\phi^*(x)\psi(x)dx$. How should I then read this? Does he assume that there is a function representation $\psi(x)$ corresponding to the state vector $|\psi>$ (which is in his right, since $L_2$ is isomorphic to the vector space), to subsequently derive the properties of this function?   To me it just seems really strange that we have these abstract state vectors, only to define the inner product in terms of one very specific representation of that vector.  Edit 6 February 2019: I can (for obvious reasons) not unmark this question as a duplicate, but I can "edit to explain why my question hasn't been answered before." My question is not about whether the ket psi and the wave function are the exact same--I have written in my question that I understand that the wave function is a representation of the ket (in other words, I've used the answer to the duplicate question to ask my own question). My question is why in so many derivations, it appears that the wave function formulation takes precedence (in e.g. the definition of the inner product). In the answers below, it has been explained that there is no precedence, and that this is simply a shortcut in the theory.


Consider: \documentclass[12pt]{article} \usepackage{tkz-euclide,tkz-fct} \usetkzobj{all}  \begin{document}  \begin{tikzpicture} \tkzInit[xmin=-3,xmax=3,xstep=1,ymin=0,ymax=.4,ystep=0.2] \tkzDrawX[right=3pt,label={$Z$}] \tkzLabelX[step=1] \tkzFct[thick,color=blue,domain=-3:3]{1/sqrt(2*pi)*exp(-0.5*\x**2)} \tkzDrawArea[color=red!50,domain=-1.439531:1.439531] \tkzText[color=black](0,0.15){85\%} \tkzDefPoints{1.439531/-0.2/A,1.439531/0/B, -1.439531/-0.2/C,-1.439531/0/D} \tkzDrawVectors[red](A,B C,D) \tkzText[below=3pt,color=red](A){$z^{*}$} \tkzText[below=3pt,color=red](C){$-z^{*}$} \end{tikzpicture}   \end{document}  For some reason, this produces the following image where the area slants up on the left.  Can anyone see a problem with my code or is this a bug? D.


Can I correct a mistake that the reviewers didn't spot in a paper that has not been accepted yet?

Recently my paper was accepted pending major revisions (i.e., not yet accepted), and while following the reviewers' comments and revising my paper, I realized that both reviewers missed a mistake that I made in a function block diagram. What should I do?   Correct it and let them know in the joined point-by-point response? Wait until they tell me about it?  Ask them to double check that diagram?   I'm afraid it may send the wrong message and I'd look disrespectful by showing them that they missed the mistake.


Cant Create folder with full permission on ubuntu 14.04

I having a weird problem on my VPS with Ubuntu 14.04 as the server. I tried creating a directory with php mkdir using the code below  <?php      mkdir("/items/foldername", 0777, true); ?>   Whenever i run this script,the folder gets created but with 755 permission instead of 777.  I have tried all available options I can see none is working. My php script is using www-data.   I have tried the following   sudo chmod -R 777 items  sudo chmod -R g+s items I added www-data to the root group


I'd like to add custom fields to a certain category. A category only has the following fields:  Name:  Slug:  Parent:  Description:  Since I have a TV Series Site, I want to add some more fields, I want something like this, when I create a new category (Category=Series)  Name:  Artist:  Year:  Type:  Genre:  Summary:  Slug:  Parent:  Description:  And so on...  Any help please? Thanks in advance.


Number of Homomorphisms from $\Bbb{Z}_m$ to $\Bbb{Z}_n$

This question coutesy of Allan Clark's "Elements of Abstract Algebra" (60$\zeta$).   Find the number of homomorphisms from $\Bbb{Z}_m\to \Bbb{Z}_n$ as a function of $m$ and $n$.  This is stumping me, can anyone help?


Ensure packet owner from connection is the authentic user

In a multiplayer game, how can you be sure that the IP from a packet is the real IP? By spoofing I could send, for example, a "suicide packet" which tells the server that the owner of said packet wants to destroy its avatar when in reality I faked it.  Do games just give up on this aspect?


Why does “today’s lesson” seem to be possessive?

Why do we say the following?        I'll have an hour's wait at the airport      Today's lesson      Yesterday's programme    Two weeks' worth of groceries.      They are not possessive, or are they? Why is the possessive apostrophe used with time expressions and adverbs?


How to interpret this output from MegaCli?

/opt/MegaCli -CfgDsply -a0 | less     RAID Level          : Primary-1, Secondary-3, RAID Level Qualifier-0  Almost positive this is not running a RAID3, my guess is a RAID 10, where "Primary" means what is being done in the "spans" (span being Mega Cli term for the first RAID operation blocks) and then the "RAID Level Qualifier" is the RAID level operation being done on top of the spans, and finally, "Secondary-3" means that there are 3 spans being RAID0'd across. This interpretation matches the disk space sanity checks, indeed the total capacity of the array is that of three physical drives. However, this interpretation and output syntax is convoluted to the point where a clarification is definitely needed.


I am working in blender and planning to create a character where the hair changes from black to white. I want to make an animated video which shows the change happens from the beginning of the hair, gradually to the end. I took the idea from the Disney animated movie, Tangled, when Rapunzel’s hair glows in a gradual way.Thanks for every help;))


I had a J1 trainee visa, can I go to Canada and come back with an ESTA?

I'm from Italy and I had a J1 visa for the US for a year and a half. Now it's expired (I'm in the grace period) but I want to stay longer in California to travel a little bit, because this year I did this trainee-ship and I didn't have the possibility to visit all places that I wanted to.  The question is: Can I go to Canada and come back to the US with an ESTA? I'm not subject to the two years rule to go back to Italy? Is it risky after a J1? Do they believe me? How can convince them that I want to travel a little?   Is it easier to do this via Canada than Mexico? My lawyer said yes but I want to be sure.


While trying to install SQL server 2012, I get the error: "SQL server language media doesn't support the language of the OS"  I've downloaded the SQL server 2012 in English language only (2 times to make sure due to this silly feature/bug) and the Format dropdown in Control Panel Regional Settings is English only.  Attached is the error that I get:    I already followed this link:   My Windows Server 2012 is a fresh install. No DB has ever been installed. Please suggest what should I do? Should I download the whole 5 Gbs 3rd time or any better option? Thanks Microsoft!


How to compile and install custom mainline kernel

I'm running Ubuntu 15.10 on a new laptop but in order to get proper full support for this hardware I apparently need the 4.4 kernel + a custom patch. See  if you're interested in the details.  I know about the mainline kernel PPAs but my understanding is that they don't come with source. If this is the case, This would seem to eliminate the possibility of using a mainline kernel PPA because I can't patch it. So I've been trying to check out the git source and build it but can't find up to date, relevant instructions.   Can somebody help with instructions for building a 4.4 kernel on 15.10?


For numbers divisible by three, why is the sum of their digits able to be divided by three?

When you add the digits of any number that is divisible by three, that sum of those digits also appears to be divisible by three (with no remainder).  For example a number (which I randomly grab from the top of my head):  289752  whose digits sum to 33 (2+8+9+7+5+2=33)  That sum 33 is divisible by three and so is the original number 289752.  This is not the case when dividing by 2, for example 12 is divisible by two but when its digits are summed (1+2=3) you receive 3 which is NOT divisible by 2.  I have yet to be able to find a counter example for this phenomenon of division by 3.  Why does this happen?


What is the meaning of the shapes of various orbitals of the atom?

I understand that the orbitals are a 3D contour inside of which there is a certain probability ( for example 90% ) to find the electron ( this is my understanding of it, so correct me if I am wrong ).  Now, I want to know the meaning of shapes like that of p-orbital. They are dumbbell-shaped ( sort of ) and are located on the x-, y- and z-axis. But aren't the axis completely arbitrary. Since the axis are arbitrary, we should expect only shapes that remain invariant upon any kind of rotations of the axis. The only thing that fits in that criterion is the spherical shape (or s-orbital).  So, what is the meaning of the non-spherical shapes of various orbitals, in the context I have mentioned above?


how to calculate the value of Z ?      $$z^4 = -1$$   Can anyone help me with this problem here.


How to create a directory for everybody?

I have a lot of music that I want to share with and on all the accounts on my Ubuntu Linux box. I created one in /usr/share/usrmusic changed the user and groups to userx:users and the permissions to   drwxrw-rw-    3 userx users  4096 Oct 26 12:20 usrmusic  under a different user I can not get into the directory   It is now highlighted for whatever reason and then when I went into  a different account to try and get to it it will not let me in saying I don't have permissions   usera@bw:/usr/share$  usera@bw:/usr/share$ cd usrmusic bash: cd: usrmusic: Permission denied usera@bw:/usr/share$    if I go su I can of course all permissions are set to drwxrw-rw- 312 userx users on everything in the directory and sub-directories   I added usera to the users group and still I cannot access it at all, and how do I get the directories to NOT be highlighted like it is now an executable directory  ?  it shouldn't be this hard!


How to add elements to an empty array in PHP?

If I define an array in PHP such as (I don't define its size):  $cart = array();   Do I simply add elements to it using the following?  $cart[] = 13; $cart[] = "foo"; $cart[] = obj;   Don't arrays in PHP have an add method, for example, cart.add(13)?


Brightness not working after installing NVIDIA driver

I recently installed Ubuntu 11.10 on my Mac Book Pro 7,1. I installed the NVIDIA driver (285). The brightness keys are working (F1 and F2) and I get the box showing the brightness but it does nothing. I can change the brightness in the NVIDIA X Server Settings application. How can I get the brightness working without uninstalling the driver? Thanks in advance.


Find $\{x\in \mathbb R\colon\neg(3x>21\implies x\leq 5) \}$

For which $x\in\mathbb{R}$ does $\neg(3x>21\implies x\leq 5)$ hold?  I believe it holds for all $x>7$, but I don't know how to formally write this down.  Can someone help me out? Is there a systematic way of doing this?


I understand the fact that a static charge produces an electric field around it.  I accept the fact(without questioning) that a moving charge produces a magnetic field.  Question 1 : If a moving charge produces both electric and magnetic fields why can we not say that it produces an EMW?  Question 2 : How does an accelerated charge produce EMW?


I am trying to find a reasoning for the truth table of $A \rightarrow B$ .Here is what I came to so far. $1.$ We have to first assume that if something can't be proven wrong , then it is true. $2.$ $A \rightarrow B$ means that "If $A$ is true , then $B$ will be true as well". $3.$ If $A$ is true and $B$ is true, then clearly $A \rightarrow B$ is true as well. $4.$ If $A$ is true and $B$ is false then clearly $A \rightarrow B$ is false because it directly contradicts "If $A$ is true , then $B$ will be true as well". $5.$ If $A$ is false and $B$ is false/true , then it can't directly contradict "If $A$ is true , then $B$ will be true as well" because we first assumed $A$ to be false , not true . So from "If $A$ is false and $B$ is false/true" , we dont know anything about what will happen if $A$ is true . Then we will use the principal "if something can't be proven wrong , then it is true." to conclude that $A \rightarrow B$ is true. Is this reasoning valid?


Prove that:  a) If A is a local ring then A has characteristic zero or a power prime.  Proof.  Suppose M is the unique maximal ideal of A then $A/M$ is Field in particular integral domain then $Char( A/M ) = 0$ or $p$ with some $p$ prime.  If $Char( A/M ) = 0$ then $\forall n \in \mathbb N,  $ , $\forall a+M \in A/M $ we have that $ n(a + M )= na + M \ne M$ then $ na \notin M$ $\forall n \in \mathbb N  $, so $ n 1 \notin M $, this implies $n 1 \ne m $ $ \forall m \in M  $ $ \forall n \in \mathbb N  $ then $ n 1 \ne 0 $ $ \forall n \in \mathbb N  $ finally $Char ( A )= 0$  Suppose that  $Char( A/M ) = p $ and $Char( A ) = n$ then$ n 1 \ne m$ $ \forall m \in M  $ , so $ M + n 1 = M $ and since $Char( A/M ) = p $ this implies that $ p | n$ then $n = pq$ , so we have $ n= p^l m$ where  $ (p,m)=1$  but with this there are $ x,y\in \mathbb Z$ such that $ 1= px 1 + my 1$, so $ px 1 $ is unity or $my 1$ is unity.  Since $p 1 \in M  $ then $px 1 \in M  $ this implies $px 1 \notin A^*  $ then  $ my 1 \in A^*  $ ,so for $ a \in A$ such that $my 1 a = 1$ then $m 1$ is unity with this we have that $o(m1) = o(1)$  and since  $p^l(m1)=0$ this implies that  $$p^lm | p^l$$ then $$ m=1 $$.  Finally we get that $Char( A ) = p^l $ for some integer l and p prime.  Is this correct?  b) Let A a ring commutative with identity and with characteristic n. If $n= ab$ with $ (a,b)=1$ then A is isomorphic to the direct product of two rings,one of them is characteristic a and the other one is characteristic b.  I cannot prove this can someone help me please.


word for things that you want one more of

Is there a word for things which you always one more of? like chips, or beer, or civilization V?  I thought maybe compulsive, but it doesn't seem right in a sentce "Chips are so compulsive!" or "Beer is so compulsive! I can't ever have only one!"


I recently upgraded from Ubuntu 11.10 to 12.04. If it makes any difference, my system is a Dell Inspiron 1520.   I encounter a problem whenever I shutdown or restart; it kills all running processes (as far as I can tell), but once I get past the shutdown text screen and the screen goes black,  my computer doesn't power off. The fans still run and the screen is still on, etc. I have to hold down the power button in order to complety shut down.   Does anyone know how to resolve this problem?


Will I still be able to log in with my google account after April 20, 2015?

When signing into the new winterbash site, Google notified me that the site was using Open ID 2.0 and that .  Is this something I need to worry about? Should I start logging on with alternate accounts?


Young Adult Sci-Fi book about Aliens Ruling Earth and a Human Resistance

I am looking for a book about aliens ruling Earth and there is an underground rebellion. I read this over 20 years ago, so only certain parts stick in my mind.  I believe it took place on the west coast of North America, and the book may start in Northern California or even San Francisco.   The book starts with a raid against the human rebels. A boy escapes. This is the main character throughout the books. I believe there were other aliens as well that are described in the book and one of them is globes sitting on top of other globes.   I want to say the spaceships used by the aliens are triangular, but I could be wrong. I think the humans win, but can't be certain. I believe there is a part in the woods where they confront the aliens in a base or something similar.


How much does light curve due to gravity compared to what Newtonian mechanics predicts

I've heard that it curves twice as much is this correct?


Pixelated ubuntu virtualbox on windows host

I recently installed virtualbox Ubuntu on host Windows. I am new to Ubuntu and virtualbox. I made two changes and I would like help to understand which one (and why) it messed up Ubuntu.   I had downloaded an email attachment file 5MB large. I kept getting an error that the disk space was running low. I allocated storage 8GB at start (dont know where it has gone!) The screen resolution was like 640X480, so I adjusted the virtualbox-guest-dkms option, and it got fixed.   I restarted the guest session to effect the changes of the sizing. Now I am getting a pixelated screen for the login.     When I enter the password, I am able to get into the machine. I know this because the screen pixels change to what the desktop must be looking like.


Prob. 7 (a), Chap. 6, in Baby Rudin: If $f$ is integrable on $[c, 1]$ for every $c>0$, then $\int_0^1 f(x) \ \mathrm{d}x = $ . . .

Here is Prob. 7, Chap. 6, in the book Principles of Mathematical Analysis by Walter Rudin, 3rd edition:      Suppose $f$ is a real function on $(0, 1]$ and $f \in \mathscr{R}$ on $[c, 1]$ for every $c > 0$. Define    $$ \int_0^1 f(x) \ \mathrm{d} x = \lim_{c \to 0} \int_c^1 f(x) \ \mathrm{d} x $$    if this limit exists (and is finite).       (a) If $f \in \mathscr{R}$ on $[0, 1]$, show that this definition of the integral agrees with the old one.       (b) Construct a function $f$ such that the above limit exists, although it fails to exist with $\lvert f \rvert$ in place of $f$.    Here I'll only attempt Part (a):   My Attempt:   Here is the link to a post of mine here on Math SE where I've copied the definition of the Riemann and Riemann-Stieltjes integral that Rudin uses (i.e. Definitions 6.1 and 6.2 in Baby Rudin, 3rd edition):        As $f \in \mathscr{R}$ on $[0, 1]$, so $\int_0^1 f(x) \ \mathrm{d} x$ exists in $\mathbb{R}$.       According to the statement of the problem, we only need to show that    $$ \lim_{c \to 0+} \int_c^1 f(x) \ \mathrm{d} x = \int_0^1 f(x) \ \mathrm{d} x. \tag{0}$$       Let $\varepsilon > 0$ be given. We need to find a real number $\delta> 0$ such that    $$ \left\lvert \int_c^1 f(x) \ \mathrm{d} x \ - \ \int_0^1 f(x) \ \mathrm{d} x \right\rvert < \varepsilon \tag{1} $$   for any real number $c$ such that $0 < c < \delta$.       Now let's choose a real number $\delta_0 \in (0, 1)$, and let us choose $c$ such that $0 < c < \delta_0$.       Then as $f \in \mathscr{R}$ on $[0, 1]$ and as $c \in (0, 1)$, so by Theorem 6.12 (c) in Baby Rudin $f \in \mathscr{R}$ on $[0, c]$ and on $[c, 1]$, and    $$ \int_0^c f(x) \ \mathrm{d} x \ + \ \int_c^1 f(x) \ \mathrm{d} x = \int_0^1 f(x) \ \mathrm{d} x. \tag{2} $$    Here is the link to my Math SE post on Theorem 6.12 (c) in Baby Rudin, 3rd edition:        In the light of (1) and (2), we can conclude that we now only need to show that there exists a real number $\delta > 0$ such that    $$ \left\lvert \int_0^c f(x) \ \mathrm{d} x \right\rvert < \varepsilon \tag{3} $$    for any real number $c$ such that $0 < c < \delta$, and we now also know that    $ 0 < c < \delta_0 < 1$.       As $f \in \mathscr{R}$ on $[0, 1]$, so $f$ is also bounded on $[0, 1]$ and hence also on $[0, c]$. Let $M \colon= \sup \{ \ f(x) \ \colon \ 0 \leq x \leq c \ \}$.       Then by Theorem 6.12 (d) in Baby Rudin, we have    $$ \left\lvert \int_0^c f(x) \ \mathrm{d} x \right\rvert \leq M c. \tag{4} $$    Here is the link to my Math SE post on Theorem 6.12 (d) in Baby Rudin, 3rd edition:        So if we choose our $\delta$ such that $$0 < \delta < \min \left\{ \ \delta_0, \frac{\varepsilon}{M+1} \ \right\}, $$    then, for any real number $c$ such that $0 < c < \delta$, we have $0 < c < \delta_0$ so that $c \in (0, 1)$ and from (4) we also have    $$ \left\lvert \int_0^c f(x) \ \mathrm{d} x \right\rvert \leq M c \leq  \frac{M \varepsilon}{M+1} < \varepsilon, $$    which by virtue of (3) implies that (1) holds.       Since $\varepsilon > 0$ was arbitrary, therefore (0) holds as well, as required.    Is this proof correct and rigorous enough for Rudin? If not, then where is it lacking?   Is this proof the same as the proof asked for by Rudin?


Is "Have you some water?" a grammatically correct sentence?

I believe it same as saying "Do you have some water?"  Is it?


I have always been told that the geomagnetic field acts "as if" there were a bar magnet inside the Earth. I now this is not true, but I feel that knowing what is actually going on would help me understand the answer to the question that I'm about to ask:  Why does geomagnetic reversal happen? Is it something gradual or relatively fast?  (What is the origin of the geomagnetic field? Can we answer my questions starting from this mechanism?


How to check if an element is a dictionary

I have a list that looks like this: ['abc', {'subcontent': ['apples', 'oranges']}, 'def']  I need to check if an element is a dictionary or not. How do I do that? I need to get indices of dictionary.


I have string and I will do split for this string and then I will get 320 elements. I need to create 4 groups. Every group will be with 100 elements and the last group must be with 20 last elements. And the last step is that all groups must be string and not list. how can I do that? I can do that if I know how many elements I have: s_l = 'AA   AAL   AAOI   ACLS   ADT   ADTX   ADVM   AEL   AIG   ALEC   ALLY   ALT   AMCX   ANGI   APA   APDN   APLS   APPS   APRN   AQUA   ARMK   ARNC   ARVN   ATNM   ATOM   ATRA   ATSG   AVCT   AVT   AX   AXDX   BCLI   BE   BEAM   BJRI   BKE   BKU   BLDR   BLNK   BMRA   BOOT   BXS   BYD   CAKE   CALX   CAPR   CARG   CARR   CARV   CATM   CC   CCL   CELH   CEQP   CFG   CHEF   CHRS   CIT   CLDX   CLR   CLSK   CNK   CNST   CODX   COLB   COOP   CPE   CRS   CTVA   CUK   CVET   CVI   CVM   CYTK   DAL   DBX   DCP   DDS   DEI   DISCA   DISCK   DK   DNB   DRNA   DVAX   DXC   ECOM   EIGR   ELAN   ELF   ELY   ENVA   EQ   EQT   EXEL   FE   FHI   FIXX   FL   FLWS   FMCI   FORM   FOX   FOXA   FRTA   FUN   GBX   GIII   GM   GNMK   GOCO   GPRE   GRAF   GRPN   GRWG   GTHX   GWB   HALO   HCC   HCSG   HEAR   HFC   HGV   HIBB   HMSY   HOG   HOME   HP   HSC   HTH   HWC   IMUX   IMVT   INO   INOV   INSG   INSM   INT   IOVA   IRDM   ITCI   JELD   JWN   KMT   KODK   KPTI   KSS   KTB   KTOS   KURA   LAKE   LB   LCA   LL   LPI   LPRO   LSCC   LYFT   MAXR   MBOT   MCRB   MCS   MD   MDP   MGM   MGNX   MIC   MLHR   MOS   MRSN   MTOR   MXL   MYGN   NCLH   NCR   NK   NKTR   NLS   NMIH   NOVA   NTLA   NTNX   NUAN   NVST   NXTC   ODP   OFC   OKE   OMER   OMF   OMI   ONEM   OSPN   OSUR   OXY   OZK   PACW   PD   PDCE   PDCO   PEAK   PGNY   PLAY   PLCE   PLT   PLUG   PPBI   PRPL   PRTS   PRVB   PS   PSNL   PSTX   PSXP   PTGX   PVAC   RCUS   REAL   REZI   RKT   RMBL   RPAY   RRGB   RRR   RVLV   RVP   RXN   SANM   SAVE   SBGI   SC   SCPL   SEAS   SEM   SFIX   SFM   SGMS   SGRY   SHLL   SHOO   SHYF   SIX   SKX   SLQT   SMCI   SNAP   SNDX   SNV   SONO   SPAQ   SPCE   SPR   SPWH   SPWR   SRG   SRNE   SSNT   SSSS   STOR   SUM   SUN   SUPN   SVMK   SWBI   SYF   SYRS   TBIO   TCDA   TCF   TCRR   TDC   TEX   TFFP   TGTX   THC   TMHC   TRGP   TRIP   TSE   TUP   TVTY   UBX   UCBI   UCTT   UFS   UNFI   UONE   UPWK   URBN   USFD   VCRA   VERI   VIAC   VIRT   VIVO   VREX   VSLR   VSTO   VXRT   WAFD   WBS   WFC   WHD   WIFI   WKHS   WORK   WORX   WRK   WRTC   WW   WWW   WYND   XEC   XENT   XPER   XRX   YELP   ZGNX   ZUMZ   ZYXI' split_s_l = s_l.split("   ") part_1 = '  '.join(split_s_l[:100]) part_2 = '  '.join(split_s_l[100:200]) part_3 = '  '.join(split_s_l[200:300]) part_4 = '  '.join(split_s_l[300:])  for part in (part_1, part_2, part_3, part_4):     print(part)  but I don't know how to do that If I have many elements in list.


Flag Window : Other Section TextField come out of boundry

I'd experienced a bug in Flag Window.  Browser : Google Chrome (Version 41.0.2272.101 (64-bit)), Firefox (Version 36.0.4)  OS : Ubuntu 14.04 64-bit  In flag window last option other (needs ♦ moderator attention) containing a Text field to write details about flag. It goes out of Flag window.   It occurs in normal browsing as well as in private browsing/incognito mode.


I'm not sure why I get two extra characters at the end of the for loop. Looking at other answers on StackExchange indicates I'm not suppose to use both algorithm and algorithmic and that its better to stick to one. However, removing either does not produce the results I want. Here is the code. \usepackage{setspace} \usepackage{amssymb} \usepackage{amsmath} \usepackage{multicol} \usepackage{algorithm} \usepackage{algorithmic} \usepackage{subcaption} \usepackage{colortbl} \usepackage{xparse} \usepackage{caption} \usepackage{fancyhdr} \usepackage{algpseudocode}  \begin{center} \begin{minipage}{1\textwidth} \begin{algorithm}[H] \caption{Forward calculation for pair HMMs} \begin{algorithmic}  \REQUIRE Set $f^{\mathrm{M}}(0,0)=1 f^{\mathrm{X}}(0,0)=f^{\mathrm{Y}}(0,0)= f^{*}(i,-1) = f^{*}(-1, j) = 0$ \FOR{$i=0, \ldots, n, j=0, \ldots, m \text { except }(0,0)$}  \begin{aligned} f^{\mathrm{M}}(i, j) & = p_{I_{i} O_{j}}\left[a_{MM} (f^{\mathrm{M}}(i-1, j-1))+\\ & \quad \quad \left.a_{XM}\left(f^{\mathrm{X}}(i-1, j-1)\right)+a_{YM}(f^{\mathrm{Y}}(i-1, j-1)\right)\right] \\ f^{\mathrm{X}}(i, j) & = q_{I_{i}}\left[a_{MX} f^{\mathrm{M}}(i-1, j)+a_{XX} f^{\mathrm{X}}(i-1, j)\right] \\ f^{\mathrm{Y}}(i, j) & = q_{O_{j}}\left[a_{MY} f^{\mathrm{M}}(i, j-1)+a_{YY} f^{\mathrm{Y}}(i, j-1)\right]\\ \end{aligned}  \ENDFOR \end{algorithmic} \end{algorithm} \end{minipage} \end{center}


How to create a mathematics LaTeX document

Ok, this is a complete newbie question: How does one create a methematics paper using LaTeX for a PDF?  Specifically, I need help knowing:   What to write the document in How to render the Latex How to convert into a PDF file   Also, how do I get the "amsmath" add-on?  My previous experience: I have written several papers using writelatex.com and sharelatex.com which allow collaboration on papers, and automatically render the latex + create PDF's of the finished product. I have a rough idea of how mathematical papers tend to be structured because of reading so many of them, but I have never published myself.  Also, if relevant: I have Adobe Reader and use Windows on my computer. Optimally, is there software I could download for free that would give me these capabilities?  Thanks in advance!


Are there parameters where a biased estimator is considered "better" than the unbiased estimator?

A perfect estimator would be accurate (unbiased) and precise (good estimation even with small samples).  I never really thought of the question of precision but only the one of accuracy (as I did in  for example).  Are there cases where the unbiased estimator is less precise (and therefore eventually "less good") than a biased estimator? If yes, I would love a simple example proving mathematically that the less accurate estimator is so much more precise that it could be considered better.


Getter from another class doesn't work on ArrayList

so I've been scratching over why my code doesn't work. I have 2 classes, the first one is where I have my getters and setters:  public class ShopItems {   private String itemName;   private double price;    public double getPrice(){     return price;   }    public String getItemName(){     return itemName;   }    private void setPrice(p){     price = Math.abs(p);   }    public ShopItems(String i, double p){     itemName = i.toUpperCase();     setPrice(p);   } }   and here is my second class, where I make an ArrayList:  public class ShopLedger {   private ArrayList<ShopItems> shoppingList;    //I want to make a deep copy of the items in the parameter into shopping list.   public ShopLedger(ArrayList<ShopItems> s){     shoppingList = new ArrayList<ShopItems> (s);      for(int i=0;i<s.size();i++){       shoppingList.set(i,s.get(i));     }   }    //And here is where things go wrong. I want the method to return the price of the item   //in the parameter, and return null if the item name cannot be found.   public Double getPrice(String itemName) {   for(int i=0;i<shoppingList.size();i++){     if(shoppingList.get(i).getItemName() == itemName){       return shoppingList.get(i).getPrice();     }   }   return null;  } }   This is what I have now, and the code keeps giving me the error "java.lang.NullPointerException". My client class sets the shoppingList as:     Candy(2.3), Book(20.0), Pens(5.5), Tape(10.2) and itemName is Pens.  However, I've gone into debug mode and for some reason, this part of the getPrice method:  if(shoppingList.get(i).getItemName() == itemName){       return shoppingList.get(i).getPrice(); }   never executes. Please help!


how to convert two lists into a dictionary (one list is the keys and the other is the values)?

This is code in IDLE2 in python, and error.  I need to include each "data" element as key and value "otro", in an orderly manner. Well "data" and "otro" it's list with 38 string's, as for "dik" it's an dictionary.  >>> for i in range(len(otro)+1):     dik[dato[i]] = otro[i]    Traceback (most recent call last):   File "<pyshell#206>", line 2, in <module>     dik[dato[i]] = otro[i] IndexError: list index out of range >>>    this problem is range(0, 38)  output -> (0, 1,2,3 ... 37) and it is all messy


I'm currently resolving a problem, and I came across the following matrix for which I need an expression of the determinant. $$     \begin{matrix}     a+1 & 1 & 1 & 1 & . & . & . & 1 & 1 \\     -a & a+1 & 1 & 1 & . & . & . & 1 & 1 \\     0 & -a & a+1 & 1 & . & . & . & 1 & 1 \\     0 & 0 & -a & a+1 & . &  &  & . & . \\     . & . & . & . & . & . &  & . & . \\     . & . &  & . & . & . & . & . & . \\     . & . &  &  & . & . & . & 1 & 1 \\     0 & 0 & . & . & . & 0 & -a & a+1 & 1 \\     0 & 0 & . & . & . & . & 0 & -a & a+1 \\     \end{matrix} $$ where $a$ is a real number. This matrix can also be described like this:  $$ m_{i, j} =  \begin{cases} 1,  & \text{if $i<j$} \\ a+1, & \text{if $i=j$} \\ -a, & \text{if $i=j+1$} \\ 0, & \text{if $i>j+1$} \end{cases} $$  The size of the matrix is not known, potentially high (more than 1000).  I do not know how to solve this problem, nor can it be solved.  Edit:  Following achille hui advice, the problem is equivalent to compute an expression of the determinant of the next matrix:  $$     \begin{matrix}     2a+1 & -a & 0 & . & . & . & 0 & 0 & 0 \\     -a & 2a+1 & -a & . & . & . & 0 & 0 & 0 \\     0 & -a & 2a+1 & . & . & . & 0 & 0 & 0 \\     . & . & . & . & . &  &  & . & . \\     . & . & . & . & . & . &  & . & . \\     . & . &  & . & . & . & . & . & . \\     0 & 0 & 0 &  & . & . & 2a+1 & -a & 0 \\     0 & 0 & 0 & . & . & . & -a & 2a+1 & -a \\     0 & 0 & 0 & . & . & . & 0 & -a & a+1 \\     \end{matrix} $$ Be aware that the last coefficient is  $a+1$ and not $2a+1$.  Edit 2:  By developping the last row, we get ride of the last coefficient and we deal with tridiagonal matrices with constant diagonals.  Using the answer from , we get the following expression: $$ det_n = \frac{1}{\sqrt{4a+1}} \biggl[ \frac{1+\sqrt{4a+1}}{2} \biggl(\frac{2a+1+\sqrt{4a+1}}{2}\biggl)^n - \frac{1-\sqrt{4a+1}}{2} \biggl(\frac{2a+1-\sqrt{4a+1}}{2}\biggl)^n \biggl] $$


I've downloaded the .jar file for Minecraft, and I installed OpenJDK 6 from the software center, and I tried with 7 as well, but it keeps throwing the message "The file '/home/hunter/Downloads/minecraft.jar' is not marked as executable.  If this was downloaded or copied from an untrusted source, it may be dangerous to run.  For more details, read about the executable bit." However, when I go into the properties to mark it as executable, as many people say to do, the box is not there.


I am running the Wine PPA (VErsion 1.4rc2 right now) and was going to test it with World of warcraft and Skyrim. But in the WoW video configuration it appears as tho it is not detecting the Shader Model 3.0. Basically it says there is none. I am running the game with and without the -opengl parameter with no luck.  How can I activate the SM3.0 in Wine since I am using the proprietary Nvidia drivers (290.xx) and have an Nvidia GT440 with 1GB Ram.  Additionally today I went to the winecfg and the options for Vertex and Pixel Shading are gone. It only shows the virtual desktop and a couple of other options but no Video configurations.


javascript replace string after matching line

I expected to find an answer to a typical problem with regular expressions.   Find a given line Change something on that line   Many examples of how to use RegEx replace assume you know the pattern you want to replace.  Great for teaching but not typical (IMO).  See  and .  If it is on the MDN page please point it out.  In my latest problem, I have an html file that has uniq IDs on a line so I can perform this simple replacement.   The syntax of the lines I need modified are shown below.  I can place a unique string in the file so I can find the correct line to update.  2018-10-26 Pat   I need to find the line that has id="lastModified" and change the date.  I need to find the line that has id="builtBy" and change the date.  I tried a few different things.  One is   var res = str.replace(/id="lastModified".*>(.*)<.span>/, newDate );   I thought the default might be to change the data matched in the parens (nope it doesn't work that way).  See  of what I tried that didn't work.  NOTE: In my case I'm trying to figure this out because for a simple string replacement using gulp-replace but it's really a javascript pattern matching and replacement problem so I'm not bring gulp-replace into this question other than to mention it.  NOTE: In my case, this code is not executing in the browser, so typical DOM manipulation will not work.  Other questions that I found (but didn't answer my question) were:


I am beginner to java coding, I am facing some complexity in updating the array.  My problem is I have an array named  s1[] which consists of 10 elements from that I have to choose 1st 3 elements and I have to store in one array i.e. max1[] array and in next array I have to choose randomly 3 elements from the same array i.e. s1[] and store it in max6[] and I need to do comparison between the two arrays i.e. max1[] and max6[] so that the matching values will be stored.   My code looks like this (here f1 = 3)          for (i1 = 0; i1 < f1; i1++) {             max1[i1] = s1[i1];             System.out.println("1st tree random leaf nodes   of phy m/c 1  at tree 1 :  " + max1[i1]);             System.out.println(" \n ");             max6[i1] = s1[(int) (Math.random() * f1)];             System.out.println(" random leaf nodes  of  phy m/c 1  at tree 2: " + max6[i1]);             System.out.println(" \n ");          }          for (int l1 = 0; l1 < f1; l1++) {             for (int k1 = 0; k1 < f1; k1++) {                 if (max1[l1] == max6[k1]) {                     c1[l1] = max1[l1];                     k1++;                     System.out.println("the value after crossover is:--------->" + c1[l1]);                     break;                 }             }         }   now what I want is that I have to repeat the loop for some iterations so that in the next iteration the values of the max1 array in 1st iteration shouldn't be repeated means I have to permanently remove the elements from s1 array until s1 array contains zero elements in it


I'm having problems trying to download the iso for Ubuntu 17.10 from the official website. It shows a "file incomplete" message right after I click the download button:    Although my browser is Chrome, the same behaviour happens with Firefox as well.


When I try to add a loop cut by pressing CtrlR only a dot shows on my object instead of whole loop cut line. What am I doing wrong to cause this problem?


I want to reinstall software center as I cannot open in. I used this command   sudo apt-get update && apt-get install --reinstall software-center   but this shows this-  E: Type '}ckage' is not known on line 2 in source list /etc/apt/sources.list.d/mongo.list E: The list of sources could not be read.


Book where technology is a banned form of magic

I'm looking for a book trilogy I started reading over 15 years ago where the main character was a ~15yr old boy that hadn't found his magic yet (magic was prevalent throughout the world), but he was getting by with mimicing the effects of magic via technology which was a banned school of magic (I think the school was called death magic or dead magic).  If I recall correctly he runs off after being discovered by his mother practicing said magic (moving a boulder using a simple fulcrum/lever combo).


This question may stem from a misunderstanding of compilers on my part, but here goes...  One can find the following statement in the preface to the first edition of K&R (page xi):     The operating system, the C compiler, and essentially all UNIX applications programs (including all of the software used to prepare this book) are written in C.   (my emphasis)  Here's what I don't understand: doesn't that C compiler have to be compiled itself before it can compile any C code? And if that C compiler is written in C, wouldn't compiling it require an already existing C compiler?!  The only way out of this infinite-regression conundrum (or chicken-and-egg problem) is that the C compiler written in C that K&R are referring to was actually compiled with an already existing C compiler that was written in a language other than C. The C compiler written in C then superseded the latter.  Or am I completely off?


Third party graphics drivers on ubuntu 16.04 causing boot loop

About a week ago, I installed various system updates, including a package called intel-microcode. After rebooting, I discovered that I was unable to get past the login screen (i.e. I would login and then immediately be taken back to the login screen).  This had actually also happened a few weeks prior, and it turned out to be my older graphics drivers not playing nicely with Intel's/Canonical's Meltdown/Spectre mitigation updates. Updating the drivers in that case fixed the problem.  However, now my system is completely up-to-date and I haven't received any package updates to fix the issue in several days. I am running kernel 4.13.0-32-generic and the intel-microcode package is version 3.20180108.0+really20170707ubuntu16.04.1.  Is there an update coming soon? Or is there a way for me to revert the package back to a version that lets me login to my computer?


How to find the total number of terms and the sum in a not explicit geometric series?

This series looks like it is geometric or sort of, but the rate between them does not seem constant.  $$S_{n}= \frac{1}{3\times 6}+\frac{1}{6\times 9}+\frac{1}{9\times 12}+ \cdots + \frac{1}{300\times 303}$$  All i can see is the second number in the denominator jumps to the next term in the series but this situation makes it impossible to establish a common factor. Therefore, Is it possible to determine the number of terms and the sum using a simple algorithm?.   There is also a side question which I don't know. In the example from above the final term is $\frac{1}{300\times 303}$ but what if the series goes to the infinity. Is this series convergent or not?. How can this be proven?.  Edit:  Although there is a method to approach these kind of situations mentioned here (), it does not address the fact on how to obtain a recursive formula, as it is part of the question itself. Therefore is there a way on how to reach to that formula in the denominator and solve the problem?. If the method of solving this involves partial fractions I would appreciate somebody could include a revision of this part in the answer so I can understand how it makes a link with the problem from above.


I need to graph a rectangle on the Cartesian coordinate system. Is there an equation for a rectangle? I can't find it anywhere.


I've set up the following test page: Visualforce Page: <apex:page controller="Emojis" action="{!Emojis}" >  <apex:form >     <apex:actionPoller interval="5" reRender="emoji"/>      <apex:outputText id="emoji" value="{!emojiCase.Subject}"/>  </apex:form>  </apex:page>  Apex Controller: public class Emojis {      public Case emojiCase {get;set;}      public void Emojis() {         // This is a case which has Emojis in the Subject         emojiCase = [SELECT Id, Subject FROM CASE WHERE CaseNumber = '00034143'];     }  }  When the page first loads, the page action fires and retrieves the case with emojis, and it looks like this:  However when the actionPoller rerenders the output text, it changes to this:  I can't figure out why it does this, does the encoding change upon refresh?


I am installing doxygen using    sudo apt-get install doxygen   but getting following unmet dependencies. I tried with google but not getting proper solution for same.  I am getting this while run above code:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  doxygen : Depends: libclang1-3.6 (>= 3.2) but it is not going to be installed E: Unable to correct problems, you have held broken packages.   I am also tried with sudo apt-get install -f but no solution.


Why didn't the Hogwarts ghosts know about the Chamber of Secrets?

got me to wonder why Hogwarts ghosts never knew about the Chamber of Secrets.  Some  have been around Hogwarts for centuries. Plenty of time to explore the school grounds, talk to people who might know, or talk to the person killed by the basilisk. "So the last thing you saw was a big pair of glowing yellow eyes over there by the sink? Well, Nick, let's float down through the floor by the sink and see what's there."  They can move through walls, so they can access the  without needing to say "Open" in a Parseltongue.  They are immune to or less affected by hexes and charms that would bedevil living residents.  They had many opportunities over the centuries and the means to do it. Why didn't the ghosts discover the Chamber of Secrets?  Please support your answers with quotes from canon sources.


Ubuntu, as always, is very risky to set up. I believe I selected the option "erase disk" on the USB. It never mentioned Windows, like it did the first time I installed it, earlier tonight. I thought it was referring to the USB itself with a sort of misnomer, and went ahead with that. Now i can't boot Windows 10. Is it really gone? Is there any way I can recover enough memory to boot Windows 10 again?  I tried TestDisk, recovering the disks as best I could, but I still couldn't boot.  I really have to be less careless. I'm not this stupid, just really careless.  Thanks.


Google shows old domain and wrong meta-description

I need your help to solve a problem I have with the Google SERP for my site. My site is www.personalmedia.it, now if I search the keyword "personalmedia" the result is this one:        You can see that the link below the title is not personalmedia.it, but ypma.it. ypma.it is the company's old site, that now has a redirect to personalmedia.it.  Why Google is showing that URL instead of the real URL of the real site?  Another strange thing: if I search the keyword "personal media" the result is this one:        In this case you can see the above problem, plus another one: the highlighted text in the description is not the text that I wrote in the description metatag as shown here (which correctly appears in the above case):        The highlighted text belongs to the page, but shouldn't be the meta description what is shown in SERP?


can't adjust screen brightness control in ubuntu 12.04?

My laptop is lenovo g580. I have searched for the solution. I have tried xbacklight. please help


Safe to switch from warm to high on poultry in crock pot

I put 6 fresh Foster Farms ‘legs’ (drumstick attached to thigh) , with skin removed, into my daughters crockpot , along with onion, celery, fresh herbs and filled with water to make my good chicken soup. I expected to wake up to that beatiful aroma, and was puzzled at what went wrong. Unknowingly, I set the crockpot on warm! That was at 10:00pm. I turned it to high at 6:00 am. I can’t find anything online regarding this. Will the dangerous backteria be killed off or should I just toss it, to ward off any food poisoning?


If $G$ is a group, $x,y, \in G$ and $xy =yx$ then prove that $|xy| = \operatorname{lcm}\{|x|,|y|\}$ given that $|x|$ and $|y|$ are coprime

Well I know that since $|x|,|y|$ are both positive integers then we have that  $$|x||y| = \gcd(|x|,|y|)\operatorname{lcm}(|x|,|y|)$$  And since we are given that $|x|,|y|$ are coprime then we have $gcd(|x|,|y|)=1$ and so $$|x||y| = \operatorname{lcm}(|x|,|y|)$$  Now all I need to show is that $|x||y| = |xy|$.  Now let $|x| =n,|y| = m$ and also let $|xy|=k$ and consider $(xy)^{mn}$.  $(xy)^{mn} = (x)^{mn}(y)^{mn} = (x^n)^m(y^m)^n = e^me^n = ee= e$. However, since we have $|xy|=k$ then we know that $$k\leq mn.$$ Now I need to show that $mn \leq k$ to conclude that $k=mn$ and so $|x||y| = |xy|$. But I am stuck in here. I know for sure that I need to use the fact that $xy=yx$. But I dunno how


Best practice to display operating hours in a web design?

1st Example:  Monday - Friday: 8:00 AM - 5:00 PM (no longer show Saturday & Sunday as closed)   2nd Example:  Monday - Friday: 8:00 AM - 5:00 PM Saturday - Sunday: Closed  3rd Example:  Monday - Friday: 8:00 AM - 5:00 PM Saturday: Closed Sunday: Closed  4th Example: (left / right aligned)  Monday: 8:00 AM - 5:00 PM Tuesday: 8:00 AM - 5:00 PM Wednesday: 8:00 AM - 5:00 PM Thursday: 8:00 AM - 5:00 PM Friday: 8:00 AM - 5:00 PM Saturday: Closed Sunday: Closed  Also do you display the days as full vs short? (Saturday VS Sat) Or which do you suggest is the best layout for this information? Do you use it in all your designs Thank you :)


How do I replace only first instance of a string

I need to replace the first instance of a word in a string with another string.  The problem is that the word being replaced sometimes appears more than once in the string that is being changed.  When that happens we only want the first instance to be replaced.  How can I do that?


My join returns null because I am not able to remove the leading zeros. Basically, I am trying to replace the pol.Policy_Number with src.Policy_Number for a large number of policies. Is there a way I can remove the leading 0s in the ON statement for src.Policy_Number? I think Padding is needed, but I am new to SQL so any help would be much appreciated. That pol policy numbers always equal src policy numbers if it was not for the leading 0s in pol This is not a duplicate. I am not looking for a select. I need to put padding next to the ON statement so any leading 0s from src.Policy_Number will be removed so the JOIN can return rows. Please don't close the question a duplicate  UPDATE pol SET pol.Policy_Number = src.Policy_Number FROM Policy_Table pol INNER JOIN SourceTable src  on  pol.Policy_Number =src.Policy_Number--00000000000000ABCD200,0000000000000EFT200  Where src.Policy_Number IN('ABCD200','EFT200')


Redirection not overwriting file but just producing a blank one

I have a command that strives to just read a file and then comment out every single line in it indiscriminately, then overwrite the existing file.  cat file | sed 's/^/#/g' > file   But to my surprise this doesn't actually work and actually just produces a blank file. From my understanding of pipes this shouldn't happen given that stdout goes to sed, is processed by sed and then sent to the file. So I'd like to know why this is happening  In place of my expected behavior I implemented a workaround.  cat file | sed 's/^/#/g' > /tmp/file; mv /tmp/file file   Why does my does my original solution not work though?


Both on 2.79b and 2.80 beta, I am unable to see the top menu line.  It is being blocked by the windows title bar.  I'm running on a laptop with a built in Intel 620 graphics.  I assume that is the problem.  Is there any workaround?  Thanks.


Which is correct?  You are one of the people who has or have helped me.


What's the difference between "have" and "have got" to express possession?  examples:   I have a pen. I have got a pen.


Effect of zeroes on shape of frequency response

For a System to be stable the poles have to be on the Left half of the s plane. But what is the significance of zeroes? Does it control the system in anyway? Thanks.


information about the number of polygons of a particular selected object

Is there a way to get statistical information in Blender for an individual object, not all objects in the scene, how to view statistics of a separate selected grid, each time switch to the mode editing, even with the TAB hotkey, is very inconvenient ... It is also not clear why the transition to the local view with the key - /  also does not help to see the statistics of a separate object, only the editing mode how so?


Is there a variable containing the current font size?

I'd like to write a conditional based on the current font size in LaTeX, but I can't seem to find (via search engines, including in this site) a simple way to access the actual font size.  In pseudo-code, what I'm looking for would be like  \ifthenelse{\equals{\thefontsize}{12}}{do something}{do something else}   But I can't seem to get a hold on a variable that actually does contain the font size (e.g. 12 or 12pt). Is there a simple one available? (ideally a non '@' one)


assertRaises in python unit-test not catching the exception

Can somebody tell me why the following unit-test is failing on the ValueError in test_bad, rather than catching it with assertRaises and succeeding?  I think I'm using the correct procedure and syntax, but the ValueError is not getting caught.  I'm using Python 2.7.5 on a linux box.  Here is the code …  import unittest  class IsOne(object):     def __init__(self):         pass     def is_one(self, i):         if (i != 1):             raise ValueError  class IsOne_test(unittest.TestCase):      def setUp(self):         self.isone = IsOne()      def test_good(self):         self.isone.is_one(1)         self.assertTrue(True)      def test_bad(self):         self.assertRaises(ValueError, self.isone.is_one(2))  if __name__ == "__main__":     unittest.main()   and here is the output of the unit-test:  ====================================================================== ERROR: test_bad (__main__.IsOne_test) ---------------------------------------------------------------------- Traceback (most recent call last):   File "test/raises.py", line 20, in test_bad     self.assertRaises(ValueError, self.isone.is_one(2))   File "test/raises.py", line 8, in is_one     raise ValueError ValueError  ---------------------------------------------------------------------- Ran 2 tests in 0.008s  FAILED (errors=1)


What are the arguments against or for putting application logic in the database layer?

NOTE The audience of programmers.se and dba.se is different, and will have different viewpoints, so in this instance I think it's valid to duplicate  on programmers.se.  I couldn't find discussion on dba on this already, and the original post says it all, so:     Most software developers want to keep   application logic in the application   layer, and it probably feels natural   for us to keep it here. Database   developers seem to want to put   application logic in the database   layer, as triggers and stored   procedures.      Personally I would prefer to keep as   much as possible in the application   layer to make it easier to debug and   keep the responsibilities of the   layers separate.      What are your thoughts on this, and   what should or should not be ok to   implement in the database layer?   N.B. I'm not the OP for that question, but left the original wording intact.


What I am trying to accomplish is to find the number of points that intersect a created buffer. I.E. I have a layer called "Buildings", for each building I have fixed distance buffers (<400m). I also a layer called "bus_stops" that includes points. Now I want to calculated how many bus_stops are within each buffer and have a "bus_stop_count" feature in attribute table. How do I accomplish this using QGIS?   What  I have tried:   I tried joining attributes by location, using the "bus_stops" layer and the buffer layer. But it doesn't work.


How a round-trip ticket with a transfer is cheaper than a round-trip ticket to the transfer city itself?

(Couldn't find an appropriate topic that answers my question. I understand why round-trip tickets are cheaper and why non-direct flights may be cheaper as well, but this is just ridiculous)  I was planning a trip to Germany with Lufthansa the next week and was searching for tickets between LED and TXL. I found out that it will cost 21k RUB and there is a transfer in FRA. As you can see, a trip consists of LH1439+LH176 and LH193+LH1438.    Okay, so I guess I could just have a nice trip to FRA and save myself money and time? Like just use LH1439 and LH1438. Nope, it actually costs 70% more.    How is that even possible?


I can't get to the bottom of this error, because when the debugger is attached, it does not seem to occur.  Collection was modified; enumeration operation may not execute  Below is the code. This is a WCF server in a Windows service. The method NotifySubscribers() is called by the service whenever there is a data event (at random intervals, but not very often - about 800 times per day). When a Windows Forms client subscribes, the subscriber ID is added to the subscribers dictionary, and when the client unsubscribes, it is deleted from the dictionary. The error happens when (or after) a client unsubscribes. It appears that the next time the NotifySubscribers() method is called, the foreach() loop fails with the error in the subject line. The method writes the error into the application log as shown in the code below. When a debugger is attached and a client unsubscribes, the code executes fine. Do you see a problem with this code? Do I need to make the dictionary thread-safe? [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)] public class SubscriptionServer : ISubscriptionServer {     private static IDictionary<Guid, Subscriber> subscribers;      public SubscriptionServer()     {                     subscribers = new Dictionary<Guid, Subscriber>();     }      public void NotifySubscribers(DataRecord sr)     {         foreach(Subscriber s in subscribers.Values)         {             try             {                 s.Callback.SignalData(sr);             }             catch (Exception e)             {                 DCS.WriteToApplicationLog(e.Message,                    System.Diagnostics.EventLogEntryType.Error);                  UnsubscribeEvent(s.ClientId);             }         }     }          public Guid SubscribeEvent(string clientDescription)     {         Subscriber subscriber = new Subscriber();         subscriber.Callback = OperationContext.Current.                 GetCallbackChannel<IDCSCallback>();          subscribers.Add(subscriber.ClientId, subscriber);                  return subscriber.ClientId;     }      public void UnsubscribeEvent(Guid clientId)     {         try         {             subscribers.Remove(clientId);         }         catch(Exception e)         {             System.Diagnostics.Debug.WriteLine("Unsubscribe Error " +                      e.Message);         }     } }


Why is there isn't a Theory of everything after decades of research?

Why isnt there a theory of everything after decades of research by the best minds of the world. Is it because that general relativity and quantum mechanics are so different in their ideals


How to control LightDM power saving preferences?

I want lightdm to enter power save after a specific period of time.  If I'm logged in then my screen will time out as per the user settings, however when no one is logged in the screen will stay on forever.  I've looked at some posts that make some suggestions on what to do, but none of them seem to work or it's down to my limited knowledge of Linux.  updated 6/2/2014: The settings shown by sudo -H -u lightdm dbus-launch --exit-with-session gsettings list-recursively org.gnome.settings-daemon.plugins.power are as follows:  org.gnome.settings-daemon.plugins.power active true org.gnome.settings-daemon.plugins.power button-hibernate 'hibernate' org.gnome.settings-daemon.plugins.power button-power 'interactive' org.gnome.settings-daemon.plugins.power button-sleep 'suspend' org.gnome.settings-daemon.plugins.power button-suspend 'suspend' org.gnome.settings-daemon.plugins.power critical-battery-action 'suspend' org.gnome.settings-daemon.plugins.power idle-brightness 30     org.gnome.settings-daemon.plugins.power idle-dim true     org.gnome.settings-daemon.plugins.power lid-close-ac-action 'suspend' org.gnome.settings-daemon.plugins.power lid-close-battery-action 'suspend'  org.gnome.settings-daemon.plugins.power lid-close-suspend-with-external-monitor false     org.gnome.settings-daemon.plugins.power notify-perhaps-recall true     org.gnome.settings-daemon.plugins.power percentage-action 2     org.gnome.settings-daemon.plugins.power percentage-critical 3     org.gnome.settings-daemon.plugins.power percentage-low 10     org.gnome.settings-daemon.plugins.power priority 0     org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 120     org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'suspend'  org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0     org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend'  org.gnome.settings-daemon.plugins.power time-action 120     org.gnome.settings-daemon.plugins.power time-critical 300     org.gnome.settings-daemon.plugins.power time-low 1200     org.gnome.settings-daemon.plugins.power use-time-for-policy true   I would have assumed the sleep-inactive-ac-timeout 120 would have been the correct entry, but it doesn't time-out unless I'm actually logged in as a user.


How to get first hour of today in SQL Server?

I need to obtain today's date but instead of current time I need the first time of the date.   WRONG WAY:   '4/7/2017 4:50:13 PM'    as result of getdate() function  RIGHT WAY:   '4/7/2017 00:00:00 AM'   Thanks for your help


Run multiple Python scripts in Blender from the command-line

I have 8 python scripts and I need to lunch them at once. For one script, I used   blender --background --python script1.py   for the eight scripts, I tried this command but it does not work.  blender --background --python *.py


You need to decide an appropriate internal representation of the Polygon before you can start, e.g. do you want to store the lines of the polygon, or just the points, or both? Should you use array, vector, linked list or something else? etc. Declare the appropriate information in the private section of the class. I'm not sure should I use a vector or linked list? Tasked to implement the following functions. Polygon(const Point & p1, const Point & p2, const Point & p3) virtual void print( ostream & out ) virtual double perimeter() virtual bool add(Point & p) virtual bool add(Line & exist, Point & p) Line and Point classes have already been implemented.


I just installed Ubuntu 18.10 with gnome 3.30.2. on my PC. I set the theme to Yaru-dark, however the shutdown window and some popup windows still use the default Adwaita theme. I managed to solve the problem partially by uninstalling some gnome programs which were installed with snap, and reinstalling them with apt. I don't know what to do in regards to the shutdown window. I still have the following packages installed with snap, I don't know if any of them is responsible for the shutdown window or if I can uninstall them without breaking my computer.  core               core18             gnome-3-26-1604     gtk-common-themes   Thanks.


Can I use 'in' instead of 'at'? -- "I have more books in my house."

I am learning English using the Duolingo English course, one of correct solution was      I have more books at my house.   Can I use      I have more books in my house.   If it is OK, what is the difference between both?


I'd like to use JavaScript to calculate the width of a string. Is this possible without having to use a monospace typeface?  If it's not built-in, my only idea is to create a table of widths for each character, but this is pretty unreasonable especially supporting  and different type sizes (and all browsers for that matter).


Excel Conditional Formatting: 3 color scale scoring fuzzy matched data for Windows

This question is posted as a spinoff from here - the post cited is about Mac where as this is about Windows:   Is there a way to use conditional formatting in the following manner in Excel? (For those who are curious, I am using Excel 2010 for Mac) I want Cell B2 to be green when A2 says "John likes green apples" and B2 also says "John likes green apples", yellow if A2 says "John likes green apples" and B2 says "Bill likes blue apples", and red if A2 says "John likes green apples" and B2 says "Bill hates red oranges". I am just wondering if there is a way to something to that effect. Thanks  The question noted above is asking specifically for an Excel for Mac solution, so can we achieve the same thing on PC-based Excel?


Add rectangle color box inside align and explain using an arrow

Hi i'm creating a beamer presentation and trying to make my equation beautiful. Is it possible to make color rectangle or circle in align and then write something about that part of the equation.    \begin{align}     \bigwedge\limits_{i,j} E(i,j) = \exists_{m,c} m c^{2}      \tag{Eqn}\label{energy}   \end{align}   I want to create a color box around E(i,j) and then use a pointer/arrow and tell that E(i,j) is a variable representing energy, m represents mass and c represents change. I have tried \colorbox but do not able to get how to point the box and comment. Thanks.


TOC overlap with custom section numbering

I have redefined \thesection in my document to give me custom numbering. Now the section number is slightly longer, and the table of contents hasn't adjusted accordingly.  In the TOC below potatoes overlaps II.2. Similarly II.3.10 overlaps In.... (And the other subsections are almost overlapping, instead of having a space.)  How can I get rid of that overlap?    \documentclass[a4paper]{article}  \usepackage[english]{babel} %  \renewcommand\thesection{\Roman{part}.\arabic{section}}   \begin{document}  \tableofcontents  \part{Fish} \section{tuna} \subsection{whatever}  \subsection{canned} \part{Vegetables} \section{potatoes} \section{tunips} \subsection{This is just to use}  \subsection{up subsections}  \subsection{because I want to get}  \subsection{to subsection 10}  \subsection{because extra digits}  \subsection{is what's causing the problem}  \subsection{what are tunips?} \subsection{like, who eats them?}  \subsection{I've only ever seen them?}  \subsection{In Howl's moving castle}   \end{document}


Can a Rogue effectively triple their speed by combining Dash and Ready, spreading it over several turns?

This question is a follow-up to:    The answer to that question is yes. Acting according to the following sequence should then enable a rogue (of at least second level) to triple their maximum movement in one round, right?   Bonus Action: Cunning Action -> Dash Movement: move twice your speed Action: ready additional movement Reaction: move your speed   To clarify: The idea was not to move as far as possible on your own turn (which can be more easily achieved by simply taking Dash as a Bonus Action and as an Action, as was pointed out to me in the answers), but to spread your movement over several turns by using the reaction.


I'm curious whether any canonical explanation has ever been given. It seems that Time Turners must be extremely difficult to create, seeing that it's mentioned in the books that their use is tightly controlled by the Ministry of Magic (so obviously a wizard can't just wave their wand over an hourglass and turn it into a Time Turner); also because they mess with the very fabric of reality (so it's hard to imagine there being some naturally occurring magical material that just happens to be able to enable time travel.)


I've been googling for some time now, and can't find the manual for the TikZ library calc. All I see is people using it. Where can I find the manual or some info?  Is it the same as the LaTeX package calc? The latter doesn't seem to mention TikZ in the manual.


How to increase excerpt length in wordpress?

Thank you for your help!  functions.php  function excerpt($limit) { $excerpt = explode(' ', get_the_excerpt(), $limit); if (count($excerpt)>=$limit) { array_pop($excerpt); $excerpt = implode(" ",$excerpt); } else { $excerpt = implode(" ",$excerpt); } $excerpt = preg_replace('`[[^]]*]`','',$excerpt); return $excerpt; }   index.php  <div class="post excerpt <?php echo (++$j % 2 == 0) ? 'last' : ''; ?>">


Why Does Snell's Law use Sine Instead of Angle Values?

I recognize that Snell's Law relates indices of refraction and the angles of incidence and refraction, but why does the equation use sine to describe those angles and not simply angle values? It would seem that angle values would make the most sense since it directly refers to the size of the angle entering or exiting mediums. What is it about the sine function that makes it essential to the correctness of Snell's Law?


Difference between / and /root in Ubuntu?

I have created 100 GB for /. When I opened Nautilus I have found the root folder. So what is difference between / and /root?  My username is enigma, and I have a folder named enigma in the /home folder and another folder with the same name in /media. What is the difference between these two folders and when do I have to use the second folder?


How can I stream/record my iOS device to MacOS?

I'm thinking about making some videos that will need to be recorded from my iPhone and using them in a common, Twitch-like setup where the phone's display is in one region, and a webcam, or other graphics, are displayed around the iOS stream.  I've read that others partially achieve this by using QuickTime Pro to record.  QuickTime Pro integrated a feature where you could start recording from a connected iOS device and that would work perfectly for my scenario.  But this isn't the answer.  I don't have QuickTime Pro, so I went to see about purchasing a license.  Googling "QuickTime Pro" with a couple other modifiers hasn't shown me anything of use and even the buy links from Apples own page seem to be broken.  On the Apple support forums, I saw another user ask where to get a key for QT Pro, and someone responded that a security flaw was found in the Windows version and that Apple has since stopped selling licenses.  So, what's the best alternative?  Specifically, is there an Apple-branded alternative that will allow me to stream/record from my iOS device to my macOS?


Denied Boarding - port of entry different from visa issue country

I was supposed to fly from Mumbai to Amsterdam, but because of the denied boarding I couldn’t reach my final destination as planned.  Few days back I did a Europe tour from India. So, I can apply for a visa from the country which is either my first port of entry in this case Netherlands or the longest stay which in this case Poland and therefore, I had applied for my visa from Poland embassy.  Now following is what happened with me.   My flight was from Mumbai, India to Amsterdam, Netherlands via Istanbul with Turkish Airlines I travelled from Mumbai to Istanbul (no problem here). When I was boarding to flight Istanbul to Netherlands, airlines officials (the ones who checks the boarding pass before boarding the flight) told me that I could not board the flight because my visa was issued by Poland and I need to go to Poland first. They were denying the longest stay option of the visa. Moreover NONE of the staff of Istanbul airport were able to understand English so I had to go to a lot of problems before I managed to get tickets to Poland and that too with the help of some official through Poland ticketing office, which is beyond Istanbul passport office. The only direct flight available is through polish airways for that day and not with any other airlines.  I somehow managed to fly to Poland from Istanbul after lot of struggle at Istanbul airport (without food and water). I did not received my luggage at the Poland airport and had to spent whole night at the Warsaw airport and took a flight to Amsterdam from Warsaw airport next morning. I got my luggage after almost three days of my flight from India at the Amsterdam airport.   I emailed airline for compensation and below is the response "The passenger shall be solely responsible for complying with all laws regulations, orders, demands and travel requirements of countries to be flown from, into or over, and with Carrier's Regulations and instructions. Carrier shall not be liable for any aid or information given by any agent or employee of carrier to any passenger in connection with obtaining necessary documents or visas or complying with such laws, regulations, orders, demands, and requirements, whether given in writing or otherwise; or for the consequences to any passenger resulting from his or her failure to obtain such documents or visas or to comply with such laws, regulations, orders, demands, requirements, rules or instructions.  In light of above information, we are sorry to inform you that we are unable to cover additional costs, such as new tickets for Warsaw arrival and transfer payments, considering document check in Istanbul and denied boarding before TK1953 flight departure."  Is suing the airline only option now? Are they fair in denying the boarding as per their mail?


Make sure the picture is on the current page

When I try to put the picture at the top of the page, it moves to the next page. What should I do to make the picture at the top of the current page, and will not move to the next page?  I use this code:  \begin{figure*}[!t] % normal figure code  \end{figure*}    Thank You!


How to use pseudocode (listing) in Beamer article mode?

I am trying to generate pseudocode in both presentation slides and handout using beamer.  I can use the listings package in the slides by adding [fragile] to the frame environment. However, how can I use the lstlistings environment when in article mode? Below is a minimal example.  File: slides.tex  \documentclass{beamer} \input{mwe-body.tex}   File: notes.tex  \documentclass{article} \usepackage{beamerarticle} \input{mwe-body.tex}   File: mwe-body.tex  \usepackage{listings} \begin{document}  \begin{frame}[fragile]   \frametitle{Frame 1}   test 1   \begin{lstlisting}     int sum = 0;   \end{lstlisting} \end{frame}  \mode<article>{   test 2    \begin{lstlisting}     int sum = 1;   \end{lstlisting} } \end{document}   pdflatex slides.tex works to generate the presentation.  pdflatex notes.tex has the following error:  Runaway argument? ! Paragraph ended before \lst@next was complete. <to be read again>                \par l.18 }   Any solutions?  Note, this is cross-posted to , but may get more responses here :)


I want to know which is the topology of $\mathbb{R}^{\infty}$, but I don't know even how to start to give it one. How can I give to $\mathbb{R}^{\infty}$ a topology? Is there a book that explains this?


Short phrase meaning "Area of study, activity, or interest where a particular technology or method is used."

I feel like I know a phrase like [...] of [...] that is often used on the tip of my tongue, but can't spit it out.