body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
Question Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be a continuous function such that for all open sets $U$ in $\mathbb{R}$, $f(U)$ is open. Prove that $f$ is injective. My proof Suppose $f$ is not injective. Then there exists $x, y\in \mathbb{R}$ such that $f(x) = f(y)$ but $x\neq y$. WLOG assume $x<y$. Then $d_{\mathbb{R}}(x,y) = |x-y|>0$. So $(x,y)$ is open and non-empty. Let this open set be $U$. Suppose that, for all $z\in U$, $f(z) = f(x) = f(y)$. Then $f(U)$ is a singleton set, not open, a contradiction. So suppose that there exists at least one $z\in U$ such that, WLOG, $f(z)>f(x)=f(y)$. Since $f$ is continuous, and $[x,y]$ compact, $f([x,y])$ compact, closed, (connected?) therefore there exists $\alpha\in[x,y]$ such that $f(\alpha) = \sup f([x,y])$ (connected?). By assumption $f(\alpha)\geq f(z)>f(x)=f(y)$, so clearly $\alpha\in U$. But since $f(\alpha)$ is an upper bound of $f(U)$, for all $\epsilon>0$, $(\alpha-\epsilon, \alpha + \epsilon)$ is not a subset of $f(U)$, despite $\alpha\in U$, so $f(U)$ not open, a contradiction. Other cases are handled similarly. My questions Not sure if I need connectedness (as in I know intervals are connected but I can't tell if it's crucial for the proof) or completeness of $\mathbb{R}$, and whether this proof is correct. | Question: Let $f: \mathbb R \to \mathbb R$ be continuous and open, that is if $A \subset \mathbb R$ is open then $f(A) \subset \mathbb R$ is open. Prove that $f$ is injective. Attempt: Suppose $f$ is not injective then there exit $x, y \in \mathbb R$ such that $$x < y \implies f(x) = f(y) = c$$ Take the closed inteval $[x,y] \subset \mathbb R$, as $f$ is continuous then $\displaystyle {f|_{[x,y]}}$ is continuous, by Weierstrass Theorem we have that $f$ has a maximum or a minimum point. Let's assume $m = \max \{f(a) ; a \in [x,y]\}$. Now there is $x' \in [x,y]$ such that $f(x') = m$. If we take the open $(x'-\delta, x'+\delta)$ centered at $x'$ and we have (1) If $m = c$ then $f$ is constant on the interval $[x,y]$ and $f((x'-\delta, x'+\delta)) = \{c\}$ which is closed, thus a contradiction; (2) If $m \neq c$ then we would have $f((x'-\delta, x'+\delta)) = (b, m]$, where $b$ can also be $b = \infty$. Again a contradiction. Well, this is my least embarassing attempt. I'm not sure how to show $(2)$ $100 \%$. I have also tried to show $f^{-1}f(A) = A$ for any $A \subset \mathbb R$, tried to work on the connected space $\mathbb R$ by finding a contradiction using the intervals $E_{[f > c]}$ and $E_{[f < c]}$ open when $A$ is open. Any thoughts? Note: I've already seen to try something out, but the fact that $f$ is monotone on this exercise comes as a consequence. |
Context There is class 'A' which needs a lot of parameters. And there are classes B,C,D which depends D->C->B->A way. I have to set parameters for A while initializing D which would be passed on to C then to B, A. Now the problem is that the list of parameters is so big that it would be pain to pass each of it as argument in constructor. So instead I created a dictionary to pass it on by. Question In this case, is passing parameters with dictionary OK? If not, are there other way to solve this? | I'd like to call a function in python using a dictionary. Here is some code: d = dict(param='test') def f(param): print(param) f(d) This prints {'param': 'test'} but I'd like it to just print test. I'd like it to work similarly for more parameters: d = dict(p1=1, p2=2) def f2(p1, p2): print(p1, p2) f2(d) Is this possible? |
In all electronic devices with the possibility of saving there are tiny magnets that can store your data by the state they are in. In general, there has to be something changed to store information and independent observer should be (theoretically) able to read all the stored information just from one state of brain. I think keeping some signal in circuit would be really nutrition expensive (through the ion pumps that create the electro-chemical gradients). So how does a brain store the information? | Background I am a computer programmer who is fascinated by artificial intelligence and artificial neural networks, and I am becoming more curious about how biological neural networks work. Context & what I think I understand In digesting all I have been reading, I am beginning to understand that there are layers to neural networks. A front-line layer of neurons may receive, for example, a visual stimulus such as a bright light. That stimulus is taken in by the front-line neurons, each of which produce a weighted electro-chemical response that results in a binary decision to pass an electrical charge through its axon to the dendrites of the tens of thousands of neurons to which it is connected. This process repeats through layers channeling the electrical signals and focusing them based on their permutations until ultimately a charge is passed to a focused response mechanism such as the nerves that control shrinking of the pupils. Hopefully I got that correct. Preamble to the question ;) Assuming that I am not completely off-base with my basic understanding of how a biological neural network operates, I am beginning to grasp how an input (stimulus) results in an output (response) such as motor movement or reflexes. That would just seem to be basic electricity of open and closed circuits. HOWEVER, what confuzzles me still is how a memory is stored. The analogy to an electrical circuit breaks down here, for in a circuit I can't really stop the flow of electrons unless I dam up said electrons in a capacitor. If I do that, once the electrons are released (accessed), they are gone forever whereas a memory endures. So. . . How the heck are memories constructed and stored in the human brain? Are they stored in a specific region? If so, where? |
How does the 6 tile range zone looks like? Does that mean 6 hex "steps" away from the district, or any city center within the six "rings" of the district? | Some districts (e.g. Factories, Zoos) and the Colosseum wonder have an effect that is stated to extend to cities within a range of 6 tiles. Will this distance be calculated from the district itself or from its city center? example: city A is 5 tiles away from city B - does A always get all ranged effects from B's districts? Or could districts on the far side of B fail to influence A? Conversely, could a district on the near side of city C (itself 7+ tiles from A) influence A? |
My paper has been put on the arXiv very recently (approx. a week ago) and to the journal, and currently is under refereeing process. I would like to ask how long it takes for Google Scholar to recognise the paper and associate it to my account. The paper does not even appear yet on Google scholar. | The title pretty much says it all - what's the typical delay with which Google Scholar indexes newly published articles? (Note I'm not talking about citations, but about the article showing up at all.) Edit: the article in question went for over six months after being published (in a well-regarded Springer journal with its own Wikipedia page) without appearing on Google Scholar, until it received a citation, at which point it was added to Google Scholar almost immediately. One more motivation to write papers that get cited. :) Edit 2: Another article in an even more mainstream journal took a little over seven weeks. |
I had a file run.php the code is as followed <?php $shell_cmd = '/usr/bin/aria2c --on-bt-download-complete ./hook.sh "http://sometorrent.com/file.torrent"'; shell_exec($shell_cmd .' 2>&1 > out.log'); echo $shell_cmd; ?> I tried run this script via website which is http://mywebsite.com/run.php My browser continue loading buffering sort of, until the torrent finish, how do i run in background so it execute right away in background. | I've got a PHP script that needs to invoke a shell script but doesn't care at all about the output. The shell script makes a number of SOAP calls and is slow to complete, so I don't want to slow down the PHP request while it waits for a reply. In fact, the PHP request should be able to exit without terminating the shell process. I've looked into the various exec(), shell_exec(), pcntl_fork(), etc. functions, but none of them seem to offer exactly what I want. (Or, if they do, it's not clear to me how.) Any suggestions? |
I am revisiting Euler's criterion, so I bumped into the following statement which I don't know how to prove. Let $p$ be some prime number and $a \in \mathbb{Z}$. How to prove that for every $x \in \{1, 2, ..., p - 1\}$ there exist exactly one $y \in \{1, 2, ..., p - 1\}$ such that $xy \equiv a \pmod p$? (Of course, "exatcly one" in terms of modulo $p$.) How to generalise this when $p$ is not a prime number? | Isn't finding the inverse of $a$, that is, $a'$ in $aa'\equiv1\pmod{m}$ equivalent to solving the diophantine equation $aa'-mb=1$, where the unknowns are $a'$ and $b$? I have seem some answers on this site (where the extended Euclidean Algorithm is mentioned mainly) as well as looked up some books but there is no mention of this. Am I going wrong somewhere or is this a correct method of finding modular inverses? Also can't we find the Bézout's coefficients by solving the corresponding diophantine equation instead of using the extended Euclidean Algorithm? |
Let $f:[0,\infty) \to [0,\infty)$ be a continuous function such that $\int_0^{\infty} f(x) dx$ is convergent ; is $\{f(n)\}$ bounded ? I know that if $f$ is uniformly continuous then $\{f(n)\}$ converges to $0$ , but I don't know what happens under assumption of continuity of $f$ only . Please help . Thanks in advance | I'm trying to prove the following claim: If $f$ is continuous and $\displaystyle\int_a^\infty |f(x)|\;dx$ is finite then $\lim\limits_{ x \to \infty } f(x)=0$. Here the counter example of all these sine functions won't do, since their infinite integral does not converge absolutely. Any hints for a proof? |
What kind of action is it to stop concentrating on a spell? Our party's initiative order is like this: 20 - Bard 19 - Bad guy 18 - Bad guy 17 - Bad guy 16 - Bad guy 15 - Nobody 14 - Ally 13 - Ally 12 - Ally Can my bard cast such that the bad guys cannot take violent actions on their turns, and then stop concentrating as a free action at initiative position 15 so that my allies can act fully? | There are many spells that have a duration of "concentration", sometimes with a max duration. I understand concentration checks and interruptions, but I can't find specific rules on maintaining a concentration based spell. For example (because I happen to be looking at it) : Duration: concentration, up to 1 round/level (D) Some specific questions I have: What action am I allowed while I am concentrating? Can I move? Attack? Cast another spell? Can I decide to stop concentrating at any time? Do the effects end immediately on me ending my concentration (either through interruptions or voluntarily)? |
I have recently installed Ubuntu 18 and after correcting my wifi problem, I still have one. Every time I open my laptop my wifi signal is weak. I always have to type below command to strengthen the signal. sudo modprobe -r rtl8723de && sleep 5 && sudo modprobe rtl8723de ant_sel=2 I want to make this setting permanent. How can I do that? | My Wi-Fi connection seems to be very weak and the range is very low. It drops by two bars if I just move to the next room and by two if just step outside. The speed is also not fast as compared to what I get from the router on my desktop . My laptop is a HP laptop with RTL8723de module. Can anyone help me in bumping up my Wi-Fi speed? Result of lspci -nnk | grep 0280 -A3: 03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:d723] Subsystem: Hewlett-Packard Company Device [103c:8319] Kernel driver in use: rtl8723de Kernel modules: rtl8723de |
I need that $("#pedido_x").change(function(event) works on each dynamic row is created. Any idea? I tried a few things but nothing works. window.precio; window.precio_final; window.cantidad; var i = 1; $(".mas").click(function(){ i = ++i; var select_marca = '<OPTION value="">- SELECCIONAR -</OPTION><?php $queryma = mysqli_query($conex, "SELECT * FROM marcas ORDER BY nombre ASC"); while ($ma = mysqli_fetch_assoc($queryma)) { echo '<option value='.$ma["id"].'>'; echo $ma["nombre"]; } ?></SELECT>'; var row = "<tr pedido_="+ i +"><td><SELECT id='marca_"+ i +"' name='marca["+ i +"]'> "+ select_marca + "</td><td><input type='text' id='producto_"+ i +"' name='producto["+ i +"]'></td><td><input type='number' id='cantidad_"+ i +"' name='cantidad["+ i +"]'></td><td><input type='number' id='precio_"+ i +"' name='precio["+ i +"]' value='0'></td></tr>"; $("table tbody").append(row); }); $("#pedido_1").change(function(event){ window.f = 1 while (f <= i) { var marca = $("#marca_"+ f).find(':selected').val(); var producto = $("#producto_"+ f).find(':selected').val(); window.cantidad = $("#cantidad_"+ f).val(); if(producto == null) { producto = 'Ninguno'; } $("#producto_"+f).load('sel_marca.php?marca='+ marca +'&producto='+ producto +'&fila=' + window.f); if(producto != 'Ninguno') { $.get('sel_precio.php?f='+ f +'&producto='+ producto, function(data) { window.precio = data; }); } window.precio_final = window.cantidad * window.precio; $("#precio_"+f).val(window.precio_final); producto = $('#producto_'+ f).find(':selected').val(); f++ } }); }); | 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. |
Any ideas on how to include a single letter "G" to look like this one into my paper? What kind of font would it be? I am including it in my paragraphs and math-mode. | 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? |
I'm trying to install Ubuntu. My system have pre-installed Windows 8. I made USB bootable and then I booted into Ubuntu from there and I am in TRY Ubuntu mode now, I am having a problem in installing Ubuntu. When I attempt install Ubuntu then it says: No root file system is defined. Correct this from the partitioning menu. | I would like to see a full how-to guide on how to install Ubuntu. |
I'm using Latex and the verbments package to display some python 3 code (with syntax highlighting) inside a document, but I have a problem with UTF-8. I'm using the verbments package \begin{pyglist}[language=python, encoding=utf8] print(``Mañana será otro día'') \end{pyglist} I use pdflatex -shell-escape DocMaestro.tex to produce a pdf file, but nothing happens. I see in the console log this error: Error while highlighting: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 10: invalid continuation byte (file "/usr/lib/python3.3/site-packages/pygments/lexer.py", line 164, in get_tokens) (./DocMaestro.pyg.sty) (./DocMaestro.pyg.vrb)) [62] I've also noticed that when i run latex another file called DocMaestro.pyg.lst is created this file contains the following information: print(``Mañana será otro día'') but is encoded in ISO-8859-15 instead of UTF-8 as all my other files. | I'm writing a book using Latex in what I want to write code in Python. My operating system is Linux and my editor is Kile with: \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{verbments} But I can not see the characters in Spanish \begin{pyglist}[language = python, encoding = utf8] print ('Tomorrow is another day') \end{pyglist} I perform the compilation with the command pdflatex -shell-escape -interaction = nonstopmode but I get the following error. *** Error while highlighting: UnicodeDecodeError: 'utf-8' codec can not decode byte 0xf1 in position 9: invalid continuation byte (file "/usr/lib/python3.3/site-packages/pygments/lexer.py", line 164, in get_tokens) I also have observed that verbments generates a file called name.pyg.sty that curiously is codified in ISO-8859-15 instead of UTF-8 as all my other files. |
I have what I understand to be a reasonably common problem-- Apache is downloading PHP files instead of executing them. I've used the solutions on other threads as best as I was able and learned the following: The PHP file itself is fine and runs perfectly on other machines The error occurs in both Chromium and Firefox, browser cache has been cleared Happens both inside and outside of /var/www/ PHP5 is installed, up to date, is loaded into Apache, and has executing permissions Apache server has been restarted after each potential solution PHP5 config files enables PHP in user directories I am able to use HTML files on localhost just fine, it's only PHP The only solution I might have implemented incorrectly is the config files-- any answers regarding the configurations have pointed me to httpd.conf, while newer version of Apache seem to have multiple config files, so the specifics on which files to put Addtype commands in would be helpful. It's also happening on another machine with Ubuntu, Apache, and PHP freshly installed, nothing else on it, so it seems unlikely that it would be anything in my machine specifically. Version information on my machine: PHP 5.5.9-1ubuntu4.14 (cli), Server version: Apache/2.4.7 (Ubuntu), Ubuntu 14.04.3 LTS Release 14.04 Edit: Question is not a duplicate, and I have taken a look at other answers here-- as mentioned, I have tried Addtype alterations but am not quite sure where to put them due to httpd.conf being split into multiple configuration files. /etc/sysconfig/apache2 is not a valid path for me, and if that enables PHP5, PHP5 is already enabled anyway. | I have a phpinfo.php file which I am trying to run by browsing to it using browser but the browser downloads the file instead of executing it. phpinfo.php <?php phpinfo(); ?> I followed following post, added following lines to my /etc/apache2/httpd.conf and restarted apache but invain. phpinfo.php still gets downloaded. AddType application/x-httpd-php .php> .phtml AddType application/x-httpd-php-source .phps Have I added these line to the correct file? On an openSuSE forum following was mentioned. I followed this too but still no success. Same problem is persisting. In case the browser wants to save your php files instead of displaying the content, you should enable php support in the /etc/apache2/mod_userdir.conf file. Add the following line to it, just after the line and restart the server. Include /etc/apache2/conf.d/php5.conf |
Let $Ω ⊂ \mathbb{R}^n$ be a bounded domain with smooth boundary $∂Ω$, and denote by $\vec{n}$ the outer unit normal to $∂Ω$. Prove that the nonhomogeneous Neumann problem $$ \begin{cases} ∆u = f & \text{ in }Ω \\ \langle∇u ,\vec{n}\rangle = 0 & \text{ on }∂Ω \\ \end{cases} $$ has a solution only if $\int_Ωf = 0$. How would I go about doing this? Can anyone help to me understand where to start better? | Let $U$ be connected. A function $u \in H^1(U)$ is a weak solution of Neumann's problem \begin{equation} (*)\qquad\left\{ \begin{array}{rl} -\Delta = f & \text{in } U \\ \frac{\partial u}{\partial \nu} = 0 & \text{on } \partial U \end{array} \right. \end{equation} if $$ \int_U Du \cdot Dv \; dx = \int_Ufv \; dx $$ for all $v \in H^1(U)$. Let $f\in L^2(U)$. Prove $(*)$ has a weak solution if and only if $$ \int_U f \; dx =0. $$ For the only if part I set $v=1$. However I do not see where to start the if part. I was thinking of the Lax-Milgram theorem. That's where I'm now. |
DecimalFormat df = new DecimalFormat("0.00");//if you want over four decimal places then do->"0.0000" in brackets TextView lattextview=findViewById(R.id.lattextview); TextView lontextview=findViewById(R.id.longtextview); TextView alttextview=findViewById(R.id.alttextview); TextView accuracytextview=findViewById(R.id.accuracytextview); TextView addresstextview=findViewById(R.id.addresstextview); String s1 = df.format(location.getLatitude()); String s2 = df.format(location.getLongitude()); String s3 = df.format(location.getAltitude()); String s4 = df.format(location.getAccuracy()); lattextview.setText("Latitude : "+s1); lontextview.setText("Longitude : "+s2); alttextview.setText("Altitude : "+s3); accuracytextview.setText("Accuracy : "+s4); | What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations. I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes. I know one method of doing this is to use the String.format method: String.format("%.5g%n", 0.912385); returns: 0.91239 which is great, however it always displays numbers with 5 decimal places even if they are not significant: String.format("%.5g%n", 0.912300); returns: 0.91230 Another method is to use the DecimalFormatter: DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385); returns: 0.91238 However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this: 0.912385 -> 0.91239 0.912300 -> 0.9123 What is the best way to achieve this in Java? |
There is given a countable set $A\subset \Bbb{R}.$ Prove that there exists an $x\in R$ that $(x+A)\cap A=\emptyset$, where $x+A=\{x+a: a\in A\}$. | I finished my test and there is a question I completely failed but that my teacher did not go over, so I was hoping someone could post a correction of it, so that I understand what I was supposed to do for next time. Suppose that A is a countable set of real numbers. Show that there exists a real number a such that $(a+A)\cap A=\varnothing$. (Note: By definition, $a+A= \{a+r\mid r\in A\}$.) |
i had a suggestion to learn PDO api instead of mysqli. So i wrote php segment for login page the way i understood the guides i looked up. Wanted to know if my code and understanding is correct and the app is secure from sql injections. Also i was reading about using salt when hashing passwords. So in this example i just append my date of birth to users password, then hash it with sha512 and store it. I know that my date of birth is not the best choice since it can be social engineered etc, but is the general principle right? Heres is the code. connect.php creates database connection as $con and set default fetch atribute as OBJ. include "assets/php/connect.php"; if((isset($_POST["username"]))&&(isset($_POST["password"]))){ $cName = $_POST["username"]; $hashLink = $_POST["password"]. "19920423"; $cPass = hash('sha512', $hashLink); $sql = "SELECT id,username,password FROM users WHERE username = ?"; $stmt = $con->prepare($sql); $stmt->execute([$_POST['username']]); $logs = $stmt->fetchAll(); foreach($logs as $log){ if(($cName == $log->username)&&($cPass == $log->password)){ $_SESSION["username"]=$_POST["username"]; header("Location: home.php"); } } echo "<div id='wrong-creds' class='arial'>Wrong credentials</div>"; } | It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which mechanism to use for password protection. This question, suggests that hashing multiple times may be a good idea, whereas suggests using salt. I'm using PHP. I want a safe and fast password encryption system. Hashing a password a million times may be safer, but also slower. How to achieve a good balance between speed and safety? Also, I'd prefer the result to have a constant number of characters. The hashing mechanism must be available in PHP It must be safe It can use salt (in this case, are all salts equally good? Is there any way to generate good salts?) Also, should I store two fields in the database (one using MD5 and another one using SHA, for example)? Would it make it safer or unsafer? In case I wasn't clear enough, I want to know which hashing function(s) to use and how to pick a good salt in order to have a safe and fast password protection mechanism. Related questions that don't quite cover my question: |
Two sides of a triangle are 6 m and 8 m in length and the angle between them is increasing at a rate of $0.06$ rad/s. Find the rate at which the area of the triangle is increasing when the angle between the sides of fixed length is $\large\frac {\pi}{3}$ rad. | The question: ABC is a triangle in which the lines $\overline {AB} = 20cm$, $\overline {AC} = 32cm$ and $\angle BAC = \theta$. If $\theta$ is increasing at the rate of 2° per minute, determine the rate at which the triangle's area is changing when $\theta = 120°$. Here's my attempt: Let $t$ be time in minutes. We're given $\frac{d\theta}{dt} = 2°$, Area of triangle with two sides and included angle: $A = \frac12\overline {AB}$ $\overline {AC}$ $sin\theta$, i.e. $A = \frac12(20)(32)sin\theta$ $= 320sin\theta$ $\therefore \frac{dA}{dt} = \frac{dA}{d\theta}\frac{d\theta}{dt} = 320cos\theta\frac{d\theta}{dt}$ i.e. at $\theta = 120°$: $\frac{dA}{dt} = 320cos(120) * (2)$ $= -320 cm^2/min$ The textbook answer: Decreasing at $5.59cm^2/min$ The question is exactly as above, and I've double checked the units. Can anyone please point out where I've gone wrong, or if I haven't? Thank you! |
Consider $\xi = \max(f_1 \dots f_n)$ , where $f_i$ are i.r.v. with $\operatorname{E}(f_i) \ < +\infty$ and $f_i \stackrel{d}{=} f_j$. We want to determine $\dfrac{\xi}{n} \to 0$ a.s. I thought about continuous mapping theorems for $\bar{f_i} = \dfrac{f_i}{n}$. $\bar{f}_i \to 0$ and hence $\max(\bar{f_1} \dots \bar{f_n}) \to 0$. But I guess this idea is quite incorrect. Any hints? | $\def\d{\mathrm{d}}$Given that $X_1, X_2, \cdots$ are i.i.d., prove that$$ \frac{1}{n} \max_{1 \leqslant k \leqslant n} |X_k| \xrightarrow{\mathrm{a.s.}} 0 \Longleftrightarrow E(|X_1|) < +\infty. $$ My try: Because $\varliminf\limits_{n \to \infty} \dfrac{1}{n} \max\limits_{1 \leqslant k \leqslant n} |X_k|$ and $\varlimsup\limits_{n \to \infty} \dfrac{1}{n} \max\limits_{1 \leqslant k \leqslant n} |X_k|$ are both measurable with respect to the exchangeable σ-algebra of $X_1, X_2, \cdots$, they are both almost surely constants by the Hewitt-Savage 0-1 law, i.e.$$ \varliminf_{n \to \infty} \frac{1}{n} \max_{1 \leqslant k \leqslant n} |X_k| = c_1, \quad \text{a.s.} \tag{1}\\ \varlimsup_{n \to \infty} \frac{1}{n} \max_{1 \leqslant k \leqslant n} |X_k| = c_2, \quad \text{a.s.} $$ where $c_1, c_2 \in [0, +\infty]$. Also, if the distribution function of $|X_1|$ is $F(x)$, then the distribution function of $\dfrac{1}{n} \max\limits_{1 \leqslant k \leqslant n} |X_k|$ is$$ F_n(x) = P\left( \frac{1}{n} \max_{1 \leqslant k \leqslant n} |X_k| \leqslant x \right) = \prod_{k = 1}^n P(|x_k| \leqslant nx) = (F(nx))^n, $$ which implies\begin{align*} E\left( \frac{1}{n} \max_{1 \leqslant k \leqslant n} |X_k| \right) &= \int_0^{+\infty} x \,\d((F(nx))^n) = \frac{1}{n} \int_0^{+\infty} y \,\d((F(y))^n)\\ &= \frac{1}{n} \int_0^{+\infty} y·n (F(y))^{n - 1} \,\d F(y) = \int_0^{+\infty} y (F(y))^{n - 1} \,\d F(y)\\ &\leqslant \int_0^{+\infty} y \,\d F(y) = E(|X_1|). \end{align*} Also for any $c > 0$,$$ \sum_{k = 1}^\infty P(|X_1| \geqslant ck) < \infty \Longleftrightarrow E(|X_1|) < +\infty. \tag{2} $$ However, I failed to connect (1) and (2) to prove the proposition. Any ideas are appreciated. Thanks in advance. |
I want to format a new external hard drive from Ubuntu and was wondering can I later use it on my windows system to transfer files? | When I format a drive to NTFS under Windows and plug it into the Ubuntu machine it is perfectly usable, but when I format it under Ubuntu using Disks (delete all partitions and create one single partition with NTFS) it does not show up when plugged into the Windows machine. Please note that in both cases the USB drive contains only one, primary partition formatted to NTFS, for example: /dev/sdb - the actual device /dev/sdb1 - the only, primary partition I've observed this behaviour both with a solid state USB pen-drive as well as an external USB magnetic HDD. How to (re)format a USB HDD or a stick to NTFS under Ubuntu so it is usable under Windows? |
I've been given an image (I'm guessing straight from a camera) and it's currently at at 240 pixels per inch. It's been a while since I did much Photoshop; I have three questions for two requirements: Back in the day the web used 72dpi images because that's all screens worked at. Is 72dpi still the most appropriate resolution for the web? I need to use the image in a phone application. I know phone devices have higher DPIs than 72 but do you need to feed them a high-DPI image to begin with, or will a massive 72dpi image work properly? BONUS QUESTION How do I resize an image from 240dpi to 72dpi while maintaining detail? i.e. I don't want to go from a 240px * 240px at 240dpi to 72px * 72px at 72dpi. | I often see statements in discussions about web displayed image quality that go something like this: "I only upload pictures at 72 dpi and 1200 pixels on the long edge, so if someone copies and prints the image it won't look as good as if it were 300 dpi." What? Have I missed something here? Does an image edited and saved/exported with 1200x800 pixels at 300 ppi look any different online than the same image saved/exported with 1200x800 pixels at 72 ppi? Other than the metadata regarding ppi, is there any difference in the two images at all? If so, what is the difference? If I tell my printer to print the images at 4R (4X6 inches) will there be any difference at all in how the printer creates a print from the 1200x800 @ 300 dpi image versus the 1200x800 @ 72 dpi image? |
My understanding is that a requirement of the spouse visa is that the British citizen needs to show at least 6 months worth of payslips to prove income above £18,600. I am a US citizen currently living in the US, while my British husband is living in the UK. He does make the minimum £18.6k but right now he cannot show 6 months consecutive payslips, as he was just recently visiting me in the US for 3 months. So since he's been back in the UK, he has only 2 months in a row to show and he will will not make it to 6 months since he needs to come back to the US for the birth of our first child. At that point, he will have worked for 5 months so he'll just miss it and will need to start over from 0 once he returns to the UK, so we can qualify to apply for a spouse visa for me. My question is, am I allowed to come and stay with him (and our child) for 6 months on a visitor's visa while he is working? After the 6 months are up, I would go back to the US and apply for the spouse visa. My concern is that immigration officials will not believe I intend on leaving the country after 6 months, especially if I have a British husband and child there and am not working myself. How can I prove that I am actually going to leave besides showing a return ticket, because I doubt that will be enough? I don't want to be denied entry into the country. We do plan on applying for the visa, but in the meantime, we would like to be together with our firstborn while we wait to qualify for it. | I'm a British citizen and recently got married in Japan to a Japanese woman. Eventually my visa ran out and I had to return to the UK, and the plan is for her to eventually move here. Because it will be a while before I get a job, hold it for 6 months and be allowed to apply for a Spouse Visa, and because we can't stand the wait, she is coming over to visit for a few weeks. Since she's Japanese she should be visa-exempt for stays of up to 6 months. I have heard that, if you have already applied for a Spouse Visa, it is unwise for a spouse to come to stay before it has been granted as it could jeopardise the application. But is there any reason she shouldn't come to visit before we have even made the application? Will an Immigration Officer refuse her entry on the assumption that she'll probably try to overstay? |
On the command-line *tmp* will match all files with names containing "tmp". Is there a quick way to do the reverse, i.e. match all files with names that don't contain "tmp"? I figured out how to get ls to do it (ls -I "*tmp*"), but that doesn't help if I want to use some other command rather than ls. Is there a general method? I forgot to note: I'm using zsh. | Say I want to copy the contents of a directory excluding files and folders whose names contain the word 'Music'. cp [exclude-matches] *Music* /target_directory What should go in place of [exclude-matches] to accomplish this? |
I am trying to assign my own GUID to a list I am creating but am having difficulties. Currently I am creating the list with the code: site.Lists.Add(CONFIGURATION_LIST_NAME, CONFIGURATION_LIST_DESCRIPTION, SPListTemplateType.GenericList); Which returns a GUID, but I would like to supply my own. Is there anyway to do this in SharePoint 2010? | I found which goes over how to add a list, but it doesn't seem possible to specify a GUID if you use this method. Is there any way to create a list and specify the GUID? I am trying to recreate several lists on a different server and if they do not have the same GUIDs other functionality may break. |
I am attempting to automatically open a PDF after recompilation using TeXnicCenter. If I compile using Ctrl + F7, I can go into the directory of the PDF and it opens fine, but if I use Ctrl + Shift + F5 to "Build and View", the PDF won't open, and I get the error message "Cannot execute the command": I have just reinstalled my Adobe, so this shouldn't (?) be an issue. This happens with both LaTex => PDF and XeLaTeX => PDF options. Update: Here are my DDE settings: | I already tried Adobe Acrobat, Adobe Acrobat Reader and Sumatra PDF but all doesn't work.. The first time if I use latex -> pdf output profile it works. But if something is changed I still get the same PDF. If I then delete the PDF I get in Adobe Acrobat this file cannot be found Settings: Path of executable: C:\PROGRAM FILES (X86)\ADOBE\ACROBAT 10.0\ACROBAT\ACROBAT.EXE Command line command: "%bm.pdf" Forward search the same. Also tried: DDE command: [DocOpen("%bm.pdf")][FileOpen("%bm.pdf")] with server: acroviewA10, topic: control (according to ) Who can help? UPDATE: It seems that the miketex setting: install packages on the fly was causing the problem. I changed the setting from install packages on fly from "ask me first" to "YES". Now the pdf's are produced. The pdf reader opens and closes really fast however..but I can make pdfs! (took me several hours to fix this..).. |
I have an initial list, comprising 1000 lists, some empty and some not. I'm trying to disperse 2000 floats amongst those empty lists at random(empty_list45, empty_list2, ..., empty_randn), not in order (empty_list1, empty_list1, ..., empty_listn). Here's my attempt: #the list containing lists. folder = [[]] * 1000 for i in range(len(newOPsys_i)): folder[newOPsys_i[i]] = (newOP[i]) #list of indices of empty lists in folder, where folder is the list comprising 1000 lists that may or may not be empty empty = [] for i in range(len(folder)): if not folder[i]: empty.append(i) #function that pulls a random index from any called list def rand(mylist): rando = random.randint(0,len(mylist)-1) return(rando) #my attempt at appending 2000 floats to random empty lists in folder for i in range(0,2000): x = empty[rand(empty)] print(folder[x]) folder[x].append(match[x][random.randint(0,len(match[x])-1)]) #match is a separate list where I wish to pull the floats from, and place them into the empty lists. My output looks something like: [] [3.9] [3.9, 7.8] [3.9, 7.8, 54.9] From the print, what seems to be happening instead is that in the first iteration an empty list is found then a single float is appended. On the next iteration, another empty list is randomly found, but appended to this empty list is the float from the last iteration, along with a new float. This is not what I want to happen, I just want those single random floats appended each iteration. Any insights? Thanks in advance. | I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3 The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]] Then I changed one of the innermost values: my_list[0][0] = 5 Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]] which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it? |
I know that momentum is conserved in inelastic collisions. In other words, if the kinetic energy of the system is converted to potential, the momentum is still conserved Suppose we have the situation where a ball is rolling up a hill. The ball does not have enough energy to get to the top of the hill, and so, it rolls back down. The initial momentum was directed towards the hill, and the final momentum is directed away from the hill. How is momentum conserved? | Is momentum conserved when an object bounces back against a wall? The wall doesn’t move, but the object moves in the opposite direction. Assume this is an ideal, elastic collision. If, initially, the momentum of the system came from the ball, and after the collision, the momentum of the system was also from the ball, but in opposite directions, then momentum would not have been conserved? I have a feeling this is wrong, so anybody clarify this for me? |
I think this is a very recent design change, because I've not seen it before: Where before a small box with the bounty value dislocated the title a couple of characters to the right, now the additional text saying how long until it expires dislocates the title by about a quarter of the width of the column. I find that this makes it much harder to read the title, and is counterproductive to the goal of attracting attention. | So today I chimed in on IPS and scrolled a bit. This question caught my eye, because it had a number in it. Something like that I haven't seen in a long time, if ever. Then I read the title and was confused at first, because it started with ends in 4 days How do I... This is obviously not proper English. It took me some time to realize that the text size isn't even the same, because the difference is very little in my opinion. Also, I don't see any reason why that text is necessary in the title. It gives no additional incentive to answer the question It seems like it's part of the question title It's already obvious that the question has a bounty The time until a bounty runs out is already visible inside a question This update looks better or worse depending on the site style, but overall I think that it's not something that is needed and has more drawback than it adds. So I am wondering why this text has been added in the first place and if it can be removed again? Perhaps a per-site solution is possible. I am open to discussion about it (mostly interested in what that text adds to the user experience). |
When I try to play videos from the 'Gooddrama' site I get an error message: Flash version 9,0 or greater is required, you have no flash plugin installed. However, when I try to play YouTube videos they play without any problem. What should I do to fix this? | Even though I have the latest Adobe Flash player 11.2 for Linux in Firefox - - a particular online flash game still requests that I update to the latest flash player. I've tried this online game on my laptop (Windows 8 with Flash Player 11.8) and it has no problems. Is there a way to trick Ubuntu or this game into thinking Flash Player 11.8 is "installed"? |
Find all integers $x,y,z$ such that $6x+10y+15z=-1$. I did this- $6x+5(2y+3z)=-1$ $6(x+1)+5a=5$ ($a=2y+3z$) One solution to above equation is $x+1=5,a=-5$. General solution would be $x+1=5+5k,$ $a=-5-6k$ where $k$ is an integer. Now $2y+3z=-5-6k$. I don't how to go ahead from here. Any hint? Source- Challenges and thrills of pre-college mathematics. | Find all the integral solutions to the equation $323x+391y+437z=10473$. I know how to find integer solutions in two variables using Diophantine Equations. But I am stuck here because it involves 3 variables. Can I get a hint? |
Can I recover deleted files in LINUX MINT 17 Quiana. I have deleted my folder containing data with shift+delete. Now, I want my data back. | I just deleted a file in Nautilus with Shift+Delete, which warned me that "If you delete an item, it will be permanently lost." I wonder if there is no way to recover the file? My OS is Ubuntu 10.10. |
I can block a website by editing the file hosts located in C:\Windows\System32\drivers\etcWindows 8.1 and adding 127.0.0.1 example.com at the end. But I cannot figure out that how can I block a specific site such as example.com/foo so that the site example.com can open but example.com/foo cannot open. I tried doing it but it didn't work. | I want to block certain URLs on browsers. I don't want to block whole site. For example, I want to block , but not whole domain. Is there any way I can do it? |
I need bibliogrpahy look like in first picture. Actually, default look like in second picture. diplom.tex \documentclass[a4paper,14pt,russian,oneside,final]{extreport} \usepackage[utf8]{inputenc} \usepackage[T2A]{fontenc} \usepackage[russian]{babel} \bibliographystyle{styles/belarus-specific-utf8gost780u} \begin{document} ~\cite{book_1} ~\cite{book_2} ~\cite{book_3} ~\cite{book_4} \bibliography{bibliography_database} \end{document} bibliography_database.bib @BOOK{book_1, title = {“Introducing Adaptive, Aware, and Cognitive Radios.” In Cognitive Radio, Software Defined Radio, and Adaptive Wireless Systems}, publisher = {AA Dordrecht: Springer}, year = {2007}, author = {Fette, Bruce}, pages = {1-16}, language = {russian}, owner = {mstyura}, timestamp = {2013.03.18} } @BOOK{book_2, title = {Implementation issues in spectrum sensing for cognitive radios Signals, Systems and Computers}, publisher = {Conference Record of the Thirty-Eighth Asilomar Conference.}, year = {2004}, author = {Cabric D. AND Misha S.M. AND Brodesen R.W.}, pages = {772–776}, language = {english}, owner = {mstyura}, timestamp = {2013.03.18} } @BOOK{book_3, title = {Теоретико-игровая модель распределения ресурсов в самоорганизующихся системах когнитивного радио // Сборник тезисов, материалы Пятнадцатой Всероссийской научной конференции студентов-физиков и молодых ученых (ВНКСФ-15, Кемерово – Томск)}, publisher = {издательство АСФ России}, address = {Екатеринбург – Кемерово}, year = {2009}, author = {Ошмарин Д.В.}, pages = {672–673}, language = {russian}, owner = {mstyura}, timestamp = {2013.03.18} } @BOOK{book_4, title = {Auction driven dynamic spectrum allocation: optimal bidding, pricing and service priorities for multi-rate, multi-class CDMA}, publisher = {IEEE 16th International Symposium}, year = {2005}, author = {Rodriguez V. AND Moessner K. AND Tafasolli R.}, pages = {1850–1854}, language = {english}, owner = {mstyura}, timestamp = {2013.03.18} } | I have some trouble with the bibliography alignment. It's similar to , but that solution doesn't work for me. Here is MWE: \documentclass{article} \let\oldthebibliography=\thebibliography \let\endoldthebibliography=\endthebibliography \renewenvironment{thebibliography}[1]{% \begin{oldthebibliography}{#1}% \setlength{\parskip}{0ex}% \setlength{\itemsep}{0ex}% \setlength{\itemindent}{3ex} \setlength{\leftmargin}{0pt}% }% { \end{oldthebibliography}% } \begin{document} Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. \begin{thebibliography}{0} \bibitem{1} Baider A. Noncompact Riemannian manifolds with discrete spectra // J.Diff.Geom. -- 1979 -- V. 14 -- p. 41--57. \bibitem{2} Berger M., Gauduchon P., Mazet E. Le spectre d'une vari\'et\'e Rieman\-nienne -- Berlin-New York: Springer-Verlag, 1971. -- 251p. -- (Lecture Notes in Math.; V.~194) \end{thebibliography} \end{document} So I need the reference labels to be aligned with the parindent, and the rest part of the each bibliography entry should have general text width. I thought it's enough to set \leftmargin=0pt, but it didn't work. I have the following result: And what is actually more weird - it seems any value of \leftmargin doesn't have any effect to the bibliography display. The solution from the link above works fine if we don't have biblabel, but it's not my case. Could you help me to move lines with the red marks to the green one? |
I am trying to determine all entire functions $f$ with $\Re f(z) > 0$ for all $z \in \mathbb{C}$ such that, $f(0) = 1$. So far, my attempt is the following. Write $f = u+iv$, and define the function $$ g(z) = \frac{f(z)}{\Re f(z)} = \frac{u(z)+iv(z)}{u(z)} = 1 + i \frac{v(z)}{u(z)}. $$ Since $\Re f(z) > 0$ for all $z \in \mathbb{C}$, this is an entire function. We have $$ 1 = g(0) = 1 + i \frac{v(0)}{u(0)} $$ So $v(0) = 0$. Also, $$ |g(z)|^2 = 1 + \frac{v(z)^2}{u(z)^2}. $$ I want to apply Liousville Theorem somehow, so I'm looking for bounds, i.e. $$ |g(z)| \leq M|z|^m $$ for some $M$, $m \geq 0$, and for large enough $|z|$. I have no progress on this so far, I'm not sure if my attempt is in the right direction. | Greets This is exercise 15.d chapter 3 of Stein & Shakarchi's "Complex Analysis", they hint: "Use the maximum modulus principle", but I didn't see how to do the exercise with this hint rightaway, instead I knew how to do it with the Casorati-Weiestrass Theorem, here is my answer: Define $g(z)=f(1/z)$ for $z\neq{0}$,then by the hypothesis we must have that for any $\epsilon>0$ $g(D_{\epsilon>0}(0)-\{0\})$ is not dense in $\mathbb{C}$, then the singularity at $0$ of $g$ is not essential, this implies $f$ must be a polynomial, but if $f$ is a non-constant polynomial, it is easy to see that its real part must be unbounded, so $f$ must be constant. I would like to know an answer with the the maximum modulus principle. Thanks |
I have a small... problem atm. that could get bigger if I go further whitout knowing what I'm doing. So this happened: I have a Windows Server 2012 R2 It has 2 drives. C: & D: I wanted to give the usergroup Users more permission to change files in a specific folder. I recognized the user was in the Administrators group and actually should be able to change files in folder XY. Now after I granted rights to the Users-Group... he suddenly could change files there. All fine untill here. My thought was: may the admin-rights has to be refreshed so other users in the admin group won't run into the same problem . What I did is: D: => Right Click => Properties => Security Selected Administrators => Edit and took away the first checkbox. After exapting this, I dropped my hand on my head and realized that my rights are gone. And now I'm not able to grand them anymore for this folder or directory. I thoughts where: may you just change the owner But since I already have made this mistake I'm afraid to do the next one because inetpub and ftproot is running under D: and I don't know what will happen with the IIS and its rights when I change that. Any suggestion to solve this ? Or to get the rights back for this folder ? As information: I was logged in as administrator and took the right from the folder of the adminsitratorsgroup. But I still have access! EDIT: This is not a duplicate of . I DO have access to the folder! I only want all rights back. Thats some diffrent!!!! Also the posted possible duplicate doesnt even has a really answere! Specialy not suitable with my question. | I wanted to encrypt a specific folder in my company domain and now I cannot access it. This is Windows 7, I am administrator on of my PC. On the folder I did right click->properties->security for the System and Administrators I did Deny all. and for me (DOMAIN\ME) I gave full control. Now I cannot access the folder. I tried to set the permissions back, but with no success |
What's the difference? I think these two sentences seems slightly different. But I don't know the exact difference. Could anybody explain the difference to me? | Is there are rule when to use opened vs open? I always get confused even though I've been speaking English as the dominant language for more than half my life. E.g. Is the door open(ed)? Which file do you have open(ed) in your editor? |
I am writing as I have two shapefiles, one with an undefined projection/ coordinate system and another shapefile with a defined one. When I add them in gis, one shapefile is shown in another place than the other one. I am trying to project them together so one shapefile can overlay the other one; I go to ArcToolbox <- data management tools <-Project and Transformations <- Define Projection; As input I was adding the undefined shapefile and then I defined as output the projection as of my second shapefile; then I was using the Project option tool to project the new saved shapefile, after adding the new saved shapefile, but unfortunately still nothing was happening. When I zoom to the two different layers, they are shown at totally different places. | I have a Shapefile but its coordinate system is Unknown, and there is no *.prj file. How can I identify it now? |
We have 16 variables which are indices produced by calculations based on ratio (unitless in fact). Some examples of the ranges of our variables are (0.450-0.750), (0.000 - 0.800) and (0.000 - 1.000). Based on this data, we want to apply hierarchical and K-means clustering algorithms. According to the literature, it is recommended to apply standardization before PCA and clustering follows this. In our case, covariance matrix is proposed for PCA but we are not sure we should apply standardization before this process. If you could help us in this issue, we would be glad. Thanks in advance for your answers. | What are the main differences between performing principal component analysis (PCA) on the correlation matrix and on the covariance matrix? Do they give the same results? |
I use ubuntu in dual boot with windows 10. Besides the two partitions with the two operating systems, I have some unallocated space, I would like to use it to extend the ubuntu partition. I have tried with the 'Disks' tool, but I am only given the option to shrink the partition volume, not extend it. | Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers. Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions). Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space. How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions? |
does anyone understand why the code is returning empty array $name = 'login'; $data = 'user2'; $sql = 'SELECT :name FROM test.users WHERE :name=:data'; $sth = $dbh->prepare($sql); $sth->execute([':name' => $name, ':name' => $name, ':data' => $data]); $res = $sth->fetchAll(); var_dump($res); | Why can't I pass the table name to a prepared PDO statement? $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) { var_dump($stmt->fetchAll()); } Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do $sql = "SELECT * FROM $table WHERE 1" |
Let $\{x_n\}_{n=1}^\infty$ and $\{y_n\}_{n=1}^\infty$ be sequences of real numbers. Verify that each of the following holds, provided the right-hand side makes sense. $$\limsup(x_n+y_n)\geq\limsup(x_n)+\liminf(y_n)$$ For this problem we are allowed to assume the following holds: $$\limsup(x_n+y_n)\leq\limsup(x_n)+\limsup(y_n)$$ $$\limsup(-x_n)=-\liminf(x_n)\text{ and } \liminf(-x_n)=-\limsup(x_n)$$ What I've done so far: See that \begin{equation} \begin{split} \limsup(x_n)=\limsup(x_n+y_n-y_n) & \leq\limsup(x_n+y_n)+\limsup(-y_n) \\ & = \limsup(x_n+y_n) -\liminf(y_n) \end{split} \end{equation} So we obtain $$\limsup(x_n+y_n)\geq\limsup(x_n)+\liminf(y_n)\text{ as desired.}$$ I feel like this should hold, but I'm curious if this approach covers all potential exceptions. What if we are talking about the extended real numbers? What if $\{y_n\}$ or $\{x_n\}$ diverge? | Let $\{s_n\}$ and $\{t_n\}$ be sequences. I've noticed this inequality in a few analysis textbooks that I have come across, so I've started to think this can't be a typo: $\limsup\limits_{n \rightarrow \infty} s_n + \liminf\limits_{n \rightarrow \infty} t_n \leq \limsup\limits_{n \rightarrow \infty} (s_n + t_n) \leq \limsup\limits_{n \rightarrow \infty} s_n + \limsup\limits_{n \rightarrow \infty} t_n$. I understand the right two-thirds of the equation, and can prove it. I'm stuck on the far-left third. I don't understand how that is true. |
I want to prove the following$$n - 2\sqrt{n} = \Theta(n)$$ Is it correct to say $$n -1 \leq n \leq n +1 => f(n)=n=\Theta(n)$$ $$\sqrt{n}\leq|-2\sqrt{n}| = 2\sqrt{n}\leq3\sqrt{n} =>g(n)=-2\sqrt{n}=O\sqrt{n}$$ So: $n - 2\sqrt{n} = max(O(n),O(\sqrt{n}))=O(n)$ And: $n - 2\sqrt{n} = max(\Omega(n),\Omega(\sqrt{n}))=\Omega(n)$ So: $n - 2\sqrt{n} = \Theta{n}$ Edit: I am not interested in the solution to this problem , but whether my methodology for solving the problem is correct or not. | I want to prove the following $$n - 2\sqrt{n} = \Theta(n)$$ It's $n - 2\sqrt{n} \leq n = O(n)$ How can I prove the same for $\Omega(n)$ |
Why in the code below, string keyword seems not to be case-sensitive while int does (Int c brings error). String x= "string x"; string y= "string y"; int z = 1; Int c = 1; Console.WriteLine(x +" "+ y +" "+ z +" "+ c) | Example (note the case): string s = "Hello world!"; String s = "Hello world!"; What are the guidelines for the use of each? And what are the differences? |
I used my Wintel box to download Ubuntu 12.04 LTS. Burned an install DVD and installed on my laptop (Dell Inspiron 8500). When I try to boot the laptop from the hard drive I get a GPU Lockup message. If I let it sit, after a few minutes I get messages about a channel failing to idle. These repeat every few minutes. I have read some other posts and it sounds like I still ought to be able to do something, but I have no idea what. My GPU is an Nvida GeForce 4 4200. I am a total newbie at Linux. I have mark Sobell's Practical Guide to Ubuntu Linux. I will search it as well. Any help would be greatly appreciated. | I was able to install Ubuntu 12.04 using the alternative version of the image, (64 bit) but when I start the system it tells me the GPU locked up, and instead presents a text only screen. I understand that this site is not for bug reports, but at the same time, I know that there are some versions of the installer than have to be compatible with my graphics card (Nvidia GTS 360M). I assumed that the mere fact that the alternative installer ran was an indication that I could get some sort of graphical interface running after the install. Is there some way of getting some type of graphical interface running on my machine? Even better would be is there a way to get the rest of the system running as normal (i.e. GPU up and running)? If an internet connection is required to download driver support or something similar, directions for how to configure a wireless connection with WPA2-Personal protection from the text-only interface (bash). Any help would be appreciated. Note: I was able to find which tells me that the card is supported. Note 2: In the install software stage of the install, I was unable to install anything (no internet connection) Update: The exact error message is [8.591394] [drm] 0000:01:00.0: GPU Lockup - switching to software fbcon Update 2: If I try to install with the regular version of Ubuntu, the screen goes staticy. This also happens if I install with Wubi (distasteful I know) and then try to use Ubuntu. Update 3: I've tried xforcevesa, nomodeset and xforcevesa nomodeset as my wubi boot options. Update 4: Thanks to jokerdino, I can now connect to the internet, so internet tools would now be a possibility. |
So I submitted my sitemap to google search console which includes 3.5k URLs. At first, it said pending so that's alright. Now it says it indexed 1 page and when I resubmit it again it doesn't show pending. No errors in the search console. I even validated my sitemap and robots.txt files and they are both ok. Any idea why this is happening? thanks | This is a general, community wiki question and answer pair intended to address any questions concerning the reasons a site or specific site contents do not appear in search engine results. If your question was closed as a duplicate of this question and you feel that the information provided here does not provide a sufficient answer, please open a discussion on . My site (or specific pages on my site) is not appearing in search engine results. Why isn't my content indexed and what can I do about it? |
So I was trying to play around with matrix esponentials and proving a fundamental theorem of trigonometry analogon for this type structure. As it might happen, I ran across the problem in the title, while computing e^(zero matrix). I highly suppose it's the unit matrix, but is there a proper way to prove it? | Why $0^0=I$? I'd tried prove that considering $N^0$ where N is a Nilpotent matrix and then using the Cayley -Hamilton theorem Thanks in advance. |
Intuitively dropout make sense to me but I don't understand how backpropagation works in presence of dropout. It looks like at each training step we backpropagate gradients to parameters in the thinned network and ignore the dropped paths as if there was nothing stochastic in the network. Why is this valid? Shouldn't we apply something similar to reparameterization trick or gumbel-softmax approaches to backpropagate through dropout layers? | Regarding dropout, we know that in the forward propagation some neurons are put to "zero" (i.e., turned off). How about back propagation ? Are these dropped out neurons also zeros (turned off) during back-prop ? Thank Refer to this link, which seems to be not very clear ... : |
I'm web-developer and i decided to create my portfolio. So I need to create all my websites as images in perspective like on the following example. I have knowledge of Photoshop, but I cant create what I need with good quality so please help. If it is done in other software and not in Photoshop, please give me the name of that software. I need not only the perspective angles, but i also want good quality of images. | I need to create a "fake" 3D effect for some raster image, like this one below: do you know how I can achieve this in Photoshop (CS5) or Illustrator? Thanks. |
i m really confused about these two things: First this : is emma stone and sharon stone related or are emma stone and sharon stone related? 2nd question: do your girlfriend and her friends want to eat? Or does your girlfriend and her friend want to eat? Thanks | Possible Duplicate: I'm writing an interrogative sentence questioning someone else's writing: "Is grammar and spelling correct?" Can I use the singular verb "is" or must it be the plural verb "are"? (The sentence is one of a list of interrogative questions about the quality of writing, e.g. "Are words in the right order?" "Does the copy flow?") |
I am new with Daemons and I was wondering how can I make my main script a daemon? I have my main script which I wish to make a Daemon and run in the background: main.py def requestData(information): return currently_crunched_data() while True: crunchData() I would like to be able to use the requestData function to this daemon while the loop is running. I am not too familiar with Daemons or how to convert my script into one. However I am guessing I would have to make two threads, one for my cruncData loop and one for the Daemon request receiever since the Daemon has its own loop (daemon.requestLoop()). I am currently looking into Pyro to do this. Does anyone know how I can ultimately make a background running while loop have the ability to receive requests from other processes (like a Daemon I suppose) ? | reveals x2 code snippets. The first result is to which has a lot of documentation and explanation, along with some useful discussion underneath. However, , whilst not containing so much documentation, includes sample code for passing commands such as start, stop and restart. It also creates a PID file which can be handy for checking if the daemon is already running etc. These samples both explain how to create the daemon. Are there any additional things that need to be considered? Is one sample better than the other, and why? |
I'm using this code: <form action="https://google.com/search" method="get"> <input type="text" name="q" /> To allow me to search using google from a custom homepage. But after every search it seems to be caching my search terms. When I return to the HTML page when I click on the form it has my previous searches as auto fill drop-down box. I'd like to disable this function and stop the page from caching. Thank You | How do you disable autocomplete in the major browsers for a specific input (or form field)? |
i try to install or un-install some think and i get this: installArchives() failed: (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 222127 files and directories currently installed.) Removing vlc ... Processing triggers for desktop-file-utils ... Processing triggers for gnome-menus ... Processing triggers for bamfdaemon ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for mime-support ... Processing triggers for man-db ... Processing triggers for vlc-nox ... dpkg: error processing python-wxgtk2.8 (--configure): Package is in a very bad inconsistent state - you should reinstall it before attempting configuration. dpkg: dependency problems prevent configuration of playonlinux: playonlinux depends on python-wxgtk2.8; however: Package python-wxgtk2.8 is not configured yet. No apport report written because the error message indicates its a followup error from a previous failure. dpkg: error processing playonlinux (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: python-wxgtk2.8 playonlinux Error in function: dpkg: error processing python-wxgtk2.8 (--configure): Package is in a very bad inconsistent state - you should reinstall it before attempting configuration. dpkg: dependency problems prevent configuration of playonlinux: playonlinux depends on python-wxgtk2.8; however: Package python-wxgtk2.8 is not configured yet. dpkg: error processing playonlinux (--configure): dependency problems - leaving unconfigured | I can't update my system because it freezes while installing a third-party update (zramswap-enabler)! Sometimes I get the following message in Update manager: Could not initialize the package information An unresolvable problem occurred while initializing the package information. Please report this bug against the 'update-manager' package and include the following error message: E:The package zramswap-enabler needs to be reinstalled, but I can't find an archive for it. I tried to remove the zramswap-enabler, but it's impossible because I get the following message: dpkg: error processing zramswap-enabler (--remove): Package is in a very bad inconsistent state - you should reinstall it before attempting a removal. Errors were encountered while processing: zramswap-enabler E: Sub-process /usr/bin/dpkg returned an error code (1) Actually I would really reinstall that package, but it is unable to do it! If I remove this third-party PPA then the system is warning me about a very very serious problem. So why can I not install/reinstall/remove/update this package and why freezes the updater if I try to update? |
It was this very piece that Yo-Yo Ma was to play that evening. Why the above sentence write "was to play" instead of "played" ? | What is the meaning of this sentence: He met a girl who was to become a queen. Does it show the plan of the girl? Does it mean: He met a girl who 'was going to' become a queen? How and in which sense is 'was to' used in this sentence? |
I thought that the droid from Star Wars Rebels spoke in binary, but somehow Hera and Ezra are able to understand and interpret for it. It made sense for C3PO to understand R2 because they're both machines, and I always thought when a human character understood R2 it was because they had a console in front of them (I could be wrong, but I don't remember any instances where this wasn't the case). This doesn't seem to be the case for Chopper though. So, is Chopper not speaking in a binary encoding? Or is it somehow possible for humans to interpret binary in the Star Wars Universe? | In all the Star Wars movies, R2D2 just boops and beeps his way around. And everyone understands him perfectly, though he is obviously not speaking Basic. How do people understand him - is there like an astromech language? If so, then would one have to learn it, or is it comprised of feelings and emotions (expressed in beeps), essentially making a tonal language? If I may be permitted to use an example from the prequels without too many lynch mobs forming, Anakin Skywalker converses frequently with Artoo while in the Naboo fighter, but he couldn't have had much schooling at the age of eleven, especially because he was a slave. So how would people, Anakin especially, be able to understand astromechs? |
We took up the topic of particle nature of light recently.As the light is quantised when an electron jumps from higher to lower orbit it releases energy but as the energy is quantised it will release them in distinct packets.So while the electron is coming down: It's potential energy decreases as smooth fxn It releases a distinct amount of energy(as seen from its optical spectra) So the question arises what happens in between the jump.As the energy cant be released until it's sufficient to form a photon of corresponding energy,where does the energy go. Upon asking my teacher he said it's released as radiation as electron is accelerating.But then again radiation is released as photons. P.S.-I know elementary b.sc level maths and physics,so answers of appropriate level will be appreciated. | what's the type of movement when the electron jump from level to another when gaining or losing a quantum of energy is it actually jump or move in a specific movement? |
I am using t as global and assigned t value from the s1,s2 functions but after person1 it is not going to person2. And the error is as below File "C:\Users\Teja kaipa\Desktop\estimation.py", line 42, in person1 if (t>1): NameError: name 't' is not defined global t Code: def s1(): t=1 return t def s2(): t=2 return t def s3(): t=3 def person1(): output = 0 val1 = int(r1e1.get()) val2 = int(r1w1.get()) if ((val1-val2)==0): output = 1+2*val1 else: output = -2*abs(val1-val2) r1n1m.delete(0, END) r1n1m.insert(4,str(output)) if (t>1): person2() def person2(): val1= int(r1e2.get()) val2= int(r1w2.get()) if ((val1-val2)==0): output = 1+2*val1 else: output = -2*abs(val1-val2) r1n2m.delete(0, END) r1n2m.insert(4,str(output)) if (t>2): person3() | How can I create or use a global variable in a function? If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access? |
In this there's a solution to select and highlight a whole row from a table using jQuery. I have a callback (see the bottom of my script) when I click a row on the table. The problem is that my table gets generated from data, so the callback does not work on the generated cells. The callback works on the headers, which are not generated. How to attach the existing callback to the newly generated elements? <style> .selected { background-color: brown; color: #FFF; } </style> <body> <table id="table" border="1" ContentEditable> <tbody id="tablebody"> <tr> <th>Date</th> <th>Number</th> </tr> </tbody> </table> <button onclick="generateTable()">generateTable</button> <script> function generateTable() { var tbl = document.getElementById('table') var tbdy = document.getElementById('tablebody') //Table elements var arr={Date: "my date", Number:"my number"} var tr = document.createElement('tr'); for (el in arr) { var td = document.createElement('td'); var t = document.createTextNode(arr[el]); td.appendChild(t); tr.appendChild(td); } //append line to tbody tbdy.appendChild(tr); tbl.appendChild(tbdy); } jQuery("#table tr").click(function(){ console.log("this works only when clocking on the headers <th>") jQuery(this).addClass('selected') .siblings().removeClass('selected'); }); | 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. |
$X$ is a random variable in ($\Omega,\mathcal{F},\mathbb{P}$),$\mathcal{G,H}$ are two sub $\sigma$-algebra and $X$ is independent of $\mathcal{G}$ . I don't know whether the following equality is true or not.(if not, I can add the condition that $\mathcal{G,H}$ are independent) $$\mathbb{E}(X|\mathcal{G,H})=\mathbb{E}(X|\mathcal{H})$$ In intuition,it seems to be true since $\mathcal{G}$ doesn't provide any information.Rigorously,it is sufficient to prove that $\mathbb{E}(X|\mathcal{G,H})$ is $\mathcal{H}$-measurable.I am stuck in this step.Follow the definition of measurable,I want to analyze the structure of $\mathbb{E}(X|\mathcal{G,H})^{-1}(B)$ ($B\in\mathcal{H}$),I don't know what to do next. The question above comes from Durrett's textbook page 226:example 5.6.1 using backwards martingales to prove the SLLN. in the fifth line $$\mathbb{E}(\xi_j|\mathcal{F}_{-n-1})=\mathbb{E}(\xi_k|\mathcal{F}_{-n-1})$$ the author said it's true by symmetry but I want to prove it rigorously. I know how to prove $$\mathbb{E}(\xi_j|S_{n+1})=\mathbb{E}(\xi_k|S_{n+1})$$ but I don't know how to prove $$\mathbb{E}(\xi_j|\mathcal{F}_{-n-1})=\mathbb{E}(\xi_j|S_{n+1})$$ | I'm facing the following issue. Let $X$ be an integrable random variable on the probability space $(\Omega,\mathcal{F},\mathbb{P})$ and $\mathcal{G},\mathcal{H} \subseteq \mathcal{F}$ be two sigma-algebras. We assume that $X$ is independent of $\mathcal{G}$, i.e. $\sigma(X)$ is independent of $\mathcal{G}$. Can I say (and can I prove) that $$ E(X \mid \sigma(\mathcal{G} \cup \mathcal{H})) = E(X\mid \mathcal{H}) ?$$ Thank you very much for your help! |
id_dict = {1 : 'cat', 2 : 'dog', 3 : 'fish', 4 : 'cow' } feature_list = ['cat','cat', 'dog', 'dog','fish', 'calf'] id_list = ['nan','nan','nan','nan','nan', 'nan'] for key, value in id_dict.items(): for item in feature_list: if item == value: id_list[feature_list.index(value)] = key How can I make sure that the id_list is updated with [1,1,2,2,3] when the values match and pass over when a value is not in there ? Currently, only the first value is being updated. Current Output: [1, 'nan', 2, 'nan', 3] | 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'} |
Many times I faced proofs using degree theory technique and I am interested in such proofs and I want to know more about powerfulness of this technique and see more proofs using this technique. I would be appreciate if you show me your experience about this. | I'm preparing a presentation on an overview of algebraic and differential topology, and my introduction includes some motivational material on Degree Theory. I have two fundamental and invaluable mathematical consequences of this theory so far: Homotopy/Homology of Spheres Brouwer's Fixed Point Theorem Do any others come to mind? |
Just wondering, how exactly different difficulty levels affects to the gameplay? Does it switches AI into more aggressive mode, gives more starting money to a computer, etc.? | When creating a campaign you get the four difficulty options just like for each mission. Do they affect anything with respect to game-play (e.g. fewer credits earned in missions, more expensive upgrades, etc), achievements, or the story (e.g. extra or extended cutscenes); or does it simply set the "default" difficulty of each of the missions? |
file.txt 1.1.1.1 abc 1.1.1.1 ccc 1.2.2.2 ddd 1.2.2.2 qqq 1.2.2.2 zzz Expected result: 1.1.1.1 abc 1.2.2.2 ddd I tried: sed -i '/1.1.1.1/d' file.txt sed -i '/2.2.2.2/d' file.txt But however it remove all instead of leaving 1 result. How to delete all matching pattern but left 1? | I have a file containing two columns and 10 million rows. The first column contains many repeated values, but there is a distinct value in column 2. I want to remove the repeated rows and want to keep only one using awk. Note: the file is sorted with values in column 1. For example: 1.123 -4.0 2.234 -3.5 2.234 -3.1 2.234 -2.0 4.432 0.0 5.123 +0.2 8.654 +0.5 8.654 +0.8 8.654 +0.9 . . . . Expected output 1.123 -4.0 2.234 -3.5 4.432 0.0 5.123 +0.2 8.654 +0.5 . . . . |
Consider the following simple linear regression model involving the $\epsilon_i$ error term, $$y_i = \alpha + \beta x_i + \epsilon_i$$ such that, $$\epsilon_i \sim \mathcal N(0,\sigma^2)$$ we know that if $Z_1, Z_2, ..., Z_n$ are independent, standard normal random variables, $$Z_i \sim \mathcal N(0,1)$$ then the sum of their squares is distributed according to the chi-square distribution with $n$ degrees of freedom, $$\sum _{i=1}^{n} Z_{i}^{2} \sim \chi^{2}_{n}$$ Now let's prove that $\frac{(n-2)s^2}{\sigma^2}\sim \chi^{2}_{n-2}$ such that, $$s^2 = \frac{\sum _{i=1}^{n} \hat{\epsilon}_i^2}{n-2}$$ Proof: $\require{cancel}$ $$\epsilon_i \sim \mathcal N(0,\sigma^2)$$ $$\frac{\epsilon_i - \cancelto{0}{\overline{\epsilon}}}{\sigma} \sim \mathcal N(0, 1)$$ $$\sum _{i=1}^{n} \left(\frac{\epsilon_i}{\sigma}\right)^2 \sim \chi^{2}_{n}$$ $$\sum _{i=1}^{n} \frac{\epsilon_i^2}{\sigma^2} \sim \chi^{2}_{n}$$ How do I now move from this expression $\sum _{i=1}^{n} \frac{\epsilon_i^2}{\sigma^2}$ which uses the error term $\epsilon_i$ to this expression $\sum _{i=1}^{n} \frac{\hat{\epsilon}_i^2}{\sigma^2}$ which uses the residual term $\hat{\epsilon}_i$? | Consider the linear regression model: $$Y_i=r(x_i)+\varepsilon_i\equiv\sum_{j = 1}^p x_{ij} \beta _j + \varepsilon _i,\quad i=1,\ldots,n.$$ where $x_1,\ldots,x_n\in \mathbb{R}^p$ are fixed, $E(\varepsilon_i)=0$, $\operatorname{Var}(\varepsilon_i)=\sigma^2$. Denote $Y=(Y_1,\ldots,Y_n)^T$, $\beta=(\beta_1,\ldots,\beta_p)^T$, $X=(x_{ij})_{n\times p}$. As is known, $\hat \beta = \arg\min\limits_{\beta \in \mathbb{R}^p} (Y - X\beta)^T (Y - X\beta)=(X^TX)^{-1}X^TY$ if the matrix $X^TX$ is invertible, and so an estimator of $r(x)$ at $x=(x_1,\ldots,x_p)\in\mathbb{R}^p$ is given by $\hat r_n(x)=x^T\hat\beta$. Let $$\hat{\sigma}^2 = \frac{1}{\sigma^2}\sum_{i = 1}^n (Y_i - {\hat r}_n (x_i))^2.$$ I am stucking the problem: $\hat\sigma^2$ has $\chi^2_{n-p}$ distribution. How to prove the statement? |
I have a click event on a checkbox button which I remove in my click event and I append it again with another value. My problem is the click event is not working anymore after the new append. <input class="year" type="checkbox" value="2015" /> 2015 <br> $(".year").click(function(){ $(".col-md-12").remove(); //i remove the div which contains the checkbox $.ajax({ url: "criteria_search", type: 'POST', data: { criteria: "authors", value: "test" }, success: function(data) { articles = $.parseJSON(data) $("#AppendToElem").append(" <div class=\"col-md-12\"> <h2> Search Results <\/h2> <p> <span>There are<\/span> <strong>3974<\/strong> <span>results for:<\/span> <strong>Computer Animation and Virtual Worlds<\/strong> <\/p> <p> <a class=\"btn\" href=\"#\"><\/a> <\/p> <div class=\"row\"> <div class=\"col-md-3\"> <h3> Filter List <\/h3> <div class=\"form-group\"> <label for=\"exampleInputEmail1\"> Year <\/label><br>"); $.each(articles, function(index, jsonObject){ $("#AppendToElem").append("<input class=\"year\" type=\"checkbox\" value=" + jsonObject.date.date.substring(0, 4) + " /> " + jsonObject.date.date.substring(0, 4) + "<br>") }); ) }); }); And after I clicked on my checkbox the second time the click event is not handled. How can I fix 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 am trying to select the lowest value from an attribute table within model builder. I have used the Sort tool to sort the values in ascending order but when I add the Select tool and go to enter an expression there is no value selectable. From my understanding, the Sort tool assigns an FID to each value with the lowest value being 1 in which I could use the Select tool and enter the expression: "FID = 1" to get my desired output. I am relatively new to ModelBuilder. Any suggestions on how to work through this? Current Model | I am trying to use a SQL expression in order to select values that are >= 25% of its max value in that column. For instance, VALUE >= MAX(VALUE)*0.25, and those will ultimately be the selected points it pulls out. Is there syntax to make that happen, or am I going to need to create a new column and use field calculator on it? Biggest issue with that is I will have to do this for about 250 files. I am also trying to create this in ModelBuilder. When I try it as above it just returns that there is an error with the expression. |
I hear that people use the average and the mean of some numbers, interchangeably. As far as I know, the average is the sum of numbers divided by the number of data points but the mean is a weighted average and it is also called the expected value. Can somebody make it clear that when to use the average and when to use the mean? | What is the precise difference between the Mean, Average and Expectation ? Is there any mathematical formaulation to show the difference ? I see that often they are used interchangeably. |
From : Object interfaces allow you to create code which specifies which methods a class must implement, without having to define how these methods are handled. Why should I need to do that? Could it be a kind of 'documentation'? When I'm thinking about a class I have to implement, I know exactly which methods I should code. What are some situations where interfacing a class is a "best practice"? | allow you to create code which defines the methods of classes that implement it. You cannot however add any code to those methods. allow you to do the same thing, along with adding code to the method. Now if you can achieve the same goal with abstract classes, why do we even need the concept of interfaces? I've been told that it has to do with OO theory from C++ to Java, which is what PHP's OO stuff is based on. Is the concept useful in Java but not in PHP? Is it just a way to keep from having placeholders littered in the abstract class? Am I missing something? |
Unable to set default browser to Chrome. Neither from system side not from Chrome side. If I select Chrome in system settings, it just doesn't set. If I select to be default from Chrome, it opens the same system window. | After an update to both Windows 10 and Chrome (51.0.2704.103), my default browser has cleared: and clicking the "+" button to choose the default only gives me the option of Edge and Firefox: Does any one know why this is or what I can do to fix it? |
Let $\{\alpha_{i}\}_{i=1}^{n}$ be distinct numbers. What is the determinant of the $n$ by $n$ matrix \begin{gather} \begin{pmatrix} \alpha_{1}^{n-1} & \alpha_{1}^{n-2} & \cdots & 1 \\ \alpha_{2}^{n-1} & \alpha_{2}^{n-2} & \cdots & 1 \\ \vdots & \vdots & \ddots & \vdots \\ \alpha_{n}^{n-1} & \alpha_{n}^{n-2} & \cdots & 1 \end{pmatrix} \end{gather} ? | $V_n(a_1,a_2\dots, a_n)$ is a $n\times n$ Vandermonde matrix = $$\left|\begin{array}[cccc] 11&a_1&\cdots&a^{n-1}_1\\ 1&a_2&\cdots&a^{n-1}_2\\ 1&a_3&\cdots&a^{n-1}_3\\ \vdots&\vdots&\ddots&\vdots\\ 1&a_n&\cdots&a_n^{n-1} \end{array}\right|$$ Replace $a_1$ by $x$ so that the first row is $1,x, \dots ,x^{n-1}$ $$V_n(x,a_2\dots, a_n) = \left|\begin{array}[cccc] 11&x&\cdots&x^{n-1}\\ 1&a_2&\cdots&a^{n-1}_2\\ 1&a_3&\cdots&a^{n-1}_3\\ \vdots&\vdots&\ddots&\vdots\\ 1&a_n&\cdots&a_n^{n-1} \end{array}\right|$$ Let $P(x) = V_n(x,a_2\dots, a_n)$. (a) Show that $P(x)$ is a polynomial in $x$ of degree $\leq n-1$. $z = 1\det() -x\det() + x^2\det() -\cdots+ (-1)^{n-1}x^{n-1} \cdot \det()$, where each $\det()$ stands for the determinant of a smaller matrix after removing the appropriate columns, rows. Is this right? But isn't $z$ a polynomial of degree $n$? (b) Show that $P(x)$ has $n-1$ distinct roots $a_2, \dots a_n$ and therefore has factorization $P(x) = k \prod_{i=2}^n(x-a_i)$ where the constant factor $k$ is the coefficient of $x^{n-1}.$ I'll be honest, I have no clue how to do this. Not even sure where to start. Nor do I know where to start on the rest. (c) Show that $k = (-1)^{n-1}V_{n-1}(a_2,\dots a_n)$. (d) Use parts (b) and (c) to deduce the recursion formula $$V_n(a_1, \dots a_n) = \left(\prod_{i=2}^n(a_i-a_1)\right)V_{n-1}(a_2,\dots a_n)$$ (e) Use part (d) to deduce that $V_n(a_1,a_2,\dots a_n) = \prod^n_{1\leq i< j\leq n} (a_j - a_i)$ |
I have a list of taxonomy terms to make some categories on my website. When I click on one of them, the content appears, but I can't display the taxonomy term name. I can't find the right configuration in my view. To display the result, I need to alter the page.html.twig template and the views template. I want to display the name of the term in the page--my_name.html.twig template. | I have a custom view where I show a list of nodes by taxonomy term. Since there are many terms in dictionary, I can't describe every view page manually. Is there any way to set the page title as a taxonomy term title? |
EDIT: This question was marked as duplicate. While this might be true on a larger scale, the answer provided by Kusalananda gave me a better understanding of my options. If a syntax error inside a shell script happens, the interpretation of the script isn't necessarily terminated but simply continues at the next line of the script. Is there a way to catch the number of those syntax errors while the script is interpreted? I would really like to have something like a compiler report, stating the number of errors and warnings after the compiling has finished. Just for linux shell. | Considering that POSIX is the closest thing to a common standard among all unices, I'm interested in knowing if there's a shell that supports it exclusively. While most modern shells provide support for POSIX (and will run POSIX compliant scripts without any problem), they don't do a good job at pointing out non compliant features. Is there any shell that implements POSIX and POSIX only, in such a way that it'd throw an error for any non compliant feature? EDIT I want to clarify that I'm not asking for general tips for writing portable shell scripts. The related question mentionned in the comments already covered this. I thought of this question when I found out that bash has a --posix option but only to discover that it only affects some intialization behaviors which is not exactly what I'm looking for. |
Is it possible to create a list of all the databases where a specific user can access? For example, My user is 'Domain\MarySmith'. This user can access on a single database or can access many databases. I need a query like this: SELECT All_Db_Name_I_Can_Acces FROM ServerSql WHERE Username = 'Domain\MarySmith' | I'm really looking for this answer for some time. I bet there is a post here but, I really can't find ( even on google ). I think it's a simple task. I want to list all databases for a specific user. Is there a way to do this? It can be a view or a cursor. I just can't think of anything. |
What is the difference between "trans" and "inter" prefixes? For example what how does "trans-disciplinary" differ from "inter-disciplinary"? | In academia the words inter-discipline, multi-discipline, trans-discipline, or cross-discipline are used to describe a type of combination between different disciplines or the uniqueness of a field. Searching on OED.com for the terms inter, multi, cross and trans shows different uses. multi has some nouns and adjectives, with one option of "multi-, comb. form" cross has nouns, verbs, adjectives and prepositions, with "cross-, comb. form" inter has nouns, adjectives, verbs and prepositions, with "inter-, prefix" trans has nouns and adjectives, with "trans-, prefix" In academia, the difference between multi or inter is not well-defined. What is the difference between "comb.form" and "prefix"? Why are there no results for using multi or cross as a prefix, but there are for inter and trans? How did the interchangeability of these come about, or is it improper to use them that way? |
I'm writing an article using LaTeX for the first time. I need to use symbols < and > in the body text but they are not displaying, instead they come out as ! and ? (upside down). Can somebody tell me how to fix this? | When typing < or > in LaTeX and compiling with pdflatex, the less than and greater than symbols appear at upside down exclamation points. I'm not in math mode. |
Developing a window-32 bit application by using DelphiXE-7. I’ve following piece of code- Procedure TMainForm.Button1Click(Sender: TObject); Var iNum: Integer; bExit: Boolean; Begin ShowMessage(IntToStr(iNum)); repeat Inc(iNum); bExit := True; until Exit; End; I know that not initializing iNum before using it may cause this problem, but then it should also come at debugging time. But when I’m debugging or running compiled exe MessageBox is showing as “0” which seems correct, but when we are installing build and running the same procedure then MessageBox is showing some garbage value instead of zero. Something like “1632824”. Only difference between compiling and Build generation is that later one is not creating dcu. Please Advise Accordingly. | I'm new to Delphi, and I've been running some tests to see what object variables and stack variables are initialized to by default: TInstanceVariables = class fBoolean: boolean; // always starts off as false fInteger: integer; // always starts off as zero fObject: TObject; // always starts off as nil end; This is the behaviour I'm used to from other languages, but I'm wondering if it's safe to rely on it in Delphi? For example, I'm wondering if it might depend on a compiler setting, or perhaps work differently on different machines. Is it normal to rely on default initialized values for objects, or do you explicitly set all instance variables in the constructor? As for stack (procedure-level) variables, my tests are showing that unitialized booleans are true, unitialized integers are 2129993264, and uninialized objects are just invalid pointers (i.e. not nil). I'm guessing the norm is to always set procedure-level variables before accessing them? |
The plural form of physical units are always confusing me. I asked some senior students, some of them said we need to use plural form of units but some said units are always singular. For example, 1 meter is 1 meter. But it is 3 times, should it be 3 meters? I know that if we use the abbreviation form, no plural form, i.e. 3m. But if we use 'meter', for the case like 0.04 meter, should it be 0.04 meter or 0.04 meters? I think we should use 0.04 meter because it is less than or equal to 1. The last question I have is about foot and feet, when the magnitude is less than or equal to 1, I should use foot, otherwise, use feet instead, is that right? | I was in a conversation with my senior engineer where he kept on insisting that we can use plural when we write down any unit. I argued that it is not the 'common' practice or even throughout my whole academic career (unfortunately) I haven't found any instance where there was any plural unit used in the text books. He argued that if I said that it was not correct then it should have a good reason for that. When I searched for this topic I couldn't come to any conclusive decision. Such as thread and the other links those have been referred there (some leads to English.SE). These answers gave me the impression that it is grammatically acceptable provided the right circumstances. But I felt that it would be rather ambiguous to accept plurals on scientific and engineering notations. For example we were talking about output rate of a boiler which is measured in $\mathrm{kg/hr}$. My senior said that it is okay if anyone writes $\mathrm{kgs/hr}$. To me it looks ambiguous. If anyone writes $\mathrm{s}$ after $\mathrm{kg}$ it may give a plural sense but as well it may refer to second also. Moreover if anyone argues that this is acceptable in some cases (like $\mathrm{kgs/hr}$) then what would be the yard stick to find out accepted cases? For instance can we add $\mathrm{s}$ in $\mathrm{m/s}$ or $\mathrm{km/hr}$ like $\mathrm{ms/s}$ or $\mathrm{kms/hr}$? There is , which has this . the length of the laser is $5\ \mathrm{m}$ but not: the length of the laser is five meters But I want to have more conclusive answer to which one is acceptable i.e. $\mathrm{kg/hr}$ or $\mathrm{kgs/hr}$ (or other similar instances). |
Array ( [0] => Array ( [0] => abc [1] => def ) [1] => Array ( [0] => ghi [1] => jkl ) [2] => Array ( [0] => mno [1] => pql ) [3] => Array ( [0] => abc [1] => def ) [4] => Array ( [0] => ghi [1] => jkl ) [5] => Array ( [0] => mno [1] => pql ) ) | How can I remove duplicate values from a multi-dimensional array in PHP? Example array: Array ( [0] => Array ( [0] => abc [1] => def ) [1] => Array ( [0] => ghi [1] => jkl ) [2] => Array ( [0] => mno [1] => pql ) [3] => Array ( [0] => abc [1] => def ) [4] => Array ( [0] => ghi [1] => jkl ) [5] => Array ( [0] => mno [1] => pql ) ) |
I was wondering how long it would take for the Earth and Sun to crash into each other via gravitational force, if the Earth suddenly stopped orbiting around the sun. Instead of the Earth's forward motion balancing out with the centripetal force from the sun to create a curved orbit, it is instead just pulled towards the sun in a straight line. This is not as simple as putting the values into the Universal Gravitation Formula, since distance between the Earth and Sun would be constantly changing. Because of this continual change in distance, I figured calculus is needed. Since I don't know calculus, I wrote a program that re-evaluates the distance between the Earth and the Sun after every second. It gives me an answer of roughly 65 days for the Earth to reach the Sun. My question: can anyone who knows calculus please figure out how long the Earth and Sun would take to reach each other via gravitational force if the Earth stopped orbiting? I just want to know if the answer my computer program gave me is mostly accurate. | My friend and I have been wracking our heads with this one for the past 3 hours... We have 2 point masses, $m$ and $M$ in a perfect world separated by radius r. Starting from rest, they both begin to accelerate towards each other. So we have the gravitational force between them as: $$F_g ~=~ G\frac{Mm}{r^2}$$ How do we find out at what time they will collide? What we're having trouble with is this function being a function of $r$, but I have suspected it as actually a function of $t$ due to the units of $G$ being $N(m/kg)^2$. I've tried taking a number of integrals, which haven't really yielded anything useful. Any guidance? No, this is not an actual homework problem, we're just 2 math/physics/computer people who are very bored at work :) |
Firstly, I wanted to check. Can wavefunctions exist that are not in the form $\psi = \psi_{\mbox{spatial}}\times\psi_{\mbox{spin}}$? I am assuming you can have situations that are dependent on spin and so get a situation where a particle is either 'in position A and spin up' or 'in position down and spin down' so $|\psi\rangle = \frac{1}{\sqrt2}(|A\uparrow\rangle+ |B\downarrow\rangle)$, and thus not able to be separated. Also I wanted to check specifically that once you include spin-orbit coupling, the hydrogen atom eigenstates can no longer be in the form $\psi = \psi_{\mbox{spatial}}\times\psi_{\mbox{spin}}$. Wikipedia says that in this case the good quantum numbers can no longer be $l,j,s, m_l,m_s$ (which makes sense since e.g. $S_z$ does not commute with $L\cdot S$) but must instead be $l,j,s,m_j$. Therefore I would assume there could theoretically exist eigenstates with fixed $m_j$ but varying correlated combinations of $m_s$ and $m_l$ e.g. $|m_l=+1, m_s=0\rangle$ and $|m_l=0, m_s=+1\rangle$ (which indeed have fixed $l,j,s,m_j$, but cannot be separated into spatial and spin parts). Is this correct, or is there a reason why the wavefunction can still be separated into these parts? | The total wavefunction of an electron $\psi(\vec{r},s)$ can always be written as $$\psi(\vec{r},s)=\phi(\vec{r})\zeta_{s,m_s}$$ where $\phi(\vec{r})$ is the space part and $\zeta_{s,m_s}$ is the spin part of the total wavefunction $\psi(\vec{r},s)$. In my notation, $s=1/2, m_s=\pm 1/2$. Question 1 Is the above statement true? I am asking about any wavefunction here. Not only about energy eigenfunctions. Now imagine a system of two electrons. Even without any knowledge about the Hamiltonian of the system, the overall wavefunction $\psi(\vec{r}_1,\vec{r}_2;s_1,s_2)$ is antisymmetric. I think (I have this impression) under this general conditions, it is not possible to decompose $\psi(\vec{r}_1,\vec{r}_2;s_1,s_2)$ into a product of a space part and spin part. However, if the Hamiltonian is spin-independent, only then can we do such a decomposition into space part and spin part. Question 2 Can someone properly argue that how this is so? Please mention about any wavefunction of the system and about energy eigenfunctions. |
I have a problem that I don't know how to solve. I am using C++ with GLEW and GLFW, I initialise GLFW, create the window, make the window the current context, then I initialise GLEW. All of this happens on the main function. The problem appears when the code to create the VAO and the VBO is organised in methods, in classes, I see that the VAO is generated, that the VBO is generated, but when the data is sent to the GPU, using glBufferData, it does not work. If I take this piece of code and move it in the main function, everything works just fine, but outside it, it does not work. This code works perfectly on the main function, but if I move it in other functions, just to make things clear, it stops working. So I think the problem is somehow related with that context. I make the window, the current context, on the main function. Any Idea? // MAIN FUNCTION unsigned int vaoID; glGenVertexArrays(1, &vaoID); glBindVertexArray(vaoID); // if I move this code in a method of a class and pass the vao, to bind it again //there it does not work // if I leave it here, like this, it works unsigned int vboID; unsigned int attribPointer = 0; glGenBuffers(1, &vboID); glBindBuffer(GL_ARRAY_BUFFER, vboID); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); glVertexAttribPointer(attribPointer, 3, GL_FLOAT, GL_FALSE, 0, 0); glBindBuffer(GL_ARRAY_BUFFER, 0); glBindVertexArray(0); // the drawing part, just the idea, it's in a while, of course. glBindVertexArray(vaoID); glEnableVertexAttribArray(attribPointer); glDrawArrays(GL_TRIANGLES, 0, 6); glDisableVertexAttribArray(attribPointer); glBindVertexArray(0); //if I move it here, it's dead void storeDataInAttributeList(int attributeNumber, float data[], int vaoID) { glBindVertexArray(vaoID); unsigned int vboID; glGenBuffers(1, &vboID); vbos.push_back(vboID); glBindBuffer(GL_ARRAY_BUFFER, vboID); glBufferData(GL_ARRAY_BUFFER, sizeof(data), data, GL_STATIC_DRAW); glVertexAttribPointer(attributeNumber, 3, GL_FLOAT, GL_FALSE, 0, 0); glBindBuffer(GL_ARRAY_BUFFER, 0); } | First off, here is some code: int main() { int days[] = {1,2,3,4,5}; int *ptr = days; printf("%u\n", sizeof(days)); printf("%u\n", sizeof(ptr)); return 0; } Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)? |
'It's the ducks!', Peppa Pig exclaims in one episode, according to a student of mine. I can't for the life of me explain to him why. Research on here has led me to 'dummy it'. Am I right? | I wanted to leave the question title as is so as not to take away from my amusement :). Anyway, It's raining. What is raining? Is it the sky? The clouds? The weather? The rain? What is "it"? Any historical insights on the statement? |
I have pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.pac</groupId> <artifactId>test</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>test</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjrt</artifactId> <version>1.8.2</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.8.2</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjtools</artifactId> <version>1.8.2</version> </dependency> </dependencies> <!-- ... --> </project> And class and aspect: public class Main { public int a = 10; public static void main( String[] args ) { Main instance = new Main(); System.out.println(instance.test()); } public int test(){ return a; } } public aspect TestAspect { pointcut publicMethodExecuted(): execution(public !static * *(..)); int around() : publicMethodExecuted() { System.out.println("Test string"); int original_return_value = proceed(); return original_return_value * 100; } } But mvn install produce jar-file without aspectj jars. The jar looks like: root | |--META-INF | |--com | | | |--pac | | | |--Main.class | |--TestAspect.class | |--builddef.lst Why does the maven-jar-plugin got rid of the aspectj jars? How to fix that? I got NoClassDefFoundException at runtime: Exception in thread "main" java.lang.NoClassDefFoundError: org/aspectj/lang/NoAspectBoundException at com.badmitrii.Main.test(Main.java:1) at com.badmitrii.Main.main(Main.java:11) Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.NoAspectBoundException at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 2 more | I want to package my project in a single executable JAR for distribution. How can I make a Maven project package all dependency JARs into my output JAR? |
Why not simply use right away? Why is an axiom and what is not? Some of the obvious statements are made into axioms whereas other obvious statements aren't. For example, the axiom of choice, arbitrary union axiom, etc. Isn't it so obvious? | Thus, axioms are propositions we assume to be true and we use them in an axiomatic theory as premises to infer conclusions, which are called "theorems" of this theory. For example, we can use the to prove theorems of arithmetic. This is one meaning of the word "axiom". But I recognized that the word "axiom" is also used in quite different contexts. For example, a group is defined to be an algebraic structure consisting of a set $G$, an operation $G\times G\to G: (a, b)\mapsto ab$, an element $1\in G$ and a mapping $G\to G: a\mapsto a^{-1}$ such that the following conditions, the so-called group axioms, are satisfied: $\forall a, b, c\in G.\ (ab)c=a(bc)$, $\forall a\in G.\ 1a=a=a1$ and $\forall a\in G.\ aa^{-1}=1=a^{-1}a$. Why are these conditions (that an algebraic structure has to satisfy to be called a group) called axioms? What have these conditions to do with the word "axiom" in the sense specified above? I am really asking about this modern use of the word "axiom" in mathematical jargon. It would be very interesting to see how the modern use of the word "axiom" historically developed from the original meaning. Now, let me give more details why it appears to me that the word is being used in two different meanings: As peter.petrov did, one can argue that group theory is about the conclusions one can draw from the group axioms just as arithmetic is about the conclusions one can draw from the Peano axioms. But in my opinion there is a big difference: while arithmetic is really about natural numbers, the successor operation, addition, multiplication and the "less than" relation, group theory is not just about group elements, the group operation, the identity element and the inverse function. Group theory is rather about models of the group axioms. Thus: The axioms of group theory are not the group axioms, the axioms of group theory are the axioms of set theory. Theorems of arithmetic can be formalized as sentences over the signature (a. k. a. language) $\{0, s, +, \cdot\}$, while theorems of group theory cannot always be formalized as sentences over the signature $\{\cdot, 1, ^{-1}\}$. Let me give an example: A typical theorem of arithmetic is the case $n=4$ of Fermat's last theorem. It can be formalized as follows over the signature $\{0, s, +, \cdot\}$: $$\neg\exists x\exists y\exists z(x\not = 0\land y\not = 0\land z\not = 0\quad\land\quad x\cdot x\cdot x\cdot x + y\cdot y\cdot y\cdot y = z\cdot z\cdot z\cdot z).$$ A typical theorem of group theory is which states that for any finite group G, the order of every subgroup H of G divides the order of G. I think that one cannot formalize this theorem as a sentence over the "group theoretic" signature $\{\cdot, 1, ^{-1}\}$; or can one? |
I saw this on a Facebook page: \begin{align*} 1, \qquad \frac12,\qquad\frac{\frac12}{\frac34}, \qquad\frac{\frac{\frac12}{\frac34}}{\frac{\frac56}{\frac78}},\qquad \dots\to \frac{\sqrt{2}}2. \end{align*} The $n$-th term is the combination of $2^n$ consecutive integers from $1$ to $2^n$. Question: How to prove this in a both rigorous and easy way? 1st attempt Let $\{a_n\}$ be the sequence. We try to "simplify" $a_n$ as the form $\dfrac{1\cdot4\cdot6\cdot7\cdots}{2\cdot3\cdot5\cdot8\cdots}$, as simple fraction, to find the pattern in which some integers are numerators and others are denominators. Let $f: \Bbb N \mapsto \Bbb Z$ such that \begin{align*} a_n=\prod_{k=1}^{2^{n-1}}k^{(-1)^{f(k)}}.\tag{*} \end{align*} However, it seems hard to find the expression / recurrence formula for $f$ and show it converges to $\dfrac{\sqrt2}2$. 2nd attempt Again we let $\{a_n\}$ be the sequence. Consider the continued fraction: \begin{align*} \sqrt2=1+\underset{i=1}{\overset{\infty}{\mathrm K}} ~ \frac{1}{2}=1+\cfrac1{2+\cfrac1{2+\cfrac1{2+\cfrac1{\ddots}}}}. \end{align*} Then, we define \begin{align*} b_m=\frac12\left(1+\underset{i=1}{\overset{m}{\mathrm K}} ~ \frac{1}{2}\right)=\frac12+\frac12\cdot\cfrac1{2+\cfrac1{\ddots+\cfrac1{2}}}. \end{align*} Obviously $b_m$ converges to $\dfrac{\sqrt2}2$. Then we just need to show that $a_n$ is between $b_m$ and $b_{m+1}$ for big $m$ and $n$ ( $m$ depends on $n$), which seems complicated. | I was given this problem 30 years ago by a coworker, posted it 15 years ago to rec.puzzles, and got a solution from Barry Wolk, but have never seen it again. Consider the series: $$1, \frac{1}{2},\frac{\displaystyle\frac{1}{2}}{\displaystyle\frac{3}{4}},\frac{\displaystyle\frac{\displaystyle\frac{1}{2}}{\displaystyle\frac{3}{4}}}{\displaystyle\frac{\displaystyle\frac{5}{6}}{\displaystyle\frac{7}{8}}},\cdots$$ Each fraction keeps its large bars while being put atop a similar structure. This can also be represented as $$\frac{1\cdot 4 \cdot 6 \cdot 7 \cdot\cdots}{2 \cdot 3 \cdot 5 \cdot 8 \cdot\cdots}$$ terminating at $2^n$ for some $n$, where it is much closer to the limit than elsewhere. The challenge: Find the limit, not too hard by experiment In the last expression, find a simple, nonrecursive, expression to say whether $n$ is in the numerator or denominator Prove the limit is correct-this is the hard one. |
I dont want to install any 3rd party apps for hiding there images stored on device . How can I hide my images from the gallery app without installing any other app like Hide it Pro or Gallery lock? I use a low-end device and these apps use up my memory which would have otherwise been used for different apps. | How can I hide a jpeg image in Android Gallery? or is there a way to hide a folder of pictures for Gallery only? |
With mesh (stairs) following the curve path. Few stairs are in align rest as it goes up the stairs bending. Rotation scale applied. Tilt is also 0. Whats going wrong. Any suggestion or help Thanks. | I have attempting to make a fin tube for two days and it is killing me. Fin tubes are pipes that have a tight spiral of flat fins sticking out all around them. The spiral wraps around the circumference of the pipe. They are used in heat reclaimers among other places. I made a spiral using the extra shapes add-on and scales pretty tight. And then I set the scale. I made the fin shape and set its scale. I added the curve modifier and it jumped around a bit. I set its origin point to one end face and finally got it going the right way off the beginning of the curve. Then I added the array modifier and moved it to the top of the stack. It all looked good for the first loop, then the fins started to tip. The outside edge aimed upward steadily as the inside edge seemed to continue to be oriented at the center base of the curve. How can I keep the darned things at 90 degrees to the z axis? Or should I be using a particle system? I haven't learned that one yet, sigh. |
A few months back when I buggered up my netbook and then booted into it to get information from it using a live USB. (Thinking that was 10.10) When I was copy/pasting this to another USB at no time was I required to enter my user name or password to access this information. Why and how was that possible? Shouldn't that not be possible? This was information from the 'home' including documents, pictures, music, videos and some other locations. This does not sound secure at all, is there any way that I can ensure this cannot happen again and that user name and password would be required to access information on my installed Ubuntu computer when booting on that computer from a live USB/CD/DVD? | Recently one of my friends came over to my place, within 15 minutes he hacked my account using a Live CD and reset the password in front of me. I was baffled to see such a thing. Please guide me to prevent such a future attempt using a Live CD. |
I have designed a GUI which has a jTextArea. I can append text to this very easily in this class. But I would also like to append text to this from methods of other classes. For this I make the jTextArea public and create an object of that class in the other class. Now I can write to the jTextArea while executing methods in the other classes. But it turns out that I need a method of the class I created an object in within my GUI class as well. As I do that, StackOverflowError happens. What should I do? | What is a StackOverflowError, what causes it, and how should I deal with them? |
When the user is asked to search for a word, I want it to be case-insensitive. import string usersentence= input("Please type in a sentence without punctuation: ") usersentence = ''.join(ch for ch in usersentence if ch not in set(string.punctuation)) print (usersentence.upper()) for i in range(1): # number of words you wont to search word= input("Please enter a word you want to search for in the sentence: ") words = usersentence.split(' ') passed = False # Something to check if the word is found for (i, words) in enumerate(words): if (words == word): print("your word appears in position(s): ") print(i+1) passed = True # The word has been found if not passed: print("Sorry your word does not seem to be here") | How can I do case insensitive string comparison in Python? I would like to encapsulate comparison of a regular strings to a repository string using in a very simple and Pythonic way. I also would like to have ability to look up values in a dict hashed by strings using regular python strings. |
/testfor @p[score_state=1,score_state_min=1] doesn't work! Why? It returns this: The entity UUID provided is in an invalid format How can I fix this? | Because there are so many questions asking about this, but not closed as duplicates, I decided to make a uniting question here: There are two three four basic situations here: Why does the /testfor command (I have) always output an error (not listed below)? Why does the /testfor command (I have) always output the entity UUID is an invalid format? Why does the same /testfor command sometimes output the entity UUID is an invalid format instead of found [x] and sometimes not? Why does the /testfor command not output anything? |
I can’t seem to access Grub on my HP Stream laptop (model 14-ds0033nr). Laptop came with windows 10, and I’m currently using Ubuntu 20.04 LTS as the sole OS. My main issue is that I forgot my root password, and need access to Grub (I think..?) to change the password. I’ve tried F1-F12, ESC, Shift, E,C following Post and nothing seems to work. I appreciate any help you guys can offer | I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there. I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution? |
If short is automatically promoted to int in arithmetic operations, then why is: short thirty = 10 * 3; A legal assignment to the short variable thirty? In turn, this: short ten = 10; short three = 3; short thirty = ten * three; // DOES NOT COMPILE AS EXPECTED as well as this: int ten = 10; int three = 3; short thirty = ten * three; // DOES NOT COMPILE AS EXPECTED does not compile because assigning an int value to a short is not allowed without casting as expected. Is there something special going on about numerical literals? | I have a question about the primitive type short in Java. I am using JDK 1.6. If I have the following: short a = 2; short b = 3; short c = a + b; the compiler does not want to compile - it says that it "cannot convert from int to short" and suggests that I make a cast to short, so this: short c = (short) (a + b); really works. But my question is why do I need to cast? The values of a and b are in the range of short - the range of short values is {-32,768, 32767}. I also need to cast when I want to perform the operations -, *, / (I haven't checked for others). If I do the same for primitive type int, I do not need to cast aa+bb to int. The following works fine: int aa = 2; int bb = 3; int cc = aa +bb; I discovered this while designing a class where I needed to add two variables of type short, and the compiler wanted me to make a cast. If I do this with two variables of type int, I don't need to cast. A small remark: the same thing also happens with the primitive type byte. So, this works: byte a = 2; byte b = 3; byte c = (byte) (a + b); but this not: byte a = 2; byte b = 3; byte c = a + b; For long, float, double, and int, there is no need to cast. Only for short and byte values. |
A year ago I was running Ubuntu Server 19.04 on rPI4. I needed vcgencmd so I had to install libraspberrypi-bin. I have notes on how to clone the userland repository, edit few files, and compile it from source. I did it last year and it works fine up to this day. I got another rPI4 today and need to install it again, however it looks like the files in repo changed since and my own obscure method doesn't work any more. I googled around and following guide. I've added ppa:ubuntu-raspi2/ppa repo to my fresh Ubuntu 20.04 however after running apt update I get the following error: root@ubuntu:/tmp# sudo apt update Hit:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease Hit:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease Ign:3 http://ppa.launchpad.net/ubuntu-raspi2/ppa/ubuntu focal InRelease Hit:4 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease Hit:5 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease Err:6 http://ppa.launchpad.net/ubuntu-raspi2/ppa/ubuntu focal Release 404 Not Found [IP: 2001:67c:1560:8008::15 80] Reading package lists... Done E: The repository 'http://ppa.launchpad.net/ubuntu-raspi2/ppa/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. It looks like that repo was last updated over 2 years ago I guess this guide is also out of date. My question in short: how to get libraspberrypi-bin on Ubuntu 20.04 for Raspberry Pi 4? | When updating, I get the following error message: W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file. Here, I find another statement on this error: This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need. Is this what I should do? |
What is the easiest code to cite in PRL format. I was using the citation package apacite. Now i want to change it into PRL format. Is there any edasy way to do it?\ I tried using the rev4 package but it didn't work. I want the journal name in standard abbreviated format. Is there any other way to do it? | I'd like to know if someone ported the bibliography styles used in revtex 4.1 (like apsrev4-1.bst) so they can be used in other classes, like book. Thanks in advance! |
I'm trying to use the following code to insert three pictures horizontally - the code compiles perfectly, but the images are coming out as black boxes/rectangles. I've made sure that the images are in the same file as the .tex document - what am I doing wrong? I would really appreciate and help I can get. \documentclass[english]{article} \usepackage[demo]{graphicx} \usepackage{babel,blindtext} \begin{document} \begin{figure}[!htb] \minipage{0.32\textwidth} \includegraphics[width=\linewidth]{delete_gesture.png} \caption{A really Awesome Image}\label{fig:awesome_image1} \endminipage\hfill \minipage{0.32\textwidth} \includegraphics[width=\linewidth]{ok_gesture.png} \caption{A really Awesome Image}\label{fig:awesome_image2} \endminipage\hfill \minipage{0.32\textwidth}% \includegraphics[width=\linewidth]{settings_gesture.png} \caption{A really Awesome Image}\label{fig:awesome_image3} \endminipage \end{figure} \end{document} | I write some of my network notes in TeX. I wanted to make a table, and inside it insert an image: . I wrote a document: \documentclass{article} \usepackage[demo]{graphicx} \usepackage{booktabs} \usepackage{array} \begin{document} \begin{tabular}{m{3cm}m{3cm}m{5cm}} \toprule Configuration for ... & Commands & Topology\\ \midrule PPP: CHAP, PAP & \#sh int se 0/0/0 & \includegraphics[width=4cm, height=4cm]{chappap.png}\\ & & \\ \bottomrule \end{tabular} \end{document} But instead of my network topology image, I see only this: . I don't know what is wrong, cause my image is 100% in the same dir, as my *.tex file. EDIT: Changed my code as @Jubobs suggested, now everything is as I wanted: \documentclass{article} \usepackage{graphicx} \usepackage{booktabs} \usepackage{array} \begin{document} \begin{tabular}{m{3cm}m{3cm}m{5cm}} \toprule Configuration for ... & Commands & Topology\\ \midrule PPP: CHAP, PAP & \#sh int se 0/0/0 & \includegraphics[width=4cm, height=4cm]{chappap.png}\\ & & \\ \bottomrule \end{tabular} \end{document} |
Is it possible to import an fbx model, so that I can edit models from unity in blender? I tried and nothing worked, when I open the file I see the default cube when opening blender. | I am trying to import an FBX file from Unity into Blender. Does anybody know how to do that? |
I have several IRA mutual fund accounts in Vanguard Funds. To pay taxes on time, I want to borrow some from the IRA's, but then pay it back within 60 days. Does the IRS allow this? | In brief, I am projecting out a budget for a personal construction project I am having done, and the numbers are very tight. I have some buffer built in, but if I exceed the buffer amount and my cash flow is restricted (e.g. my clients pay late, etc.), I will need some sort of short term bridge loan. This is about six month down the road, but I am trying to understand my options before wading in. From it sounds like I can withdraw money ostensibly for the purpose of rolling the money into a new account, but can return the money within 60 days with no penalty. Am I understanding this correctly? Note that I would not consider this unless I feel 100% confident that I could pay the money back within the 60 days. Given all of this, am I understanding the rollover rules correctly? Any other pitfalls I would need to be concerned about? |
Every one i have Lenovo G580 laptop which came without any operating system then i installed windows 8.1 and now trying to install Ubuntu 14.04 along side but the option in the Ubuntu installation does not shows windows 8.1 installed instead it suggests to install erase everything and install ... please give me suggestions how to install Ubuntu alongside windows 8.1 thank you.. waiting for the suggestion. | Whenever I startup from the LinuxLive USB, and try to install Ubuntu 12.04, it only gives me two options instead of the usual 3 or 4. My options are "Replace Windows 7 with Ubuntu" and "Something Else". Whenever I go into "Something else", it looks extremely confusing. How do I install it side-by-side while using the "Something else" section? These are my partitions. /dev/sda /dev/sda1 ntfs (104Mb, System Required Partition) /dev/sda2 ntfs (1000097Mb, Windows 7 Partition) Or should I try reinstalling my installer on a CD rather than USB and maybe then it will have the "Install alongside" function? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.