body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
When I go back to a site I haven't been to in a long while (e.g. ServerFault), there is a "welcome back" banner that displays at the top and reminds me to upvote the questions/answers if I find them useful. I don't need the reminder, but that's okay—I have no objection to its existence. However, I noticed today after I upvoted the question and answer I was reading, the banner was still there. Could we please have the "welcome back!" banner auto-dismiss if the user upvotes a question and/or answer?
The "Welcome back, If you found this question useful, don't forget to vote both the question and the answers up" banner has had its share of complaints. (, , ) While it clearly has value, its negative impact could be reduced by automatically hiding it when the user does what it asks them to. That is -- make it go away when the user votes. Advantages I can think of: Since the user is voting, they clearly already understand point of the message. The click targets for voting are bigger and thus easier to click than the very narrow "close this message" link on the banner. The vote buttons are already familiar to any regular user. Disadvantages that I can think of: Somebody needs to write some javascript.
Let $\phi\in C[0,1]$ and let $T_\phi~:C[0,1]\rightarrow\mathbb{R}$, defined as $T_\phi f=\int_0^1 f(x)\phi(x) \,dx\\$. How can i prove that it's a continuous operator?
Let $k:[0,1]\times[0,1]\rightarrow \mathbb{R}$ continuous and $K:C[0,1]\rightarrow C[0,1]$, given by $Kf(x,y)=\int_0^1k(x,y) f(y) \,dy\\$. Prove that $K$ is continuous. I try to see continuity in $0$, but i can't find $\delta$.
I am getting a null pointer exception on my nameA = view.getHumanName(nameB); line in my model class. I am trying to establish nameA using the getHumanName method from the view class. I also attempted to add in this.view = view to the model constructor but that does not fix the issue. Why am I getting this error in this instance? Model class and instance variable: public Model(Dice die){ nameB = "Toby"; nameA = view.getHumanName(nameB); p1 = new Player(nameA); p2 = new Player(nameB); this.die = die; } } Method in View class: public String getHumanName(String compName){ System.out.println("Enter a name for the human player: "); String humanName = scan.nextLine(); while(humanName.equals(compName) || humanName.trim().isEmpty()){ System.out.println("The human player cannot have the same name as the computer player or be blank. Enter a new name for the human player: "); humanName = scan.nextLine(); } return humanName; }
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
I have two figures that I want to force to appear on the same page. What is the best way to accomplish this? Here is my MWE: \documentclass{book} \usepackage[semibold,tt=false]{libertine} \usepackage{graphicx} \usepackage{lipsum} \begin{document} \lipsum[1-4] \begin{figure} \centering \includegraphics[width=0.9\textwidth]{example-image-a} \caption{First figure}\label{fig:first} \end{figure} \lipsum[5-8] \begin{figure} \centering \includegraphics[width=0.9\textwidth]{example-image-b} \caption{Second figure}\label{fig:second} \end{figure} \lipsum[9-12] \end{document} to place both images in the same figure environment, but honestly, that doesn't seem very elegant. So I thought I'd ask the experts here!
I have two images that I would like to appear on the same page. Each figure should appear as a separate figure with its own caption. My problem is that LaTeX sometimes places the figures on separate pages. I currently have achieved this by putting two \psfragfig commands consecutively within the same figure environment. This seems a simple and succesful approach, but I wonder if I am not using the figure environment correctly by doing this. Should I use the subcaption package instead?
Here, I have a very interesting problem that I found. In triangle $ABC,$ we have $\angle B = 2\angle A.$ Prove that $b^2 = a(a+c).$ Here is how far I have gotten: Here, $\angle B= 2 \angle A$ and therefore, $\angle C = 180- 3 \angle A$. Now, I use the Law of Cosines because if I distribute out the RHS of the equation we need to prove, we get $b^2 = a^2 + ac$, which is close to what I would get by the Law of Cosines. If I use Law of Cosines, I get the following possibilities: $$ a^2 = b^2+c^2 -2bc\cdot \cos A\\ \boxed{b^2 = a^2+c^2 -2ac\cdot \cos B} \\ c^2 = a^2+b^2 -2ab\cdot \cos C.$$ Now what would I do? Thanks in advance for any help.
Prove that in a triangle $ABC$, $\angle A = \angle 2B$, if and only if: $$a^2 = b(b+c)$$ where $a, b, c$ are the sides opposite to $A, B, C$ respectively. I attacked the problem using the Law of Sines, and tried to prove that if $\angle A$ was indeed equal to $2\angle B$ then the above equation would hold true. Then we can prove the converse of this to complete the proof. From the Law of Sines, $$a = 2R\sin A = 2R\sin (2B) = 4R\sin B\cos B$$ $$b = 2R\sin B$$ $$c = 2R\sin C = 2R\sin(180 - 3B) = 2R\sin(3B) = 2R(\sin B\cos(2B) + \sin(2B)\cos B)$$ $$=2R(\sin B(1 - 2\sin^2 B) +2\sin B\cos^2 B) = 2R(\sin B -2\sin^3 B + 2\sin B(1 - \sin^2B))$$ $$=\boxed{2R(3\sin B - 4\sin^3 B)}$$ Now, $$\implies b(b+c) = 2R\sin B[2R\sin B + 2R(3\sin B - 4\sin^3 B)]$$ $$=4R^2\sin^2 B(1 + 3 - 4\sin^2 B)$$ $$=16R^2\sin^2 B\cos^2 B = a^2$$ Now, to prove the converse: $$c = 2R\sin C = 2R\sin (180 - (A + B)) = 2R\sin(A+B) = 2R\sin A\cos B + 2R\sin B\cos A$$ $$a^2 = b(b+c)$$ $$\implies 4R^2\sin^2 A = 2R\sin B(2R\sin B + 2R\sin A\cos B + 2R\sin B\cos) $$ $$ = 4R^2\sin B(\sin B + \sin A\cos B + \sin B\cos A)$$ I have no idea how to proceed from here. I tried replacing $\sin A$ with $\sqrt{1 - \cos^2 B}$, but that doesn't yield any useful results.
I've got this thing where I go around the world and hold their famous monuments with my hand through perspective photography. For example, holding the learning tower of Pisa. The pictures I've taken a while back with my Canon SD630 came out the best with both my hand and the tower in focus. Now a days, I'm using a Canon S100 and a Canon t4i. The problem is I can't get them to focus on multiple points or not focus on any points at all like I could do with my SD630. The same picture with Pisa with these two cameras, it's either my hand in focus on the tower, never both that was possible with the 630. I'm still new to photography, what's causing that and how can I get around it?
I am quite new to DSLRs and one of the first things I noticed was the incredible focus points and appearance of depth that you can achieve. That is great in a lot of scenarios, but not in all. When filming a landscape as a whole, I do not want to have the focus on that single tree, but on the whole skyline. Is there a way by which you can sort-of "disable" the focus, so that the raw image is recorded without any added blur? I suppose something as simple as this is only a small function you can turn off, but I can't seem to find it in the manual of my camera.
When I raise a confirm dialog in JavaScript, the title is somesite.com says. Is there a way (besides creating my own dialog) to remove this?
Is it possible to modify the title of the message box the confirm() function opens in JavaScript? I could create a modal popup box, but I would like to do this as minimalistic as possible. I would like to do something like this: confirm("This is the content of the message box", "Modified title"); The default title in Internet Explorer is "Windows Internet Explorer" and in Firefox it's "[JavaScript-program]." Not very informative. Though I can understand from a browser security stand point that you shouldn't be able to do this.
I was given an RGB GeoTIFF orthomosaic image that is just over 10GB. I pulled it into QGIS and tried clipping it to get under 10GB (to use in another program that only allows up to 10GB). Though when I clip it or do any other process, the output file size is over double of the orginal (24GB). I tried setting the zero values to null, but that has minimal effect. I need to keep the image as an RGB, so I cannot export it as a jpeg or png. Has anyone else run into this problem and solved it, if yes then how?
I have a geo-tiff created by Pix4D which is about 375 Mb in file size. I have clipped it to a smaller area using Qgis 2.8(using Raster ‣ Extraction ‣ Clipper), and the output file is about 900 MB in size. Why did the clipping process generate such a large file, when the source file was smaller? How do I run the clipper tool so that it produces a smaller size?
I have Office 2013 installed on one of my computers but I have misplaced the product key. It is not set up through my Microsoft account and I would prefer it not be. How can I recover the license key so I can move the installation? I've tried running cscript "C:\Program Files\Microsoft Office\Office15\ospp.vbs" /dstatus but that only gives me the last 5 characters of the product key. Obviously I need the whole thing. I've also tried using various 3rd party products (ProduKey, Magic Jellybean Keyfinder, etc), but so far all seem to fail finding Office '13 keys. Any advice?
How can I find the product keys for my Windows operating system and software installed, like Office, Adobe Creative Suite, and other software which requires an activation key?
I'm trying to use the url_rewrite system for php but, as i'm a rookie i have a conflict problem (i suppose) between rules. I have these three htaccess rules. The first two are working, the last one not. RewriteEngine On RewriteRule ^([^/]*)/([^/]*)\.html$ /site/product.php?cid=$1&n=$2 [L] RewriteEngine On RewriteRule ^([^/]*)/([^/]*)/([^/]*)\.html$ /site/product-detail.php? cid=$1&pid=$2&n=$3 [L] RewriteEngine On RewriteRule ^([^/]*)/([^/]*)\.html$ /site/news-full.php?id_news=$1&nw=$2 [L] This is how the link is set on my php page: <a href="<?php echo WEB_ROOT.$id_news."/".$name_news; ?>.html"> when i load the page, i don't have any data print on page. i tried to use also prefix but doesn't work What can i do? Thanks
This is a about Apache's mod_rewrite. Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as: Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask! How can I become an expert at writing mod_rewrite rules? What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples? A place to test your rules The web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.
If $z$ is a root of the equation $$11z^{10}+10iz^9+10iz-11=0$$ Find value of $|z|$ I assumed the root as $z=re^{it}$ We get: $$11r^{10}\cos(10t)-10r^9\sin(9t)-10r\sin (t)-11=0 \tag{1}$$ and $$11r^9\sin(10t)+10r^8\cos(9t)+10\cos(t)=0 \tag{2}$$ Any way from here?
If $11z^{10}+10iz^9+10iz-11 = 0$. Then possible value of $\mid z \mid,$ is $\bf{My\; Try::}$ Given $11z^{10}+10iz^9+10iz-11 = 0\Rightarrow \displaystyle z^9 = \frac{11-10iz}{11z+10i}.$ Now Put $z = x+iy\;,$ we get $\displaystyle (x+iy)^9 = \frac{11-10i(x+iy)}{11(x+iy)+10i} = \frac{(11+10y)-10ix}{11x+i(10+11y)}$ Now i did not understand how can i solve it, Help Required Thanks
I tried to run a perl script inside my other shell script but I have faced the following snag: Can't locate new.pm in @INC (@INC contains: /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl I have specifically set the path where the additional local perl script, i.e, "new.pm" in my Perl script (test.pl) but the error still appears. (perl -V) shows the path of my local Perl. I have further also set the the path of my "new.pm" in my profile file using the command "PERL5LIB". However, when I run the script on a command line as: ./test.pl it does work like a charm. PS. The she-bang line is properly set. PSS. Platform: linux, OS_vers=2.6.32-5-amd64
I get this error: Can't locate Foo.pm in @INC Is there an easier way to install it than downloading, untarring, making, etc?
A man is injured in a explosion and later he realizes that he has become the host of a whole civilization of aliens. The aliens help him repair himself physically and provide him with help and advice. The one thing that they will not let him do is shave with a blade because a nick would cause thousands of alien deaths so he must use an electric razor. The man eventually finds a woman who is also infected with the same kind of aliens. They go on a bender with alcohol and drugs resulting in the death of the woman but the man barely recovers. He finds out to his regret that all the aliens inside of him have been killed due to the alcohol and drug fueled episode. This was a novella or short story from the late 60's or early 70's.
Don't remember the exact start to the story, but it went something like "walking along a path" or something, and when he hears what sounds like a shotgun blast behind him, he then feels something strike him in the butt. He passes out, and when he awakens, he discovers that the "shotgun blast" was actually a miniature spaceship that exploded and shot miniature aliens into his body. The aliens prove to be very beneficial because they clean up all the toxins and other poisons in his body. They can be transmitted through kissing or sexual activity. Any help with the name of the story would be greatly appreciated. Dan
I thought that variables were destroyed as soon as their context did not exist anymore: function foo () { let bar = "something" return bar } Like in this example, I thought that bar was destroyed as soon as the function got executed. But now, I discovered that you can write this in Javascript: function foo () { let bar = "something" return { print () { console.log(bar) } } } let f = foo() f.print(); This code prints "something". So I wonder now how javascript handles its memory. Why bar does not get destroyed at the end of the function? Now, if I write something like: function foo () { let bar = "something" let hugeVar = _.range(1,1000*1000*1000*1000) // A huge array return { print () { console.log(bar) } } } Is hugeVar still in the memory? How Javascript decides what to keep and what not to keep?
How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves? I have seen given on Wikipedia, but unfortunately it did not help.
Which is the correct way of saying this in English? I haven't got any money. I don't have any money. If both are correct, which is the difference between them?
When do I use have and have got? Are "I have the answer" and "I've got the answer" both correct?
Has the Community user become self aware? Do we need to pull the plug now, before it starts self replicating and decides to take over humanity? Ok, more seriously, I just noticed that the Community user has fixed some grammar on an answer on aviation: Is this a new feature? What is it's scope? How does it decide to do this? I've been using stackexchange sites for a long while, and I've never seen this before
It seems that by the OP of was attributed to the community user. I'm assuming that the edit was by the OP from the edit summary: updated my question and from the actual update. Both texts are speaking in the first person.
I accidentally deleted all data rows from a important table. But unfortunately, the last backup of the database was done last week. I have tried several ways, namely by looking at the transaction id and returning it with a query. but from the review I can also be more dangerous because it can eliminate some data How can I restore the data that I deleted?
I mistakenly deleted around 2,000,000 records from a remote SQL Server 2008 table. The server is not granting me access to the backup files on the server side. Is there any way to get back these records?
I would like to random sort a List<MyObject>. Is it possible ? I though about another solution, using specific random number: I mean, if I could do something like that : random.next(1, 2, 3, 4, 5, 6) If this call return 3, I could set the next call random.next(1, 2, 4, 5, 6) without the 3 which could return me anything excepted 3, etc... Then I could finish to disordered my own List. Thanks
What is the best way to randomize the order of a generic list in C#? I've got a finite set of 75 numbers in a list I would like to assign a random order to, in order to draw them for a lottery type application.
I have an Acer Aspire VX 15 (Intel Core i7, NVidia Geforce GTX 1050, 32 Gb RAM, HDD 1Tb). I had Ubuntu 17.10 installed and everything was working fine. Then I upgraded to Ubuntu 18.04 and now, after I login via GDM (in graphics mode) the system halts. It becomes completely frozen. However, if I press Ctrl+Alt+F2, switch to text mode, and then login in the console, the system works fine (in text mode) and do not halt. Does anybody else has a similar problem? Do you know how to fix this or how I can diagnose the problem?
After the restart step of upgrading Ubuntu to 18.04, tty is opening instead ubuntu-desktop. And when I enter my login name and password, I am still in the tty. This is happening again in every restart. How can I start the graphical desktop as normal?
For an arbitrary number of dimensions, I know that the mean minimizes the distance using the $L_2$ norm and that the geometric median minimizes the distance function using the $L_1$ norm (though I have yet to find a good proof of this). So what minimizes the $L_{\infty}$ (or Chebyshev) norm? []
Warning: at Statistics SE. Given vector ${\rm a} \in \Bbb R^n$, $$\begin{array}{ll} \displaystyle\arg\min_{x \in {\Bbb R}} & \left\| x {\Bbb 1}_n - {\rm a} \right\|_2^2\end{array} = \frac1n {\Bbb 1}_n^\top {\rm a} \tag{mean}$$ is the (arithmetic) mean of the entries of vector ${\rm a} \in \Bbb R^n$, whereas $$\begin{array}{ll} \displaystyle\arg\min_{x \in {\Bbb R}} & \left\| x {\Bbb 1}_n - {\rm a} \right\|_1\end{array} \tag{median}$$ is a median of the entries of vector ${\rm a} \in \Bbb R^n$. Using the $\infty$-norm instead, what is the following? $$\color{blue}{\boxed{\,\\\begin{array}{ll} \displaystyle\arg\min_{x \in {\Bbb R}} & \left\| x {\Bbb 1}_n - {\rm a} \right\|_{\infty}\end{array}}}$$ It appears to be the . I append a proof based on linear programming. Assuming that I have made no mistakes and my proof is indeed correct, I am interested in other proofs and in references. My proof $$\begin{array}{ll} \underset{x \in {\Bbb R}}{\text{minimize}} & \left\| x {\Bbb 1}_n - {\rm a} \right\|_{\infty}\end{array} $$ Introducing optimization variable $y \in {\Bbb R}$, $$\begin{array}{ll} \underset{x, y \in {\Bbb R}}{\text{minimize}} & \qquad\qquad y\\ \text{subject to} & -y {\Bbb 1}_n \leq x {\Bbb 1}_n - {\rm a} \leq y {\Bbb 1}_n\end{array} $$ or, alternatively, $$\begin{array}{lrl} \underset{x, y \in {\Bbb R}}{\text{minimize}} & y & \\ \text{subject to} & {\rm a} & \leq (x + y) {\Bbb 1}_n \\ & (x - y) {\Bbb 1}_n & \leq {\rm a}\end{array}$$ Let the entries of vector ${\rm a} \in \Bbb R^n$ be denoted by $a_1, a_2, \dots, a_n$. Note that there are many redundant inequalities: the set of $n$ inequalities ${\rm a} \leq (x + y) {\Bbb 1}_n$ can be replaced by $$x + y \geq \max \{ a_1, a_2, \dots, a_n \}$$ the set of $n$ inequalities $(x - y) {\Bbb 1}_n \leq {\rm a}$ can be replaced by $$x - y \leq \min \{ a_1, a_2, \dots, a_n \}$$ Hence, $$\begin{array}{ll} \displaystyle\arg\min_{x \in {\Bbb R}} & \left\| x {\Bbb 1}_n - {\rm a} \right\|_{\infty}\end{array} = \color{blue}{\frac{ \min \{ a_1, a_2, \dots, a_n \} + \max \{ a_1, a_2, \dots, a_n \} }{2}}$$ Some call this value the of $\{ a_1, a_2, \dots, a_n \}$. Related
I am getting id from URL like this. Both are object. If I recognize it like id[0] then it gives me datatype String But as a human I can understand one is String and another is Integer. How can I recognize it with JS Code?
I'm hoping there's something in the same conceptual space as the old VB6 IsNumeric() function?
I'm running Ubuntu 13.10 on a laptop. Recently, after waking from sleep, I noticed the computer was quite warm, checked top and discovered 1.00 load average. I shutdown Chrome, various daemons, no effect. I rebooted and fired up a terminal and checked top again, and watched the load quickly spike to 1.75, and slowly settle down back to around 1.0 - 1.2: top - 09:49:17 up 36 min, 2 users, load average: 1.01, 1.10, 1.01 Tasks: 267 total, 1 running, 266 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.9 us, 0.4 sy, 0.0 ni, 98.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem: 8069288 total, 2885572 used, 5183716 free, 123652 buffers KiB Swap: 7711332 total, 0 used, 7711332 free, 1661816 cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1420 root 20 0 589m 144m 131m S 3.4 1.8 0:36.49 Xorg 6233 user1 20 0 986m 83m 31m S 2.7 1.1 0:19.89 chrome 3708 user1 20 0 749m 19m 12m S 1.8 0.3 0:06.58 gnome-terminal 3526 user1 20 0 1350m 67m 28m S 1.4 0.9 0:26.19 compiz 4014 user1 20 0 1022m 126m 52m S 1.1 1.6 0:44.34 chrome I checked /proc/loadavg manually, same story: sudo cat /proc/loadavg 1.20 1.16 0.99 3/614 6254 ps auxwwwf doesn't show any process consuming more than 6.0% of CPU. iostat: avg-cpu: %user %nice %system %iowait %steal %idle 0.63 0.00 0.13 0.00 0.00 99.25 Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 scd0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 free -m: total used free shared buffers cached Mem: 7880 2841 5039 0 120 1651 -/+ buffers/cache: 1068 6811 Swap: 7530 0 7530 Clearly some process is saturating CPU, but it doesn't seem to show up on the process list. Some sort of hidden Linux filesystem checker? Rootkit? Any ideas how to find the process in question?
I'm getting the following output from top: Cpu(s): 43.8%us, 32.5%sy, 4.8%ni, 2.0%id, 15.6%wa, 0.2%hi, 1.2%si, 0.0%st Mem: 16331504k total, 15759412k used, 572092k free, 4575980k buffers Swap: 4194296k total, 260644k used, 3933652k free, 1588044k cached the output from iostat -xk 6 shows the following: Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util sda 0.00 360.20 86.20 153.40 1133.60 2054.40 26.61 1.51 6.27 0.77 18.38 sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sdd 22.60 198.80 17.40 31.60 265.60 921.60 48.46 0.18 3.70 1.67 8.20 sdc 16.80 218.20 22.20 23.40 261.60 966.40 53.86 0.21 4.56 1.49 6.78 Based on the above it looks like something must be overloaded. But what? Questions If its not the harddisk or the CPU then what? It seems as though 15.6% of the CPU's time is spent waiting. What exactly could it be waiting for?
I didn't read books, but I have seen movies with Harry Potter. I understand that he is the main character. What I don't understand is that everyone treats him as someone very important. For example, his professors are talking to him like to someone equal to them (equal status and knowledge). There are so many kids in the university. Why everyone talks to him as some kind of super-genius? I can't point to exact scene, since I am not that big fan. But this pattern repeats through the movies. Ok, I just remembered the scene where the white beard wizard in Halfblood prince, takes Harry to that dangerous place, to drink watter and get that watch. Why didn't he take someone else, a colleague professor, or someone powerful?
The full prophecy by Trelawney, the part my question is about in bold: "The one with the power to vanquish the Dark Lord approaches ... born to those who have thrice defied him, born as the seventh month dies ... and the Dark Lord will mark him as his equal, but he will have power the Dark Lord knows not ... and either must die at the hand of the other for neither can live while the other survives ... the one with the power to vanquish the Dark Lord will be born as the seventh month dies ..." – Sybill Trelawney (to Dumbledore) I am interpreting for neither can live while the other survives as: Harry can't live while Voldemort survives and vice versa. But why? It clearly worked until the end of book 7. One could argue with Dumbledore's thery of the self-fulfilling prophecy. But clearly Voldemort was smart enough to see that there was no mechanism that would kill him just because Harry stayed alive. and either must die at the hand of the other Again: Why? If somebody else destroyed all Horcruxes and then killed Harry, Voldemort would be just as vulnerable and could be killed by anyone. On the other hand, Harry could have been killed by anyone - his mum's protection transferred to Voldemort by Harry's blood was only helping against Voldemort. I guess that I am interpreting this part of the prophecy in the wrong way or maybe there is an alternate, less obvious and more tricky one. So my question is: What exactly does the highlighted part of Trelawney's prophecy state?
Lee and Ron are born as perfectly identical twins except for Lee being left handed and Ron being right handed. Years after birth they are seperated, Lee moving to Latvia and Ron moving to Rwanda. At one time they are both writing but suddenly God makes Ron switch his pen from his right to his left hand and continue to write perfectly. Since God has the principle of not allowing perfect "perfect" twins to exist he must at the same instant make Lee switch his pen to the other hand. Is this understanding of the result of correct? Does it conform with the concept of the universe keeping books about all states, God being the book keeper, or the concept that all events/states exist at all times in parallel universes, but time only reveals a specific state/universe (like all the action in a movie is there but you can only see one scene at a time)? Maybe I have totally misunderstood, what I have read, so please correct me (in layman terms - if possible)!
What is ? Please be pedagogical. Edit: I have updated my background under my profile.
My question was how to insert in an existing live ISO those two folders and not "How to customize the "the whole" Ubuntu live CD?" Having to install all the tools so that you can do it, and so forth. Is this the only option from scratch? No other way without installation of additional software to insert some line of code in some other ISO config file, telling it from where should be copied into the /home/ folder? Or just simple to execute some shell file while ISO is still loading to copy straight into the home folder, those necessary folders. How can this be done? Without the suggested link? I do not wish to install anything, so that later I have to purge again. I need an Ubuntu Live CD version with my own configuration files on it. Even an Ubuntu standard distro version is OK. Must not be mine personal. When I boot with a live CD and copy that inside the /home/, relogin it works fine, but I've to do this every time and that just drives me crazy. And sometimes I forget to bring with me those config files. So I'm trying to insert .config and .mozilla inside Ubuntu/Lubuntu Live CD (that is the config that I already have configured myself from OpenBox, panels, Mozilla plugins etc. and so on). I've looked everywhere and just can't find the solution. I tried on my own, but no luck. In worse case scenario, it will not boot. I just don't know what to touch and what to do. I am not interested to assign any additional space for it on Live USB (from zero to xyz GB), as you can do that with Pen Drive Linux aka Universal USB Installer and others. Why? Well from my experience: Well because it makes it too slow immediately. USB flash even if USB 3.0 is too slow for me. It drives me nuts like win10. And because I need it as a CD/DVD version too. I want to inject everything into a RAM (my 16 GB DDR4 works fine with it).
I would like to customize Ubuntu live CD by installing some additional packages. I have followed but it doesn't seems to work. Can anyone provide clear instructions? Note: I do not prefer Remastersys, manual way will be appreciated. Customization Packages that I want to install: Thunderbird Samba SSH Changes that I need: Remove Games menu from the Application menu Firefox shortcut on Desktop Radiance as the default Theme Different default Ubuntu Wallpaper Configuration file changes I want the panel to be placed at the bottom I want to paste my Samba configuration file instead of default Samba configuration I have few Firefox shortcuts and folders I would like to show that in Desktop Also it will be nice if you say me how to change the icon sets Recent Updates I have customized Ubuntu 10.10 with Firefox shortcuts and few folders on desktops. Everything went smooth. But the installer gets crashes after choosing the timezone. How do i fix this issue? Also setting wallpaper affects the login screen. The wallpaper which i set is displayed on the login screen also. I just want the default one for the login screen.
If there is only one star in the universe then is the metric at the center of the star flat?
The idea that as you move through the earth you get a symmetric cancelling of gravitational acceleration which approaches zero acceleration due to gravity at the center of the earth makes a lot of sense I think. I also think that is a pretty easy idea to understand physically. On the other hand, I am just beginning to study and understand the general relativistic explanation for gravity and I'm wondering how this same idea is explained using general relativity. That is, what is the explanation for why gravitational acceleration decreases (linearly if I'm not mistaken) as you approach the center of the earth using general relativity? Specifically, I would like to understand what is going on with the curvature of spacetime in this scenario? Is it becoming less curved? Some math would be appreciated in answers!
I am an engineering student who's basic math skills are struggling to solve the definite integral of the product of a power function with a Weibull function: $$\int_{v_1}^{v_2} A*v^{k+2}* e^{-(v/c)^k} dv$$ The function describes the power output of a wind turbine between wind speeds $v_1$ and $v_2$, both >0. $A$, $k$ and $c$ are constants, all >0. I did look at but cannot make sense of the $\Gamma$ function with two arguments. Thanks a lot for any help, ideally with a step-by-step guide :-)
I am having trouble integrating a weibull function multiplied with a production function. The expression shortened for integration is as follows: $$v^{k+2}e^{-\left(\frac{v}{y}\right)^k}$$ I hope you can read the expression and help with the question.
The /boot partition is on 100% use and there is 0 available for it. Does anyone know what I should do to free up some space?
My first issue was when I tried to apt-get update or apt-get upgrade. On upgrade I get the following error: You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: linux-image-server : Depends: linux-image-3.2.0-27-generic but it is not installed E: Unmet dependencies. Try using -f. I tried running apt-get install -f and this was the output(after saying yes on prompt) (Reading database ... 186183 files and directories currently installed.) Unpacking linux-image-3.2.0-27-generic (from .../linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb) ... Done. dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb (--unpack): failed in write on buffer copy for backend dpkg-deb during `./boot/System.map-3.2.0-27-generic': No space left on device No apport report written because the error message indicates a disk full error dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-27-generic /boot/vmlinuz-3.2.0-27-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-27-generic /boot/vmlinuz-3.2.0-27-generic Errors were encountered while processing: /var/cache/apt/archives/linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) I tried running apt-get autoremove and it gives me the same error as apt-get upgrade. When I run df, I get this for /boot: /dev/sda1 233191 230297 0 100% /boot So, I read elsewhere that I should try to purge old kernels. I checked for what kernels I had with: $ dpkg -l linux-image-\* | grep ^ii ii linux-image-2.6.38-13-server 2.6.38-13.52 Linux kernel image for version 2.6.38 on x86_64 ii linux-image-3.0.0-13-server 3.0.0-13.22 Linux kernel image for version 3.0.0 on x86_64 ii linux-image-3.0.0-14-server 3.0.0-14.23 Linux kernel image for version 3.0.0 on x86_64 ii linux-image-3.0.0-15-server 3.0.0-15.26 Linux kernel image for version 3.0.0 on x86_64 ii linux-image-3.0.0-16-server 3.0.0-16.29 Linux kernel image for version 3.0.0 on x86_64 ii linux-image-3.0.0-17-server 3.0.0-17.30 Linux kernel image for version 3.0.0 on x86_64 ii linux-image-3.2.0-24-generic 3.2.0-24.39 Linux kernel image for version 3.2.0 on 64 bit x86 SMP ii linux-image-3.2.0-25-generic 3.2.0-25.40 Linux kernel image for version 3.2.0 on 64 bit x86 SMP ii linux-image-3.2.0-26-generic 3.2.0-26.41 Linux kernel image for version 3.2.0 on 64 bit x86 SMP When I try to remove the oldest with this: $ sudo apt-get purge linux-image-2.6.38-13-server Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: linux-image-server : Depends: linux-image-3.2.0-27-generic but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). How can I free up or extend boot without messing up my installation?
I recently got a laptop and want to install an SSD () from my old machine. So, right now, whenever I start it, it takes me to a menu where it shows what storage device I want to load from. But regardless of whatever I choose it doesnt load anything, restarts my computer and takes me back to the same menu. In order for me to start Windows I have to go to the BIOS and change SATA controller mode from ACHI to IDE if ACHI was previously chosen or IDE to ACHI if IDE was previously chosen. What can I do to fix this besides getting a new SSH? Also, I updated my BIOS and it didn’t make any differences.
After purchasing a Lenovo Ideapad Flex 2 14, I tried to upgrade it and replaced the HDD with an SSD from my older laptop. After putting in the SSD, I encountered a numerous amount of problems. First, the Windows installation program didn't see the SSD, even the Diskpart utility didn't see it, so I decided to install Ubuntu instead, which was installed successfully. Everything was fine, but after messing around with the BIOS, the laptop wouldn't load the OS unless I first went into BIOS and exited it. Windows still never saw the SSD, even after I installed Ubuntu on it and then tried to install Windows again. What could be the problem? Also, the HDD that came with this laptop works just fine, and the SSD works in another laptop just fine, too. The SSD is Intel 335 series 240GB. I'm gonna try to install Windows 7 a little later and see if that will work, but other than that I've already wasted an entire day trying to figure it out.
Here is my defaultuser service class I want the difference to be stored in hh:mm:ss format in database (I'm using spring mvc+hibernate) @Override @Transactional public LoginLog punchLogoutTime(User user) { LoginLog log = getOpenUserLoginLog(user); log.setLogoutTime(new Date()); long diff=log.getLogoutTime().getTime()-log.getLoginTime().getTime(); log.setTotalTime(diff); log = loginLogDao.update(log); return log; } Here is my pojo class.I take totaltime as long. @Column(name = "total_time") private Long totalTime; public Long getTotalTime() { return totalTime; } public void setTotalTime(Long difference) { this.totalTime = difference; } Please tell me appropriate answer .Thanks:)
I'd like to format a duration in seconds using a pattern like H:MM:SS. The current utilities in java are designed to format a time but not a duration.
First-order phase transitions like solid-fluid can be understood as breaking of translational symmetry into lattice symmetry (also rotations into discrete rotations). The characteristic of these transitions are latent heat. In general the first derivative of the free energy diverges. Second-order phase transitions can be phenomenologically modeled using Landau-Ginzburg formalism. Here spontaneous breaking of symmetry gives rise to different phases of matter. Spontaneous symmetry breaking predicts the values of the critical constants to a good approximation. We also know a few examples of third-order phase transitions. To list a couple, we have the Gross–Witten–Wadia and Douglas–Kazakov large-N phase transitions. I was trying to understand if this phase transition can also be explained in terms of symmetry breaking. Are there known arguments in literature which explain third order phase transition from this viewpoint? EDIT: I found my answer
$F=\frac{a}{2}m^2+\frac{u}{4}m^4+\frac{v}{6}m^6-hm$, where $F$ is the free energy, $m$ is the order parameter, $h$ is the external field, $a=a_0(T-T_c)$, and $a_0>0,u>0$ and $v>0$.We know this free energy expansion describes a second-order phase transition. How to write down a free energy such that the transition is a third-order phase transition?
I am Android developer and recently i remove ubuntu 13.10 and install new ubuntu 14.04 LTS. Every things working good when i use ubuntu 13.10. There is no hardware issue in my side. Now i only install Java JDK, Virtual Box, Genymotion for android virtual device, and Eclipse SDK of Android. When i start developing on eclipse, genymotion device, after some time ubuntu 14.04 LTS gone freeze,i cannot have any control to switch anythings. I search on google and also in many communities, forums but they only give answer like what to do after Ubuntu freeze, some answer like , (this is good but not proper things.) they do not tell me how to avoid or remove freeze problem happened in ubuntu 14.04. is there any solution to avoid this problem ? My System Configuration is : Intel Pentium 2.9 GHz Processor, 8 GB RAM, 500 HDD. if there is any solution please tell me because this problem is generating 2 to 3 times in hour of work. thanks in advance.
All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when... just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an In what order should I try various solutions before deciding to pull the power plug? What should I do when starting up Ubuntu fails? Is there a diagnostic procedure I can follow?
I'm using Python's multiprocessing package to set up worker threads to do work and update the result to a MySQL database. What's the right way to set this up so that a database connection is not re-established each time a worker thread is initialized?
I have developed some custom DAO-like classes to meet some very specialized requirements for my project that is a server-side process that does not run inside any kind of framework. The solution works great except that every time a new request is made, I open a new connection via MySQLdb.connect. What is the best "drop in" solution to switch this over to using connection pooling in python? I am imagining something like the commons DBCP solution for Java. The process is long running and has many threads that need to make requests, but not all at the same time... specifically they do quite a lot of work before brief bursts of writing out a chunk of their results. Edited to add: After some more searching I found which looks decent, but as I'm relatively new to python I guess I just want to make sure I'm not missing a more obvious/more idiomatic/better solution.
Show that $2222^ {5555} + 5555 ^ {2222}$ is divisible by $7$. I tried factorizing but it didnt lead to anything. Can divisibility rules be used? Any ideas please tell me.
What will be the ones digit of the remainder in: $$\frac{\left|5555^{2222} + 2222^{5555}\right|} {7}$$
I've been attempting to render my 2D animation by selecting "render", "render animation", but I can't see where to proceed from there. Is there a way for me to save the render or export the animation as a video file rather than a .blend file?
Yesterday I was working on a simple animation, an animated logo. Here is an image of the progress: I already have the animation working and everything is okay with the project, but I can't figure out how I can render the animation and turn it into an AVI format video. How do I render an animation in Blender?
When I create a new object and I go to the options window that pops up to modify the object in the bottom left of the screen, the window completely disappears the moment I left click on any value in that window to change it. It used to work fine. I have restarted both program and computer.
hello everyone I have a little problem, how do I bring up the menu in the circle? when I select another object the menu becomes non-existent
An electron has a mass of $9.10938291(40) \times 10^{−31} kg$. It also has a volume of $0 m^3$. This would imply it has infinite density. Shouldn't that make it collapse into a black hole? Why doesn't it?
For something to be a blackhole, it must have gravity and the radius must be smaller than the schwarzschild radius for its mass. -Electrons have gravity -Electron are theoretically believed to be infinitely small points Since it has gravity it is capable of being a black hole. Since its radius is infinitely small, it must have a schwarzschild radius and thus be a black hole.
Updated I've updated the question because it was not clear and some of you gave me hints.What i originally want to achieve is the following example on visualforce page I want them to be grouped and rendered as: -Family -Brand -Product1 -Product2 -Product3 -Family -Brand -Product1 -Product2 -Product3 I am trying to create a visualforce page that will group products by Family/Brand. Can anyone advise me how or what is the easiest way to do this? I am trying to render the page as PDF for my sales team. Controller public with sharing class StandardProductDisplayController{ public List<Product2> records {get; set;} public StandardProductDisplayController(){ records = [select Name, ProductCode, Brand__c, Family from Product2 order by Family]; } } Apex <apex:page controller="StandardProductDisplayController" renderAs="pdf"> <apex:pageBlock title="Product List"> <apex:pageBlockTable value="{!records}" var="record"> <apex:column > <apex:facet name="header">Product Name</apex:facet> <apex:outputText value="{!record.Name}"/> </apex:column> <apex:column > <apex:facet name="header">Product Brand</apex:facet> <apex:outputText value="{!record.Brand__c}"/> </apex:column> <apex:column > <apex:facet name="header">Family</apex:facet> <apex:outputText value="{!record.Family}"/> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:page>
I have a List of records of type abc__c. abc__c is a custom object. The record has a field called code__c. What I am trying to accompolish is to group the records in the list based on the code__c. For example the list might have : Code__c abc__c record 30 (Record 1) 40 (Record 2) 40 (Record 3) 50 (Record 4) 30 (Record 5) I want to group these records based on Code__c in a Map. There could be any number of code__c which is populated dynamically. It is not static. how can I loop through the list and store the records as a list for a particular code__c(Id) in Map?
Let's Assume I have DataTable /SQL Table(MicroSoft SQL) that represents employee information for example which contains firstname,lastname,age,company,yearsofexperience,Degree I want to combine information based on firstname,lastname,age company,yearsofexperience,Degree must be concat into corresponding cell firstname lastname age company yearsofexperience Degree john muller 21 IBM 4years MBA jan tonny 22, MSoft 1years MS martin tata 21 apple 2years PHD john Muller 21 sony 3years MBA james muller 21 IBM 4years PHD jan tonny 22 Telsa 1years BS martin tata 21 sun 2years MBA james Muller 21 TCS 3years BS Note:MS SQL solution not Mysql Please find me way to remove the duplicate rows and make other data concat in particular column For example in from above example I want combine the information present in the similar other 3 entries firstname lastname age company yearsofexperience Degree john muller 21 IBM,sony, 4years,3years, MBA,MBA jan tonny 22, MSoft,Telsa 1years,1years MS,BS martin tata 21 apple,sun 2years,2years PHD,MBA james muller 21 IBM,TCS 4years,3years PHD,BS Right I am looking for what is best ways to implement this Its good approach if I Split the Tables in to 2 different tables? may be based on Primary key match. we can con cat other entries ? Please help me out thanks(+1) in advance
I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life). In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently. group_concat, by the way, does this: given a table of, say, employee names and projects... SELECT empName, projID FROM project_members; returns: ANDY | A100 ANDY | B391 ANDY | X010 TOM | A100 TOM | A510 ... and here's what you get with group_concat: SELECT empName, group_concat(projID SEPARATOR ' / ') FROM project_members GROUP BY empName; returns: ANDY | A100 / B391 / X010 TOM | A100 / A510 So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat? I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)
I have a Lenovo z570 running ubuntu 12.10 with a battery life approximately 1hr 30 min. Please help me maximize the battery life of my lenovo
This question is present as a matter of historical interest. While you are encouraged to help maintain its answers, please understand that "big list" questions are not generally allowed on Ask Ubuntu and will be closed per the . It is possible to greatly extend the usage time of a laptop or netbook running on battery by disabling various services and installing various packages. What tricks or tips do people have for getting an extra hour or two out of their batteries?
I watched this on the Sci Fi Channel - SYFY UK about 15 years ago. It ended with a giant mech battle. The bad guys' mech was powered by holy men (that chanted to keep it working). The good guys' mech was linked to him and controlled by his mind. Also the main villain in the giant mech, pretended to be an idiot at the beginning until he poisoned his family so he could become king.
This is all I can remember. There are four worlds whose people and technology were all swapped so humans ended up with high tech mech suits that they used to kill each other. There was a supposedly handicapped prince who faked being mentally handicapped and had a giant mech suit hidden underground that he eventually used to wreak havoc on earth. The protagonist also had a suit and he saved the day. He was in love with a girl who was from another world and when he saved the day, all the people and technology from the different worlds were sent back to their original one causing the girl to leave him. She had colored hair and the final scene was her waking up somewhere with some children commenting on her hair. There may or may not have been a reference to the protagonists scars in the shape of the constellation of orion on his body. Any ideas? I've searched the internet for two years trying to find it.
In England there are Yorkshiremen who know "aught from naught" and in general have the reputation of being hard to fool or cheat. Years ago I wrote to the editors of The New Scientist and asked if Yorkshiremen were anything like Missourians (from The Show Me state) and while they seemed intrigued, I never got an answer. So, where would I ask this so that someone who knows England and the USA folk culture might see and answer this?
Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.
They are seems to be similar in meaning, however in a specific context Googling vote for the first. ... teaching users for free. I think free of charge(s) is more appropriate choice but I couldn't find convincing support for the idea. Are those really equivalent and what is the best for the context? Is there another alternative?
A friend claims that the phrase for free is incorrect. Should we only say at no cost instead?
Please help me with steps as i want to use Ubuntu and remove Windows 10 from my lappy. Thank you in advance
I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS. Should I do it with Wubi, or through the Live USB/DVD? What steps do I need to take to correctly install Ubuntu?
Consider this: I call my friend at his home and his mother picks up. What is the right thing to say? Hello, may I speak to Daryl? Or Hello, may I talk to Daryl? Similarly, Hello, may I speak with Daryl? Or Hello, may I talk with Daryl? The choice of words always gets me thinking during a phone call. Which of these should be used?
There are a number of questions e.g. and that deal with the slightly different connotations of the words "speak" and "talk". However, there also seem to be some grammatical differences between the two words. This question is about whether there's a way to formally pin down these differences, or whether they're just contingent features of the two words having different histories. Some examples of grammatical differences are as follows: be talkative ... be speakative speak French ... talk French give a talk ... give a speech (as opposed to a speak) speak up ... talk up (the meanings of the two phrases being completely different, with "up" being a preposition only in the latter case) speaking of which ... talking of which grammatically speaking ... grammatically talking On the other hand, many other constructions work just as well with either (though they might have subtly different meanings), for example speak to ... talk to speak with ... talk with speak about ... talk about I'm interested in whether there's a way to pin down these differences (e.g. are the two words classified as different types of verb in some way?), or whether they're essentially just arbitrary. I'm also interested in why we have these two different words with subtly different meanings. Is the distinction between “speak” and “talk” a feature of many languages, or is it just a peculiarity of English? Etymologically, both words are from Germanic origins. “Talk” seems to have been formed from the Middle English tale, even though “speak” already existed in the English language by then (as far as I can tell). This makes it even more mysterious: Why did we form a new word as a synonym of one that was already established? Or were the meanings different at that time?
Suppose I have an object as: var obj = { len: 4, bred: 5 } Now suppose I assign this object to a variable x as var x = obj;. As far as I understand it, it creates a copy of obj and assign that copy to x — that is pass by value. Now If I change a property of x then it changes that property of the obj object too. E.g. x.len = 99 Then both obj.len and x.len become 99. On the other hand consider this scenario: var r = 2, s = 3, t = 4; s = r; s = 88; Now r is passed by value to s that s a copy of r was given to s. So changing s to 88 doesn't change the original value of r variable. Typing r in the console still gives 2. Question 1: If variables (objects included) are passed by value in JavaScript then why does changing x.len change the original obj.len, too? Another problem is that I cannot change an object's property when assigning to a variable. Consider this scenario: var obj2 = { len: 4, bred: 5 } var x2; x2 = obj.len; Now typing x2 in console simply returns 4. But if I try to change the value of x2 such as x2 = 77; then that doesn't change obj2.len. Question2: Why can't I change object's property with a variable?
The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself). Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?
I noted there are some similar questions for my problem on this list, but none of them solve my issue. So I post it here again: Hi, I try to compile LaTeX thesis use the following steps: $ git clone https://gitlab.kwant-project.org/jbweston/thesis.git thesis.git $ cd thesis.git $ make [...] ! Package mathspec Error: `amsmath' must be loaded earlier than `mathspec'. See the mathspec package documentation for explanation. Type H <return> for immediate help. ... l.54 \RequirePackage{amsmath} ? No pages of output. Transcript written on build/thesis.log. make: *** [Makefile:14: thesis.pdf] Error 1 Any hints for solving this issue? Regards
See the following mwe: \documentclass{article} \usepackage{amsmath} \usepackage{mathspec} \usepackage{unicode-math} \begin{document} \begin{equation*} 1 + 2 = 3 \end{equation*} \end{document} Run the above code with xelatex will meet the following error: ! Package mathspec Error: `amsmath' must be loaded earlier than `mathspec'. See the mathspec package documentation for explanation. Type H <return> for immediate help. ... l.54 \RequirePackage{amsmath} ? $ xelatex --version XeTeX 3.14159265-2.6-0.999991 (TeX Live 2019) Regards
In Mac I use purge to free up some memory. What is equivalent to it in Linux(Ubuntu Server)? apt-get install purge gave me nothing. If you are no familiar with Mac's purge here is it's man page: purge(8) BSD System Manager's Manual purge(8) NAME purge -- force disk cache to be purged (flushed and emptied) SYNOPSIS purge DESCRIPTION Purge can be used to approximate initial boot conditions with a cold disk buffer cache for performance analysis. It does not affect anonymous mem- ory that has been allocated through malloc, vm_allocate, etc. SEE ALSO sync(8), malloc(3) September 20, 2005
Prior to doing some benchmarking work how would one free up the memory (RAM) that the Linux Kernel is consuming for its buffers and cache? Note that this is mostly useful for benchmarking. Emptying the buffers and cache reduces performance! If you're here because you thought that freeing buffers and cache was a positive thing, go and read . The short story: free memory is unused memory is wasted memory.
I am trying to find the average time complexity for the Fibonacci series using mathematical approach. The best case is O(1), while the worst case is O(2^n). The Average case can be found by dividing the sum of times of all cases by the number of cases. So, I believe that the average case can be found like this(using the sum of geometric series): Thus, it should be still O(2^n) . Can you please tell me if my calculations and approach are correct? The sample code for the Fibonacci() is shown below. def Fibonacci(n): if n==1: return 0 elif n==2: return 1 else: return Fibonacci(n-1)+Fibonacci(n-2)
I understand Big-O notation, but I don't know how to calculate it for many functions. In particular, I've been trying to figure out the computational complexity of the naive version of the Fibonacci sequence: int Fibonacci(int n) { if (n <= 1) return n; else return Fibonacci(n - 1) + Fibonacci(n - 2); } What is the computational complexity of the Fibonacci sequence and how is it calculated?
I know that Ubuntu is secure, but I'm worried about my passwords when I login to my yahoo email, or my facebook. Do I need an antivirus on Ubuntu to be password protected when navigating over the internet?
I thought that there was no need to scan for viruses either in Ubuntu or any Linux distros until I found virus scanner packages clamtk and klamav in Ubuntu software center yesterday. This leads to the following questions: How do viruses differ between Linux and Windows? How do the strategies for protection differ between Linux and Windows? Should a virus scanner package be installed on my system? If so, which would be a better option?
Let's say I have a string like this: $css = '.class { color: red; } /* Start Comment */ .replace { content: "me"; } /* End Comment */'; How can I remove everything inside the comment, including the comment itself? I want this result: .class { color: red; } I've tried something like this, but it doesn't do it: $css = preg_replace( '#(/* Start Comment */).*?(/* End Comment */)#', '', $css ); I've also tried this: Am I missing something ridiculously obvious here? Really appreciate any feedback - regex is something I need to study further.
For example, this regex (.*)<FooBar> will match: abcde<FooBar> But how do I get it to match across multiple lines? abcde fghij<FooBar>
I want to install a new version of Ubuntu without deleting my old apps and without changing my system settings. How can I do that?
Question is about Ubuntu release process. Are migrations from n to n+1 releases expected? Assuming we have server with installed Ubuntu 14.04 LTS. Will it be smoothly upgradable to Ubuntu 16.04 LTS via apt-get upgrade ? Assumptions: scope is software therefore we assume that given hardware is supported on both releases (upgrading from and to) that's why, always before upgrade you are asked to make backup to be able to revert in case of failure
This might sound little lame, Anybody please explain(if possible with example) what is a good photograph ? How we can decide a photo which is good ? for an example if you are in a Deciding panel how you would decide or elect a photo as winner of a photography contest ? What are the technical aspects that we need to consider ? Not considering taste here How actually judges judge theses photos. Thanks in advance.
I don't know if this is a stupid question, this just came across my mind. Imagine a photo of a dog yawning. Someone could say that is a very good photo as it is taken just at the right moment, from a perfect angle (eg. level with the dog) and it has a shallow depth of field focusing on its face. Someone else might dislike it because unfortunately the dog is ugly. So from that example I could say people look at the following elements when judging a photo (but I could be wrong): The timing (if it's taken at the right moment) The angle it's taken from (composition?) DOF (composition?) The subject (eg. whether the dog is pretty) I am interested to know what experts think the elements you look at when judging whether a photo is a good photo. Thanks in advance for your comments.
I am very new to Blender add-on development and having some trouble getting mine to actually show up and or enable I want it to show-up here: import os import bpy bl_info = { "name" : "CudaParticals", "author" : "Max Oltersdorf", "description" : "Enables the use of NIVIDA CUDA for Large realistic Particle Simulations", "blender" : (2, 80, 0), "version" : (0, 0, 1), "location" : "Properties", # This is a new tab in the "properties section" "warning" : "IN EARLY DEVELOPMENT", "category" : "SYSTEM" #"wiki_url": "'https://github.com/OltersdorfTechnology/CudaParticals/wiki'", #"tracker_url": "https://github.com/OltersdorfTechnology/CudaParticals/issues", "support": "Testing", } from bpy.types import ( Operator, Panel, PropertyGroup, ) from bpy.props import ( BoolProperty, EnumProperty, Pointe # Define the interface class CudaParticlePanel(bpy.types.Panel): bl_idname = "CudaParticle_Panel" bl_label = "CudaParticle" bl_category = "SYSTEM" bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' # bl_context = "CudaParticle" def draw(self, context): layout = self.layout #scene = context.scene layout.label(text= "CudaParticals Properties:") #row = layout.row() #row.operator("view3d.print_text", text = "Print text", icon='WORLD_DATA') global custom_icons self.layout.label(text="CudaParticle", # end define interface icon_value=custom_icons["custom_icon"].icon_id) # global variable to store icons in custom_icons = None classes = ( CudaParticlePanel, ) def register(): global custom_icons custom_icons = bpy.utils.previews.new() script_path = bpy.context.space_data.text.filepath icons_dir = os.path.join(os.path.dirname(script_path), "Icons") custom_icons.load("Tool_Icon", os.path.join(icons_dir, "Tool_Icon.png"), 'IMAGE') from bpy.utils import register_class for cls in classes: register_class(cls) def unregister(): global custom_icons bpy.utils.previews.remove(custom_icons) from bpy.utils import unregister_class for cls in classes: unregister_class(cls)
I'm trying to add a new panel to show up in the particles section of the Properties Editor. class CudaParticlePanel(bpy.types.Panel): bl_idname = "CudaParticle_Panel" bl_label = "CudaParticle" bl_category = "SYSTEM" bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' bl_context = "PARTICLES" def draw(self, context): layout = self.layout layout.label(text= "CudaParticals Properties:") self.layout.label(text="CudaParticle") I don't get any errors or warnings when running the code but my panel does not show up. Can anyone please explain different locations of the UI and how to put a panel there?
I'm using the Field Calculator in ArcMap and I need to create a unique ID for every storm drain in my county. An ID Should look something like this: 16-I-003 The first number is the municipal number which is in the column/field titled "Munic" The letter is using the letter in the column/field titled "Point" The last number is simply just 1 to however many drains there are in a municipality. So far I have: rec=0 def autoIncrement() pStart=1 pInterval=1 if(rec==0): rec=pStart else: rec=rec+pInterval return "16-I-" '{0:03}'.format(rec) So you can see that I have manually been typing in the municipal number, the letter, and the hyphens. But I would like to pull the first number and letter from the fields: Munic and Point so I don't have to manually type them in each time it changes. I was hoping I could just put !Munic! and !Point! in my return statement before the .format(rec) or somehow work it in there. I'm a beginner when it comes to python and ArcMap, so please dumb things down a little. The simpler the better!
So I'm relatively new to ArcGIS and ArcCatalog. I have created a field name of PROJECTID in a feature class in a Personal Geodatabase. The data type is TEXT. This will be a ten digit ID. The first five characters will be a acronym. The sixth character will be a digit that represents the type of feature. It will be a number. The last four characters will be numbers that should be incremented starting at 0001. Example: WATER-1-0001 Screen shot of the field: So my question is how can I do this in ArcCatalog. I've seen some Python code that will autoincrement like the following: rec=[OBJECTID] def autoIncrement(a): global rec return "water" + str(a) + "-" + format(rec, '04d') Again I'm a newbie when it comes to ArcGIS . Now I am getting an error NameError name 'OBJECTID' is not defined.
I am concerned on this interesting question Given matrix $A$, does the Jordan cardinal form have the most zeros, in other word, it has the least nonvanishing indices, among the equivalent class of similarity. I can prove this argument for diagonalizable matrices and nilpotent matrices as follow. Now fix $n$, the size of $A$. If $A$ is diagonalizable, then its Jordan cardinal form is nothing but diagonal matrix. Thus the gross number of zeros is $n^2-r(A)$. If a matrix $B$ has more indices vanishing, more than $r(A)$ columns will be complete zero. If $A$ is nilpotent, then the total number of nonvanishing indices of cardinal form is no more than $n-1$. Assume $B$ has less indices without vanishing, we claim that by change the order of rows and columns, $B$ is in the form of $\left(\begin{matrix}B_1 & \\ & B_2\end{matrix}\right)$, and then we can use induction on $B_1$ and $B_2$. Now, we are going to illustrate this claim. Otherwise, we can find some indices $(1,i)$ or $(i,1)$ with $i\neq 1$ nonvanishing. By change of order, we can assume $i=2$. Then, we can find some indices $(k,j)$ or $(j,k)$ with $k\in \{1,2\}$ and $j\notin \{1,2\}$, and similarly, we can assume $j=3$. Just proceeding this process, finally, we will find that $B$ cannot have nonzero indices less than $n-1$. It seems to be subtle when dealing with general case. Even for the matrix similar to a single Jordan block, I cannot figure out a proof. Denote $\# A$ to be the number of nonvanishing indices. A nearly trivial observation may be useful $$\# (A+B)\leq (\# A)+(\#B)\qquad \#(AB)\leq (\# A)\cdot (\# B)$$
The Jordan and Frobenius normal forms of a linear map $A:\Bbb R^n \rightarrow \Bbb R^n$ seem to be maximally simple representations of $A$ in the sense that one of them contains as few nonzero entries as possible. But how do you prove that? More precise, show that for every $A:\Bbb R^n \rightarrow \Bbb R^n$ and every Basis $B$ of $\Bbb R^n$, the transformation matrix $_B A _B$ has at least as many nonzero entries as the Jordan normal form or the Frobenius normal form of $A$ or, otherwise, give a counterexample.
Our instance has some triggers that fire before insert and before update on accounts, contacts, and leads. In a test class, if I am creating test records will the insertion of new account records cause a DML to run and therefore error when trying to make a subsequent callout (You have uncommitted work pending) even if I am using @TestSetup to create those records? The batch class calls another class which actually performs the callout (just an http request that returns a string) Global Class FocusDomainBatch implements Database.Batchable<sObject>, Database.allowsCallouts { global Database.querylocator start(Database.BatchableContext BC) { String query = 'Select id,name, First_user_sign_up_date__c, Total_Users__c, New_Users_In_Last_Month__c, Avg_Fvrt_Pro_Per_User__c, Users_with_zero_fvrts__c, Users_with_2_or_less_fvrts__c, Average_daily_queries__c, Average_monthly_queries__c, Total_current_month_queries__c, Total_Queries__c from Focus_Domain_Stats__c'; return Database.getQueryLocator(query); } global void execute(Database.BatchableContext BC, List<sObject> scope) { try { List <Focus_Domain_Stats__c> allDomains = scope; List <string> web = new List <string>(); for(Focus_Domain_Stats__c c : allDomains) { system.debug('FocusDomainBatch:execute for ' + c.Name); web.add(c.name); } FocusAPI fi = new FocusAPI();//actually performs the callout String Token = fi.getToken();//failing here String stm = String.valueof(Date.today().toStartOfMonth())+' 00:00:00.000Z'; stm = stm.replace(' ', 'T'); List <String> dm = new List<String>(); Test Class: @IsTest Public Class TestFocusDomainBatch2 { @testSetup static void setupTestData(){ //Setup Data Lead ld = new Lead(); ld.lastName = 'kitagawa'; ld.email = '[email protected]'; ld.company = 'test'; ld.website = 'test.com'; ld.focus_user__c = TRUE; ld.Focus_Sign_Up_Date__c = date.today(); insert ld; Focus_Domain_Stats__c ds = new Focus_Domain_Stats__c(); ds.name = 'test.com'; insert ds; Lead ld2 = new Lead(); ld2.lastName = 'kitagawa'; ld2.email = '[email protected]'; ld2.company = 'test'; ld2.website = 'test.com'; ld2.focus_user__c = TRUE; ld2.Focus_Sign_Up_Date__c = date.today(); insert ld2; Account acc = new Account(); acc.name = 'test'; acc.website = 'test.com'; acc.Focus_Domain_Stats__c = ds.id; insert acc; Contact ctc = new Contact(); ctc.lastName = 'kitagawa'; ctc.email = '[email protected]'; ctc.account = acc; ctc.accountid = acc.id; ctc.Focus_Sign_Up_Date__c = date.today(); insert ctc; Contact ctc2 = new Contact(); ctc2.lastName = 'kitagawa2'; ctc2.email = '[email protected]'; ctc2.account = acc; ctc2.accountid = acc.id; ctc2.Focus_Sign_Up_Date__c = date.today(); insert ctc2; Focus_Product__c fp = new Focus_Product__c(); fp.Contact__c = ctc.id; fp.Lead__c = ld.id; fp.name = 'test product'; insert fp; } Static testMethod void TestFocusDomainBatch () { Test.StartTest(); //set mock Test.setMock(HttpCalloutMock.class, new MockHttpResponseGenerator1()); Database.executeBatch(new FocusDomainBatch()); Test.StopTest(); } }
I'm trying to write test code for a Batchable class that AllowsCallouts. I've written a lot of other test code that uses HttpCalloutMock classes, and planned to do so for this class as well. And, per best practices, I'm setting up my test data before calling Test.startTest(). Even so, I get a CalloutException: System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out This somewhat makes sense, because my start() method passes a SOQL query to Database.getQueryLocator() and my execute() method makes the web callouts. I'm guessing that when my test method calls test.stopTest(), both start() and execute() run in the same context. In regular batch operation, they happen in separate contexts so there isn't any uncommitted work. I intend to work around this by calling the methods directly, possibly even calling start() before Test.startTest(), and then using the returned Database.QueryLocator to get the list of records I'll pass into execute(). I don't like the fact that I'm not testing the batch size used by the static method that kicks off the batch with Database.executeBatch(), so I'll probably have that use a constant that I can reference from my test code to ensure it's using the same batch size. Salesforce kind of addresses this in the "Asynchronous Apex and Mock Callouts" section of the , but they don't make reference to Batchable classes with Callouts. They only talk about making callouts and testing Batchable classes in the same test method. So, my question is whether there is a better way to write this test. I'm also throwing this out so others searching the site can learn about possible workarounds.
How many algebraic operations can be defined on a set S with n elements and how many of them are comutative. Ok so I know that a algebraic operation is a law (let's say *) such that $*:S\times S \rightarrow S$. So for each pair of the cartesian product associate a element from S. I was thinking like this: Let $A = \{i \in \mathbb{N}|1\leq i \leq |S \times S|\}$, and let $A' = \{\overline{a_1a_2...a_n}\|n = A \ and\ a_i \in A, \forall i = \overline{1,n}\}$. So the cardinal of A' is the answare.
I am trying to solve following problem but not able to find any way to proceed. Let $S$ be a set having $n$ elements. Can we count about number of binary operations that can be defined on a set? Can we also count number of commutative binary operations defined on $S$? Thanks for the help and suggestions
I have some figures like this: I want to use one caption for each pair like the figure. Note: I can not use the subfigure and subcaption package. Best
I want to delete (a) and (b) from the subfigure and put the only one (a) in the middle of the subfigure like this. could anyone help me? thank you I want something like this:
Suppose $f$, $g$, $h$ are functions from the set of positive real numbers into itself satisfying $f(x)g(y)=h(\sqrt{x^2+y^2})$ for all $x$, $y\in (0,\infty)$. Show that the functions $g(x)/h(x)$, $h(x)/f(x)$ are constant. I've already shown $f(x)/g(x)$ constant by showing the derivative of $f(x)/g(x)$ to be zero. But I'm not getting how to proceed for $g(x)/h(x)$ and $h(x)/f(x)$. I've already tried by applying the definition of derivative for the latter, but of no use. Are there some special properties for the functions with open intervals as domain and codomain? Please help me solve this. Any suggestions are heartily welcome. Thank you(:>)
Suppose $f,g,h$ are functions from the set of positive real numbers into itself satisfying $f(x)g(y)=h(\sqrt{x^2+y^2})$ for all $x,y\in (0,\infty)$. Show that the functions $f(x)/g(x), g(x)/h(x),h(x)/f(x)$ are constant. I guess this is equivalent to prove that their derivatives are zero. $\left(\frac{f(x)}{g(x)}\right)'=\frac{g(x)f'(x)-f(x)g'(x)}{\left(g(x)^2\right)}=0$ if and only if $g(x)f'(x)-f(x)g'(x)=0$ i.e., $g(x)f'(x)=f(x)g'(x)$. For similar reasons, we must have $g(x)h'(x)=h(x)g'(x)$ and $h(x)f'(x)=f(x)h'(x)$ for all $x$... I was trying to consider $f(x)g(x)=h(x\sqrt{2})$ which would imply $f(x)g'(x)+g(x)f'(x)=\sqrt{2}h'(x\sqrt{2})$. I am lost from here... Help me to solve this... I was thinking of taking the step from first principles.. We have $$\left(\frac{f(x)}{g(x)}\right)'=\lim_{t\rightarrow 0}\frac{1}{t}\left(\frac{f(x+t)}{g(x+t)}-\frac{f(x)}{g(x)}\right)=\lim_{t\rightarrow 0}\frac{1}{t}\left(\frac{f(x+t)g(x)-g(x+t)f(x)}{g(x+t)g(t)}\right)=\lim_{t\rightarrow 0}\frac{1}{t}\left(\frac{h(\sqrt{(x+t)^2+x^2}-h(\sqrt{(x+t)^2+x^2}}{g(x+t)g(t)}\right)=0$$ So, $f(x)/g(x)$ is constant function..
The question I posted earlier wasn't clear and I was myself un-aware of the exact problem so I didn't get any responses. After a while I was able to figure out the problem (but still looking for a solution) so I edited the question (it's almost a different question now) and I think the updated question makes much more sense for someone who could answer it. This is the question: But, I'm not sure whether updating a question is able to attract people's attention again. So, is it better to post a new one (and may be delete the old one?)
What do you do when you want to ask a question, but find an exact duplicate that doesn't actually have a useful answer? This has happened to me multiple times in the past, so I figure it probably happens to others as well and is therefore worthy of discussion. To give a recent example: I wanted to find an answer of mine that I'd deleted on SO, so I searched meta to see if this was possible. I found that someone had , but it doesn't have any (real/useful) answers. Now, in this case the real "answer" is probably just "you can't", but it's also entirely possible that things have changed since the question was asked. So, how do I go about getting an answer to my question? A few obvious options are (with associated problems): Bump the old question by editing it (or its tags) not possible for low rep users creates revision noise Bump the old question by adding an answer creates unnecessary noise Just ask the duplicate question more noise duplicate will probably just be closed anyway been [status-planned] since July, so may never actually be possible your question may not be so burning that you want to create a bounty (especially for a low rep user), but that doesn't mean the question has no value & of course I'm sure someone will close this as a duplicate of an old, stale, unanswered question just for the beautiful irony (I did search, but didn't find anything).
In to , it is established that Star Wars humans are not related to us at all, though they are anatomically identical And we clearly have encountered dozens of of various sorts. Are there any canonically established animals or insects in the Star Wars galaxy which are "anatomically identical" (as far as we can tell) to Earth animals? Fine print: For the purpose of this question, I'm going to assume that a random background extra probably doesn't count unless there's a substantial reason to believe its appearance was intentional. It would have to be referred to by an Earth name (like "human") and also look identical to an Earth animal, as far as we can reasonably tell. In the case of an offhand mention of an animal without depiction, I would assume it might be an alien analog.
When I was a young teen, I really got into reading the few Star Wars novels that existed at that time. After I exhausted the then current run of books (there were only about 5 or 6 of them), I decided to read the novelizations of the original trilogy. I no longer own those novels so I can't look up the reference, but I recall that during the beginning of A New Hope, when Luke and Obi-Wan rode into Mos Eisley on Luke's land speeder, Lucas mentioned something of there being a "dog barking". This always struck me as odd because this was a reference to an animal from Earth in a universe where clearly most creatures were completely unique. After noticing the reference to a dog I then noticed on my next viewing of ESB that there was a snake on Dagobah. This has made me curious for years. What other Earth-based creatures have made their way into the "official" Star Wars universe and where do they appear?
I'm unsurprisingly confused: If I exercise ISOs in Jan 2017 and sell them in Feb 2018, how is income reported for AMT purposes and profit reported for cap gain purposes -- are BOTH reported on my 2017 return, even if the shares were sold in 2018 (but before April 15)? Or, must I report for AMT purposes in 2017, and on my 2018 return, will I report some kind of adjustment due to the fact that the shares were sold at a different FMV than when they were exercised?
So I have some ISO stock options (yeah) and three kids in college (boo) so I'm trying figure out the best tax strategy. I was hoping someone help me through the following scenario Strike Price: $10, 2014 exercise price: $20, 2015 price: $25, 2016 price $30 Lets' assume that all of this happens 2+ years after the grant date and that my "normal" tax bill is right on the brink of the AMT threshold, that the AMT tax rate is 28% and the long term capital gains tax is 15%. Now I want to run the following scenario 2014: exercise 1000 options 2015: exercise 1000 options, sell the previous years' option after "one year and one day" 2016: sell the 2015 options after "one year and a day" Tax wise that would look like this 2014: AMT on $10000 of bargain element so $2800 AMT 2015: AMT on $15000 bargain element $4200, long term gain tax on $15000 = $2250 2016: long term gain tax on $20000 = $3000 What's the overall tax liability in each year? I can't figure out how the AMT carries forward when the options are finally sold. Any good pointers to modeling software, spreadsheets or decent papers would also be appreciated.
I have been looking for vulnerabilities in Windows 8 and Windows 7, and would like to report them to Microsoft. Some are extremely important including one that compromises the user's key store without asking for the admin's password. How can I report these vulnerabilities to Microsoft?
I have come across an issue that I feel is a in Windows 7. What is the official process for submitting an issue to Microsoft from a consumers perspective as an end user of Windows?
I have Windows 8 installed on my Lenovo E4325 Laptop... I want to install Ubuntu as a dual boot... Please anyone let me know do i need to install any additional drivers or are the drivers comes with the OS after installing the Ubuntu version...If Yes, How?
I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS. Should I do it with Wubi, or through the Live USB/DVD? What steps do I need to take to correctly install Ubuntu?
I'm facing a quite new situation. I'm not an expert about charset, but as far as I know, all the chain should use the same encoding system. If I put accents directly in the html code, they'll look fine. However, when I fetch data from my mysql database, all of them will be displayed like this : �, no matter if I echo them in the body or using scripts. On the page, I have set this : <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <?php header('Content-Type:text/html; charset=UTF-8'); ?> <?xml version="1.0" encoding="UTF-8"?> <meta charset="UTF-8"> <meta http-equiv="Content-type" content="text/html; charset=UTF-8"/> Regarding the database : the server uses UTF-8 Unicode (utf8) utf8_general_ci The table utf8_general_ci The fields utf8_general_ci I'm running out of ideas.
I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur? This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.
I'm learning my way into some more advanced programming with PHP. I've seen that calling an non-existent method produces "call to undefined method" error. PHP being quite flexible is there a technique that allows to intercept this error ? If so, how is this usually done ? Edit: To clarify, I want to actually do something when the error occurs like send a reply back, not necessarily prevent it. Forget to mention that this is in the context of a class. Of course, methods only apply in the context of a class ;)
I can use set_error_handler() to catch most PHP errors, but it doesn't work for fatal (E_ERROR) errors, such as calling a function that doesn't exist. Is there another way to catch these errors? I am trying to call mail() for all errors and am running PHP 5.2.3.
I have a requirement in which I have to invoke a private method of an abstract class. Let's say the abstract class looks like below:- public abstract class Base { protected abstract String getName(); private String getHi(String v) { return "Hi " + v; } } Can some let me know is there a way I can call getHi (may be via Reflection or some other means) so that I can test it out? I am using Junit 4.12 and Java 8 I have gone through this but here the methods are not private in the abstract class. I have also gone through this even this one does not talk about private method in abstract class. I am not asking here whether we should test the private method or not or what is the best strategy for testing private methods. There are lot of resources available in the web regarding this. I am just trying to ask how should we invoke a private method of an abstract class in java.
How do I unit test (using xUnit) a class that has internal private methods, fields or nested classes? Or a function that is made private by having (static in C/C++) or is in a private () namespace? It seems bad to change the access modifier for a method or function just to be able to run a test.
I am trying to run this command: sudo apt-get update && apt-get upgrade but I keep getting these errors E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? I read in another answer that by using sudo these errors will be solved. But in my case I'm already using sudo. How to solve these errors?
I get this error whenever I try to install programs using the terminal: home@ubuntu:~$ apt-get install myunity E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? Also I'm unable to install updates using the terminal.
In Google Sheets, when referring to another worksheet in a formula, is there a way to insert the text value of a cell as the name of the sheet to be referenced? It is essentially a data collation table for school information, and I have separate worksheets for each class group, which auto-fills back to a common sheet in the document. I have already done this all successfully, however when creating new classes I currently have to redo all of the formulas. For ease of use, I want to have a string value in a cell on the common worksheet, use this to reference the correct sheet on the fly, and therefore need only create the new sheet and change the value in the aforementioned cell to match - thus not having to re-code all the formulas! Let me know if I can clarify this any further.
Google says in their web help how to reference data from another sheet, but what happens if what I need is to make the reference depending on my fields on the current sheet? Let's say I have a sheet named 'Sheet1' and a sheet named 'Sheet2'. And on my current sheet (results) I have a column where I'll place the name of each sheet: On Cell A1 value is: Sheet1 On Cell A2 value is: Sheet2 and so. I want to have Cell B1 to get some data from the sheet quoted in A1 (i.e.Sheet1): =Sheet1!$AC$1 I want to have Cell B2 to get some data from the sheet quoted in A2 (i.e.Sheet2): =Sheet2!$AC$1 ...and so on (for that, I need to copy down the formula with reference to column A content, to say, the corresponding sheet) In summary: the formula should include reference to a VARIABLE sheet. I've tried with both =concatenate() and also with =indirect() but no success... Is it possible?
Using common bash tools as part of a shell script, I want to repeatedly insert a newline char ('\n') into a long string at intervals of every N chars. For example, given this string, how would I insert a newline char every 20 chars? head -n 50 /dev/urandom | tr -dc A-Za-z0-9 Example of the results I am trying to achieve: ZL1WEV72TTO0S83LP2I2 MTQ8DEIU3GSSYJOI9CFE 6GEPWUPCBBHLWNA4M28D P2DHDI1L2JQIZJL0ACFV UDYEK7HN7HQY4E2U6VFC RH68ZZJGMSSC5YLHO0KZ 94LMELDIN1BAXQKTNSMH 0DXLM7B5966UEFGZENLZ 4917Y741L2WRTG5ACFGQ GRVDVT3CYOLYKNT2ZYUJ EAVN1EY4O161VTW1P3OY Q17T24S7S9BDG1RMKGBX WOZSI4D35U81P68NF5SB HH7AOYHV2TWQP27A40QC QW5N4JDK5001EAQXF41N FKH3Q5GOQZ54HZG2FFZS Q89KGMQZ46YBW3GVROYH AIBOU8NFM39RYP1XBLQM YLG8SSIW6J6XG6UJEKXO A use-case is to quickly make a set of random passwords or ID's of a fixed length. The way I did the above example is: for i in {1..30}; do head /dev/random | tr -dc A-Z0-9 | head -c 20 ; echo ''; done However, for learning purposes, I want to do it a different way. I want to start with an arbitrarily long string and insert newlines, thus breaking one string into multiple small strings of fixed char length.
I've got a long line that I want to insert a space every 4 characters, on a single lone line of solid text to make it easier to read, what's the simplest way to do this? also I should be able to input the line from a pipe. e.g. echo "foobarbazblargblurg" | <some command here> gives foob arba zbla rgbl urg
What is the difference between classical spin and quantum spin?
I often hear about subatomic particles having a property called "spin" but also that it doesn't actually relate to spinning about an axis like you would think. Which particles have spin? What does spin mean if not an actual spinning motion?
I am in the process of setting up mass email service. My question is: what are the best practices to achieve maximum deliver-ability. More precisely - what should I do/know to prevent spam filters from blocking the emails (the emails are not spam). for example- how can I tell if my IP address is blacklisted somewhere and how can I prevent it from becoming blacklisted. Is amazon web services a suitable platform due to dynamic IP addresses, what are the restrictions on the from address, can it be different from the mail server domain.... you get it....
This is a about how to handle email sent from your server being misclassified as spam. For additional information you may find these similar questions helpful: Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007). Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID? Does that increase a spam rating?
I want to edit (retag) a question with an edit pending. Normally, I would just review/accept/improve the pending edit, but I've already hit my review limit for the next couple of hours. Is there any way to still get around the pending edit, or do I just have to wait until somebody else reviews the edit?
I have faced this problem earlier. But today I got to face this problem twice in a span of couple of minutes.. I have unfortunately finished my daily quota of reviewing Suggested Edits. But I want to further edit a post for which an edit has already been suggested by another user having less than 2000 Reputation. I come across a post and it says that an edit has already been suggested which is pending for Review: I click on edit (1) and a pop-up of Suggested Edit appears: However, the problem is this Suggested Edit doesn't thoroughly deal with the post. It just fixes some capitalization and nothing else — no grammar fixes, no sentence restructuring to make it more clear, no code formatting, no dividing it into lists, etc. — in short, perfect candidate to be rejected. (The image for the suggested-edit I have uploaded didn't have those problems - however, there were those problems in the edits that I encountered earlier.) The problem before me is that I am helpless. I can't approve, reject or improve the edit since I have already gone past my daily quota of Reviewing them. Neither can I make the edits to the post since this suggested edit is pending review. I am completely helpless!! Whats the opinion of the community in this matter? Should we (those with more than 2000 Rep) be able to edit them? Don't count it in our Review Progress obviously - not sure what should be done with the suggested edit already proposed. Or, Let it be, someone else would come and edit them and other Reviewers would deal with the Suggested Edit appropriately. Or, Something else. Note: This might not be much of a problem for Stack Overflow since the Review Queue is very busy here. However, this is a bit of a problem for smaller sites. So, treat it as a question posted at Meta.SE and not so much at Meta.SO. Dirty Hack: Ah... found a dirty hack to work around this situation. However, this shouldn't be used unless absolutely necessary. Credit goes to in . To edit a post enter this link in your browser: http://${site_url}/posts/${post_id}/edit. So, to edit this particular post one would enter: http://meta.stackoverflow.com/posts/171129/edit. I repeat, the hack shouldn't be used unless necessary.
a few days ago I ran into a issue after downloading some updates. Since then I've been searching for information and trying countless procedures to solve it, to no avail. Here's some info which I hope will be useful: My computer: a 2008 Packard Bell PC, Intel Core 2 Quad CPU 2.4 GHz processor, 4 GB of RAM, Geforce 9300 GE graphics card. Kernel version: 3.13.0-46-generic Ubuntu version: 14.04.2 LTS At a very high level here's what I've tried so far: uninstalling then reinstalling Vidia drivers, installing X Updates PPA, installing Gnome interface (which I actually can't even access) Please advise, your help will be greatly appreciated. March 01st Update: Hello, here are today's results: compizconfig-* worked, thanks very much The 1st solution of thread 17381 didn't restore the GUI but displayed compizconfig - Info: Backend : ini compizconfig - Info: Integration : true compizconfig - Info: Profile : default Segmentation fault (core dumped) the 2nd solution of thread 17381 returned (I'm just quoting what I think can help, ie the error messages): Glib-warning **: In call to g-spawn-sync(), exit status of a child process was request but ECHILD was received by waitpid(). Most likely the process is ignoring SIGCHLD, or some other thread is invoking waitpid() with a non positive first argument; either behavior can break applications that use g_spawn_sync either directly or indirectly. dconf-WARNING **: failed to commit changes to dconf: Error spawning command line 'bus-launch --autolaunch=dfa6290d0169f2653223ea790000000000c --binary-syntax-- close- stderr': Child process killed by signal 43 (...) Info: Unity is fully supported by your hardware Info: Starting plugin: openg1 I didn't try creating a script as suggested in thread 457016 as I know I'll make a mess of it, especially through CLI. It seems like we're doing good progress but there's still a few hurdles on the way :) March 01st Update #2: I tried running startx and I could see the desktop and the files that are located there, however I have no wallpaper (but a blue background) and no taskbar and vertical iconbar. I can open the text files but not the pictures.
When I login, nothing happens. I am presented with my desktop wallpaper. No Dash, no Launcher, nothing.
If a stick of unit length is broken randomly at two points, to make 3 pieces of stick. What is the expected value of the largest stick. Is there an elegant solution to this problem? Thanks.
This post is related to a previous SE post concerning average length of a smallest segment. A rope of 1m is divided into three pieces by two random points. Find the average length of the largest segment. My answer is 11/18. Here is how I do it: Here we have two independent random variables $X,Y$, both uniform on $[0,1]$. Let $A=\min (X,Y), B=\max (X,Y)$ and $C=\max (A, 1-B, B-A)$. First we want to find the probability density function $f_C(a)$ of $C$. Let $F_C(a)$ be the cumulative distribution function. Then $$ F_C(a) = P(C\le a)=P(A\le a, 1-B\le a, B-A\le a).$$ By rewriting this probability as area in the unit square, I get $$F_C(a)=\left\{\begin{array}{ll} (3a-1)^2 & \frac{1}{3}\le a\le \frac{1}{2}\\ 1-3(1-a)^2 & \frac{1}{2}\le a\le 1\end{array}\right.$$ from which it follows that $$f_C(a)=\left\{\begin{array}{ll} 6(3a-1) & \frac{1}{3}\le a\le \frac{1}{2}\\ 6(1-a) & \frac{1}{2}\le a\le 1\end{array}\right.$$ Therefore the expected value of $C$ is $$\int_{1/3} ^{1/2}6a(3a-1) da+\int_{1/2} ^{1}6a(1-a) da= \frac{11}{18}.$$ My questions are: (A) Is there a "clever" way to figure out this number 11/18? (B) What is the answer if the rope is divided into $n>3$ segments?
I need this symbols used by Boole and Peirce, any ideas?
Is there a symbol that looks like the element sign $\in $ but instead of being curved, looks more like a less than sign $< $? I have trawled through hundreds of symbols and tried detexify.
im trying to display an li via ajax, but the problem is when i clicked the link the container is not popping up. But when i tried to just display it simple html it's working. Can someone help me to find what's the cause of this why it's not working? here's the output when i tried to run on a simple html. It worked. the div. <div id="notificationsss"></div> ajax script $(document).ready(function() { loadnotif(); $("#notificationLink").click(function() { $("#notificationContainer").fadeToggle(300); $("#notification_count").fadeOut("slow"); return false; }); //Document Click hiding the popup $(document).click(function() { $("#notificationContainer").hide(); }); }); function loadnotif() { $.ajax({ url: 'getrecords.php', method: 'POST', data: { "loadnotif": 1 }, success: function(data) { $('#notificationsss').html(data); } }); } getrecords.php if(isset($_POST['loadnotif'])){ $output = ' <ul id="main-menu" class="nav navbar-nav navbar-right"> <li class="dropdown hidden-xs"> <li id="notification_li"> <a href="#" id="notificationLink"><i class="fa fa-globe"></i> <span class="notification-counter" style="background-color:red;border-radius:3px;padding: 1px 3px;position:relative;top:-9px;right:9px;font: 8px Verdana;;">1</span></a> <div id="notificationContainer"> <div id="notificationTitle" style="text-align:center;background-color:#ba4f46;color:#fff;">Notifications</div> <div id="notificationsBody" class="notifications"> <a href="index.php" style="display:block;color:black;margin-top:10px;background-color:#f6e9e8;" id="notifa"> <div> <img src="img/izuku.jpg" style="max-width:50px;max-height:70px;float:left;margin:0px 10px;"> <p style="display:inline;margin-top:20px;"><strong>Rommel Deauna</strong> Uploaded a Lecture on <strong><br>Computer Security</strong></p> <p style="font-size:12px;">November 12, 2016 5:06PM</p> <hr> </div> </a> </div> <div id="notificationFooter" style="background-color:#ba4f46;"><a href="#" style="color:#fff;">See All</a></div> </div> </li> </li> </ul>'; echo $output; }
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
First of all I only mean books, not the movies please. To begin with, here is - it doesn't reflect Draco's case though. I do not ask what he wears under his robes, I ask if he can be seen walking around dressed like a Muggle somewhere in the books. So here is what I found on Draco wearing school robes: He pulled the robes over his head and threw them onto the floor at Madam Malkin's feet... And with that, the pair of them strode out of the shop.. So apparently he was trying his new robes on some causal closes. It would do with a jeans a t-shirt I think, but trying on robes on top of other robes doesn't make much sense. Was Draco doing his shopping on the Diagon Alley in Muggle clothing?! And later on the train: To his relief, Malfoy seemed to decide that he had imagined the noise; he pulled on his robes like the others... He pulled his robes on what? There was Pancy in the compartment and seemed like they changed all together. So were they in Muggle clothes, wearing their robes on those as Ron and Harry apparently do? Or did they have to change their common robes to the school ones? Now I was thinking - do Pure-blood families arrive to the train station in their wizarding clothes? It seems against the Statute of Wizarding Secrecy, does it mean every year all Pure-bloods have to wear Muggle clothes to take their children to the station? Say, Lucius Malfoy? We see at the and of The Order of the Phoenix that a whole bunch of adults waiting for Harry at the platform are dressed in Muggle clothing: There was Mad-Eye Moody, looking quite as sinister with his bowler hat pulled low over his magical eye as he would have done without it, his gnarled hands clutching a long staff, his body wrapped in a voluminous travelling cloak. Tonks stood just behind him, her bright bubble-gum-pink hair gleaming in the sunlight filtering through the dirty glass of the station ceiling, wearing heavily patched jeans and a bright purple T-shirt bearing the legend The Weird Sisters. Next to Tonks was Lupin, his face pale, his hair greying, a long and threadbare overcoat covering a shabby jumper and trousers. At the front of the group stood Mr and Mrs Weasley, dressed in their Muggle best, and Fred and George, who were both wearing brand-new jackets in some lurid green, scaly material. Though it could be they did it only this time because they intended to talk to the Dursleys. Or not? When Harry first meets the Weasleys on the platform he never notices their clothes, only their talk about Muggles and their owl. Harry swung round. The speaker was a plump woman who was talking to four boys, all with flaming red hair. each of them was pushing a trunk like Harry's in front of him - and they had an owl. Heart hammering, Harry pushed his cart after them. Does it mean all wizards obliged to dress as a Muggle when going to the platform and the Malfoys every year appear there in Muggle clothes? Or Muggle wear is not a big deal for the new generation and Draco does occasionally wear Muggle clothing (like, in Diagon Alley) without considering it to be beneath him?
In the movies, they wore ties and really nice shirts, but I don't think that's how it was in the books? What do wizards and witches wear under their robes?
I want to create the shortcuts: Super: Run dmenu Super← Left arrow: Move current window to the left I have both of them working, however when I depress Super it opens dmenu right away. When I then press ← Left arrow, it moves the window. Instead, I want pressing Super and ← Left arrow without releasing Super to move the window. dmenu should only start when Super is pressed and released on it's own. Is this possible? I know that it works well in gnome-shell and cinnamon, so there has to be a way.
I want to have my super key start dmenu. I have set it as a keyboard shortcut in my rc.xml as follows: <keybind key="0xffeb"> <action name="Execute"> <command>dmenu_run</command> </action> </keybind> I tried specifying it in the key attribute as W, W-, and 0xffeb, but none of these worked. W responds to pressing the letter w, and the others appear to do nothing. I want the shortcut to trigger when the super key is pressed and released on it's own. Is this possible? This is from super user as per the . I've read this question: , but I didn't see any useful information in it.
Consider a simple model: Y = A + B + A*B Is it possible that coefficient for A*B is significant while that for A or B or both of them is insignificant? Either yes or no, can you tell what's the reason behind it?
I am using linear mixed models to identify important factors, and it turns out that: A: significant B: not significant A×B: significant Does it mean that because A×B shows that the effect of A depends on the effect of B, only the effect of A is not actually significant? I have read many sources, and they seem to suggest that if the effect of A×B is significant, then we cannot interpret that the effect of A is significant on our dependent variable. Am I understanding right?
I have 700 reputation in StackOverflow right now. Once I've reached 500 rep I've got an opportunity to review first posts and do the triage. But now for some reason I can't do that. The inscription "There are no review queues available to you" is standing for several days. I didn't get any message like "you were banned" or smth. And I didn't do anything wrong - there's only 1 bad flag (which was a mistake), I do not downvote every post, etc. What can be a reason of that?
When I am review-banned, the direct effect is that when I click the review icon in the top-bar, I get this: This doesn’t tell me anything about what's going on, just that all review queues have miraculously become unavailable to me. It doesn't show that it's because I've been banned, or why I've been banned, whether it's for failing audits or whether there is a custom message supplied by a moderator. Only when I new-tab-click that button, it takes me to /review, or when I manually navigate there, I get : This is confusing for review-banned users who use the dropdown in their standard workflow (). I only performed the above test to reproduce the experience of a confused review-banned user on a site I moderate. Please replace the dropdown message with something more informative in case of a review ban.
If I cast Silent Image on a boat, does it move with the boat or do I have to use an action to make it move with the boat? The situation is this, my party is floating down a large river and I want to be able to use the Silent Image spell on the canoe to make it look like a large tree floating down the river to anyone from the tree line. My assumption is that because I've placed the illusion on the floor of the canoe, it will just stick with the boat and I do not need to use an action to move it because the illusion is not moving but rather the canoe is moving and the illusion is just place on the canoe. Of course, the illusion isn't perfect because part of the tree looks like someone started carving the bottom of a boat out of it, and well the tree has oddly positioned branches that obscure much of the part of the tree (where the ores might be seen while the party paddles.), but it's a tree non the less, especially to the passive observer.
Recently it has come up at our table on the topic of centering a spell with an extended length, like sickening radiance, on a creature or something else that move. My table & I are unfamiliar with the ruling of centering spells on specific points. If a caster casts a spell that centers on a point, and the spell continues for a period of time longer than 1 round, and makes the point a creature or something else that can move, would the spell move with that creature or object?
In my neighbourhood there are: 11 wifi signals on channel 1 2 wifi signals on channel 4 (including mine at the mo) 8 on channel 6 6 on channel 11 According to the Mine on channel 4 will suffer interference from channel 1 and channel 6, so a total of 20 other networks(!). So would I be better to join channel 11, even though my network is then in direct competition with the 6 others? I suppose the question is: what's worse: direct interference (meaning that on the same channel) from 6 or fringe interference from many more networks?
I understand that 2.4GHz Wi-Fi channels overlap, and that the most popular non-overlapping set of channels in the US is 1, 6, and 11. Generally, my signal strength on channels 1, 6, and 11 are much stronger than my neighbors' on the same channel. However, these channels usually have 4 or 5 APs already using them. In this scenario, is it better to use 3, 4, 8, or 9? Or is it better to use the crowded channels 1, 6, and 11? As a secondary question, does it even matter that my signal strength is much higher than theirs? Related:
Basically, I have this function that finds the last non-blank cell in a range while skipping columns I don't want it to search. The value is returned, but I want it to return the cell address (for something else I am trying to make work). Here is my formula: =IF(ISERROR(INDEX({M5,N5,O5,P5,R5,S5,T5,U5,W5,X5,Y5,Z5,AA5,AC5,AD5,AE5,AF5,AH5,AI5,AJ5,AK5,AM5,AN5,AO5,AP5,AQ5,AS5,AT5,AU5,AV5,AX5,AY5,AZ5,BA5,BB5,BD5,BE5,BF5,BG5,BI5,BJ5,BK5,BL5,BN5,BO5,BP5,BQ5,BR5,BT5,BU5,BV5,BW5,BX5},MAX(({M5,N5,O5,P5,R5,S5,T5,U5,W5,X5,Y5,Z5,AA5,AC5,AD5,AE5,AF5,AH5,AI5,AJ5,AK5,AM5,AN5,AO5,AP5,AQ5,AS5,AT5,AU5,AV5,AX5,AY5,AZ5,BA5,BB5,BD5,BE5,BF5,BG5,BI5,BJ5,BK5,BL5,BN5,BO5,BP5,BQ5,BR5,BT5,BU5,BV5,BW5,BX5}<>"")*COLUMN(A5:BA5)))),"Error", (INDEX({M5,N5,O5,P5,R5,S5,T5,U5,W5,X5,Y5,Z5,AA5,AC5,AD5,AE5,AF5,AH5,AI5,AJ5,AK5,AM5,AN5,AO5,AP5,AQ5,AS5,AT5,AU5,AV5,AX5,AY5,AZ5,BA5,BB5,BD5,BE5,BF5,BG5,BI5,BJ5,BK5,BL5,BN5,BO5,BP5,BQ5,BR5,BT5,BU5,BV5,BW5,BX5},MAX(({M5,N5,O5,P5,R5,S5,T5,U5,W5,X5,Y5,Z5,AA5,AC5,AD5,AE5,AF5,AH5,AI5,AJ5,AK5,AM5,AN5,AO5,AP5,AQ5,AS5,AT5,AU5,AV5,AX5,AY5,AZ5,BA5,BB5,BD5,BE5,BF5,BG5,BI5,BJ5,BK5,BL5,BN5,BO5,BP5,BQ5,BR5,BT5,BU5,BV5,BW5,BX5}<>"")*COLUMN(A5:BA5)))))
Basically, I need to do what the title says on my spreadsheet here. So for row 3, I need to find the address of the last non-blank cell in that row, while skipping the grayed out columns (with the header "Total").
I want to be able to calculate the confidence interval from the estimated coefficient and respective standard errors. I have a linear regression model which can be summarized (in R): summary(fit1) Call: lm(formula = bwt ~ height + weight + parity, data = data) Residuals: Min 1Q Median 3Q Max -66.913 -10.624 0.991 10.979 55.621 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 31.19217 13.56879 2.299 0.0217 * height 1.24964 0.23083 5.414 7.48e-08 *** weight 0.06781 0.02823 2.402 0.0164 * parity1 -1.83309 1.19838 -1.530 0.1264 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 17.9 on 1170 degrees of freedom Multiple R-squared: 0.04898, Adjusted R-squared: 0.04654 F-statistic: 20.08 on 3 and 1170 DF, p-value: 1.071e-12 With this model I can calculate the respective confidence intervals: > confint(fit1) 2.5 % 97.5 % (Intercept) 4.57029503 57.8140351 height 0.79676227 1.7025207 weight 0.01243198 0.1231932 parity1 -4.18429933 0.5181151 I would expect the intervals of the predictor height to be given by $$ 1.24964 \pm (1.96*0.23083) = [0.7972132,1.702067] $$ where 1.24964 is the estimated value for the coefficient and 0.23083 is the standard error for this coefficient. The numbers are close but not quite the same. What am I doing wrong?
Let's have some linear model, for example just simple ANOVA: # data generation set.seed(1.234) Ng <- c(41, 37, 42) data <- rnorm(sum(Ng), mean = rep(c(-1, 0, 1), Ng), sd = 1) fact <- as.factor(rep(LETTERS[1:3], Ng)) m1 = lm(data ~ 0 + fact) summary(m1) Result is as follows: Call: lm(formula = data ~ 0 + fact) Residuals: Min 1Q Median 3Q Max -2.30047 -0.60414 -0.04078 0.54316 2.25323 Coefficients: Estimate Std. Error t value Pr(>|t|) factA -0.9142 0.1388 -6.588 1.34e-09 *** factB 0.1484 0.1461 1.016 0.312 factC 1.0990 0.1371 8.015 9.25e-13 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.8886 on 117 degrees of freedom Multiple R-squared: 0.4816, Adjusted R-squared: 0.4683 F-statistic: 36.23 on 3 and 117 DF, p-value: < 2.2e-16 Now I try two different methods to estimate confidence interval of these parameters c = coef(summary(m1)) # 1st method: CI limits from SE, assuming normal distribution cbind(low = c[,1] - qnorm(p = 0.975) * c[,2], high = c[,1] + qnorm(p = 0.975) * c[,2]) # 2nd method confint(m1) Questions: What is the distribution of estimated linear regression coefficients? Normal or $t$? Why do both methods yield different results? Assuming normal distribution and correct SE, I'd expect both methods to have the same result. Thank you very much! data ~ 0 + fact EDIT after an answer: The answer is exact, this will give exactly the same result as confint(m1)! # 3rd method cbind(low = c[,1] - qt(p = 0.975, df = sum(Ng) - 3) * c[,2], high = c[,1] + qt(p = 0.975, df = sum(Ng) - 3) * c[,2])
Added a trigger which in turn calls a method in class but is failing. My error is: Apex trigger MyTrigger caused an unexpected exception, contact your administrator: MyTrigger: execution of AfterInsert caused by: System.QueryException: unexpected token: 'TJ000000dsWeuMAE': () My trigger code: trigger MyTrigger on Task (after delete, after insert, after undelete, after update) { MyClass c = new MyClass(); for (Task t : System.Trigger.new) { if (Trigger.isUpdate) { c.UpdateTask(t); } else if (Trigger.isDelete) { c.DeleteTask(t); } else { c.AddTask(t); } } } My class code: global with sharing class MyClass { Interaction_Summary__c intSum; private string query; private string filterClause; private string filterClause1; private string filterClause2; global MyClass() { if(!Test.isRunningTest()) { filterClause1 = MyCustomSetting__c.getValues('MyProperty').Filter_Clause_1__c; if (filterClause1 != null && filterClause1 != '') { filterClause2 = MyCustomSetting__c.getValues('MyProperty').Filter_Clause_2__c; } else { filterClause1 = ''; filterClause2 = ''; } } } global void AddTask(Task t) { if (t != null) { intSum = new Interaction_Summary__c(); PopulateInteractionSummary(intSum, t); if (filterPass(t)) { Schema.SObjectField upsertField = Interaction_Summary__c.Related_To_Id__c; Database.upsert(t, upsertField, false); } else { DeleteTask(t); } } } global void UpdateTask(Task t) { //add code } global void DeleteTask(Task t) { //add code } global boolean FilterPass(Task t) { string taskID = t.Id; filterClause = filterClause1 + ' ' + filterClause2; if(filterClause != null || filterClause != '') { query = 'Select Id from Task where id = ' + taskID + ' ' + filterClause; } else { query = 'Select Id from Task where id = ' + taskID; } Task thisTask = Database.query(query); if (thisTask != null) { return true; } return false; } global void PopulateInteractionSummary(Interaction_Summary__c intSum, Task t) { intSum.Related_To_Id__c = t.Id; intSum.IS_Subject__c = t.Subject; intSum.Type__c = 'Task'; intSum.Related_To_Name__c = t.What.Name; } } Please help this salesforce newbie pinpoint the issue. Thanks in advance
Declared a string and assigned SOQL value as shown below. While running I am getting an error. String country = 'United States'; String accountQuery = 'SELECT Id,BillingPostalCode,County_Name__c '+ 'FROM Account WHERE zipCodeLen__c =9 AND AND BillingCountry = '+ Country; System.QueryException: unexpected token: 'AND' System.QueryException: expecting a colon, found 'United'
I encountered this question in my homework: $$a_1=x, b_1=y, \\ a_{n+1} =\frac{a_n+b_n}{2}, b_{n+1}= \sqrt{a_nb_n}, n\in \mathbb{N}$$ Given $x,y$ positive constants. I have to prove that they both converge to the same limit $L$. I know that in order to prove that a sequence converges, it has to be (for example) Monotonically increasing and that $|a_n|<K$ I'm having difficulties proving with induction that either of the sequences is monotonic... how do I do so when the first sequence depends on the other? I know that by using the average inequality I get that $a_{n+1} > b_{n+1}$. How do I continue from here? Thank you for your time and help!
I am given this problem: let $a\ge0$,$b\ge0$, and the sequences $a_n$ and $b_n$ are defined in this way: $a_0:=a$, $b_0:=b$ and $a_{n+1}:= \sqrt{a_nb_n}$ and $b_{n+1}:=\frac{1}{2}(a_n+b_n)$ for all $n\in\Bbb{N}$ To prove is that both sequences converge and that they have the same limit. I don't know how to show this. I have spent 2 hours on this, no sign of success
This question is not a duplicate of (which I was aware of and referred to it below) in its current state. That post received a over 10 years ago and a lot has changed since then. All details are mentioned below. It has always bugged me that the deleted:1 operator has the following two restrictions combined: It can only be used to find one's own deleted posts. It's only available for users with 10k rep or higher. I can see how allowing users to find deleted posts from other people could be problematic, but the second restriction doesn't really make much sense (at least to me) as long as the first one is enforced. I get that it might make but I believe that it should be revisited. If the reason behind this restriction is to avoid complaints from users about their deleted posts, there are two counterarguments to that: Experience that it's unlikely to have a major effect: Jeff's concern with allowing people to see their own deleted content was that "it would lead to unbelievable amounts of whining." As we've relaxed the restrictions, that hasn't happened. Jeff was right to be worried, but as it turns out he was wrong about how people would respond. That's a real encouragement. Users can already (more easily) see their recently deleted posts anyway. And it's more likely for someone to complain about a post that was recently deleted than whine about an old post. Some benefits of removing this restriction: It will enable experienced users to search for their deleted posts on sites where they don't have 10k rep yet without that might not work for all posts. Enable post-banned users to find their own deleted posts without wasting the time of moderators (anyone can guide them to using the deleted:1 operator rather than having to wait for a moderator).
I would really like to see all of my questions and answers on the profile page, even if some of them were deleted, and I don't have enough rep to see them on the site. (Note that some questions are after 30 days or 1 year, and the author might be oblivious about what happened.) , the "deleted recent [questions/answers]" links in one's own user profile now list all respective posts that were deleted in the past 60 days, rather than just those that were originally posted in the last 60 days. , users with the "access to moderator tools" privilege (10k+ on designed sites, 2k+ on beta and non-designed sites) can use the search operator deleted:1 to see all their own deleted posts. , deleted questions and answers that were posted in the past 60 days, can be seen using the "deleted recent questions" and "deleted recent answers" links on the questions and answers tabs (at the bottom of the tab) in your user profile. For older posts: as of 2013-04-23 you can if you already have a link to them, but they still aren't linked from the user profiles (not even just for you). Nor do you see inbox notifications for comments on them if you come back a few hours later. You have to have thought to bookmark your question, or you have to go digging for it in your browser history.
Based on wikipedia (), a distribution is symmetric about $x_0$ if and only if it is a distribution whose pdf(or pmf) $f(\cdot)$ satisfies $f(x_0+x)=f(x_0-x)$ for any $x\in \mathbb{R}$. Can we also define symmetry about $x_0$ using cdf? That is, we say a distribution is symmetric about $x_0$ if and only if $F(x_0+x)=1-F(x_0-x)$ for any $x\in\mathbb{R}$. It seems that this definition is also okay, right?
What's the definition of a symmetric distribution? Someone told me that a random variable $X$ came from a symmetric distribution if and only if $X$ and $-X$ has the same distribution. But I think this definition is partly true. Because I can present a counterexample $X\sim N(\mu,\sigma^{2})$ and $\mu\neq0$. Obviously, it has a symmetric distribution, but $X$ and $-X$ have different distribution! Am I right? Do you guys ever think about this question? What's the exact definition of symmetric distribution?
Which articles should I use in sample sentence below? I prepared a/the guide about component installation. Please, check it by a/the link http://... on a/the page 15.
I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize? The standard rule you always hear: “If a person knows which item you are talking about then use "the" . . . doesn’t clear things up for me, as I have no idea whether or not they know.
I'm using bootstrap, and so am working with their row and column classes. I have a row, with two child rows. I'd like to be able to set a height, or max height, of the parent row and have the child rows fill up the available space. The child rows I want to fill up the space such that the top child row just grows to be whatever height based on its contents, so nothing special, but the bottom child row fills up whatever available remaining vertical space exists within the parent row. I'm trying to make a collapsible header area above a content area, below it, that expands to take up the available space as the header expands and collapses. I have a jsfiddle here which shows my rows and columns, but the bottom child row, which I have set to height 100%, expands outside the bounds of the parent row. I figure the height is being set to 100% of the parent, and not 100% of the available space which is what I am after. Any idea how to just make the bottom row take up 100% of remaining space? Edit: I will also try to include the markup here so you don't have to leave the site. I'm not sure how to use the code examples that you can run here, though. #parent { height: 300px; } <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/> <div class="container mt-5"> <div class="row p-1 bg-primary" id="parent"> <div class="col"> <div class="row mb-1 bg-secondary"> <div class="col"> I'd like this to be able to be whatever height based on the content </div> </div> <div class="row child bg-secondary h-100"> <div class="col"> I want this to just take up the remaining height of the parent row </div> </div> </div> </div> </div>
I am working on a web application where I want the content to fill the height of the entire screen. The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom. I have a header div and a content div. At the moment I am using a table for the layout like so: CSS and HTML #page { height: 100%; width: 100% } #tdcontent { height: 100%; } #content { overflow: auto; /* or overflow: hidden; */ } <table id="page"> <tr> <td id="tdheader"> <div id="header">...</div> </td> </tr> <tr> <td id="tdcontent"> <div id="content">...</div> </td> </tr> </table> The entire height of the page is filled, and no scrolling is required. For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work. Is there a way to achieve the same effect without using the table? Update: Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%. Update 2: For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works.
I'm starting out with learning Python 3.7, and wrote this very simple practice program for finding the square root of a number. # User enters a number x = int(input("Enter a number, any number: ")) # Start with a random guess (g) of 4 g = 4 # Check if g*g = x # If not, redefine g as avg of g and x, square, then recheck while g*g != x: g = (g + x/g)/2 # When g*g = x, print g else: print(g) For some numbers, the program works just fine. For others, however, the program simply doesn't resolve. So, for example, if I run this program (in Spyder) and enter 56, it returns a value of 7.483314773547883. If I enter 66, the console doesn't return an output. It simply idles until I interrupt or reset it. I also tried changing the while condition to: while g*g not in range(int(x - 0.1), int(x + 0.1)): But this threw up the same problem. I'd appreciate any advice on what the issue might be here.
Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen?
I am a college student graduating this upcoming year. I have a decent amount currently invested in a taxable brokerage account. For the 2019 year I would be in the 0% long term gains bracket and 12% marginal income bracket (which I believe is used for short term gains). Next year I anticipate moving into the 15% long term gains bracket. Since the market is up, before the year is out I was thinking of trying to realize these gains (I have a mixture of both short term and long term gains currently) by selling and just rebuying the same positions. Since both tax rates are lower than long term gains will be next year I was thinking of doing this for both. Is this a smart idea or am I missing something? Are there any other considerations I should be aware of?
My current income would place me in the 0% long-term capital gains bracket currently, while I anticipate them to be 15% within my working years that commence in 2018. My stocks (an index fund) have appreciated about 50% since I bought them (most of these should be capital gains). Wash sale rules would probably prevent me from investing in the stocks for 30 days, which means I'm expected to lose out on <1% growth. If I anticipate liquidating the stocks before retirement (in my working years), shouldn't I go ahead and do a sell-rebuy in order to make the next cost basis larger (which reduces the next long-term capital gains on the next sale)?
I'm a beginner in Android programming, fairly well experienced in Java. I'm using Android Studio with KitKate and Lollipop Emus and HW, developing for Froyo. I want to know what's presently the best accepted and easiest to implement way of including a database with my Android App. I've looked at ActiveAndroid, but I followed their documentation exactly and found I was far from the only person to struggle with it's implementation - even the best programmers I know told me I was flogging a dead horse. A very commonly posted link is this: It's 6 years old, and I'd rather follow today's best practises. TIA, TH [Edit] I've explained that this question is with regards as to whether the ReignDesign post is still acceptable, and, or, if there are any other better resources or libraries one can use that make this very common task as easy as it should be.
If your application requires a database and it comes with built in data, what is the best way to ship that application? Should I: Precreate the SQLite database and include it in the .apk? Include the SQL commands with the application and have it create the database and insert the data on first use? The drawbacks I see are: Possible SQLite version mismatches might cause problems and I currently don't know where the database should go and how to access it. It may take a really long time to create and populate the database on the device. Any suggestions? Pointers to the documentation regarding any issues would be greatly appreciated.
Let's say I have got a bunch of items in a folder on my Finder. And I want to make a non-continuous selection. I can do that using my trackpad and CMD + click as in this answer: But I don't want to use my trackpad (I am way faster using my keyboard). On Windows, you would hold down the Ctrl key, navigate using the Arrow keys and select the desired items/files using Space bar This is also unanswered on Apple Discussions: Mind that doesn't answer as it has two continuous items albeit on different lines.
I want to select non-consecutive items on a list, without using a mouse/trackpad - there should be no clicks involved. In Windows and Linux (at least Ubuntu) an item can be selected using Space/ button, which, in combination with arrows and Ctrl key allows me to select multiple items in any environment (file manager, IDE etc.) - e.g. Enter a directory -> hold Ctrl -> down arrow twice -> press Space -> down arrow twice -> press Space. Now I should have items 1, 3 and 5 selected. Is there a way to do the same thing in OS X? PS. Sorry for such a verbose description, but so far every answer I encountered advices using Command + Click, and this is something I don't want to do.
i'm building some program. apache guacamole (VNC tool) makes log in console. (it can be tweak for make log in file, but i won't) so, my program reads log in console and determine which user(id) accessed(connected) or leave(disconnected). but it gives me "java lang nullpointer exception at line 19". so here is my code. import java.util.*; import java.lang.*; import java.io.*; class id { public static void main (String[] args) throws java.lang.Exception { String connect = "connect"; String disconnect = "disconnect"; String id; int strindex, endindex; //mark start, end index while(true){ String phrase = System.console().readLine(); if(phrase.equals("")) continue; if(phrase.contains(disconnect)){ if( (strindex=phrase.indexOf("- User ")) > -1 ) strindex = strindex + 8; endindex = phrase.indexOf('"', strindex); id = phrase.substring(strindex, endindex); System.out.println(id); System.out.println("disco\n"); //dockerfile_logout+pause; }//islogout else if(phrase.contains(connect)){ if( (strindex=phrase.indexOf("- User ")) > -1 ) strindex = strindex + 8; endindex = phrase.indexOf('"', strindex); id = phrase.substring(strindex, endindex); System.out.println(id); System.out.println("connected\n"); //dockerfile_login+start! }//islogin }//while } }
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
What is wrong with my code? I get this error every time I run my code. Trying to download a .txt file, and then display the text in the toast. That is all I want! : FATAL EXCEPTION: main Process: nnsoft.nsomuhtest, PID: 18706 java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference at android.widget.Toast.<init>(Toast.java:138) at android.widget.Toast.makeText(Toast.java:385) code: @Override protected void onPostExecute(String unused) { StringBuilder text = new StringBuilder(); try { BufferedReader br = new BufferedReader(new FileReader(AnnouncementsDirectory)); String line; while ((line = br.readLine()) != null) { text.append(line); text.append('\n'); } br.close(); Toast.makeText(context, text, Toast.LENGTH_LONG).show(); } catch (IOException e) { Toast.makeText(context, "error reading ver file", Toast.LENGTH_LONG).show(); } }
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
Example: The soccer team lost the match because the strikers failed to score on a regular basis. However, the coach took the blame for the failure. In the above example what word can be used to describe the coach who takes the blame for the team's failure? I searched for the correct word but couldn't find an appropriate one. A word that I found was Fall Guy. But it seems, a fall guy would be one who is falsely accused for something that has gone wrong.
Although the word martyr somewhat applies, it includes a nobility not necessarily present. An idiom describing this, in a voluntary situation, would be drawing the short straw, thereby acquiring some unpleasant or dangerous duty. An idiom for an involuntary situation would be getting thrown under the bus. Context Friend: I knew someone would eventually need to refactor this code. I didn't think it would be me. Me: You're our... uh, what's the word?
Does anyone know if I can connect two 4k monitors running at 60Hz to my MBP 13" early 2015, 3.1 GHz Intel Core i7, 16 GB 1867 MHz DDR3, Intel Iris Graphics 6100 1536 MB). Specifically, I am interested in the DELL P2415Q. My understanding is that I can connect 2 monitors with res 3840 x 2160 via the two thunderbolt ports, but only one can run at 60Hz, the other must run at 30Hz. Any help is appreciated! Thanks!
How do I find out the number, type, resolution & refresh rate of additional monitors I can attach to my MacBook or MacBook Pro? This is an attempt at a canonical QA, as per the Meta QA - to try prevent the myriad "same but different" questions we get on every possible combination of computers, cable & monitors There are perfectly good resources out there that Ask Different should not have to duplicate the efforts of.