body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
How can I find an expectation of random variable $\xi \sim \mathcal{N}(a,1)$, where $a$ is random variable: $a \sim \mathcal{N}(0,\sigma^2),\quad \sigma = \text{constant}$ ?
I would like to learn how to calculate the expected value of a continuous random variable. It appears that the expected value is $$E[X] = \int_{-\infty}^{\infty} xf(x)\mathrm{d}x$$ where $f(x)$ is the probability density function of $X$. Suppose the probability density function of $X$ is $$f(x) = \frac{1}{\sqrt{2\pi}}e^{\frac{-x^{2}}{2}}$$ which is the density of the standard normal distribution. So, I would first plug in the PDF and get $$E[X] = \int_{-\infty}^{\infty} x\frac{1}{\sqrt{2\pi}}e^{\frac{-x^{2}}{2}}\mathrm{d}x$$ which is a rather messy looking equation. The constant $\displaystyle\frac{1}{\sqrt{2\pi}}$ can be moved outside the integral, giving $$E[X] = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} xe^{\frac{-x^{2}}{2}}\mathrm{d}x.$$ I get stuck here. How do I calculate integral? Am I doing this correctly this far? Is the simplest way to get the expected value?
How do I access the command line argument that I set in my project. for example if I give following input to command line "abc def ghi" then how do I access them using argc &/or argv. I am getting some integer values if I am accessing them via argv[i] or *argv[i] Thanks.
How can I parse integers passed to an application as command line arguments if the app is unicode? Unicode apps have a main like this: int _tmain(int argc, _TCHAR* argv[]) argv[?] is a wchar_t*. That means i can't use atoi. How can I convert it to an integer? Is stringstream the best option?
I would like to shoot professionally but am having an issue with my Nikon D3300. I shoot product photography, mainly sunglasses. My questions is what function, mode, and option should I choose on this camera to be able to shoot professional photos such as the one below. I am interested in sharp images to capture the text on the foreground and the background on the temples of the sunglasses. The green focus box will only either capture the background or the foreground separately on two different images. I would like both on one image.
I want to make a full focus on the body, for example: I need to have a clear focus on the each balls in the photo. I used just single point focus. In this picture I used: shutter speed: 8 aperture: F/4 ISO: 200 2 flashes, one in the right and one on the top of project camera: nikon d300s lens : 105mm micro 2.8 Thanks
I am trying to understand (self-study) a few things from set theory. One particular claim I encountered is the following: "Can we always rank the cardinalities of any two sets? The answer is affirmative, and when equipped with the Well-Ordering Principle, not difficult to prove." They follow it up with an exercise question: Show that, for any two sets $A$ and $B$, we have either $A\succ_{card} B$ or $B\succ_{card} A$. I would like to get clues on how to approach this question. I know the Well-Ordering Principle.
For any pair of sets $A$ and $B$, we can define $A\le B$ iff there exists injection $f\colon A\rightarrow B$. I am trying prove that $$(A\le B)\vee (B\le A).$$ I have tried assuming $\neg (A\le B)$, then proving $B\le A$ by constructing the required injection, but I haven't been able to make any progress. Any hints, etc. would be appreciated. EDIT Assuming $\neg (A\le B)$, can you prove there exists a surjection $f: A\rightarrow B$? Then it would be easy, by applying AC, to construct an injection $g: B\rightarrow A$
Let $f$ be a complex valued function holomorphic on the unit disk with $f(0) = 0$. Then $\lvert f(z) + f(-z) \rvert \le 2 \lvert z \rvert^2$. I was looking at this but I still unsure about certain steps. $\textbf{proof attempt.}$ Define $g(z) = \frac{f(z) + f(-z)}{2}$ (which is also holomorphic). Then $g(0) = 0$ and if I could show $\lvert g(z) \rvert \le 1$, then by Schwarz's lemma $\lvert g(z) \rvert \le \lvert z \rvert$. Now define $h(z) = \frac{g(z)}{z}$, and by Riemann removable singularity theorem we can define $h(z)$ on all of $D(0,1)$ since $h$ is bounded at $z=0$ since $\lim_{z\to0} \frac{g(z)}{z} = g'(0) = 0$. Thus $h(0) = 0$ and $\lvert h(z) \rvert = \lvert \frac{g(z)}{z} \rvert \le 1$ finally applying Schwarz's lemma to $h$ we obtain $\lvert \frac{g(z)}{z} \rvert \le \lvert z \rvert$ which is the desired result. // How do I show $\lvert g(z) \rvert \le 1$?
Let , $\Delta = B(0,1)$. If $f:\Delta \rightarrow \Delta$ is holomorphic, and $f(0)=0$, prove that $|f(z)+f(-z)| \leq 2|z|^2$. My attempt so far: $\displaystyle f(z) = \sum_{n=0}^{+\infty} a_n z^n = \sum_{n=0}^{+\infty} a_{2n} z^{2n} + \sum_{n=0}^{+\infty} a_{2n+1} z^{2n+1}$ $\displaystyle f(-z) = \sum_{n=0}^{+\infty} a_n (-z)^n = \sum_{n=0}^{+\infty} a_{2n} z^{2n} - \sum_{n=0}^{+\infty} a_{2n+1} z^{2n+1}$ Then, $\displaystyle f(z)+f(-z) = 2 \sum_{n=0}^{+\infty} a_{2n} (z^2)^n =: 2 g(z^2)$ If $g(\Delta) \subset \Delta$, as $g(0) = 0$, I can invoke Schwarz Lemma and I win. However, I don't know how to prove this. Could anyone help me? Thanks!
Related: Looks like there was a keyboard shortcut for it. But in 10.11.6 all I get when I press Cmd Shift . is the bonk sound. Is that keyboard shortcut gone? What's an easy way to get it back? Note that the shortcut works in file dialogs but not the standard Finder window. Not a duplicate: the top ranked question on does not work in El Cap.
I need an easy way to switch files visibility on Mac. I know about Terminal commands how to show hidden files and hide files. However, I need a tool to make this task faster and easier. I was trying to find a special app in the App Store, but found nothing. Is there any way to show/hide hidden files without launching Terminal? Any tips or apps?
For $a>0$,the series $\sum_{n=1}^\infty a^{\ln n}$ is convergent if and only if (1). $0<a<e$ (2). $0<a\leq e$ (3). $0<a<\frac{1}{e}$ (4). $0<a\leq \frac{1}{e}$ I tried with $a=e$ as well as $a=\frac{1}{e}$. I can eliminate (1),(2) and (4), but how can I confirm (3)?
For $a>0$, test the convergence of the infinite series: $$\sum a^{\ln(n)}$$ Which test should be better to use here? I tried the D'Alembert's ratio test. $$\lim_{n\to \infty} {\frac{a^{\ln(n)}}{a^{\ln(n+1)}}}= \lim_{n\to \infty}a^{ln{\frac{n}{n+1}}}=a^0=1$$ So the test failed. UPDATE: I observed that $${a^{\ln(n)}}=e^{{\ln(a)}{\ln(n)}}={n^{\ln(a)}}={{1\over n^{ln({1\over a})}} }$$Further by test of auxiliary series $$\sum \frac{1}{n^p}$$ we know that criterion for convergence is $p>1$. Here $p=ln({1\over a})$.Hence the series will be convergent when $ln(a)<-1$ i.e. when $0<a<1/e$, since $a>0$ is already given.Finally this solved my question.
You see I can tap on the link and it behaves totally well. Yet its color shouldn't be black, though. MD source: [***Link***][1] blah text. [1]: /. Demo: blah text.
I saw a link to IMDB in on Movies.SE site. This link text has been italicized and emboldened by the user. It says Time Enough At Last. And now the link is hidden. It loses its blue coloring that other links receive, making it impossible to know it is a hyperlink. Can this be fixed? It's likely a conflict in CSS rules. Android 4.4, default browser (chromium), Galaxy S5. Notice the Wikipedia link is blue. I had not visited either url so they should not be colored differently. The same page, in full site/desktop mode, shows the same link blue, so this is just a problem on mobile web. Just tested, on regular Safari, with the iPhone 6 user agent, it also has the same issue. The Inspector shows the problem. The em style is overriding the a > em somehow in the mobile CSS. em { color: #0C0D0E; } a, a:visited { text-decoration: none; color: #07C } a, a > em { color: #07C }
As the title states my netbook keeps freezing on Ubuntu 17.04 keeps freezing on asus x205ta. I have looked at all the post about the freezing problems and what to do. My problem is that nothing works at all. I can hit any combination of buttons and still nothing. I am not sure what to do or if it is just my netbook? Specs for netbook: Processor Intel® Bay Trail-T Quad Core Z3735 1.33 GHz Processor Operating System Windows 10 Memory DDR3L 1333 MHz SDRAM, 2 GB Display 11.6" 16:9 HD (1366x768) Glare panel Graphic Integrated Intel® HD Graphics Storage 32GB eMMC Card Reader card reader (Micro SD Micro SDXC Micro SDHC ) Camera VGA Web Camera Networking Built-in Bluetooth™ V4.0 Interface 1 x Microphone-in/Headphone-out jack 2 x USB 2.0 port(s) 1 x micro HDMI 1 x micro SD card Audio Built-in Speakers And Microphone SonicMaster Battery 38 Whrs Polymer Battery Power Adapter Output : 19 V DC, 1.75 A, 33 W Input : 100 -240 V AC, 50/60 Hz universal Dimensions 286 x 193.3 x 17.5 mm (WxDxH) Weight 2.16 lbs (with Polymer Battery) Certificates UL, MIC, CE Marking Compliance, FCC Compliance, BSMI, Australia C-TICK / NZ A-Tick Compliance, CCC, GOST-R, CB, Energy star, IDA, Erp 2013, RoHS, JATE
My system freezes completely at random, frequent intervals. I started to have the same problem in Ubuntu 14.04 but after recent upgrade to 16.04 there is no improvement, in fact it seems worse. When it happens, it's impossible to do anything. I've tried everything in this thread: but nothing works, I have to hard reset. I have read all the system logs and journalctl but there is never any information that could help diagnose the problem. This is a dual-boot system with Windows 10 and there's no problem there, so it's not defective hardware. My laptop has an Intel Bay Trail processor (Pentium N3540)
So the giveTaxChart method is supposed to take the incomeArray,sort it in a ascending order and then populate taxArr with the tax values that each income recieves through the payableTax method, but even though the payableTax method is tested and indeed works, Im still getting a NullpointerException when I use the giveTaxChart method and enter reasonable values. Is there something obviosly wrong with my method or should I look somewhere else ? public static void giveTaxChart(int[] incomeArray) { Arrays.sort(incomeArray); for (int i = 0; i < incomeArray.length; i++) { for (int j = 0; j < incomeArray.length; j++) { taxArr[j] = TaxCalculator.payableTax(incomeArray[i]); draw(i * 20, (i * 20) + 1, taxArr[j]); } draw(i * 20, i * 20, incomeArray[i]); } } This is the full error message : Exception in thread "main" java.lang.NullPointerException at com.company.Entities.TaxChart.giveTaxChart(TaxChart.java:36) at com.company.Main.main(Main.java:21) And this is what main contains : public static void main(String[] args) { Scanner in = new Scanner(System.in); int income = in.nextInt(); System.out.println("Tax payable is" + " " + TaxCalculator.payableTax(income) + " " + "£"); int numberOfIncomes = in.nextInt(); int [] incomeArray = new int[numberOfIncomes]; for (int i = 0;i < numberOfIncomes ; i++ ){ incomeArray[i] = in.nextInt(); } TaxChart.giveTaxChart(incomeArray); } And this is the declaration of taxArr : private static Integer[] taxArr;
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?
Is the scheme for generating $\displaystyle p_n=\left(\frac{1}{3}\right)^n$ stable? $\displaystyle p_{n} = \frac{5}{6} p_{n-1} - \frac{1}{6} p_{n-2}$
Is the scheme for generating $p_n=(1/3)^n$ stable or not? $$p_n= \frac{5}{6} p_{n-1} - \frac{1}{6}p_{n-2}.$$
given some $n \in \mathbb{N}$, prove that $A \cap ( B_1 \cup \cdots \cup B_n) = (A \cap B_1) \cup \cdots\cup (A \cap B_n)$ Using unary union and intersection and basic set theory. My approach : Let $B = \{ B_i \mid 1\leq i \leq n \}$ And let $C = \{ A \cap B_i \mid 1\leq i \leq n \}$, so now i need to prove that $A \cap \bigcup B = \bigcup C$ but i don't know how to proceed, i know i have to let $x$ be anything and assume that $x \in \bigcup C$ and prove it must be in $x \in A \cap \bigcup B$, but this formal step i don't know how to do it, please help. Update : one should use unary union
given $n \in \mathbb{N}$ ,prove that $A \cap (B_1 \cup B_2 \cup \cdots \cup B_n) = (A \cap B_1) \cup (A \cap B_2) \cup \cdots \cup (A \cap B_n) $ ? (As HomeWork) Now i know how to prove using induction or using "without loss of generality", But unfortunately we did not learn them in class so "We don't know them", is there another way to prove the above equality !
Question: Why wouldn't this work?
I realize this isn't possible, but I can't see why not, especially if you change the model a little bit so that the balls simply travel through a tube of water on the way up, rather than exactly this model. Please be clear and detailed. I've heard explanations like "the balls wouldn't move" but that doesn't do it for me - I really do not see why the balls on the right would not be pulled/pushed up, and the rest of the chain wouldn't continue on.
Basic Specs - Ubuntu 13.10, Gnome 3 (session fallback), Ambiance theme, Faenza icons. I recently installed , now everytime i want to use the program i have to run the sudo /opt/lampp/lampp start command, im quite new at ubuntu but i know my way around some things and i knew i can make a shell script to start the program when i double click on it, so, i open nano in the terminal and write: #!/bin/bash/ sudo /opt/lampp/lampp start I save it as "lampp.sh" at my home dir and give it the proper permissions chmod +x lampp.sh and chmod +775 lampp.sh. When i double click on it absolutely nothing happens, in order for it to work i have to open a terminal and run the the script there ./lampp.sh. If i have to open the terminal each time i want to run the script then the script it self is worthless (specially when runing the sudo /opt/lampp/lampp start is 1 line of code), is there anyway i can run it on double click? Thanks in advance, i love this community.
I'm trying to run an executable (testdisk) but double click doesn't work. The only way is to run: sudo ./testdisk from terminal. But I'd like to open executables with double click in future. How can I do this?
I saw a question my number theory notes: for which values of $n$ , $1+n+n^{2}+n^{3}+n^{4}$ is a perfect square where $"n"$ is non negative integer? It was solved my professor using inequalities,but i think that his method is too long.Because of that, i did not write it here. I tried to solve it using modular arithmetic but i could not do it. I am looking for hints or solutions to solve it using modular artihmatic. Note= I tried to use $(mod4)$ because for all $x^{2} \equiv \pm 1 (mod4)$ but i stuck in it.
Integer values of $x$ for which $\bf{x^4+x^3+x^2+x+1}$ is a Perfect Square. $\underline{\bf{My\; Try}}$:: Let $\bf{x^4+x^3+x^2+x+1 = k^2}$, where $k\in \mathbb{Z}$ $4x^4+4x^3+4x^2+4x+1 = 4k^2 = (2k)^2$ Now How can I proceed after that Help Required, Thanks
I often ends up with refactoring question, such as "how do you make this code smaller?". Typical example : $(document).on( "click", '#el1', function(event) { ... do stuff... }); $(document).on( "click", '#el2', function(event) { ... do more or less same stuff... }); $(document).on( "click", '#el3', function(event) { ... do more or less same stuff... }); when I want it to be $(document).on( "click", '#el1, #el2, #el3', function(event) { ... do the whole stuff... }); Is it ok to post these kind of questions on Stackoverflow ?
Is there a good SE site that is only about refactoring? I know there are sites like this, but SO has the largest audience of programmers so a section where you can just post a code snippet and people can give advice on refactoring it.
I changed my project display name and then changed its name in the project navigator. (same new name for both). I noticed the target name didn't change. Now I'm noticing that I can't find or build the project and my intents are out of scope. I tried changing the target name itself. It would let me click on it to edit but it wouldn't save it unless its as the old name. I also tried cleaning the build folder and restarting Xcode based on SO advice, but it didn't work. What do I do?
I began an iPhone project the other day with a silly development code name, and now I want to change the name of the project since it's nearly finished. But I'm not sure how to do this with Xcode, trying the obvious of changing the application's name in the info.plist file, causes the signing process to go wrong (I think...) and my app won't launch giving me a Launcher error. I guess I could make a new project and copy paste everything over, but it seems so primitive that I'm hoping for a more civilized solution.
Given a multilayer perceptron to be used to separate 2 classes. One has 2 design options. 1 -- Use one output node -- where one class is trained to give an output equal to zero, and the other class is trained to give an output of 1 on this node. 2-- Alternatively one could design a network having 2 output nodes; where one class gives an output of 1 on node #1 and zero on node #2, and the second class gives an output of 0 on node #2 and an output of 1 on node #1. Which of these two options is considered better? Also, I notice that the sigmoid function approaches zero but does not quite reach zero. Also, the same function approaches 1 but does not quite reach 1. Given this situation, how can one train a network to output a value of 1 or 0? Should one use something like 0.99 and 0.01 (as opposed to 0 and 1?)
Assume I want to do binary classification (something belongs to class A or class B). There are some possibilities to do this in the output layer of a neural network: Use 1 output node. Output 0 (<0.5) is considered class A and 1 (>=0.5) is considered class B (in case of sigmoid) Use 2 output nodes. The input belongs to the class of the node with the highest value/probability (argmax). Are there any papers written which (also) discuss this? What are specific keywords to search on? This question is already asked before on this site with no real answers. I need to make a choice (Master Thesis), so I want to get insight in the pro/cons/limitations of each solution.
A coworker replied to an earlier email from me with some very good news. I wanted to thank him for his help. I was hoping to start with Thank you, Jim. That is wonderful news... OR is it Thank you Jim. That is wonderful news... Do I place the comma after the "Thank you"?
I see a lot of people saying things such as Nice work, Nick Or Thanks, Mat Is the comma really needed? I'm not 100% sure because my spelling and grammar is not great, but I think it reads very strange.
I have set up a private OpenVPN tunnel which uses the a 10.x.x.x private ip range as the client and server ip. I was wondering if that would cause any problem in big networks that use that ip range also, like for example hotels or conference networks. I noticed trouble staying connected to the internet sometimes and I was wondering if that had anything to do with it. What is the recommend ip address range to use in a VPN setup like this? The setup is: 1 Server 2-3 Clients at once at most (I know that the IP range is overkill, but it was from a tutorial I did some time ago) OpenVPN (if that is anyhow important)
While there's a wide variety of private non-routable networks across 192.168/16 or even 10/8, sometimes in being thoughtful of potential conflict, it still occurs. For example, I set up an installation OpenVPN once with the internal VPN network on 192.168.27. This was all fine and dandy until a hotel used that subnet for floor 27 on their wifi. I re-IP'd the VPN network to a 172.16 network, since that seems to be all but unused by hotels and internet café's. But is that an appropriate solution to the problem? While I mention OpenVPN, I'd love to hear thoughts about this problem on other VPN deployments, including plain ol' IPSEC.
Compare: Which is bigger? $\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad$ $\Large{3^{\sqrt2}}\quad$ or $\quad \Large{2^{\sqrt 3}}$ My attempts: Let, $\quad$ $a=3^{\sqrt 2}$ and $b=2^{\sqrt 3}$ We have $$a^\sqrt{3}=3^\sqrt{6}\\ b^\sqrt{3}=8<3^{\sqrt{4}}<3^\sqrt{6}=a^\sqrt{3} $$ $$a^\sqrt{3}>b^\sqrt{3} \Longrightarrow a>b$$ Question-1: Is my solution correct? Question-2: I saw the following solution was approved on another site. But, the last line seems wrong to me. Am I right?
$\bigodot=?$ $(\sqrt 2) ^ \sqrt 3 \bigodot (\sqrt 3) ^ \sqrt 2$ where $\bigodot is either \lt or \gt$ In other words, which one is larger $(\sqrt 2) ^ \sqrt 3$ or $(\sqrt 3) ^ \sqrt 2$? The best I could do was ending up with $\sqrt \frac {3}{ 2} = \frac {\ln 3}{\ln 2}$ side question : is there a symbol like encircled $?$ for when what we are trying to find is the correct order symbol like one of $\lt,\leq,=,\geq , \gt $ ? Hopefully using just juxtopisition of symbols without resorting to real analysis. is it possible to do with precalculs algebra?
Suppose that $f\in L^1(\mathbb{R})$ and that $f(x)=0$ if $x\notin[0,1]$. For $n=1,2,\ldots,$ let $f_n(x)=f\left(x+\frac{1}{n}\right)$. Prove that $\|f_n-f\|_1\to 0$ as $n\to\infty$.
Let $f \in L^1(\mathbb{R})$, for $a\in \mathbb{R}$ let $f_a(x)=f(x-a)$, prove that: $$\lim_{a\rightarrow 0}\|f_a -f \|_1=0$$ I know that there exists $g\in C(\mathbb{R})$ s.t $\|f-g\|_1 \leq \epsilon$, this is also true for $f_a$ and $g_a$. Now I have the next estimation: \begin{align*} \|f_a-f\|_1 &= \int_{\mathbb{R}} |f(x)-f(x-a)| dx \\ &= \int |f(x)-g(x)+g(x)-g(x-a)+g(x-a)-f(x-a)| \\ &\leq \|f-g\|_1 + \|f_a-g_a\|_1 + \int |g(x)-g(x-a)| \end{align*} my question is: I can argue that $\lim_{a\to0} \int |g(x)-g(x-a)| = \lim_{a\to0} \lim_{T\to\infty} |g(x_0)-g(x_0-a)| 2T$, now I think that I can change the order of the limits here, but I am not sure why? P.s $x_0$ is some point in $[-T,T]$, and the above is valid from the intermediate integral theorem for continuous functions, right? Thanks.
In Windows Explorer (Win7-10) the folder's type is detected automatically by the files in it (e.g., music). I can disable this on folder base manually in the properties of each folder (and its subfolder). But this creates a lot of desktop.ini files. Is there a way to disable the folder type detection on a system based level - like "Windows should never detect the folder types on its own and should always use the plain file view"?
I'm making an automated installer for Windows XP, and I want the default view to be the "details" view on all folders - that is, the effect gotten by setting one folder to the details view, then going to Tools -> Folder Options -> View -> "Apply to All Folders". I also want the status bar to be showing, same as going View -> Show Status Bar. What registry entries should I modify, and to what, to have this be the case?
I have updated to Ubuntu 17.10. Now I want to create a bootable USB stick to use on other machines or to install 17.10 on a new machine. Start up Disk Creator recognizes my USB Drive, but is looking for a CD/DVD containing a source file. I assume an ISO file. I cannot change the source location and even if could, I have no idea where to find the 17.10 ISO on my hard drive. I found sample code to create the USB using the terminal but I can not get that to work either, I keep getting a message saying the add command can not be found! Must I be signed into the root directory to use the necessary commands and if so how do I do that?
This is the third time I've tried to install Ubuntu Server 14.04.03 64-bit on the same laptop, and each time it caused different problems. Each time I wrote the same iso image to a USB flash drive by using a different application and OS. Universal USB Installer (pendrivelinux.com) from Windows WinImage writer from Windows built-in image writer from Linux Mint 17.2 The iso image is the same in all three cases, the USB flash drive is the same, and the laptop is the same. However each time the installation of Ubuntu gave me different installation options. For example, the last time I installed Ubuntu, it didn't show all the packages to choose while installing (Basic Ubuntu server, etc.).
I am trying to make a city with lights on windows. Here is what I have done so far: I have my city and my material for the window lights, but as you can see the tower in the back has the texture strech all the way up, I would like to know if there is a way to "unstrech" it. I have tried to check on the UV map but I found nothing. Does Anyone have an idea how ot make this ? Thx in advance
I just recently got into the nodes system, my knowledge on the subject is limited. I can't seem to find out how to tile textures using my current node setup, because it doesn't tile the them on its own. I know that I could be using a Vector Mapping node, but the way I'm modeling this requires that I texture each part of the building individually. If I use a Vector Mapping node, I'll have to manually adjust each individual part myself. The nodes I'm currently using The problem that I'm having is that if I use the same nodes for a mesh with different dimensions they get stretched. I want to avoid the need of using Vector Mapping nodes and just give it the ability to tile the texture so that it goes over a mesh of any size without stretching.
I am working on a school project for Intro to CS and I can't post my code because our teacher fails us for getting code checked from StackOverflow. My issue is that in my code with the format : while (condition){ Do something; if (new condition){ Do something else; Wait for input; Depending on input make while's condition false; } This code should wait for input when the if statement is evaluated and it does something else. However, my code does not wait for "Wait for input" step and goes directly to the "Do something" step. Here's a bit of the code. Thank you for your help. while (inum != 102) { System.out.println("Enter a number between 1 and 100: "); inum = input.nextInt(); else if (inum == 101) { System.out.println("Are you sure you want to quit?"); confirm = input.nextLine(); if (confirm == "yes") { inum = 102; } } Here the code gives me this when I type in 101: Are you sure you want to quit? Enter a number between 1 and 100: *The code does not wait for confirm = input.nextLine(); if (confirm == "yes") { inum = 102; } step.
I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference?
I have a KVM switch (Trendnet TK 409) that helps me switch between my Ubuntu laptop and Linux computer. The switch use a hotkey for switching (numlock+numlock). Unfortunatly, that only works on Windows. I found a guide on the net, and have now a script called kvm (etc/init.d) #!/bin/bash numlockx on; sleep 1; numlockx off; sleep 1; numlockx on exit 0 I have then attached a hotkey (ctrl+numlock) and this works perfectly.. But I would like to have done so that whenever I shutdown my Ubuntu computer, the script is executed so that I can continue on my windows computer. As mentioned earlier kvm lies in etc/init.d and I have created a shortcut in rc0.d called K99kvm But whenever I turn of my Ubuntu computer, the KVM doesnt switch to Windows computer. As I said the script itself works perfectly with hotkeys, but it doesnt work when turning the computer off. Help would be much appreciated... A small question aswell. Is it possible to create a hotkey in Ubuntu like numlock+numlock (2 clicks on the same button) and if yes, then how?
I'd like to run a .sh file using bash on logout and shutdown of Ubuntu. I have searched up and down the web and have found only fixes for KDE and GNOME. The script is simple, I just need to know if I can add the line of code to the "logoff/shutdown" file or if I need to reference it in another script.
I have a geoserver installed on my local machine and on it i have published the map which is connected to Postegresql. Now i can view a map on geoserver using the openlayers viewer (url-"")" Now i have code api of leaflet to customise a map which is hosted on geoserver. Here is a HTML code: <!DOCTYPE html> <html > <head > <title> Leaflet Demo </title> <link rel="stylesheet" href="https://npmcdn.com/[email protected]/dist/leaflet.css" /> <script src="https://npmcdn.com/[email protected]/dist/leaflet.js"></script> </head> <body> <form id="form1" > <div id="map"></div> <div> var map = L.map('map').setView([55.67, 12.60], 11); var mywms = L.tileLayer.wms("http://localhost:8081/geoserver/test/wms", { layers: 'k101:theme-startkort', format: 'image/png', transparent: true, version: '1.1.0', attribution: "myattribution" }); mywms.addTo(map); </div> </form> </body> </html> But when compiling on visual studio ,browser displays : a code itself Any idea, what to do?
I'm not very skilled within the GIS world, however, I would like to know if it's possible to use this map: within leaflet? I've looked at the API for leaflet and can see that it is possible to use custom maps/tiles with the tileLayer option. However, I cannot get it to work. Can someone point me in the right direction?
For example, $\sqrt{4}$. I've asked a bunch of people and I get mixed answers all the time, as to whether it is $-2$ and $+2$ or just $+2$. How about if there's a negative in front of the square root sign, for example, $-\sqrt{4}$? Would that still be plus or minus or just minus?
It is perhaps a bit embarrassing that while doing higher-level math, I have forgot some more fundamental concepts. I would like to ask whether the square root of a number includes both the positive and the negative square roots. I know that for an equation $x^2 = 9$, the solution is $x = \pm 3$. But if simply given $\sqrt{9}$, does one assume that to mean only the positive root? And when simply talking about the square root of a number in general, would one be referring to both roots or just the positive one, when neither is specified?
"Prove using simple induction that for each integer $n \geq 1$, $$ 5 + 5^2 + 5^3 +..... + 5^n = \frac{5^{n+1}-5}4 $$ so I start with base step base step: $n = 1$ $$5^1 = \frac{5^{1+1}-5}4 $$ is correct. induction step: so we assume that $P(k)$ is true for all integers $≥1$ $$ 5^{(k+1)} = \frac{5^{(k+1)+1}-5}4 $$ this is where I get stuck :X, i'm confused about the "$5 + 5^2 + 5^3 +\ldots$ " notation in question and just generally where to go from here
I'm working on a double induction problem with the following prompt: Prove by induction on $n$ that for any real number $q > 1$ and integer $n \ge 0$: $$ 1 + q + q^2 + q^3 + \cdots + q^{n-1} + q^n = \frac {q^{n+1}-1}{q-1} $$ Based on , I would imagine the solution is: Base case $(q,n)$ as $(2,n)$ and $(q,0)$ Assume premise for $(2,n)$ and prove $n+1$ Assume premise for $(q,0)$ and prove $q+1$ But even the base cases confuse me...for example on $(q,0)$: $$1+q^0 = \frac {q^{0+1}-1}{q-1} $$ $$2 = 1 $$ That can't right. Maybe I omit the $q^0$ on the LHS, but why?
I have written a program to find all the links in an HTML page: public static void main(String[] args) throws IOException { String base = "http://www.oracle.com/"; URL url = new URL(base); BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream())); StringBuffer stringBuffer = new StringBuffer(); String inputLine = null; while ((inputLine = in.readLine()) != null) { stringBuffer = stringBuffer.append(inputLine).append("\n"); } Matcher matcher = Pattern.compile("<a .*href=\"([^\"]+)\".*</a>", Pattern.DOTALL).matcher(stringBuffer.toString()); ArrayList<String> urlList = new ArrayList<>(); while (matcher.find()){ String relUrl = matcher.group(1); String fullUrl = relUrl.startsWith("/")?base+relUrl.substring(1):relUrl; urlList.add(fullUrl); System.out.println(fullUrl); } in.close(); } For some reason, when I run this code it is only matching one link. However, when I run it without the DOTALL flag, it matches 108 links. The reason I included the DOTALL flag is to match links where the a tag may go over one line, such as: <li><a data-lbl="solutions" href="https://www.oracle.com/solutions/index.html#menu-solutions" data-trackas="hnav" class="u01nav"> <h3>Solutions</h3> </a></li> According to , the regex <a .*href=\"([^\"]+)\".*<\/a> matches the HTML above. (this is slightly different than the one I used in the code because Eclipse wouldn't let me escape the / character)
I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}: The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?
I regularly send out mails using different addresses from different domains. Let's take [email protected] and [email protected] as an example. To keep things easy and centralized (as in: configuration is on the server, so I don't have to set up each client separately), I always use smtp.example.com as my outgoing mail server, which is an Exim on Debian. Now, the admin of this fictitious spf.com has activated SPF and tells me that mails sent from my @spf.com-address through example.com might start getting filtered. Makes sense! Of course, I now would go ahead and set up all the different clients I use (home PC, laptop, work machine, smartphone, …) so that mails from the different domains go out through their respective SMTPs. If you ever tried this, it's a hassle: Each client is different and not all are as easy to configure. It would be so much easier to tell Exim to: check outgoing mails before sending them, "intercept"/filter out ones from @spf.com, and "forward"/send those through smtp.spf.com (with the provided username and password) instead. This way, I could set up the whole thing once on the server and be done with it—every client would work "out of the box". I've been having trouble searching for the correct terms to google for; I'd be surprised if Exim wasn't able to do something like this!
I want to route emails with the From: .*@host1.com through smtp.server1.com and emails with the From: .*@host2.com through smtp.server2.com. For the moment, I have smarthost configured with dpkg-reconfigure exim4-config so that update-exim4.conf.conf contains the line dc_smarthost='smtp.server1.com::587'. That is, everything routes through smtp.server1.com. I tried adding another router just before the definition of smarthost: in the config file, setting senders = .*@host2.com smarthost_server2: debug_print = "R: smarthost_server2 for $local_part@$domain" driver = manualroute domains = ! +local_domains transport = remote_smtp_smarthost senders = .*@host2.com route_list = * smtp.server2.com byname host_find_failed = ignore same_domain_copy_routing = yes no_more but exim still routes everyting via smtp.server1.com. Do I use the senders condition correctly? AFAIU, this should be a rather common setup for cases when people with emails [email protected] and [email protected] do not want to reveal in their @gmail.com email headers the fact that they are also google employees, so the routhing should be different.
I've found plenty of instructions on how to add Google Calendar to Outlook (via ics links) but nothing on how to do it the other way around, which is what I want. How do I share an Outlook calendar so that I can view it in Google Calendar?
Is there anyway to sync Outlook's calendar with Google's calendar? I've tried before but it doesn't work properly. I'm using Windows 7 and Outlook 2010. The thing is, it's really easy to check my Google Calendar on my phone since I have an Android terminal, but on my computer I prefer just opening Outlook instead of opening a web browser and logging into Gmail.
How to prove second moment of a quadratic form where $Z$ has normal distribution with mean zero and covariance matrix identical?
For random variables $X \in \mathbb{R}^h$, and a positive semi-definite matrix $A$: Is there a simplified expression for the expected value, $\mathop {\mathbb E}[Tr(X^TAX)]$ and variance, $Var[Tr(X^TAX)]$? Please note that $A$ is not a random variable.
Let $\phi :F $ $\to$ $ R $ be a ring homorphism. Prove either $\forall x \in F ,\phi (x)=0 $ or $\phi$ injective. Def homorphic: $\forall x,y \in F \Rightarrow f(a)+f(b)=f(a+b) \wedge f(a)f(b)=f(ab) $ Injective (one-to-one) If $f(a)=f(b) \Rightarrow a=b$ My attempt There are 2 cases either $\forall x \in F:\phi (x)=0$ or not that is $\exists x \in F:\phi (x)\neq 0$. There is theorem stating that $f(0_S)=0_R$ (Need to show that in the case $\exists x \in F:\phi (x)\neq 0$ $\implies$ injective) Assume $f(a)=f(b)\equiv f(a-b)=0_R=f(0_s)$ so $a-b=0_s$$\therefore$ $a=b$ Not sure it might be correct. Also, In the case that shows it is injective it is bothering me that the special property was not used. There is a related problem but it is a So i think i can't make same
Possible Duplicate: $f:K\rightarrow R$ is a homomorphism from field to ring. To prove is that it is injective or zero.
How can I take a return value which is a char, and check if the char is contained within a String? I've been told that I should be able to work with the char as is, w/o converting to String. SO I have something like: String answer = "JAVA IS THE BEST"; char guess = getUserInput(); //Returns a char if (answer.contains(Character.toString(guess))){ //DO SOMETHING } I was told this is "incorrect" and should be able to work with the char return value as is?! Thanks
In Java is there a way to check the condition: "Does this single character appear at all in string x" without using a loop?
I have a list of strings List<string> str = new List<string> str.Add("test1"); str.Add("test2"); str.Add("test3"); After some processing this list goes to some service where the list gets modified and can have any of the three values "test1"," test2", "test3" or all of them. I want to filter this list based on the strings: "test1"," test2", "test3" and dump it into some another object. How do I filter it without giving hardcoded string values? How do I do it in C# using Linq?
I am looking for a very fast way to filter down a collection in C#. I am currently using generic List<object> collections, but am open to using other structures if they perform better. Currently, I am just creating a new List<object> and looping thru the original list. If the filtering criteria matches, I put a copy into the new list. Is there a better way to do this? Is there a way to filter in place so there is no temporary list required?
The privilege which is gained at one thousand reputation has been around forever. We all know that it lets you see the vote count on posts. But I propose we remove the 1k reputation restriction that is in place to access vote counts. Or at least make it to where that privilege doesn't appear on the . Why? Because that restriction is completely, 100% useless as you have been able to view vote counts without having 1000 reputation for ages, with . You don't even have to be signed in to view the vote counts. Why have a useless privilege when you dont actually even need 1k rep?
Just curious, why is there a required privilege (especially one as high as 1000) to view vote counts for a post? It's not like someone can mess up a post by just viewing the vote counts. Is it just to give people incentive to reach 1000?
I am trying to find the value of $\prod_{i=0}^{\infty}{p_i-1 \over p_i}$ = ${\lim_{x \to \infty}} {\phi(p_x!) \over p_x!}$ Where $p_x!$ is the $x$th primorial, and $p_i$ is the $i$th prime number. I guess I can honestly say I have no idea where to start, other than just iteriating it manually (around $0.25$ maybe?)
Where pn is the nth prime number, does the infinite product $$\prod_{n=1}^{\infty}\left(1-\frac{1}{p_n}\right)$$ converge to a nonzero value? (Any help would be much appreciated!)
Is it true that $2^n - 1$ is a prime if and only if n is a prime?
I have the following question where I need to provide a counterexample if $n$ is prime, then $2^n -1$ is prime The statement is invalid and I now that $2^n -1$ is not prime when $ n = 11$, but other than plugging in prime numbers is there any other way to figure out whether $2^n -1$ is prime if $n$ is prime?
Ball A (2 kg) is moving towards ball B (1 kg) at 4 m/s. On the other side, ball C (7 kg) is moving towards ball B at 3 m/s. If all three balls collide elastically at the same time, what is the final velocity of each ball? This is a one-dimensional system with no spin, and the coefficient of restitution is 1. I've tried having the balls collide one at a time, but I got different answers when A and B collide first and when B and C collide first.
I have written an algoritm to resolve a collision between two balls with conservation of momentum. It looks to work exactly as expected in my simulations. Here is the code: public void Resolve() { var r = 0.5; // coefficient of restitution var m = Ball1.Mass + Ball2.Mass; var ua = Ball1.Velocity.Magnitude * Math.Cos(Ball1.Velocity.Angle(Normal)); var ub = Ball2.Velocity.Magnitude * Math.Cos(Ball2.Velocity.Angle(Normal)); var va = (r * Ball2.Mass * (ub - ua) + Ball1.Mass * ua + Ball2.Mass * ub) / m; var vb = (r * Ball1.Mass * (ua - ub) + Ball1.Mass * ua + Ball2.Mass * ub) / m; Ball1.Velocity -= Normal * (ua - va); Ball2.Velocity -= Normal * (ub - vb); } Now I also want to make this work for more than two balls colliding at the exact same moment. My initial thought was that I could just solve this equation several times for each contact between balls. When I have a situation like a "Newton's cradle" where the balls is in contact in a "serial" way it's easy to just solve each collision on at a time and without moving the balls just go ahead and calculate the next and the next etc until reaching the last ball which will end up with all energy not lost along the way. This works fine also, albeit not very fast. But what about for instance a case where three balls are in contact in a V-shape and the bottom ball is the one with a velocity (up in this case)? I mean how now do I distribute the energy between the other two balls? The equation I have only works for two balls and now I don't see how I can calculate this iteratively anymore. Can you help guide me in how I should think with this? Can I modify my Resolve-function to work with any number of balls? I mean with a set of $N$ balls with connecting surfaces and initial velocity vectors, what will the outcome velocities be? Is there a well known general solution for this? Note: I have tried out the method currently marked as the answer but I have unfortunately got a bit weird results in some setups. Be warned. I will probably revert back to resolving one collision at a time again. I will update this info when I have tried this more.
I live in KwaZulu-Natal, South Africa, and the only indoor bugs I've experienced issues with are fleas, as I have two cats (and a big garden). This morning, however, I put on a fleece top that had been lying around somewhere, got a lift to the store, and returned to suddenly feel a crawling sensation. I lifted up my shirt to find these tiny bugs crawling all over my upper body. I did some Googling, went upstairs and carefully observed my bedding and bed, however, the only evidence I found was a few newborn fleas / flea larvae (which I intend to deal with today). I should also mention that a flock of wild Egyptian Geese have been raising five goslings in my yard, and they get very close to me when I'm walking outside at times. My house is also not carpeted, it has oregon pine floors throughout. I tried to take a photo of the critters, however, they're very tiny and move very quickly, so it was difficult to get a clear shot. Any advice would be greatly appreciated.
This bug is crawling all around the house it stays within the shadows and moves very very slow, i have never seen it jump or run, it just moves very slowly P.S. those bugs as u can see are smaller than 1mm so it's hard to take better pictures but i will get better ones tomorrow P.S. the hairs are not hairs they are wool from the carpets, i just got married in october 2014 and everything in the house is new, including the flat, it was built in january 2014. it is very similar to what's in this picture, but i couldn't take a picture of it because it's tooo tiny I really need to know what it is so I can deal with it :( Edit: once i found a very little few under the carpet but it generally stays away from the carpets and stays on the tiles and I don't think it is a termite because I don't find any piles of eaten wood EDIT 2: More pictures: -- Stage 1 -- -- Stage 2 -- I don't know what it is but I know that there is ones young in age i call them stage 1 they are unable to move and there are ones I call stage 2 older in age and bigger in size and they can move and I think they can bite too -- Insect 2 -- 5mm by 5mm I found this one across the hall from the others and I do't know if it's related, i found it dead but I haven't sprayed that side with insecticides i sprayed the other side so it's possible that it was with the others but ran and died far from them. EDIT: More photos P.S. I found those moving in daylight (now) when i blew a little air i think i turned it
To prove $\frac{\mathrm{d}^3\vec{p}}{E}$ is Lorentz invariant is to prove $$\frac{\mathrm{d}^3\vec{p}}{E} = \frac{\mathrm{d}^3\vec{p}'}{E'} \qquad(\mathrm{d}^3\vec{p} := \mathrm{d}p_x \mathrm{d}p_y \mathrm{d}p_z). \tag{1}$$ Suppose reference system $\Sigma'$ is moving at speed $v=\beta$ ($c=1$) along $z$ axis of $\Sigma$. We have $$E' = \gamma(E - \beta p_z), \qquad p_{x,y}' =p_{x,y}, \qquad p_z' = \gamma(p_z-\beta E), $$ then $$\det\frac{\mathrm{d}\vec{p}'}{\mathrm{d}\vec{p}} = \gamma \Big( 1 - \frac{\mathrm{d}E}{\mathrm{d}p_z} \Big).$$ If $$ \frac{\mathrm{d}E}{\mathrm{d}p_z} = \frac{\partial E}{\partial p_z} = \frac{p_z}{E}, \tag{2} $$ we can prove (1). However, I don't understand the first equality in (2).
When we canonically quantize the scalar field in QFT, we use a Lorentz invariant integration measure given by $$\widetilde{dk} \equiv \frac{d^3k}{(2\pi)^3 2\omega(\textbf{k})}.$$ How can I show that it is Lorentz invariant?
Hi I want to convert a Bitmap to byte[] i did this : byte[] imageInByte; Uri uri = data.getData(); bitmap = null; try { bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uri); } catch (IOException e) { e.printStackTrace(); } int size = bitmap.getRowBytes() * bitmap.getHeight(); ByteBuffer byteBuffer = ByteBuffer.allocate(size); bitmap.copyPixelsToBuffer(byteBuffer); imageInByte = byteBuffer.array(); Next I want to convert this byte[] to Bitmap and I did this : Bitmap bmp = BitmapFactory.decodeByteArray(imageInByte, 0, imageInByte.length); And when I what check a bmp.getWidth(); and show in Toast: Toast.makeText(this,bmp.getWidth()+"",Toast.LENGTH_SHORT).show(); I have nullpointer please help me
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?
The following image is my failed attempt to make a sword handle's surface meet the blade's bottom. How can I snap the blade's bottom to the handle?
I have a sword handle and I want it centered below a completely differently object that has a face on the bottom with a vertex in the middle. I could also snap a central vertex to the other one but I don't know how. How can i do this?
I need to prove the theorem Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be a convex function such that $ \lim_{x\rightarrow -\infty}f(x) = −\infty$. Show that $\lim_{x\rightarrow\infty} f(x) = \infty$ I can see clearly why this must hold by doing a graph where $f(x)$ converges to a constant when $x\rightarrow\infty$. But I have no idea of how to do a formal proof of this.
I don't know how to approach this exercise: Let $f$ be a real valued convex function that satisfies: $$\lim_{x\to-\infty}f(x)=-\infty$$ prove that it must be $$\lim_{x\to+\infty}f(x)=+\infty$$ I know the definition of convexity and limits however I don't know how to prove this formally.
I found a command online to clear the trash for you because I wanted to clear a file without doing it throught GUI. The command is sudo rm -rf ~/.local/share/Trash/* . I called it and saw the folder on my right monitor disapear. I looked on the left monitor to see everything gone. I looked up recovery tools for ubuntu and found photorec . I used it and it said it recovered 200 files but none are there. EVERYTHING from my home directory is gone as well as Documents downloads, etc. How can I recover this? I had many important things I didn't back up.
Are there any tools, methods, incantations to recover recently deleted files on Ubuntu? If it makes any difference, I want to recover a 2.x database file. But would be better to have a method/tool that works on any kind of file.
"Let A = $\begin{bmatrix}1 & 1 & 4\\0 & 3 & -4\\0&0&-1\end{bmatrix}$. Is the matrix A diagonalizable? If so find a matrix P that diagonalizes A. Can you write A as a linear combination of rank 1 matrices formed from its eigenvectors? Determine the eigendecomposition $A = PΛP^{-1}$." My solution attempt: det(λI - A) = $\begin{vmatrix}λ - 1 & -1 & -4\\0 & λ - 3 &4\\0&0&λ + 1\end{vmatrix}$ = (λ -1) (λ -3) (λ + 1) = 0 $λ_{1}$ = 1, $λ_{2}$ = 3, $λ_{3}$ = -1 ($λ_{1}I - A)x_{1}$ = 0 $\begin{bmatrix}0 & -1 & -4\\0 & -2 &4\\0&0&2\end{bmatrix}$ $\begin{bmatrix}x_{11}\\x_{12}\\x_{13}\end{bmatrix}$ = $\begin{bmatrix}0\\0 \\0\end{bmatrix}$ $\begin{bmatrix}x_{11}\\x_{12}\\x_{13}\end{bmatrix}$ = $x_{11} \begin{bmatrix}1\\0 \\0\end{bmatrix}$ It follows that $\begin{bmatrix}1\\0 \\0\end{bmatrix}$ is a basis for the eigenspace of A corresponding to $λ_{1}$ = 1. In a similar way, I found other two basis vectors as $\begin{bmatrix}1/2\\1 \\0\end{bmatrix}$ and $\begin{bmatrix}-2/5\\1 \\1\end{bmatrix}$, and I got $P = \begin{bmatrix}1 & 1/2 & -2/5\\0 & 1 & 1\\0&0&1\end{bmatrix}$. Then my $P^{-1} = \begin{bmatrix}1 & -1/2 & 9/10\\0 & 1 & -1\\0&0&1\end{bmatrix}$. And I said A's left-multiplication by $P^{-1}$ and right-multiplication by $P$ $(P^{-1}AP)$ gives the diagonal matrix Λ that is similar to A. I found Λ as $\begin{bmatrix}1 & 0 & 0\\0 & 3 & 0\\0&0&21/5\end{bmatrix}$. Then I said that if we multiply both sides of the equation $P^{-1}AP = Λ$ by $P$ from the left and by $P^{-1}$ from the right we get $PP^{-1}APP^{-1} = PΛP^{-1} = A$ and that this is the eigendecomposition of A. Here are my questions: Do you think I understood and did correctly what the asker wanted me to do by saying "Determine the eigendecomposition $A = PΛP^{-1}$."? What the hell does the sentence "Can you write A as a linear combination of rank 1 matrices formed from its eigenvectors?" mean?
Let A = $\begin{bmatrix}1 & 1 & 4\\0 & 3 & -4\\0&0&-1\end{bmatrix}$. Is the matrix A diagonalizable? If so find a matrix P that diagonalizes A. Can you write A as a linear combination of rank 1 matrices formed from its eigenvectors? Determine the eigendecomposition $A = PΛP^{-1}$. A = $\begin{bmatrix}3 & 1 & 0\\1 & 2 &1\\0&1&3\end{bmatrix}$. Is the matrix A diagonalizable? If so find a matrix P that orthogonally diagonalizes A. Can you write A as a linear combination of rank 1 matrices formed from its eigenvectors? (Note that A is real symmetric so that you do not have to compute the inverse of P). My solution attempts: det(λI - A) = $\begin{vmatrix}λ - 1 & -1 & -4\\0 & λ - 3 &4\\0&0&λ + 1\end{vmatrix}$ = (λ -1) (λ -3) (λ + 1) = 0 $λ_{1}$ = 1, $λ_{2}$ = 3, $λ_{3}$ = -1 ($λ_{1}I - A)x_{1}$ = 0 $\begin{bmatrix}0 & -1 & -4\\0 & -2 &4\\0&0&2\end{bmatrix}$ $\begin{bmatrix}x_{11}\\x_{12}\\x_{13}\end{bmatrix}$ = $\begin{bmatrix}0\\0 \\0\end{bmatrix}$ $\begin{bmatrix}x_{11}\\x_{12}\\x_{13}\end{bmatrix}$ = $x_{11} \begin{bmatrix}1\\0 \\0\end{bmatrix}$ It follows that $\begin{bmatrix}1\\0 \\0\end{bmatrix}$ is a basis for the eigenspace of A corresponding to $λ_{1}$ = 1. In a similar way, I found other two basis vectors as $\begin{bmatrix}1/2\\1 \\0\end{bmatrix}$ and $\begin{bmatrix}-2/5\\1 \\1\end{bmatrix}$, and I got $P = \begin{bmatrix}1 & 1/2 & -2/5\\0 & 1 & 1\\0&0&1\end{bmatrix}$. Then my $P^{-1} = \begin{bmatrix}1 & -1/2 & 9/10\\0 & 1 & -1\\0&0&1\end{bmatrix}$. And I said A's left-multiplication by $P^{-1}$ and right-multiplication by $P (P^{-1}AP)$ gives the diagonal matrix Λ that is similar to A. I found Λ as $\begin{bmatrix}1 & 0 & 0\\0 & 3 & 0\\0&0&21/5\end{bmatrix}$. Then I said that if we multiply both sides of the equation $P^{-1}AP = Λ$ by $P$ from the left and by $P^{-1}$ from the right we get $PP^{-1}APP^{-1} = PΛP^{-1} = A$ and that this is the eigendecomposition of A. Here is my first question: Do you think I understood and did correctly what the asker wanted me to do by saying "Determine the eigendecomposition $A = PΛP^{-1}$."? I started in the same manner and I got three eigenvectors as $\begin{bmatrix}x_{11}\\x_{12}\\x_{13}\end{bmatrix}$ = $x_{12} \begin{bmatrix}0\\1 \\0\end{bmatrix}$, $\begin{bmatrix}x_{21}\\x_{22}\\x_{23}\end{bmatrix}$ = $x_{21} \begin{bmatrix}1\\1 \\1\end{bmatrix}$ and $\begin{bmatrix}x_{31}\\x_{32}\\x_{33}\end{bmatrix}$ = $x_{33} \begin{bmatrix}1\\-2 \\1\end{bmatrix}$. I said A is not diagonalizable since the eigenvectors are not linearly independent. Here is my second question: What the hell does the sentence "Can you write A as a linear combination of rank 1 matrices formed from its eigenvectors?" mean?
The Anscombe Quartet powerfully makes the point about the effectiveness of a visualization. Do people have other (pedagogically tested) vignette/dataset examples, especially based on economic/business data, for which using the right visualization helps the analyst gain unique insights about patterns in the data?
I've just come across (four datasets that have almost indistinguishable descriptive statistics but look very different when plotted) and I am curious if there are other more or less well-known datasets that have been created to demonstrate the importance of certain aspects of statistical analyses.
Ubuntu won't find any wifi near me to connect and I don't know how. I was fine connecting to wifi with windows 7 but now I can't connect to any or find wifi. Here is the output of lspci -knn | grep Net -A3; rfkill list: 09:00.0 Ethernet controller [0200]: Broadcom Corporation NetXtreme BCM5752 Gigabit Ethernet PCI Express [14e4:1600] (rev 02) Subsystem: Dell NetXtreme BCM5752 Gigabit Ethernet PCI Express [1028:01cc] Kernel driver in use: tg3 Kernel modules: tg3 0c:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [14e4:4311] (rev 01) Subsystem: Dell Wireless 1390 WLAN Mini-Card [1028:0007] Kernel driver in use: b43-pci-bridge Kernel modules: ssb 0: dell-wifi: Wireless LAN Soft blocked: no Hard blocked: no
I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible. What are the steps to install Broadcom wireless drivers for a BCM43xx card? I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc. lspci -vnn | grep Network showed: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b] iwconfig showed: lo no wireless extensions. eth0 no wireless extensions. NOTE: Answer below is updated every time new information is added and confirmed working.
I am successfully checking, if a string matches any value in a dictionary. The string is a substring of the value (if matching). Upon matching, I append the key of the value, where the substring was found, to a list. Is there any way in python to introduce something like an if condition, to do the following: "only append to the list, if the substring matches at position 60+ (of 100) in the value" My code so far: #!/usr/bin/python3 # imports import re,sys import itertools # handling stdin faFile=sys.argv[1] pat=sys.argv[2] pat2=sys.argv[3] # opening .fa-File and building dictionary with open (faFile) as f: # reading file-content line by line content=f.readlines() # stripping linebreaks and > content=[x.strip()for x in content] content=[x.strip('>') for x in content] # building dictionary from content # IDs are keys, sequences are values d=dict(itertools.zip_longest(*[iter(content)]*2, fillvalue="")) # motif- search function def search (myDict, search1, search2): # initialize empty list to store found keys search.a=[] # iterating through dictionary for key, value in myDict.items(): if search1 in value: if search2 in value: search.a.append(key) search(d,pat,pat2) print(search.a) Command-line call: ./search.py file.fa pat pat2 I thought of something like introducing a counter, but couldn't figure it out yet
I need a good explanation (references are a plus) on Python's slice notation. To me, this notation needs a bit of picking up. It looks extremely powerful, but I haven't quite got my head around it.
I have my own DNS server, DHCP sets it in any host on the LAN. I have just installed a new Ubuntu 17.10 laptop This command nslookup abox Can't find the IP of abox (it is in DNS) nslookup > server 192.168.1.30 abox Returns the correct address systemd-resolve --status claims to be using DNS Servers: 192.168.1.30 But it obviously is not, its using 127.0.0.53, I can see the traffic in tcpdump. So how do I tell systemd to stop messing with the DNS config that DHCP has told it to use and to actually start using the DNS server it claims to be using?
My DNS server is 192.168.1.152. This DNS is provided to clients by DHCP. The windows clients on my LAN resolve names properly using that DNS, but my Ubuntu VM doesn't. The VM is set up with bridge networking and is being properly provided the DNS server, but my local hostnames aren't being resolved by nslookup or browsers. Here is an nslookup of one of my local domains: # nslookup unraid.local Server: 127.0.0.53 Address: 127.0.0.53#53 ** server can't find unraid.local: SERVFAIL Here is what it should resolve by using my DNS server: # nslookup unraid.local 192.168.1.152 Server: 192.168.1.152 Address: 192.168.1.152#53 Name: unraid.local Address: 192.168.1.152 /etc/resolv.conf has a wrong nameserver: # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN # 127.0.0.53 is the systemd-resolved stub resolver. # run "systemd-resolve --status" to see details about the actual nameservers. nameserver 127.0.0.53 I ran that command. Under DNS Servers, confusingly, it specifies the correct server (and my default gateway). root@ubuntu:~# systemd-resolve --status Global DNSSEC NTA: 10.in-addr.arpa 16.172.in-addr.arpa 168.192.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.in-addr.arpa 21.172.in-addr.arpa 22.172.in-addr.arpa 23.172.in-addr.arpa 24.172.in-addr.arpa 25.172.in-addr.arpa 26.172.in-addr.arpa 27.172.in-addr.arpa 28.172.in-addr.arpa 29.172.in-addr.arpa 30.172.in-addr.arpa 31.172.in-addr.arpa corp d.f.ip6.arpa home internal intranet lan local private test Link 2 (ens33) Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6 LLMNR setting: yes MulticastDNS setting: no DNSSEC setting: no DNSSEC supported: no DNS Servers: 192.168.1.152 192.168.1.1 I don't want to "hard code" the DNS server's IP in a config file because I won't be able to resolve when I change networks. How can I get resolvconf and NetworkManager to automatically set the DHCP server's IP in /etc/resolv.conf?
I'm beginner with Java EE, when I try to transfer an object between a JSP and a Servlet I use a session. For an homework, I have to create an e-commerce website. I just have this in my jsp: HttpSession sess = request.getSession(); Panier pan = new Panier(); sess.setAttribute("panier", pan); sess.setAttribute("produit", produits.get(0)); produits is an arraylist of "produit" object. In my Servlet: HttpSession sess = request.getSession(); Panier pan = (Panier) sess.getAttribute("panier"); Produit p1 = (Produit) sess.getAttribute("prod"); When I'm here, all works cause I can display the good attributes of the object pan or p1. But, when I use my method "ajouterProduit" (addProduct in English), a savage null pointer exception appears. My class "Produit": public class Produit implements java.io.Serializable{ private String nom; private int prix; public Produit(String name, int price){ this.nom = name; this.prix = price; } public void setNom(String n){ this.nom = n; } public void setPrix(int p){ this.prix = p; } public String getNom(){ return this.nom; } public int getPrix(){ return this.prix; } } My class "Panier" (basket in english): public class Panier implements Serializable{ private List<Produit> panier; private static int montant = 0; public Panier(){ panier = new ArrayList<>(); } public void ajouterProduit(Produit p1){ panier.add(p1); montant = montant + p1.getPrix(); } public void ajouterProduit(Produit p1, Produit p2){ panier.add(p1); montant = montant + p1.getPrix(); panier.add(p2); montant = montant + p2.getPrix(); } public void ajouterProduit(Produit p1, Produit p2,Produit p3){ panier.add(p1); montant = montant + p1.getPrix(); panier.add(p2); montant = montant + p2.getPrix(); panier.add(p3); montant = montant + p3.getPrix(); } public List<Produit> getPanier(){ return panier; } public int getMontantTotal(){ return montant; } } Thanks in advance for help ! ;)
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 need to take a screenshot which I was coding in my game result screen. I used the following method that I found in StackOverflow: public void TakeScreenShot(){ Date now = new Date(); android.text.format.DateFormat.format("yyyy-MM-dd_hh:mm:ss", now); try { String mPath = Environment.getExternalStorageDirectory().toString() + "/PICTURES/Screenshots/" + now + ".jpg"; v1 = this.findViewById(android.R.id.content).getRootView(); v1.setDrawingCacheEnabled(true); bitmap = Bitmap.createBitmap(v1.getDrawingCache()); v1.setDrawingCacheEnabled(false); File imageFile = new File(mPath); FileOutputStream outputStream = new FileOutputStream(imageFile); int quality = 100; bitmap.compress(Bitmap.CompressFormat.JPEG, quality, outputStream); outputStream.flush(); outputStream.close(); Toast.makeText(this, "Screenshot OK", Toast.LENGTH_SHORT).show(); } catch (Throwable e) { e.printStackTrace(); } } but I'm getting NullPointerException at Bitmap.CreateBitmap. My Bitmap and Views are global and I try to call method in OnCreate. 11-04 15:20:17.868 13569-13569/com.finger W/System.err: java.lang.NullPointerException How can I solve this problem? I FOUND SOLUTION! I try to call takeScreenshot method in onCreate and always i got same result all different variation, but i try call method in "Share Button" click event, now its working. Thank you.
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?
Please settle an UNO debate with regards to Wild Draw 4. The face card on top of the pile is a Blue 0. Player 1 plays WD4 but does not change the color. Player 2 plays WD4 changes the color to Blue. Player 3 challenges player 2 on having Blue cards. Who is being challenge player 1 or 2?
Need clarification on the Draw 4 rule. - Player 1 lays down a Draw 4 Card and says the color is Red. - Player 2 does not have a Red card but has a Draw 4 Card. Can Player 2 lay down his Draw 4 Card and have Player 3 draw 8 cards?
I wish to write text from stdin to a file that is owned by root. I'm doing this programmatically across an SSH connection - essentially from a script - so using a text editor is out of the question. There is no terminal. The process is entirely automated. Given that [a] root elevation can be obtained via sudo, and [b] files can be written to using cat with redirection, I assumed the following would work: ssh user@host sudo cat >the-file Unfortunately, the redirection is applied to sudo, not to cat. How can I apply redirection to cat in this example?
I've been given sudo access on one of our development RedHat linux boxes, and I seem to find myself quite often needing to redirect output to a location I don't normally have write access to. The trouble is, this contrived example doesn't work: sudo ls -hal /root/ > /root/test.out I just receive the response: -bash: /root/test.out: Permission denied How can I get this to work?
I'm trying to export a model with textures as an FBX. the export works fine except the texture comes out as flat. this is how model looks when its box: this is how model looks when its flat: this is how the model looks when exported as an FBX with "box": i want the export to be like the first picture. the fire texture at the back is exported as "flat" and comes out in the FBX matching the model of the first picture (which is correct). the body texture in the middle is exported as "box" but comes out in the FBX matching the "flat" model in the second picture (which is wrong). has anyone encountered something similar to this?
I used node textures in a mesh I exported to .FBX. I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine. Is there something I'm doing wrong or is it Blender?
Consider the sequence $$ a_{n} = \sum_{r=1}^{n}\frac{1+2+\cdots +r}{r!} $$ Then we have, $$ a_{n} = \sum_{r=1}^{n}\frac{1}{r!} \ + 2\sum_{r=2}^{n}\frac{1}{r!} \ + 3\sum_{r=3}^{n}\frac{1}{r!} \ + \cdots + n\sum_{r=n}^{n}\frac{1}{r!} \ \geq \ 1 + \sum_{r=1}^{n}\frac{1}{r!}$$ for all $n \geq 2$. $\implies \displaystyle \lim_{n \to \infty}a_{n} \ \geq \ e $ Now, in my book it says $\displaystyle \lim_{n \to \infty}a_{n} \ = \frac{3}{2}e $ How can I attack this problem? Anyone please?
What is the value of the following sum? $$\frac{1}{1!}+\frac{1+2}{2!}+\frac{1+2+3}{3!}+ \cdots$$ The possible answers are: A. $e$ B. $\frac{e}{2}$ C. $\frac{3e}{2}$ D. $1 + \frac{e}{2}$ I tried to expand the options using the series representation of $e$ and putting in $x=1$, but I couldn't get back the original series. Any ideas?
I would like to know which one is correct, "She is not yet here." or "She is not here yet." Or are they both correct?
If I have to write a causative sentence in Present Perfect, where should I put yet, at the end of the question or right after the negation? She hasn't had her doors mended by the carpenter yet. She hasn't had her doors mended yet by the carpenter. Has she had her doors mended yet? Could I say this: She hasn't had yet her doors mended. Has she had yet her doors mended? Which is the right order, or are both acceptable?
I saw a lot of materials supposing that the Bernoulli's equation explains the curvature of a soccer ball: since the ball is spinning, two sides of the ball would experience different velocities, and due to Bernoulli's theory, the side with slower velocity generates a higher pressure and push the ball to the other side. However, when we first learnt the Bernoulli's equation, one of the fundamental criteria is that it must be applied on the same streamline. And in the above case, the streamlines on the two sides of the ball are separated. So how does the Bernoulli's theory explain the curving-ball phenomenon? Is that a misconception?
I've seen a here on the Magnus force, which explains why balls with a spin will curve. However, my intuition is still telling me that the Bernoulli's principle would push it the opposite way and I need help understanding why my reasoning is flawed. Imagine that you kick a soccer ball on the left side so that it's spinning clockwise (viewing the ball from above) and the ball will curve to the right. Since the left side of the ball is spinning against the air, wouldn't this mean faster relative speeds and thus a lower pressure than the right side? And wouldn't this lower pressure on the left side cause it to curve left instead of right?
Peano introduced a number of logical symbols still used today: ∨ (from Latin vel) ∧ (inverted ∨) ∃ This inversion of Latin letters as symbols (and inversion of symbols to signify their 'opposite' operation) was followed by later logicians: ∀ (Gentzen, : inverted A from "All-Zeichen", by analogy to ∃) ⊥ (inverted ⊤) I had always assumed that ∃ stood for "E" in "Existential" / "there Exists", but Peano wrote and introduced this symbol in French, not using any words beginning 'E': Mais nous préférons l'indiquer par la nouvelle notation Ǝa qu'on peut lire « il y a des a ». , Peano (1897) So why did he choose an inverted "E"?
I imagine that these symbols originated in one of the following ways: "I will declare a symbol for "for all." I will just use the letter "A" flipped upside-down. Yes, let $\forall$ represent "for all." Hmmm, now I need a similar notation for "there exists." Well, I will do the same thing with the letter "E". But wait! The letter "E" has horizontal symmetry, so this won't work! I must flip it backwards instead. $\exists$ it is!" OR "I will declare a symbol for "there exists." I will just use the letter "E" flipped backwards. Yes, let $\exists$ represent "there exists." Hmmm, now I need a similar notation for "for all." Well, I will do the same thing with the letter "A". But wait! The letter "A" has vertical symmetry, so this won't work! I must flip it upside-down instead. $\forall$ it is!" So which is it? Did we flip our A's or our E's first?
Here's a sample dictionary. example = {'a': 10, 'b': 12, 'c': 10, 'd': 12} I want to print them like below. 12 b, d 10 a, c
Given a dictionary like so: my_map = {'a': 1, 'b': 2} How can one invert this map to get: inv_map = {1: 'a', 2: 'b'}
The is kind of elusive about this: The creature is limited in the actions it can perform by the nature of its new form, and it can't speak, cast Spells, or take any other action that requires hands or Speech. (5th Edition SRD, p. 169) We were in an arena doing some gladiator fights and one of the foes, controlled by the DM, was a sorcerer. My DM took it this way: spells don't require hands or speech while casting a Subtle Spell, so he could transform his character into a Giant Ape with polymorph, buffed with Mage Armor, and kept counter-spelling me since I was the only caster in the fight. I think this is the wrong way to interpret the whole thing, but I am running out of proof. Here's the question: Who is wrong and why? I searched a lot about the topic, but couldn't find anything. Was it included in an errata I could not find?
The Polymorph spell states (in part): The target’s game statistics, including mental ability scores, are replaced by the statistics of the chosen beast. It retains its alignment and personality. The creature is limited in actions it can perform by the nature of its new form, and it can’t speak, cast spells, or take any other action that requires hands, or speech. So, can a polymorphed Paladin use their Divine Smite class feature? It expends a spell slot, but it is not a spell, and as far as we can tell does not require hands or speech. We know (based on the 10th level Transmutation Wizard feature) that a wizard is supposed to be able to polymorph herself, and we can assume that she is also supposed to be able to maintain concentration needed to stay in the new form (otherwise it would be a pretty useless ability). This is (as far as I can tell) not something any of the beasts eligible as polymorph targets can normally do. So it is clear that the polymorphed creature maintains some abilities from her old form. The question is which ones. The Druid's Wild Shape ability explicitly says you can use class features, while Polymorph does not, suggesting that you can't use class features while polymorphed. However, Wild Shape also explicitly says that you can continue to concentrate on a spell (see below, emphasis mine), and Polymorph does not, yet we believe that a polymorphed creature can continue to concentrate on the polymorph spell. So the fact that Wild Shape explicitly allows something and Polymorph is not explicit about it does not necessarily mean that the polymorphed creature cannot do those things. From Wild Shape rules: You can't cast spells, and your ability to speak or take any action that requires hands is limited to the capabilities of your beast form. Transforming doesn't break your concentration on a spell you've already cast, however, or prevent you from taking actions that are part of a spell, such as call lightning, that you've already cast. So, since Polymorph is silent on the question of whether or not class abilities can be used, and states only that the polymorphed creature cannot perform actions that require hands or speech, how can we best determine whether (RAI) polymorphed creatures maintain any of their old abilities beyond spell concentration?
If I type stty -a on pts/0, it shows icanon among other flags, which is expected. However, if I run stty from a terminal which is not the controlling terminal of the (bash) shell that I am currently in, it outputs -icanon. To summarize: stty -a < /dev/pts/0 from pts/0, gives icanon, same as stty -a stty -a < /dev/pts/0 from pts/1, gives -icanon stty -a < /dev/pts/1 from pts/1, gives icanon, same as stty -a stty -a < /dev/pts/1 from pts/0, gives -icanon What's going on?
If I open up a terminal (xfce4-terminal 0.6.3, but I doubt it matters) and I look at what terminal attributes are set (BASH is running in the terminal), $ stty -a speed 38400 baud; rows 24; columns 80; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?; swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0; -parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc ixany imaxbel iutf8 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -extproc then I have a whole bunch of terminal attributes. Fine enough. If I then take a look at what terminal I'm using: $ tty /dev/pts/0 then, on a new tab of my terminal (which new tab happens to be /dev/pts/1) I look at the terminal attributes of my first terminal, it seems to have slightly different terminal attributes: $ stty -a -F /dev/pts/0 speed 38400 baud; rows 24; columns 80; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?; swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = <undef>; discard = ^O; min = 1; time = 0; -parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl ixon -ixoff -iuclc ixany imaxbel iutf8 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -extproc Notably, the original terminal here appears to not be in canonical mode, it has no literal next special character... So why does this happen? I'd like to be able to look at things like this to see, e.g., if modern ed uses canonical mode, but if there's a Heisenberg problem of looking at it from another terminal, I don't know how I'd do it. So, my two main questions: Does the terminal just appear to have different attributes when I look at it from another terminal? (e.g. is my first terminal still in canonical mode, but stty -a -F returns incorrect information?) If the terminal does really change attributes when I switch to the other terminal, how does it know? Is the 1st terminal somehow informed when I'm not directly looking at it? P.S.: I tried this on the Linux Console also, just to make sure it wasn't a pseudo-terminal thing. Same results.
I inherited this bike with this funny looking stem. Is this broken? How do I inflate it?
This is the valve I have on my bike, but my current pump does not work with it. What kind of pump do I need to buy that will work with it?
With what should I clean the screen of my Macbook mid-2010 White unibody? Which kind of liquid would you suggest?
I try to clean my mid-2015 Macbook Pro with Retina display by wiping the screen with a damp cloth and then immediately drying. However, there seems to be left some residue/streak marks, which look very oily. Sometimes these disappear after a few minutes, but they are still very unsightly, and a bit worrying (is there something wrong with my screen?) I'm wondering if there are other cleaning techniques which avoid this issue, or whether this is completely normal behaviour. Thank you!
For instance, is the pet store PETSMART meant to be Pets Mart, or Pet Smart? That's not actually my question, as I'm pretty sure it's Pet Smart. I'm just asking what it's called when a word either CAN be split into multiple ways to present alternative meanings, or WAS MEANT TO be able to be interpreted two or more different ways through this method. If you're wondering the source of the question, there is a game on Kickstarter right now called PooPride featuring human waste as protagonists. And given that it's a racing game, I imagine the name is meant to have a second meaning as Poop Ride.
I'm thinking similar to a , but you could break the word at a different or multiple places. Granted I cannot think of a real-world example, but I have included two situations where this has happened. If I had a domain name that was photospork.com, this could be interpreted as: photo + spork, a gallery of a cutlery collector's obsession with sporks, or photos + pork, a culinary site dedicated to showing users the best cuts of pork. Another example is when I named a work project toolscore, which can again be represented as either: tools + core, to represent the core component of the tools, or tool + score, to show the highest score reached using that tool.
When I click on the li I got a new li created. However clicking I want the same event on the new list items so I used: $('ul').on( 'click', $this, function(){ But now the content is duplicated! <ul> <li>1</li> <li>2</li> </ul> JS: (function(){ $('li').each(function(){ var $this = $(this); $('ul').on( 'click', $this, function(){ $('ul').append('<li>new</li>'); }); }); })(jQuery) I just want when you click on the existing or new list items you got 1 new created list item. Thank you.
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.
My main elect panel in the house has a common neutral/ground bar and not separate bars. If I run from this panel to a sub panel in a detached pole barn and attach the two hots for 240V and one neutral that is connected to the neutral/ground combination bar in the main panel, am I grounded properly? Would I also need a ground rod in the pole barn and if so, does it get connected to the neutral bar or is it grounded to the sub panel itself?
I Will be installing a subpanel in a detached garage. The subpanel will be 60 amp. The garage is about 30' from the main-panel in-house, and I will of course get an exact length before selecting the proper gauge wiring. I'll be using pvc underground for the wiring. There is already existing wiring going underground from the house to the garage, which will no longer be used. When it comes to grounding this subpanel, should I run a grounding conductor from the main panel to the new sub, or ground the sub to earth? Reading answer sounds like I would have to ground the subpanel to the main, primarily because in my situation this is a new install. All other variables I have control over. If so, I would be running 4 wires from the main panel to the sub, 2 hots, 1 neutral, and 1 ground correct? Then, at the subpanel, the ground bus bar and the neutral bus bar would not be connected, and the grounding screw removed from the ground bus bar? Lastly, a GFCI Breaker must be used at the main, right? I believe this is true for any subpanel in a detached building, just want to be sure.
I have the following jQuery code: $('.class-name').each(function() { $(this).parent().prepend(this); }); So it targets .class-name and works fine on page load. I want it to also target any elements that is added dynamically (after page load) with class .class-name. How can I do this?
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.
I was taking a calculus competitive test, and I encountered this problem: Henrik is randomly choosing numbers between $0$ and $1$ until the sum of all of the numbers that he has chosen exceeds $1$. What is the expected number of numbers Henrik will choose? I spent a good amount of time on this, but I can't even think of a way to approach the problem. I'm currently taking AP Calculus BC, so I know a good amount of calculus, but I feel like I'm missing the intuition to tackle problems like this where calculus is applied to probability. Any help would be appreciated.
Choose a random number between $0$ and $1$ and record its value. Do this again and add the second number to the first number. Keep doing this until the sum of the numbers exceeds $1$. What's the expected value of the number of random numbers needed to accomplish this?
#import<iostream> using namespace std; int main() { //trying to test pointers & reference int x = 5; int y = 6; int *p; p = &y; *p = 10; int &r = x; cout<<"X reference\n"<<&r<<"\n"<<"value:"<<r<<"\n"; r=y; cout<<"Y reference\n"<<&r<<"\n"<<"value:"<<r<<"\n"; } In this code, I have assigned &r to x at first and then I have assigned r to y. What is the difference between assigning & r=x and r=y? Kindly help me out.
I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable?
Maybe I'm just stupid, but I can't figure out how I'm supposed to get from a question (in the Android App) to the site the question is on. I know I can open the left drawer, tap "All Sites", and type in the name of the site I want to go to, but it seems like there should be a way to get from a question to its site without all that rigmarole. (Tapping the back button works if I was on the site in the first place, but if I get to a question from my feed or from a link in my browser or something, that doesn't help.)
When viewing a question on a site which I don't use (I never registered on it), I can't figure out how to get back to the list of questions of the site. See this example from the Stack Exchange Android app. Where should I click to see the list of questions? (I chose Mathematics Educators because it's the most recent site, it is very likely that most users don't have an account on this website) Here is a random example: When viewing a question, I don't know how to view the list of questions. This site can't be found in the sidebar since it's not in my Your Sites list. The top menu containing the site's title only opens the sidebar.
Is there going to be a Popular Profile badge? Imagine the situation: when the total unique visitors of some guy's personal profile is greater than 10.000 in a week or something like that he could earn a badge for that.
I think it would be neat to earn a badge for having X number of profile views. You could have different levels, for example: Bronze - [Renown] - 300 views Silver - [Celebrity] - 1000 views Gold - [Eminence] - 3000 views I know this really doesn't necessarily "encourage positive behavior" directly, but it is a good indicator that people are either eager to read your other questions/answers (which is likely because you've provided a thoughtful response). It could of course also be that you've offended someone for some reason. Either way, it shows you are participating in the community. What do you think? If you agree, would you suggest any changes on the name/count/type of badges that would be awarded? Bounty added: I'm still interested in whether this will become a badge or not... General consensus (thus far): Number of views should be increased Remove gold badge altogether (I didn't like the name celebrity anyway...) So: Bronze - [Renown] - 1000 views Silver - [Eminence] - 3000 views Another general problem seems to be "how does this encourage positive behavior", which I have already outlined above. It's more of a metric that shows your participation in the community through a "wow" factor (again, this could be seen as negative). Why is it even in the profile in the first place if it's a negative thing? Any other thoughts?
Can't seem to find a way to run Mupen64plus on ubuntu 13.10. Kind of new to ubuntu, but i've had previous experience. i can find it in the store but it's not in my installed applications. Please help. appreciated!
I'm new to Ubuntu and Linux and I just downloaded mupen64plus 1.99.5 and it came as a *.tar.gz file. I found some guides about how to install a .tar.gz file with the terminal but it doesn't work. How can I install it?
Quantum entanglement says that we can entangle two particles with an opposite property, separate them, and that they exist in an indeterminate state until we observe one of them. eg. If we create a left/right pair, separate them in space then observe one of the particles then the other particle of the pair will instantly resolve into the opposite state of the particle we observed. Question: How do we know this is true? How do we know that something happened to the second particle as a result of observing the first? A much simpler explanation is that both the particles flipped into fixed left/right states at the moment we started to separate them, we simply hadn't opened the containers yet to see which was which. I assume that there can be no possible experiment to distinguish between these two explanations since we're not allowed to observe either particle. What reason(s) do we have to believe the magical 'quantum' explanation when the simple explanation explains it just as well?
I have never found experimental evidence that measuring one entangled particle causes the state of the other entangled particle to change, rather than just being revealed. Using the spin up spin down example we know that one of the particles will be spin up and the other spin down, so when we measure one and find it is spin up we know the other is spin down. Is there any situation after creation that the particle with spin up will change to spin down?
Let's say I have two classes. Class1 and Class2. The constructor of Class2 looks like this: public Class2{ Class1 c; public Class2(Class1 c){ this.c = c; } } When creating an instance of Class2 inside the code of Class1, we pass the existing instance of Class1 to Class2. This is from Class1: Class2 c2 = new Class2(this); Inside Class2, I want to manipulate the variables inside the instance of Class1 that's been passed to Class2. My question is: If I make changes to the c (the instance of Class1 that's been passed to Class2), am I affecting the original instance of Class1, or just a copy?
I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?
In Greek, λογικοφανής is a word that describes a person who spits out seemingly logical statements. It often has a negative connotation as it is targeted towards people who tend to fool the public with supposedly beautifully-constructed thoughts that sound convincing in our ears but are not necessarily accurate. The first word that comes to mind is deceptive, but it is not quite what I look for. Any thoughts?
I believe there is a term for a person who uses 'expert sounding' terminology and exudes confidence, even when their actual abilities are significantly short of their 'presentation'. Using 'wine' a subject.... if a person described a taste as: Magnificent bouquet, the esters resonate with hints of mulberry and asparagus. This must be an oak-matured red from Bordeaux. Perhaps.... 2003 vintage, that was a year when unusual rainfall produced an outstanding crop that had the same rich tannins. A person describing the wine like that has apparent confidence, apparent technical expertise, and so on. Yet, if he was a fraud, and knew nothing about wines, and the "wine" was really vinegar.... what would you call that person? Additionally, this would not be a one-off thing. This would be a person who consistently "bamboozles" people, and only when you dig below the posturing, or put them in the company of a 'real' expert, do you see the reality. A fraud, a cheat, an imposter. Those would be true, but I'm sure there's a word which also covers the confidence, charisma, and presentation style too. I just can't think of it.
I want to add new tag-synonym for some tag's but i don't have any option to do this. When i visit any tag there is a option for see all synonyms for that tag but not option to add new synonyms. Please any one tell me how can i add this. Thanks in advance.
What are tag synonyms? How can tag synonyms be distinguished from "real" tags? How are new tag synonyms created? Who can create tag synonyms? How can I delete/reverse/undo bad tag synonyms? What are merged tags?
I have another project that is exactly like this one but that one works, even though they have the exact same compositing setup. Any reason why this one doesn't show the background? Blend file:
I tried to add a 3D object to a clip by following a youtube video. But clip doesn't show up in the render or in the compositing tab. It show up even in the camera view. I didn't change any settings. please help. Thank you. And the rendered images has only the cube in it like in the picture above.
I'm looking for a shapefile similar to the following image: I'd just like the outlines of the sectors. I'm only concentrating on the southwest border which is San Diego all the way to Rio Grande Valley, but I'm ok with data on all of the sectors. Does anyone know where I can find something like this?
I'm interested in locating free GIS shapefile data representing the US / Mexican border. I have found a point layer depicting the border crossing points but I'm interested in a polyline feature representing the actual border.
$\newcommand\C{\mathbb C} \newcommand\bs{\backslash}$There is a book on Riemann surfaces by Forster that I like very much. I am curious about the first exercise in chapter 1 section 4 on branched and unbranched coverings: Let $X:=\C\bs\{\pm1\}$ and $Y:=\C\bs\{(2k+1)\pi/2 : k\in \mathbb Z\}$. Show that $\sin: Y\rightarrow X$ is a topological covering map. Consider the following curves $$u:[0,1]\rightarrow X \qquad t\mapsto 1-e^{2\pi i t}$$ $$v:[0,1]\rightarrow X \qquad t\mapsto -1+e^{2\pi i t}$$ and let $w_1:[0,1]\rightarrow Y$ be the lifting of $u\cdot v$ with $w_1(0)=0$ and $w_2:[0,1]\rightarrow Y$ be the lifting of $v\cdot u$ with $w_2(0)=0$. Show that ($w_1$ and $w_2$ are not "loops") $w_1(1)=2\pi$ ad $w_2(1)=-2\pi$ (and with this one concludes that the fundamental group $\pi_1(X)$ is non-abelian). I think I am able to do all this, but I think what I get is that $w_1(1)=4\pi$ and $w_2(1)=-4\pi$ (I tried to visualize the whole thing graphically, which is not easy). Is it really the case that $w_1(1)=2\pi$ and $w_2(1)=-2\pi$ or did I just found an error in the book?
I'm trying to work through the exercises in Otto Forster's book on Riemann Surfaces. While most of them seemed not that hard, this one gives me a headache: Let $X=\mathbb{C}\setminus\{\pm1\}$ and $Y = \mathbb{C}\setminus\{\frac{\pi}{2}+k\pi~|~k\in\mathbb{Z}\}$. Then $\sin: Y\rightarrow X$ is a covering map. This is clear. Now consider the following curves: $$ u: [0,1] \rightarrow X, u(t) = 1-e^{2\pi i t}$$ and $$ v: [0,1] \rightarrow X, v(t) = -1+e^{2\pi i t} = -u(t)$$ Let $w_1: [0,1]\rightarrow Y$ be the lifting of $u\cdot v$ and $w_2$ be the lifting of $v\cdot u$ with $w_1(0)=w_2(0)=0$. Show that $w_1(1) = 2\pi$ while $w_2(1) = -2\pi$. As of now, I don't have many ideas how to solve this. Of course, the inverse sine is a multi-valued function so the two liftings should use different branches. But I don't see how exactly they come into play. I'm also not sure whether the solution can be done by calculations alone or if there is some more general principle underlying. Any suggestions would be welcome.
Please consider below code, I want to reversed the first two elements. That is target string is "abcd", the first two elements is "ab", and i need "ba". How can i use below code to do it? (I know i have alternative ways to do, but how to do in below way?) r = "abcd" t = r[1:0:-1] print(t) # print b Another way: r = "abcd" t = r[1:-1:-1] print(t) # print NOTHING!
I need a good explanation (references are a plus) on Python's slice notation. To me, this notation needs a bit of picking up. It looks extremely powerful, but I haven't quite got my head around it.
I can't figure out how to push a string in an array at a specific index. Here is my array : var list = ['','']; I would like to be able to replace, for example, the first array entry, so the list would be : list = ['something','']; I tried to found a function for that, but nothing came up... I know that I can add a string to an array using list.push('something'); but I don't know how to do something like list.pushThisAt(string, index); I need your help !
I am looking for a JavaScript array insert method, in the style of: arr.insert(index, item) Preferably in jQuery, but any JavaScript implementation will do at this point.
Can anyone please tell me difference between 1 and 2 sudo apt-get install vlc sudo aptitude install vlc I tried installing vlc with 1 and it did not work, but with 2 it did. I don't get the difference...
What is difference of apt-get and aptitude? Does both of them use same repositories? Which one is better?
Possible Duplicate: When an answer is edited and editor hasn't notified me about edit (using comment), there's no way of knowing about this edit. When question is new, I came to know about it most of times because I check answers often. But, when question is old, I miss edits most of times. So, it'd be nice if you add this feature.
Seriously, I had not noticed e.g. Jeff's edit had he not also retagged my question.
I am searching google for answers but i could not get one module to convert doc/pdf/docx/rtf to text Is there any python module to convert doc/pdf/docx/rtf formats to text?
Is there any python module to convert PDF files into text? I tried found in Activestate which uses pypdf but the text generated had no space between and was of no use.
There was a choose your own adventure book that I read sometime in the late 80's, early 90's. I live in Northern Virginia, if that helps. Anyway, the story was science fiction - possibly a different universe, as none of the characters looked human (other than shape) and the locations didn't look like earth. I remember a complicated maze that the protagonist had to go through. Also, the protagonist looked kinda like a power ranger, but this definitely wasn't power rangers. I believe it was black and white. I remember, maybe space ships - as in at the end of the adventure maybe the protagonist took off? I've been looking for this book for decades. I believe it was part of a series of choose your own adventure books (as in publisher, the books themselves were not related to each other, just the look/style).
When I was little I remember getting these two books from the library. Both books were paperback and flimsy. The pages were wide. Each book had full page illustrations with puzzles and mazes in them, but it was like you were immersed in this setting completely. They were also like choose-your-own adventure books, but only in the way that you go through the book in a different order based on your results in the puzzles/games. For example, there is a bridge to cross, or you can take this path. If you choose to cross the bridge you go to page x. On page x you have to pretend to cross the bridge but some planks are broken. You can't skip more than a certain number of planks, but you also cannot "step" on a broken plank. One book was in a jungle setting with rope bridges, alligators, quick sand, etc. The other was in space, with all kinds of aliens and weird stuff. I have faint memories of these books but I REALLY want to track them down because I remember loving them.
Context: In my real experiment I am planning to include a questionnaire. I aim to measure 4 different constructs with multiple questions per construct. The questionnaire now consists of 24 items. I created more questions than I need with the idea of doing a pre-test and then reducing the number of questions to 12 based on the results of factor analysis. I was thinking of having a sample size of 30 people to participate in my pre-test, but is just what I came up with. Question: What is the minimum sample size required for exploratory factor analysis in order to reliably refine a multi-factor questionnaire?
If I have a dataset with $n$ observations and $p$ variables (dimensions), and generally $n$ is small ($n=12-16$), and $p$ may range from small ($p = 4-10$) to perhaps much larger ($p= 30-50$). I remember learning that $n$ should be much larger than $p$ in order to run principal component analysis (PCA) or factor analysis (FA), but it seems like this may not be so in my data. Note that for my purposes I am rarely interested in any principal components past PC2. Questions: What are the rules of thumb for minimum sample size when PCA is OK to use, and when it is not? Is it ever OK to use the first few PCs even if $n=p$ or $n<p$? Are there any references on this? Does it matter if your main goal is to use PC1 and possibly PC2 either: simply graphically, or as synthetic variable then used in regression?
I have tried to generate/write equation for forecasting using ARIMA models. But I think my equations were wrong and I am stuck with it. Kindly please help me to obtain equations for 1.(ARIMA (0,1,2) ma1 ma2= -0.1704, 0.4193 s.e s.e= 0.1259, 0.1646 σ^2, log likelihood= 127.7, -179.84 SARIMA (1,0,0)(0,1,0)12 ar1 = 0.7076 s.e = 0.1304 σ^2, log likelihood= 450.1, -160.89 ARIMA (0,1,3) ma1, ma2, ma3= -0.4932, 0.1227, -0.3997 s.e s.e s.e= 0.1326, 0.179, 0.1384 σ^2 log likelihood= 333.2, -202.12 SARIMA (1,0,0)(1,1,0)12 ar1, sar1= 0.4605, -0.722 s.e s.e= 0.1463, 0.1061 σ^2 log likelihood= 423.4, -163.46 ARIMA (0,1,1) ma1= -0.464 s.e= 0.167 σ^2 log likelihood= 2384, -249.05 ARIMA (1,1,1) ar1, ma1= 0.394, -0.9023 s.e s.e= 0.1804, 0.0898 σ^2 log likelihood= 393.5, -206.57 ARIMA (0,1,1) ma1= -0.7823 s.e = 0.0987 σ^2 log likelihood= 499.4, -212.67 Is there anything I am missing for formulating the equation?
I'm trying to replicate ARIMA (1,0,1)(1,0,1) equation in excel as a formula but I am not able to understand the interpretation of white noise residual e(t) or u(t).If could help me understand the interpretation and how to derive it from raw data it'll be really great. Thanks
Error_log file size from Var/Log/Cups/ is increasing so much (70GB+) and wont stop until i get the error saying i don't have enough space left. ***Error_log*** W [08/Jun/2017:18:59:48 +0530] Notifier for subscription 3 (dbus://) went away, retrying! E [08/Jun/2017:18:59:48 +0530] File \"/usr/lib/cups/notifier/dbus\" has insecure permissions These 2 errors are written constantly to the Error_Log. I think about 50 Megabytes/sec. Making system lag
A few days ago I realized my Ubuntu machine wouldn't load after login. After some digging around on a liveCD I realized my HDD was at 100% capacity, so I deleted some large files and was able to log in. I didn't have sudo permissions any more and had to boot into recovery mode and change the sodoers file, but eventually recovered root permissions. I then noticed my machine was a little sluggish, and top was showing cupsd using 100% CPU. I've never seen this program before but I soon realized it was a legitimate program. I the deleted about 40GB worth of videos, only to see my drive space deplete almost instantly in front of my eyes. With a little research and intuition, I realized it might be a a log file being blown up, and sure enough ls -lh /var/log/cups/ shown me an error_log file that was 80GB+ large. I deleted the file sudo rm -rf /var/log/cups/error_log, killed the service with sudo service cups end, and went on my business. I realized after that it would have been a good idea to check out the contents of error_log before I deleted it, but I wanted to get rid of the thing before I was locked out again. That was yesterday. Today, I started my laptop again and saw cupsd running again at 100% cpu, and sure enough I see my disk space depleting. I stopped the service and run tail -f /var/log/cups/error_log, and there are millions of lines of this: W [15/Jul/2015:11:23:03 -0700] Notifier for subscription 911 (dbus://) went away, retrying! E [15/Jul/2015:11:23:03 -0700] File "/usr/lib/cups/notifier/dbus" has insecure permissions (0100777/uid=0/gid=0). ==EDIT================================================================= ls -l /usr/lib/cups/notifier/dbus shows permissions and ownership as -rwxrwxrwx 1 root root when they should be -rwxr-xr-x 1 daemon root, as described in the comments. sudo chown root:root /usr/lib/cups/notifier/dbus also did not fix the ownership problems. Finally I removed and reinstalled cups, but to no avail. These links were given as potentially helpful guides,(,) but they ultimately result in suggesting a reinstall of the OS itself.
I was trying to design a battery charger for my application where I have made a pack of 1s4p cells where each cell is having 2600mAH and Charging rating as 4.2V. So can I consider it as 1 cell? Can I use LTC4001 - 2A Synchronous Buck Li-Ion Charger for this pack?
I wanted some opinion on my set up here, just to make sure I got the basics right. I have a Li-ion battery charging circuit based on the MCP73113. This is designed to be a single-cell battery charger. The battery itself (3.7V, 650mAh) comes with its own PCB with Schottky diode and current regulators as protection. EDIT: Not a Schottky diode. Current limiter and a Protection IC. By design, they work together just fine. I have more batteries from the same manufacturer and wanted to make higher capacity packs by putting two cells in parallel. The two cells come with their own PCB, but I only kept one of them, as I soldered their leads together. It seems to work and they are charged and discharged just like regular batteries (3.7V, now 1300 mAh). However, not all the packs I made work smoothly and I get a failure rate of 2 in every 10 packs. They all start out normally, but occasionally when the batteries are not charged for some time, or are used up, they tend to not work anymore. So far, in only 1 pack I found the voltage to be different (both now below 2V, aka dead). I assume my method is not the right approach to ensure 100% success rate, so I was wondering how can this be solved. All the controllers I looked into was designed for multiple cells in series, not parallel. Am I fundamentally missing something here?
I try to understand how to find a $l$-adic expansion of rational numbers. So I tried with $\frac{1}{2}$. Unfortunately I failed. What I know\think: We have two cases. What if $l$ is odd? What if $l$ is even? I have to find:$$\frac{1}{2} = \sum_{i=\infty}^{\infty} z_i\cdot l^{-i},$$ $z_i\in\{ 1,...,l-1\}$ and $l \ge 2$.
Can anyone teach me about p-adic expansion? especially the case where we have to expand a square root. I need to know how to construct them. for example: the 7-adic expansion of $\sqrt{305}$. This is a general question and not an assignment or anything, so i cannot post the progress. That is just a random example, please use any other example to explain if it's easier to understand. edit: I'm stuck with the cases where i have to expand the square roots, expanding rational numbers is fine though
How can I use these both OS on my laptop, without having to reinstall one? For my personal use I always had Ubuntu installed (13.10 32bit) as my single OS. Then for my new job I needed to install Win8.1 (64bit). Now I have these both OS on a separate partition, but I can boot only to a Win8.1 OS. Is there a way that I can restore the Grub or whatever to do, in order to have a choice to boot any of my two OS (preferably without having to reinstall one)?
I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu. How can I get Ubuntu back?
I know that with the case $$\int_0^{\infty}xe^{-ax}dx$$ You just substitute $u=ax$ and use the gamma function after so that it evaluates to $\frac{1}{a^2}$. However this clearly involves switching the bounds. So in this case, if $a$ were a positive imaginary number we would have our upper bound be $u=i\infty$. So I suppose my question is to show why $$\int_0^{\infty}xe^{-ax}dx$$ Obeys the equality to $\frac{1}{a^2}$ for complex $a$. $EDIT$ I know how to do Integration by parts and u substitution, that’s not the problem. The problem is what complex analysis backs up the fact that the integral obeys the identity $$\int_0^{\infty}xe^{-ax}dx = \frac{1}{a^2}$$ For some complex $a$.
While studying the 1/f noise, I found this webpage It gives the following Fourier tranform pairs However, there are no detailed explanation on how this formula is derived. Can you help with this? Thank you!
I was looking at and came across this: sudo -i (to get a root shell, sudo gedit is not recommended) gedit /etc/default/grub I was wondering why sudo gedit is not recommended. In fact, it seems that it's better than the sudo -i method because a forgetful user may inadvertently run an undesired command as root, which can have a much larger consequence than the other way around.
I've read and am interested in this line: You should never use normal sudo to start graphical applications as Root. Why? What is the difference? Please provide a simple explanation, as I'm just a normal desktop user.
I have partitions that I would like to rename. What are the terminal commands to do this?
I'm new at Ubuntu; I installed Ubuntu 12.10 and the partitions appear like 30 GB volume and like 78EF-2C5E in task bar. I tried to rename it but rename and remove buttons are deactivated so I tried by using disks but it gives me error: (Error setting label: Command-line `mlabel -i "/dev/sdb8" ::"windows"' exited with non-zero exit status 1: Total number of sectors (18550784) not a multiple of sectors per track (63)! Add mtools_skip_check=1 to your .mtoolsrc file to skip this test (udisks-error-quark, 0)) and this happen also to any attached usb to my laptop.
I have lenovo Z580 laptop and dual-booted my system with windows 8 and ubuntu 13.04. I can connect to internet using windows 8(both wired & wireless) but cannot connect using ubuntu(both). It always shows me that "I am in offline mode"
I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible. What are the steps to install Broadcom wireless drivers for a BCM43xx card? I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc. lspci -vnn | grep Network showed: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b] iwconfig showed: lo no wireless extensions. eth0 no wireless extensions. NOTE: Answer below is updated every time new information is added and confirmed working.
I need a word for this definition: "Someone who started a new work/job/etc but has a long way in front to achieve the goal." Do you know of any word?
I'm looking for a term to describe someone who literally has zero knowledge of a topic. Initially I thought of using something like green field but that doesn't really describe the person, it really describes a situation. The context of this is for providing training. {what goes here?} Beginner Intermediate Expert
I'm looking for a commonly used symbol that denotes a set of vector fields. It looks like an \st{$\chi$} (using the soul package, that is, \usepackage{soul}, but doesn't look so artificial. Can someone help me? Also, this is my first posting on this SE so I'm not entirely sure of how to format things. Thanks!
I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?